3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

eap-gtc: Try to auth even if request not Password

There are some server implementations that send requests that are
not "Password" but still want us send password. This commit modify
the behavior to send a warning and still try to auth with password.

This makes me able to auth with server in my school which sends
"Enter Aruba Login".

wpa_supplicant does not check if it is "Password".
This commit is contained in:
Pinghao Wu 2019-12-12 09:23:01 +08:00 committed by Denis Kenzior
parent 0238ffb8d9
commit d510f332b6

View File

@ -56,11 +56,9 @@ static void eap_gtc_handle_request(struct eap_state *eap,
size_t secret_len = strlen(gtc->password); size_t secret_len = strlen(gtc->password);
uint8_t response[5 + secret_len]; uint8_t response[5 + secret_len];
if (len < 8) if (len < 8 || strncmp((const char *)pkt, "Password", 8))
goto error; l_warn("GTC request not understood, proceeding anyway: %.*s",
(int) len, (const char *) pkt);
if (strncmp((const char *)pkt, "Password", 8))
goto error;
memcpy(response + 5, gtc->password, secret_len); memcpy(response + 5, gtc->password, secret_len);
@ -69,10 +67,6 @@ static void eap_gtc_handle_request(struct eap_state *eap,
eap_method_success(eap); eap_method_success(eap);
return; return;
error:
l_error("invalid GTC request");
eap_method_error(eap);
} }
static int eap_gtc_check_settings(struct l_settings *settings, static int eap_gtc_check_settings(struct l_settings *settings,