aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/team/team_mode_loadbalance.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team/team_mode_loadbalance.c')
-rw-r--r--drivers/net/team/team_mode_loadbalance.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index c92fa02d6a6..51a4b199c75 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -359,7 +359,8 @@ static int lb_tx_hash_to_port_mapping_set(struct team *team,
unsigned char hash = ctx->info->array_index;
list_for_each_entry(port, &team->port_list, list) {
- if (ctx->data.u32_val == port->dev->ifindex) {
+ if (ctx->data.u32_val == port->dev->ifindex &&
+ team_port_enabled(port)) {
rcu_assign_pointer(LB_HTPM_PORT_BY_HASH(lb_priv, hash),
port);
return 0;