diff mbox series

if new state is PORT_STATE_DEFAULTED, set lacp_port->partner.state to 0x02 This ensures LACPDU is sent to update the far side when local local port transitions from default to current Currently, local port moves from default to current without sending LAC

Message ID 20181106005127.32739-1-mengkoon@live.com (mailing list archive)
State New
Headers show
Series if new state is PORT_STATE_DEFAULTED, set lacp_port->partner.state to 0x02 This ensures LACPDU is sent to update the far side when local local port transitions from default to current Currently, local port moves from default to current without sending LAC | expand

Commit Message

Meng Koon Lim Nov. 6, 2018, 12:51 a.m. UTC
Signed-off-by: Meng Koon Lim <mengkoon@live.com>
---
 teamd/teamd_runner_lacp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Meng Koon Lim Nov. 6, 2018, 12:09 p.m. UTC | #1
Apologies, I'll send a new one to clean up the subject

regards
mk
diff mbox series

Patch

diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 7b8f0a7..555aa06 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -965,7 +965,12 @@  static int lacp_port_set_state(struct lacp_port *lacp_port,
 	case PORT_STATE_DEFAULTED:
 		teamd_loop_callback_disable(lacp_port->ctx,
 					    LACP_TIMEOUT_CB_NAME, lacp_port);
-		/* fall through */
+		memset(&lacp_port->partner, 0, sizeof(lacp_port->partner));
+		lacp_port->partner.state |= INFO_STATE_LACP_TIMEOUT;
+		err = lacp_port_partner_update(lacp_port);
+		if (err)
+			return err;
+		break;
 	case PORT_STATE_DISABLED:
 		memset(&lacp_port->partner, 0, sizeof(lacp_port->partner));
 		err = lacp_port_partner_update(lacp_port);