teamd: lacp: send LACPDU when port state transitions from DEFAULT to CURRENT

Currently, when local port state become DEFAULTED, its Partner_State
field is set to 0x00

Bit 1 in Actor_State and Partner_State field is for LACP_Timeout. When
set, it means LACP fast is used.

If teamd_runner_lacp receives an LACPDU with Actor_State field bit 1
set, it transitions local port to CURRENT, and transmits LACPDU

If teamd_runner_lacp receives an LACPDU without Actor_State field bit 1
set, it transitions local port to CURRENT, but does not transmit LACPDU

The second scenario results in teamd starting data transmission when
partner port remains in either Defaulted or Expired state, causing
packets to be dropped by partner

Fix this by setting Partner_State field to 0x02 on the local port
when local port state transitions to DEFAULTED

Signed-off-by: Meng Koon Lim <>
Signed-off-by: Jiri Pirko <>
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 @@
 					    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;
 		memset(&lacp_port->partner, 0, sizeof(lacp_port->partner));
 		err = lacp_port_partner_update(lacp_port);