aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_list.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-02-06 13:22:06 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-06 13:22:06 (GMT)
commit334ec001bbd31c5bc83d6593e58dfbbf6b8785a2 (patch)
treeeb705b363e47ab76aa8b05f9d59cef93f7b3d6a6 /src/ap/ap_list.c
parent72e7fb3fd9f8dd21a2da402e1cdca26c5931c108 (diff)
downloadhostap-334ec001bbd31c5bc83d6593e58dfbbf6b8785a2.zip
hostap-334ec001bbd31c5bc83d6593e58dfbbf6b8785a2.tar.gz
hostap-334ec001bbd31c5bc83d6593e58dfbbf6b8785a2.tar.bz2
Fix Beacon RX before AP setup completion
It is possible for the driver to report Beacon RX prior to hostapd having completed AP mode setup, e.g., when changing country code. Beacon frame processing for OLBC was not prepared for this and could trigger segfault due to NULL pointer dereference. Fix this by ignoring the Beacon frames received prior to completing interface setup when determining OLBC updates. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ap_list.c')
-rw-r--r--src/ap/ap_list.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/ap_list.c b/src/ap/ap_list.c
index f9b1540..287d520 100644
--- a/src/ap/ap_list.c
+++ b/src/ap/ap_list.c
@@ -32,7 +32,8 @@ static int ap_list_beacon_olbc(struct hostapd_iface *iface, struct ap_info *ap)
{
int i;
- if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G ||
+ if (iface->current_mode == NULL ||
+ iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G ||
iface->conf->channel != ap->channel)
return 0;