diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-12 19:44:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-12 22:58:12 -0400 |
commit | d34ac51b76e8c7de6094cfb11780ef9c2b93469f (patch) | |
tree | cea87a916964c0d0c1bedba4e7e5cbacf4603888 | |
parent | 10feb428a5045d5eb18a5d755fbb8f0cc9645626 (diff) |
inet: add ireq_state field to inet_request_sock
We need to identify request sock when they'll be visible in
global ehash table.
ireq_state is an alias to req.__req_common.skc_state.
Its value is set to TCP_NEW_SYN_RECV
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/inet_sock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 30f7170abbf3..b31f01de5cd6 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <net/sock.h> | 27 | #include <net/sock.h> |
28 | #include <net/request_sock.h> | 28 | #include <net/request_sock.h> |
29 | #include <net/netns/hash.h> | 29 | #include <net/netns/hash.h> |
30 | #include <net/tcp_states.h> | ||
30 | 31 | ||
31 | /** struct ip_options - IP Options | 32 | /** struct ip_options - IP Options |
32 | * | 33 | * |
@@ -79,6 +80,7 @@ struct inet_request_sock { | |||
79 | #define ir_iif req.__req_common.skc_bound_dev_if | 80 | #define ir_iif req.__req_common.skc_bound_dev_if |
80 | #define ir_cookie req.__req_common.skc_cookie | 81 | #define ir_cookie req.__req_common.skc_cookie |
81 | #define ireq_net req.__req_common.skc_net | 82 | #define ireq_net req.__req_common.skc_net |
83 | #define ireq_state req.__req_common.skc_state | ||
82 | 84 | ||
83 | kmemcheck_bitfield_begin(flags); | 85 | kmemcheck_bitfield_begin(flags); |
84 | u16 snd_wscale : 4, | 86 | u16 snd_wscale : 4, |
@@ -250,6 +252,7 @@ static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops | |||
250 | kmemcheck_annotate_bitfield(ireq, flags); | 252 | kmemcheck_annotate_bitfield(ireq, flags); |
251 | ireq->opt = NULL; | 253 | ireq->opt = NULL; |
252 | atomic64_set(&ireq->ir_cookie, 0); | 254 | atomic64_set(&ireq->ir_cookie, 0); |
255 | ireq->ireq_state = TCP_NEW_SYN_RECV; | ||
253 | } | 256 | } |
254 | 257 | ||
255 | return req; | 258 | return req; |