Page MenuHomeFreeBSD

wpa_supplicant: Use PF_LOCAL instead of PF_INET*
ClosedPublic

Authored by cy on Apr 28 2025, 1:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 4:25 PM
Unknown Object (File)
Tue, Oct 7, 6:20 PM
Unknown Object (File)
Fri, Oct 3, 3:40 AM
Unknown Object (File)
Mon, Sep 29, 12:06 AM
Unknown Object (File)
Thu, Sep 25, 10:56 PM
Unknown Object (File)
Sep 17 2025, 4:26 AM
Unknown Object (File)
Sep 15 2025, 11:21 PM
Unknown Object (File)
Sep 15 2025, 1:20 PM

Details

Summary

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.

Noted by: kevans
Fixes: 8c7149c73f8f
MFC after: 1 month

Test Plan

Running here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested review of this revision.Apr 28 2025, 1:28 AM

I haven't tested this but assuming we do indeed use only interface ioctls, this looks like it should work.

This revision is now accepted and ready to land.Apr 28 2025, 1:38 AM

I haven't tested this but assuming we do indeed use only interface ioctls, this looks like it should work.

Yeah. kevans@ remarked about this on src-committers after I had pushed D49959. I tested it here. It works on my Framework laptop. It's now being installed on the HP 840. I expect it to work there as it did on the Framework.

Since it was code in contrib, I didn't want to change it much; I just used a simple duct-tape fix. Indeed, PF_LOCAL works fine here as well, and it's likely the right fix.

Since it was code in contrib, I didn't want to change it much; I just used a simple duct-tape fix. Indeed, PF_LOCAL works fine here as well, and it's likely the right fix.

Does it work on NetBSD? Otherwise we'll have merge conflicts with upstream or need to #ifdef this out.

In D50050#1141446, @bz wrote:

Since it was code in contrib, I didn't want to change it much; I just used a simple duct-tape fix. Indeed, PF_LOCAL works fine here as well, and it's likely the right fix.

Does it work on NetBSD? Otherwise we'll have merge conflicts with upstream or need to #ifdef this out.

Works fine. Ship it.

In D50050#1141446, @bz wrote:

Since it was code in contrib, I didn't want to change it much; I just used a simple duct-tape fix. Indeed, PF_LOCAL works fine here as well, and it's likely the right fix.

Does it work on NetBSD? Otherwise we'll have merge conflicts with upstream or need to #ifdef this out.

Works fine. Ship it.

I'll create a pull request for upstream today.

Initial tests on my Framework using rtwn(4), passed. Now running it on my HP 840 G5 with iwm(4) and Acer 4752 with iwn(4).

I'll push this out this afternoon and apply the patch to the ports as well. Then cobble a pull request for upstream.

This revision was automatically updated to reflect the committed changes.