Skip to content

Commit a74ac61

Browse files
committed
bonding: Fix initial {vlan,mpls}_feature set in bond_compute_features
jira LE-2974 Rebuild_History Non-Buildable kernel-5.14.0-503.40.1.el9_5 commit-author Daniel Borkmann <[email protected]> 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]> (cherry picked from commit d064ea7) Signed-off-by: Jonathan Maple <[email protected]>
1 parent ec5a406 commit a74ac61

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
@@ -1451,8 +1451,9 @@ static void bond_compute_features(struct bonding *bond)
14511451

14521452
if (!bond_has_slaves(bond))
14531453
goto done;
1454-
vlan_features &= NETIF_F_ALL_FOR_ALL;
1455-
mpls_features &= NETIF_F_ALL_FOR_ALL;
1454+
1455+
vlan_features = netdev_base_features(vlan_features);
1456+
mpls_features = netdev_base_features(mpls_features);
14561457

14571458
bond_for_each_slave(bond, slave, iter) {
14581459
vlan_features = netdev_increment_features(vlan_features,

0 commit comments

Comments
 (0)