Repository navigation
[24.10] hostapd: add SAE support for wifi-station and optimize PSK file creation - #17248
Merged
Merged
Conversation
rany2
force-pushed
the
24.10-sae-wifi-station
branch
from
December 12, 2024 15:07
0a5f676 to
2c13514
Compare
rany2
force-pushed
the
24.10-sae-wifi-station
branch
from
December 20, 2024 23:59
9a06476 to
2b33d70
Compare
Regarding SAE support in wifi-station: Important Note: Unlike PSK wifi-stations, both `mac` and `key` options are required to make it work. With PSK, hostapd used to perform a brute-force match to find which PSK entry to use, but with SAE this is infeasible due to SAE's design. When `mac` is omitted, it will allow any MAC address to use the SAE password if it didn't have a MAC address assigned to it, but this could only be done once. The last wildcard entry would be used. Also, unlike "hostapd: add support for SAE in PPSK option" (commit 913368a), it is not required to set `sae_pwe` to `0`. This gives it a slight advantage over using PPSK that goes beyond not needing RADIUS. Example Configuration: ``` config wifi-vlan option iface default_radio0 option name 999 option vid 999 option network management config wifi-station # Allow user with MAC address 00:11:22:33:44:55 and matching # key "secretadminpass" to access the management network. option iface default_radio0 option vid 999 option mac '00:11:22:33:44:55' option key secretadminpass config wifi-vlan option iface default_radio0 option name 100 option vid 100 option network guest config wifi-station # With SAE, when 'mac' is omitted it will be the fallback in case no # other MAC address matches. It won't be possible for a user that # has a matching MAC to use this network (i.e., 00:11:22:33:44:55 # in this example). option iface default_radio0 option vid 100 option key guestpass ``` Regarding PSK file creation optimization: This patch now conditionally runs `hostapd_set_psk_file` depending on `auth_type`. Previously, `hostapd_set_psk` would always execute `hostapd_set_psk_file`, which would create a new file if `wifi-station` was in use even if PSK was not enabled. This change checks the `auth_type` to ensure that it is appropriate to parse the `wifi-station` entries and create those files. Furthermore, we now only configure `wpa_psk_file` when it is a supported option (i.e., psk or psk-sae is used). Previously, we used to configure it when it was not necessary. While it didn't cause any issues, it would litter `/var/run` with unnecessary files. This patch fixes that case by configuring it depending on the `auth_type`. The new SAE support is aligned with these PSK file changes. Signed-off-by: Rany Hany <[email protected]> Link: openwrt#17145 Signed-off-by: John Crispin <[email protected]> (cherry picked from commit 65a1c66) Link: openwrt#17248 Signed-off-by: Hauke Mehrtens <[email protected]>
hauke
force-pushed
the
24.10-sae-wifi-station
branch
from
December 26, 2024 13:56
2b33d70 to
4cc1da1
Compare
Lauri-Nomme
added a commit
to Lauri-Nomme/openwrt
that referenced
this pull request
Sep 23, 2026
…89 (frank asks to move RSS to openwrt#26071; iperf2 posted), no new netdev RSS/LRO rev, OpenWrt 6.18.53 bump PR openwrt#25331, stintel staging mtk TX series, R4Pro_RSS still 1 fix behind; revert run red = empty-targets artifact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regarding SAE support in wifi-station:
Important Note: Unlike PSK wifi-stations, both
macandkeyoptions are required to make it work. With PSK, hostapd used to perform a brute-force match to find which PSK entry to use, but with SAE this is infeasible due to SAE's design.When
macis omitted, it will allow any MAC address to use the SAE password if it didn't have a MAC address assigned to it, but this could only be done once. The last wildcard entry would be used.Also, unlike "hostapd: add support for SAE in PPSK option" (commit 913368a), it is not required to set
sae_pweto0. This gives it a slight advantage over using PPSK that goes beyond not needing RADIUS.Example Configuration:
Regarding PSK file creation optimization:
This patch now conditionally runs
hostapd_set_psk_filedepending onauth_type. Previously,hostapd_set_pskwould always executehostapd_set_psk_file, which would create a new file ifwifi-stationwas in use even if PSK was not enabled. This change checks theauth_typeto ensure that it is appropriate to parse thewifi-stationentries and create those files.Furthermore, we now only configure
wpa_psk_filewhen it is a supported option (i.e., psk or psk-sae is used). Previously, we used to configure it when it was not necessary. While it didn't cause any issues, it would litter/var/runwith unnecessary files. This patch fixes that case by configuring it depending on theauth_type.The new SAE support is aligned with these PSK file changes.
Link: #17145
(cherry picked from commit 65a1c66)