Delegation05 (delegation05)

Status: Final

Purpose

  • Verify that NS names used for the tested zone are not aliases (CNAME targets).

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • NS names from methods.Method2and3.
    • Addressed NS from methods.Method4 and methods.Method5.
    • Recursive lookup function (recurse) for non-in-bailiwick NS names.
  • Profile/config knobs that affect behavior:
    • net.ipv4 and net.ipv6: disabled transports emit transport-debug tags and skip per-NS-IP in-bailiwick checks.
    • resolver.defaults.parallel: parallel in-bailiwick NS-IP query fanout.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Get NS name list from Method2and3.
  3. Get delegation and child addressed NS lists (Method4 and Method5), merge into a unique map keyed by name/ip, and sort keys.
  4. For each NS name from step 2:
    • If NS name is in-bailiwick of tested zone:
      • For each merged addressed NS (name/ip) in sorted order (parallelized):
        • Build args {ns, query_name, rrtype=A}.
        • If transport is disabled for that addressed NS, emit IPV4_DISABLED or IPV6_DISABLED and skip.
        • Query addressed NS for A with recursion disabled (RD=0).
        • If no DNS message, emit NO_RESPONSE.
        • Else if RCODE != NOERROR, emit UNEXPECTED_RCODE.
        • Else if answer contains CNAME, emit NS_IS_CNAME (nsname).
        • Else if response is a referral/redirect, perform recursive retry (RD=1) against same addressed NS and emit NS_IS_CNAME if answer contains CNAME.
    • Else (sibling/out-of-bailiwick):
      • Perform recursive lookup via recurse.
      • Emit NS_IS_CNAME if recursive answer contains CNAME.
  5. After all NS names, if NS_IS_CNAME was never emitted, emit NO_NS_CNAME.
  6. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
IPV4_DISABLEDIPv4 in-bailiwick per-NS-IP check is skipped because IPv4 is disabled.
IPV6_DISABLEDIPv6 in-bailiwick per-NS-IP check is skipped because IPv6 is disabled.
NO_NS_CNAMENo NS_IS_CNAME finding was produced in testcase execution.
NO_RESPONSEIn-bailiwick A query (RD=0) produced no DNS message.
NS_IS_CNAMENS name resolves as CNAME in direct or recursive branch.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.
UNEXPECTED_RCODEIn-bailiwick A query (RD=0) returned non-NOERROR response code.

Tag Arguments

TagArgument keyTypeMeaning
IPV4_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv4.
IPV4_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDrrtypestringrrtype skipped (A).
IPV6_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv6.
IPV6_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_DISABLEDrrtypestringrrtype skipped (A).
NO_NS_CNAME--No arguments.
NO_RESPONSEnsstringNameserver identity (ns name only; use address for IP) that did not return DNS message.
NO_RESPONSEaddressstringNameserver IP address for the same endpoint.
NO_RESPONSEquery_namestringNS name queried for type A.
NO_RESPONSErrtypestringQueried rrtype (A).
NS_IS_CNAMEnsnamestringNS name found as CNAME.
TEST_CASE_ENDtestcasestringTestcase display name (Delegation05).
TEST_CASE_STARTtestcasestringTestcase display name (Delegation05).
UNEXPECTED_RCODEnsstringNameserver identity (ns name only; use address for IP) that returned unexpected RCODE.
UNEXPECTED_RCODEaddressstringNameserver IP address for the same endpoint.
UNEXPECTED_RCODEquery_namestringNS name queried for type A.
UNEXPECTED_RCODErrtypestringQueried rrtype (A).
UNEXPECTED_RCODErcodestringReturned DNS response code string.

Severity Levels Per Tag

TagLevelNotes
IPV4_DISABLEDDEBUGDefault from share/profile.json (test_levels.DELEGATION).
IPV6_DISABLEDDEBUGDefault from share/profile.json (test_levels.DELEGATION).
NO_NS_CNAMEINFODefault from share/profile.json (test_levels.DELEGATION).
NO_RESPONSEDEBUGDefault from share/profile.json (test_levels.DELEGATION).
NS_IS_CNAMEERRORDefault from share/profile.json (test_levels.DELEGATION).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.DELEGATION).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.DELEGATION).
UNEXPECTED_RCODEWARNINGDefault from share/profile.json (test_levels.DELEGATION).

Differences From Upstream

  • Upstream reference: delegation05.md
  • Differences (Upstream vs Gonemaster):
    • Upstream: special-procedure text is generic about disabled transports. Gonemaster: explicitly emits IPV4_DISABLED/IPV6_DISABLED only in the in-bailiwick per-NS-IP branch.
    • Upstream: describes recursive sibling/out-of-bailiwick branch as DNS lookup followed by CNAME check. Gonemaster: does that CNAME check, but does not emit NO_RESPONSE or UNEXPECTED_RCODE in that branch.
    • Upstream: does not describe testcase boundary debug markers. Gonemaster: emits TEST_CASE_START and TEST_CASE_END.
  • Potential upstream report:
    • no

Edge Cases And Limitations

  • NS_IS_CNAME can be emitted multiple times for the same NS name from different addressed NS checks.
  • In-bailiwick checks are performed against all unique name/ip entries from delegation+child sets, not only the tested NS name’s own addresses.
  • NO_NS_CNAME is emitted whenever no NS_IS_CNAME was found, even if other warning/debug tags were emitted.