eap-radius: Don't send RADIUS Accounting Start messages twice
authorTobias Brunner <tobias@strongswan.org>
Tue, 2 Jun 2015 13:18:52 +0000 (15:18 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 6 Aug 2015 12:57:47 +0000 (14:57 +0200)
If a client does Mode Config during reauthentication the assign_vips()
event might be triggered twice, we should not send another Start message
in that case.

Fixes #937.

src/libcharon/plugins/eap_radius/eap_radius_accounting.c

index 7a76fdd..c6bbb73 100644 (file)
@@ -694,6 +694,11 @@ static void send_start(private_eap_radius_accounting_t *this, ike_sa_t *ike_sa)
 
        entry = get_or_create_entry(this, ike_sa->get_id(ike_sa),
                                                                ike_sa->get_unique_id(ike_sa));
+       if (entry->start_sent)
+       {
+               this->mutex->unlock(this->mutex);
+               return;
+       }
        entry->start_sent = TRUE;
 
        message = radius_message_create(RMC_ACCOUNTING_REQUEST);