Do not add own BSS in neighbor report with invalid op_class/channel
Verify that ieee80211_freq_to_channel_ext() succeeds before adding the own BSS in the neighbor report. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
aeff0645d2
commit
f56877414c
1 changed files with 6 additions and 4 deletions
|
@ -1603,10 +1603,12 @@ static void hostapd_set_own_neighbor_report(struct hostapd_data *hapd)
|
||||||
|
|
||||||
/* TODO: Set NEI_REP_BSSID_INFO_MOBILITY_DOMAIN if MDE is set */
|
/* TODO: Set NEI_REP_BSSID_INFO_MOBILITY_DOMAIN if MDE is set */
|
||||||
|
|
||||||
ieee80211_freq_to_channel_ext(hapd->iface->freq,
|
if (ieee80211_freq_to_channel_ext(hapd->iface->freq,
|
||||||
hapd->iconf->secondary_channel,
|
hapd->iconf->secondary_channel,
|
||||||
hapd->iconf->vht_oper_chwidth,
|
hapd->iconf->vht_oper_chwidth,
|
||||||
&op_class, &channel);
|
&op_class, &channel) ==
|
||||||
|
NUM_HOSTAPD_MODES)
|
||||||
|
return;
|
||||||
width = hostapd_get_nr_chan_width(hapd, ht, vht);
|
width = hostapd_get_nr_chan_width(hapd, ht, vht);
|
||||||
if (vht) {
|
if (vht) {
|
||||||
center_freq1_idx = hapd->iconf->vht_oper_centr_freq_seg0_idx;
|
center_freq1_idx = hapd->iconf->vht_oper_centr_freq_seg0_idx;
|
||||||
|
|
Loading…
Reference in a new issue