Author: tuexen
Date: Sun Jan 17 18:39:01 2016
New Revision: 294232
URL: https://svnweb.freebsd.org/changeset/base/294232

Log:
  MFC r287281:
  Report CLOSED as state for bound sockets for consistency with
  netstat and the way TCP is handled.

Modified:
  stable/10/usr.bin/sockstat/sockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sockstat/sockstat.c
==============================================================================
--- stable/10/usr.bin/sockstat/sockstat.c       Sun Jan 17 18:37:36 2016        
(r294231)
+++ stable/10/usr.bin/sockstat/sockstat.c       Sun Jan 17 18:39:01 2016        
(r294232)
@@ -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) {
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to