sockstat: fix SCTP support

Provide a name for SCTP sockets.

Fixes:		8b2b62b49d ("sockstat: consolidate unix(4) protocols in the array of protocols")
This commit is contained in:
Michael Tuexen committed 2026-07-13 11:13:04 +02:00
1 parent 920518cf2e
commit f2f50c80ae
1 file changed
+2
+2
View File
@@ -398,6 +398,7 @@ gather_sctp(struct proto *proto)
xo_err(1, "malloc()");
sock->socket = xinpcb->socket;
sock->proto = proto;
sock->protoname = proto->name;
if (xinpcb->maxqlen == 0)
sock->state = SCTP_CLOSED;
else
@@ -498,6 +499,7 @@ gather_sctp(struct proto *proto)
xo_err(1, "malloc()");
sock->socket = xinpcb->socket;
sock->proto = proto;
sock->protoname = proto->name;
sock->state = (int)xstcb->state;
if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) {
sock->family = AF_INET6;