@@ -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);
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 <mengkoon@live.com> --- teamd/teamd_runner_lacp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)