diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 744bc9d6cebc..0ba6e911c979 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2050,7 +2050,7 @@ static void *established_get_first(struct seq_file *seq) st->state = TCP_SEQ_STATE_TIME_WAIT; inet_twsk_for_each(tw, node, &tcp_hashinfo.ehash[st->bucket].twchain) { - if (tw->tw_family != st->family && + if (tw->tw_family != st->family || tw->tw_net != net) { continue; } @@ -2078,7 +2078,7 @@ static void *established_get_next(struct seq_file *seq, void *cur) tw = cur; tw = tw_next(tw); get_tw: - while (tw && tw->tw_family != st->family && tw->tw_net != net) { + while (tw && (tw->tw_family != st->family || tw->tw_net != net)) { tw = tw_next(tw); } if (tw) { diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index a98c43c0a89c..fa946829d1e8 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1537,7 +1537,7 @@ static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk) sk = sk_next(sk); try_again: ; - } while (sk && sk->sk_net != net && sk->sk_family != state->family); + } while (sk && (sk->sk_net != net || sk->sk_family != state->family)); if (!sk && ++state->bucket < UDP_HTABLE_SIZE) { sk = sk_head(state->hashtable + state->bucket); |