aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-01-01 15:12:43 (GMT)
committerJouni Malinen <j@w1.fi>2016-01-01 15:12:43 (GMT)
commit4f6cd3f4262467d2d736f72fbf163e6338dda064 (patch)
tree906dee22a6a8deaef0051dce1931840feac61669 /src/ap/ieee802_11.c
parent92acb40a2b5386f880649d910311806265de2141 (diff)
downloadhostap-4f6cd3f4262467d2d736f72fbf163e6338dda064.zip
hostap-4f6cd3f4262467d2d736f72fbf163e6338dda064.tar.gz
hostap-4f6cd3f4262467d2d736f72fbf163e6338dda064.tar.bz2
Fix wpa_supplicant AP mode P2P IE handling if P2P is disabled
If P2P support is included in wpa_supplicant build (CONFIG_P2P=y), but P2P functionality is explicitly disabled (e.g., "P2P_SET disabled 1"), couple of AP management frame processing steps did not check against hapd->p2p_group being NULL and could end up dereferencing a NULL pointer if a Probe Request frame or (Re)Association Request frame was received with a P2P IE in it. Fix this by skipping these steps if hapd->p2p_group is NULL. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 54cd698..ec6f8a7 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1737,7 +1737,7 @@ static void send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
#endif /* CONFIG_WPS */
#ifdef CONFIG_P2P
- if (sta->p2p_ie) {
+ if (sta->p2p_ie && hapd->p2p_group) {
struct wpabuf *p2p_resp_ie;
enum p2p_status_code status;
switch (status_code) {