git: 738c0bb0ad0b - stable/13 - wpa_supplicant: Use PF_LOCAL instead of PF_INET*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 May 2025 04:50:16 UTC
The branch stable/13 has been updated by cy:
URL: https://cgit.FreeBSD.org/src/commit/?id=738c0bb0ad0b2a732841526f74af045703ec5236
commit 738c0bb0ad0b2a732841526f74af045703ec5236
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-04-28 01:16:37 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-05-11 04:50:00 +0000
wpa_supplicant: Use PF_LOCAL instead of PF_INET*
Using a local socket circumvents the issue of needing any Internet
protocol (PF_INET or PF_INET6) support.
We only use interface ("i" group) ioctls on this socket so we can get
away with using PF_LOCAL instead of requring any Internet protocol
(PF_INET or PF_INET6) support on the system. This simplifies the
patch from 8c7149c73f8f.
PR: 286259
Noted by: kevans
Fixes: 8c7149c73f8f
Reviewed by: kevans, philip,
zarychtam_plan-b.pwste.edu.pl (mzar)
Differential revision: https://reviews.freebsd.org/D50050
(cherry picked from commit 6aeec6a741975143f53feabceb1726d5033aafd6)
---
contrib/wpa/src/drivers/driver_bsd.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c
index e5ff319637c0..ab8f40cfd065 100644
--- a/contrib/wpa/src/drivers/driver_bsd.c
+++ b/contrib/wpa/src/drivers/driver_bsd.c
@@ -1767,21 +1767,11 @@ bsd_global_init(void *ctx)
global->ctx = ctx;
dl_list_init(&global->ifaces);
- global->sock = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+ global->sock = socket(PF_LOCAL, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (global->sock < 0) {
- if (errno == EAFNOSUPPORT) {
- wpa_printf(MSG_INFO, "INET not supported, trying INET6...");
- global->sock = socket(PF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
- if (global->sock < 0) {
- wpa_printf(MSG_ERROR, "socket[PF_INET6,SOCK_DGRAM]: %s",
- strerror(errno));
- goto fail1;
- }
- } else {
- wpa_printf(MSG_ERROR, "socket[PF_INET,SOCK_DGRAM]: %s",
+ wpa_printf(MSG_ERROR, "socket[PF_LOCAL,SOCK_DGRAM]: %s",
strerror(errno));
goto fail1;
- }
}
global->route = socket(PF_ROUTE,