sctp: fix double EPs display in sctp_diag
[deliverable/linux.git] / net / sctp / sctp_diag.c
index 8e3e769dc9eafacf3d475c105ee8f39e89adcbcf..1ce724b87618a08c147b768a33c2fcef7f9ff6cb 100644 (file)
@@ -356,6 +356,9 @@ static int sctp_ep_dump(struct sctp_endpoint *ep, void *p)
        if (cb->args[4] < cb->args[1])
                goto next;
 
+       if ((r->idiag_states & ~TCPF_LISTEN) && !list_empty(&ep->asocs))
+               goto next;
+
        if (r->sdiag_family != AF_UNSPEC &&
            sk->sk_family != r->sdiag_family)
                goto next;
This page took 0.025184 seconds and 5 git commands to generate.