summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbalmer <mbalmer@openbsd.org>2008-03-14 21:54:23 +0000
committermbalmer <mbalmer@openbsd.org>2008-03-14 21:54:23 +0000
commit2fe3ac23f4052bb5837e697f921729bf3a5ff109 (patch)
tree8589ce29bb599671c1e1eac1a25e5c1cb4ac0f45
parent"-Aa" are not required flags; sort synopses; improve description of "-a" (diff)
downloadwireguard-openbsd-2fe3ac23f4052bb5837e697f921729bf3a5ff109.tar.xz
wireguard-openbsd-2fe3ac23f4052bb5837e697f921729bf3a5ff109.zip
Make sure the most often changing bits of tv_usec are used for lladdr
generation. ok brad
-rw-r--r--sys/dev/usb/if_cdce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index e5d9af92643..adc6e1ef64b 100644
--- a/sys/dev/usb/if_cdce.c
+++ b/sys/dev/usb/if_cdce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cdce.c,v 1.40 2008/03/13 08:32:02 mbalmer Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.41 2008/03/14 21:54:23 mbalmer Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -322,7 +322,7 @@ found:
bcopy(&macaddr_hi, &sc->cdce_arpcom.ac_enaddr[0],
sizeof(u_int16_t));
getmicrotime(&now);
- macaddr_lo = htonl(now.tv_usec);
+ macaddr_lo = htonl(now.tv_usec << 8);
bcopy(&macaddr_lo, &sc->cdce_arpcom.ac_enaddr[2], sizeof(u_int32_t));
sc->cdce_arpcom.ac_enaddr[5] = (u_int8_t)(sc->cdce_unit);
} else {