aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index aa95053dfc78..db8162dd8c0b 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -96,7 +96,7 @@ struct inet_request_sock {
96 kmemcheck_bitfield_end(flags); 96 kmemcheck_bitfield_end(flags);
97 u32 ir_mark; 97 u32 ir_mark;
98 union { 98 union {
99 struct ip_options_rcu *opt; 99 struct ip_options_rcu __rcu *ireq_opt;
100#if IS_ENABLED(CONFIG_IPV6) 100#if IS_ENABLED(CONFIG_IPV6)
101 struct { 101 struct {
102 struct ipv6_txoptions *ipv6_opt; 102 struct ipv6_txoptions *ipv6_opt;
@@ -132,6 +132,12 @@ static inline int inet_request_bound_dev_if(const struct sock *sk,
132 return sk->sk_bound_dev_if; 132 return sk->sk_bound_dev_if;
133} 133}
134 134
135static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq)
136{
137 return rcu_dereference_check(ireq->ireq_opt,
138 refcount_read(&ireq->req.rsk_refcnt) > 0);
139}
140
135struct inet_cork { 141struct inet_cork {
136 unsigned int flags; 142 unsigned int flags;
137 __be32 addr; 143 __be32 addr;