DBG1(DBG_KNL, "ees: expire received for reqid %u, spi %x, dst %H", sp_id,
ntohl(spi_rem), dst);
charon->kernel->expire(charon->kernel, protocol, spi_rem, dst, hard != 0);
+ dst->destroy(dst);
}
(void**)&entry, &reqid, &spi, &proto);
if (res && entry)
{
- dst = entry->dst;
+ dst = entry->dst->clone(entry->dst);
DBG3(DBG_KNL, "returning destination host %H of SAD entry (reqid: %u,"
" spi: %x, proto: %u)", dst, reqid, ntohl(spi), proto);
}
* @param reqid reqid of CHILD SA
* @param spi Remote SPI of CHILD SA
* @param proto protocol of CHILD SA (ESP/AH)
- * @return destination host of entry if found, NULL otherwise
+ * @return destination host of entry if found (cloned),
+ * NULL otherwise
*/
host_t * (*get_dst_host)(tkm_kernel_sad_t * const this,
const uint32_t reqid, const uint32_t spi, const uint8_t proto);