aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSridhar Samudrala <sridhar.samudrala@intel.com>2015-10-12 11:39:09 -0700
committerJiri Pirko <jiri@resnulli.us>2015-10-12 21:26:00 +0200
commit2a8cadd5a72ae8c02a3637236fd92d57d2c484aa (patch)
tree4107c8bba4cb848252df3056197d18b036365a36
parent49fa51c1e486a7b998840fd90e45926029c2a607 (diff)
downloadlibteam-2a8cadd5a72ae8c02a3637236fd92d57d2c484aa.tar.gz
teamd: Fix member port state change on master team admin UP.
commit beb831fdc19195aecb365c4b48b6d8451c59251c caused member ports state to be changed to CURRENT when master team device is brought UP. This is not correct as the partner may still be DOWN. Set it to EXPIRIED and let the state go CURRENT after receiving a LACPDU from the partner. Fixes: 61fd9e61fd ("teamd: Fix member port state change on master team admin UP.") Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-rw-r--r--teamd/teamd_runner_lacp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 1cfef36..1af3b17 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1314,12 +1314,13 @@ static int lacp_event_watch_admin_state_changed(struct teamd_context *ctx,
bool admin_state;
int err;
+ admin_state = team_get_ifinfo_admin_state(ctx->ifinfo);
+
teamd_for_each_tdport(tdport, ctx) {
struct lacp_port *lacp_port = lacp_port_get(lacp, tdport);
- admin_state = team_get_ifinfo_admin_state(ctx->ifinfo);
err = lacp_port_set_state(lacp_port,
- admin_state?PORT_STATE_CURRENT:PORT_STATE_DISABLED);
+ admin_state?PORT_STATE_EXPIRED:PORT_STATE_DISABLED);
if (err)
return err;
}