Date: Tue, 19 May 2026 10:43:03 +0000 From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e90a0118a734 - stable/14 - sctp: fix NOINET build Message-ID: <6a0c3eb7.1ef10.a1d0edf@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e90a0118a734f967211f501005771d13bf05b364 commit e90a0118a734f967211f501005771d13bf05b364 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2026-02-27 07:51:29 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2026-05-19 08:28:12 +0000 sctp: fix NOINET build Reported by: ngie Fixes: 454212b9718b ("sctp: fix so_proto when peeling off a socket") (cherry picked from commit 6bd97e9e01ff159eef49b2521fdbe67d5db10d95) --- sys/netinet/sctp_syscalls.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 79c1dfb21495..da7d0556a809 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -30,6 +30,8 @@ #include <sys/cdefs.h> #include "opt_capsicum.h" +#include "opt_inet.h" +#include "opt_inet6.h" #include "opt_sctp.h" #include "opt_ktrace.h" @@ -78,6 +80,9 @@ #include <netinet/sctp.h> #include <netinet/sctp_pcb.h> #include <netinet/sctp_var.h> +#ifdef INET6 +#include <netinet6/sctp6_var.h> +#endif #include <netinet/sctp_os_bsd.h> #include <netinet/sctp_peeloff.h> @@ -174,7 +179,21 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) td->td_retval[0] = fd; CURVNET_SET(head->so_vnet); - so = sopeeloff(head, &sctp_stream_protosw); + switch (head->so_proto->pr_domain->dom_family) { +#ifdef INET + case AF_INET: + so = sopeeloff(head, &sctp_stream_protosw); + break; +#endif +#ifdef INET6 + case AF_INET6: + so = sopeeloff(head, &sctp6_stream_protosw); + break; +#endif + default: + error = EOPNOTSUPP; + goto noconnection; + } if (so == NULL) { error = ENOMEM; goto noconnection;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0c3eb7.1ef10.a1d0edf>
