summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authornikolay@redhat.com <nikolay@redhat.com>2013-04-18 07:33:35 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-19 17:48:18 -0400
commita506e7b479e1215c230e4b87fedc246cf748537f (patch)
treebfa79a6681e4c1b41c1d6646a7ba29a3a894f304 /drivers/net/bonding
parent25e40305d4f4399bc8ecf9c9b7cf43493bb40bbd (diff)
bonding: vlans don't get deleted on enslave failure
The main problem is with vid refcount which only gets bumped up. Delete the vlans after err_detach as that's the first error path after the vlans are added. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4cecb80df85..dd67c49070d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1906,6 +1906,7 @@ err_detach:
bond_mc_list_flush(bond_dev, slave_dev);
netif_addr_unlock_bh(bond_dev);
}
+ bond_del_vlans_from_slave(bond, slave_dev);
write_lock_bh(&bond->lock);
bond_detach_slave(bond, new_slave);
write_unlock_bh(&bond->lock);