child-sa: Add a new state to track rekeyed IKEv1 CHILD_SAs

This is needed to handle DELETEs properly, which was previously done via
CHILD_REKEYING, which we don't use anymore since 5c6a62ceb6 as it prevents
reauthentication.
This commit is contained in:
Tobias Brunner
2015-03-25 12:00:20 +01:00
parent 66147ef670
commit 70728eb1b6
7 changed files with 15 additions and 5 deletions
+2 -1
View File
@@ -323,7 +323,8 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
}
}
else if (child_sa->get_state(child_sa) == CHILD_REKEYING)
else if (child_sa->get_state(child_sa) == CHILD_REKEYING ||
child_sa->get_state(child_sa) == CHILD_REKEYED)
{
rekey = child_sa->get_lifetime(child_sa, TRUE);
fprintf(out, ", expires in %V", &now, &rekey);
+2 -1
View File
@@ -68,7 +68,8 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
b->add_kv(b, "state", "%N", child_sa_state_names, child->get_state(child));
b->add_kv(b, "mode", "%N", ipsec_mode_names, child->get_mode(child));
if (child->get_state(child) == CHILD_INSTALLED ||
child->get_state(child) == CHILD_REKEYING)
child->get_state(child) == CHILD_REKEYING ||
child->get_state(child) == CHILD_REKEYED)
{
b->add_kv(b, "protocol", "%N", protocol_id_names,
child->get_protocol(child));