diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 4f43537197ef..bbb28ae7e5f3 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -835,7 +835,8 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) | |||
835 | * no RST generated if md5 hash doesn't match. | 835 | * no RST generated if md5 hash doesn't match. |
836 | */ | 836 | */ |
837 | sk1 = inet6_lookup_listener(dev_net(skb_dst(skb)->dev), | 837 | sk1 = inet6_lookup_listener(dev_net(skb_dst(skb)->dev), |
838 | &tcp_hashinfo, &ipv6h->daddr, | 838 | &tcp_hashinfo, &ipv6h->saddr, |
839 | th->source, &ipv6h->daddr, | ||
839 | ntohs(th->source), inet6_iif(skb)); | 840 | ntohs(th->source), inet6_iif(skb)); |
840 | if (!sk1) | 841 | if (!sk1) |
841 | return; | 842 | return; |
@@ -1030,7 +1031,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1030 | treq->rmt_addr = ipv6_hdr(skb)->saddr; | 1031 | treq->rmt_addr = ipv6_hdr(skb)->saddr; |
1031 | treq->loc_addr = ipv6_hdr(skb)->daddr; | 1032 | treq->loc_addr = ipv6_hdr(skb)->daddr; |
1032 | if (!want_cookie || tmp_opt.tstamp_ok) | 1033 | if (!want_cookie || tmp_opt.tstamp_ok) |
1033 | TCP_ECN_create_request(req, skb); | 1034 | TCP_ECN_create_request(req, skb, sock_net(sk)); |
1034 | 1035 | ||
1035 | treq->iif = sk->sk_bound_dev_if; | 1036 | treq->iif = sk->sk_bound_dev_if; |
1036 | 1037 | ||
@@ -1167,7 +1168,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1167 | newnp->opt = NULL; | 1168 | newnp->opt = NULL; |
1168 | newnp->mcast_oif = inet6_iif(skb); | 1169 | newnp->mcast_oif = inet6_iif(skb); |
1169 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; | 1170 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; |
1170 | newnp->rcv_tclass = ipv6_tclass(ipv6_hdr(skb)); | 1171 | newnp->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb)); |
1171 | 1172 | ||
1172 | /* | 1173 | /* |
1173 | * No need to charge this sock to the relevant IPv6 refcnt debug socks count | 1174 | * No need to charge this sock to the relevant IPv6 refcnt debug socks count |
@@ -1247,7 +1248,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1247 | newnp->opt = NULL; | 1248 | newnp->opt = NULL; |
1248 | newnp->mcast_oif = inet6_iif(skb); | 1249 | newnp->mcast_oif = inet6_iif(skb); |
1249 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; | 1250 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; |
1250 | newnp->rcv_tclass = ipv6_tclass(ipv6_hdr(skb)); | 1251 | newnp->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb)); |
1251 | 1252 | ||
1252 | /* Clone native IPv6 options from listening socket (if any) | 1253 | /* Clone native IPv6 options from listening socket (if any) |
1253 | 1254 | ||
@@ -1460,7 +1461,7 @@ ipv6_pktoptions: | |||
1460 | if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) | 1461 | if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) |
1461 | np->mcast_hops = ipv6_hdr(opt_skb)->hop_limit; | 1462 | np->mcast_hops = ipv6_hdr(opt_skb)->hop_limit; |
1462 | if (np->rxopt.bits.rxtclass) | 1463 | if (np->rxopt.bits.rxtclass) |
1463 | np->rcv_tclass = ipv6_tclass(ipv6_hdr(skb)); | 1464 | np->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb)); |
1464 | if (ipv6_opt_accepted(sk, opt_skb)) { | 1465 | if (ipv6_opt_accepted(sk, opt_skb)) { |
1465 | skb_set_owner_r(opt_skb, sk); | 1466 | skb_set_owner_r(opt_skb, sk); |
1466 | opt_skb = xchg(&np->pktoptions, opt_skb); | 1467 | opt_skb = xchg(&np->pktoptions, opt_skb); |
@@ -1602,6 +1603,7 @@ do_time_wait: | |||
1602 | struct sock *sk2; | 1603 | struct sock *sk2; |
1603 | 1604 | ||
1604 | sk2 = inet6_lookup_listener(dev_net(skb->dev), &tcp_hashinfo, | 1605 | sk2 = inet6_lookup_listener(dev_net(skb->dev), &tcp_hashinfo, |
1606 | &ipv6_hdr(skb)->saddr, th->source, | ||
1605 | &ipv6_hdr(skb)->daddr, | 1607 | &ipv6_hdr(skb)->daddr, |
1606 | ntohs(th->dest), inet6_iif(skb)); | 1608 | ntohs(th->dest), inet6_iif(skb)); |
1607 | if (sk2 != NULL) { | 1609 | if (sk2 != NULL) { |