Skip to content

Commit 7cc09b8

Browse files
borkmannmehmetb0
authored andcommitted
bonding: Fix initial {vlan,mpls}_feature set in bond_compute_features
BugLink: https://bugs.launchpad.net/bugs/2102181 [ Upstream commit d064ea7fe2a24938997b5e88e6b61cbb0a4bb906 ] 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 <daniel@iogearbox.net> Cc: Nikolay Aleksandrov <razor@blackwall.org> Cc: Ido Schimmel <idosch@idosch.org> Cc: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/20241210141245.327886-2-daniel@iogearbox.net Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
1 parent 30c20fd commit 7cc09b8

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

14901490
if (!bond_has_slaves(bond))
14911491
goto done;
1492-
vlan_features &= NETIF_F_ALL_FOR_ALL;
1493-
mpls_features &= NETIF_F_ALL_FOR_ALL;
1492+
1493+
vlan_features = netdev_base_features(vlan_features);
1494+
mpls_features = netdev_base_features(mpls_features);
14941495

14951496
bond_for_each_slave(bond, slave, iter) {
14961497
vlan_features = netdev_increment_features(vlan_features,

0 commit comments

Comments
 (0)