WPS: Add workaround for missing Network Key attribute

Some deployed implementations do not include the mandatory Network
Key attribute when a WPS Credential is for an open network. Allow
this to improve interoperability since the actual key value is not
really needed for open networks.
This commit is contained in:
Jouni Malinen 2010-06-11 11:29:10 -07:00 committed by Jouni Malinen
parent d902a9c1bc
commit 9abe9b2c35

View file

@ -177,6 +177,13 @@ static int wps_process_cred_network_key(struct wps_credential *cred,
if (key == NULL) {
wpa_printf(MSG_DEBUG, "WPS: Credential did not include "
"Network Key");
if (cred->auth_type == WPS_AUTH_OPEN &&
cred->encr_type == WPS_ENCR_NONE) {
wpa_printf(MSG_DEBUG, "WPS: Workaround - Allow "
"missing mandatory Network Key attribute "
"for open network");
return 0;
}
return -1;
}