diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-10 04:12:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-10 04:12:36 +0200 |
commit | c0efc887dcadbdbfe171f028acfab9c7c00e9dde (patch) | |
tree | d2f628d6c222c6328a6f310378d7227c32ebf183 /net/ipv6/route.c | |
parent | af_unix: remove unix_iter_state (diff) | |
download | linux-c0efc887dcadbdbfe171f028acfab9c7c00e9dde.tar.xz linux-c0efc887dcadbdbfe171f028acfab9c7c00e9dde.zip |
inet: Pass inetpeer root into inet_getpeer*() interfaces.
Otherwise we reference potentially non-existing members when
ipv6 is disabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9586c27e069c..8fc41d502bbd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -306,7 +306,7 @@ 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(net, &rt->rt6i_dst.addr, create); + peer = inet_getpeer_v6(net->ipv6.peers, &rt->rt6i_dst.addr, create); if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL) inet_putpeer(peer); else |