TRACEROUTE: stop at a down link or a shut port, and name it (#1516) #1610
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!1610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-0505"
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?
Fixes #1516
What was wrong
traceroutenever consulted link state in what it reported. With a cable pulled mid-path,pingfailed honestly withlink downwhile the trace printed thirty identical* no replyhops and never named the drop the engine had recorded. Thesuccessflag was already correct; the evidence was not.(I checked the issue's own premise first: there is no
tracePathanywhere in this repository —engine/simulator.jstraceroute()is the trace path, and it never returnsarrived: trueover a down link. What it does do is say nothing about why it stopped, which is the real defect and what this fixes.)What changed
engine/simulator.jstraceroute(): each silent hop now carriesdropped— the discard reason recorded for that probe. A structural cause (peer port shut,link administratively down,link down,no egress ports,ACL,VLAN not allowed) is looked for before_lastDiscard()'s ranking, because the ranking puts theno ARP reply from Xconclusion above an unrankedlink down— right for ping, wrong for a trace.engine/cli.js_traceroute(): prints the reason beside the star —2 * no reply (link down (dropped by d2)).Verification
test/icmp-errors-traceroute.test.js— 15 new checks, 54/54. Against the previous simulator 7 fail, includingexpected 2, got 30andundefinedfor the cause.success: false, 2 hops, hop 2dropped: 'link down (dropped by d2)'dropped: 'peer port shut (...)'2 * no reply (link down ...), no hop 3,% destination not reached after 2 hopsFull suite 267 suites / 9658 assertions / 0 failed;
node scripts/syntax-check.js337 files OK.Not done
The issue also asked that a trace never be more optimistic than the data plane. It already isn't on
success; I verified that with a ping/trace pair per cable position. No new features were added.baa83c8aec0e6c78b961