Subject: Incorrect MAC address for NIC
To: None <port-mac68k@NetBSD.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: port-mac68k
Date: 07/19/2004 13:18:28
Hi all,

I've just noticed that NetBSD gives me a different MAC address than MacOS
for the NIC I have.  The address given by NetBSD matches the one given by
MacOS, but with all bits reversed.

According to the comment in if_sn.c, which is quite clear, this is because
MAC addresses are stored in Token Ring format, and OpenTransport reverses
them.  Ok, and as explained in the same comment, OT newer than 1.1.1 always
reverse the address, dropping an old workaround for some Mac models.

So I don't understand why the code is just reversing them when the first
byte is 0x10.  I guess it's because the reverse of 08:00:07 is not assigned
to Apple (and therefore it can't be correct)?

But... shouldn't it do the change unconditionally, to match OT?

BTW, these are the addresses:

MacOS:  00:80:19:28:46:aa
NetBSD: 00:01:98:14:62:55

And as you can see, it doesn't correspond to the ranges assigned to Apple
(which the comment discusses).

Which could be the appropiate fix?  For now, I've just disabled the bit
reversal.

Thanks

-- 
Julio M. Merino Vidal <jmmv@menta.net>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/