Update CNAME resolution - #1518
Conversation
|
The I’d suggest a different name for that tag. How about |
It think that is a good suggestion. Should there be another tag, For me |
|
Yes, a In any case, I don’t think the ERROR level is appropriate for these tags because they do not indicate a problem so severe that the zone is unresolvable. |
|
@tgreenx, will you fix the conflict? |
@matsduf @marc-vanderwal done, please re-review. |
Added.
Not needed, NXDOMAIN responses are already handled by the calling method ( |
There’s a subtle bug that I missed when reviewing. I’ll propose a change.
- `Zonemaster::Engine::Recursor::_resolve_cname()` now returns undef when the CNAME resolution fails, along with a new message tag: `CNAME_UNRESOLVABLE` - Update unit tests: move the content of scenario `TOO-LONG-CNAME-CHAIN` to a new scenario `TOO-MANY-CNAME`, and update scenario `TOO-LONG-CNAME-CHAIN` to check for tag `CNAME_CHAIN_TOO_LONG` instead
Co-authored-by: Marc van der Wal <103426270+marc-vanderwal@users.noreply.github.com>
…umentation updates; Re-record unit tests
0975e59 to
f7d10eb
Compare
Co-authored-by: Mats Dufberg <mats.dufberg@iis.se>
|
|
||
| =item CNAME_LOOP_INNER | ||
|
|
||
| This message tag indicates that there is a loop in the CNAME RRset of the current response. |
There was a problem hiding this comment.
I am not sure what you mean. All members of an RRset has always the same owner name. Is the following what you mean?
| This message tag indicates that there is a loop in the CNAME RRset of the current response. | |
| This message tag indicates that there is a loop in the CNAME record, i.e. the target name is identical to the owner name. |
There was a problem hiding this comment.
No, rather that there is a loop in the CNAME chain from within a single DNS response, e.g.:
example.tld CNAME target1.example.tld
target1.example.tld CNAME example.tld
|
|
||
| =item CNAME_LOOP_OUTER | ||
|
|
||
| This message tag indicates that the CNAME target has already been followed in a previous lookup. |
There was a problem hiding this comment.
Unclear. Is the following what you mean?
| This message tag indicates that the CNAME target has already been followed in a previous lookup. | |
| This message tag indicates that the target name of the last CNAME record in a chain is identical to a previous CNAME record in the same chain. |
There was a problem hiding this comment.
I guess yes, but specifically when doing additional CNAME lookups. So it is a loop too, but not from within a single response (i.e lookup) this time but another one, e.g:
Query 1 (example.tld) -> Response 1:
example.tld CNAME example.other
Query 2 (example.other) -> Response 2:
example.other CNAME example.tld
|
|
||
| =item CNAME_NO_MATCH | ||
|
|
||
| This message tag indicates that there is a record of the requested type but with different owner name than the CNAME target. |
There was a problem hiding this comment.
Does this refer to the answer section? That it contains a CNAME record and another DNS record matching the QTYPE but not the CNAME target name?
Co-authored-by: Mats Dufberg <mats.dufberg@iis.se>
|
@matsduf As discussed I've made another pass on the documentation, please re-review |
Purpose
This PR slightly updates the CNAME resolution of Engine's recursor. See the
Changessection below.Updated test scenarios are defined in zonemaster/zonemaster#1477.
Context
zonemaster/zonemaster#1477
Also fixes zonemaster/zonemaster#1505
Changes
Zonemaster::Engine::Recursor::_resolve_cname()now returns undef when the CNAME resolution fails, along with new message tags:CNAME_UNRESOLVABLE(ERROR level) andCNAME_TO_NODATA(DEBUG level)TOO-LONG-CNAME-CHAINto a new scenarioTOO-MANY-CNAME,TOO-LONG-CNAME-CHAINto check for tagCNAME_CHAIN_TOO_LONGinsteadUNRESOLVABLE-CNAMECNAME-CHAIN-TO-NODATAHow to test this PR
Unit tests are updated and should pass.