summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-16 01:05:03 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-16 01:05:03 -0700
commitcec3ffae1a019f02cd6b5fa291f279c8e9f86157 (patch)
tree12711c9b887afaccf8dd5e48c80cc0da716211b0
parentb9fae5c9138086d27715a8a0f29d5b55239db35c (diff)
downloadop-kernel-dev-cec3ffae1a019f02cd6b5fa291f279c8e9f86157.zip
op-kernel-dev-cec3ffae1a019f02cd6b5fa291f279c8e9f86157.tar.gz
[IPIP]: Use proper net in hash-lookup functions.
This is the part#2 of the previous patch - get the proper net for these functions. I make it in a separate patch, so that this change does not get lost in a large previous patch. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/ipip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index bc4d4cb..da714709 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -318,7 +318,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
err = -ENOENT;
read_lock(&ipip_lock);
- t = ipip_tunnel_lookup(&init_net, iph->daddr, iph->saddr);
+ t = ipip_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr);
if (t == NULL || t->parms.iph.daddr == 0)
goto out;
@@ -478,7 +478,7 @@ static int ipip_rcv(struct sk_buff *skb)
const struct iphdr *iph = ip_hdr(skb);
read_lock(&ipip_lock);
- if ((tunnel = ipip_tunnel_lookup(&init_net,
+ if ((tunnel = ipip_tunnel_lookup(dev_net(skb->dev),
iph->saddr, iph->daddr)) != NULL) {
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
read_unlock(&ipip_lock);
OpenPOWER on IntegriCloud