OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • 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:

			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"
				append bss_conf "wpa_passphrase=$key" "$N"
			[ -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"


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.


Available keyboard shortcuts


Task Details

Task Editing