diff options
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index c49908192047..c3b334871707 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -697,14 +697,14 @@ next_normal: | |||
697 | if (r->idiag_states & TCPF_TIME_WAIT) { | 697 | if (r->idiag_states & TCPF_TIME_WAIT) { |
698 | sk_for_each(sk, node, | 698 | sk_for_each(sk, node, |
699 | &hashinfo->ehash[i + hashinfo->ehash_size].chain) { | 699 | &hashinfo->ehash[i + hashinfo->ehash_size].chain) { |
700 | struct inet_sock *inet = inet_sk(sk); | 700 | const struct inet_timewait_sock *tw = inet_twsk(sk); |
701 | 701 | ||
702 | if (num < s_num) | 702 | if (num < s_num) |
703 | goto next_dying; | 703 | goto next_dying; |
704 | if (r->id.idiag_sport != inet->sport && | 704 | if (r->id.idiag_sport != tw->tw_sport && |
705 | r->id.idiag_sport) | 705 | r->id.idiag_sport) |
706 | goto next_dying; | 706 | goto next_dying; |
707 | if (r->id.idiag_dport != inet->dport && | 707 | if (r->id.idiag_dport != tw->tw_dport && |
708 | r->id.idiag_dport) | 708 | r->id.idiag_dport) |
709 | goto next_dying; | 709 | goto next_dying; |
710 | if (inet_diag_dump_sock(skb, sk, cb) < 0) { | 710 | if (inet_diag_dump_sock(skb, sk, cb) < 0) { |