]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: Let passthru macvlan correctly restore lower mac address
authorVlad Yasevich <vyasevich@gmail.com>
Wed, 21 Jun 2017 11:59:19 +0000 (07:59 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jun 2017 15:17:42 +0000 (11:17 -0400)
commit3dbfd77ed0025d779a0032f61519fa4909ef1d6d
tree031f1ab28985f41043c067c9481c55cedac30365
parent6e45977221026472e6d873d736ca76aca61240ad
macvlan: Let passthru macvlan correctly restore lower mac address

Passthru macvlans directly change the mac address of the lower
level device.  That's OK, but after the macvlan is deleted,
the lower device is left with changed address and one needs to
reboot to bring back the origina HW addresses.

This scenario is actually quite common with passthru macvtap devices.

This patch attempts to solve this, by storing the mac address
of the lower device in macvlan_port structure and keeping track of
it through the changes.

After this patch, any changes to the lower device mac address
done trough the macvlan device, will be reverted back.  Any
changs done directly to the lower device mac address will be kept.

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