Skip to content

Commit a9b3ace

Browse files
mkubecekdavem330
authored andcommitted
bonding: fix vlan_features computing
bond_compute_features() uses netdev_increment_features() to combine vlan_features of slaves into vlan_features of the bond. As netdev_increment_features() only adds most features and we start with BOND_VLAN_FEATURES, we can end up with features none of the slaves provided. If there is at least one slave, initialize vlan_features only with the flags in NETIF_F_ALL_FOR_ALL. Right now there is none in BOND_VLAN_FEATURES but stating it explicitely will make the code more future proof. Signed-off-by: Michal Kubecek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent da08143 commit a9b3ace

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ static void bond_compute_features(struct bonding *bond)
10381038

10391039
if (!bond_has_slaves(bond))
10401040
goto done;
1041+
vlan_features &= NETIF_F_ALL_FOR_ALL;
10411042

10421043
bond_for_each_slave(bond, slave, iter) {
10431044
vlan_features = netdev_increment_features(vlan_features,

0 commit comments

Comments
 (0)