diff options
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r-- | wpa_supplicant/wnm_sta.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 22a21361ad8a..c14764963b78 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -451,6 +451,11 @@ static void wnm_parse_neighbor_report_elem(struct neighbor_report *rep, rep->preference_present = 1; break; case WNM_NEIGHBOR_BSS_TERMINATION_DURATION: + if (elen < 10) { + wpa_printf(MSG_DEBUG, + "WNM: Too short BSS termination duration"); + break; + } rep->bss_term_tsf = WPA_GET_LE64(pos); rep->bss_term_dur = WPA_GET_LE16(pos + 8); rep->bss_term_present = 1; @@ -920,9 +925,9 @@ static int wnm_nei_rep_add_bss(struct wpa_supplicant *wpa_s, if (ie && ie[1] >= 1) { vht_oper = (struct ieee80211_vht_operation *) (ie + 2); - if (vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_80MHZ || - vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_160MHZ || - vht_oper->vht_op_info_chwidth == VHT_CHANWIDTH_80P80MHZ) + if (vht_oper->vht_op_info_chwidth == CHANWIDTH_80MHZ || + vht_oper->vht_op_info_chwidth == CHANWIDTH_160MHZ || + vht_oper->vht_op_info_chwidth == CHANWIDTH_80P80MHZ) vht = vht_oper->vht_op_info_chwidth; } @@ -1366,6 +1371,9 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, const u8 *vendor; #endif /* CONFIG_MBO */ + if (wpa_s->conf->disable_btm) + return; + if (end - pos < 5) return; |