Skip to content

Commit f650210

Browse files
committed
Build compatibility with v6.4 (register_sysctl_paths)
'register_sysctl_paths' is missed from v6.4 due to 0199849acd07 ("sysctl: remove register_sysctl_paths()"). Signed-off-by: ABC <[email protected]>
1 parent b049e91 commit f650210

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

gen_compat_def

+2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ kbuild_test_symbol totalram_pages linux/mm.h
127127
kbuild_test_ref totalram_pages linux/mm.h
128128
# b86c0e6429da ("netfilter: ecache: prepare for event notifier merge")
129129
kbuild_test_member nf_ct_event_notifier.ct_event net/netfilter/nf_conntrack_ecache.h
130+
# 6.4: 0199849acd07 ("sysctl: remove register_sysctl_paths()")
131+
kbuild_test_symbol register_sysctl_paths linux/sysctl.h
130132

131133
echo "// End of compat_def.h"
132134

ipt_NETFLOW.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -1929,16 +1929,18 @@ static ctl_table netflow_net_table[] = {
19291929
{ }
19301930
};
19311931
#else /* >= 2.6.25 */
1932+
# ifdef HAVE_REGISTER_SYSCTL_PATHS
19321933
static struct ctl_path netflow_sysctl_path[] = {
19331934
{
19341935
.procname = "net",
1935-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
1936+
# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
19361937
.ctl_name = CTL_NET
1937-
#endif
1938+
# endif
19381939
},
19391940
{ .procname = "netflow" },
19401941
{ }
19411942
};
1943+
# endif
19421944
#endif /* 2.6.25 */
19431945
#endif /* CONFIG_SYSCTL */
19441946

@@ -5666,7 +5668,11 @@ static int __init ipt_netflow_init(void)
56665668
#endif
56675669
);
56685670
#else /* 2.6.25 */
5671+
# ifdef HAVE_REGISTER_SYSCTL_PATHS
56695672
netflow_sysctl_header = register_sysctl_paths(netflow_sysctl_path, netflow_sysctl_table);
5673+
# else
5674+
netflow_sysctl_header = register_sysctl("net/netflow", netflow_sysctl_table);
5675+
# endif
56705676
#endif
56715677
if (!netflow_sysctl_header) {
56725678
printk(KERN_ERR "netflow: can't register to sysctl\n");

0 commit comments

Comments
 (0)