diff options
author | Phil Sutter <phil@nwl.cc> | 2016-08-04 06:11:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-08 15:51:58 -0400 |
commit | 1ba8d77f410d3b7423df39e8a10a02af272d3c42 (patch) | |
tree | 60a69fb3cb3cf7838b4c09df657975d1c7182221 | |
parent | 12474e8e58d82e2b815cd35956c0c06fab104ee7 (diff) |
sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states
Since 'ss' always adds TCPF_CLOSE to idiag_states flags, sctp_diag can't
rely upon TCPF_LISTEN flag solely being present when listening sockets
are requested.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sctp/sctp_diag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c index f728ef04a7b2..bb691538adc8 100644 --- a/net/sctp/sctp_diag.c +++ b/net/sctp/sctp_diag.c | |||
@@ -356,7 +356,7 @@ static int sctp_ep_dump(struct sctp_endpoint *ep, void *p) | |||
356 | if (cb->args[4] < cb->args[1]) | 356 | if (cb->args[4] < cb->args[1]) |
357 | goto next; | 357 | goto next; |
358 | 358 | ||
359 | if ((r->idiag_states & ~TCPF_LISTEN) && !list_empty(&ep->asocs)) | 359 | if (!(r->idiag_states & TCPF_LISTEN) && !list_empty(&ep->asocs)) |
360 | goto next; | 360 | goto next; |
361 | 361 | ||
362 | if (r->sdiag_family != AF_UNSPEC && | 362 | if (r->sdiag_family != AF_UNSPEC && |
@@ -471,7 +471,7 @@ skip: | |||
471 | * 3 : to mark if we have dumped the ep info of the current asoc | 471 | * 3 : to mark if we have dumped the ep info of the current asoc |
472 | * 4 : to work as a temporary variable to traversal list | 472 | * 4 : to work as a temporary variable to traversal list |
473 | */ | 473 | */ |
474 | if (!(idiag_states & ~TCPF_LISTEN)) | 474 | if (!(idiag_states & ~(TCPF_LISTEN | TCPF_CLOSE))) |
475 | goto done; | 475 | goto done; |
476 | sctp_for_each_transport(sctp_tsp_dump, net, cb->args[2], &commp); | 476 | sctp_for_each_transport(sctp_tsp_dump, net, cb->args[2], &commp); |
477 | done: | 477 | done: |