Skip to content

Commit

Permalink
teamd: set port priority when adding port to team
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
  • Loading branch information
jpirko committed Aug 7, 2012
1 parent 99f0d4e commit c3e6519
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions teamd/teamd.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,15 @@ int teamd_port_add(struct teamd_context *ctx, const char *port_name)
return err;
}
}
err = json_unpack(port_obj, "{s:i}", "prio", &tmp);
if (!err) {
err = team_set_port_priority(ctx->th, ifindex, tmp);
if (err) {
teamd_log_err("%s: Failed to set \"priority\".",
port_name);
return err;
}
}
return 0;
}

Expand Down

0 comments on commit c3e6519

Please sign in to comment.