Address02

Status: Final

Purpose

  • Verify that every unique nameserver IP address has a usable reverse DNS PTR mapping.
  • Distinguish between negative PTR results and total lack of PTR query response.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
    • A recursor is available on the zone object.
  • Required inputs:
  • Profile/config knobs that affect behavior:
    • resolver.defaults.parallel: controls PTR query task parallelism.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Collect nameserver entries from GlueNameservers and ApexNameservers .
  3. Build an ordered unique list by IP string:
  4. For each unique IP, execute a PTR-check task (parallelized):
    • Compute reverse lookup owner with dns.ReverseAddr.
    • Send recursive PTR query.
    • If response has NOERROR and a CNAME in answer, follow the first CNAME target with one additional PTR query.
    • If a response message exists:
      • If RCODE is not NOERROR or PTR answer set is empty, emit NAMESERVER_IP_WITHOUT_REVERSE (nsname, ns_ip).
    • If no response message exists, emit NO_RESPONSE_PTR_QUERY (domain).
  5. After all tasks complete, if at least one IP was checked and no tag besides TEST_CASE_START was emitted, emit NAMESERVERS_IP_WITH_REVERSE.
  6. Emit TEST_CASE_END.

Per-IP PTR Probe and Aggregation (steps 2-6)

collect nameserver IPs from GlueNameservers then ApexNameservers
 +- dedupe by IP string; first-seen (nsname, ip) wins
 |
 v
For each unique IP (parallel; fan-out = resolver.defaults.parallel):

   ptrQuery = dnsutil.ReverseAddr(ip)
    |
    v
   rec.Recurse(ptrQuery, PTR, IN)
    +- resp.Msg != nil, RCODE == NOERROR, CNAME in answer
    |     -> ptrQuery = first CNAME target
    |        rec.Recurse(new ptrQuery, PTR, IN)  (one hop max)
    |
    +- resp.Msg present
    |    +- RCODE != NOERROR or no PTR records   -> NAMESERVER_IP_WITHOUT_REVERSE
    |    +- otherwise                            -> (success; silent)
    +- resp.Msg absent                           -> NO_RESPONSE_PTR_QUERY

After all tasks:
  at least one IP checked AND no failure tag emitted -> NAMESERVERS_IP_WITH_REVERSE
emit TEST_CASE_END

Emitted Tags (Possible Set)

TagEmitted when
CNAME_CHAIN_TOO_LONGA discovered NS hostname’s CNAME chain exceeds CNAMEMaxChainLength while resolving its address.
CNAME_TARGET_UNRESOLVEDA discovered NS hostname’s CNAME chain forms a loop, breaks, or fails to resolve to an address.
CNAME_TOO_MANY_RECORDSA single answer while resolving a discovered NS hostname carries more than CNAMEMaxRecords distinct CNAME RRs.
NAMESERVER_IP_WITHOUT_REVERSEPTR response is present but not successful (RCODE != NOERROR) or has no PTR record.
NAMESERVERS_IP_WITH_REVERSEAll checked IPs have successful PTR answers and no PTR-query failure tag was emitted.
NO_RESPONSE_PTR_QUERYPTR recursive query returned no response message.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
CNAME_CHAIN_TOO_LONGquery_namestringThe NS hostname whose CNAME chain exceeded the depth bound.
CNAME_TARGET_UNRESOLVEDquery_namestringThe NS hostname whose CNAME target could not be resolved.
CNAME_TARGET_UNRESOLVEDcname_targetstringThe last attempted CNAME target.
CNAME_TOO_MANY_RECORDSquery_namestringThe NS hostname whose answer carried too many CNAME RRs.
NAMESERVER_IP_WITHOUT_REVERSEnsnamestringNameserver name associated with the checked IP (first-seen for that IP).
NAMESERVER_IP_WITHOUT_REVERSEns_ipstringChecked nameserver IP address.
NAMESERVERS_IP_WITH_REVERSE--No arguments.
NO_RESPONSE_PTR_QUERYdomainstringPTR owner name queried (reverse name or followed CNAME target).
TEST_CASE_ENDtestcasestringTestcase display name (Address02).
TEST_CASE_STARTtestcasestringTestcase display name (Address02).

Severity Levels Per Tag

TagLevelNotes
CNAME_CHAIN_TOO_LONGERRORDefault from share/profile.json (test_levels.ADDRESS).
CNAME_TARGET_UNRESOLVEDERRORDefault from share/profile.json (test_levels.ADDRESS).
CNAME_TOO_MANY_RECORDSERRORDefault from share/profile.json (test_levels.ADDRESS).
NAMESERVER_IP_WITHOUT_REVERSEWARNINGDefault from share/profile.json (test_levels.ADDRESS).
NAMESERVERS_IP_WITH_REVERSEINFODefault from share/profile.json (test_levels.ADDRESS).
NO_RESPONSE_PTR_QUERYWARNINGDefault from share/profile.json (test_levels.ADDRESS).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.ADDRESS).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.ADDRESS).

Differences From Upstream

  • Differences (Upstream vs Gonemaster):
    • Upstream: describes overall success/failure semantics only. Gonemaster: emits explicit diagnostic tags for pass, fail, and no-response PTR paths.
    • Upstream: does not specify PTR CNAME follow-up behavior. Gonemaster: follows one PTR CNAME hop before final PTR evaluation.
  • Potential upstream report:
    • no

Edge Cases And Limitations

  • If GlueNameservers +ApexNameservers yields no IP addresses, only TEST_CASE_START and TEST_CASE_END are emitted.
  • Duplicate IPs are checked once; if multiple nameservers share an IP, the first-seen nameserver name is used in emitted arguments.
  • Only one CNAME follow-up lookup is performed for PTR checks.