]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Add a workaround for OS X 10.6.3 and .4 (use PSK, not passphrase)
authorJouni Malinen <j@w1.fi>
Mon, 5 Jul 2010 22:37:47 +0000 (15:37 -0700)
committerJouni Malinen <j@w1.fi>
Mon, 5 Jul 2010 22:37:47 +0000 (15:37 -0700)
It looks like 10.6.3 and 10.6.4 do not like to receive Network Key
with WPA passphrase while PSK format still works. Use peer information
from M1 to figure out whether the Enrollee is likely to be OS X and
if so, force PSK format to be used for Network Key.

src/wps/wps_registrar.c

index 0c3bc9c48955443756e5c9a56f5032f8bde2e7f1..81ddf3a2b57b18e6b25bee6aa4ac17f962c6f805 100644 (file)
@@ -2115,6 +2115,23 @@ static enum wps_process_res wps_process_m1(struct wps_data *wps,
                wps->pbc = 1;
        }
 
+#ifdef WPS_WORKAROUNDS
+       /*
+        * It looks like Mac OS X 10.6.3 and 10.6.4 do not like Network Key in
+        * passphrase format. To avoid interop issues, force PSK format to be
+        * used.
+        */
+       if (!wps->use_psk_key &&
+           wps->peer_dev.manufacturer &&
+           os_strncmp(wps->peer_dev.manufacturer, "Apple ", 6) == 0 &&
+           wps->peer_dev.model_name &&
+           os_strcmp(wps->peer_dev.model_name, "AirPort") == 0) {
+               wpa_printf(MSG_DEBUG, "WPS: Workaround - Force Network Key in "
+                          "PSK format");
+               wps->use_psk_key = 1;
+       }
+#endif /* WPS_WORKAROUNDS */
+
        wps->state = SEND_M2;
        return WPS_CONTINUE;
 }