diff --git a/pkt_netflow.c b/pkt_netflow.c
index d474e88..a06dbc6 100644
--- a/pkt_netflow.c
+++ b/pkt_netflow.c
@@ -1820,6 +1820,7 @@ static ctl_table netflow_net_table[] = {
 	{ }
 };
 #else /* >= 2.6.25 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
 static struct ctl_path netflow_sysctl_path[] = {
 	{
 		.procname = "net",
@@ -1830,6 +1831,7 @@ static struct ctl_path netflow_sysctl_path[] = {
 	{ .procname = "netflow" },
 	{ }
 };
+#endif /* 6.4.0 */
 #endif /* 2.6.25 */
 #endif /* CONFIG_SYSCTL */
 
@@ -5129,8 +5131,12 @@ static int __init pkt_netflow_init(void)
 #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;
