lacp: "lag <n> d" and a static member list take the group out of LACP

Both paths wrote the trunk registers directly and left the protocol
running on the group, so "lag show" said disabled while the partner kept
both links in one aggregate, and re-sending the LACP line did not repair
it because the same-ports shortcut returns early. Each path now releases
the group from LACP first; for a group that never ran LACP that is a
no-op.
This commit is contained in:
d00f authored and HL Yi committed 2026-10-14 20:18:07 -05:00
1 parent bd974e0aaf
commit 0d748fa808
1 file changed
+5 -2
+5 -2
View File
@@ -535,6 +535,7 @@ void parse_lag(void)
goto err;
if (cmd_compare(2, "d")) {
lacp_lag_set(group, 0);
port_lag_members_set(group, 0);
return;
}
@@ -558,10 +559,12 @@ void parse_lag(void)
members |= ((uint16_t)1) << atoi_results_u8;
}
if (lacp_mode)
if (lacp_mode) {
lacp_lag_set(group, members); /* 0 ports also valid: removes the LAG */
else
} else {
lacp_lag_set(group, 0);
port_lag_members_set(group, members);
}
return;
err:
cmd_error("lag (show | <1-4> (d | [lacp] <port>...))\n");