Merge pull request #1012 from stangri/luci-app-vpnbypass
authorHannu Nyman <hannu.nyman@iki.fi>
Wed, 15 Feb 2017 08:08:34 +0000 (10:08 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Feb 2017 08:08:34 +0000 (10:08 +0200)
luci-app-vpnbypass: cbi file fix for README link and an unneeded section

modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua

index d49786e..33a8892 100644 (file)
@@ -967,8 +967,8 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
 
        r0kh = s:taboption("encryption", DynamicList, "r0kh", translate("External R0 Key Holder List"),
                translate("List of R0KHs in the same Mobility Domain. " ..
-                       "<br>Format: MAC-address,NAS-Identifier,128-bit key as hex string. " ..
-                       "<br>This list is used to map R0KH-ID (NAS Identifier) to a destination " ..
+                       "<br />Format: MAC-address,NAS-Identifier,128-bit key as hex string. " ..
+                       "<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."))
 
@@ -977,8 +977,8 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
 
        r1kh = s:taboption("encryption", DynamicList, "r1kh", translate("External R1 Key Holder List"),
                translate ("List of R1KHs in the same Mobility Domain. "..
-                       "<br>Format: MAC-address,R1KH-ID as 6 octets with colons,128-bit key as hex string. "..
-                       "<br>This list is used to map R1KH-ID to a destination MAC address " ..
+                       "<br />Format: MAC-address,R1KH-ID as 6 octets with colons,128-bit key as hex string. "..
+                       "<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"})
@@ -1125,10 +1125,12 @@ 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 " ..
-                       "and support from the wifi driver <br>(as of Feb 2017: " ..
+                       "and support from the wifi driver <br />(as of Feb 2017: " ..
                        "ath9k and ath10k, in LEDE also mwlwifi and mt76)"))
        ieee80211w.default = "0"
        ieee80211w.rmempty = true
@@ -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