EapPeerMethodResult's fIsSuccess and dwFailureReasonCode management revised to guarantee configuration gets saved
This commit is contained in:
parent
ff0b6c5ee4
commit
b255aa6505
@ -163,9 +163,6 @@ void eap::method_mschapv2::get_result(
|
||||
m_module.log_event(&EAPMETHOD_METHOD_SUCCESS, event_data((unsigned int)eap_type_legacy_mschapv2), event_data::blank);
|
||||
m_cfg.m_auth_failed = false;
|
||||
|
||||
ppResult->fIsSuccess = TRUE;
|
||||
ppResult->dwFailureReasonCode = ERROR_SUCCESS;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -178,11 +175,6 @@ void eap::method_mschapv2::get_result(
|
||||
// But be careful: do so only after credentials were actually tried.
|
||||
m_cfg.m_auth_failed = m_phase_prev < phase_finished && m_phase >= phase_finished;
|
||||
|
||||
// Do not report failure to EapHost, as it will not save updated configuration then. But we need it to save it, to alert user on next connection attempt.
|
||||
// EapHost is well aware of the failed condition.
|
||||
//ppResult->fIsSuccess = FALSE;
|
||||
//ppResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -123,10 +123,6 @@ void eap::method_pap::get_result(
|
||||
case EapPeerMethodResultSuccess: {
|
||||
m_module.log_event(&EAPMETHOD_METHOD_SUCCESS, event_data((unsigned int)eap_type_legacy_pap), event_data::blank);
|
||||
m_cfg.m_auth_failed = false;
|
||||
|
||||
ppResult->fIsSuccess = TRUE;
|
||||
ppResult->dwFailureReasonCode = ERROR_SUCCESS;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -139,11 +135,6 @@ void eap::method_pap::get_result(
|
||||
// But be careful: do so only after credentials were actually tried.
|
||||
m_cfg.m_auth_failed = m_phase_prev < phase_finished && m_phase >= phase_finished;
|
||||
|
||||
// Do not report failure to EapHost, as it will not save updated configuration then. But we need it to save it, to alert user on next connection attempt.
|
||||
// EapHost is well aware of the failed condition.
|
||||
//ppResult->fIsSuccess = FALSE;
|
||||
//ppResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -530,9 +530,6 @@ void eap::method_tls::get_result(
|
||||
// Clear credentials as failed.
|
||||
m_cfg.m_auth_failed = false;
|
||||
|
||||
ppResult->fIsSuccess = TRUE;
|
||||
ppResult->dwFailureReasonCode = ERROR_SUCCESS;
|
||||
|
||||
#if EAP_TLS < EAP_TLS_SCHANNEL
|
||||
// Update configuration with session resumption data.
|
||||
m_cfg.m_session_id = m_session_id;
|
||||
@ -595,11 +592,6 @@ void eap::method_tls::get_result(
|
||||
// TODO: Research how a Schannel session context can be cleared not to resume.
|
||||
#endif
|
||||
|
||||
// Do not report failure to EapHost, as it will not save updated configuration then. But we need it to save it, to alert user on next connection attempt.
|
||||
// EapHost is well aware of the failed condition.
|
||||
//ppResult->fIsSuccess = FALSE;
|
||||
//ppResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -270,6 +270,13 @@ void eap::peer_ttls::get_result(
|
||||
s->m_eap_attr_desc.pAttribs = s->m_method->m_eap_attr.data();
|
||||
ppResult->pAttribArray = &s->m_eap_attr_desc;
|
||||
|
||||
// Do not report failure to EapHost, as it will not save updated configuration then. But we need it to save it, to alert user on next connection attempt.
|
||||
// EapHost is well aware of the failed condition.
|
||||
//ppResult->fIsSuccess = FALSE;
|
||||
//ppResult->dwFailureReasonCode = EAP_E_AUTHENTICATION_FAILED;
|
||||
ppResult->fIsSuccess = TRUE;
|
||||
ppResult->dwFailureReasonCode = ERROR_SUCCESS;
|
||||
|
||||
if (ppResult->fSaveConnectionData) {
|
||||
pack(s->m_cfg, &ppResult->pConnectionData, &ppResult->dwSizeofConnectionData);
|
||||
if (s->m_blob_cfg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user