aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-12 19:44:10 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-12 22:58:13 -0400
commit3f66b083a5b7f1a63540c24df3679c24f2e935a9 (patch)
tree60b1b371c11729ed89d6f5bb3ac604eb72792892 /net/dccp
parentd4f06873b636519cedbe8d2eeae77c713c6a121c (diff)
inet: introduce ireq_family
Before inserting request socks into general hash table, fill their socket family. Signed-off-by: Eric Dumazet <edumazet@google.com> 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, 2 insertions, 0 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 ||