git: 950a251823e7 - main - sockstat: revert incorrect use of path-state for SCTP connections
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Aug 2025 16:18:21 UTC
The branch main has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=950a251823e723e9512e83883183aa1d4de9bbaa
commit 950a251823e723e9512e83883183aa1d4de9bbaa
Author: Damin Rido <rido@freebsd.org>
AuthorDate: 2025-08-02 16:59:58 +0000
Commit: Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-08-08 16:16:56 +0000
sockstat: revert incorrect use of path-state for SCTP connections
Revert a change that mistakenly used SCTP path state and the field name
`path-state` instead of the correct `conn-state` and `sctp_conn_state()`
call. This was introduced in 7b35b4d during the addition of libxo
support.
Fixes: 7b35b4d ("sockstat: add libxo support")
Reported by: Phil Shafer <phil@juniper.net>
Sponsored by: Google, LLC (GSoC 2025)
Pull Request: https://github.com/freebsd/freebsd-src/pull
Reviewed by: asomers
---
usr.bin/sockstat/sockstat.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
index 7355eaa272a0..6761faae5210 100644
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -1510,10 +1510,9 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize)
s->proto == IPPROTO_TCP) {
switch (s->proto) {
case IPPROTO_SCTP:
- xo_emit(" {:path-state/%-*s}",
- cw->path_state,
- sctp_path_state(
- faddr->state));
+ xo_emit(" {:conn-state/%-*s}",
+ cw->conn_state,
+ sctp_conn_state(s->state));
break;
case IPPROTO_TCP:
if (s->state >= 0 &&