Date: Sun, 27 Apr 2025 19:13:54 -0500 From: Kyle Evans <kevans@FreeBSD.org> To: Cy Schubert <cy@FreeBSD.org>, Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8c7149c73f8f - main - wpa_supplicant: Handle systems without INET (legacy IP) support Message-ID: <4fecf1e7-24a7-4cd4-9d37-1ad37335072e@FreeBSD.org> In-Reply-To: <202504280005.53S059jX040559@gitrepo.freebsd.org> References: <202504280005.53S059jX040559@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4/27/25 19:05, Cy Schubert wrote: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8c7149c73f8f2301369f271c98470b72973b0c01 > > commit 8c7149c73f8f2301369f271c98470b72973b0c01 > 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-04-28 00:04:45 +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 > --- It looks like we really only invoke interface ('i' group) ioctls on this socket, is there any particular reason we didn't just use a PF_LOCAL socket? It'd be less complex and match what ifconfig does for a lot of its work. Thanks, Kyle Evans > 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 6efaa9c27ff2..d23d720789f9 100644 > --- a/contrib/wpa/src/drivers/driver_bsd.c > +++ b/contrib/wpa/src/drivers/driver_bsd.c > @@ -1800,9 +1800,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?4fecf1e7-24a7-4cd4-9d37-1ad37335072e>