diff options
author | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:34:32 +0200 |
---|---|---|
committer | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:34:32 +0200 |
commit | c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (patch) | |
tree | d4e2118cbd411caa1a0528eac831030109bc6e65 /src/libcharon/plugins/eap_radius | |
parent | 15fb7904f4431a6e7c305fd08732458f7f885e7e (diff) | |
download | vyos-strongswan-c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9.tar.gz vyos-strongswan-c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9.zip |
Import upstream version 5.1.3
Diffstat (limited to 'src/libcharon/plugins/eap_radius')
-rw-r--r-- | src/libcharon/plugins/eap_radius/Makefile.in | 1 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_radius/eap_radius_accounting.c | 7 | ||||
-rw-r--r-- | src/libcharon/plugins/eap_radius/eap_radius_forward.c | 22 |
3 files changed, 8 insertions, 22 deletions
diff --git a/src/libcharon/plugins/eap_radius/Makefile.in b/src/libcharon/plugins/eap_radius/Makefile.in index 3e2bf046d..fbce3127f 100644 --- a/src/libcharon/plugins/eap_radius/Makefile.in +++ b/src/libcharon/plugins/eap_radius/Makefile.in @@ -375,7 +375,6 @@ nm_LIBS = @nm_LIBS@ nm_ca_dir = @nm_ca_dir@ nm_plugins = @nm_plugins@ oldincludedir = @oldincludedir@ -openac_plugins = @openac_plugins@ pcsclite_CFLAGS = @pcsclite_CFLAGS@ pcsclite_LIBS = @pcsclite_LIBS@ pdfdir = @pdfdir@ diff --git a/src/libcharon/plugins/eap_radius/eap_radius_accounting.c b/src/libcharon/plugins/eap_radius/eap_radius_accounting.c index 8c780e78d..5fb1bbb75 100644 --- a/src/libcharon/plugins/eap_radius/eap_radius_accounting.c +++ b/src/libcharon/plugins/eap_radius/eap_radius_accounting.c @@ -410,7 +410,12 @@ static job_requeue_t send_interim(interim_data_t *data) { if (!send_message(this, message)) { - eap_radius_handle_timeout(data->id); + if (lib->settings->get_bool(lib->settings, + "%s.plugins.eap-radius.accounting_close_on_timeout", + TRUE, lib->ns)) + { + eap_radius_handle_timeout(data->id); + } } message->destroy(message); } diff --git a/src/libcharon/plugins/eap_radius/eap_radius_forward.c b/src/libcharon/plugins/eap_radius/eap_radius_forward.c index b873e1d69..54d52a98c 100644 --- a/src/libcharon/plugins/eap_radius/eap_radius_forward.c +++ b/src/libcharon/plugins/eap_radius/eap_radius_forward.c @@ -74,22 +74,6 @@ typedef struct { static private_eap_radius_forward_t *singleton = NULL; /** - * Hashtable hash function - */ -static u_int hash(uintptr_t key) -{ - return key; -} - -/** - * Hashtable equals function - */ -static bool equals(uintptr_t a, uintptr_t b) -{ - return a == b; -} - -/** * Free a queue entry */ static void free_attribute(chunk_t *chunk) @@ -442,10 +426,8 @@ eap_radius_forward_t *eap_radius_forward_create() .to_attr = parse_selector(lib->settings->get_str(lib->settings, "%s.plugins.eap-radius.forward.radius_to_ike", "", lib->ns)), - .from = hashtable_create((hashtable_hash_t)hash, - (hashtable_equals_t)equals, 8), - .to = hashtable_create((hashtable_hash_t)hash, - (hashtable_equals_t)equals, 8), + .from = hashtable_create(hashtable_hash_ptr, hashtable_equals_ptr, 8), + .to = hashtable_create(hashtable_hash_ptr, hashtable_equals_ptr, 8), .mutex = mutex_create(MUTEX_TYPE_DEFAULT), ); |