lag.validateLag's per-member checks never run because no caller passes memberPorts #1524

Closed
opened 2026-11-15 18:01:13 +00:00 by jaylouisw · 0 comments
Owner

engine/lag.js has per-member speed, duplex and VLAN checks (:216-291), but engine/cli.js:4565 calls validateLag(lag) with no memberPorts, so those loops are skipped.

Measured: a 1G port and a 10G SFP+ bundled into lag1 produce no warning at all, while the same call with memberPorts supplied correctly returns E_LAG_SPEED_MISMATCH.

Related: E_LAG_SPEED_MISMATCH from validation.js:743 reads dev.lags, which nothing creates (the CLI writes dev.config.lags), and it needs iface.lagId on both ends, which channel-group never sets - so that path cannot fire either.

Why it matters: a bundle of mismatched members is a real misconfiguration that produces intermittent, confusing failure, and the engine has the check but no one calls it.

Suggested fix: pass the resolved member list from the channel-group handler, and make one of the two LAG-speed paths real rather than two of them dead.

`engine/lag.js` has per-member speed, duplex and VLAN checks (`:216-291`), but `engine/cli.js:4565` calls `validateLag(lag)` with no `memberPorts`, so those loops are skipped. Measured: a 1G port and a 10G SFP+ bundled into `lag1` produce no warning at all, while the same call with `memberPorts` supplied correctly returns `E_LAG_SPEED_MISMATCH`. Related: `E_LAG_SPEED_MISMATCH` from `validation.js:743` reads `dev.lags`, which nothing creates (the CLI writes `dev.config.lags`), and it needs `iface.lagId` on both ends, which `channel-group` never sets - so that path cannot fire either. **Why it matters:** a bundle of mismatched members is a real misconfiguration that produces intermittent, confusing failure, and the engine has the check but no one calls it. **Suggested fix:** pass the resolved member list from the `channel-group` handler, and make one of the two LAG-speed paths real rather than two of them dead.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1524
No description provided.