WPS: Add BSSID to strict validation error messages
This makes it easier to figure out which AP is sending invalid Beacon or Probe Response frames.
This commit is contained in:
parent
e0369e3664
commit
ff28ccafd5
3 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue