summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js4
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js2
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js2
-rw-r--r--modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua58
4 files changed, 60 insertions, 6 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js
index 145f5807a0..fe1ff19fed 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js
@@ -1,7 +1,7 @@
function iface_reconnect(id) {
L.halt();
L.dom.content(document.getElementById(id + '-ifc-description'), E('em', _('Interface is reconnecting...')));
- L.post(L.url('admin/network/iface_reconnect', id), L.run);
+ L.post(L.url('admin/network/iface_reconnect', id), null, L.run);
}
function iface_delete(ev) {
@@ -81,7 +81,7 @@ L.poll(5, L.url('admin/network/iface_status', networks.join(',')), null,
desc = desc ? '%s (%s)'.format(desc, ifc.desc) : ifc.desc;
L.itemlist(d, [
- _('Protocol'), '%h'.format(desc || '?'),
+ _('Protocol'), desc || '?',
_('Uptime'), ifc.is_up ? '%t'.format(ifc.uptime) : null,
_('MAC'), (!ifc.is_dynamic && !ifc.is_alias && ifc.macaddr) ? ifc.macaddr : null,
_('RX'), (!ifc.is_dynamic && !ifc.is_alias) ? '%.2mB (%d %s)'.format(ifc.rx_bytes, ifc.rx_packets, _('Pkts.')) : null,
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js
index 7e14d999bd..108a141f88 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js
@@ -39,7 +39,7 @@ requestAnimationFrame(function() {
L.itemlist(info, [
_('Mode'), iw.mode,
- _('SSID'), '%h'.format(iw.ssid || '?'),
+ _('SSID'), iw.ssid || '?',
_('BSSID'), is_assoc ? iw.bssid : null,
_('Encryption'), is_assoc ? iw.encryption || _('None') : null,
_('Channel'), is_assoc ? '%d (%.3f %s)'.format(iw.channel, iw.frequency || 0, _('GHz')) : null,
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index bdeb23d235..57e6bbb04c 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -70,7 +70,7 @@ L.poll(5, L.url('admin/network/wireless_status', networks.join(',')), null,
}, [ E('img', { src: icon }), ' %d%%'.format(p) ]));
L.itemlist(info, [
- _('SSID'), '%h'.format(iw.ssid || '?'),
+ _('SSID'), iw.ssid || '?',
_('Mode'), iw.mode,
_('BSSID'), iw.is_assoc ? iw.bssid : null,
_('Encryption'), iw.is_assoc ? iw.encryption || _('None') : null,
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 9ab282c3ab..7b7fc0ffcf 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
@@ -376,6 +376,14 @@ meshfwd.rmempty = false
meshfwd.default = "1"
meshfwd:depends({mode="mesh"})
+mesh_rssi_th = s:taboption("advanced", Value, "mesh_rssi_threshold",
+ translate("RSSI threshold for joining"),
+ translate("0 = not using RSSI threshold, 1 = do not change driver default"))
+mesh_rssi_th.rmempty = false
+mesh_rssi_th.default = "0"
+mesh_rssi_th.datatype = "range(-255,1)"
+mesh_rssi_th:depends({mode="mesh"})
+
ssid = s:taboption("general", Value, "ssid", translate("<abbr title=\"Extended Service Set Identifier\">ESSID</abbr>"))
ssid.datatype = "maxlength(32)"
ssid:depends({mode="ap"})
@@ -388,6 +396,7 @@ ssid:depends({mode="sta-wds"})
ssid:depends({mode="wds"})
bssid = s:taboption("general", Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"))
+bssid.datatype = "macaddr"
network = s:taboption("general", Value, "network", translate("Network"),
translate("Choose the network(s) you want to attach to this wireless interface or " ..
@@ -665,22 +674,44 @@ if hwtype == "mac80211" or hwtype == "prism2" then
local has_ap_eap = (os.execute("hostapd -veap >/dev/null 2>/dev/null") == 0)
local has_sta_eap = (os.execute("wpa_supplicant -veap >/dev/null 2>/dev/null") == 0)
+ -- Probe SAE support
+ local has_ap_sae = (os.execute("hostapd -vsae >/dev/null 2>/dev/null") == 0)
+ local has_sta_sae = (os.execute("wpa_supplicant -vsae >/dev/null 2>/dev/null") == 0)
+
+ -- Probe OWE support
+ local has_ap_owe = (os.execute("hostapd -vowe >/dev/null 2>/dev/null") == 0)
+ local has_sta_owe = (os.execute("wpa_supplicant -vowe >/dev/null 2>/dev/null") == 0)
+
if hostapd and supplicant then
encr:value("psk", "WPA-PSK", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk2", "WPA2-PSK", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk-mixed", "WPA-PSK/WPA2-PSK Mixed Mode", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
+ if has_ap_sae and has_sta_sae then
+ encr:value("sae", "WPA3-SAE", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"}, {mode="mesh"})
+ encr:value("sae-mixed", "WPA2-PSK/WPA3-SAE Mixed Mode", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
+ end
if has_ap_eap and has_sta_eap then
encr:value("wpa", "WPA-EAP", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"})
encr:value("wpa2", "WPA2-EAP", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"})
end
+ if has_ap_owe and has_sta_owe then
+ encr:value("owe", "OWE", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
+ end
elseif hostapd and not supplicant then
encr:value("psk", "WPA-PSK", {mode="ap"}, {mode="ap-wds"})
encr:value("psk2", "WPA2-PSK", {mode="ap"}, {mode="ap-wds"})
encr:value("psk-mixed", "WPA-PSK/WPA2-PSK Mixed Mode", {mode="ap"}, {mode="ap-wds"})
+ if has_ap_sae then
+ encr:value("sae", "WPA3-SAE", {mode="ap"}, {mode="ap-wds"})
+ encr:value("sae-mixed", "WPA2-PSK/WPA3-SAE Mixed Mode", {mode="ap"}, {mode="ap-wds"})
+ end
if has_ap_eap then
encr:value("wpa", "WPA-EAP", {mode="ap"}, {mode="ap-wds"})
encr:value("wpa2", "WPA2-EAP", {mode="ap"}, {mode="ap-wds"})
end
+ if has_ap_owe then
+ encr:value("owe", "OWE", {mode="ap"}, {mode="ap-wds"})
+ end
encr.description = translate(
"WPA-Encryption requires wpa_supplicant (for client mode) or hostapd (for AP " ..
"and ad-hoc mode) to be installed."
@@ -689,10 +720,17 @@ if hwtype == "mac80211" or hwtype == "prism2" then
encr:value("psk", "WPA-PSK", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk2", "WPA2-PSK", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk-mixed", "WPA-PSK/WPA2-PSK Mixed Mode", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
+ if has_sta_sae then
+ encr:value("sae", "WPA3-SAE", {mode="sta"}, {mode="sta-wds"}, {mode="mesh"})
+ encr:value("sae-mixed", "WPA2-PSK/WPA3-SAE Mixed Mode", {mode="sta"}, {mode="sta-wds"})
+ end
if has_sta_eap then
encr:value("wpa", "WPA-EAP", {mode="sta"}, {mode="sta-wds"})
encr:value("wpa2", "WPA2-EAP", {mode="sta"}, {mode="sta-wds"})
end
+ if has_sta_owe then
+ encr:value("owe", "OWE", {mode="sta"}, {mode="sta-wds"})
+ end
encr.description = translate(
"WPA-Encryption requires wpa_supplicant (for client mode) or hostapd (for AP " ..
"and ad-hoc mode) to be installed."
@@ -786,6 +824,8 @@ wpakey:depends("encryption", "psk")
wpakey:depends("encryption", "psk2")
wpakey:depends("encryption", "psk+psk2")
wpakey:depends("encryption", "psk-mixed")
+wpakey:depends("encryption", "sae")
+wpakey:depends("encryption", "sae-mixed")
wpakey.datatype = "wpakey"
wpakey.rmempty = true
wpakey.password = true
@@ -858,9 +898,13 @@ if hwtype == "mac80211" or hwtype == "prism2" then
ieee80211r:depends({mode="ap", encryption="psk"})
ieee80211r:depends({mode="ap", encryption="psk2"})
ieee80211r:depends({mode="ap", encryption="psk-mixed"})
+ ieee80211r:depends({mode="ap", encryption="sae"})
+ ieee80211r:depends({mode="ap", encryption="sae-mixed"})
ieee80211r:depends({mode="ap-wds", encryption="psk"})
ieee80211r:depends({mode="ap-wds", encryption="psk2"})
ieee80211r:depends({mode="ap-wds", encryption="psk-mixed"})
+ ieee80211r:depends({mode="ap-wds", encryption="sae"})
+ ieee80211r:depends({mode="ap-wds", encryption="sae-mixed"})
end
ieee80211r.rmempty = true
@@ -1087,8 +1131,8 @@ if hwtype == "mac80211" 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: " ..
- "ath9k and ath10k, in LEDE also mwlwifi and mt76)"))
+ "and support from the wifi driver <br />(as of Jan 2019: " ..
+ "ath9k, ath10k, mwlwifi and mt76)"))
ieee80211w.default = ""
ieee80211w.rmempty = true
ieee80211w:value("", translate("Disabled (default)"))
@@ -1098,8 +1142,14 @@ if hwtype == "mac80211" then
ieee80211w:depends({mode="ap-wds", encryption="wpa2"})
ieee80211w:depends({mode="ap", encryption="psk2"})
ieee80211w:depends({mode="ap", encryption="psk-mixed"})
+ ieee80211w:depends({mode="ap", encryption="sae"})
+ ieee80211w:depends({mode="ap", encryption="sae-mixed"})
+ ieee80211w:depends({mode="ap", encryption="owe"})
ieee80211w:depends({mode="ap-wds", encryption="psk2"})
ieee80211w:depends({mode="ap-wds", encryption="psk-mixed"})
+ ieee80211w:depends({mode="ap-wds", encryption="sae"})
+ ieee80211w:depends({mode="ap-wds", encryption="sae-mixed"})
+ ieee80211w:depends({mode="ap-wds", encryption="owe"})
max_timeout = s:taboption("encryption", Value, "ieee80211w_max_timeout",
translate("802.11w maximum timeout"),
@@ -1127,9 +1177,13 @@ if hwtype == "mac80211" then
key_retries:depends({mode="ap", encryption="wpa2"})
key_retries:depends({mode="ap", encryption="psk2"})
key_retries:depends({mode="ap", encryption="psk-mixed"})
+ key_retries:depends({mode="ap", encryption="sae"})
+ key_retries:depends({mode="ap", encryption="sae-mixed"})
key_retries:depends({mode="ap-wds", encryption="wpa2"})
key_retries:depends({mode="ap-wds", encryption="psk2"})
key_retries:depends({mode="ap-wds", encryption="psk-mixed"})
+ key_retries:depends({mode="ap-wds", encryption="sae"})
+ key_retries:depends({mode="ap-wds", encryption="sae-mixed"})
end
if hwtype == "mac80211" or hwtype == "prism2" then