controller: Remove special handling for routed CHILD_SAs when terminating
authorTobias Brunner <tobias@strongswan.org>
Thu, 12 Apr 2018 14:28:39 +0000 (16:28 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 12 Apr 2018 14:30:28 +0000 (16:30 +0200)
In very early versions routed CHILD_SAs were attached to IKE_SAs, since
that's not the case anymore (they are handled via trap manager), we can
remove this special handling.

src/libcharon/control/controller.c

index fb95b44..dd8255f 100644 (file)
@@ -646,17 +646,6 @@ METHOD(job_t, terminate_child_execute, job_requeue_t,
        listener->ike_sa = ike_sa;
        listener->lock->unlock(listener->lock);
 
-       if (child_sa->get_state(child_sa) == CHILD_ROUTED)
-       {
-               DBG1(DBG_IKE, "unable to terminate, established "
-                        "CHILD_SA with ID %d not found", id);
-               charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
-               listener->status = NOT_FOUND;
-               /* release listener */
-               listener_done(listener);
-               return JOB_REQUEUE_NONE;
-       }
-
        if (ike_sa->delete_child_sa(ike_sa, child_sa->get_protocol(child_sa),
                                        child_sa->get_spi(child_sa, TRUE), FALSE) != DESTROY_ME)
        {