summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2016-09-07 17:52:57 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2016-09-07 17:52:57 +0000
commit6732fa617ab1e37ccf7d3ed7505a90bd35dfe941 (patch)
treea463a13f67e0563db43c1dee03bb77d1c0efc0a7 /sbin
parentb58afd278adc47db5a35c69c55dff0e573ecf519 (diff)
move arc4random down; reduces diff to ping6
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping/ping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 73bcbefb541..f68973ca149 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.148 2016/09/04 09:36:37 florian Exp $ */
+/* $OpenBSD: ping.c,v 1.149 2016/09/07 17:52:56 florian Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -423,9 +423,6 @@ main(int argc, char *argv[])
(void)setsockopt(s, SOL_SOCKET, SO_DEBUG, &optval,
sizeof(optval));
- arc4random_buf(&tv64_offset, sizeof(tv64_offset));
- arc4random_buf(&mac_key, sizeof(mac_key));
-
if (options & F_FLOOD && options & F_INTERVAL)
errx(1, "-f and -i options are incompatible");
@@ -537,6 +534,9 @@ main(int argc, char *argv[])
err(1, "pledge");
}
+ arc4random_buf(&tv64_offset, sizeof(tv64_offset));
+ arc4random_buf(&mac_key, sizeof(mac_key));
+
while (preload--) /* fire off them quickies */
pinger();