diff options
author | Peter Galbavy <peter@cvs.openbsd.org> | 2001-09-20 16:07:22 +0000 |
---|---|---|
committer | Peter Galbavy <peter@cvs.openbsd.org> | 2001-09-20 16:07:22 +0000 |
commit | bc86ffda7a6a90b9c49f5428131dac2e1fe2f0b1 (patch) | |
tree | 9d01acdd5e2edf84fc210c5987dc5cd099817f77 /sys/net | |
parent | c96c3d671e8cea0be51eec9bd6c6573e45246a2a (diff) |
the use of arc4random() in ether_ifattach() is wrong as randomattach()
has not yet been called at this point.
replace arc4random() with the more mundae random()&0xff as the use
of a strong PRNG is not need here, where this code just helps fix
up broken MAC addresses anyway
now to find the real problem with my sis(4) LAN interface...
ok'd by jason@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 96f9fd29b3e..dbd508273b5 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.55 2001/08/19 15:28:24 jason Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.56 2001/09/20 16:07:21 peter Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -1046,7 +1046,7 @@ ether_ifattach(ifp) ((struct arpcom *)ifp)->ac_enaddr[2] = 0xe1; ((struct arpcom *)ifp)->ac_enaddr[3] = 0xba; ((struct arpcom *)ifp)->ac_enaddr[4] = 0xd0; - ((struct arpcom *)ifp)->ac_enaddr[5] = (u_char)arc4random(); + ((struct arpcom *)ifp)->ac_enaddr[5] = (u_char)random() & 0xff; } ifp->if_type = IFT_ETHER; |