diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-12-30 21:34:59 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-12-30 21:34:59 +0100 |
commit | 83c282ebb44d10d09223f62e97295f7603d61b08 (patch) | |
tree | e25aae144340e8a5705a8c44989b2cf9e5717db6 /src | |
parent | a2847740d27c168b01bc42b6c4b94c0805ca2004 (diff) | |
download | strongswan-83c282ebb44d10d09223f62e97295f7603d61b08.tar.bz2 strongswan-83c282ebb44d10d09223f62e97295f7603d61b08.tar.xz |
differentiate EAP method initialization errors
Diffstat (limited to 'src')
-rw-r--r-- | src/charon/sa/authenticators/eap_authenticator.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/charon/sa/authenticators/eap_authenticator.c b/src/charon/sa/authenticators/eap_authenticator.c index 5b57bfae8..922a95f5d 100644 --- a/src/charon/sa/authenticators/eap_authenticator.c +++ b/src/charon/sa/authenticators/eap_authenticator.c @@ -125,6 +125,7 @@ static eap_payload_t* server_initiate_eap(private_eap_authenticator_t *this, identification_t *id; u_int32_t vendor; eap_payload_t *out; + char *action; auth = this->ike_sa->get_auth_cfg(this->ike_sa, FALSE); @@ -150,28 +151,33 @@ static eap_payload_t* server_initiate_eap(private_eap_authenticator_t *this, /* invoke real EAP method */ type = (uintptr_t)auth->get(auth, AUTH_RULE_EAP_TYPE); vendor = (uintptr_t)auth->get(auth, AUTH_RULE_EAP_VENDOR); + action = "loading"; this->method = load_method(this, type, vendor, EAP_SERVER); - if (this->method && - this->method->initiate(this->method, &out) == NEED_MORE) + if (this->method) { - if (vendor) + action = "initiating"; + if (this->method->initiate(this->method, &out) == NEED_MORE) { - DBG1(DBG_IKE, "initiating EAP vendor type %d-%d", type, vendor); - - } - else - { - DBG1(DBG_IKE, "initiating %N", eap_type_names, type); + if (vendor) + { + DBG1(DBG_IKE, "initiating EAP vendor type %d-%d method", + type, vendor); + } + else + { + DBG1(DBG_IKE, "initiating %N method", eap_type_names, type); + } + return out; } - return out; } if (vendor) { - DBG1(DBG_IKE, "initiating EAP vendor type %d-%d failed", type, vendor); + DBG1(DBG_IKE, "%s EAP vendor type %d-%d method failed", + action, type, vendor); } else { - DBG1(DBG_IKE, "initiating %N failed", eap_type_names, type); + DBG1(DBG_IKE, "%s %N method failed", action, eap_type_names, type); } return eap_payload_create_code(EAP_FAILURE, 0); } |