From c1eb13c74cf633df2cf08206bb24ec631d93dff3 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 29 Aug 2015 09:10:52 +0000 Subject: [PATCH] Report CLOSED as state for bound sockets for consistency with netstat and the way TCP is handled. PR: 201585 MFC after: 3 weeks --- usr.bin/sockstat/sockstat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index d87f82ade10..ca13f8dae8e 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -332,10 +332,8 @@ gather_sctp(void) sock->socket = xinpcb->socket; sock->proto = IPPROTO_SCTP; sock->protoname = "sctp"; - if (xinpcb->flags & SCTP_PCB_FLAGS_UNBOUND) + if (xinpcb->maxqlen == 0) sock->state = SCTP_CLOSED; - else if (xinpcb->maxqlen == 0) - sock->state = SCTP_BOUND; else sock->state = SCTP_LISTEN; if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {