diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-12-04 19:35:36 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-12-10 12:38:46 +0100 |
commit | a797f0e82a075fd78180c27692a1b404bedd38a8 (patch) | |
tree | f7f5a9d3dabc13d9aa0ee7bad9f74195d3cfa8d6 /package/network | |
parent | 4c0919839d77ca33a6305116e2ff67234fb07514 (diff) | |
download | upstream-a797f0e82a075fd78180c27692a1b404bedd38a8.tar.gz upstream-a797f0e82a075fd78180c27692a1b404bedd38a8.tar.bz2 upstream-a797f0e82a075fd78180c27692a1b404bedd38a8.zip |
hostapd: use wpa_supplicant for unencrypted mesh connections
It's more reliable than using iw
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/hostapd/files/hostapd.sh | 4 | ||||
-rw-r--r-- | package/network/services/hostapd/src/src/utils/build_features.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 79daa915ad..55cc766b58 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -1322,7 +1322,7 @@ wpa_supplicant_add_network() { } [ "$_w_mode" = "mesh" ] && { - json_get_vars mesh_id mesh_fwding mesh_rssi_threshold + json_get_vars mesh_id mesh_fwding mesh_rssi_threshold encryption [ -n "$mesh_id" ] && ssid="${mesh_id}" append network_data "mode=5" "$N$T" @@ -1330,7 +1330,7 @@ wpa_supplicant_add_network() { [ -n "$mesh_rssi_threshold" ] && append network_data "mesh_rssi_threshold=${mesh_rssi_threshold}" "$N$T" [ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" [ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T" - append wpa_key_mgmt "SAE" + [ "$encryption" = "none" -o -z "$encryption" ] || append wpa_key_mgmt "SAE" scan_ssid="" } diff --git a/package/network/services/hostapd/src/src/utils/build_features.h b/package/network/services/hostapd/src/src/utils/build_features.h index 642a35836e..138a799e75 100644 --- a/package/network/services/hostapd/src/src/utils/build_features.h +++ b/package/network/services/hostapd/src/src/utils/build_features.h @@ -59,6 +59,10 @@ static inline int has_feature(const char *feat) if (!strcmp(feat, "ocv")) return 1; #endif +#ifdef CONFIG_MESH + if (!strcmp(feat, "mesh")) + return 1; +#endif return 0; } |