diff options
author | Hari Chandrakanthan <quic_haric@quicinc.com> | 2023-03-21 20:47:27 +0530 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2023-03-29 18:09:06 +0300 |
commit | 5349a45d3277b350fdd948b35c1ed881e54aa6ed (patch) | |
tree | 8edcca3f4a8a9119e757b619f5aa2274d262f7f3 | |
parent | a4af7962482eedbb674ad3ceb0c7caba0a7ee39f (diff) | |
download | hostap-5349a45d3277b350fdd948b35c1ed881e54aa6ed.tar.gz |
Set interface state as inactive if mesh bringup fails
The STATUS command showed the interface state as SCANNING even if mesh
bringup fails. This incorrect interface status can mislead
scripts/applications that rely on interface status to bring up different
type of virtual interfaces (AP/MESH) on a single radio.
Fix this by setting the interface status as INACTIVE if mesh bringup
fails.
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
-rw-r--r-- | wpa_supplicant/wpa_supplicant.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 1de6fa036..d0e4b7b52 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2515,6 +2515,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, if (bss) ssid->frequency = bss->freq; if (wpa_supplicant_join_mesh(wpa_s, ssid) < 0) { + wpa_supplicant_set_state(wpa_s, WPA_INACTIVE); wpa_msg(wpa_s, MSG_ERROR, "Could not join mesh"); return; } |