提交 3b4667f3 编写于 作者: P Pavel Emelyanov 提交者: David S. Miller

[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: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f57e7d5a
...@@ -377,7 +377,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info) ...@@ -377,7 +377,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
} }
read_lock(&ipgre_lock); 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) ? (flags&GRE_KEY) ?
*(((__be32*)p) + (grehlen>>2) - 1) : 0); *(((__be32*)p) + (grehlen>>2) - 1) : 0);
if (t == NULL || t->parms.iph.daddr == 0 || if (t == NULL || t->parms.iph.daddr == 0 ||
...@@ -612,7 +612,7 @@ static int ipgre_rcv(struct sk_buff *skb) ...@@ -612,7 +612,7 @@ static int ipgre_rcv(struct sk_buff *skb)
} }
read_lock(&ipgre_lock); 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) { iph->saddr, iph->daddr, key)) != NULL) {
secpath_reset(skb); secpath_reset(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册