WPS: Do not proxy Probe Request frames to foreign SSIDs to Registrars
We must only indicate stations that are either probing the wildcard SSID or our own SSID.
This commit is contained in:
parent
a63063b4f6
commit
9776475fb9
1 changed files with 13 additions and 0 deletions
|
@ -782,10 +782,23 @@ static int hostapd_wps_probe_req_rx(void *ctx, const u8 *addr,
|
||||||
{
|
{
|
||||||
struct hostapd_data *hapd = ctx;
|
struct hostapd_data *hapd = ctx;
|
||||||
struct wpabuf *wps_ie;
|
struct wpabuf *wps_ie;
|
||||||
|
struct ieee802_11_elems elems;
|
||||||
|
|
||||||
if (hapd->wps == NULL)
|
if (hapd->wps == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (ieee802_11_parse_elems(ie, ie_len, &elems, 0) == ParseFailed) {
|
||||||
|
wpa_printf(MSG_DEBUG, "WPS: Could not parse ProbeReq from "
|
||||||
|
MACSTR, MAC2STR(addr));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (elems.ssid && elems.ssid_len > 0 &&
|
||||||
|
(elems.ssid_len != hapd->conf->ssid.ssid_len ||
|
||||||
|
os_memcmp(elems.ssid, hapd->conf->ssid.ssid, elems.ssid_len) !=
|
||||||
|
0))
|
||||||
|
return 0; /* Not for us */
|
||||||
|
|
||||||
wps_ie = ieee802_11_vendor_ie_concat(ie, ie_len, WPS_DEV_OUI_WFA);
|
wps_ie = ieee802_11_vendor_ie_concat(ie, ie_len, WPS_DEV_OUI_WFA);
|
||||||
if (wps_ie == NULL)
|
if (wps_ie == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue