• Andy Gospodarek's avatar
    bonding: prevent sysfs from allowing arp monitoring with alb/tlb · c5cb002f
    Andy Gospodarek authored
    When using module options arp monitoring and balance-alb/balance-tlb
    are mutually exclusive options.  Anytime balance-alb/balance-tlb are
    enabled mii monitoring is forced to 100ms if not set.  When configuring
    via sysfs no checking is currently done.
    
    Handling these cases with sysfs has to be done a bit differently because
    we do not have all configuration information available at once.  This
    patch will not allow a mode change to balance-alb/balance-tlb if
    arp_interval is already non-zero.  It will also not allow the user to
    set a non-zero arp_interval value if the mode is already set to
    balance-alb/balance-tlb.  They are still mutually exclusive on a
    first-come, first serve basis.
    
    Tested with initscripts on Fedora and manual setting via sysfs.
    Signed-off-by: default avatarAndy Gospodarek <gospo@redhat.com>
    Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c5cb002f
bond_sysfs.c 43.6 KB