Subject: Re: [PATCH] macvlan: Support creating macvlans from macvlans

From: Patrick McHardy <[email-masked]>
Date: Fri, 06 Mar 2009 16:56:23 +0100

Eric W. Biederman wrote:
> Patrick McHardy <[email-masked]> writes:
> 
>> Eric W. Biederman wrote:
>>> Patrick McHardy <[email-masked]> writes:
>>>
>>>>> Hmm.  Actually that appears to be a macvlan bug.  It looks like if I
>>>>> change the macaddress on a macvlan we don't update the hash chains.
>>>>> So unless we have the same low byte we will be on the wrong hash chain
>>>>> and not receive the packets for the mac we specified.  Ouch!
>>>> The address can only be changed while the device is down and unhashed.
>>> Point.  The dev_unicast/dev_unicast_delete in macvlan_set_mac_address
>>> appears to be completely unnecessary then.
>> I think thats correct.
> 
> Actually it is really weird.  We can change the mac address while
> the devices is running but the code is broken because it does
> not update the hash table.

Thats strange. I know the assumption was that this can't be done.
But I can't find anything preventing it, not even in older versions.

>> Refusing duplicate MACs (on one underlying device) makes sense, the
>> results are undefined currently.
> 
> Then I will do that just for consistency.

Thanks.