diff options
author | Eric Dumazet <edumazet@google.com> | 2019-06-08 20:58:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-09 23:10:19 -0400 |
commit | c67b85558ff20cb1ff20874461d12af456bee5d0 (patch) | |
tree | 74fbc1da8b19b683614d91c512a4a73c04a873a9 /net/ipv4/tcp_minisocks.c | |
parent | 6566cd3690c19759b57757b171e9d605bd38432b (diff) |
ipv6: tcp: send consistent autoflowlabel in TIME_WAIT state
In case autoflowlabel is in action, skb_get_hash_flowi6()
derives a non zero skb->hash to the flowlabel.
If skb->hash is zero, a flow dissection is performed.
Since all TCP skbs sent from ESTABLISH state inherit their
skb->hash from sk->sk_txhash, we better keep a copy
of sk->sk_txhash into the TIME_WAIT socket.
After this patch, ACK or RST packets sent on behalf of
a TIME_WAIT socket have the flowlabel that was previously
used by the flow.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 7c35731816e2..11011e8386dc 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -283,6 +283,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) | |||
283 | tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; | 283 | tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; |
284 | tw->tw_tclass = np->tclass; | 284 | tw->tw_tclass = np->tclass; |
285 | tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK); | 285 | tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK); |
286 | tw->tw_txhash = sk->sk_txhash; | ||
286 | tw->tw_ipv6only = sk->sk_ipv6only; | 287 | tw->tw_ipv6only = sk->sk_ipv6only; |
287 | } | 288 | } |
288 | #endif | 289 | #endif |