summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/luasrc/model/cbi
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-11-25 08:48:16 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2018-11-25 09:00:35 +0200
commit26e903c7407e5ce4fd0428884a997386134f46f0 (patch)
tree5e7f7160018466464bb4788092ad53e7401186cf /modules/luci-mod-network/luasrc/model/cbi
parent548281773d02f658f36690c02c6397776d409450 (diff)
luci-mod-network: adapt to current 802.11r defaults
The default for 802.11r option ft_psk_generate_local was changed a few months ago by openwrt/openwrt@3cc56a5 That change was a bit awkward, as it made hostapd to overlook the possibly existing r0kh values by default unless the user explicitly disables the new default. Adapt LuCI by changing the default for ft_psk_generate_local into 'enabled'. But ensure that LuCI does not delete the existing key values by not making the r0kh and r1kh fields to depend on this. Note that this is just a quick fix for the wrong default value causing problems, but not yet a complete fix for all the options. In the long run it might be better to make the detail options to depend on local generation. Reference also to LuCI PR #2102 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'modules/luci-mod-network/luasrc/model/cbi')
-rw-r--r--modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
index 8ed39df486..7c40886605 100644
--- a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
@@ -872,12 +872,14 @@ if hwtype == "mac80211" or hwtype == "prism2" then
ft_psk_generate_local = s:taboption("encryption", Flag, "ft_psk_generate_local",
translate("Generate PMK locally"),
- translate("When using a PSK, the PMK can be generated locally without inter AP communications"))
+ translate("When using a PSK, the PMK can be automatically generated. When enabled, the R0/R1 key options below are not applied. Disable this to use the R0 and R1 key options."))
ft_psk_generate_local:depends({ieee80211r="1"})
+ ft_psk_generate_local.default = ft_psk_generate_local.enabled
+ ft_psk_generate_local.rmempty = false
r0_key_lifetime = s:taboption("encryption", Value, "r0_key_lifetime",
translate("R0 Key Lifetime"), translate("minutes"))
- r0_key_lifetime:depends({ieee80211r="1", ft_psk_generate_local=""})
+ r0_key_lifetime:depends({ieee80211r="1"})
r0_key_lifetime.placeholder = "10000"
r0_key_lifetime.datatype = "uinteger"
r0_key_lifetime.rmempty = true
@@ -885,13 +887,13 @@ if hwtype == "mac80211" or hwtype == "prism2" then
r1_key_holder = s:taboption("encryption", Value, "r1_key_holder",
translate("R1 Key Holder"),
translate("6-octet identifier as a hex string - no colons"))
- r1_key_holder:depends({ieee80211r="1", ft_psk_generate_local=""})
+ r1_key_holder:depends({ieee80211r="1"})
r1_key_holder.placeholder = "00004f577274"
r1_key_holder.datatype = "and(hexstring,rangelength(12,12))"
r1_key_holder.rmempty = true
pmk_r1_push = s:taboption("encryption", Flag, "pmk_r1_push", translate("PMK R1 Push"))
- pmk_r1_push:depends({ieee80211r="1", ft_psk_generate_local=""})
+ pmk_r1_push:depends({ieee80211r="1"})
pmk_r1_push.placeholder = "0"
pmk_r1_push.rmempty = true
@@ -901,7 +903,7 @@ if hwtype == "mac80211" or hwtype == "prism2" then
"<br />This list is used to map R0KH-ID (NAS Identifier) to a destination " ..
"MAC address when requesting PMK-R1 key from the R0KH that the STA " ..
"used during the Initial Mobility Domain Association."))
- r0kh:depends({ieee80211r="1", ft_psk_generate_local=""})
+ r0kh:depends({ieee80211r="1"})
r0kh.rmempty = true
r1kh = s:taboption("encryption", DynamicList, "r1kh", translate("External R1 Key Holder List"),
@@ -910,7 +912,7 @@ if hwtype == "mac80211" or hwtype == "prism2" then
"<br />This list is used to map R1KH-ID to a destination MAC address " ..
"when sending PMK-R1 key from the R0KH. This is also the " ..
"list of authorized R1KHs in the MD that can request PMK-R1 keys."))
- r1kh:depends({ieee80211r="1", ft_psk_generate_local=""})
+ r1kh:depends({ieee80211r="1"})
r1kh.rmempty = true
-- End of 802.11r options