mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-08-06 07:46:59 +02:00
wifi-scripts: set rsn_overriding for client mode interfaces
Unless HE/EHT is enabled, the client should not process the RSN override IE. This prevents picking up unsupported ciphers Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
640c3984e3
commit
adb1fce19b
@ -59,6 +59,11 @@ function setup_sta(data, config) {
|
|||||||
config.ieee80211w = 2;
|
config.ieee80211w = 2;
|
||||||
else if (config.auth_type in [ 'psk-sae' ])
|
else if (config.auth_type in [ 'psk-sae' ])
|
||||||
config.ieee80211w = 1;
|
config.ieee80211w = 1;
|
||||||
|
if ((wildcard(data.htmode, 'EHT*') || wildcard(data.htmode, 'HE*')) &&
|
||||||
|
config.rsn_override)
|
||||||
|
config.rsn_overriding = 1;
|
||||||
|
else
|
||||||
|
config.rsn_overriding = 0;
|
||||||
|
|
||||||
set_default(config, 'ieee80211r', 0);
|
set_default(config, 'ieee80211r', 0);
|
||||||
set_default(config, 'multi_ap', 0);
|
set_default(config, 'multi_ap', 0);
|
||||||
@ -159,7 +164,7 @@ function setup_sta(data, config) {
|
|||||||
|
|
||||||
network_append_string_vars(config, [ 'ssid' ]);
|
network_append_string_vars(config, [ 'ssid' ]);
|
||||||
network_append_vars(config, [
|
network_append_vars(config, [
|
||||||
'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
|
'rsn_overriding', 'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
|
||||||
'ocv', 'key_mgmt', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
|
'ocv', 'key_mgmt', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
|
||||||
'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
|
'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
|
||||||
'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
|
'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
|
||||||
|
@ -1316,7 +1316,7 @@ wpa_supplicant_add_network() {
|
|||||||
wireless_vif_parse_encryption
|
wireless_vif_parse_encryption
|
||||||
|
|
||||||
json_get_vars \
|
json_get_vars \
|
||||||
ssid bssid key \
|
ssid bssid key rsn_override \
|
||||||
mcast_rate \
|
mcast_rate \
|
||||||
ieee80211w ieee80211r fils ocv \
|
ieee80211w ieee80211r fils ocv \
|
||||||
multi_ap \
|
multi_ap \
|
||||||
@ -1324,6 +1324,8 @@ wpa_supplicant_add_network() {
|
|||||||
|
|
||||||
json_get_values basic_rate_list basic_rate
|
json_get_values basic_rate_list basic_rate
|
||||||
|
|
||||||
|
set_default rsn_override 1
|
||||||
|
|
||||||
case "$auth_type" in
|
case "$auth_type" in
|
||||||
sae|owe|eap2|eap192)
|
sae|owe|eap2|eap192)
|
||||||
set_default ieee80211w 2
|
set_default ieee80211w 2
|
||||||
@ -1374,6 +1376,12 @@ wpa_supplicant_add_network() {
|
|||||||
|
|
||||||
[ -n "$ocv" ] && append network_data "ocv=$ocv" "$N$T"
|
[ -n "$ocv" ] && append network_data "ocv=$ocv" "$N$T"
|
||||||
|
|
||||||
|
rsn_overriding=0
|
||||||
|
case "$htmode" in
|
||||||
|
EHT*|HE*) [ "$rsn_override" -gt 0 ] && rsn_overriding=1;;
|
||||||
|
esac
|
||||||
|
append network_data "rsn_overriding=$rsn_overriding" "$N$T"
|
||||||
|
|
||||||
case "$auth_type" in
|
case "$auth_type" in
|
||||||
none) ;;
|
none) ;;
|
||||||
owe)
|
owe)
|
||||||
|
@ -1015,7 +1015,7 @@ mac80211_setup_supplicant() {
|
|||||||
wpa_supplicant_prepare_interface "$ifname" nl80211 || return 1
|
wpa_supplicant_prepare_interface "$ifname" nl80211 || return 1
|
||||||
|
|
||||||
if [ "$mode" = "sta" ]; then
|
if [ "$mode" = "sta" ]; then
|
||||||
wpa_supplicant_add_network "$ifname"
|
wpa_supplicant_add_network "$ifname" "" "$htmode"
|
||||||
else
|
else
|
||||||
wpa_supplicant_add_network "$ifname" "$freq" "$htmode" "$hostapd_noscan"
|
wpa_supplicant_add_network "$ifname" "$freq" "$htmode" "$hostapd_noscan"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user