diff options
| author | K Rin <rin@sandb0x.tw> | 2025-04-12 02:28:52 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-06-10 12:35:02 +0000 |
| commit | 6b61852b4f000431eb83ce26584da806f64d4643 (patch) | |
| tree | 278660fb03deb94fd0a6c72e8496391feb29a8ca | |
| parent | 9a6a2e4b7d203fe9c5ea4f335564f4797bb29a01 (diff) | |
mac_portacl: do not reject unspecific family directly
Reviewed by: imp,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1659
| -rw-r--r-- | sys/security/mac_portacl/mac_portacl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/security/mac_portacl/mac_portacl.c b/sys/security/mac_portacl/mac_portacl.c index b3a5e06c0e2a..1cbfcad83acf 100644 --- a/sys/security/mac_portacl/mac_portacl.c +++ b/sys/security/mac_portacl/mac_portacl.c @@ -452,7 +452,8 @@ socket_check_bind(struct ucred *cred, struct socket *so, return (0); /* Reject addresses we don't understand; fail closed. */ - if (sa->sa_family != AF_INET && sa->sa_family != AF_INET6) + if (sa->sa_family != AF_UNSPEC && sa->sa_family != AF_INET && + sa->sa_family != AF_INET6) return (EINVAL); family = so->so_proto->pr_domain->dom_family; |
