Parcourir la source

Ignore disassociation event in wpa_supplicant AP mode

If the driver was associated in station mode just before the AP mode was
started, the station mode disassociation event may end up getting
delivered to wpa_supplicant only after the AP mode has been started.
This can result in unexpected attempt to reassociate back to the network
that was previously used in station mode. Avoid this by ignoring the
disassociation event.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen il y a 13 ans
Parent
commit
4551dd9060
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      wpa_supplicant/events.c

+ 10 - 0
wpa_supplicant/events.c

@@ -2039,6 +2039,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 					       data->disassoc_info.addr);
 			break;
 		}
+		if (wpa_s->ap_iface) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "Ignore disassoc event in "
+				"AP mode");
+			break;
+		}
 #endif /* CONFIG_AP */
 		if (data) {
 			reason_code = data->disassoc_info.reason_code;
@@ -2088,6 +2093,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 					       data->deauth_info.addr);
 			break;
 		}
+		if (wpa_s->ap_iface) {
+			wpa_dbg(wpa_s, MSG_DEBUG, "Ignore deauth event in "
+				"AP mode");
+			break;
+		}
 #endif /* CONFIG_AP */
 		wpa_supplicant_event_disassoc(wpa_s, reason_code);
 		break;