Description: Cope with register_sysctl_paths removal in Linux kernel 6.4
Bug: https://github.com/aabc/ipt-netflow/issues/220
Bug-Debian: https://bugs.debian.org/1038203
Author: Lukasz Kalamlacki <kalamlacki@gmail.com>
Author: Axel Beckert <abe@debian.org>
Origin: https://github.com/kalamlacki/ipt-netflow/commit/2a1d250a701405b81fdf3548b4b9c12bf266a306 and https://github.com/kalamlacki/ipt-netflow/commit/373b58781a0fc99fcb354ea3b5e4f3a006a71ab6

--- a/ipt_NETFLOW.c
+++ b/ipt_NETFLOW.c
@@ -1929,6 +1929,7 @@
 	{ }
 };
 #else /* >= 2.6.25 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
 static struct ctl_path netflow_sysctl_path[] = {
 	{
 		.procname = "net",
@@ -1939,6 +1940,7 @@
 	{ .procname = "netflow" },
 	{ }
 };
+#endif /* 6.4.0 */
 #endif /* 2.6.25 */
 #endif /* CONFIG_SYSCTL */
 
@@ -5685,8 +5687,12 @@
 #endif
 						      );
 #else /* 2.6.25 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
 	netflow_sysctl_header = register_sysctl_paths(netflow_sysctl_path, netflow_sysctl_table);
-#endif
+#else
+	netflow_sysctl_header = register_sysctl("net/netflow", netflow_sysctl_table);
+#endif /* 6.4.0 */
+#endif /* 2.6.25 */
 	if (!netflow_sysctl_header) {
 		printk(KERN_ERR "netflow: can't register to sysctl\n");
 		goto err_free_proc_stat3;
