tcp: Set NULL to sk->sk_prot->h.hashinfo.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Thu, 8 Sep 2022 01:10:19 +0000 (18:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 20 Sep 2022 17:21:49 +0000 (10:21 -0700)
commit429e42c1c54e0d9bfe880195f7d4a8fd5a727194
treef0e05ad8dcad224204fdda0e66f25626f275cc8b
parente9bd0cca09d13ac2f08d25e195203e42d4ad1ce8
tcp: Set NULL to sk->sk_prot->h.hashinfo.

We will soon introduce an optional per-netns ehash.

This means we cannot use the global sk->sk_prot->h.hashinfo
to fetch a TCP hashinfo.

Instead, set NULL to sk->sk_prot->h.hashinfo for TCP and get
a proper hashinfo from net->ipv4.tcp_death_row.hashinfo.

Note that we need not use sk->sk_prot->h.hashinfo if DCCP is
disabled.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/inet_hashtables.h
net/ipv4/af_inet.c
net/ipv4/inet_connection_sock.c
net/ipv4/inet_hashtables.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c