aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-11 23:27:52 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-11 23:28:49 -0400
commitd77c555d325d6ece7d352995c97460988c152f58 (patch)
treef12d4542378153a87083e84df15978cacc722a94 /net
parentc78ba6d64c78634a875d1e316676667cabfea256 (diff)
net: fix CONFIG_NET_NS=n compilation
I forgot to use write_pnet() in three locations. Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: 33cf7c90fe2f9 ("net: add real socket cookies") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ipv4.c2
-rw-r--r--net/ipv4/syncookies.c2
-rw-r--r--net/ipv4/tcp_input.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 207281ae3536..a78e0b999f96 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -641,7 +641,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
641 ireq = inet_rsk(req); 641 ireq = inet_rsk(req);
642 ireq->ir_loc_addr = ip_hdr(skb)->daddr; 642 ireq->ir_loc_addr = ip_hdr(skb)->daddr;
643 ireq->ir_rmt_addr = ip_hdr(skb)->saddr; 643 ireq->ir_rmt_addr = ip_hdr(skb)->saddr;
644 ireq->ireq_net = sock_net(sk); 644 write_pnet(&ireq->ireq_net, sock_net(sk));
645 atomic64_set(&ireq->ir_cookie, 0); 645 atomic64_set(&ireq->ir_cookie, 0);
646 646
647 /* 647 /*
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index ece31b426013..18e5a67fda81 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -346,7 +346,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
346 req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0; 346 req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
347 treq->snt_synack = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsecr : 0; 347 treq->snt_synack = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsecr : 0;
348 treq->listener = NULL; 348 treq->listener = NULL;
349 ireq->ireq_net = sock_net(sk); 349 write_pnet(&ireq->ireq_net, sock_net(sk));
350 350
351 /* We throwed the options of the initial SYN away, so we hope 351 /* We throwed the options of the initial SYN away, so we hope
352 * the ACK carries the same options again (see RFC1122 4.2.3.8) 352 * the ACK carries the same options again (see RFC1122 4.2.3.8)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d7045f5f6ebf..26f24995bd3d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5965,7 +5965,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
5965 5965
5966 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; 5966 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
5967 tcp_openreq_init(req, &tmp_opt, skb, sk); 5967 tcp_openreq_init(req, &tmp_opt, skb, sk);
5968 inet_rsk(req)->ireq_net = sock_net(sk); 5968 write_pnet(&inet_rsk(req)->ireq_net, sock_net(sk));
5969 atomic64_set(&inet_rsk(req)->ir_cookie, 0); 5969 atomic64_set(&inet_rsk(req)->ir_cookie, 0);
5970 5970
5971 af_ops->init_req(req, sk, skb); 5971 af_ops->init_req(req, sk, skb);