WPS 2.0: Fix strict mode validation of UPnP MAC Address format

This was supposed to only reject the message from WPS 2.0 ER, not from
WPS 1.0 ER.
This commit is contained in:
Jouni Malinen 2010-07-22 13:29:52 -07:00 committed by Jouni Malinen
parent 42f50264c0
commit ac4dcaf7bf

View file

@ -532,7 +532,7 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
return UPNP_ARG_VALUE_INVALID;
}
}
#else /* CONFIG_WPS_STRICT */
#endif /* CONFIG_WPS_STRICT */
if (hwaddr_aton2(val, macaddr) > 0) {
/*
* At least some versions of Intel PROset seem to be
@ -540,13 +540,13 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
*/
wpa_printf(MSG_DEBUG, "WPS UPnP: Workaround - allow "
"incorrect MAC address format in "
"NewWLANEventMAC");
"NewWLANEventMAC: %s -> " MACSTR,
val, MAC2STR(macaddr));
} else {
wpabuf_free(msg);
os_free(val);
return UPNP_ARG_VALUE_INVALID;
}
#endif /* CONFIG_WPS_STRICT */
}
os_free(val);
if (ev_type == UPNP_WPS_WLANEVENT_TYPE_EAP) {