diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-17 21:32:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-17 22:01:55 -0400 |
commit | 407640de2152e33341ce1131dac269672c3d50f7 (patch) | |
tree | dec463be332bf8e0360d495d355e90cd9b80bd26 /net/ipv6 | |
parent | 9f2dbdd9b11d40f5fe0749eb91cd1cfc86fde575 (diff) |
inet: add sk_listener argument to inet_reqsk_alloc()
listener socket can be used to set net pointer, and will
be later used to hold a reference on listener.
Add a const qualifier to first argument (struct request_sock_ops *),
and factorize all write_pnet(&ireq->ireq_net, sock_net(sk));
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/syncookies.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 58875ce8e178..039e74dd29fe 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -189,14 +189,13 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
189 | goto out; | 189 | goto out; |
190 | 190 | ||
191 | ret = NULL; | 191 | ret = NULL; |
192 | req = inet_reqsk_alloc(&tcp6_request_sock_ops); | 192 | req = inet_reqsk_alloc(&tcp6_request_sock_ops, sk); |
193 | if (!req) | 193 | if (!req) |
194 | goto out; | 194 | goto out; |
195 | 195 | ||
196 | ireq = inet_rsk(req); | 196 | ireq = inet_rsk(req); |
197 | treq = tcp_rsk(req); | 197 | treq = tcp_rsk(req); |
198 | treq->listener = NULL; | 198 | treq->listener = NULL; |
199 | write_pnet(&ireq->ireq_net, sock_net(sk)); | ||
200 | ireq->ireq_family = AF_INET6; | 199 | ireq->ireq_family = AF_INET6; |
201 | 200 | ||
202 | if (security_inet_conn_request(sk, skb, req)) | 201 | if (security_inet_conn_request(sk, skb, req)) |