From: Pavel Emelyanov Date: Wed, 16 Apr 2008 08:09:44 +0000 (-0700) Subject: [GRE]: Use proper net in hash-lookup functions. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3b4667f3db4d7d0b6d8f35c2ca80333ea141629a;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: David S. Miller --- 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) } read_lock(&ipgre_lock); - t = ipgre_tunnel_lookup(&init_net, iph->daddr, iph->saddr, + t = ipgre_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr, (flags&GRE_KEY) ? *(((__be32*)p) + (grehlen>>2) - 1) : 0); if (t == NULL || t->parms.iph.daddr == 0 || @@ -612,7 +612,7 @@ static int ipgre_rcv(struct sk_buff *skb) } read_lock(&ipgre_lock); - if ((tunnel = ipgre_tunnel_lookup(&init_net, + if ((tunnel = ipgre_tunnel_lookup(dev_net(skb->dev), iph->saddr, iph->daddr, key)) != NULL) { secpath_reset(skb);