git: 8f5f6680efa2 - main - sctp: don't report unusable addresses via sysctl interface
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 May 2025 22:33:48 UTC
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