OSDN Git Service

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)
commite696cda7bd091411705a4e868ce480eaa3082dbf
tree4371caa75e719264ace0851e39ab74792c7665d2
parente26f43faa0d79dd06e9e94829696b68b9940c2ee
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