]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: Fix passthru macvlan mac address inheritance
authorVlad Yasevich <vyasevich@gmail.com>
Wed, 21 Jun 2017 11:59:17 +0000 (07:59 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jun 2017 15:17:41 +0000 (11:17 -0400)
commit1f229d5228cac837f8a9c1fd581a24228cad9d38
tree4371caa75e719264ace0851e39ab74792c7665d2
parente70c767d5be572320a79393a698645728a2b0fae
macvlan: Fix passthru macvlan mac address inheritance

When a lower device of the passthru macvlan changes it's address,
passthru macvlan is supposed to change it's own address as well.
However, that doesn't happen correctly because the check in
macvlan_addr_busy() will catch the fact that the lower level
(port) mac address is the same as the address we are trying to
assign to the macvlan, and return an error.  As a reasult,
the address of the passthru macvlan device is never changed.

The same thing happens when the user attempts to change the
mac address of the passthru macvlan.

The simple solution appers to be to not check against
the lower device in case of passthru macvlan device, since
the 2 addresses are _supposed_ to be the same.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c