Skip to content

Commit f60c370

Browse files
Vlad Yasevichdavem330
authored andcommitted
bonding: Fix alb mode to only use first level vlans.
ALB/TLB learning packets use all vlans configured on top of the bond. This ends up being incorrect if we have a stack of vlans on top of the bond. ALB/TLB should only use first level/outer most vlans in its announcements. Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 44a4085 commit f60c370

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/bonding/bond_alb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
10451045
/* loop through vlans and send one packet for each */
10461046
rcu_read_lock();
10471047
netdev_for_each_all_upper_dev_rcu(bond->dev, upper, iter) {
1048-
if (upper->priv_flags & IFF_802_1Q_VLAN)
1048+
if (is_vlan_dev(upper) && vlan_get_encap_level(upper) == 0)
10491049
alb_send_lp_vid(slave, mac_addr,
10501050
vlan_dev_vlan_id(upper));
10511051
}

0 commit comments

Comments
 (0)