diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-16 04:05:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-16 04:05:03 -0400 |
commit | cec3ffae1a019f02cd6b5fa291f279c8e9f86157 (patch) | |
tree | 12711c9b887afaccf8dd5e48c80cc0da716211b0 /net | |
parent | b9fae5c9138086d27715a8a0f29d5b55239db35c (diff) |
[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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index bc4d4cb89b01..da7147090a19 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) | |||
318 | err = -ENOENT; | 318 | err = -ENOENT; |
319 | 319 | ||
320 | read_lock(&ipip_lock); | 320 | read_lock(&ipip_lock); |
321 | t = ipip_tunnel_lookup(&init_net, iph->daddr, iph->saddr); | 321 | t = ipip_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr); |
322 | if (t == NULL || t->parms.iph.daddr == 0) | 322 | if (t == NULL || t->parms.iph.daddr == 0) |
323 | goto out; | 323 | goto out; |
324 | 324 | ||
@@ -478,7 +478,7 @@ static int ipip_rcv(struct sk_buff *skb) | |||
478 | const struct iphdr *iph = ip_hdr(skb); | 478 | const struct iphdr *iph = ip_hdr(skb); |
479 | 479 | ||
480 | read_lock(&ipip_lock); | 480 | read_lock(&ipip_lock); |
481 | if ((tunnel = ipip_tunnel_lookup(&init_net, | 481 | if ((tunnel = ipip_tunnel_lookup(dev_net(skb->dev), |
482 | iph->saddr, iph->daddr)) != NULL) { | 482 | iph->saddr, iph->daddr)) != NULL) { |
483 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 483 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
484 | read_unlock(&ipip_lock); | 484 | read_unlock(&ipip_lock); |