summaryrefslogtreecommitdiff
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-16 11:15:38 +0300
committerDavid S. Miller <davem@davemloft.net>2023-08-16 13:09:17 +0300
commitcafbe182a467bf6799242fd7468438cf1ab833dc (patch)
treed6c57b53c808f8c43ce28c365c25d128fb4dd824 /include/net/inet_sock.h
parent3f7e753206bb20fc098b44ec40001befd1fe18d1 (diff)
downloadlinux-cafbe182a467bf6799242fd7468438cf1ab833dc.tar.xz
inet: move inet->hdrincl to inet->inet_flags
IP_HDRINCL 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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index d6ba963534b4..ad1895e32e7d 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -231,7 +231,6 @@ struct inet_sock {
__u8 mc_ttl;
__u8 pmtudisc;
__u8 is_icsk:1,
- hdrincl:1,
mc_loop:1,
transparent:1,
mc_all:1,
@@ -271,6 +270,7 @@ enum {
INET_FLAGS_RECVERR = 9,
INET_FLAGS_RECVERR_RFC4884 = 10,
INET_FLAGS_FREEBIND = 11,
+ INET_FLAGS_HDRINCL = 12,
};
/* cmsg flags for inet */
@@ -397,7 +397,7 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
{
__u8 flags = 0;
- if (inet_sk(sk)->transparent || inet_sk(sk)->hdrincl)
+ if (inet_sk(sk)->transparent || inet_test_bit(HDRINCL, sk))
flags |= FLOWI_FLAG_ANYSRC;
return flags;
}