mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
lacp: ignore a LACPDU that carries our own system id
Two ports of one group cabled to each other heard themselves and the group aggregated with itself. Sandbox T24.
This commit is contained in:
1 parent
913e9780b8
commit
0f63244ca1
2 files changed
+11
No files matched your search
@@ -292,6 +292,8 @@ void lacp_in(void) __banked
|
|||||||
uint8_t lag = lacp_port_lag[port];
|
uint8_t lag = lacp_port_lag[port];
|
||||||
if (lag == LACP_LAG_NONE)
|
if (lag == LACP_LAG_NONE)
|
||||||
return;
|
return;
|
||||||
|
if (lacp_sys_eq(LACP_I->actor.sys, uip_ethaddr.addr))
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
@@ -475,6 +475,15 @@ int main(int argc, char **argv)
|
|||||||
"T23 partner on slow rate goes quiet: dropped after our short timeout");
|
"T23 partner on slow rate goes quiet: dropped after our short timeout");
|
||||||
lacp_lag_set(1, 0);
|
lacp_lag_set(1, 0);
|
||||||
|
|
||||||
|
/* T24: a LACPDU carrying our own system id (two ports of one group
|
||||||
|
* cabled to each other) must not be taken for a partner. */
|
||||||
|
lacp_lag_set(1, 0x0030);
|
||||||
|
step(8);
|
||||||
|
partner_frame(4, uip_ethaddr.addr, P_ACT|P_AGG|P_TO|P_SYNC, 1);
|
||||||
|
CHECK(lacp_rx_count[4] == 0 && lacp_rx_state[4] == LACP_RX_INITIALIZE,
|
||||||
|
"T24 own system id: LACPDU ignored");
|
||||||
|
lacp_lag_set(1, 0);
|
||||||
|
|
||||||
printf("\n%s (%d failure%s)\n", failures ? "SANDBOX: FAILURES" : "SANDBOX: ALL PASS",
|
printf("\n%s (%d failure%s)\n", failures ? "SANDBOX: FAILURES" : "SANDBOX: ALL PASS",
|
||||||
failures, failures == 1 ? "" : "s");
|
failures, failures == 1 ? "" : "s");
|
||||||
return failures ? 1 : 0;
|
return failures ? 1 : 0;
|
||||||
|
|||||||
Reference in new issue
Block a user