]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[GRE]: Use proper net in hash-lookup functions.
authorPavel Emelyanov <xemul@openvz.org>
Wed, 16 Apr 2008 08:09:44 +0000 (01:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Apr 2008 08:09:44 +0000 (01:09 -0700)
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>
net/ipv4/ip_gre.c

index 6209ab36cab7fda2c9ff047a8241403c6c62ab15..1a17c5beffdc64143467b815507145e8d161904f 100644 (file)
@@ -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);