openwrt/package/network/services/hostapd/files
Rany Hany 65a1c666f2 hostapd: add SAE support for wifi-station and optimize PSK file creation
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 <rany_hany@riseup.net>

Link: https://github.com/openwrt/openwrt/pull/17145
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-12 09:46:38 +01:00
..
dhcp-get-server.sh hostapd: add support for specifying the FILS DHCP server 2021-12-10 11:33:49 +01:00
hostapd-basic.config hostapd: enable compilation of OCV and add build feature discovery 2022-07-03 20:25:38 +02:00
hostapd-full.config hostapd: enable EAP-pwd support only for the SSL variants 2024-12-04 17:20:44 +01:00
hostapd-mini.config hostapd: enable proxy-arp support for hostapd-full 2021-08-28 01:31:15 +02:00
hostapd.uc hostapd: add SAE support for wifi-station and optimize PSK file creation 2024-12-12 09:46:38 +01:00
multicall.c packages: sort network related packages into package/network/ 2012-10-10 12:32:29 +00:00
radius.clients hostapd: add experimental radius server 2023-08-01 10:05:13 +02:00
radius.config hostapd: add experimental radius server 2023-08-01 10:05:13 +02:00
radius.init hostapd: add experimental radius server 2023-08-01 10:05:13 +02:00
radius.users hostapd: add experimental radius server 2023-08-01 10:05:13 +02:00
wpa_supplicant-basic.config hostapd: remove unused legacy wireless extension support 2023-05-26 13:33:45 +02:00
wpa_supplicant-full.config hostapd: remove unused legacy wireless extension support 2023-05-26 13:33:45 +02:00
wpa_supplicant-mini.config hostapd: remove unused legacy wireless extension support 2023-05-26 13:33:45 +02:00
wpa_supplicant-p2p.config hostapd: remove unused legacy wireless extension support 2023-05-26 13:33:45 +02:00
wpa_supplicant.uc wifi-scripts: add multi-radio config support 2024-10-22 14:40:43 +02:00
wpad_acl.json hostapd: add support for authenticating with multiple PSKs via ubus helper 2024-10-22 14:40:42 +02:00
wpad.init hostapd: enable coredumps 2022-12-16 14:32:47 +01:00
wpad.json hostapd: add ubus support for wired driver 2024-12-02 13:55:36 +01:00
wps-hotplug.sh hostapd: add fallback for WPS on stations 2021-12-27 16:32:02 +00:00