From: Jouni Malinen Date: Mon, 5 Jul 2010 22:37:47 +0000 (-0700) Subject: WPS: Add a workaround for OS X 10.6.3 and .4 (use PSK, not passphrase) X-Git-Tag: hostap-1-bp~1273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f1ce78bf78cecd7021385b04a4f55f22e76ab97;p=thirdparty%2Fhostap.git WPS: Add a workaround for OS X 10.6.3 and .4 (use PSK, not passphrase) 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. --- diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index 0c3bc9c48..81ddf3a2b 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -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; }