Skip to content

Commit 0115c37

Browse files
borkmannSasha Levin
authored andcommitted
bonding: Fix initial {vlan,mpls}_feature set in bond_compute_features
[ Upstream commit d064ea7 ] If a bonding device has slave devices, then the current logic to derive the feature set for the master bond device is limited in that flags which are fully supported by the underlying slave devices cannot be propagated up to vlan devices which sit on top of bond devices. Instead, these get blindly masked out via current NETIF_F_ALL_FOR_ALL logic. vlan_features and mpls_features should reuse netdev_base_features() in order derive the set in the same way as ndo_fix_features before iterating through the slave devices to refine the feature set. Fixes: a9b3ace ("bonding: fix vlan_features computing") Fixes: 2e770b5 ("net: bonding: Inherit MPLS features from slave devices") Signed-off-by: Daniel Borkmann <[email protected]> Cc: Nikolay Aleksandrov <[email protected]> Cc: Ido Schimmel <[email protected]> Cc: Jiri Pirko <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Hangbin Liu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent a25b91f commit 0115c37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,8 +1562,9 @@ static void bond_compute_features(struct bonding *bond)
15621562

15631563
if (!bond_has_slaves(bond))
15641564
goto done;
1565-
vlan_features &= NETIF_F_ALL_FOR_ALL;
1566-
mpls_features &= NETIF_F_ALL_FOR_ALL;
1565+
1566+
vlan_features = netdev_base_features(vlan_features);
1567+
mpls_features = netdev_base_features(mpls_features);
15671568

15681569
bond_for_each_slave(bond, slave, iter) {
15691570
vlan_features = netdev_increment_features(vlan_features,

0 commit comments

Comments
 (0)