hostapd: make "key" option optional if "wpa_psk_file" is provided
authorJo-Philipp Wich <jo@mein.io>
Fri, 7 Aug 2020 18:50:55 +0000 (20:50 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 7 Aug 2020 19:04:02 +0000 (21:04 +0200)
commit321503dbf3d8ac0da8c1693a94a334f8072c72ac
treed154e8956d42a1ab62027269fe1faff47b792596
parenta4e72013e7cf8fbdaa8b36544be1e9dd7b5d45f6
hostapd: make "key" option optional if "wpa_psk_file" is provided

If an existing "wpa_psk_file" is passed to hostapd, the "key" option may
be omitted.

While we're at it, also improve the passphrase length checking to ensure
that it is either exactly 64 bytes or 8 to 63 bytes.

Fixes: FS#2689
Ref: https://github.com/openwrt/openwrt/pull/3283
Suggested-by: Michael Jones <mike@meshplusplus.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/network/services/hostapd/files/hostapd.sh