aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-16 08:15:37 +0000
committerDavid S. Miller <davem@davemloft.net>2023-08-16 11:09:17 +0100
commit3f7e753206bb20fc098b44ec40001befd1fe18d1 (patch)
tree2dbbbbfceaea1fc24ad2d095debef470312e3f2a /include/net/ipv6.h
parent8e8cfb114d9f1e2efddb892f993c1ad61635c85e (diff)
downloadlinux-3f7e753206bb20fc098b44ec40001befd1fe18d1.tar.gz
inet: move inet->freebind to inet->inet_flags
IP_FREEBIND socket option can now be set/read without locking the socket. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 22643ffc2df8c..fd570d77588e7 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -937,7 +937,8 @@ static inline bool ipv6_can_nonlocal_bind(struct net *net,
struct inet_sock *inet)
{
return net->ipv6.sysctl.ip_nonlocal_bind ||
- inet->freebind || inet->transparent;
+ test_bit(INET_FLAGS_FREEBIND, &inet->inet_flags) ||
+ inet->transparent;
}
/* Sysctl settings for net ipv6.auto_flowlabels */