aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-04-15 18:11:46 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-15 18:11:46 (GMT)
commit2f68051395593f732057b7ae8b0df5281dfd085c (patch)
tree7574afa9ab3ba690e5b9da5096093949b96b9006 /hostapd
parente6ac47b47db70c77b2631b7669165a01f4de2ca8 (diff)
downloadhostap-2f68051395593f732057b7ae8b0df5281dfd085c.zip
hostap-2f68051395593f732057b7ae8b0df5281dfd085c.tar.gz
hostap-2f68051395593f732057b7ae8b0df5281dfd085c.tar.bz2
Fix hostapd BSS_TM_REQ handling of bss_term parameter
The TSF field in BSS termination information was not cleared correctly. It was supposed to be cleared to all zeros, but the memset call did not point at offset 2; instead, it cleared it with 0x02 octets and also cleared the subelement header with 0x02 octets while leaving two last octets uninitialized. Fixes: a30dff07fb18 ("Add BSS_TM_REQ command to send BSS Transition Management Request") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/ctrl_iface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 78e52a6..e4b16e6 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -883,7 +883,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
/* TODO: TSF configurable/learnable */
bss_term_dur[0] = 4; /* Subelement ID */
bss_term_dur[1] = 10; /* Length */
- os_memset(bss_term_dur, 2, 8);
+ os_memset(&bss_term_dur[2], 0, 8);
end = os_strchr(pos, ',');
if (end == NULL) {
wpa_printf(MSG_DEBUG, "Invalid bss_term data");