Skip to content

Commit

Permalink
[GRE]: Use proper net in hash-lookup functions.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 16, 2008
1 parent f57e7d5 commit 3b4667f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3b4667f

Please sign in to comment.