aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorjamal <hadi@cyberus.ca>2006-09-22 21:54:37 -0700
committerJeff Garzik <jeff@garzik.org>2006-09-25 20:08:09 -0400
commit70298705bb29fb7982b85089adf17cd37b94baa7 (patch)
treef0522fcc50991fdc295d6f3f8f1b737c9146ccfa /drivers/net
parent0b680e753724d31a9c45f059d1aad29df54584a1 (diff)
[PATCH] bonding: Don't release slaves when master is admin down
When a bonding netdevice is admin-ed down it loses the slaves attributes (set via ifenslave). This is not consistent with other behavior of netdevices (example a qdisc attached to a netdevice doesnt disappear or an attached IP address etc). The included patch fixes this. Ive tested by ifenslaving, downing the bond, checking /proc and making sure it still has the slaves, up-ing the bond and making sure things continue to work. Jay/Bonding folks if you are ok with it, just ACK it or include it in your tree etc. Otherwise we can discuss. Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9e5a533a162..bafe62f7c9b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3430,7 +3430,6 @@ static int bond_close(struct net_device *bond_dev)
write_lock_bh(&bond->lock);
- bond_mc_list_destroy(bond);
/* signal timers not to re-arm */
bond->kill_timers = 1;
@@ -3461,8 +3460,6 @@ static int bond_close(struct net_device *bond_dev)
break;
}
- /* Release the bonded slaves */
- bond_release_all(bond_dev);
if ((bond->params.mode == BOND_MODE_TLB) ||
(bond->params.mode == BOND_MODE_ALB)) {
@@ -4248,6 +4245,9 @@ static void bond_free_all(void)
list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) {
struct net_device *bond_dev = bond->dev;
+ bond_mc_list_destroy(bond);
+ /* Release the bonded slaves */
+ bond_release_all(bond_dev);
unregister_netdevice(bond_dev);
bond_deinit(bond_dev);
}