aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-27 16:05:27 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-27 16:11:07 (GMT)
commit2cd0f6a429b38a3f06cd6d934d73a9076c735326 (patch)
treee3fb96a7ee144f2521e37e78ea4e54df05aa03bc /wpa_supplicant
parenta8a6a35fd6a3ab109f8acf8a6fb7eb846bd10644 (diff)
downloadhostap-2cd0f6a429b38a3f06cd6d934d73a9076c735326.zip
hostap-2cd0f6a429b38a3f06cd6d934d73a9076c735326.tar.gz
hostap-2cd0f6a429b38a3f06cd6d934d73a9076c735326.tar.bz2
WNM: Add Target BSSID into BSS Transition Management Response
P802.11-REVmc clarifies that the Target BSSID field is always present hen status code is zero, so match that requirement. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wnm_sta.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 540b138..1c6c715 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -533,6 +533,14 @@ static void wnm_send_bss_transition_mgmt_resp(
if (target_bssid) {
os_memcpy(pos, target_bssid, ETH_ALEN);
pos += ETH_ALEN;
+ } else if (status == WNM_BSS_TM_ACCEPT) {
+ /*
+ * P802.11-REVmc clarifies that the Target BSSID field is always
+ * present when status code is zero, so use a fake value here if
+ * no BSSID is yet known.
+ */
+ os_memset(pos, 0, ETH_ALEN);
+ pos += ETH_ALEN;
}
len = pos - (u8 *) &mgmt->u.action.category;
@@ -574,7 +582,7 @@ void wnm_scan_response(struct wpa_supplicant *wpa_s,
wnm_send_bss_transition_mgmt_resp(wpa_s,
wpa_s->wnm_dialog_token,
WNM_BSS_TM_ACCEPT,
- 0, NULL);
+ 0, bssid);
}
wpa_s->reassociate = 1;