Date: Sun, 11 May 2025 04:49:50 GMT From: Cy Schubert <cy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: db9d0fad461a - stable/14 - wpa_supplicant: Handle systems without INET (legacy IP) support Message-ID: <202505110449.54B4no2b083146@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=db9d0fad461a6d3a0beb79981c31026bc4ce0a48 commit db9d0fad461a6d3a0beb79981c31026bc4ce0a48 Author: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> AuthorDate: 2025-04-28 00:02:04 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2025-05-11 04:48:49 +0000 wpa_supplicant: Handle systems without INET (legacy IP) support Currently, wpa_supplicant fails when legacy IP support is disabled in FreeBSD (i.e., the world built with WITHOUT_INET and nooptions INET in the kernel config). The proposed patch allows running wpa_supplicant and connecting to wireless networks without INET support when INET6 is available. Reviewed by: cy, adrian, philip, roy_marples.name Differential Revision: https://reviews.freebsd.org/D49959 (cherry picked from commit 8c7149c73f8f2301369f271c98470b72973b0c01) --- contrib/wpa/src/drivers/driver_bsd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 75a1a061e0a7..384c0a19cfe3 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -1770,9 +1770,19 @@ bsd_global_init(void *ctx) global->sock = socket(PF_INET, 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", strerror(errno)); goto fail1; + } } global->route = socket(PF_ROUTE,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505110449.54B4no2b083146>