A flood goes to ports that are up, not to every port nobody shut (#1273) #1275
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!1275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/flood-port-state"
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?
A flood goes to ports that are up, not to every port nobody shut
Fixes #1273.
The bug
_forwardL2()built its broadcast list fromactiveInterfaces(), which filtersenabledand nothing else. Soevery broadcast was queued to every spare port, dropped on delivery, and
show interfacesreported discardson ports that were never part of the path. Twelve discards on a two-switch lab, none of them anybody's fault
and none of them actionable — and a spare port could not report the truth, which is that nothing has used it.
A real switch floods to ports that are up, not to every port it owns.
Now
Device.ifaceStatus(iface, topo), the ruleshow interfaces,show arp,show mac address-table,show ip route, BGP, OSPF, LAG selection and thecanvas already share (eight callers; the list is now in
docs/LINK-STATE.md);engine/lag.js,in one place, and the timeline records what it skipped (#1263). Applying the same test twice made the
bundle's own record unreachable — it did, in this branch, before that exception was added. The suite caught
it;
0 packets input, 0 packets outputwith no discard line;port is still a real discard, still counted.
Evidence
test/flood-port-state.test.js— 19 checks:traffic still reports output — the fix cannot be "count nothing";
unanswered ARP;
Reverting
engine/simulator.jsfails 3. Thelag-member-downsuite (30 checks) still passes, which is whatpins the bundle exception.
Found on the way, filed as #1274
computeStp()still counts a shut port — and a port whose far end is shut — as an edge of the tree. In afour-switch ring,
shutdownon one port leaves a switch with no path while pulling the same cable heals it;correcting the tree is not enough, because the forwarding path then still breaks (brute-force measurements,
MAC learned on the wrong side, a host caching its own address). Both are written up in #1274 with the tables;
this PR does not claim to fix it.
Suite: 150 suites, 6,304 assertions, 0 failed.