summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-02-14 23:30:51 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2017-02-14 23:43:05 +0200
commit7e6b3d1eb93aac0ae64468abbfb05cc4a46652ed (patch)
treee4ecac5c52e78a6020e940086d983833f15a65d3 /modules
parent36132365052b294cef1f14b5eec02e61dc4de6f4 (diff)
luci-mod-admin-full: place 80211w options behind a check for wpad-full
The default hostapd/wpad mini version does not support ieee80211w and the option's visibility in LuCI may lead it to be placed in user's /etc/config/wireless preventing wifi from starting. Check for hostapd/wpad full before exposing the option. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (cherry picked from commit 07e01d094eb25e1f036e85b8cfc5aceccc56003c)
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua3
1 files changed, 3 insertions, 0 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 d49786e54..359d977c5 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
@@ -1125,6 +1125,8 @@ end
-- ieee802.11w options
if hwtype == "mac80211" then
+ local has_ap_eap = (os.execute("hostapd -veap >/dev/null 2>/dev/null") == 0)
+ if has_ap_eap then
ieee80211w = s:taboption("encryption", ListValue, "ieee80211w",
translate("802.11w Management Frame Protection"),
translate("Requires the 'full' version of wpad/hostapd " ..
@@ -1159,6 +1161,7 @@ if hwtype == "mac80211" then
retry_timeout.datatype = "uinteger"
retry_timeout.placeholder = "201"
retry_timeout.rmempty = true
+ end
end
if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then