vlan: a range typed high-to-low is refused, not silently reversed #1831
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1831
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1117-1100"
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?
One question
switchport trunk allowed vlan 30-20— a VLAN range whose two ids are the wrong way round. Does the box read it as20-30, or refuse the line?Verdict
It refuses. PacketForge flipped it:
engine/vlan.jsswapped the pair and carried on, soconfigured VLANs nobody named, and
show interfaces/show running-configthen reported the swap as though it were what was typed. Nothing in the lab showed the line had been rewritten.Evidence
The box's own wording for the refusal was not found, so the console uses its own sentence (its established style for refusals) rather than inventing a Cisco string.
Change
engine/vlan.js:parseVlanListfails withE_VLAN_RANGE_ORDERon a descending pair instead of swapping it; the range is quoted and the ascending form named. Applies to<list>,add <list>andremove <list>— one parser.docs/CLI.md: the rule and the refusal, next to the trunk-list section.research/vlan-range-order.md: evidence, what is inferred (exact wording), what is unresolved (wording; whether20-20is legal; other vlan-list consumers).test/vlan.test.js(the old test asserting the silent swap is replaced),test/trunk-allowed-add-remove.test.js(set/add/remove refused, list untouched, ascending range still works).Gates
node scripts/syntax-check.js— 384 files, all OKnode scripts/check-control-bytes.js— cleannpm test— 312 suites, 10,905 assertions, 0 failedUnresolved: the box's exact sentence for a transposed range (careted parse error vs
%line); nothing public collected here shows one.b74433ab4439cb6cacde