• nikolay@redhat.com's avatar
    bonding: remove unnecessary dev_addr_from_first member · 97a1e639
    nikolay@redhat.com authored
    
    
    In struct bonding there's a member called dev_addr_from_first which is
    used to denote when the bond dev should clone the first slave's MAC
    address but since we have netdev's addr_assign_type variable that is not
    necessary. We clone the first slave's MAC each time we have a random MAC
    set to the bond device. This has the nice side-effect of also fixing an
    inconsistency - when the MAC address of the bond dev is set after its
    creation, but prior to having slaves, it's not kept and the first slave's
    MAC is cloned. The only way to keep the MAC was to create the bond device
    with the MAC address set (e.g. through ip link). In all cases if the
    bond device is left without any slaves - its MAC gets reset to a random
    one as before.
    
    Signed-off-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    97a1e639