fix(network): support WPA3 SAE connections - #3949
Conversation
Preserve NetworkManager's SAE capability from access-point discovery through activation and select the appropriate key-management mode. Prefer SAE for WPA3 and transition-mode access points while retaining WPA-PSK for WPA2 networks. Add focused regression coverage for the security flag mapping. Fixes noctalia-dev#3841
[P2] Include supportsSae in the control-center row identitysrc/shell/control_center/tabs/network_tab.cpp:817-827 The PR body says cached rows are rebuilt when SAE capability changes, but NetworkTab::structureKey() still keys each row only on SSID, secured, active, and saved status. AccessPointRow stores its own AccessPointInfo, while syncLiveMetrics() updates only signal strength. Therefore, if a refresh changes the selected BSSID from WPA2 to SAE—or the same BSSID changes from transition mode to SAE-only, without changing those existing key fields, the row is retained with stale supportsSae. Clicking it then calls activateAccessPoint() with the old value and can still submit key-mgmt = wpa-psk, reproducing the failure this PR addresses. Add ap.supportsSae to structureKey(), as the PR description already intends. The focused helper test does not exercise this discovery → row cache → activation path, which is why the omission passes. |
|
@ItsLemmy You're right. I had already added |
|
Thanks! |
Summary
saefor SAE-capable access points and retainwpa-pskfor WPA2-Personal access points.Motivation
First-time connections to WPA3-Personal/SAE-only access points failed because Noctalia reduced NetworkManager's WPA/RSN capability flags to a generic
securedvalue and always created secured connections with:SAE-only access points require:
This change preserves the SAE capability of the selected NetworkManager access-point object through discovery, deduplication, password prompting, and activation. WPA2 access points continue to use WPA-PSK.
The network panel's cached row identity now also includes SAE capability. If an existing SSID's advertised capability changes while the panel remains open, the row is rebuilt with the current AccessPointInfo instead of activating with stale key management.
Type of Change
Related Issue
Fixes #3841
Testing
Ran the focused regression in the Nix development environment:
nix develop --command just test debug network_manager_security --print-errorlogsResult:
Manual Coverage
Screenshots / Videos
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
The NetworkManager SAE bit and key-management mapping are kept together in a small allocation-free helper. This gives production code and regression tests one source of truth without requiring D-Bus or a running NetworkManager instance in the focused test.
Other network backends retain their existing behavior because AccessPointInfo::supportsSae defaults to false.
When multiple BSSIDs advertise the same SSID, Noctalia retains the SAE capability of the selected representative access-point object rather than combining capabilities across BSSIDs. This matches the access-point object passed to AddAndActivateConnection2.