summaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-08 23:24:18 -0700
committerDavid S. Miller <davem@davemloft.net>2012-06-08 23:24:18 -0700
commitfbfe95a42e90b3dd079cc9019ba7d7700feee0f6 (patch)
treef5f16e6efcf1411a47df8b836f669fc452489dd4 /net/ipv6/tcp_ipv6.c
parent7123aaa3a1416529ce461e98108e6b343b294643 (diff)
inet: Create and use rt{,6}_get_peer_create().
There's a lot of places that open-code rt{,6}_get_peer() only because they want to set 'create' to one. So add an rt{,6}_get_peer_create() for their sake. There were also a few spots open-coding plain rt{,6}_get_peer() and those are transformed here as well. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 1a9cdd09f11..218433cb992 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1744,9 +1744,7 @@ static struct inet_peer *tcp_v6_get_peer(struct sock *sk, bool *release_it)
peer = inet_getpeer_v6(net, &np->daddr, 1);
*release_it = true;
} else {
- if (!rt->rt6i_peer)
- rt6_bind_peer(rt, 1);
- peer = rt->rt6i_peer;
+ peer = rt6_get_peer_create(rt);
*release_it = false;
}