summaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2012-06-08 01:21:40 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-08 14:27:23 -0700
commit54db0cc2ba0d38166acc2d6bae21721405305537 (patch)
tree9c067a1e7be7e3f2c862b3d64568ba330a0e0b2c /net/ipv6/route.c
parentc8a627ed06d6d49bf65015a2185c519335c4c83f (diff)
downloadlinux-3.10-54db0cc2ba0d38166acc2d6bae21721405305537.tar.gz
linux-3.10-54db0cc2ba0d38166acc2d6bae21721405305537.tar.bz2
linux-3.10-54db0cc2ba0d38166acc2d6bae21721405305537.zip
inetpeer: add parameter net for inet_getpeer_v4,v6
add struct net as a parameter of inet_getpeer_v[4,6], use net to replace &init_net. and modify some places to provide net for inet_getpeer_v[4,6] Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 999a982ad3f..4eca0130cce 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -306,9 +306,10 @@ static u32 rt6_peer_genid(void)
void rt6_bind_peer(struct rt6_info *rt, int create)
{
+ struct net *net = dev_net(rt->dst.dev);
struct inet_peer *peer;
- peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create);
+ peer = inet_getpeer_v6(net, &rt->rt6i_dst.addr, create);
if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL)
inet_putpeer(peer);
else