bsd: replace random() by our own function
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 26 Feb 2015 00:27:14 +0000 (01:27 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 26 Feb 2015 10:27:56 +0000 (11:27 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/bsd/net.c

index a0726d2..2953f37 100644 (file)
@@ -594,7 +594,7 @@ olsr_sendto(int s, const void *buf, size_t len, int flags __attribute__ ((unused
 
   /* initialize IP ID field if necessary */
   if (ip_id == 0) {
-    ip_id = (u_int16_t) (arc4random() & 0xffff);
+    ip_id = (u_int16_t) (olsr_random() & 0xffff);
   }
 
   udp_tag = libnet_build_udp(olsr_cnf->olsrport,        /* src port */