From: Jouni Malinen Date: Fri, 11 Jun 2010 05:36:34 +0000 (-0700) Subject: WPS: Do not proxy Probe Request frames to foreign SSIDs to Registrars X-Git-Tag: hostap-1-bp~1281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9776475fb9aff3d9218a4c58804af7b6521a6963;p=thirdparty%2Fhostap.git 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. --- diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c index 04d3a85b3..902a65aca 100644 --- a/src/ap/wps_hostapd.c +++ b/src/ap/wps_hostapd.c @@ -782,10 +782,23 @@ static int hostapd_wps_probe_req_rx(void *ctx, const u8 *addr, { struct hostapd_data *hapd = ctx; struct wpabuf *wps_ie; + struct ieee802_11_elems elems; if (hapd->wps == NULL) 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); if (wps_ie == NULL) return 0;