]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Factorise sk_family-independent comparison in inet_bind2_bucket_match(_addr_any).
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 11 Sep 2023 18:36:55 +0000 (11:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:10 +0000 (12:28 +0200)
commit489ced24c7cac38db8af63f79f118fe78c3c709d
tree74689086c1a2133ef06ed13e2e3820bb6192507d
parent82f9af464e01f314f228523ef4cb8f46406c587a
tcp: Factorise sk_family-independent comparison in inet_bind2_bucket_match(_addr_any).

[ Upstream commit c6d277064b1da7f9015b575a562734de87a7e463 ]

This is a prep patch to make the following patches cleaner that touch
inet_bind2_bucket_match() and inet_bind2_bucket_match_addr_any().

Both functions have duplicated comparison for netns, port, and l3mdev.
Let's factorise them.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: aa99e5f87bd5 ("tcp: Fix bind() regression for v4-mapped-v6 wildcard address.")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/inet_hashtables.c