diff options
author | Akhmat Karakotov <hmukos@yandex-team.ru> | 2022-01-31 16:31:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-31 15:05:25 +0000 |
commit | cb6cd2cec799356e5e2f75a8591894599a6ad49d (patch) | |
tree | 7211b0a22e1a7011c1210fbfad9a0695f5a9bd93 /net/core/sock.c | |
parent | e7b9bfd18476cd3de9a3819235f9221e59abc80a (diff) |
tcp: Change SYN ACK retransmit behaviour to account for rehash
Disabling rehash behavior did not affect SYN ACK retransmits because hash
was forcefully changed bypassing the sk_rethink_hash function. This patch
adds a condition which checks for rehash mode before resetting hash.
Signed-off-by: Akhmat Karakotov <hmukos@yandex-team.ru>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 5e711b42898f..d6804685f17f 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1452,7 +1452,8 @@ set_sndbuf: ret = -EINVAL; break; } - sk->sk_txrehash = (u8)val; + /* Paired with READ_ONCE() in tcp_rtx_synack() */ + WRITE_ONCE(sk->sk_txrehash, (u8)val); break; default: |