Skip to content

Commit cbb2fb5

Browse files
Josef Bacikdavem330
authored andcommitted
net: set tb->fast_sk_family
We need to set the tb->fast_sk_family properly so we can use the proper comparison function for all subsequent reuseport bind requests. Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robinson <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 581fe0e commit cbb2fb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv4/inet_connection_sock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
328328
tb->fastuid = uid;
329329
tb->fast_rcv_saddr = sk->sk_rcv_saddr;
330330
tb->fast_ipv6_only = ipv6_only_sock(sk);
331+
tb->fast_sk_family = sk->sk_family;
331332
#if IS_ENABLED(CONFIG_IPV6)
332333
tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
333334
#endif
@@ -354,6 +355,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
354355
tb->fastuid = uid;
355356
tb->fast_rcv_saddr = sk->sk_rcv_saddr;
356357
tb->fast_ipv6_only = ipv6_only_sock(sk);
358+
tb->fast_sk_family = sk->sk_family;
357359
#if IS_ENABLED(CONFIG_IPV6)
358360
tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
359361
#endif

0 commit comments

Comments
 (0)