[PATCH] Passively set drv->ssid on connect/associate event
Jouni Malinen
j at w1.fi
Mon Dec 5 03:32:14 PST 2016
On Mon, Oct 24, 2016 at 10:59:52AM -0700, Ningyuan Wang wrote:
> On a connect nl80211 event, wpa_supplicant uses wpa_driver_
> nl80211_get_ssid() to fetch the current associated ssid to
> compare to existing configurations.
> However, wpa_driver_nl80211_get_ssid() uses drv->ssid, which is
> a cached value. It is set when we explicitly initial a connect
> request using wpa_supplicant. if the association was initiated
> outside of wpa_supplicant, we need another way to populate drv->ssid.
> This patch sets drv->ssid passively on connect/associate nl80211
> events.
Thanks, applied with some cleanup and rebasing.
> +#ifdef ANDROID
> + // When this associate event was initiated outside of wpa_supplicant,
> + // drv->ssid needs to be set here to satisfy later checking.
> + u8 ssid_len = nl80211_get_assoc_ssid(drv, drv->ssid);
> + if (ssid_len) drv->ssid_len = ssid_len;
> +#endif /* ANDROID */
In particular, I removed the #ifdef ANDROID restriction here since this
need to update drv->ssid is in no way specific to Android.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list