aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-16 08:15:35 +0000
committerDavid S. Miller <davem@davemloft.net>2023-08-16 11:09:17 +0100
commit6b5f43ea08150e7ff72f734545101c58489ead5b (patch)
tree805b596ad9e4070ad6766a0e11b601d9a88edbac /include/net/inet_sock.h
parentinet: set/get simple options locklessly (diff)
downloadwireguard-linux-6b5f43ea08150e7ff72f734545101c58489ead5b.tar.xz
wireguard-linux-6b5f43ea08150e7ff72f734545101c58489ead5b.zip
inet: move inet->recverr to inet->inet_flags
IP_RECVERR socket option can now be set/get without locking the socket. This patch potentially avoid data-races around inet->recverr. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index e3b35b0015f3..552188aa5a2d 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -230,8 +230,7 @@ struct inet_sock {
__u8 min_ttl;
__u8 mc_ttl;
__u8 pmtudisc;
- __u8 recverr:1,
- is_icsk:1,
+ __u8 is_icsk:1,
freebind:1,
hdrincl:1,
mc_loop:1,
@@ -270,6 +269,8 @@ enum {
INET_FLAGS_ORIGDSTADDR = 6,
INET_FLAGS_CHECKSUM = 7,
INET_FLAGS_RECVFRAGSIZE = 8,
+
+ INET_FLAGS_RECVERR = 9,
};
/* cmsg flags for inet */