Basic01
Status: Final
Purpose
- Determine whether the child zone exists and whether a parent zone can be identified from iterative authoritative responses.
- Detect inconsistent delegation or alias outcomes while traversing from the root toward the child zone.
Preconditions And Inputs
- Preconditions:
- A
zone.Zoneis provided with a non-empty name. - A recursor is available on the zone object.
- A
- Required inputs:
- Child zone name (
z.Name). - Root server set from
Recursor.RootServers().
- Child zone name (
- Profile/config knobs that affect behavior:
net.ipv4: enables or disables IPv4 queries.net.ipv6: enables or disables IPv6 queries.- Undelegated mode via fake addresses (
Recursor.HasFakeAddresses(child)).
Algorithm And Decision Flow
- Emit
TEST_CASE_START. - If child is root (
.), emitB01_CHILD_FOUNDandB01_ROOT_HAS_NO_PARENT, then emitTEST_CASE_ENDand return. - If child has fake addresses (undelegated context), emit
B01_CHILD_FOUNDandB01_PARENT_DISREGARDED, then emitTEST_CASE_ENDand return. - Start from root servers and iteratively probe with SOA/NS (and DNAME when needed), extending the intermediate name toward the child.
- For each probed nameserver address:
- Emit transport enable/disable tags (
IPV4_*,IPV6_*) per rrtype (SOA,NS,DNAME) and skip queries on disabled transports. - Emit
B01_SERVER_ZONE_ERRORwhen response requirements fail. - On
NXDOMAIN+AA at an intermediate name (not the child itself), additionally probe SOA for the child name on the same nameserver. If that probe returns a referral with NS records for the child, the nameserver is contradicting itself (it denies an ancestor name but still has a deeper delegation, violating RFC 8020). The probe-confirmed referral counts as a valid delegation observation (added todelegationFound), and the offending(parent NS, intermediate name)pair is recorded for the diagnostic tag. The NS is not added toaaNXDomainin this case.
- Emit transport enable/disable tags (
- Collect parent/delegation observations and emit:
B01_PARENT_FOUNDfor discovered parents.B01_PARENT_UNDETERMINEDwhen multiple parent candidates exist.B01_PARENT_NOT_FOUNDwhen none exists.B01_PARENT_NXDOMAIN_HIDES_DELEGATIONfor each parent NS that returned NXDOMAIN at an intermediate name but also has a delegation at the child.
- Emit child/delegation status:
B01_CHILD_FOUNDwhen delegation or authoritative SOA evidence exists (including delegations recovered via the NXDOMAIN-contradiction probe).B01_INCONSISTENT_DELEGATIONfor inconsistent parent-side results.B01_NO_CHILD(normal mode) orB01_CHILD_NOT_EXIST(fake-address mode) when child evidence is absent.
- Emit alias findings:
B01_CHILD_IS_ALIASper detected DNAME target.B01_INCONSISTENT_ALIASwhen multiple alias targets are found.
- Emit
TEST_CASE_END.
Mode Classification (steps 2-3)
Per-Server Probe (step 5)
Outcome Aggregation (steps 6-9)
Emitted Tags (Possible Set)
| Tag | Emitted when |
|---|---|
B01_CHILD_NOT_EXIST | No delegation/SOA evidence exists and child is in fake-address mode. |
B01_CHILD_IS_ALIAS | Child is identified as alias via DNAME evidence. |
B01_CHILD_FOUND | Child existence is confirmed (root, undelegated, delegation, or authoritative SOA path). |
B01_INCONSISTENT_ALIAS | More than one DNAME target was observed for child aliasing. |
B01_INCONSISTENT_DELEGATION | Parent-side responses for child delegation are inconsistent. |
B01_NO_CHILD | No delegation/SOA/DNAME evidence exists in normal mode (non-fake-address). Mutually exclusive with B01_CHILD_IS_ALIAS. |
B01_PARENT_DISREGARDED | Fake-address (undelegated) mode is active, so parent search is skipped. |
B01_PARENT_FOUND | At least one parent zone candidate is identified. |
B01_PARENT_NOT_FOUND | No parent zone candidate was identified from any probed nameserver response. |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | A parent nameserver returned authoritative NXDOMAIN for an intermediate empty non-terminal but also has a delegation at the child name. The contradiction violates RFC 8020. The zone is still tested via the directly-observed delegation. |
B01_PARENT_UNDETERMINED | Multiple parent zone candidates were identified. |
B01_ROOT_HAS_NO_PARENT | Child zone is root (.). |
B01_SERVER_ZONE_ERROR | SOA/NS response validation fails for a probed server/query name. |
CNAME_CHAIN_TOO_LONG | CNAME chain across recursion hops while resolving a discovered NS A/AAAA exceeds CNAMEMaxChainLength. |
CNAME_TARGET_UNRESOLVED | CNAME chain while resolving a discovered NS A/AAAA forms a loop, breaks, or fails qtype match. |
CNAME_TOO_MANY_RECORDS | A single answer for a discovered NS A/AAAA carries more than CNAMEMaxRecords distinct CNAME RRs. |
IPV4_DISABLED | IPv4 transport is disabled for queried rrtype. |
IPV4_ENABLED | IPv4 transport is enabled for queried rrtype. |
IPV6_DISABLED | IPv6 transport is disabled for queried rrtype. |
IPV6_ENABLED | IPv6 transport is enabled for queried rrtype. |
LOOP_PROTECTION | Internal traversal loop protection threshold is hit. |
TEST_CASE_END | Testcase completion marker is emitted. |
TEST_CASE_START | Testcase start marker is emitted. |
Tag Arguments
| Tag | Argument key | Type | Meaning |
|---|---|---|---|
B01_CHILD_NOT_EXIST | domain | string | Child zone name. |
B01_CHILD_IS_ALIAS | domain_child | string | Child zone name. |
B01_CHILD_IS_ALIAS | domain_target | string | Alias target name from DNAME. |
B01_CHILD_IS_ALIAS | servers | array<object> | Structured nameserver list that returned the result. |
B01_CHILD_FOUND | domain | string | Child zone name found. |
B01_INCONSISTENT_ALIAS | domain | string | Child zone name with inconsistent alias targets. |
B01_INCONSISTENT_DELEGATION | domain_parent | string | Parent zone candidate showing inconsistency. |
B01_INCONSISTENT_DELEGATION | domain_child | string | Child zone name. |
B01_INCONSISTENT_DELEGATION | servers | array<object> | Structured nameserver list tied to inconsistency. |
B01_NO_CHILD | domain_child | string | Child zone name. |
B01_NO_CHILD | domain_super | string | Next-higher domain suggested for testing. |
B01_PARENT_DISREGARDED | - | - | No arguments. |
B01_PARENT_FOUND | domain | string | Parent zone name candidate. |
B01_PARENT_FOUND | servers | array<object> | Structured nameserver list returning parent evidence. |
B01_PARENT_NOT_FOUND | - | - | No arguments. |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | ns | string | Nameserver identity (ns name only; use address for IP). |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | address | string | Nameserver IP address for the same endpoint. |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | query_name | string | Intermediate name where the parent returned NXDOMAIN. |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | domain_child | string | Child zone name that the same parent NS will delegate. |
B01_PARENT_UNDETERMINED | servers | array<object> | Structured nameserver list across competing parents. |
B01_ROOT_HAS_NO_PARENT | - | - | No arguments. |
B01_SERVER_ZONE_ERROR | query_name | string | Queried owner name that failed validation. |
B01_SERVER_ZONE_ERROR | rrtype | string | Queried rrtype (SOA or NS). |
B01_SERVER_ZONE_ERROR | ns | string | Nameserver identity (ns name only; use address for IP). |
B01_SERVER_ZONE_ERROR | address | string | Nameserver IP address for the same endpoint. |
CNAME_CHAIN_TOO_LONG | query_name | string | The qname whose CNAME chain exceeded the depth bound. |
CNAME_TARGET_UNRESOLVED | query_name | string | The qname whose CNAME target could not be resolved. |
CNAME_TARGET_UNRESOLVED | cname_target | string | The last attempted CNAME target. |
CNAME_TOO_MANY_RECORDS | query_name | string | The qname whose answer carried too many CNAME RRs. |
IPV4_DISABLED | ns | string | Nameserver identity (ns name only; use address for IP). |
IPV4_DISABLED | address | string | Nameserver IP address for the same endpoint. |
IPV4_DISABLED | rrtype | string | rrtype skipped due to transport disable. |
IPV4_ENABLED | ns | string | Nameserver identity (ns name only; use address for IP). |
IPV4_ENABLED | address | string | Nameserver IP address for the same endpoint. |
IPV4_ENABLED | rrtype | string | rrtype queried over enabled transport. |
IPV6_DISABLED | ns | string | Nameserver identity (ns name only; use address for IP). |
IPV6_DISABLED | address | string | Nameserver IP address for the same endpoint. |
IPV6_DISABLED | rrtype | string | rrtype skipped due to transport disable. |
IPV6_ENABLED | ns | string | Nameserver identity (ns name only; use address for IP). |
IPV6_ENABLED | address | string | Nameserver IP address for the same endpoint. |
IPV6_ENABLED | rrtype | string | rrtype queried over enabled transport. |
LOOP_PROTECTION | caller | string | Internal caller name that hit loop protection. |
LOOP_PROTECTION | child_zone_name | string | Child zone name under test. |
LOOP_PROTECTION | zone_name | string | Current loop zone name state. |
LOOP_PROTECTION | intermediate_query_name | string | Intermediate query name at stop point. |
TEST_CASE_END | testcase | string | Testcase display name (Basic01). |
TEST_CASE_START | testcase | string | Testcase display name (Basic01). |
Severity Levels Per Tag
| Tag | Level | Notes |
|---|---|---|
B01_CHILD_NOT_EXIST | INFO | Default from share/profile.json. |
B01_CHILD_IS_ALIAS | NOTICE | Default from share/profile.json. |
B01_CHILD_FOUND | INFO | Default from share/profile.json. |
B01_INCONSISTENT_ALIAS | ERROR | Default from share/profile.json. |
B01_INCONSISTENT_DELEGATION | ERROR | Default from share/profile.json. |
B01_NO_CHILD | ERROR | Default from share/profile.json. |
B01_PARENT_DISREGARDED | INFO | Default from share/profile.json. |
B01_PARENT_FOUND | INFO | Default from share/profile.json. |
B01_PARENT_NOT_FOUND | WARNING | Default from share/profile.json. |
B01_PARENT_NXDOMAIN_HIDES_DELEGATION | ERROR | Default from share/profile.json. |
B01_PARENT_UNDETERMINED | WARNING | Default from share/profile.json. |
B01_ROOT_HAS_NO_PARENT | INFO | Default from share/profile.json. |
B01_SERVER_ZONE_ERROR | DEBUG | Default from share/profile.json. |
CNAME_CHAIN_TOO_LONG | ERROR | Default from share/profile.json. |
CNAME_TARGET_UNRESOLVED | ERROR | Default from share/profile.json. |
CNAME_TOO_MANY_RECORDS | ERROR | Default from share/profile.json. |
IPV4_DISABLED | DEBUG | Default from share/profile.json. |
IPV4_ENABLED | DEBUG | Default from share/profile.json. |
IPV6_DISABLED | DEBUG | Default from share/profile.json. |
IPV6_ENABLED | DEBUG | Default from share/profile.json. |
LOOP_PROTECTION | DEBUG2 | Default from share/profile.json. |
TEST_CASE_END | DEBUG | Default from share/profile.json. |
TEST_CASE_START | DEBUG | Default from share/profile.json. |
Differences From Upstream
- Differences (Upstream vs Gonemaster):
- Upstream: documents
B01_NO_CHILDfor the non-existing-child outcome. Gonemaster: also emitsB01_CHILD_NOT_EXISTin fake-address mode. - Upstream: testcase summary does not list transport debug tags or
LOOP_PROTECTION. Gonemaster: emitsIPV4_*,IPV6_*, andLOOP_PROTECTION. - Upstream: no diagnostic for parent nameservers that violate RFC 8020 by returning NXDOMAIN at an intermediate empty non-terminal while still delegating a deeper child; the child is treated as nonexistent. Gonemaster: emits
B01_PARENT_NXDOMAIN_HIDES_DELEGATION, treats the directly-observed referral at the child as legitimate delegation evidence, emitsB01_CHILD_FOUND, and lets the rest of the test suite run.
- Upstream: documents
- Potential upstream report:
yes
- If yes, include:
- Upstream expected behavior: Child-not-exist path is described with
B01_NO_CHILDonly, and summary does not include transport or loop-protection tags. - Gonemaster observed behavior:
B01_CHILD_NOT_EXIST,B01_PARENT_NXDOMAIN_HIDES_DELEGATION, transport tags, andLOOP_PROTECTIONare possible emissions. - evidence:
engine/test/basic/basic.go(Basic01,ipDisabledMessage,ipEnabledMessage). - report status:
not filed
- Upstream expected behavior: Child-not-exist path is described with
Implementation Notes
The following behaviors are implementation choices, not mandated by RFC 1034/1035:
- Traversal strategy: The testcase probes iteratively from root servers using SOA, NS, and DNAME queries, extending the intermediate name toward the child zone at each step. The DNS protocol specifies the resolution model but does not define how a testcase tool should walk the hierarchy.
- Sorted
serversarguments: Nameserver lists passed in tag arguments are sorted before joining with;. Deterministic ordering simplifies reproducible output but is not a protocol requirement. - Loop protection threshold: Traversal stops at a fixed internal limit and emits
LOOP_PROTECTION. No DNS standard defines a specific iteration bound; the limit is a defensive implementation choice.
Edge Cases And Limitations
- A missing recursor causes testcase execution error before completion.
- Loop-protection fallback is defensive; when triggered it logs
LOOP_PROTECTIONand terminates the testcase early. - Child existence outcomes differ between normal and fake-address modes (
B01_NO_CHILDvsB01_CHILD_NOT_EXIST). - When a parent nameserver returns authoritative NXDOMAIN at an intermediate empty non-terminal (RFC 8020 violation) but also has a delegation at the child, the per-label SOA walk would normally stop on that NS without ever reaching the child. Basic01 issues one extra SOA probe at the child name; if that probe returns a referral, the directly-observed delegation is treated as valid evidence (added to
delegationFound, soB01_CHILD_FOUNDfires and downstream test cases run against the real child nameservers), andB01_PARENT_NXDOMAIN_HIDES_DELEGATIONis emitted to flag the contradiction. Ordinary recursive resolvers reach the data the same way because they typically query only the child name and follow the referral directly. - Nameserver list argument order is deterministic because lists are sorted before join.