]> 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)
commit3d11c11aad9262c481873c3dbfd575bb1af5be1b
tree031f1ab28985f41043c067c9481c55cedac30365
parent8faa15a4abbc1b132fe0fe13545f62b020019433
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