path: root/src
diff options
authorJouni Malinen <jouni@qca.qualcomm.com>2017-02-21 10:25:02 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-21 10:26:57 (GMT)
commitba9774bd76fa84106fa0865015df621489c62fd8 (patch)
tree5c50a790e5f7eb5ee0c8470d1343730ed67052da /src
parent7eace3787c0659bda640a4a7ea4ca6fe4b5c4e8f (diff)
FILS: Fix BSSID in reassociation case
The RSN supplicant implementation needs to be updated to use the new BSSID whenever doing FILS authentication. Previously, this was only done when notifying association and that was too late for the case of reassociation. Fix this by providing the new BSSID when calling fils_process_auth(). This makes PTK derivation use the correct BSSID. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src')
2 files changed, 6 insertions, 2 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 1349873..4210ea7 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -3328,7 +3328,8 @@ fail:
-int fils_process_auth(struct wpa_sm *sm, const u8 *data, size_t len)
+int fils_process_auth(struct wpa_sm *sm, const u8 *bssid, const u8 *data,
+ size_t len)
const u8 *pos, *end;
struct ieee802_11_elems elems;
@@ -3338,6 +3339,8 @@ int fils_process_auth(struct wpa_sm *sm, const u8 *data, size_t len)
size_t ick_len;
int res;
+ os_memcpy(sm->bssid, bssid, ETH_ALEN);
wpa_hexdump(MSG_DEBUG, "FILS: Authentication frame fields",
data, len);
pos = data;
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index bde8c78..98162c1 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -435,7 +435,8 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf);
void wpa_sm_set_test_assoc_ie(struct wpa_sm *sm, struct wpabuf *buf);
struct wpabuf * fils_build_auth(struct wpa_sm *sm);
-int fils_process_auth(struct wpa_sm *sm, const u8 *data, size_t len);
+int fils_process_auth(struct wpa_sm *sm, const u8 *bssid, const u8 *data,
+ size_t len);
struct wpabuf * fils_build_assoc_req(struct wpa_sm *sm, const u8 **kek,
size_t *kek_len, const u8 **snonce,
const u8 **anonce,