Update duplicheck entry during IKE rekeying

This commit is contained in:
Martin Willi 2011-02-28 14:49:50 +00:00
parent b85be69079
commit 0d6d992589
1 changed files with 17 additions and 2 deletions

View File

@ -91,11 +91,26 @@ static bool equals(identification_t *a, identification_t *b)
}
METHOD(listener_t, ike_rekey, bool,
private_duplicheck_listener_t *this, ike_sa_t *new, ike_sa_t *old)
private_duplicheck_listener_t *this, ike_sa_t *old, ike_sa_t *new)
{
identification_t *id;
ike_sa_id_t *sa;
entry_t *entry;
sa = new->get_id(new);
id = new->get_other_id(new);
INIT(entry,
.id = id->clone(id),
.sa = sa->clone(sa),
);
this->mutex->lock(this->mutex);
/* TODO update entires */
entry = this->active->put(this->active, entry->id, entry);
this->mutex->unlock(this->mutex);
if (entry)
{
entry_destroy(entry);
}
return TRUE;
}