diff options
author | Kevin Yang <yyd@google.com> | 2023-02-07 05:08:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-08 12:07:11 +0300 |
commit | c11204c78d6966c5bda6dd05c3ac5cbb193f93e3 (patch) | |
tree | 54f64528a4dd356ee84f12c30f5174c41577b4d7 /COPYING | |
parent | c966153d120222cd4e85e1e1601584d7d4d91dcb (diff) | |
download | linux-c11204c78d6966c5bda6dd05c3ac5cbb193f93e3.tar.xz |
txhash: fix sk->sk_txrehash default
This code fix a bug that sk->sk_txrehash gets its default enable
value from sysctl_txrehash only when the socket is a TCP listener.
We should have sysctl_txrehash to set the default sk->sk_txrehash,
no matter TCP, nor listerner/connector.
Tested by following packetdrill:
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 socket(..., SOCK_DGRAM, IPPROTO_UDP) = 4
// SO_TXREHASH == 74, default to sysctl_txrehash == 1
+0 getsockopt(3, SOL_SOCKET, 74, [1], [4]) = 0
+0 getsockopt(4, SOL_SOCKET, 74, [1], [4]) = 0
Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
Signed-off-by: Kevin Yang <yyd@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions