Skip to content

WIP: iterate.c: be parent-centric in NS name resolution

Štěpán Balážik requested to merge parent_centric_ns_resolution into master

When qry->flags.NONAUTH is true (we are resolving a NS name) end the resolution once an answer is found even in glue.

Previous state lead to a weird behaviour where some IPv4 only tests in Deckard (namely iter_pcdiff.rpl) were failing with IPv6 turned off.

This was due to the resolver's internal preference towards AAAA records for NS names. With IPv6 networking on, NS name resolution was first done for AAAA record and the glue (containing A record for the NS name in question) from parent zone was in to cache.

As the AAAA resolution failed (there is no AAAA for this NS name), A was queried next and was satisfied from cache.

With IPv6 off, there is no query for the AAAA record, so no A record from glue gets put in to the cache. A record is resolved first, resolution ignores the glue in parent zone and continue to the child zone which might be (and in the case of iter_pcdiff.rpl intentionally is) broken.

Edited by Štěpán Balážik

Merge request reports