From: Jouni Malinen Date: Fri, 11 Jun 2010 18:29:10 +0000 (-0700) Subject: WPS: Add workaround for missing Network Key attribute X-Git-Tag: hostap-1-bp~1279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9abe9b2c358cc0bb7a2f924524dbc1a4211bd306;p=thirdparty%2Fhostap.git 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. --- diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c index 7c84ca98d..4751bbce8 100644 --- a/src/wps/wps_attr_process.c +++ b/src/wps/wps_attr_process.c @@ -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; }