]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-tkm: Reset ESA on child SA create failure
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Tue, 5 Sep 2017 13:56:12 +0000 (15:56 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 15 Sep 2017 10:16:57 +0000 (12:16 +0200)
Since we are also releasing the ESA ID we have to make sure that the ESA
context is reset and in a clean state in order for it to be actually
reusable.

src/charon-tkm/src/tkm/tkm_kernel_ipsec.c

index 87b516d4396e626b3b0a329991ec604a6ea8bfe1..48dd40aa51f0fb77dc95413bcf45a3c4b1460f7d 100644 (file)
@@ -199,6 +199,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
        return SUCCESS;
 
 failure:
+       ike_esa_reset(esa_id);
        tkm->sad->remove(tkm->sad, esa_id);
 sad_failure:
        tkm->idmgr->release_id(tkm->idmgr, TKM_CTX_ESA, esa_id);