Skip to content

fix(#486): connect to SAE-only WPA3-Personal networks - #535

Merged
cachebag merged 2 commits into
masterfrom
bugfix/support-sae
Sep 2, 2026
Merged

cachebag merged 2 commits into
masterfrom
bugfix/support-sae

Conversation

@cachebag

@cachebag cachebag commented Sep 2, 2026

Copy link
Copy Markdown
Member

Connecting to a WPA3-only network with WifiSecurity::WpaPsk fails. We always send key-mgmt=wpa-psk, and NetworkManager rejects that if the AP only does SAE. Reported from COSMIC Settings.

This adds WifiSecurity::Sae and WifiConnectionBuilder::sae(). On top of that, connect() now checks the AP's security flags: if the AP is SAE-only and the caller passed WpaPsk, we send sae instead. APs that support both are left alone since wpa-psk still works there.

Also adds an integration test. The hwsim harness now runs a second, SAE-only AP so the test can actually hit the failing case. I could not run the harness locally, so CI will be the first real run of that config. It needs a hostapd built with SAE.

Fixes #486
Fixes downstream related pop-os/cosmic-settings#2068

WpaPsk emits key-mgmt=wpa-psk, which NetworkManager rejects on APs
advertising SAE without PSK. Add WifiSecurity::Sae and
WifiConnectionBuilder::sae(), and upgrade WpaPsk to Sae in connect()
when the target AP is SAE-only. Transition-mode APs still accept PSK
and are left alone.
@cachebag cachebag self-assigned this Sep 2, 2026
@cachebag cachebag added bug Something isn't working api-surface Public API design, re-exports, and semver-relevant changes tests Add, remove or adjust tests wifi WiFi connection management builders Connection builder API and validation labels Sep 2, 2026
@cachebag
cachebag had a problem deploying to self-hosted-pr-integration September 2, 2026 17:57 — with GitHub Actions Failure
@cachebag
cachebag had a problem deploying to self-hosted-pr-integration September 2, 2026 18:08 — with GitHub Actions Failure
Add a second SAE-only BSS to the hwsim AP radio with its own subnet and
dnsmasq. The test asserts the AP is SAE-only, then that a WpaPsk connect
succeeds and stores a WifiKeyMgmt::Sae profile.
@cachebag
cachebag deployed to self-hosted-pr-integration September 2, 2026 18:13 — with GitHub Actions Active
@cachebag
cachebag merged commit 5ed30e0 into master Sep 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-surface Public API design, re-exports, and semver-relevant changes bug Something isn't working builders Connection builder API and validation tests Add, remove or adjust tests wifi WiFi connection management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] WpaPsk connect fails on SAE-only WPA3-Personal APs

1 participant