diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 28bece6f281b..46847e600a46 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1486,7 +1486,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
1486 | if (req) | 1486 | if (req) |
1487 | return tcp_check_req(sk, skb, req, prev); | 1487 | return tcp_check_req(sk, skb, req, prev); |
1488 | 1488 | ||
1489 | nsk = inet_lookup_established(sk->sk_net, &tcp_hashinfo, iph->saddr, | 1489 | nsk = inet_lookup_established(sock_net(sk), &tcp_hashinfo, iph->saddr, |
1490 | th->source, iph->daddr, th->dest, inet_iif(skb)); | 1490 | th->source, iph->daddr, th->dest, inet_iif(skb)); |
1491 | 1491 | ||
1492 | if (nsk) { | 1492 | if (nsk) { |
@@ -1974,7 +1974,7 @@ static void *listening_get_next(struct seq_file *seq, void *cur) | |||
1974 | while (1) { | 1974 | while (1) { |
1975 | while (req) { | 1975 | while (req) { |
1976 | if (req->rsk_ops->family == st->family && | 1976 | if (req->rsk_ops->family == st->family && |
1977 | req->sk->sk_net == net) { | 1977 | sock_net(req->sk) == net) { |
1978 | cur = req; | 1978 | cur = req; |
1979 | goto out; | 1979 | goto out; |
1980 | } | 1980 | } |
@@ -1998,7 +1998,7 @@ get_req: | |||
1998 | } | 1998 | } |
1999 | get_sk: | 1999 | get_sk: |
2000 | sk_for_each_from(sk, node) { | 2000 | sk_for_each_from(sk, node) { |
2001 | if (sk->sk_family == st->family && sk->sk_net == net) { | 2001 | if (sk->sk_family == st->family && sock_net(sk) == net) { |
2002 | cur = sk; | 2002 | cur = sk; |
2003 | goto out; | 2003 | goto out; |
2004 | } | 2004 | } |
@@ -2049,7 +2049,7 @@ static void *established_get_first(struct seq_file *seq) | |||
2049 | read_lock_bh(lock); | 2049 | read_lock_bh(lock); |
2050 | sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { | 2050 | sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { |
2051 | if (sk->sk_family != st->family || | 2051 | if (sk->sk_family != st->family || |
2052 | sk->sk_net != net) { | 2052 | sock_net(sk) != net) { |
2053 | continue; | 2053 | continue; |
2054 | } | 2054 | } |
2055 | rc = sk; | 2055 | rc = sk; |
@@ -2059,7 +2059,7 @@ static void *established_get_first(struct seq_file *seq) | |||
2059 | inet_twsk_for_each(tw, node, | 2059 | inet_twsk_for_each(tw, node, |
2060 | &tcp_hashinfo.ehash[st->bucket].twchain) { | 2060 | &tcp_hashinfo.ehash[st->bucket].twchain) { |
2061 | if (tw->tw_family != st->family || | 2061 | if (tw->tw_family != st->family || |
2062 | tw->tw_net != net) { | 2062 | twsk_net(tw) != net) { |
2063 | continue; | 2063 | continue; |
2064 | } | 2064 | } |
2065 | rc = tw; | 2065 | rc = tw; |
@@ -2086,7 +2086,7 @@ static void *established_get_next(struct seq_file *seq, void *cur) | |||
2086 | tw = cur; | 2086 | tw = cur; |
2087 | tw = tw_next(tw); | 2087 | tw = tw_next(tw); |
2088 | get_tw: | 2088 | get_tw: |
2089 | while (tw && (tw->tw_family != st->family || tw->tw_net != net)) { | 2089 | while (tw && (tw->tw_family != st->family || twsk_net(tw) != net)) { |
2090 | tw = tw_next(tw); | 2090 | tw = tw_next(tw); |
2091 | } | 2091 | } |
2092 | if (tw) { | 2092 | if (tw) { |
@@ -2107,7 +2107,7 @@ get_tw: | |||
2107 | sk = sk_next(sk); | 2107 | sk = sk_next(sk); |
2108 | 2108 | ||
2109 | sk_for_each_from(sk, node) { | 2109 | sk_for_each_from(sk, node) { |
2110 | if (sk->sk_family == st->family && sk->sk_net == net) | 2110 | if (sk->sk_family == st->family && sock_net(sk) == net) |
2111 | goto found; | 2111 | goto found; |
2112 | } | 2112 | } |
2113 | 2113 | ||