summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-17 18:39:01 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-17 18:39:01 +0000
commitd2bb6d5d236d89724b5a8d96ba88262d5e2df991 (patch)
treeef9d8f0d63415cb28e97db5f1815b26139bb1efe /usr.bin
parentd13520b3c782ac28b24311ec48207256525441e3 (diff)
downloadFreeBSD-src-d2bb6d5d236d89724b5a8d96ba88262d5e2df991.zip
FreeBSD-src-d2bb6d5d236d89724b5a8d96ba88262d5e2df991.tar.gz
MFC r287281:
Report CLOSED as state for bound sockets for consistency with netstat and the way TCP is handled.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sockstat/sockstat.c4
1 files changed, 1 insertions, 3 deletions
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) {
OpenPOWER on IntegriCloud