ike-delete: No need to wait for a response in case of concurrent deletes
authorTobias Brunner <tobias@strongswan.org>
Mon, 30 May 2016 14:27:47 +0000 (16:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Jun 2016 16:48:05 +0000 (18:48 +0200)
RFC 7296 explicitly says we SHOULD reply as usual and forget about our
own close request.

src/libcharon/sa/ikev2/tasks/ike_delete.c

index 72d656a..c5b82a2 100644 (file)
@@ -45,11 +45,6 @@ struct private_ike_delete_t {
         * are we deleting a rekeyed SA?
         */
        bool rekeyed;
-
-       /**
-        * are we responding to a delete, but have initated our own?
-        */
-       bool simultaneous;
 };
 
 METHOD(task_t, build_i, status_t,
@@ -128,9 +123,6 @@ METHOD(task_t, process_r, status_t,
                case IKE_REKEYED:
                        this->rekeyed = TRUE;
                        break;
-               case IKE_DELETING:
-                       this->simultaneous = TRUE;
-                       break;
                default:
                        break;
        }
@@ -143,11 +135,6 @@ METHOD(task_t, build_r, status_t,
 {
        DBG0(DBG_IKE, "IKE_SA deleted");
 
-       if (this->simultaneous)
-       {
-               /* wait for peer's response for our delete request */
-               return SUCCESS;
-       }
        if (!this->rekeyed)
        {       /* invoke ike_down() hook if SA has not been rekeyed */
                charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
@@ -166,7 +153,6 @@ METHOD(task_t, migrate, void,
        private_ike_delete_t *this, ike_sa_t *ike_sa)
 {
        this->ike_sa = ike_sa;
-       this->simultaneous = FALSE;
 }
 
 METHOD(task_t, destroy, void,