aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2013-11-04 10:09:05 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2013-11-04 10:09:05 -0800
commit3c53b910ed3265ce3ad1ab43bd4d92fb22d6ebeb (patch)
treed9189fe03547316c82a78ee6ddf558946a84ae34
parentf8ce1455046454f7cc361c92b6f7a356502f98c8 (diff)
parent2a8afe5604c0b9c3b5697a54866232849b990a54 (diff)
downloadandroid_external_wpa_supplicant_8-3c53b910ed3265ce3ad1ab43bd4d92fb22d6ebeb.tar.gz
android_external_wpa_supplicant_8-3c53b910ed3265ce3ad1ab43bd4d92fb22d6ebeb.tar.bz2
android_external_wpa_supplicant_8-3c53b910ed3265ce3ad1ab43bd4d92fb22d6ebeb.zip
Merge "WPS: Allow Device Password Id changes between PIN methods"
-rw-r--r--src/wps/wps_enrollee.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index 9a62fce8..ae17a278 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -852,6 +852,24 @@ static int wps_process_dev_pw_id(struct wps_data *wps, const u8 *dev_pw_id)
return 0;
}
+#ifdef CONFIG_P2P
+ if ((id == DEV_PW_DEFAULT &&
+ wps->dev_pw_id == DEV_PW_REGISTRAR_SPECIFIED) ||
+ (id == DEV_PW_REGISTRAR_SPECIFIED &&
+ wps->dev_pw_id == DEV_PW_DEFAULT)) {
+ /*
+ * Common P2P use cases indicate whether the PIN is from the
+ * client or GO using Device Password Id in M1/M2 in a way that
+ * does not look fully compliant with WSC specification. Anyway,
+ * this is deployed and needs to be allowed, so ignore changes
+ * between Registrar-Specified and Default PIN.
+ */
+ wpa_printf(MSG_DEBUG, "WPS: Allow PIN Device Password ID "
+ "change");
+ return 0;
+ }
+#endif /* CONFIG_P2P */
+
wpa_printf(MSG_DEBUG, "WPS: Registrar trying to change Device Password "
"ID from %u to %u", wps->dev_pw_id, id);