Nameserver02

Status: Final

Purpose

  • Validate EDNS(0) handling on authoritative nameservers.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • Nameserver addresses from ZoneNameservers .
    • SOA responses to queries with and without EDNS.
  • Profile/config knobs that affect behavior:
    • net.ipv4 and net.ipv6: disabled transports are skipped with transport debug tags.
    • resolver.defaults.parallel: parallel nameserver query fanout.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Read nameserver list from ZoneNameservers , deduplicate by name/ip, preserving first-seen order.
  3. For each deduplicated nameserver (parallelized, input-order merged logs):
    • If transport is disabled, emit IPV4_DISABLED or IPV6_DISABLED for rrtype SOA, mark not included in summary, and skip.
    • Mark nameserver as included in summary.
    • Send SOA query with EDNS version 0.
    • If response exists:
      • If RCODE=FORMERR and response has no OPT, emit NO_EDNS_SUPPORT.
      • Else if RCODE=NOERROR, EdnsRcode=0, answer contains SOA, and EdnsVersion=0, treat as compliant and emit no per-server error tag.
      • Else if RCODE=NOERROR and response has no OPT, emit EDNS_RESPONSE_WITHOUT_EDNS.
      • Else if RCODE=NOERROR, response has OPT, and EdnsVersion!=0, emit EDNS_VERSION_ERROR.
      • Else emit NS_ERROR.
    • If response is missing or query failed:
      • Send fallback SOA query without EDNS.
      • If fallback responds, emit BREAKS_ON_EDNS.
      • Else emit NO_RESPONSE and mark the nameserver not included in summary.
  4. Count included nameservers and included nameservers with errors.
  5. If at least one nameserver was included and none had errors, emit EDNS0_SUPPORT with sorted included name/ip list.
  6. Emit TEST_CASE_END.

Per-NS EDNS Probe and Aggregation (steps 2-6)

ns list = ZoneNameservers; dedupe by ns.String() ("name/ip"), preserve first-seen order

For each nameserver (parallel; fan-out = resolver.defaults.parallel):

   transport disabled for SOA -> IPV4_DISABLED / IPV6_DISABLED;
                                 not included in summary; skip
   mark included

   query SOA at z.Name with EDNS version 0
    +- resp present:
       RCODE == FORMERR AND no OPT
                                  -> NO_EDNS_SUPPORT (ns) (one error)
       RCODE == NOERROR AND EdnsRcode == 0 AND SOA in answer AND EdnsVersion == 0
                                  -> compliant (no error)
       RCODE == NOERROR AND no OPT
                                  -> EDNS_RESPONSE_WITHOUT_EDNS (ns, domain)
       RCODE == NOERROR AND has OPT AND EdnsVersion != 0
                                  -> EDNS_VERSION_ERROR (ns, domain)
       otherwise                  -> NS_ERROR (ns)
    +- resp missing / query error:
       fallback query SOA without EDNS
         response present         -> BREAKS_ON_EDNS (ns, domain)
         no response              -> NO_RESPONSE (ns, domain); not included

After all tasks:
  included > 0 AND no included ns had any error tag
     -> EDNS0_SUPPORT (servers = sorted included)

emit TEST_CASE_END

Emitted Tags (Possible Set)

