From: Hari Chandrakanthan Date: Tue, 21 Mar 2023 15:17:27 +0000 (+0530) Subject: Set interface state as inactive if mesh bringup fails X-Git-Tag: hostap_2_11~1218 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5349a45d3277b350fdd948b35c1ed881e54aa6ed;p=thirdparty%2Fhostap.git 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 --- 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; }