the first openFlow on a fresh topology always fails E_UNREACHABLE #1518

Closed
opened 2026-11-15 18:01:07 +00:00 by jaylouisw · 0 comments
Owner

On a freshly built topology the first openFlow returns E_UNREACHABLE; runs 2 and 3 on the same topology return ok: true. The ARP resolution loses the SYN and the flow does not retry.

The root cause is placement: ARP caches, MAC tables and dev.pending live on the Topology rather than on the Simulator, so a check's answer depends on what ran before it.

Why it matters: it is a false fail for a connectivity check and a false pass for an isolation check, and it makes any check library order-dependent - which destroys the property the whole library rests on, that the same question asked twice gets the same answer.

Where: engine/simulator.js openFlow; state ownership across engine/topology.js and engine/simulator.js.

Suggested fix (minimal): retry the resolved flow once when the failure is E_UNREACHABLE with a pending ARP entry. Better: move run-state off the topology so two evaluations of the same topology cannot differ.

On a freshly built topology the first `openFlow` returns `E_UNREACHABLE`; runs 2 and 3 on the same topology return `ok: true`. The ARP resolution loses the SYN and the flow does not retry. The root cause is placement: ARP caches, MAC tables and `dev.pending` live on the Topology rather than on the Simulator, so a check's answer depends on what ran before it. **Why it matters:** it is a false fail for a connectivity check and a false pass for an *isolation* check, and it makes any check library order-dependent - which destroys the property the whole library rests on, that the same question asked twice gets the same answer. **Where:** `engine/simulator.js` `openFlow`; state ownership across `engine/topology.js` and `engine/simulator.js`. **Suggested fix (minimal):** retry the resolved flow once when the failure is `E_UNREACHABLE` with a pending ARP entry. **Better:** move run-state off the topology so two evaluations of the same topology cannot differ.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1518
No description provided.