When a slave may no longer participate in a LACP bond, it is polite
to transmit a notification indicating so. This will allow the
remote partner to adapt more quickly. The specification does not
indicate what to do in this situation. This patch emulates the
Linux bonding stack.
---
lib/lacp.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lib/lacp.c b/lib/lacp.c
index 7c71335..7135502 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -219,6 +219,15 @@ lacp_slave_register(struct lacp *lacp, const void *slave_,
const char *name,
void
lacp_slave_unregister(struct lacp *lacp, const void *slave_)
{
+ struct slave *slave = slave_lookup(lacp, slave_);
+ struct lacp_pdu pdu;
+ struct lacp_info actor;
+
+ slave_get_actor(slave, &actor);
+ actor.state &= ~(LACP_STATE_SYNC | LACP_STATE_AGG);
+ compose_lacp_pdu(&actor, &slave->partner, &pdu);
+ lacp->send_pdu(slave->aux, &pdu);
+
slave_destroy(slave_lookup(lacp, slave_));
}
--
1.7.4.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev