Fix segfault in hostapd_eid_ht_capabilities() with some drivers
This function is not really needed in case of drivers that build the HT IEs internally. However, since this can get called if ieee80211n=1 is set in hostapd.conf, we better not segfault even if the driver does not provide hw info (hapd->iface->current_mode == NULL).
This commit is contained in:
parent
b070460b1a
commit
8421e95c71
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
|
|||
struct ieee80211_ht_capabilities *cap;
|
||||
u8 *pos = eid;
|
||||
|
||||
if (!hapd->iconf->ieee80211n)
|
||||
if (!hapd->iconf->ieee80211n || !hapd->iface->current_mode)
|
||||
return eid;
|
||||
|
||||
*pos++ = WLAN_EID_HT_CAP;
|
||||
|
|
Loading…
Reference in a new issue