bus: Don't trigger child_updown() for rekeyed CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Wed, 12 Jul 2017 11:00:59 +0000 (13:00 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 7 Aug 2017 08:44:05 +0000 (10:44 +0200)
We don't trigger it either when they are deleted individually.

src/libcharon/bus/bus.c

index 77a9101..19943d0 100644 (file)
@@ -827,7 +827,10 @@ METHOD(bus_t, ike_updown, void,
                enumerator = ike_sa->create_child_sa_enumerator(ike_sa);
                while (enumerator->enumerate(enumerator, (void**)&child_sa))
                {
-                       child_updown(this, child_sa, FALSE);
+                       if (child_sa->get_state(child_sa) != CHILD_REKEYED)
+                       {
+                               child_updown(this, child_sa, FALSE);
+                       }
                }
                enumerator->destroy(enumerator);
        }