]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Set interface state as inactive if mesh bringup fails
authorHari Chandrakanthan <quic_haric@quicinc.com>
Tue, 21 Mar 2023 15:17:27 +0000 (20:47 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 29 Mar 2023 15:09:06 +0000 (18:09 +0300)
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>
wpa_supplicant/wpa_supplicant.c

index 1de6fa03622c8b67392114fd5772e4f4d4f16760..d0e4b7b5205c474aa9d7a37d9de0030f37d381e0 100644 (file)
@@ -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;
                }