Syntax07 (syntax07)

Status: Final

Purpose

  • Validate SOA MNAME hostname syntax using the same hostname validator as syntax04.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • SOA response for the child zone apex.
    • MNAME value from the first SOA answer record.
  • Profile/config knobs that affect behavior:
    • net.ipv4 and net.ipv6 can affect which transport z.QueryOne uses.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Execute z.QueryOne for SOA at zone apex.
  3. If SOA answer exists, extract first SOA Ns (MNAME) and run checkNameSyntax("MNAME", ...):
    • Emit MNAME_NON_ALLOWED_CHARS if disallowed characters are found.
    • Emit MNAME_DISCOURAGED_DOUBLE_DASH for non-ACE -- in positions 3 and 4.
    • Emit MNAME_NUMERIC_TLD for all-numeric TLD.
    • Emit MNAME_SYNTAX_OK only if no issue tag was emitted.
  4. If no SOA answer is available, emit NO_RESPONSE_SOA_QUERY.
  5. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
MNAME_DISCOURAGED_DOUBLE_DASHMNAME has non-ACE -- in positions 3 and 4.
MNAME_NON_ALLOWED_CHARSMNAME has disallowed characters.
MNAME_NUMERIC_TLDMNAME rightmost label is numeric-only.
MNAME_SYNTAX_OKMNAME passes all implemented checks.
NO_RESPONSE_SOA_QUERYNo usable SOA answer is obtained.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
MNAME_DISCOURAGED_DOUBLE_DASHlabelstringLabel with discouraged double dash pattern.
MNAME_DISCOURAGED_DOUBLE_DASHdomainstringMNAME hostname under validation.
MNAME_NON_ALLOWED_CHARSdomainstringMNAME hostname with disallowed characters.
MNAME_NUMERIC_TLDdomainstringMNAME hostname under validation.
MNAME_NUMERIC_TLDtldstringNumeric TLD label.
MNAME_SYNTAX_OKdomainstringMNAME hostname that passed checks.
NO_RESPONSE_SOA_QUERY--No arguments.
TEST_CASE_ENDtestcasestringTestcase display name (Syntax07).
TEST_CASE_STARTtestcasestringTestcase display name (Syntax07).

Severity Levels Per Tag

TagLevelNotes
MNAME_DISCOURAGED_DOUBLE_DASHWARNINGDefault from share/profile.json (test_levels.SYNTAX).
MNAME_NON_ALLOWED_CHARSWARNINGDefault from share/profile.json (test_levels.SYNTAX).
MNAME_NUMERIC_TLDWARNINGDefault from share/profile.json (test_levels.SYNTAX).
MNAME_SYNTAX_OKINFODefault from share/profile.json (test_levels.SYNTAX).
NO_RESPONSE_SOA_QUERYDEBUGDefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.SYNTAX).

Differences From Upstream

  • Upstream reference: syntax07.md
  • Differences (Upstream vs Gonemaster):
    • Upstream text describes label and full-name length checks, but Gonemaster only checks character set, numeric TLD, and discouraged double dash.
  • Potential upstream report:
    • yes
  • If yes, include:
    • Upstream expected behavior: Explicit hostname length validation.
    • Gonemaster observed behavior: No length checks in shared syntax validator.
    • evidence: docs/specifications/upstream/tests/Syntax-TP/syntax07.md, engine/test/syntax/syntax.go (checkNameSyntaxWithLogger).
    • report status: not filed

Edge Cases And Limitations

  • If SOA answer has multiple records, only the first SOA is used.
  • NO_RESPONSE_SOA_QUERY is emitted for both no response and responses lacking SOA answer.
  • When running through syntax.All, this testcase is skipped if syntax01 did not emit ONLY_ALLOWED_CHARS.
  • When running through syntax.All, this testcase is skipped if syntax05 emitted NO_RESPONSE_SOA_QUERY.