Date: Sun, 4 May 2025 22:33:48 GMT From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8f5f6680efa2 - main - sctp: don't report unusable addresses via sysctl interface Message-ID: <202505042233.544MXmfj079618@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5f6680efa28135bf37f3def2aa71f35bd30333 commit 8f5f6680efa28135bf37f3def2aa71f35bd30333 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2025-05-04 22:28:52 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2025-05-04 22:28:52 +0000 sctp: don't report unusable addresses via sysctl interface When reporting the local addresses of an endpoint (inp without stcb), ignore unusable addresses. MFC after: 3 days --- sys/netinet/sctp_sysctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index a39429ec046e..bd2f23f40727 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -265,6 +265,10 @@ sctp_sysctl_copy_out_local_addresses(struct sctp_inpcb *inp, struct sctp_tcb *st if (sctp_is_addr_restricted(stcb, sctp_ifa)) { continue; } + } else { + if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { + continue; + } } switch (sctp_ifa->address.sa.sa_family) { #ifdef INET
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505042233.544MXmfj079618>