Patrick reported an issue that Collecting & Distributing & Synchronization bits shouldn't be set in LACPDUs for the ports associated with standby agg. It would also cause team to work differently from bonding.
Jamie and Patrick concluded from section 5.6.1 of IEEE 802.1AX-2008: - Standby ports MAY set Collecting and Distributing bits - Standby ports MUST NOT set Synchronization bit
This patch is to fix it by setting these three sits only when the selected ports associated with a selected agg.
Reported-by: Patrick Talbert ptalbert@redhat.com Signed-off-by: Xin Long lucien.xin@gmail.com --- teamd/teamd_runner_lacp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c index 9c77fae..5601278 100644 --- a/teamd/teamd_runner_lacp.c +++ b/teamd/teamd_runner_lacp.c @@ -913,9 +913,10 @@ static void lacp_port_actor_update(struct lacp_port *lacp_port) state |= INFO_STATE_LACP_ACTIVITY; if (lacp_port->lacp->cfg.fast_rate) state |= INFO_STATE_LACP_TIMEOUT; - if (lacp_port_selected(lacp_port)) - state |= INFO_STATE_SYNCHRONIZATION; - state |= INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING; + if (lacp_port_selected(lacp_port) && + lacp_port_agg_selected(lacp_port)) + state |= INFO_STATE_SYNCHRONIZATION | + INFO_STATE_COLLECTING | INFO_STATE_DISTRIBUTING; if (lacp_port->state == PORT_STATE_EXPIRED) state |= INFO_STATE_EXPIRED; if (lacp_port->state == PORT_STATE_DEFAULTED)
Wed, Apr 26, 2017 at 07:44:41PM CEST, lucien.xin@gmail.com wrote:
Patrick reported an issue that Collecting & Distributing & Synchronization bits shouldn't be set in LACPDUs for the ports associated with standby agg. It would also cause team to work differently from bonding.
Jamie and Patrick concluded from section 5.6.1 of IEEE 802.1AX-2008:
- Standby ports MAY set Collecting and Distributing bits
- Standby ports MUST NOT set Synchronization bit
This patch is to fix it by setting these three sits only when the selected ports associated with a selected agg.
Reported-by: Patrick Talbert ptalbert@redhat.com Signed-off-by: Xin Long lucien.xin@gmail.com
Applied, thanks.
libteam@lists.fedorahosted.org