summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-02-09 10:02:49 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2017-02-09 10:23:53 +0200
commitf02794f28c343070487bbc794b425f91b675fdb9 (patch)
tree84da6050906459a6b1e8d787ac62228e9b5ab57b
parentfecf6e1d11d466efa7b1bbf05633931a3081517e (diff)
luci-mod-admin-full: prevent accidental deletion of 802.11r nasid
The same wifi option 'nasid' is used for two purposes, RADIUS NAS ID and 802.11r NAS ID / R0KH-ID. In LuCI the 'nasid' option has depended on WPA-EAP/WPA2-EAP, which can lead to accidental deletion of the option, if the user modifies any wifi settings while he has WPA(2)-PSK & 802.11r mode. 802.11r can also be with WPA(2)-PSK, so add them to the dependency list of allowed encryptions. (Note: after this fix the 'nasid' field is shown unnecessarily to "normal" WPA(2)-PSK users. It might later be set to depend on 802.11r being used, after 802.11r has been added to LuCI.) Reference to bugs: https://github.com/openwrt/luci/issues/844 https://dev.openwrt.org/ticket/20764 https://bugs.lede-project.org/index.php?do=details&task_id=274 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
index afe0d662b7..6d8ec2525e 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -900,11 +900,16 @@ end
if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
- nasid = s:taboption("encryption", Value, "nasid", translate("NAS ID"))
+ nasid = s:taboption("encryption", Value, "nasid", translate("NAS ID"),
+ translate("Used for two different purposes: RADIUS NAS ID and " ..
+ "802.11r R0KH-ID. Not needed with normal WPA(2)-PSK."))
nasid:depends({mode="ap", encryption="wpa"})
nasid:depends({mode="ap", encryption="wpa2"})
nasid:depends({mode="ap-wds", encryption="wpa"})
nasid:depends({mode="ap-wds", encryption="wpa2"})
+ nasid:depends({mode="ap", encryption="psk"})
+ nasid:depends({mode="ap", encryption="psk2"})
+ nasid:depends({mode="ap", encryption="psk-mixed"})
nasid.rmempty = true
eaptype = s:taboption("encryption", ListValue, "eap_type", translate("EAP-Method"))