From: Johan Hedlund Date: Sat, 3 Dec 2011 11:02:57 +0000 (+0200) Subject: Update RSN supplicant MAC address on driver reinitialization X-Git-Tag: aosp-jb-start~208 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f98eb880eb6855d494c3dacf79e5344e9a8796b6;p=thirdparty%2Fhostap.git Update RSN supplicant MAC address on driver reinitialization I have a test case where I remove and insert another network adapter between two connections to AP. The interface get the same interface name but switches macadresses between the connections. When running WPA2 I got a failure in EAPOL negotiation and found out that the reason for this was that the supplicant did not update the MAC address in the correct place. --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 7f944b22c..0abcd8057 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2092,6 +2092,7 @@ int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s) wpa_dbg(wpa_s, MSG_DEBUG, "Own MAC address: " MACSTR, MAC2STR(wpa_s->own_addr)); + wpa_sm_set_own_addr(wpa_s->wpa, wpa_s->own_addr); if (wpa_s->bridge_ifname[0]) { wpa_dbg(wpa_s, MSG_DEBUG, "Receiving packets from bridge " @@ -2339,8 +2340,6 @@ next_driver: return -1; } - wpa_sm_set_own_addr(wpa_s->wpa, wpa_s->own_addr); - if (wpas_wps_init(wpa_s)) return -1;