Ticket #1023 (closed defect: later)

Opened 11 years ago

Last modified 19 months ago

CDC/RNDIS Ethernet over USB driver provides random Ethernet address after each reboot which makes MacOS X config problematic

Reported by: hns@… Owned by: michael@…
Priority: high Milestone:
Component: u-boot Version: 2007
Severity: normal Keywords:
Cc: buglog@…, werner@…, rod@…, wolfgang@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:


When plugging the OpenMoko? device through USB to a Mac with at least MacOS X 10.4.10, a CDC
Ethernet driver is started automatically on the Mac. The only additional step for a user is to go to the
Network Settings and configure a manual IP address ( for the Mac.

This all works well, until the user decides to reboot the OpenMoko? device. After doing this, he has to
reconfigure MacOS X again and the Network Settings shows a second (third, etc.) entry for the
OpenMoko? because the old entries can't be deleted automatically.

One part of the reason is the way how MacOS X stores and associates network configuration data when
hot-plugging an Ethernet interface: they are hashed/indexed by the Ethernet MAC address. So, each
Ethernet interface has its own set of IP default configurations (ifconfig).

Now, the CDC-Ethernet driver appears to receive a "virtual" the Ethernet MAC address for both
endpoints of the USB connection, i.e. one for the Macintosh and one for the OM. These addresses
appear to be provided by the OM kernel (or the CDC Ethernet driver on the OM) through the USB profile
data. And, the Linux kernel appears to seed a randomized value for each reboot which results in this

My analysis has shown that the Sharp Zaurus (with Sharp ROM and kernel 2.4) is doing it slightly
different: the MAC addresses provided by USB are constant. So, the Zaurus does not have this problem
when being connected to the Mac. Unfortunately this MAC address is the same for all Zaurus devices so
that you get problems when plugging in two Zaurus devices.

So, I propose a patch for the USB/CDC-Ethernet module of the OM kernel that provides a MAC address
that somehow depends on a Neo serial number. Or is otherwise constant between kernel reflashes and
reboots but still unique between different OM devices (so that you can charge and connect two of them
on the same Macintosh without confusing the IP configuration).

It could e.g. be a random number derived when flashing uBoot and stored somewhere in the bootloader

Please note that this problem can't be solved on the Mac since all these mechanisms are system and
kernel modules provided by Apple. The only current workaround is the AJZaurusUSB driver which
ignores the MAC address - but also replaces the Apple CDC Ethernet driver (which appears to be more
stable that AJZaurusUSB).

Change History

comment:1 Changed 11 years ago by laforge@…

  • Cc werner@… added
  • Owner changed from laforge@… to sean_mosko@…
  • Component changed from kernel to u-boot

I totally agree with the analysis and with the fact that OpenMoko? should have
fixed usb-ethernet MAC addresses.

I don't think we need any kernel patches for this. The kernel very well supports
fixed MAC addresses that are provided to it at kernel boot time parameter.

However, deriving a MAC address from the serial number / IMEI is not an option,
since we cannot guarantee that we wouldn't use an already-allocated MAC address
of a completely different vendor.

What we need is two officially allocated MAC addresses out of a to-be-bought OUI
range. Those two MAC addresses need to be stored in the environment partition
of the device during production.

The bootloader then passes these MAC addresses to the kernel at boot time, and
everything else should happen automatically.

So we need three things
1) the OID range that OpenMoko? wanted to buy anyway
2) a possibility to allocate two MAC addresses to each device during production
3) the ability to write those two MAC addresses into the bootargs_base
environment in the kernel-required syntax for usb ethernet.

comment:2 Changed 11 years ago by werner@…

Agreed on getting an OUI and giving our machines proper MAC addresses.
It's ugly that EoUSB needs two globally unique IDs per device, but it
seems that this is unavoidable (?), and the MacOS approach of handling
configurations actually seems to make sense to me.

comment:3 Changed 11 years ago by hns@…

Just an idea:
if you want to save MAC addresses it could be possible to re-use the Bluetooth MAC address on the Neo
side and some derived MAC (by using some hash algorithm) on the MAC side. Or derive two hash values.
Or simply XOR with two different patterns. It would also be unique.

The only requirement is that it is possible to read out the Bluetooth MAC before/during boot.

comment:4 Changed 11 years ago by sean_mosko@…

  • Owner changed from sean_mosko@… to wolfgang@…

