aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-20 09:46:04 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-20 15:37:53 (GMT)
commitf7648c8679b35916e0d94a2d36d787de90147838 (patch)
treeb27aebb733aedba0cd1d7539717d77d5972c0f9d /wpa_supplicant/p2p_supplicant.c
parent7f46ad9ee56e814eb06445d4eb5f93260a757528 (diff)
downloadhostap-f7648c8679b35916e0d94a2d36d787de90147838.zip
hostap-f7648c8679b35916e0d94a2d36d787de90147838.tar.gz
hostap-f7648c8679b35916e0d94a2d36d787de90147838.tar.bz2
P2P: Advertise IP Address Allocation only if it is enabled on GO
This group capability bit was previously added unconditionally which could result in the P2P Client assuming the functionality is available even though the GO would always reject the request (not reply to it with an assigned IP address) during the 4-way handshake. Fix this by advertising the capability only if the GO configuration allow IP address assignment to be completed. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 5ff758f..67ca67c 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6328,6 +6328,8 @@ struct p2p_group * wpas_p2p_group_init(struct wpa_supplicant *wpa_s,
cfg->cb_ctx = wpa_s;
cfg->ie_update = wpas_p2p_ie_update;
cfg->idle_update = wpas_p2p_idle_update;
+ cfg->ip_addr_alloc = WPA_GET_BE32(wpa_s->p2pdev->conf->ip_addr_start)
+ != 0;
group = p2p_group_init(wpa_s->global->p2p, cfg);
if (group == NULL)