The reason a ping failed is the earliest cause, not the last (#1431) #1432
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!1432
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/ping-reason-first-cause"
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?
Closes #1431.
pingread the run's discard events from the end backwards, so the reason it printed was the last discard — and the last one is usually the least true:The end-of-run sweep that reports unanswered ARPs always lands last in the log, so it always won. And the reply only searched events after the ping started, so a shut port noticed earlier in the run was invisible.
Fixed
peer port shut,link administratively down), silence next (no ARP reply from X), policy last (ACL … denied, VLAN, NAT) — so an ACL denial still outranks silence, and a shut port outranks both;no shutdownmakes the same ping answer again.Evidence — 10 checks
test/ping-reason-first-cause.test.js: shut port named for known and unknown targets, silence named when nothing is shut, ACL denial named over silence, restore. Revertingengine/simulator.jsfails 2/10 (quotingno ARP reply from 10.91.0.99for a shut port). One older assertion inflood-port-state.test.jspinned the old last-discard wording; it now accepts the true reason it was checking for.Suite: 216 suites, 8,144 assertions, 0 failed; syntax 284 files OK. Docs:
docs/ARCHITECTURE.md, "The reason a ping failed is the earliest cause, not the last".