child-delete: Don't send delete for expired CHILD_SAs that were already rekeyed
authorTobias Brunner <tobias@strongswan.org>
Tue, 6 Nov 2018 11:13:35 +0000 (12:13 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 22 Nov 2018 10:31:53 +0000 (11:31 +0100)
commitecba84a06b848dc0ee622016f8ff7d85cc878560
treee688bcdaeab17d168a76f839371de9f46981fea3
parenta9b9450c54bfae971f46ed29e43f8a08270d2c6d
child-delete: Don't send delete for expired CHILD_SAs that were already rekeyed

The peer might not have seen the CREATE_CHILD_SA response yet, receiving a
DELETE for the SA could then trigger it to abort the rekeying, causing
the deletion of the newly established SA (it can't know whether the
DELETE was sent due to an expire or because the user manually deleted
it).  We just treat this SA as if we received a DELETE for it.  This is
not an ideal situation anyway, as it causes some traffic to get dropped,
so it should usually be avoided by setting appropriate soft and hard limits.

References #2815.
src/libcharon/sa/ikev2/tasks/child_delete.c
src/libcharon/tests/suites/test_child_rekey.c