diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-03-19 00:00:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-21 21:31:34 -0400 |
commit | 32a806c194ea112cfab00f558482dd97bee5e44e (patch) | |
tree | 196f572deccc966b3e2682f293cf775b51007658 /drivers/net/bonding | |
parent | 755d0e77ac9c8d125388922dc33434ed5b2ebe80 (diff) |
bonding: flush unicast and multicast lists when changing type
After the type change, addresses in unicast and multicast lists wouldn't make
sense, not to mention possible different lenghts. So flush both lists here.
Note "dev_addr_discard" will be very soon replaced by "dev_mc_flush" (once
mc_list conversion will be done).
Signed-off-by: Jiri Pirko <jpirko@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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index cbe9e353d46a..c2aceaab0143 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1490,6 +1490,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1490 | goto err_undo_flags; | 1490 | goto err_undo_flags; |
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | /* Flush unicast and multicast addresses */ | ||
1494 | dev_unicast_flush(bond_dev); | ||
1495 | dev_addr_discard(bond_dev); | ||
1496 | |||
1493 | if (slave_dev->type != ARPHRD_ETHER) | 1497 | if (slave_dev->type != ARPHRD_ETHER) |
1494 | bond_setup_by_slave(bond_dev, slave_dev); | 1498 | bond_setup_by_slave(bond_dev, slave_dev); |
1495 | else | 1499 | else |