WG: Need for HW-clock independent timestamps
Bruno Wolff III
bruno at wolff.to
Mon May 21 16:56:18 CEST 2018
On Mon, May 21, 2018 at 15:53:10 +0200,
Matthias Urlichs <matthias at urlichs.de> wrote:
>On 21.05.2018 14:35, Reto Brunner wrote:
>> If you just want a single write cycle, then you loose the ability to graceful
>> handle unexpected shutdowns.
>> Even if you increment the counter by 10'000 when restoring it, who's to
>> say the device hasn't been running for several weeks before the
>> unexpected power cycle happened?
>So increment the counter by a trillion instead. It's large enough and
>you're not going to send a trillion packets before the next reboot.
If you want to go that route, you should just treat it as a two part number.
One for a boot count, that would get incremented every boot and saved and
a low order part that is reset to 0 at every boot. Note that this scheme
leaks information to the peer.
More information about the WireGuard