]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
charon-tkm: Remove ESA nonce mappings from chunk map
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Wed, 22 Apr 2015 14:37:23 +0000 (16:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 May 2015 16:07:51 +0000 (18:07 +0200)
src/charon-tkm/src/tkm/tkm_kernel_ipsec.c

index e94a3b5c28d1cf645665cf3a643cd8197bf8e5d0..d751a06cd4ae71a44714e3896c3f693355d58894 100644 (file)
@@ -164,6 +164,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
                        DBG1(DBG_KNL, "child SA (%llu, no PFS) creation failed", esa_id);
                        goto failure;
                }
+               tkm->chunk_map->remove(tkm->chunk_map, nonce_loc);
                tkm->idmgr->release_id(tkm->idmgr, TKM_CTX_NONCE, nonce_loc_id);
        }
        /* creation of subsequent child SA with PFS: nonce and dh context are set */
@@ -176,6 +177,7 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
                        DBG1(DBG_KNL, "child SA (%llu) creation failed", esa_id);
                        goto failure;
                }
+               tkm->chunk_map->remove(tkm->chunk_map, nonce_loc);
                tkm->idmgr->release_id(tkm->idmgr, TKM_CTX_NONCE, nonce_loc_id);
        }
        if (ike_esa_select(esa_id) != TKM_OK)