[NETFILTER]: nf_conntrack: move registration of __nf_ct_attach
Move registration of __nf_ct_attach to nf_conntrack_core to make it usable for IPv6 connection tracking as well. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
deac0ccdb4
commit
7d3cdc6b55
2 changed files with 5 additions and 5 deletions
|
@ -529,15 +529,10 @@ static int init_or_cleanup(int init)
|
||||||
goto cleanup_localinops;
|
goto cleanup_localinops;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For use by REJECT target */
|
|
||||||
ip_ct_attach = __nf_conntrack_attach;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
synchronize_net();
|
synchronize_net();
|
||||||
ip_ct_attach = NULL;
|
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
unregister_sysctl_table(nf_ct_ipv4_sysctl_header);
|
unregister_sysctl_table(nf_ct_ipv4_sysctl_header);
|
||||||
cleanup_localinops:
|
cleanup_localinops:
|
||||||
|
|
|
@ -1556,6 +1556,8 @@ void nf_conntrack_cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
ip_ct_attach = NULL;
|
||||||
|
|
||||||
/* This makes sure all current packets have passed through
|
/* This makes sure all current packets have passed through
|
||||||
netfilter framework. Roll on, two-stage module
|
netfilter framework. Roll on, two-stage module
|
||||||
delete... */
|
delete... */
|
||||||
|
@ -1715,6 +1717,9 @@ int __init nf_conntrack_init(void)
|
||||||
nf_ct_l3protos[i] = &nf_conntrack_generic_l3proto;
|
nf_ct_l3protos[i] = &nf_conntrack_generic_l3proto;
|
||||||
write_unlock_bh(&nf_conntrack_lock);
|
write_unlock_bh(&nf_conntrack_lock);
|
||||||
|
|
||||||
|
/* For use by REJECT target */
|
||||||
|
ip_ct_attach = __nf_conntrack_attach;
|
||||||
|
|
||||||
/* Set up fake conntrack:
|
/* Set up fake conntrack:
|
||||||
- to never be deleted, not in any hashes */
|
- to never be deleted, not in any hashes */
|
||||||
atomic_set(&nf_conntrack_untracked.ct_general.use, 1);
|
atomic_set(&nf_conntrack_untracked.ct_general.use, 1);
|
||||||
|
|
Loading…
Reference in a new issue