[libteam] Send updates as soon as we need to update the LACP partner about changes (#2955)

This commit is contained in:
pavel-shirshov 2019-05-30 13:26:32 -07:00 committed by GitHub
parent 6ca35b55d6
commit 3f4de49e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From 0e0ee4a68b118d540d9ef5836a55483fcfb8771b Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Wed, 29 May 2019 19:15:20 +0000
Subject: [PATCH] Send LACP PDU immediately if our state changed
---
teamd/teamd_runner_lacp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c
index 19592c5..a505284 100644
--- a/teamd/teamd_runner_lacp.c
+++ b/teamd/teamd_runner_lacp.c
@@ -1049,8 +1049,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port,
return err;
lacp_port_actor_update(lacp_port);
- if (lacp_port->periodic_on)
- return 0;
+
return lacpdu_send(lacp_port);
}
@@ -1160,9 +1159,10 @@ static int lacpdu_process(struct lacp_port *lacp_port, struct lacpdu* lacpdu)
if (err)
return err;
+ lacp_port_actor_update(lacp_port);
+
/* Check if the other side has correct info about us */
- if (!lacp_port->periodic_on &&
- memcmp(&lacpdu->partner, &lacp_port->actor,
+ if (memcmp(&lacpdu->partner, &lacp_port->actor,
sizeof(struct lacpdu_info))) {
err = lacpdu_send(lacp_port);
if (err)
--
2.7.4

View File

@ -8,3 +8,4 @@
0011-libteam-resynchronize-ifinfo-after-lost-RTNLGRP_LINK-.patch
0012-teamd-do-not-process-lacpdu-before-the-port-ifinfo-i.patch
0013-teamd-lacp-port-admin-down-recv-not-processing.patch
0014-Send-LACP-PDU-immediately-if-our-state-changed.patch