Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2689 - netifd /etc/config/wireless wifi-iface requires a key option even when wpa_psk_file is provided #8148

Closed
openwrt-bot opened this issue Dec 19, 2019 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

mike-meshplusplus:

What the subject says.

If /etc/config/wireless is configured to use a wpa_psk_file to supply the wpa pre shared keys, but no "key" option is provided, the interface will refuse to start.

You can see the flawed logic here: https://github.com/openwrt/openwrt/blob/24b97579d20b6ac6df81654a953386d2912fc324/package/network/services/hostapd/files/hostapd.sh

psk|sae|psk-sae) json_get_vars key wpa_psk_file if [ ${#key} -lt 8 ]; then wireless_setup_vif_failed INVALID_WPA_PSK return 1 elif [ ${#key} -eq 64 ]; then append bss_conf "wpa_psk=$key" "$N" else append bss_conf "wpa_passphrase=$key" "$N" fi [ -n "$wpa_psk_file" ] && { [ -e "$wpa_psk_file" ] || touch "$wpa_psk_file" append bss_conf "wpa_psk_file=$wpa_psk_file" "$N" } [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] && append bss_conf "eapol_version=$eapol_version" "$N"
		wps_possible=1

The existence of the wpa_psk_file option should mean that the key value is optional. But instead the wpa_psk_file option is treated as an additional option, not a replacement.

@openwrt-bot
Copy link
Author

jow-:

Fixed with https://git.openwrt.org/321503dbf3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant