diff -NurpP --minimal a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c --- a/net/ipv4/tcp_diag.c 2005-02-03 16:38:05.000000000 +0100 +++ b/net/ipv4/tcp_diag.c 2005-02-06 19:05:55.000000000 +0100 @@ -616,6 +616,11 @@ static int tcpdiag_dump(struct sk_buff * continue; } + if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH)) { + num++; + continue; + } + if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) goto next_listen; @@ -674,6 +679,8 @@ skip_listen_ht: if (num < s_num) goto next_normal; + if (!vx_check(sk->sk_xid, VX_IDENT|VX_WATCH)) + goto next_normal; if (!(r->tcpdiag_states & (1 << sk->sk_state))) goto next_normal; if (r->id.tcpdiag_sport != inet->sport && @@ -693,9 +700,12 @@ next_normal: sk_for_each(sk, node, &tcp_ehash[i + tcp_ehash_size].chain) { struct inet_sock *inet = inet_sk(sk); + struct tcp_tw_bucket *tw = (struct tcp_tw_bucket*)sk; if (num < s_num) goto next_dying; + if (!vx_check(tw->tw_xid, VX_IDENT|VX_WATCH)) + goto next_dying; if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) goto next_dying;