On Fri, Nov 23, 2018 at 08:46:30PM +0530, Sarada Prasanna Garnayak wrote: > In case AP sends disassociate to sta wpa_supplicant generates a deauthenticate > event to clear driver state and also turns on the ignore_next_local_deauth flag > expecting to get a deauth event for a locally generated deauth. > However, no deauth or disconnect events are received, since sta is already > marked as disconnected. > AP will connect to AP2 (the new AP) but if connection to AP2 is lost deauth > event to wpa_supplicant will be ignored since the ignore_next_local_deauth > was never set to 0. So wpa_supplicant is unaware that station is disconnected > and does not initiate scan. > Fix: Set ignore_next_local_deauth flag to 0 upon connection Would you be able to share a wpa_supplicant debug log showing this case with and without this patch? These ignore_next_local_* are pretty inconvenient and easy to break, so I'd like to be sure there is clear understanding on what the issue is and how this fixes that. > src/drivers/driver_nl80211_event.c | 12 ++++++++++++ > diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c > @@ -248,6 +248,18 @@ static void mlme_event_assoc(struct wpa_driver_nl80211_data *drv, Doing this in mlme_event_assoc() sounds potentially viable since I'd hope the driver deauth/association event won't get reordered (while doing this earlier in connect flow would break the protection). > + if (drv->ignore_next_local_deauth == 1){ Please remove " == 1" to be consistent with coding style for boolean-like use. There should also be a space in "){" (i.e., ") {"). > + /* > + * In case the flag to ignore deauth event triggered by local > + * deauthentication was not reset (because kernel did not actually > + * send the deauth event) reset ignore_next_local_deauth flag. > + */ Is it understood why the kernel did not send the event in the case you are addressing? > + wpa_printf(MSG_DEBUG, > + "nl80211: Resetting flag that prevents raising deauth" > + "event triggered by local deauth"); That message is missing a space between "deauth" and "event". In addition, please do not split strings to two lines even if that goes beyond 80 characters line (yes, I know that there are multiple examples of such splitting in hostap.git, but that should not be done for new code). -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap