|
| 1 | +From 0e0ee4a68b118d540d9ef5836a55483fcfb8771b Mon Sep 17 00:00:00 2001 |
| 2 | +From: Pavel Shirshov < [email protected]> |
| 3 | +Date: Wed, 29 May 2019 19:15:20 +0000 |
| 4 | +Subject: [PATCH] Send LACP PDU immediately if our state changed |
| 5 | + |
| 6 | +--- |
| 7 | + teamd/teamd_runner_lacp.c | 8 ++++---- |
| 8 | + 1 file changed, 4 insertions(+), 4 deletions(-) |
| 9 | + |
| 10 | +diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c |
| 11 | +index 19592c5..a505284 100644 |
| 12 | +--- a/teamd/teamd_runner_lacp.c |
| 13 | ++++ b/teamd/teamd_runner_lacp.c |
| 14 | +@@ -1049,8 +1049,7 @@ static int lacp_port_set_state(struct lacp_port *lacp_port, |
| 15 | + return err; |
| 16 | + |
| 17 | + lacp_port_actor_update(lacp_port); |
| 18 | +- if (lacp_port->periodic_on) |
| 19 | +- return 0; |
| 20 | ++ |
| 21 | + return lacpdu_send(lacp_port); |
| 22 | + } |
| 23 | + |
| 24 | +@@ -1160,9 +1159,10 @@ static int lacpdu_process(struct lacp_port *lacp_port, struct lacpdu* lacpdu) |
| 25 | + if (err) |
| 26 | + return err; |
| 27 | + |
| 28 | ++ lacp_port_actor_update(lacp_port); |
| 29 | ++ |
| 30 | + /* Check if the other side has correct info about us */ |
| 31 | +- if (!lacp_port->periodic_on && |
| 32 | +- memcmp(&lacpdu->partner, &lacp_port->actor, |
| 33 | ++ if (memcmp(&lacpdu->partner, &lacp_port->actor, |
| 34 | + sizeof(struct lacpdu_info))) { |
| 35 | + err = lacpdu_send(lacp_port); |
| 36 | + if (err) |
| 37 | +-- |
| 38 | +2.7.4 |
| 39 | + |
0 commit comments