still trouble with reassoc

Holger Schurig holgerschurig at googlemail.com
Mon Nov 9 09:44:23 EST 2009


Okay, I changed wpa_supplicant a bit:

In events.c, wpa_supplicant_connect(), I changed the code like this:

	if (wpa_s->reassociate ||
	    (os_memcmp(selected->bssid, wpa_s->bssid, ETH_ALEN) != 0 &&
	     (wpa_s->wpa_state != WPA_ASSOCIATING ||
	      os_memcmp(selected->bssid, wpa_s->pending_bssid, ETH_ALEN) !=
	      0))) {
		if (wpa_supplicant_scard_init(wpa_s, ssid)) {
			wpa_supplicant_req_new_scan(wpa_s, 10);
			return;
		}
+		wpa_supplicant_deauthenticate(wpa_s,
+					      WLAN_REASON_DEAUTH_LEAVING);
		wpa_supplicant_associate(wpa_s, selected, ssid);
	} else {

But I'm not sure if this is the right position. Maybe
wpa_supplicant_associate() should do it based on wpa_s->state?

> --
> http://www.holgerschurig.de


More information about the HostAP mailing list