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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Sep 2023 06:18:04 +0000 (07:18 +0100)
commitc6d277064b1da7f9015b575a562734de87a7e463
treee21d6f23771be4a2447624c4c23e26622293d759
parent8cdd9f1aaedf823006449faa4e540026c692ac43
tcp: Factorise sk_family-independent comparison in inet_bind2_bucket_match(_addr_any).

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>
net/ipv4/inet_hashtables.c