aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2016-02-29 12:29:59 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-03 15:09:26 (GMT)
commitf420577f3c2ea9be3012a5c5807e5f75e64a261b (patch)
tree27b0c5c4f56841b7767945e0ae4764c38bf0cbda /wpa_supplicant/wnm_sta.c
parent3c58df7ae7b7467e30f2aa47d2bbecc2d52abb21 (diff)
downloadhostap-f420577f3c2ea9be3012a5c5807e5f75e64a261b.zip
hostap-f420577f3c2ea9be3012a5c5807e5f75e64a261b.tar.gz
hostap-f420577f3c2ea9be3012a5c5807e5f75e64a261b.tar.bz2
WNM: Fix candidates count in BSS Transition Management Request
In BSS Transition Management Request frame, it is possible that vendor specific IEs are included after the candidate list. In this case the candidates count was incremented for each IE although the candidate list is already over which could result in adding all zeros candidates into the neighbor list. Fix that by incrementing the candidates count only for neighbor report elements. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 4da9124..b8f717e 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -1115,10 +1115,10 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
rep = &wpa_s->wnm_neighbor_report_elements[
wpa_s->wnm_num_neighbor_report];
wnm_parse_neighbor_report(wpa_s, pos, len, rep);
+ wpa_s->wnm_num_neighbor_report++;
}
pos += len;
- wpa_s->wnm_num_neighbor_report++;
}
wnm_sort_cand_list(wpa_s);
wnm_dump_cand_list(wpa_s);