]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Add workaround for missing Network Key attribute
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 11 Jun 2010 18:29:10 +0000 (11:29 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 11 Jun 2010 18:29:10 +0000 (11:29 -0700)
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.

src/wps/wps_attr_process.c

index 7c84ca98d2e3eb7baa97883dec446b9a56e930d2..4751bbce823224f4f4b921320de7f8150f15d539 100644 (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;
        }