Просмотр исходного кода

[lacp] Check the partner's own state when checking for blocked links

The blocked link test in eth_slow_lacp_rx() is performed before the
actor TLV is copied to the partner TLV, and so must test the actor
state field rather than the partner state field.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 6 лет назад
Родитель
Сommit
342ff967cc
1 измененных файлов: 4 добавлений и 4 удалений
  1. 4
    4
      src/net/eth_slow.c

+ 4
- 4
src/net/eth_slow.c Просмотреть файл

@@ -157,11 +157,11 @@ static int eth_slow_lacp_rx ( struct io_buffer *iobuf,
157 157
 	 * then block the link until after the next expected LACP
158 158
 	 * packet.
159 159
 	 */
160
-	if ( ~lacp->partner.state & ( LACP_STATE_IN_SYNC |
161
-				      LACP_STATE_COLLECTING |
162
-				      LACP_STATE_DISTRIBUTING ) ) {
160
+	if ( ~lacp->actor.state & ( LACP_STATE_IN_SYNC |
161
+				    LACP_STATE_COLLECTING |
162
+				    LACP_STATE_DISTRIBUTING ) ) {
163 163
 		DBGC ( netdev, "SLOW %s LACP partner is down\n", netdev->name );
164
-		interval = ( ( lacp->partner.state & LACP_STATE_FAST ) ?
164
+		interval = ( ( lacp->actor.state & LACP_STATE_FAST ) ?
165 165
 			     ( ( LACP_INTERVAL_FAST + 1 ) * TICKS_PER_SEC ) :
166 166
 			     ( ( LACP_INTERVAL_SLOW + 1 ) * TICKS_PER_SEC ) );
167 167
 		netdev_link_block ( netdev, interval );

Загрузка…
Отмена
Сохранить