diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2a480f6811ea..52b74e0eab2a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5967,6 +5967,30 @@ static void tcp_openreq_init(struct request_sock *req, | |||
5967 | ireq->ir_mark = inet_request_mark(sk, skb); | 5967 | ireq->ir_mark = inet_request_mark(sk, skb); |
5968 | } | 5968 | } |
5969 | 5969 | ||
5970 | struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops, | ||
5971 | struct sock *sk_listener) | ||
5972 | { | ||
5973 | struct request_sock *req = reqsk_alloc(ops); | ||
5974 | |||
5975 | if (req) { | ||
5976 | struct inet_request_sock *ireq = inet_rsk(req); | ||
5977 | |||
5978 | kmemcheck_annotate_bitfield(ireq, flags); | ||
5979 | ireq->opt = NULL; | ||
5980 | atomic64_set(&ireq->ir_cookie, 0); | ||
5981 | ireq->ireq_state = TCP_NEW_SYN_RECV; | ||
5982 | write_pnet(&ireq->ireq_net, sock_net(sk_listener)); | ||
5983 | |||
5984 | /* Following is temporary. It is coupled with debugging | ||
5985 | * helpers in reqsk_put() & reqsk_free() | ||
5986 | */ | ||
5987 | atomic_set(&ireq->ireq_refcnt, 0); | ||
5988 | } | ||
5989 | |||
5990 | return req; | ||
5991 | } | ||
5992 | EXPORT_SYMBOL(inet_reqsk_alloc); | ||
5993 | |||
5970 | int tcp_conn_request(struct request_sock_ops *rsk_ops, | 5994 | int tcp_conn_request(struct request_sock_ops *rsk_ops, |
5971 | const struct tcp_request_sock_ops *af_ops, | 5995 | const struct tcp_request_sock_ops *af_ops, |
5972 | struct sock *sk, struct sk_buff *skb) | 5996 | struct sock *sk, struct sk_buff *skb) |