diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-01-09 23:56:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-09 23:56:03 +0100 |
commit | 7dbf0755249336f44f57368bdbf6f84103b3ba75 (patch) | |
tree | 66a26e93432c38ccb64092b4e2be1d868df68e45 /net/ipv4/inet_diag.c | |
parent | [IPV6]: Set skb->priority in ip6_output.c (diff) | |
download | linux-7dbf0755249336f44f57368bdbf6f84103b3ba75.tar.xz linux-7dbf0755249336f44f57368bdbf6f84103b3ba75.zip |
[INET_DIAG]: Use inet_twsk() with TIME_WAIT sockets
The fields being accessed in inet_diag_dump are outside sock_common, the
common part of struct sock and struct inet_timewait_sock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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: if (r->idiag_states & TCPF_TIME_WAIT) { sk_for_each(sk, node, &hashinfo->ehash[i + hashinfo->ehash_size].chain) { - struct inet_sock *inet = inet_sk(sk); + const struct inet_timewait_sock *tw = inet_twsk(sk); if (num < s_num) goto next_dying; - if (r->id.idiag_sport != inet->sport && + if (r->id.idiag_sport != tw->tw_sport && r->id.idiag_sport) goto next_dying; - if (r->id.idiag_dport != inet->dport && + if (r->id.idiag_dport != tw->tw_dport && r->id.idiag_dport) goto next_dying; if (inet_diag_dump_sock(skb, sk, cb) < 0) { |