On Thu, 16 Jul 2026 09:22:22 +0200
Stefano Brivio
...instead of calling random(), to make static checkers happy.
I don't think that an attacker could actually gain anything by making router advertisement intervals predictable, but a doubt remains, and this is cheap enough that we might just want to do this to get rid of the noise from static checkers informing us that random() shouldn't be used.
Signed-off-by: Stefano Brivio
--- v2: Turn random_part to uint32_t and cast to time_t before using it, to avoid using negative values
Oops, I guess I ran tests at 3/4 of this series but not on this patch, I'm not quite sure, but now I ran them again and realised that I've been here, done that, around the time of: https://archives.passt.top/passt-dev/20241113091805.6f6e2f6a@elisabeth/ just to find out that this would be the single usage of getrandom(2) at runtime, and we don't include it in the list of system calls we can use. Maybe Laurent tried this as well. Anyway, I guess it's not worth making things actually less secure just to satisfy Coverity Scan here, so I'll drop this patch. -- Stefano