* [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb()
@ 2017-11-30 1:43 Eric Dumazet
2017-11-30 8:14 ` Florian Westphal
2017-11-30 15:22 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2017-11-30 1:43 UTC (permalink / raw)
To: Florian Westphal; +Cc: netdev, David Miller
From: Eric Dumazet <edumazet@google.com>
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: 271c3b9b7bda ("tcp: honour SO_BINDTODEVICE for TW_RST case too")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
---
net/ipv6/tcp_ipv6.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 6bb98c93edfe2ed2f16fe5229605f8108cfc7f9a..be11dc13aa705145a83177e17d23594e9416e11a 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1590,7 +1590,6 @@ static int tcp_v6_rcv(struct sk_buff *skb)
tcp_v6_timewait_ack(sk, skb);
break;
case TCP_TW_RST:
- tcp_v6_restore_cb(skb);
tcp_v6_send_reset(sk, skb);
inet_twsk_deschedule_put(inet_twsk(sk));
goto discard_it;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb()
2017-11-30 1:43 [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb() Eric Dumazet
@ 2017-11-30 8:14 ` Florian Westphal
2017-11-30 15:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2017-11-30 8:14 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Florian Westphal, netdev, David Miller
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> 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
Indeed, thanks for fixing this up.
Acked-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb()
2017-11-30 1:43 [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb() Eric Dumazet
2017-11-30 8:14 ` Florian Westphal
@ 2017-11-30 15:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-11-30 15:22 UTC (permalink / raw)
To: eric.dumazet; +Cc: fw, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 29 Nov 2017 17:43:57 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> 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: 271c3b9b7bda ("tcp: honour SO_BINDTODEVICE for TW_RST case too")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-30 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30 1:43 [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb() Eric Dumazet
2017-11-30 8:14 ` Florian Westphal
2017-11-30 15:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).