implemented IKE_SA rekeying

uses ikelifetime, rekeymargin and rekeyfuzz config settings
	no handling of simultaneus exchanges yet!
This commit is contained in:
Martin Willi
2006-07-27 12:18:40 +00:00
parent 45f76a7ddd
commit fe04e93a8b
30 changed files with 1696 additions and 317 deletions
+13 -2
View File
@@ -258,7 +258,19 @@ static linked_list_t *select_other_traffic_selectors(private_policy_t *this,
*/
static linked_list_t *get_proposals(private_policy_t *this)
{
return this->proposals;
iterator_t *iterator;
proposal_t *current;
linked_list_t *proposals = linked_list_create();
iterator = this->proposals->create_iterator(this->proposals, TRUE);
while (iterator->iterate(iterator, (void**)&current))
{
current = current->clone(current);
proposals->insert_last(proposals, (void*)current);
}
iterator->destroy(iterator);
return proposals;
}
/**
@@ -349,7 +361,6 @@ static u_int32_t get_soft_lifetime(private_policy_t *this)
{
return this->soft_lifetime ;
}
srandom(time(NULL)+getpid());
return this->soft_lifetime - (random() % this->jitter);
}