summaryrefslogtreecommitdiff
path: root/net/dccp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-13 02:44:03 +0300
committerDavid S. Miller <davem@davemloft.net>2015-03-13 05:58:12 +0300
commitbd337c581b2b0d933d37f664bf55b342577fed3a (patch)
treeec450b42ebb3369f46c64f63a43a3915053205c6 /net/dccp
parent54720df130b3e6356391ed4f8a1a024318bcae23 (diff)
downloadlinux-bd337c581b2b0d933d37f664bf55b342577fed3a.tar.xz
ipv6: add missing ireq_net & ir_cookie initializations
I forgot to update dccp_v6_conn_request() & cookie_v6_check(). They both need to set ireq->ireq_net and ireq->ir_cookie Lets clear ireq->ir_cookie in inet_reqsk_alloc() Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: 33cf7c90fe2f ("net: add real socket cookies") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/ipv6.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index a78e0b999f96..f695874b5ade 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -642,7 +642,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
ireq->ir_loc_addr = ip_hdr(skb)->daddr;
ireq->ir_rmt_addr = ip_hdr(skb)->saddr;
write_pnet(&ireq->ireq_net, sock_net(sk));
- atomic64_set(&ireq->ir_cookie, 0);
/*
* Step 3: Process LISTEN state
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 6bcaa33cd804..703a21acf434 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -403,6 +403,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
ireq = inet_rsk(req);
ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr;
ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr;
+ write_pnet(&ireq->ireq_net, sock_net(sk));
if (ipv6_opt_accepted(sk, skb, IP6CB(skb)) ||
np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||