ND6_PRIV_MAX_DESYNC_FACTOR like RFC 4941 tells us to.
Toss in a arc4random_uniform for good measure like the kernel always
did.
-/* $OpenBSD: engine.c,v 1.4 2017/07/06 15:02:53 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.5 2017/07/09 08:41:47 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
addr_proposal->vltime = prefix->vltime;
if (prefix->pltime > ND6_PRIV_PREFERRED_LIFETIME)
- addr_proposal->pltime = ND6_PRIV_PREFERRED_LIFETIME;
+ addr_proposal->pltime = ND6_PRIV_PREFERRED_LIFETIME
+ - arc4random_uniform(ND6_PRIV_MAX_DESYNC_FACTOR);
else
addr_proposal->pltime = prefix->pltime;
} else {