提交 7932c2e5 编写于 作者: D David S. Miller

netfilter: Add missing CONFIG_SYSCTL checks in ipv6's nf_conntrack_reasm.c

Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 10d8c463
...@@ -625,21 +625,24 @@ int nf_ct_frag6_init(void) ...@@ -625,21 +625,24 @@ int nf_ct_frag6_init(void)
inet_frags_init_net(&nf_init_frags); inet_frags_init_net(&nf_init_frags);
inet_frags_init(&nf_frags); inet_frags_init(&nf_frags);
#ifdef CONFIG_SYSCTL
nf_ct_frag6_sysctl_header = register_sysctl_paths(nf_net_netfilter_sysctl_path, nf_ct_frag6_sysctl_header = register_sysctl_paths(nf_net_netfilter_sysctl_path,
nf_ct_frag6_sysctl_table); nf_ct_frag6_sysctl_table);
if (!nf_ct_frag6_sysctl_header) { if (!nf_ct_frag6_sysctl_header) {
inet_frags_fini(&nf_frags); inet_frags_fini(&nf_frags);
return -ENOMEM; return -ENOMEM;
} }
#endif
return 0; return 0;
} }
void nf_ct_frag6_cleanup(void) void nf_ct_frag6_cleanup(void)
{ {
#ifdef CONFIG_SYSCTL
unregister_sysctl_table(nf_ct_frag6_sysctl_header); unregister_sysctl_table(nf_ct_frag6_sysctl_header);
nf_ct_frag6_sysctl_header = NULL; nf_ct_frag6_sysctl_header = NULL;
#endif
inet_frags_fini(&nf_frags); inet_frags_fini(&nf_frags);
nf_init_frags.low_thresh = 0; nf_init_frags.low_thresh = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册