aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-09-05 09:47:16 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-05 14:36:36 (GMT)
commitbdd45f86917e4b2f5575bb0a10b477a893bdb8d6 (patch)
tree354e6ce2003bcba794795fc0f2913b28e60aa0e1
parent970dd136a0d06a3e3e1a832dcc4b39ad97147ea3 (diff)
downloadhostap-07-bdd45f86917e4b2f5575bb0a10b477a893bdb8d6.zip
hostap-07-bdd45f86917e4b2f5575bb0a10b477a893bdb8d6.tar.gz
hostap-07-bdd45f86917e4b2f5575bb0a10b477a893bdb8d6.tar.bz2
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). (cherry picked from commit 8421e95c712e10fca768ee8bfe3d334cba6a9d12)
-rw-r--r--src/ap/ieee802_11_ht.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index b193ee0..7541b83 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -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;