aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-10-08 05:35:04 -0400
committerPatrick McHardy <kaber@trash.net>2008-10-08 05:35:04 -0400
commita702a65fc1376fc1f6757ec2a6960348af3f1876 (patch)
tree4d44e147a76b35228a4535c9cc446c1d1bf0dddd /net/ipv4
parent63c9a26264be108b52de087724673f8664570e34 (diff)
netfilter: netns nf_conntrack: pass netns pointer to nf_conntrack_in()
It's deducible from skb->dev or skb->dst->dev, but we know netns at the moment of call, so pass it down and use for finding and creating conntracks. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 03dd108015c2..2e4dd3fb0022 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -172,7 +172,7 @@ static unsigned int ipv4_conntrack_in(unsigned int hooknum,
172 const struct net_device *out, 172 const struct net_device *out,
173 int (*okfn)(struct sk_buff *)) 173 int (*okfn)(struct sk_buff *))
174{ 174{
175 return nf_conntrack_in(PF_INET, hooknum, skb); 175 return nf_conntrack_in(dev_net(in), PF_INET, hooknum, skb);
176} 176}
177 177
178static unsigned int ipv4_conntrack_local(unsigned int hooknum, 178static unsigned int ipv4_conntrack_local(unsigned int hooknum,
@@ -188,7 +188,7 @@ static unsigned int ipv4_conntrack_local(unsigned int hooknum,
188 printk("ipt_hook: happy cracking.\n"); 188 printk("ipt_hook: happy cracking.\n");
189 return NF_ACCEPT; 189 return NF_ACCEPT;
190 } 190 }
191 return nf_conntrack_in(PF_INET, hooknum, skb); 191 return nf_conntrack_in(dev_net(out), PF_INET, hooknum, skb);
192} 192}
193 193
194/* Connection tracking may drop packets, but never alters them, so 194/* Connection tracking may drop packets, but never alters them, so