From 19a1af88a54ea9265e2c03305259bb4aff5e8b26 Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Fri, 9 Aug 2019 17:19:37 +0530 Subject: [PATCH] wps: Relax the check on older config methods in case of WPS2.0 Some APs incorrectly advertize newer WPS2.0 config method bits without setting bits for the corresponding older methods. This results in failures during 8-way handshake. Add a workaround to relax this check so that WPS handshake can proceed. --- components/wpa_supplicant/src/wps/wps_validate.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/components/wpa_supplicant/src/wps/wps_validate.c b/components/wpa_supplicant/src/wps/wps_validate.c index 34f0865b11..de0a46e7dd 100644 --- a/components/wpa_supplicant/src/wps/wps_validate.c +++ b/components/wpa_supplicant/src/wps/wps_validate.c @@ -96,23 +96,11 @@ static int wps_validate_response_type(const u8 *response_type, int mandatory) static int valid_config_methods(u16 val, int wps2) { if (wps2) { - if ((val & 0x6000) && !(val & WPS_CONFIG_DISPLAY)) { - wpa_printf(MSG_INFO, "WPS-STRICT: Physical/Virtual " - "Display flag without old Display flag " - "set"); - return 0; - } if (!(val & 0x6000) && (val & WPS_CONFIG_DISPLAY)) { wpa_printf(MSG_INFO, "WPS-STRICT: Display flag " "without Physical/Virtual Display flag"); return 0; } - if ((val & 0x0600) && !(val & WPS_CONFIG_PUSHBUTTON)) { - wpa_printf(MSG_INFO, "WPS-STRICT: Physical/Virtual " - "PushButton flag without old PushButton " - "flag set"); - return 0; - } if (!(val & 0x0600) && (val & WPS_CONFIG_PUSHBUTTON)) { wpa_printf(MSG_INFO, "WPS-STRICT: PushButton flag " "without Physical/Virtual PushButton flag"); -- 2.40.0