eap-radius: Add option to not close IKE_SAs on timeouts during interim accouting...
authorTobias Brunner <tobias@strongswan.org>
Wed, 5 Mar 2014 14:17:25 +0000 (15:17 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 31 Mar 2014 12:32:44 +0000 (14:32 +0200)
Fixes #528.

conf/plugins/eap-radius.opt
src/libcharon/plugins/eap_radius/eap_radius_accounting.c

index 0edd345..0df6a0d 100644 (file)
@@ -1,6 +1,10 @@
 charon.plugins.eap-radius.accounting = no
        Send RADIUS accounting information to RADIUS servers.
 
+charon.plugins.eap-radius.accounting_close_on_timeout = yes
+       Close the IKE_SA if there is a timeout during interim RADIUS accounting
+       updates.
+
 charon.plugins.eap-radius.accounting_requires_vip = no
        If enabled, accounting is disabled unless an IKE_SA has at least one
        virtual IP.
index 8c780e7..5fb1bbb 100644 (file)
@@ -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);
        }