Kevin Yang c11204c78d 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>
2023-02-08 09:07:11 +00:00
..
2023-02-08 09:07:11 +00:00
2021-05-17 15:29:35 -07:00
2022-11-16 12:48:44 +00:00
2022-11-16 12:48:44 +00:00
2022-11-16 12:48:44 +00:00
2022-10-28 10:47:42 +01:00
2021-05-17 15:29:35 -07:00
2022-06-21 11:38:29 +02:00
2022-06-24 22:48:33 -07:00
2022-10-28 10:47:42 +01:00
2022-09-20 10:21:49 -07:00
2022-12-13 15:47:48 -08:00
2022-12-20 03:13:45 +01:00
2021-05-17 15:29:35 -07:00
2022-11-16 09:43:35 +00:00