[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Questing regarding random MAC address in uuid.c



It should be 0x01.  The error actually arises from a one
in the Internet-Draft from which the code was based
(which fortunately was corrected when the code was
recently published in the UUID URN RFC).  You can file
an ITS if you like.... I've already fixed HEAD.

At 01:55 PM 9/2/2005, Siva Kollipara wrote:

>Hi,
> I stumbled across this when i was generating a UUID using uuid.c
>
>---
>
>#else
>        if (memcmp(eaddr, zero, sizeof(eaddr)) == 0) {
>                /* XXX - who knows? */
>                lutil_entropy( eaddr, sizeof(eaddr) );
>                eaddr[0] |= 0x80; /* turn it into a multicast address */
>        }
>
>        return eaddr;
>#endif
>
>---
>
>the line in question is "eaddr[0] |= 0x80".
>Shouldn't this be " eaddr[0] |= 0x01" to actually set the multicast bit ?
>
>thanks,
>Siva