The inspector panel and show interfaces describe a port's VLAN in different words - and one of them is wrong #1291
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1291
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?
show interfaces <port>prints one line saying what the port does with a frame, and the inspector panel showsthe same fact under a
VLANheading. The browser cannotrequirethe engine, so the rule exists twice — andthe two copies had drifted.
Measured on the same four ports:
Three separate lies:
looked identical to a plain access port;
|| 1on every field made an unset trunk native VLAN indistinguishable from a native VLAN of 1;classifyEgressdrops every VLAN on) was renderedtrunk · native 1 · allowed— a claim, with the list missing.The panel's rendering was also a second spelling of one fact:
access 20in the panel,access VLAN 20in theconsole, so an operator comparing the two had to translate.
What "done" looks like
engine/vlan.jsasswitchportSentence(), printed by the console afterswitchport:and mirrored inweb/app.jsfor the panel — the same string in both places:access VLAN 20access VLAN 1 · trunk staged: native 20 (not in use)trunk · native 30 · allowed 10,20trunk · native 1 · allowed nonenative VLAN from the access VLAN when the field is absent, so asking it would report a staged parameter on
every access port in a non-default VLAN;
classifyEgress:allowed allcarries every probed VLAN,allowed nonecarries none, a listed VLAN is carried, an unlisted one is not,access VLAN Ncarries N, andanything called "staged" is not carried;
list), the way
fabric-agreementandport-state-agreementcompare their mirrors.test/ui-render.test.jsnow asserts the console's words (access VLAN 20) rather than the old panel spelling.