eap-radius: Don't clear unclaimed IPs early if accounting is enabled
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Dec 2018 10:46:18 +0000 (11:46 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Dec 2018 09:28:51 +0000 (10:28 +0100)
src/libcharon/plugins/eap_radius/eap_radius_provider.c

index e8ebcf6..defabb7 100644 (file)
@@ -561,6 +561,14 @@ eap_radius_provider_t *eap_radius_provider_create()
                        },
                );
 
+               if (lib->settings->get_bool(lib->settings,
+                                                       "%s.plugins.eap-radius.accounting", FALSE, lib->ns))
+               {
+                       /* if RADIUS accounting is enabled, keep unclaimed IPs around until
+                        * the Accounting-Stop message is sent */
+                       this->listener.public.message = NULL;
+               }
+
                charon->bus->add_listener(charon->bus, &this->listener.public);
 
                singleton = &this->public;