OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Michael Jones - 19.12.2019

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

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing