aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/ipv4/inet_diag.c2
-rw-r--r--net/ipv4/syncookies.c1
-rw-r--r--net/ipv4/tcp_ipv4.c1
-rw-r--r--net/ipv6/syncookies.c1
-rw-r--r--net/ipv6/tcp_ipv6.c1
7 files changed, 7 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index f695874b5ade..8f6f4004daac 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -642,6 +642,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
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 write_pnet(&ireq->ireq_net, sock_net(sk)); 644 write_pnet(&ireq->ireq_net, sock_net(sk));
645 ireq->ireq_family = AF_INET;
645 646
646 /* 647 /*
647 * Step 3: Process LISTEN state 648 * Step 3: Process LISTEN state
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 703a21acf434..5166b0043f95 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -404,6 +404,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
404 ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; 404 ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr;
405 ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; 405 ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr;
406 write_pnet(&ireq->ireq_net, sock_net(sk)); 406 write_pnet(&ireq->ireq_net, sock_net(sk));
407 ireq->ireq_family = AF_INET6;
407 408
408 if (ipv6_opt_accepted(sk, skb, IP6CB(skb)) || 409 if (ipv6_opt_accepted(sk, skb, IP6CB(skb)) ||
409 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || 410 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index c55a6fa3162d..43789c99031f 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -728,7 +728,7 @@ static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
728 return -EMSGSIZE; 728 return -EMSGSIZE;
729 729
730 r = nlmsg_data(nlh); 730 r = nlmsg_data(nlh);
731 r->idiag_family = sk->sk_family; 731 r->idiag_family = ireq->ireq_family;
732 r->idiag_state = TCP_SYN_RECV; 732 r->idiag_state = TCP_SYN_RECV;
733 r->idiag_timer = 1; 733 r->idiag_timer = 1;
734 r->idiag_retrans = req->num_retrans; 734 r->idiag_retrans = req->num_retrans;
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 18e5a67fda81..0c432730c7b4 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -347,6 +347,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
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 write_pnet(&ireq->ireq_net, sock_net(sk)); 349 write_pnet(&ireq->ireq_net, sock_net(sk));
350 ireq->ireq_family = AF_INET;
350 351
351 /* We throwed the options of the initial SYN away, so we hope 352 /* 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) 353 * the ACK carries the same options again (see RFC1122 4.2.3.8)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 70b0f701bbdb..1f514a0c5e60 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1228,6 +1228,7 @@ static void tcp_v4_init_req(struct request_sock *req, struct sock *sk,
1228 ireq->ir_rmt_addr = ip_hdr(skb)->saddr; 1228 ireq->ir_rmt_addr = ip_hdr(skb)->saddr;
1229 ireq->no_srccheck = inet_sk(sk)->transparent; 1229 ireq->no_srccheck = inet_sk(sk)->transparent;
1230 ireq->opt = tcp_v4_save_options(skb); 1230 ireq->opt = tcp_v4_save_options(skb);
1231 ireq->ireq_family = AF_INET;
1231} 1232}
1232 1233
1233static struct dst_entry *tcp_v4_route_req(struct sock *sk, struct flowi *fl, 1234static struct dst_entry *tcp_v4_route_req(struct sock *sk, struct flowi *fl,
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 66bba6a84e47..58875ce8e178 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -197,6 +197,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
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)); 199 write_pnet(&ireq->ireq_net, sock_net(sk));
200 ireq->ireq_family = AF_INET6;
200 201
201 if (security_inet_conn_request(sk, skb, req)) 202 if (security_inet_conn_request(sk, skb, req))
202 goto out_free; 203 goto out_free;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 1ccfede7d55f..c5fc6a5e4adc 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -749,6 +749,7 @@ static void tcp_v6_init_req(struct request_sock *req, struct sock *sk,
749 atomic_inc(&skb->users); 749 atomic_inc(&skb->users);
750 ireq->pktopts = skb; 750 ireq->pktopts = skb;
751 } 751 }
752 ireq->ireq_family = AF_INET6;
752} 753}
753 754
754static struct dst_entry *tcp_v6_route_req(struct sock *sk, struct flowi *fl, 755static struct dst_entry *tcp_v6_route_req(struct sock *sk, struct flowi *fl,