Message ID | 20170123185922.48046-3-tracywwnj@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, 2017-01-23 at 10:59 -0800, Wei Wang wrote: > From: Wei Wang <weiwan@google.com> > > Remove __sk_dst_reset() in the failure handling because __sk_dst_reset() > will eventually get called when sk is released. No need to handle it in > the protocol specific connect call. > This is also to make the code path consistent with ipv4. > > Signed-off-by: Wei Wang <weiwan@google.com> > --- Suggested-by: Eric Dumazet <edumazet@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Thanks.
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index f72100eedd5d..0b7cd3d009b6 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -295,7 +295,6 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, late_failure: tcp_set_state(sk, TCP_CLOSE); - __sk_dst_reset(sk); failure: inet->inet_dport = 0; sk->sk_route_caps = 0;