diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 | ||||
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | net/core/dev.c | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index cbe9e353d46..c2aceaab014 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 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9fc6ee8e750..c96c41e08e3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1994,10 +1994,12 @@ extern int dev_unicast_delete(struct net_device *dev, void *addr); | |||
1994 | extern int dev_unicast_add(struct net_device *dev, void *addr); | 1994 | extern int dev_unicast_add(struct net_device *dev, void *addr); |
1995 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); | 1995 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); |
1996 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); | 1996 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); |
1997 | extern void dev_unicast_flush(struct net_device *dev); | ||
1997 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | 1998 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); |
1998 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | 1999 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); |
1999 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | 2000 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); |
2000 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | 2001 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); |
2002 | extern void dev_addr_discard(struct net_device *dev); | ||
2001 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | 2003 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); |
2002 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | 2004 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); |
2003 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | 2005 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); |
diff --git a/net/core/dev.c b/net/core/dev.c index c0e260870c0..fe2a754238a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4457,12 +4457,13 @@ void dev_unicast_unsync(struct net_device *to, struct net_device *from) | |||
4457 | } | 4457 | } |
4458 | EXPORT_SYMBOL(dev_unicast_unsync); | 4458 | EXPORT_SYMBOL(dev_unicast_unsync); |
4459 | 4459 | ||
4460 | static void dev_unicast_flush(struct net_device *dev) | 4460 | void dev_unicast_flush(struct net_device *dev) |
4461 | { | 4461 | { |
4462 | netif_addr_lock_bh(dev); | 4462 | netif_addr_lock_bh(dev); |
4463 | __hw_addr_flush(&dev->uc); | 4463 | __hw_addr_flush(&dev->uc); |
4464 | netif_addr_unlock_bh(dev); | 4464 | netif_addr_unlock_bh(dev); |
4465 | } | 4465 | } |
4466 | EXPORT_SYMBOL(dev_unicast_flush); | ||
4466 | 4467 | ||
4467 | static void dev_unicast_init(struct net_device *dev) | 4468 | static void dev_unicast_init(struct net_device *dev) |
4468 | { | 4469 | { |
@@ -4484,7 +4485,7 @@ static void __dev_addr_discard(struct dev_addr_list **list) | |||
4484 | } | 4485 | } |
4485 | } | 4486 | } |
4486 | 4487 | ||
4487 | static void dev_addr_discard(struct net_device *dev) | 4488 | void dev_addr_discard(struct net_device *dev) |
4488 | { | 4489 | { |
4489 | netif_addr_lock_bh(dev); | 4490 | netif_addr_lock_bh(dev); |
4490 | 4491 | ||
@@ -4493,6 +4494,7 @@ static void dev_addr_discard(struct net_device *dev) | |||
4493 | 4494 | ||
4494 | netif_addr_unlock_bh(dev); | 4495 | netif_addr_unlock_bh(dev); |
4495 | } | 4496 | } |
4497 | EXPORT_SYMBOL(dev_addr_discard); | ||
4496 | 4498 | ||
4497 | /** | 4499 | /** |
4498 | * dev_get_flags - get flags reported to userspace | 4500 | * dev_get_flags - get flags reported to userspace |