comment:5 Changed 11 years ago by wolfgang@…

  • Owner changed from wolfgang@… to willie_chen@…


comment:6 Changed 11 years ago by stefan@…

  • Cc wolfgang@… added

As it was already stated, this is more about to get OID range for the needed MAC
addresses then a kernel issue.

OpenMoko? Inc. needs to buy a OID range where the MAC address can be taken from.
Once this range is available system engineers should have a look how to assign
this addresses unique per device.

comment:7 Changed 11 years ago by willie_chen@…

  • Owner changed from willie_chen@… to michael@…

comment:8 Changed 11 years ago by werner@…

To work around the MacOS situation, a pair of locally-chosen MAC
addresses for host and device could be stored in the environment,
and then passed to the kernel with the following u-boot commands:

setenv bootcmd setenv bootargs \${bootargs_base} \${bootargs_usb}
\${mtdparts}\; nand read.e 0x32000000 kernel\; bootm 0x32000000

setenv bootargs_usb g_ether.dev_addr=00:01:02:03:04:05


Note that the first byte of each address must be an even number, or this
would be a multicast address, and the kernel would ignore it.

comment:9 Changed 11 years ago by werner@…

  • Status changed from new to closed
  • Resolution set to later

Using properly assigned MAC addresses is part of a more involved
process, which will take a while.

comment:10 Changed 11 years ago by werner@…

  • Cc rod@… added

comment:11 Changed 11 years ago by werner@…

* Bug 783 has been marked as a duplicate of this bug. *

comment:12 Changed 11 years ago by cesarb@…

