Skip to content

Two queries are sent when both -a and -cname flags are set #928

@nil0x42

Description

@nil0x42

Please describe your feature request:

I am not sure how to handle this, but when only A and CNAME are set, it might be a better idea to only send the A request, as resolvers will recursively resolve CNAMEs until they find A record(s).

Describe the use case of this feature:

Many people (as myself) use only -a and -cname options, and probably don't know that it doubles the queries amount. Most people using this pattern in reality would prefer using only -a, as CNAMES will be resolved anyway to reach the A records.
The behavior also applies for -aaaa coupled with -cname.

I just discovered this weird behavior while reading the source code in order to try to resolve issue #923
So it might be worth changing behavior, or at the very least, document the fact that specifying N query flags implies sending N queries per FQDN.

Metadata

Metadata

Assignees

Labels

InvestigationSomething to InvestigateType: EnhancementMost issues will probably ask for additions or changes.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions