Commit cec3ffae1a019f02cd6b5fa291f279c8e9f86157
Committed by
David S. Miller
1 parent
b9fae5c913
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
net/ipv4/ipip.c
... | ... | @@ -318,7 +318,7 @@ |
318 | 318 | err = -ENOENT; |
319 | 319 | |
320 | 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 | 322 | if (t == NULL || t->parms.iph.daddr == 0) |
323 | 323 | goto out; |
324 | 324 | |
... | ... | @@ -478,7 +478,7 @@ |
478 | 478 | const struct iphdr *iph = ip_hdr(skb); |
479 | 479 | |
480 | 480 | read_lock(&ipip_lock); |
481 | - if ((tunnel = ipip_tunnel_lookup(&init_net, | |
481 | + if ((tunnel = ipip_tunnel_lookup(dev_net(skb->dev), | |
482 | 482 | iph->saddr, iph->daddr)) != NULL) { |
483 | 483 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
484 | 484 | read_unlock(&ipip_lock); |