diff --git a/src/wps/wps.h b/src/wps/wps.h index 1b0fcea08..a1b7ae71d 100644 --- a/src/wps/wps.h +++ b/src/wps/wps.h @@ -763,7 +763,8 @@ u16 wps_config_methods_str2bin(const char *str); #ifdef CONFIG_WPS_STRICT int wps_validate_beacon(const struct wpabuf *wps_ie); -int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe); +int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe, + const u8 *addr); int wps_validate_probe_req(const struct wpabuf *wps_ie); int wps_validate_assoc_req(const struct wpabuf *wps_ie); int wps_validate_assoc_resp(const struct wpabuf *wps_ie); @@ -791,7 +792,7 @@ static inline int wps_validate_beacon(const struct wpabuf *wps_ie){ } static inline int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, - int probe) + int probe, const u8 *addr) { return 0; } diff --git a/src/wps/wps_validate.c b/src/wps/wps_validate.c index 55d3677e9..7888c1b9d 100644 --- a/src/wps/wps_validate.c +++ b/src/wps/wps_validate.c @@ -1122,7 +1122,8 @@ int wps_validate_beacon(const struct wpabuf *wps_ie) } -int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe) +int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe, + const u8 *addr) { struct wps_parse_attr attr; int wps2, sel_reg; @@ -1166,7 +1167,8 @@ int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe) wps_validate_authorized_macs(attr.authorized_macs, attr.authorized_macs_len, 0)) { wpa_printf(MSG_INFO, "WPS-STRICT: Invalid %sProbe Response " - "frame", probe ? "" : "Beacon/"); + "frame from " MACSTR, probe ? "" : "Beacon/", + MAC2STR(addr)); #ifdef WPS_STRICT_WPS2 if (wps2) return -1; diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index 8f4ed511d..a324b46d2 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -1117,7 +1117,7 @@ int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s, #ifdef CONFIG_WPS_STRICT if (wps_ie) { if (wps_validate_beacon_probe_resp(wps_ie, bss->beacon_ie_len > - 0) < 0) + 0, bss->bssid) < 0) ret = 0; if (bss->beacon_ie_len) { struct wpabuf *bcn_wps;