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
-follow-records target swallows a later recursion candidate and blocks its expansion #481
With -recursive -follow-records, a followed record target is dispatched at the depth limit and remembered in followSeen. If its parent is found later and expanded, the regular depth-N candidate for the same name is dropped, so the name's subtree is never enumerated. Whether it is depends on wordlist order.
Where
internal/scan/dispatcher.go:528 (followed job: depth: max(d.maxDepth, 1), "a target is tested, never expanded")
internal/scan/dispatcher.go:569-574 (depth > 1 candidate skipped when in followSeen)
internal/scan/dispatcher.go:747 (isCandidate checks only already-expanded parents)
If www (early in the list) has a CNAME to app.dev.example.com before dev is found, app.dev is tested once as a followed target and its later depth-2 candidate is discarded, so nothing below it is tried. The same scan with dev earlier in the wordlist expands it. This contradicts the README's "unless they are already candidates". The dropped candidate is also not counted.
Steps to reproduce
Lab zone with www CNAME app.dev, app.dev A, v1.app.dev A, dev A. Wordlist www, dev, app, v1, flags -recursive -depth 3 -follow-records. Expected v1.app.dev found; it is not. With the wordlist reordered to dev, www, app, v1, it is.
Suggested fix
When next() meets a depth-N candidate already in followSeen, expand it if the followed lookup found it, instead of dropping it. Or give a followed job its natural depth when it is a recursion candidate under a future parent. At minimum, count the dropped candidate.
Acceptance criteria
The repro finds v1.app.dev in both wordlist orders.
Activity