]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: tcp: send consistent autoflowlabel in TIME_WAIT state
authorEric Dumazet <edumazet@google.com>
Sun, 9 Jun 2019 00:58:51 +0000 (17:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2019 03:10:19 +0000 (20:10 -0700)
commitc94e73298ea1291af033f97785a6dee1678ddc38
tree74fbc1da8b19b683614d91c512a4a73c04a873a9
parentcd3c023e1a5aa60e972976cc04ebc2f18aad01d3
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>
include/net/inet_timewait_sock.h
net/ipv4/tcp_minisocks.c
net/ipv6/tcp_ipv6.c