Skip to content

Commit 3625920

Browse files
mkubecekdavem330
authored andcommitted
teaming: fix vlan_features computing
__team_compute_features() uses netdev_increment_features() to combine vlan_features of slaves into vlan_features of the team. As netdev_increment_features() only adds most features and we start with TEAM_VLAN_FEATURES, we can end up with features none of the slaves provided. Initialize vlan_features only with the flags which are both in TEAM_VLAN_FEATURES and NETIF_F_ALL_FOR_ALL. Right now there is no such feature so that we actually initialize vlan_features with zero but stating it explicitely will make the code more future proof. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a9b3ace commit 3625920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/team/team.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ static void team_port_disable(struct team *team,
968968
static void __team_compute_features(struct team *team)
969969
{
970970
struct team_port *port;
971-
u32 vlan_features = TEAM_VLAN_FEATURES;
971+
u32 vlan_features = TEAM_VLAN_FEATURES & NETIF_F_ALL_FOR_ALL;
972972
unsigned short max_hard_header_len = ETH_HLEN;
973973
unsigned int flags, dst_release_flag = IFF_XMIT_DST_RELEASE;
974974

0 commit comments

Comments
 (0)