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

peap: Adjust V0 not to close tunnel on Success of Phase2

Despite that PEAPv0 spec indicates that TLS tunnel needs to be torn
down after the transmission of a secure Result response, some servers
treat this TLS close alert as a failure. This patch changes the above
behavior to explicitly torn the tunnel only in the case of
authentication failure and leave it open after the success.
This commit is contained in:
Tim Kourt 2019-11-11 16:19:21 -08:00 committed by Denis Kenzior
parent bc17925f3a
commit 96a97dc959

View File

@ -182,14 +182,14 @@ static void eap_extensions_handle_request(struct eap_state *eap,
eap_peap_phase2_send_response(response, sizeof(response), eap);
eap_tls_common_tunnel_close(eap);
eap_discard_success_and_failure(eap, false);
eap_tls_common_set_completed(eap);
if (r != EAP_EXTENSIONS_RESULT_SUCCCESS) {
eap_tls_common_set_phase2_failed(eap);
eap_tls_common_tunnel_close(eap);
return;
}