diff mbox

Move setting of macaddr

Message ID C32533A4DE1DB24A8D5AB54407E0245C01131EB9@wepfs01.wep.se
State Accepted
Commit f98eb880eb6855d494c3dacf79e5344e9a8796b6
Headers show

Commit Message

Johan Hedlund Nov. 21, 2011, 7:40 a.m. UTC
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 macadress in correct place.

Best regards
Johan

Comments

Jouni Malinen Dec. 3, 2011, 11:24 a.m. UTC | #1
On Mon, Nov 21, 2011 at 08:40:17AM +0100, Johan Hedlund wrote:
> 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 macadress in correct place.

Thanks, applied.
diff mbox

Patch

--- wpa_supplicant-0.7.3-orig/wpa_supplicant/wpa_supplicant.c   2010-09-07 17:43:39.000000000 +0200
+++ wpa_supplicant-0.7.3-modified/wpa_supplicant/wpa_supplicant.c       2011-11-17 16:04:00.360556741 +0100
@@ -1813,6 +1813,7 @@ 

        wpa_printf(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_printf(MSG_DEBUG, "Receiving packets from bridge interface"
@@ -2043,7 +2044,6 @@ 
                return -1;
        }

-       wpa_sm_set_own_addr(wpa_s->wpa, wpa_s->own_addr);

        if (wpas_wps_init(wpa_s))
                return -1;