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>
This commit is contained in:

committed by
David S. Miller

parent
122bb046bc
commit
52a4fd7780
@@ -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;
|
||||
|
Reference in New Issue
Block a user