Commit 3016dad7 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: remove buggy call to tcp_v6_restore_cb()

tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as
used in TCP stack.
MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus
TCP_SKB_CB(skb)->header.h6

This patch probably fixes RST packets sent on behalf of a timewait md5
ipv6 socket.

Before Florian patch, tcp_v6_restore_cb() was needed before jumping to
no_tcp_socket label.

Fixes: 271c3b9b ("tcp: honour SO_BINDTODEVICE for TW_RST case too")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90a6ec85
...@@ -1590,7 +1590,6 @@ static int tcp_v6_rcv(struct sk_buff *skb) ...@@ -1590,7 +1590,6 @@ static int tcp_v6_rcv(struct sk_buff *skb)
tcp_v6_timewait_ack(sk, skb); tcp_v6_timewait_ack(sk, skb);
break; break;
case TCP_TW_RST: case TCP_TW_RST:
tcp_v6_restore_cb(skb);
tcp_v6_send_reset(sk, skb); tcp_v6_send_reset(sk, skb);
inet_twsk_deschedule_put(inet_twsk(sk)); inet_twsk_deschedule_put(inet_twsk(sk));
goto discard_it; goto discard_it;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment