From: Jouni Malinen Date: Sat, 30 Aug 2008 15:25:44 +0000 (+0300) Subject: Copy previous BSSID into STA data only after full validation of the request X-Git-Tag: hostap_0_6_5~81 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=libeap.git;a=commitdiff_plain;h=1e858f69d9c4386467e57452c3ada245a00fd172 Copy previous BSSID into STA data only after full validation of the request --- diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c index 87d74c2..c07449f 100644 --- a/hostapd/ieee802_11.c +++ b/hostapd/ieee802_11.c @@ -1013,11 +1013,6 @@ static void handle_assoc(struct hostapd_data *hapd, goto fail; } - if (reassoc) { - os_memcpy(sta->previous_ap, mgmt->u.reassoc_req.current_ap, - ETH_ALEN); - } - sta->capability = capab_info; /* followed by SSID and Supported rates; and HT capabilities if 802.11n @@ -1298,6 +1293,11 @@ static void handle_assoc(struct hostapd_data *hapd, /* Station will be marked associated, after it acknowledges AssocResp */ + if (reassoc) { + os_memcpy(sta->previous_ap, mgmt->u.reassoc_req.current_ap, + ETH_ALEN); + } + if (sta->last_assoc_req) os_free(sta->last_assoc_req); sta->last_assoc_req = os_malloc(len);