• Petr Machata's avatar
    net: dev: Add NETDEV_PRE_CHANGEADDR · 1570415f
    Petr Machata authored
    The NETDEV_CHANGEADDR notification is emitted after a device address
    changes. Extending this message to allow vetoing is certainly possible,
    but several other notification types have instead adopted a simple
    two-stage approach: first a "pre" notification is sent to make sure all
    interested parties are OK with a change that's about to be done. Then
    the change is done, and afterwards a "post" notification is sent.
    
    This dual approach is easier to use: when the change is vetoed, nothing
    has changed yet, and it's therefore unnecessary to roll anything back.
    Therefore adopt it for NETDEV_CHANGEADDR as well.
    
    To that end, add NETDEV_PRE_CHANGEADDR and an info structure to go along
    with it.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1570415f
dev.c 244 KB