[Devel] [PATCH 36/38] netns nat: skip every NOTRACKed connection
adobriyan at gmail.com
adobriyan at gmail.com
Thu Aug 21 15:10:25 PDT 2008
Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
---
net/ipv4/netfilter/nf_nat_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -588,6 +588,10 @@ static int __net_init nf_nat_net_init(struct net *net)
&net->ipv4.nat_vmalloced);
if (!net->ipv4.nat_bysource)
return -ENOMEM;
+
+ /* Initialize fake conntrack so that NAT will skip it */
+ net->ct.untracked.status |= IPS_NAT_DONE_MASK;
+
return 0;
}
@@ -645,9 +649,6 @@ static int __init nf_nat_init(void)
rcu_assign_pointer(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp);
spin_unlock_bh(&nf_nat_lock);
- /* Initialize fake conntrack so that NAT will skip it */
- init_net.ct.untracked.status |= IPS_NAT_DONE_MASK;
-
l3proto = nf_ct_l3proto_find_get((u_int16_t)AF_INET);
BUG_ON(nf_nat_seq_adjust_hook != NULL);
--
1.5.6.3
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list