• Vlad Yasevich's avatar
    macvlan: Let passthru macvlan correctly restore lower mac address · 18c8c54d
    Vlad Yasevich authored
    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: default avatarVladislav Yasevich <vyasevic@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    18c8c54d
macvlan.c 43.1 KB