]> Git Repo - linux.git/commit
tcp: Rearrange tests in inet_bind2_bucket_(addr_match|match_addr_any)().
authorKuniyuki Iwashima <[email protected]>
Tue, 19 Dec 2023 00:18:23 +0000 (09:18 +0900)
committerDavid S. Miller <[email protected]>
Fri, 22 Dec 2023 22:15:34 +0000 (22:15 +0000)
commit56f3e3f01f81dfb010598e01df033e8836f5c61a
tree1c5476c655da207de1ae00caa39258fd5ef7e59e
parent5e07e672412bed473122813ab35d4f7d42fd9635
tcp: Rearrange tests in inet_bind2_bucket_(addr_match|match_addr_any)().

The protocol family tests in inet_bind2_bucket_addr_match() and
inet_bind2_bucket_match_addr_any() are ordered as follows.

  if (sk->sk_family != tb2->family)
  else if (sk->sk_family == AF_INET6)
  else

This patch rearranges them so that AF_INET6 socket is handled first
to make the following patch tidy, where tb2->family will be removed.

  if (sk->sk_family == AF_INET6)
  else if (tb2->family == AF_INET6)
  else

Signed-off-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv4/inet_hashtables.c
This page took 0.051909 seconds and 4 git commands to generate.