aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-16 04:09:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-16 04:09:44 -0400
commit3b4667f3db4d7d0b6d8f35c2ca80333ea141629a (patch)
tree2224c61f148a25721753af6c526150668f040d5d /net/ipv4/ip_gre.c
parentf57e7d5a7bd2a600a8a97e278e4c46904ceacf51 (diff)
[GRE]: Use proper net in hash-lookup functions.
This is the part#2 of the patch #2 - get the proper net for these functions. This change in a separate patch in order not to 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/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 6209ab36cab7..1a17c5beffdc 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -377,7 +377,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
377 } 377 }
378 378
379 read_lock(&ipgre_lock); 379 read_lock(&ipgre_lock);
380 t = ipgre_tunnel_lookup(&init_net, iph->daddr, iph->saddr, 380 t = ipgre_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr,
381 (flags&GRE_KEY) ? 381 (flags&GRE_KEY) ?
382 *(((__be32*)p) + (grehlen>>2) - 1) : 0); 382 *(((__be32*)p) + (grehlen>>2) - 1) : 0);
383 if (t == NULL || t->parms.iph.daddr == 0 || 383 if (t == NULL || t->parms.iph.daddr == 0 ||
@@ -612,7 +612,7 @@ static int ipgre_rcv(struct sk_buff *skb)
612 } 612 }
613 613
614 read_lock(&ipgre_lock); 614 read_lock(&ipgre_lock);
615 if ((tunnel = ipgre_tunnel_lookup(&init_net, 615 if ((tunnel = ipgre_tunnel_lookup(dev_net(skb->dev),
616 iph->saddr, iph->daddr, key)) != NULL) { 616 iph->saddr, iph->daddr, key)) != NULL) {
617 secpath_reset(skb); 617 secpath_reset(skb);
618 618