diff options
author | Jouni Malinen <j@w1.fi> | 2012-01-08 09:35:33 -0800 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-01-08 09:35:33 -0800 |
commit | 8017b538e70f2c27feefb8746ae1f876d2c42f37 (patch) | |
tree | 6ebcd3c8b32eb2b59cec44f135003c6ef10dad88 /src/ap/beacon.c | |
parent | 6d92fa6e9209172ae6f4aec5fb4d84ed5e27edb4 (diff) | |
download | external_wpa_supplicant_8_ti-8017b538e70f2c27feefb8746ae1f876d2c42f37.zip external_wpa_supplicant_8_ti-8017b538e70f2c27feefb8746ae1f876d2c42f37.tar.gz external_wpa_supplicant_8_ti-8017b538e70f2c27feefb8746ae1f876d2c42f37.tar.bz2 |
P2P: Use Device ID attribute to filter Probe Request frames as GO
The Device ID attribute was already used in Listen state, but it was
ignored in GO role. Verify that there is a match with Device ID in
GO rule, too, before replying to the Probe Request frame.
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/beacon.c')
-rw-r--r-- | src/ap/beacon.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 4d8b277..4ea8684 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -343,6 +343,18 @@ void handle_probe_req(struct hostapd_data *hapd, } wpabuf_free(wps); } + + if (hapd->p2p && elems.p2p) { + struct wpabuf *p2p; + p2p = ieee802_11_vendor_ie_concat(ie, ie_len, P2P_IE_VENDOR_TYPE); + if (p2p && !p2p_group_match_dev_id(hapd->p2p_group, p2p)) { + wpa_printf(MSG_MSGDUMP, "P2P: Ignore Probe Request " + "due to mismatch with Device ID"); + wpabuf_free(p2p); + return; + } + wpabuf_free(p2p); + } #endif /* CONFIG_P2P */ if (hapd->conf->ignore_broadcast_ssid && elems.ssid_len == 0) { |