[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>

authored by Yasuyuki Kozakai and committed by David S. Miller 7d3cdc6b deac0ccd

+5 -5
-5
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
··· 529 529 goto cleanup_localinops; 530 530 } 531 531 #endif 532 - 533 - /* For use by REJECT target */ 534 - ip_ct_attach = __nf_conntrack_attach; 535 - 536 532 return ret; 537 533 538 534 cleanup: 539 535 synchronize_net(); 540 - ip_ct_attach = NULL; 541 536 #ifdef CONFIG_SYSCTL 542 537 unregister_sysctl_table(nf_ct_ipv4_sysctl_header); 543 538 cleanup_localinops:
+5
net/netfilter/nf_conntrack_core.c
··· 1556 1556 { 1557 1557 int i; 1558 1558 1559 + ip_ct_attach = NULL; 1560 + 1559 1561 /* This makes sure all current packets have passed through 1560 1562 netfilter framework. Roll on, two-stage module 1561 1563 delete... */ ··· 1716 1714 for (i = 0; i < PF_MAX; i++) 1717 1715 nf_ct_l3protos[i] = &nf_conntrack_generic_l3proto; 1718 1716 write_unlock_bh(&nf_conntrack_lock); 1717 + 1718 + /* For use by REJECT target */ 1719 + ip_ct_attach = __nf_conntrack_attach; 1719 1720 1720 1721 /* Set up fake conntrack: 1721 1722 - to never be deleted, not in any hashes */