From patchwork Mon Nov 21 07:40:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hedlund X-Patchwork-Id: 126711 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id EB869B6F9C for ; Mon, 21 Nov 2011 18:40:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3E6EA9C153; Mon, 21 Nov 2011 02:40:32 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O4Y7ZSFmgGRB; Mon, 21 Nov 2011 02:40:32 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 851049C156; Mon, 21 Nov 2011 02:40:26 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id ED3BB9C156 for ; Mon, 21 Nov 2011 02:40:24 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1NLhVswNJMZG for ; Mon, 21 Nov 2011 02:40:20 -0500 (EST) Received: from nanoradio.com (static-213-115-134-196.sme.bredbandsbolaget.se [213.115.134.196]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E4CB99C153 for ; Mon, 21 Nov 2011 02:40:19 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: [PATCH] Move setting of macaddr Date: Mon, 21 Nov 2011 08:40:17 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] Move setting of macaddr Thread-Index: AcyoINBld2bysbLMSsOfQ4LjvbMQUg== From: "Johan Hedlund" To: X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- 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;