[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cdc_ether, Huawei E173u-2, wrong MAC address of packets vs wwan0



Marcin Szewczyk <Marcin.Szewczyk@wodny.org> writes:

> On Wed, Jun 13, 2012 at 07:58:18PM +0200, Bjørn Mork wrote:
>> Marcin Szewczyk <Marcin.Szewczyk@wodny.org> writes:
>> > When using RNDIS wwan0 interface has MAC address 02:50:f3:00:00:00 while
>> > packets coming from Internet have destination MAC address set to
>> > 00:01:02:03:04:05. So the workaround is to set wwan0 MAC to that value.
>> 
>> I guess the 02:50:f3:00:00:00 comes from a USB descriptor as it's not
>> exactly random.
>
> You're right. As You suggested - it is visible as iMacAddress in lsusb
> output.
>
>> So if the firmware provides this descriptor while using
>> another fixed address, then that is certainly a firmware bug.  Not too
>> surprising unfortunately...
>
> Roger.
>
>> Normally such devices will pick the MAC address they see in the DHCP
>> discover message, but that doesn't seem to happen here unless you sent a
>> DHCP request with 00:01:02:03:04:05 as MAC source address?
>
> Negative. MAC address set for the interface was used.
>
> Another thing worth noticing is that 02:50:f3:00:00:00 is used as the
> destination address for outgoing packets and source address for
> returning packets. Both before and after setting interface MAC address.

Yuck!  Looks like someone put the wrong address into the string
descriptor.



>> What does lsusb -v say?
>
> Output attached.

Yes, as expected.  Fixing the mac address string descriptor shouldn't be
a big problem for Huawei.

I don't think there is any existing infrastructure in place for
overriding it in Linux.  And I believe it shouldn't be added either,
given that:
 - your modem is the only affected one AFAIK,
 - a usable workaround exists, 
 - the firmware bug is extremely easy to fix for Huawei (and might
   already be fixed for all we know)


>> Or you can bug Huawei about it...
>
> I will check if Huawei cares...
>
>> Another option would be using another usb_modeswitch command.  These
>> modems often support many different USB descriptor sets, selectable by
>> the usb_modeswitch command.  For some reason, Huawei thinks that it is a
>> good idea to use different USB descriptors for Linux and Windows. Guess
>> which set is tested...  You could sniff the device under Windows, find
>> out what the Windows driver does, and try that in Linux as well.
>
> I will search for a Windows PC...
>
> Thank You for a reply. I've also uploaded two tcpdumps:
> 1) one with default MAC
>     http://wodny.org/special/huawei/huawei-e137-wwan0-defaultmac.cap
> 2) one with MAC manually set to 00:01:02:03:04:05
>     http://wodny.org/special/huawei/huawei-e137-wwan0-00-05-mac.cap


Thanks.  That demonstrates the problem really well.



Bjørn


Reply to: