summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-06-16 17:01:27 +0200
committerGitHub <noreply@github.com>2020-06-16 17:01:27 +0200
commit84a0b6845f2096822a0fbc5fdaa66236928910da (patch)
tree9a150a306f8d282a1baef53ecf004cbf2e950cbd /modules
parentc6742ebdb8da56ec096670a2a3dde88d613e168e (diff)
parent6c56365b8210280b69bd2cb648d6d4121375ec09 (diff)
Merge pull request #4127 from blocktrron/luci-wep-features
luci-mod-network: query WEP support
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci2
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js20
2 files changed, 15 insertions, 7 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index 35b85d43d..7f0c0b226 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -219,7 +219,7 @@ local methods = {
rv.cabundle = fs.access("/etc/ssl/certs/ca-certificates.crt")
rv.relayd = fs.access("/usr/sbin/relayd")
- local wifi_features = { "eap", "11n", "11ac", "11r", "11w", "acs", "sae", "owe", "suiteb192" }
+ local wifi_features = { "eap", "11n", "11ac", "11r", "11w", "acs", "sae", "owe", "suiteb192", "wep" }
if fs.access("/usr/sbin/hostapd") then
rv.hostapd = { cli = fs.access("/usr/sbin/hostapd_cli") }
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 ca0cdf615..dc75c9509 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
@@ -1195,6 +1195,9 @@ return view.extend({
var has_ap_eap192 = L.hasSystemFeature('hostapd', 'suiteb192'),
has_sta_eap192 = L.hasSystemFeature('wpasupplicant', 'suiteb192');
+ // Probe WEP support
+ var has_ap_wep = L.hasSystemFeature('hostapd', 'wep'),
+ has_sta_wep = L.hasSystemFeature('wpasupplicant', 'wep');
if (has_hostapd || has_supplicant) {
crypto_modes.push(['psk2', 'WPA2-PSK', 35]);
@@ -1210,6 +1213,11 @@ return view.extend({
crypto_modes.push(['sae-mixed', 'WPA2-PSK/WPA3-SAE Mixed Mode', 30]);
}
+ if (has_ap_wep || has_sta_wep) {
+ crypto_modes.push(['wep-open', _('WEP Open System'), 11]);
+ crypto_modes.push(['wep-shared', _('WEP Shared Key'), 10]);
+ }
+
if (has_ap_eap || has_sta_eap) {
if (has_ap_eap192 || has_sta_eap192) {
crypto_modes.push(['wpa3', 'WPA3-EAP', 33]);
@@ -1226,8 +1234,8 @@ return view.extend({
encr.crypto_support = {
'ap': {
- 'wep-open': true,
- 'wep-shared': true,
+ 'wep-open': has_ap_wep || _('Requires hostapd with WEP support'),
+ 'wep-shared': has_ap_wep || _('Requires hostapd with WEP support'),
'psk': has_hostapd || _('Requires hostapd'),
'psk2': has_hostapd || _('Requires hostapd'),
'psk-mixed': has_hostapd || _('Requires hostapd'),
@@ -1240,8 +1248,8 @@ return view.extend({
'owe': has_ap_owe || _('Requires hostapd with OWE support')
},
'sta': {
- 'wep-open': true,
- 'wep-shared': true,
+ 'wep-open': has_sta_wep || _('Requires wpa-supplicant with WEP support'),
+ 'wep-shared': has_sta_wep || _('Requires wpa-supplicant with WEP support'),
'psk': has_supplicant || _('Requires wpa-supplicant'),
'psk2': has_supplicant || _('Requires wpa-supplicant'),
'psk-mixed': has_supplicant || _('Requires wpa-supplicant'),
@@ -1295,10 +1303,10 @@ return view.extend({
crypto_modes.push(['psk2', 'WPA2-PSK', 33]);
crypto_modes.push(['psk+psk2', 'WPA-PSK/WPA2-PSK Mixed Mode', 22]);
crypto_modes.push(['psk', 'WPA-PSK', 21]);
+ crypto_modes.push(['wep-open', _('WEP Open System'), 11]);
+ crypto_modes.push(['wep-shared', _('WEP Shared Key'), 10]);
}
- crypto_modes.push(['wep-open', _('WEP Open System'), 11]);
- crypto_modes.push(['wep-shared', _('WEP Shared Key'), 10]);
crypto_modes.push(['none', _('No Encryption'), 0]);
crypto_modes.sort(function(a, b) { return b[2] - a[2] });