Whamcloud - gitweb
gen_uuid.c (uuid_generate_time): Fix bug pointed out by Ralf
authorTheodore Ts'o <tytso@mit.edu>
Fri, 30 Jan 2004 07:07:13 +0000 (02:07 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 30 Jan 2004 07:07:13 +0000 (02:07 -0500)
S. Engelshall; when generating a random ethernet address
because one is not available, set the least significant
bit of the first byte of the MAC address, since it is the
first bit to be transmitted, and is therefore the
multicast bit.

lib/uuid/ChangeLog
lib/uuid/gen_uuid.c

index db8b00c..3e67de5 100644 (file)
@@ -1,3 +1,12 @@
+2004-01-30  Theodore Ts'o  <tytso@mit.edu>
+
+       * gen_uuid.c (uuid_generate_time): Fix bug pointed out by Ralf
+               S. Engelshall; when generating a random ethernet address
+               because one is not available, set the least significant
+               bit of the first byte of the MAC address, since it is the
+               first bit to be transmitted, and is therefore the
+               multicast bit.
+
 2003-07-25  Theodore Ts'o  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.34
index 87755d1..c7e62a6 100644 (file)
@@ -240,7 +240,7 @@ void uuid_generate_time(uuid_t out)
                         * with IEEE 802 addresses obtained from
                         * network cards
                         */
-                       node_id[0] |= 0x80;
+                       node_id[0] |= 0x01;
                }
                has_init = 1;
        }