ikev1: Don't trigger updown event and close action for redundant CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Fri, 1 Feb 2019 11:05:55 +0000 (12:05 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 8 Mar 2019 14:49:34 +0000 (15:49 +0100)
src/libcharon/sa/ikev1/tasks/quick_delete.c

index 0191a45..6730691 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <daemon.h>
 #include <encoding/payloads/delete_payload.h>
+#include <sa/ikev1/task_manager_v1.h>
 
 typedef struct private_quick_delete_t private_quick_delete_t;
 
@@ -106,6 +107,10 @@ static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
        }
 
        rekeyed = child_sa->get_state(child_sa) == CHILD_REKEYED;
+       if (!rekeyed)
+       {
+               rekeyed = ikev1_child_sa_is_redundant(this->ike_sa, child_sa, NULL);
+       }
        child_sa->set_state(child_sa, CHILD_DELETING);
 
        my_ts = linked_list_create_from_enumerator(