<div dir="ltr"><div>Thank you for the answer.</div><ol><li> Yes, we experience packet loss during rekey.</li><li>What  prevents the peer from using the old CHILD SA? also in flight packets can be encapsulated with the old CHILD SA and  reach the VPN after it was deleted.</li></ol><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 27, 2016 at 11:28 PM Thomas Egerer <<a href="mailto:hakke_007@gmx.de">hakke_007@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA512<br>
<br>
On January 27, 2016 2:45:48 PM GMT+01:00, Avinoam Meir <<a href="mailto:avinoam@google.com" target="_blank">avinoam@google.com</a>> wrote:<br>
>Hello StrongSwan devs,<br>
><br>
>I have question/proposal about CHILD SAs rekey:<br>
>If I understand correctly, today in rekey task, after creating the  new<br>
>CHILD SA,  immediately delete task is created and executed. (see here<br>
><<a href="https://github.com/strongswan/strongswan/blob/08afc33e5259399a682bb62ef253b3155e68461e/src/libcharon/sa/ikev2/tasks/child_rekey.c#L379" rel="noreferrer" target="_blank">https://github.com/strongswan/strongswan/blob/08afc33e5259399a682bb62ef253b3155e68461e/src/libcharon/sa/ikev2/tasks/child_rekey.c#L379</a>><br>
>).<br>
><br>
>This can cause packets loss If the peer gateway sends ESP packets in<br>
>parallel to the rekey, so there are some old ESP packet on the network.<br>
><br>
>Maybe StrongSwan can defer the call to kerne_interface->del_sa() for<br>
>the<br>
>inbound CHILD SA (only), so the kernel continue to process esp packets<br>
>for<br>
>the old  SAs for a while, and prevent the packet loss.<br>
><br>
>What do you think?<br>
The code you are referring to is part of the is located in the process_i function of the child rekey code. At this point the peer should already use the rekeyed SA. So your scenario seems quite far fetched and delaying the delete job unnecessary.<br>
Did you experience packet loss during rekeying?<br>
><br>
Thomas<br>
><br>
>------------------------------------------------------------------------<br>
><br>
>_______________________________________________<br>
>Dev mailing list<br>
><a href="mailto:Dev@lists.strongswan.org" target="_blank">Dev@lists.strongswan.org</a><br>
><a href="https://lists.strongswan.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">https://lists.strongswan.org/mailman/listinfo/dev</a><br>
<br>
<br>
- --<br>
Sent from a mobile device. Please excuse my brevity.<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: APG v1.1.1<br>
<br>
iQI+BAEBCgAoBQJWqTZcIRxUaG9tYXMgRWdlcmVyIDxoYWtrZV8wMDdAZ214LmRl<br>
PgAKCRBit9TjYqwUxm1pEAClXsPEs0akGK8LzorsY/NX8qO/9PTkwwT6O/u8xvBa<br>
12i57TIyDBcHFFeqizXN891qHsqC/XKwBtTrSG9+cqAcWwuPf7JLVCkPHYdHNYRz<br>
HsddVT4eV9uYLwICe2unAqXymAZ/gmhpEoB9coTTsFD8ZMEzj3kVAWEkuVyFvE+u<br>
2ghouXqzZagsMJFXyblhXFTZ4Hxf+YGphW1Vf2nXfOQhsiTV8QbXZjWo0vS+DYsD<br>
Hezaia1St2OSVqXlO4N3zcaifIjYQJh0bCeqmJj956ay12CJzVtGpkJjLXX+r4vb<br>
9cfqKytQXPTryj9jFaNicdtI5wwI1gDWQxKGX/kmRiXkqQBuWhlb4wwgG0LuMG3v<br>
FBbDW9Li3RhEqS8F0mBIpJNBfbfRJ0C6XUB0+UivLd3CmYy7eq38w9jbrU1pdLet<br>
dVsP0CyjHo4pYW+b7YGsb7vSKr8bJsuTgqppai6uOm9WmworMynB7tRwkk/jfyNJ<br>
jbjduH8jUrIHKJnpJVHFGMQKvX4k2m/S9h+kK4xk2qaLiH9DMezwId/Wrf+j74on<br>
OQeWF7K+AVjriqTd2YjyVD23xowmMdtIQEdDvEAik5d3nC+9pZExDOkJ2KDCKQq1<br>
0IZPuy73u5DmFPJNHUmqhQ1vGz7Pb3B9Aawc/Bc+vA7Ot9Sgrllm+t4F+8o8iDuZ<br>
PQ==<br>
=k/gl<br>
-----END PGP SIGNATURE-----<br>
<br>
</blockquote></div></div>