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>
This commit is contained in:
parent
a8a6a35fd6
commit
2cd0f6a429
1 changed files with 9 additions and 1 deletions
|
@ -533,6 +533,14 @@ static void wnm_send_bss_transition_mgmt_resp(
|
||||||
if (target_bssid) {
|
if (target_bssid) {
|
||||||
os_memcpy(pos, target_bssid, ETH_ALEN);
|
os_memcpy(pos, target_bssid, ETH_ALEN);
|
||||||
pos += 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;
|
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,
|
wnm_send_bss_transition_mgmt_resp(wpa_s,
|
||||||
wpa_s->wnm_dialog_token,
|
wpa_s->wnm_dialog_token,
|
||||||
WNM_BSS_TM_ACCEPT,
|
WNM_BSS_TM_ACCEPT,
|
||||||
0, NULL);
|
0, bssid);
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_s->reassociate = 1;
|
wpa_s->reassociate = 1;
|
||||||
|
|
Loading…
Reference in a new issue