On the zcip mailing list, H. Peter Anvin pointed out that a purely random assignment of MAC address is probably wrong. Instead, we should set bit 2 to indicate that we are doing local assignment. I had a quick look for 802 specs, but the ones that are most useful (802 and 802.3) aren't available ATM from IEEE, unless you pay. There is a reference in the 802.5 spec, which is available, but no matter anyway.
Patch is attached, against 2.4.19-pre8. Thanks to hpa for pointing this out. Brad
diff -Naur -X dontdiff linux-2.4.19-pre8-clean/drivers/usb/usbnet.c linux-2.4.19-pre8-usbnet/drivers/usb/usbnet.c --- linux-2.4.19-pre8-clean/drivers/usb/usbnet.c Tue May 7 12:16:52 2002 +++ linux-2.4.19-pre8-usbnet/drivers/usb/usbnet.c Tue May 7 12:33:54 2002 @@ -82,7 +82,9 @@ * <[EMAIL PROTECTED]>. Made framing options (NetChip/GeneSys) * tie mostly to (sub)driver info. Workaround some PL-2302 * chips that seem to reject SET_INTERFACE requests. - * + * 07-may-2002 Added additional fix to MAC address, to make sure it always + * comes from the "locally assigned" space. Thanks to hpa for + * pointing this out. (bradh) *-------------------------------------------------------------------------*/ #include <linux/config.h> @@ -1952,6 +1954,7 @@ get_random_bytes (node_id, sizeof node_id); node_id [0] &= 0xfe; // clear multicast bit + node_id [0] |= 0x02; // set local assignment bit if (usb_register (&usbnet_driver) < 0) return -1;
