net: ipv4: use consistent txhash in TIME_WAIT and SYN_RECV
[ Upstream commit c0a8966e ] When using IPv4/TCP, skb->hash comes from sk->sk_txhash except in TIME_WAIT and SYN_RECV where it's not set in the reply skb from ip_send_unicast_reply. Those packets will have a mismatched hash with others from the same flow as their hashes will be 0. IPv6 does not have the same issue as the hash is set from the socket txhash in those cases. This commits sets the hash in the reply skb from ip_send_unicast_reply, which makes the IPv4 code behaving like IPv6. Signed-off-by:Antoine Tenart <atenart@kernel.org> Reviewed-by:
Eric Dumazet <edumazet@google.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com> Stable-dep-of: 5e526552 ("tcp: annotate data-races around tcp_rsk(req)->txhash") Signed-off-by:
Sasha Levin <sashal@kernel.org>
parent
1d8e3ec4
Please register or sign in to comment