bonding: update bond carrier state when min_links option changes
authorJonathan Toppins <jtoppins@cumulusnetworks.com>
Mon, 26 Jan 2015 06:16:57 +0000 (01:16 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Jan 2015 01:09:03 +0000 (17:09 -0800)
Cc: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>
Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_options.c
include/net/bonding.h

index f47bc433407a176ed31a09e0010c87273c303a85..f83ace6bab2f06ddcc4250ca17bee9553d8e7c12 100644 (file)
@@ -334,7 +334,7 @@ static int bond_vlan_rx_kill_vid(struct net_device *bond_dev,
  *
  * Returns zero if carrier state does not change, nonzero if it does.
  */
-static int bond_set_carrier(struct bonding *bond)
+int bond_set_carrier(struct bonding *bond)
 {
        struct list_head *iter;
        struct slave *slave;
index 9bd538d4474b6847d69371fc9b5a75dde94ed251..4df28943d2229035166d2bb4a72ec11c8f9671c5 100644 (file)
@@ -1181,6 +1181,7 @@ static int bond_option_min_links_set(struct bonding *bond,
        netdev_info(bond->dev, "Setting min links value to %llu\n",
                    newval->value);
        bond->params.min_links = newval->value;
+       bond_set_carrier(bond);
 
        return 0;
 }
index 983a94b86b954c90548df20fe6f574efb6359c70..29f53eacac0a4c1101521c547a4c9ad5b6fd53b7 100644 (file)
@@ -525,6 +525,7 @@ void bond_sysfs_slave_del(struct slave *slave);
 int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
 int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
 u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb);
+int bond_set_carrier(struct bonding *bond);
 void bond_select_active_slave(struct bonding *bond);
 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
 void bond_create_debugfs(void);