TagEmitted when
BREAKS_ON_EDNSQuery with EDNS failed, but fallback query without EDNS got a response.
EDNS0_SUPPORTAt least one included nameserver was evaluated and none produced EDNS error findings.
EDNS_RESPONSE_WITHOUT_EDNSNOERROR response to EDNS query omitted OPT record.
EDNS_VERSION_ERRORNOERROR response to EDNS query returned OPT version other than 0.
IPV4_DISABLEDIPv4 nameserver evaluation is skipped because IPv4 is disabled.
IPV6_DISABLEDIPv6 nameserver evaluation is skipped because IPv6 is disabled.
NO_EDNS_SUPPORTEDNS query returned FORMERR without OPT record.
NO_RESPONSENeither EDNS query nor fallback non-EDNS query returned a DNS message.
NS_ERRORResponse did not match the recognized EDNS compliance/error branches.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
BREAKS_ON_EDNSnsstringNameserver identity (ns name only; use address for IP) failing on EDNS query.
BREAKS_ON_EDNSaddressstringNameserver IP address for the same endpoint.
BREAKS_ON_EDNSdomainstringTested zone name.
EDNS0_SUPPORTserversarray<object>Structured sorted included nameserver identities ({ns,address} object).
EDNS_RESPONSE_WITHOUT_EDNSnsstringNameserver identity (ns name only; use address for IP) with missing OPT in EDNS response.
EDNS_RESPONSE_WITHOUT_EDNSaddressstringNameserver IP address for the same endpoint.
EDNS_RESPONSE_WITHOUT_EDNSdomainstringTested zone name.
EDNS_VERSION_ERRORnsstringNameserver identity (ns name only; use address for IP) with unexpected EDNS version.
EDNS_VERSION_ERRORaddressstringNameserver IP address for the same endpoint.
EDNS_VERSION_ERRORdomainstringTested zone name.
IPV4_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv4.
IPV4_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDrrtypestringrrtype skipped (SOA).
IPV6_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv6.
IPV6_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_DISABLEDrrtypestringrrtype skipped (SOA).
NO_EDNS_SUPPORTnsstringNameserver identity (ns name only; use address for IP) not supporting EDNS as tested.
NO_EDNS_SUPPORTaddressstringNameserver IP address for the same endpoint.
NO_RESPONSEnsstringNameserver identity (ns name only; use address for IP) with no response in EDNS/non-EDNS fallback path.
NO_RESPONSEaddressstringNameserver IP address for the same endpoint.
NO_RESPONSEdomainstringTested zone name.
NS_ERRORnsstringNameserver identity (ns name only; use address for IP) with unexpected EDNS response behavior.
NS_ERRORaddressstringNameserver IP address for the same endpoint.
TEST_CASE_ENDtestcasestringTestcase display name (Nameserver02).
TEST_CASE_STARTtestcasestringTestcase display name (Nameserver02).

Severity Levels Per Tag

TagLevelNotes
BREAKS_ON_EDNSERRORDefault from share/profile.json (test_levels.NAMESERVER).
EDNS0_SUPPORTINFODefault from share/profile.json (test_levels.NAMESERVER).
EDNS_RESPONSE_WITHOUT_EDNSERRORDefault from share/profile.json (test_levels.NAMESERVER).
EDNS_VERSION_ERRORERRORDefault from share/profile.json (test_levels.NAMESERVER).
IPV4_DISABLEDDEBUG2Default from share/profile.json (test_levels.NAMESERVER).
IPV6_DISABLEDDEBUG2Default from share/profile.json (test_levels.NAMESERVER).
NO_EDNS_SUPPORTWARNINGDefault from share/profile.json (test_levels.NAMESERVER).
NO_RESPONSEDEBUGDefault from share/profile.json (test_levels.NAMESERVER).
NS_ERRORWARNINGDefault from share/profile.json (test_levels.NAMESERVER).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.NAMESERVER).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.NAMESERVER).

Differences From Upstream

  • Differences (Upstream vs Gonemaster):
    • Upstream: outcome table focuses on per-server error findings. Gonemaster: emits additional summary tag EDNS0_SUPPORT when all included nameservers pass; a nameserver without any response is not included.
    • Upstream: describes iterating the nameserver IP set. Gonemaster: deduplicates nameservers by name/ip before evaluation.
    • Upstream: does not explicitly describe testcase boundary and transport-disabled debug emissions. Gonemaster: emits TEST_CASE_START, TEST_CASE_END, IPV4_DISABLED, and IPV6_DISABLED.
  • Potential upstream report:
    • no

Edge Cases And Limitations

  • A nameserver emits at most one per-server error tag in this testcase due early-return branch logic.
  • EDNS0_SUPPORT is not emitted if every nameserver is skipped for a disabled transport or returns no response.
  • The testcase relies on generic query defaults for EDNS payload size and DO bit when those fields are not explicitly set in testcase logic.