How is the Ethernet MAC address for usb0 defined?

Dr. H. Nikolaus Schaller hns at computer.org
Tue Aug 7 22:41:38 CEST 2007


Am 07.08.2007 um 16:09 schrieb Ian Darwin:

> On Tue, Aug 07, 2007 at 11:47:38AM -0400, Dr. H. Nikolaus Schaller  
> wrote:
>> I am analyzing why the AJZaurusUSB driver creates a new interface on
>> MacOS X each time the OpenMoko is rebooted.
>>
>> Now I think I have found that OM does initialize the MAC address of
>> the RNDIS/Ethernet gadget driver randomly on each reboot (and MacOS X
>> uses that to find devices it already knows). Can anybody confirm  
>> that?
>>
>> If it is so, I would suggest to derive the MAC address from the
>> device serial number - or if that is not available - from the
>> Bluetooth MAC (but not using the same).
>
> Good analysis.  I don't have my cable with me so I can't confirm
> this. However, if this is the problem, it is OS X that should be
> fixed. I think the FIC people have enough to do. Other OSes including

Are you kidding? Have you ever tried to ask Apple to fix something?

They use the Mac addresses as an index into a configuration table
so that you don't have to configure everything (manually) over and  
over again.
And each device has its own, nicely separated set of DHCP/TCP  
configuration values.
Unfortunately, devices are differentiated on that level by MAC  
address (only)...

Therefore I think it is a general design flaw if a device does  
present random
Mac addresses...

Well, the AJZaurusUSB driver can be made to offer a faked MAC address to
the networking stack, but that is just a workaround and not a good  
solution.

But before we blame anybody or urge someone to solve it for us we  
must find out
if this is really the case.

> Linux and also the various BSDs do not have this problem; I use it
> on OpenBSD and it is always cdce0.

They may simply not have the auto-config feature of MacOS X that  
relies on
well-behaving devices...

> Of course, the phone is open source, so if you want it done that
> way, you could submit a patch to make it work that way. That's the
> idea of Phase 1, after all!

Yes, that is the idea of open source. Everybody can do it - but in  
practice
you can't until you have found how to do this correctly and managed
to recompile the kernel. Since I am not a Linux kernel specialist,
it will become Phase 3 or 4...

-- hns



More information about the device-owners mailing list