diff options
author | Martin Willi <martin@revosec.ch> | 2013-03-14 14:01:17 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-03-14 15:42:30 +0100 |
commit | 1ba1cd0c9b64e3eebc6ea2ccdc819c7d50b03f42 (patch) | |
tree | bc673131eb9e47e904b68d910615bf6a201e33f2 /src/libcharon/plugins/eap_radius/eap_radius_accounting.c | |
parent | 49960f021d14dae1d3473cce5b46843da0e633e8 (diff) | |
download | strongswan-1ba1cd0c9b64e3eebc6ea2ccdc819c7d50b03f42.tar.bz2 strongswan-1ba1cd0c9b64e3eebc6ea2ccdc819c7d50b03f42.tar.xz |
Add an option to delete any established IKE_SA if RADIUS server is not responding
Diffstat (limited to 'src/libcharon/plugins/eap_radius/eap_radius_accounting.c')
-rw-r--r-- | src/libcharon/plugins/eap_radius/eap_radius_accounting.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libcharon/plugins/eap_radius/eap_radius_accounting.c b/src/libcharon/plugins/eap_radius/eap_radius_accounting.c index 0764f33bb..737593749 100644 --- a/src/libcharon/plugins/eap_radius/eap_radius_accounting.c +++ b/src/libcharon/plugins/eap_radius/eap_radius_accounting.c @@ -164,10 +164,6 @@ static bool send_message(private_eap_radius_accounting_t *this, ack = response->get_code(response) == RMC_ACCOUNTING_RESPONSE; response->destroy(response); } - else - { - charon->bus->alert(charon->bus, ALERT_RADIUS_NOT_RESPONDING); - } client->destroy(client); } return ack; @@ -268,6 +264,10 @@ static void send_start(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa) entry = this->sessions->put(this->sessions, (void*)(uintptr_t)id, entry); this->mutex->unlock(this->mutex); } + else + { + eap_radius_handle_timeout(ike_sa->get_id(ike_sa)); + } message->destroy(message); free(entry); } @@ -323,7 +323,10 @@ static void send_stop(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa) value = htonl(entry->cause); message->add(message, RAT_ACCT_TERMINATE_CAUSE, chunk_from_thing(value)); - send_message(this, message); + if (!send_message(this, message)) + { + eap_radius_handle_timeout(NULL); + } message->destroy(message); free(entry); } |