summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-09-20 18:55:55 +0000
committerderaadt <deraadt@openbsd.org>2001-09-20 18:55:55 +0000
commit7a86a8b8bae256ebe7cea4ddc216cfe08f13f94d (patch)
tree956d45ef6258436e5436db63b158dee3fb5356cd /sys/net/if_ethersubr.c
parentsync (diff)
downloadwireguard-openbsd-7a86a8b8bae256ebe7cea4ddc216cfe08f13f94d.tar.xz
wireguard-openbsd-7a86a8b8bae256ebe7cea4ddc216cfe08f13f94d.zip
document why we use random()
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index dbd508273b5..c3a3af7151d 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.56 2001/09/20 16:07:21 peter Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.57 2001/09/20 18:55:55 deraadt Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -1046,6 +1046,11 @@ ether_ifattach(ifp)
((struct arpcom *)ifp)->ac_enaddr[2] = 0xe1;
((struct arpcom *)ifp)->ac_enaddr[3] = 0xba;
((struct arpcom *)ifp)->ac_enaddr[4] = 0xd0;
+ /*
+ * XXX use of random() by anything except the scheduler is
+ * normally invalid, but this is boot time, so pre-scheduler,
+ * and the random subsystem is not alive yet
+ */
((struct arpcom *)ifp)->ac_enaddr[5] = (u_char)random() & 0xff;
}