Skip to content

Commit 7a56673

Browse files
Josef Bacikdavem330
authored andcommitted
net: use inet6_rcv_saddr to compare sockets
In ipv6_rcv_saddr_equal() we need to use inet6_rcv_saddr(sk) for the ipv6 compare with the fast socket information to make sure we're doing the proper comparisons. 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 cbb2fb5 commit 7a56673

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/inet_connection_sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
266266
#if IS_ENABLED(CONFIG_IPV6)
267267
if (tb->fast_sk_family == AF_INET6)
268268
return ipv6_rcv_saddr_equal(&tb->fast_v6_rcv_saddr,
269-
&sk->sk_v6_rcv_saddr,
269+
inet6_rcv_saddr(sk),
270270
tb->fast_rcv_saddr,
271271
sk->sk_rcv_saddr,
272272
tb->fast_ipv6_only,

0 commit comments

Comments
 (0)