Skip to content

Commit

Permalink
quick-mode: Remove outbound SA/policy of rekeyed CHILD_SA
Browse files Browse the repository at this point in the history
Remove outbound SA and policy of rekeyed CHILD_SA since only one is valid.
Otherwise, during update-SA job (when NAT mapping changed), CHILD_SA are
updated and installed one by one, leaving a window where old SAs are being
used. There are also circumstances where the new SA is not processed last.

Closes #1041
  • Loading branch information
leonshaw authored and tobiasbrunner committed May 10, 2022
1 parent 5cf82de commit 3b742c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcharon/sa/ikev1/tasks/quick_mode.c
Expand Up @@ -411,6 +411,8 @@ static bool install(private_quick_mode_t *this)
/* rekeyed CHILD_SAs stay installed until they expire or are deleted
* by the other peer */
old->set_state(old, CHILD_REKEYED);
/* but remove outbound SA as we don't want to use it actively */
old->remove_outbound(old);
/* as initiator we delete the CHILD_SA if configured to do so */
if (this->initiator && this->delete)
{
Expand Down

0 comments on commit 3b742c7

Please sign in to comment.