bus: Don't trigger child_updown for deleted CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Tue, 20 Mar 2018 11:44:35 +0000 (12:44 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 9 Apr 2018 15:13:41 +0000 (17:13 +0200)
These were rekeyed but have not been destroyed yet.

src/libcharon/bus/bus.c

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