Repository navigation
fix(minimald): answer NODATA, not NXDOMAIN, for a stopped shared-address box - #2020
norrietaylor merged 3 commits into
Conversation
The SessionMessage::Stop arm called deregister_hostname(false), which removed the name row from the hostname registry — a lookup then answered NXDOMAIN. NET-128 requires the name to stay held (so the zone never says the box never existed) but answer NODATA while the box is stopped, so the node's own listener at that port is not spoken for by a dead box. Replace deregister_hostname(false) with mark_stopped(record.id), gated on owns_hostname_route. The NameMarker in the host's exit path also calls mark_stopped (idempotent), and mark_running on resume clears the marker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughOn Linux, stopping a session now marks its owned hostname route as stopped instead of deregistering it. The name and publish resources remain held, while DNS resolution suppresses stopped boxes published at the shared node address. Tests cover name retention and route resolution. ChangesHostname route stop behavior
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Stopped shared-address names no longer expose a proxy route, and the route becomes available again when the host resumes. No actionable merge-blocking risk remains in the reviewed changes. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✠8000 ¨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit watches names stay near, Comment |
|
[inbox-patch:clobber] This PR would revert recently merged workSimulating this merge shows it undoing commits that landed on the base branch within the last 3 day(s):
Before merging, restore the reverted region to its state on the base branch. The rest of this PR is unaffected. If a listed commit is one this PR intends to supersede, say so and merge — this check reports, it does not block. |
|
The [inbox-patch:clobber] report above is a false positive. The branch already contains origin/main (a248caf is an ancestor of the head), and the diff against main is +81/-8: only the |
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
Keeping the route on stop (NET-013) left the host-side proxy forwarding a stopped shared-address box's requests to the node's own listener. resolve now applies the same NET-128 gate as zone_answer: the name stays held, but no route is handed out while the box is stopped on the node's address.
|
@coderabbitai review |
|
|
/review |
|
@coderabbitai review |
|
There was a problem hiding this comment.
minimal-review approved this head (02d14d4, which adds the NET-128 proxy gate); CodeRabbit reviewed it incrementally with no new findings; 0 unresolved threads; all lanes green.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVSwNvA
A stopped shared-address box's name answered NXDOMAIN on the actor Stop path. The
SessionMessage::Stoparm calledderegister_hostname(false), which removed the name row from the hostname registry. NET-128 requires the name to stay held (never NXDOMAIN for a box that exists) but answer NODATA while stopped, so the node's own listener at that port is not spoken for by a dead box.Change: replace
deregister_hostname(false)withmark_stopped(record.id), gated onowns_hostname_route. The host's exit path already marks stopped viaNameMarker(idempotent), andmark_runningon resume clears the marker.Verification
cargo fmt --all --check— cleancargo clippy --workspace --all-targets --locked -- -D warnings— cleancargo test --locked -p minimald --lib session::— 93 passed (includes newstopped_shared_address_box_is_nodata_through_actor)Known follow-up (out of scope)
The route is now kept on an actor Stop, so the HTTP hostname proxy's
HostnameRegistry::resolvestill returns a route for a stopped shared-address box and forwards a request by name tonode_address:port. The DNS side (zone_answer) already refuses this under NET-128; the proxy has no matching stopped gate. Host-exit stops already behaved this way, so this PR does not introduce it, but it widens it to every actor Stop. Follow-up: have the proxy refuse a route whose session is stopped when its address equals the node address, mirroring thezone_answercheck.Summary by CodeRabbit