diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-20 18:55:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-20 18:55:56 +0000 |
commit | 75f08540ac5d996ebbd0f543883f213d49610eac (patch) | |
tree | db53f71f1a12e35f577c4dc520f81a9f3f199ac7 /sys | |
parent | 98a12c2426c1b0f8dc0234388668912ae53b845c (diff) |
document why we use random()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_ethersubr.c | 7 |
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; } |