aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 435984ad8b2f..0730203a19f2 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -766,18 +766,30 @@ static void __bond_resend_igmp_join_requests(struct net_device *dev)
766 */ 766 */
767static void bond_resend_igmp_join_requests(struct bonding *bond) 767static void bond_resend_igmp_join_requests(struct bonding *bond)
768{ 768{
769 struct net_device *vlan_dev; 769 struct net_device *bond_dev, *vlan_dev, *master_dev;
770 struct vlan_entry *vlan; 770 struct vlan_entry *vlan;
771 771
772 read_lock(&bond->lock); 772 read_lock(&bond->lock);
773 773
774 bond_dev = bond->dev;
775
774 /* rejoin all groups on bond device */ 776 /* rejoin all groups on bond device */
775 __bond_resend_igmp_join_requests(bond->dev); 777 __bond_resend_igmp_join_requests(bond_dev);
778
779 /*
780 * if bond is enslaved to a bridge,
781 * then rejoin all groups on its master
782 */
783 master_dev = bond_dev->master;
784 if (master_dev)
785 if ((master_dev->priv_flags & IFF_EBRIDGE)
786 && (bond_dev->priv_flags & IFF_BRIDGE_PORT))
787 __bond_resend_igmp_join_requests(master_dev);
776 788
777 /* rejoin all groups on vlan devices */ 789 /* rejoin all groups on vlan devices */
778 list_for_each_entry(vlan, &bond->vlan_list, vlan_list) { 790 list_for_each_entry(vlan, &bond->vlan_list, vlan_list) {
779 rcu_read_lock(); 791 rcu_read_lock();
780 vlan_dev = __vlan_find_dev_deep(bond->dev, 792 vlan_dev = __vlan_find_dev_deep(bond_dev,
781 vlan->vlan_id); 793 vlan->vlan_id);
782 rcu_read_unlock(); 794 rcu_read_unlock();
783 if (vlan_dev) 795 if (vlan_dev)