sending an SPI of 0 as responder when IKE_SA_INIT fails
authorMartin Willi <martin@strongswan.org>
Tue, 6 Mar 2007 13:06:47 +0000 (13:06 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 6 Mar 2007 13:06:47 +0000 (13:06 -0000)
src/charon/sa/task_manager.c

index 2bd10fa..d326681 100644 (file)
@@ -425,6 +425,13 @@ static status_t build_response(private_task_manager_t *this,
            }
        }
        iterator->destroy(iterator);
+       
+       /* remove resonder SPI if IKE_SA_INIT failed */
+       if (delete && exchange == IKE_SA_INIT)
+       {
+               ike_sa_id_t *id = this->ike_sa->get_id(this->ike_sa);
+               id->set_responder_spi(id, 0);
+       }
 
        /* message complete, send it */
        DESTROY_IF(this->responding.packet);