summaryrefslogtreecommitdiff
path: root/drivers/net/team/team_mode_loadbalance.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-06-26 06:52:46 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-26 21:09:39 -0700
commit52a4fd77808662a16cd17ad3b0e1ad75e0162d8b (patch)
treecc0303069053fe0f15f4b0e0e6c652216895eb66 /drivers/net/team/team_mode_loadbalance.c
parent122bb046bcfb8f3d2d94d9f7f6b74da187a740f2 (diff)
team: do not allow to map disabled ports
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 c92fa02d6a63..51a4b199c75c 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;