aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 00c08399837d..59d0029e93a7 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -330,8 +330,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
330 struct tcp_sock *tp; 330 struct tcp_sock *tp;
331 __u32 seq; 331 __u32 seq;
332 332
333 sk = inet6_lookup(&tcp_hashinfo, &hdr->daddr, th->dest, &hdr->saddr, 333 sk = inet6_lookup(skb->dev->nd_net, &tcp_hashinfo, &hdr->daddr,
334 th->source, skb->dev->ifindex); 334 th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
335 335
336 if (sk == NULL) { 336 if (sk == NULL) {
337 ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); 337 ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS);
@@ -1208,9 +1208,9 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
1208 if (req) 1208 if (req)
1209 return tcp_check_req(sk, skb, req, prev); 1209 return tcp_check_req(sk, skb, req, prev);
1210 1210
1211 nsk = __inet6_lookup_established(&tcp_hashinfo, &ipv6_hdr(skb)->saddr, 1211 nsk = __inet6_lookup_established(sk->sk_net, &tcp_hashinfo,
1212 th->source, &ipv6_hdr(skb)->daddr, 1212 &ipv6_hdr(skb)->saddr, th->source,
1213 ntohs(th->dest), inet6_iif(skb)); 1213 &ipv6_hdr(skb)->daddr, ntohs(th->dest), inet6_iif(skb));
1214 1214
1215 if (nsk) { 1215 if (nsk) {
1216 if (nsk->sk_state != TCP_TIME_WAIT) { 1216 if (nsk->sk_state != TCP_TIME_WAIT) {
@@ -1710,9 +1710,10 @@ static int tcp_v6_rcv(struct sk_buff *skb)
1710 TCP_SKB_CB(skb)->flags = ipv6_get_dsfield(ipv6_hdr(skb)); 1710 TCP_SKB_CB(skb)->flags = ipv6_get_dsfield(ipv6_hdr(skb));
1711 TCP_SKB_CB(skb)->sacked = 0; 1711 TCP_SKB_CB(skb)->sacked = 0;
1712 1712
1713 sk = __inet6_lookup(&tcp_hashinfo, &ipv6_hdr(skb)->saddr, th->source, 1713 sk = __inet6_lookup(skb->dev->nd_net, &tcp_hashinfo,
1714 &ipv6_hdr(skb)->daddr, ntohs(th->dest), 1714 &ipv6_hdr(skb)->saddr, th->source,
1715 inet6_iif(skb)); 1715 &ipv6_hdr(skb)->daddr, ntohs(th->dest),
1716 inet6_iif(skb));
1716 1717
1717 if (!sk) 1718 if (!sk)
1718 goto no_tcp_socket; 1719 goto no_tcp_socket;
@@ -1792,7 +1793,7 @@ do_time_wait:
1792 { 1793 {
1793 struct sock *sk2; 1794 struct sock *sk2;
1794 1795
1795 sk2 = inet6_lookup_listener(&tcp_hashinfo, 1796 sk2 = inet6_lookup_listener(skb->dev->nd_net, &tcp_hashinfo,
1796 &ipv6_hdr(skb)->daddr, 1797 &ipv6_hdr(skb)->daddr,
1797 ntohs(th->dest), inet6_iif(skb)); 1798 ntohs(th->dest), inet6_iif(skb));
1798 if (sk2 != NULL) { 1799 if (sk2 != NULL) {