]>
Commit | Line | Data |
---|---|---|
fa55523a GKH |
1 | From foo@baz Thu Dec 14 11:45:40 CET 2017 |
2 | From: Eric Dumazet <edumazet@google.com> | |
3 | Date: Wed, 29 Nov 2017 17:43:57 -0800 | |
4 | Subject: tcp: remove buggy call to tcp_v6_restore_cb() | |
5 | ||
6 | From: Eric Dumazet <edumazet@google.com> | |
7 | ||
8 | ||
9 | [ Upstream commit 3016dad75b48279e579117ee3ed566ba90a3b023 ] | |
10 | ||
11 | tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as | |
12 | used in TCP stack. | |
13 | MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus | |
14 | TCP_SKB_CB(skb)->header.h6 | |
15 | ||
16 | This patch probably fixes RST packets sent on behalf of a timewait md5 | |
17 | ipv6 socket. | |
18 | ||
19 | Before Florian patch, tcp_v6_restore_cb() was needed before jumping to | |
20 | no_tcp_socket label. | |
21 | ||
22 | Fixes: 271c3b9b7bda ("tcp: honour SO_BINDTODEVICE for TW_RST case too") | |
23 | Signed-off-by: Eric Dumazet <edumazet@google.com> | |
24 | Cc: Florian Westphal <fw@strlen.de> | |
25 | Acked-by: Florian Westphal <fw@strlen.de> | |
26 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
28 | --- | |
29 | net/ipv6/tcp_ipv6.c | 1 - | |
30 | 1 file changed, 1 deletion(-) | |
31 | ||
32 | --- a/net/ipv6/tcp_ipv6.c | |
33 | +++ b/net/ipv6/tcp_ipv6.c | |
34 | @@ -1585,7 +1585,6 @@ do_time_wait: | |
35 | tcp_v6_timewait_ack(sk, skb); | |
36 | break; | |
37 | case TCP_TW_RST: | |
38 | - tcp_v6_restore_cb(skb); | |
39 | tcp_v6_send_reset(sk, skb); | |
40 | inet_twsk_deschedule_put(inet_twsk(sk)); | |
41 | goto discard_it; |