You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NSEC walk and delegation NS lookup ignore -attempts; one lost packet ends them #482
The NSEC walk sends one UDP exchange per step with no retry, and any error ends the walk; -attempts does not apply. The partial walk is then saved as settled, so -resume does not retry it. Similarly, the delegation check caches its one name server lookup in a sync.Once, so a single timeout disables every SERVFAIL delegation check for the rest of the scan.
Where
internal/dns/nsecwalk.go:95-98 (if err != nil { res.Stop = err.Error(); return res }), :154 (one exchange per step)
internal/dns/nsecwalk.go:96 (WalkOptions has no Attempts)
internal/cli/resume.go:570-572 (walk saved under AXFRDone)
internal/scan/delegation.go:51-76 (parentZone.servers in a sync.Once)
Impact
On a zone of a few thousand names walked over UDP at a modest -rate, one dropped datagram truncates the listing with nsec_stop set to an i/o timeout. Later names are never proposed, and a resumed or Action-resumed run keeps the truncated list. Dangling-NS detection for SERVFAIL names (#406) silently turns off after one transient timeout.
Suggested fix
Add Attempts to WalkOptions and retry walkStep on timeouts and temporary errors (each retry takes a -rate slot and counts toward the query limit), wired from -attempts.
Do not mark a walk that stopped on a network error as settled in the resume state.
In parentZone, retry the NS lookup on the next check when the failure was a timeout rather than a definite answer.
Acceptance criteria
A lab server that drops one query mid-chain: the walk completes with -attempts 2.
A resumed run retries a walk that stopped on a timeout.
Filed by repo-audit/full-audit at a45b999. Severity: low. Effort: M. audit-key: reliability|internal/dns/nsecwalk.go|WalkNSEC
Activity