From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2 11/11] ss: report a failed SCTP or MPTCP dump
Date: Thu, 12 Nov 2026 11:59:24 -0800 [thread overview]
Message-ID: <20261112200046.2164391-12-stephen@networkplumber.org> (raw)
In-Reply-To: <20261112200046.2164391-1-stephen@networkplumber.org>
sctp_show() and mptcp_show() discarded the return of
inet_show_netlink(), unlike every other family, so ss -S and ss -M
printed only a header and exited 0 when the kernel could not dump.
Neither protocol is dumped unless asked for, and sock_diag_error()
already reports a missing module as lack of support, so this does
not add noise to a default run.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
misc/ss.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 7c47d377..f4160f59 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -4105,7 +4105,8 @@ static int mptcp_show(struct filter *f)
if (!filter_af_get(f, AF_INET) && !filter_af_get(f, AF_INET6))
return 0;
- inet_show_netlink(f, NULL, IPPROTO_MPTCP);
+ if (inet_show_netlink(f, NULL, IPPROTO_MPTCP))
+ return sock_diag_error("MPTCP");
return 0;
}
@@ -4114,7 +4115,8 @@ static int sctp_show(struct filter *f)
if (!filter_af_get(f, AF_INET) && !filter_af_get(f, AF_INET6))
return 0;
- inet_show_netlink(f, NULL, IPPROTO_SCTP);
+ if (inet_show_netlink(f, NULL, IPPROTO_SCTP))
+ return sock_diag_error("SCTP");
return 0;
}
--
2.53.0
next prev parent reply other threads:[~2026-11-12 20:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 19:59 [PATCH iproute2 00/11] ss fixes from an OSS scan Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 01/11] ss: fix double close on sock_diag send failure Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 02/11] ss: drop /proc fallback for socket listing Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 03/11] ss: escape names chosen by the socket owner Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 04/11] ss: size the TCPDIAG_FILE buffer to the record Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 05/11] ss: replay all dumps in TCPDIAG_FILE Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 06/11] ss: bound state and type name lookups Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 07/11] ss: fix rpcbind service cache Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 08/11] ss: read socket SELinux context only for -z Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 09/11] ss: check owner before naming a netlink socket Stephen Hemminger
2026-11-12 19:59 ` [PATCH iproute2 10/11] ss: keep following events after ENOBUFS Stephen Hemminger
2026-11-12 19:59 ` Stephen Hemminger [this message]
2026-11-16 18:00 ` [PATCH iproute2 00/11] ss fixes from an OSS scan patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2026-11-09 21:25 Stephen Hemminger
2026-11-09 21:25 ` [PATCH iproute2 11/11] ss: report a failed SCTP or MPTCP dump Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112200046.2164391-12-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.