X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_network%2Fwifi.lua;h=09763e8f14523ba96842d3a3c72521b1521fc27f;hp=20edd68fe922bf957a80a33bc15e2085a59d733b;hb=98e12fcebba7cf0a962f316e572077cacfac43d3;hpb=ad064f0b039839dd333bfe8e9631cbc5218410b0 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 20edd68fe..09763e8f1 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 @@ -156,11 +156,12 @@ end if found_sta then ch = s:taboption("general", DummyValue, "choice", translate("Channel")) - ch.value = translatef("Locked to channel %d used by: %s", - found_sta.channel, table.concat(found_sta.names, ", ")) + ch.value = translatef("Locked to channel %s used by: %s", + found_sta.channel or "(auto)", table.concat(found_sta.names, ", ")) else ch = s:taboption("general", Value, "_mode_freq", '
'..translate("Operating frequency")) ch.hwmodes = hw_modes + ch.htmodes = iw.htmodelist ch.freqlist = iw.freqlist ch.template = "cbi/wireless_modefreq" @@ -474,6 +475,9 @@ if hwtype == "mac80211" then wmm:depends({mode="ap"}) wmm:depends({mode="ap-wds"}) wmm.default = wmm.enabled + + ifname = s:taboption("advanced", Value, "ifname", translate("Interface name"), translate("Override default interface name")) + ifname.optional = true end @@ -864,6 +868,7 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then eaptype:value("tls", "TLS") eaptype:value("ttls", "TTLS") eaptype:value("peap", "PEAP") + eaptype:value("fast", "FAST") eaptype:depends({mode="sta", encryption="wpa"}) eaptype:depends({mode="sta", encryption="wpa2"}) eaptype:depends({mode="sta-wds", encryption="wpa"}) @@ -874,12 +879,13 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then cacert:depends({mode="sta", encryption="wpa2"}) cacert:depends({mode="sta-wds", encryption="wpa"}) cacert:depends({mode="sta-wds", encryption="wpa2"}) + cacert.rmempty = true clientcert = s:taboption("encryption", FileUpload, "client_cert", translate("Path to Client-Certificate")) - clientcert:depends({mode="sta", encryption="wpa"}) - clientcert:depends({mode="sta", encryption="wpa2"}) - clientcert:depends({mode="sta-wds", encryption="wpa"}) - clientcert:depends({mode="sta-wds", encryption="wpa2"}) + clientcert:depends({mode="sta", eap_type="tls", encryption="wpa"}) + clientcert:depends({mode="sta", eap_type="tls", encryption="wpa2"}) + clientcert:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) + clientcert:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) privkey = s:taboption("encryption", FileUpload, "priv_key", translate("Path to Private Key")) privkey:depends({mode="sta", eap_type="tls", encryption="wpa2"}) @@ -892,42 +898,108 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then privkeypwd:depends({mode="sta", eap_type="tls", encryption="wpa"}) privkeypwd:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) privkeypwd:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) - - - auth = s:taboption("encryption", Value, "auth", translate("Authentication")) - auth:value("PAP") - auth:value("CHAP") - auth:value("MSCHAP") - auth:value("MSCHAPV2") + privkeypwd.rmempty = true + privkeypwd.password = true + + auth = s:taboption("encryption", ListValue, "auth", translate("Authentication")) + auth:value("PAP", "PAP", {eap_type="ttls"}) + auth:value("CHAP", "CHAP", {eap_type="ttls"}) + auth:value("MSCHAP", "MSCHAP", {eap_type="ttls"}) + auth:value("MSCHAPV2", "MSCHAPv2", {eap_type="ttls"}) + auth:value("EAP-GTC") + auth:value("EAP-MD5") + auth:value("EAP-MSCHAPV2") + auth:value("EAP-TLS") + auth:depends({mode="sta", eap_type="fast", encryption="wpa2"}) + auth:depends({mode="sta", eap_type="fast", encryption="wpa"}) auth:depends({mode="sta", eap_type="peap", encryption="wpa2"}) auth:depends({mode="sta", eap_type="peap", encryption="wpa"}) auth:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) auth:depends({mode="sta", eap_type="ttls", encryption="wpa"}) + auth:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) + auth:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) auth:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) auth:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) auth:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) auth:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) + cacert2 = s:taboption("encryption", FileUpload, "ca_cert2", translate("Path to inner CA-Certificate")) + cacert2:depends({mode="sta", auth="EAP-TLS", encryption="wpa"}) + cacert2:depends({mode="sta", auth="EAP-TLS", encryption="wpa2"}) + cacert2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa"}) + cacert2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa2"}) + + clientcert2 = s:taboption("encryption", FileUpload, "client_cert2", translate("Path to inner Client-Certificate")) + clientcert2:depends({mode="sta", auth="EAP-TLS", encryption="wpa"}) + clientcert2:depends({mode="sta", auth="EAP-TLS", encryption="wpa2"}) + clientcert2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa"}) + clientcert2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa2"}) + + privkey2 = s:taboption("encryption", FileUpload, "priv_key2", translate("Path to inner Private Key")) + privkey2:depends({mode="sta", auth="EAP-TLS", encryption="wpa"}) + privkey2:depends({mode="sta", auth="EAP-TLS", encryption="wpa2"}) + privkey2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa"}) + privkey2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa2"}) + + privkeypwd2 = s:taboption("encryption", Value, "priv_key2_pwd", translate("Password of inner Private Key")) + privkeypwd2:depends({mode="sta", auth="EAP-TLS", encryption="wpa"}) + privkeypwd2:depends({mode="sta", auth="EAP-TLS", encryption="wpa2"}) + privkeypwd2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa"}) + privkeypwd2:depends({mode="sta-wds", auth="EAP-TLS", encryption="wpa2"}) + privkeypwd2.rmempty = true + privkeypwd2.password = true identity = s:taboption("encryption", Value, "identity", translate("Identity")) + identity:depends({mode="sta", eap_type="fast", encryption="wpa2"}) + identity:depends({mode="sta", eap_type="fast", encryption="wpa"}) identity:depends({mode="sta", eap_type="peap", encryption="wpa2"}) identity:depends({mode="sta", eap_type="peap", encryption="wpa"}) identity:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) identity:depends({mode="sta", eap_type="ttls", encryption="wpa"}) + identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) + identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) + identity:depends({mode="sta", eap_type="tls", encryption="wpa2"}) + identity:depends({mode="sta", eap_type="tls", encryption="wpa"}) + identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) + identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) + + anonymous_identity = s:taboption("encryption", Value, "anonymous_identity", translate("Anonymous Identity")) + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) password = s:taboption("encryption", Value, "password", translate("Password")) + password:depends({mode="sta", eap_type="fast", encryption="wpa2"}) + password:depends({mode="sta", eap_type="fast", encryption="wpa"}) password:depends({mode="sta", eap_type="peap", encryption="wpa2"}) password:depends({mode="sta", eap_type="peap", encryption="wpa"}) password:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) password:depends({mode="sta", eap_type="ttls", encryption="wpa"}) + password:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) + password:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) password:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) password:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) password:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) password:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) + password.rmempty = true + password.password = true end if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then