From d2bb6d5d236d89724b5a8d96ba88262d5e2df991 Mon Sep 17 00:00:00 2001 From: tuexen Date: Sun, 17 Jan 2016 18:39:01 +0000 Subject: MFC r287281: Report CLOSED as state for bound sockets for consistency with netstat and the way TCP is handled. --- usr.bin/sockstat/sockstat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 8e10f9b..98d86b5 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) { -- cgit v1.1