openbsd-ports/net/bird/patches/patch-sysdep_unix_random_c
sthen 254703d5a7 update to BIRD 1.4.4, switch some random() users to arc4random while there.
includes an important fix for v6 on 1.4.1 and up, "Ensures that msg_controllen
includes last padding" (https://gitlab.labs.nic.cz/labs/bird/commit/8945f73d94),
as pointed out by Job Snijders.
2014-07-09 23:14:21 +00:00

15 lines
397 B
Plaintext

$OpenBSD: patch-sysdep_unix_random_c,v 1.1 2014/07/09 23:14:21 sthen Exp $
--- sysdep/unix/random.c.orig Thu Jul 10 00:02:44 2014
+++ sysdep/unix/random.c Thu Jul 10 00:03:33 2014
@@ -13,9 +13,5 @@
u32
random_u32(void)
{
- long int rand_low, rand_high;
-
- rand_low = random();
- rand_high = random();
- return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
+ return arc4random();
}