[PATCH RFC] wpa_s: use proper channel to send SAE AUTH frames
sergey.matyukevich.os at quantenna.com
Mon Apr 15 02:21:57 PDT 2019
> > SAE connection fails if CSA occured during any previous connection
> > since the start of current wpa_supplicant runtime.
> > The root cause is as follows. If STA channel changes due to CSA,
> > then bss->freq is updated in mlme_event_ch_switch. However this
> > value is not cleared between connections. So later it will be
> > used during SAE AUTH frame exchange.
> I'd guess this is referring to use of SAE authentication offload or some
> other special case since I don't see how bss->freq would have an impact
> of SAE authentication when using NL80211_CMD_AUTHENTICATE.
You are right. I apologize for misleading commit message. The issue
affects only SAE authentication offload, e.g. FullMAC drivers that
implement only cfg80211 connect command.
> > By the way, it looks like cleaning up bss->freq field would be a better
> > option. But so far I could not figure out a good place for this kind of
> > cleanup. Any suggestions are welcome.
> Yeah, I think I'll rather do that and also update bss->freq in station
> mode after association. Setting drv->first_bss->freq to 0 in
> nl80211_mark_disconnect() is likely going to handle most, if not all,
> the needed cases. If that does not fix this for your case, please share
> a wpa_supplicant debug log showing the exact sequence in which bss->freq
> ends up getting used to select incorrect channel for SAE authentication
This works just fine, the following fixup also resolves the problem:
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 60934fb..7b3281f 100644
@@ -307,6 +307,7 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv)
os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN);
drv->associated = 0;
os_memset(drv->bssid, 0, ETH_ALEN);
+ drv->first_bss->freq = 0;
More information about the Hostap