(in reply to comment #6)

Not only should the number be even, the next bit (global/local bit) should be 1
(locally allocated address).

This means a better set of addresses would be:

setenv bootargs_usb g_ether.dev_addr=02:01:02:03:04:05

comment:13 Changed 2 years ago by RoberMync

Flagyl Buy Online <a href=http://zol1.xyz/cheapest-zoloft-online.php>Cheapest Zoloft Online</a> Nolvadex Tablets Cialis Vente Libre France <a href=http://viag1.xyz/buy-viagra-online-usa.php>Buy Viagra Online Usa</a> Does Amoxicillin Cause Gas Acheter Baclofene Sur Internet <a href=http://cial5mg.xyz/order-cialis-pills.php>Order Cialis Pills</a> Medicament Misoprostol C Est Pours Quoi Prezzi Cialis <a href=http://zol1.xyz/zoloft-implicane.php>Zoloft Implicane</a> Acquisto Viagra On Line Dove Trovare Il Viagra <a href=http://viag1.xyz/real-viagra-online.php>Real Viagra Online</a> Generic Lasix Buy Levitra Controindicazioni Acquisto <a href=http://zol1.xyz/generic-zoloft-usa.php>Generic Zoloft Usa</a> Levitra Tadalafil Cheap Prevacid Online <a href=http://cial5mg.xyz/best-cialis-online.php>Best Cialis Online</a> Essai Cialis Generique Zithromax Azithromycin Side Effects <a href=http://kama1.xyz/buy-kamagra-jelly-online.php>Buy Kamagra Jelly Online</a> Get Wellbutrin Xl No Prescription Baclofene Princeps <a href=http://viag1.xyz/sildenafil-20mg.php>Sildenafil 20mg</a> Buy Diflucan From Canada Acheter Tadalis Sx 40 Mg <a href=http://zol1.xyz/cheap-generic-zoloft.php>Cheap Generic Zoloft</a> Cheapest Viagra Prices Medical Information <a href=http://zol1.xyz/buy-sertraline-online.php>Buy Sertraline Online</a> Cialis Ansiedad Acheter Viagra Qualite <a href=http://viag1.xyz/real-viagra-online.php>Real Viagra Online</a> Viagra Cialis Levitra Generique Fedex Shipping Macrobid Online <a href=http://cial5mg.xyz/cheap-cialis-online.php>Cheap Cialis Online</a> Cialis Achat Belgique Tadalafil India <a href=http://kama1.xyz/order-generic-kamagra.php>Order Generic Kamagra</a> Propecia Doping Receta Medica How To Get A Bottle Of Viagra <a href=http://cial1.xyz/generic-cialis-pricing.php>Generic Cialis Pricing</a> Online Priligy Generic Prescriptions For Cialis <a href=http://cial5mg.xyz/cheap-cialis-tablets.php>Cheap Cialis Tablets</a> Purchasing Doxycycline Where Can I Buy Bentyl On Line Australia Price <a href=http://kama1.xyz/cheap-kamagra-pills.php>Cheap Kamagra Pills</a> Buy Prednisone Online Now Side Effects Of Amoxicillin Clavulin <a href=http://cial5mg.xyz/cialis-online.php>Cialis Online</a> Vente De Kamagra En Espagne El Cialis Sirve <a href=http://cial1.xyz/generic-cialis-online.php>Generic Cialis Online</a> Mexican Pharmacy No Prescription Needed Levaquin 750mg Internet <a href=http://viag1.xyz/viagra-pills.php>Viagra Pills</a> Metronidazole Czech Republic Viagra Edad Avanzada <a href=http://kama1.xyz/kamagra-pills.php>Kamagra Pills</a> Informacion Sobre Priligy Generic Viagra American Express <a href=http://cial5mg.xyz/cheap-cialis-no-rx.php>Cheap Cialis No Rx</a> Prezzo Viagra Pfizer Cialis Generika Berlin <a href=http://viag1.xyz/price-of-viagra.php>Price Of Viagra</a> Price Canada Buy Propecia Le Viagra Est Il Rembourse En France <a href=http://viag1.xyz/viagra-for-sale.php>Viagra For Sale</a> Kamagra Online Usa Amoxicillin Allergic Rash <a href=http://kama1.xyz/cheap-kamagra-pill.php>Cheap Kamagra Pill</a> Levitra Prix Allemagne Kamagra With Food <a href=http://cial5mg.xyz/cialis-order.php>Cialis Order</a> Vendo Viagra Malaga Amoxil Pediatrique <a href=http://kama1.xyz/how-to-buy-kamagra.php>How To Buy Kamagra</a> Purchase Viagra Kmj Radio Ads Viagra <a href=http://cial5mg.xyz/cialis-on-line.php>Cialis On Line</a> Proscar Propecia Dosage Amoxicillin Allergic Rash <a href=http://cial1.xyz/buy-tadalafil.php>Buy Tadalafil</a> Cheap Cialis 20 Mg Kamagra Papel <a href=http://cial5mg.xyz/cheap-generic-cialis.php>Cheap Generic Cialis</a> Real Provera Free Shipping Amex Accepted. Where To Order Legally Provera In Internet San Jose Consumo De Viagra En Jovenes <a href=http://viag1.xyz/viagra-discount.php>Viagra Discount</a> Cialis Extra Super Comprar Cialis Quito <a href=http://viag1.xyz/viagra-for-sale.php>Viagra For Sale</a> Generique Du Cialis En France For Sale Zithromax Z Pak Oral <a href=http://cial5mg.xyz/order-cialis.php>Order Cialis</a> Cialis Lilly Comprar Fluconazole Discount Pharmacy <a href=http://viag1.xyz/cheap-viagra-tablets.php>Cheap Viagra Tablets</a> Viagra Store Coupons Cialis Venta Farmacias <a href=http://cial5mg.xyz/buy-cheap-cialis-site.php>Buy Cheap Cialis Site</a> Vomex Over Seas Orders For Vardenafil <a href=http://kama1.xyz/generic-kamagra-pills.php>Generic Kamagra Pills</a> Cephalexin And Jurnal Alfusin <a href=http://inderal.ccrpdc.com/buy-inderal-online.php>Buy Inderal Online</a> Cialis Forum Alfemminile Cialis Generico Venta <a href=http://cial1.xyz/fast-delivery-cialis.php>Fast Delivery Cialis</a> Levaquin Medicine Express Delivery

comment:14 Changed 20 months ago by RalphCleks

take viagra and cialis together

<a href="http://cialisxrm.com/">cialis coupon</a>

cialis dolori muscolari gambe

<a href=http://cialisxrm.com/>buy cialis online</a>

comment:15 Changed 19 months ago by GeraldRok

no prior prescription required pharmacy

<a href="http://canadianpharmacyrxbsl.com/">canadian online pharmacies</a>

best canadian mail order pharmacies

<a href=http://canadianpharmacyrxbsl.com/?zoloft-and-pregnancy>zoloft and pregnancy</a>
costco pharmacy pricing
<a href="http://canadianpharmacyrxbsl.com/?what-is-erectile-dysfunction">what is erectile dysfunction</a>

Note: See TracTickets for help on using tickets.