W_SPEED_DOWNGRADE cannot fire when only one end is speed-limited #1523
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1523
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
validation.js:806raisesW_SPEED_DOWNGRADEonly when the negotiated rate is below both ends' maximum.Measured: a 10G RJ45 port meeting a 1G RJ45 port negotiates 1000 and emits no code at all - which is the common real case, and precisely the case a homelab cares about. Two 10G ports forced onto 1000BASE-T do warn, so the warning exists for the rarer situation and is silent for the common one.
Why it matters: "a 10G-capable link never negotiates 1G" is one of the intent checks, and it cannot be built on a predicate that is blind exactly where it is needed. Note also that
canMate().speedMbpsanswers best-case socket speed while the link record answers actual cable speed - the two differ in the downgrade case, as recorded indocs/CONNECTORS.md.Suggested fix: warn when the negotiated rate is below either end's capability, unless the link carries an explicit exemption (a deliberately 1G optic in a 10G cage is legitimate and common). Keep the existing both-ends code for the case where a downgrade is unambiguously a fault.