Skip to content

Commit

Permalink
net: Remove __sk_dst_reset() in tcp_v6_connect()
Browse files Browse the repository at this point in the history
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>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Wang authored and David S. Miller committed Jan 25, 2017
1 parent 065263f commit 25776aa
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 25776aa

Please sign in to comment.