Skip to content

Zonemaster also queries delegated zone when test is undelegated #1451

@matsduf

Description

@matsduf

The material here is taken from the Basci02 scenarios in PR zonemaster/zonemaster#1380.

Zone good-undel-8.basic02.xa is delegated to the following name servers:

  • 127.12.2.31
  • fda1:b2:c3:0:127:12:2:31
  • 127.12.2.32
  • fda1:b2:c3:0:127:12:2:32

We run an undelegated test where the following name servers are used:

  • 127.12.2.33
  • fda1:b2:c3:0:127:12:2:33
  • 127.12.2.34
  • fda1:b2:c3:0:127:12:2:34

No queries are expected to be sent to the delegated set of name servers since those are replaced by the undelegated set. But Zonemaster still sends queries to the delegated name servers. In this scenarios the delegated name server do not respond which results in long timeout. Zonemaster should ignore the delegated zone and its name servers since they have no meaning in the test.

I ran zonemaster-cli (reporting on DEBUG level) in one terminal and tcpdump (listening to all 8 IP addresses) in the other.

$ date; zonemaster-cli --hints=hintfile.zone --test=basic02 --level=debug --show-testcase --raw good-undel-8.basic02.xa --ns dns1.good-undel-8.basic02.xa/127.12.2.33 --ns dns1.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:33 --ns dns2.good-undel-8.basic02.xa/127.12.2.34 --ns dns2.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:34; date
Mon May  5 14:24:14 UTC 2025
  40.21 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=ns2.basic02.xa; type=AAAA
  40.21 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=ns2.basic02.xa; type=AAAA
  40.21 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=ns2.basic02.xa; type=A
  40.21 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=ns2.basic02.xa; type=A
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.21; name=basic02.xa; type=NS
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=ns1.basic02.xa; type=AAAA
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=ns1.basic02.xa; type=AAAA
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=ns1.basic02.xa; type=A
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=ns1.basic02.xa; type=A
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.23; name=basic02.xa; type=NS
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=xa; type=SOA
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=basic02.xa; type=SOA
  40.20 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=basic02.xa; type=SOA
  40.19 DEBUG    Unspecified    LOOKUP_ERROR  class=IN; domain=good-undel-8.basic02.xa; message=Could not send or receive, because of network error.; ns=dns1.good-undel-8.basic02.xa/127.12.2.31; type=SOA
  30.18 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.31; name=good-undel-8.basic02.xa; type=SOA
  30.18 DEBUG    Unspecified    LOOKUP_ERROR  class=IN; domain=good-undel-8.basic02.xa; message=Could not send or receive, because of network error.; ns=dns1.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:31; type=SOA
  20.17 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:31; name=good-undel-8.basic02.xa; type=SOA
  20.17 DEBUG    Unspecified    LOOKUP_ERROR  class=IN; domain=good-undel-8.basic02.xa; message=Could not send or receive, because of network error.; ns=dns2.good-undel-8.basic02.xa/127.12.2.32; type=SOA
  10.16 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.32; name=good-undel-8.basic02.xa; type=SOA
  10.16 DEBUG    Unspecified    LOOKUP_ERROR  class=IN; domain=good-undel-8.basic02.xa; message=Could not send or receive, because of network error.; ns=dns2.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:32; type=SOA
   0.15 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:32; name=good-undel-8.basic02.xa; type=SOA
   0.15 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.22; name=good-undel-8.basic02.xa; type=SOA
   0.14 DEBUG    Unspecified    EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:24; name=good-undel-8.basic02.xa; type=SOA
   0.00 DEBUG    Unspecified    START_TIME  string=2025-05-05 14:24:54 +0000; time_t=1746455094
   0.00 DEBUG    Unspecified    TEST_TARGET  module=basic; testcase=basic02; zone=good-undel-8.basic02.xa
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v7.1.0
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=Zonemaster::LDNS; version=4.1.0
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=IO::Socket::INET6; version=2.73
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=Module::Find; version=0.15
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=File::ShareDir; version=1.118
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=File::Slurp; version=9999.32
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=Net::IP::XS; version=0.21
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=List::MoreUtils; version=0.430
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=Clone; version=0.45
   0.00 DEBUG    Unspecified    DEPENDENCY_VERSION  name=Readonly; version=2.05
   0.00 DEBUG    Unspecified    MODULE_VERSION  module=Zonemaster::Engine::Test::Basic; version=v1.0.19
   0.00 DEBUG    Basic02        TEST_CASE_START  testcase=Basic02
   0.00 DEBUG    Basic02        EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:34; name=good-undel-8.basic02.xa; type=SOA
   0.01 DEBUG    Basic02        IPV4_ENABLED  ns=dns1.good-undel-8.basic02.xa/127.12.2.33; rrtype=SOA
   0.01 DEBUG    Basic02        EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.33; name=good-undel-8.basic02.xa; type=SOA
   0.02 DEBUG    Basic02        IPV6_ENABLED  ns=dns1.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:33; rrtype=SOA
   0.02 DEBUG    Basic02        EXTERNAL_QUERY  flags={"class":"IN"}; ip=fda1:b2:c3:0:127:12:2:33; name=good-undel-8.basic02.xa; type=SOA
   0.02 DEBUG    Basic02        IPV4_ENABLED  ns=dns2.good-undel-8.basic02.xa/127.12.2.34; rrtype=SOA
   0.02 DEBUG    Basic02        EXTERNAL_QUERY  flags={"class":"IN"}; ip=127.12.2.34; name=good-undel-8.basic02.xa; type=SOA
   0.02 DEBUG    Basic02        IPV6_ENABLED  ns=dns2.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:34; rrtype=SOA
   0.02 INFO     Basic02        B02_AUTH_RESPONSE_SOA  domain="good-undel-8.basic02.xa"; ns_list=dns1.good-undel-8.basic02.xa/127.12.2.33;dns1.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:33;dns2.good-undel-8.basic02.xa/127.12.2.34;dns2.good-undel-8.basic02.xa/fda1:b2:c3:0:127:12:2:34
   0.02 DEBUG    Basic02        TEST_CASE_END  testcase=Basic02
   0.02 DEBUG    Unspecified    MODULE_END  module=Basic
Mon May  5 14:24:54 UTC 2025
$ sudo tcpdump -i any -n host 127.12.2.31 or host fda1:b2:c3:0:127:12:2:31 or host 127.12.2.32 or host fda1:b2:c3:0:127:12:2:32 or host 127.12.2.33 or host fda1:b2:c3:0:127:12:2:33 or host 127.12.2.34 or host fda1:b2:c3:0:127:12:2:34
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
14:24:14.442981 lo    In  IP6 fda1:b2:c3:0:127:12:2:32.35382 > fda1:b2:c3:0:127:12:2:32.53: 12149 SOA? good-undel-8.basic02.xa. (41)
14:24:19.448210 lo    In  IP6 fda1:b2:c3:0:127:12:2:32.51013 > fda1:b2:c3:0:127:12:2:32.53: 12149 SOA? good-undel-8.basic02.xa. (41)
14:24:24.454172 lo    In  IP 127.0.0.1.49193 > 127.12.2.32.53: 56563 SOA? good-undel-8.basic02.xa. (41)
14:24:29.459305 lo    In  IP 127.0.0.1.38254 > 127.12.2.32.53: 56563 SOA? good-undel-8.basic02.xa. (41)
14:24:34.465224 lo    In  IP6 fda1:b2:c3:0:127:12:2:31.53223 > fda1:b2:c3:0:127:12:2:31.53: 15791 SOA? good-undel-8.basic02.xa. (41)
14:24:39.470454 lo    In  IP6 fda1:b2:c3:0:127:12:2:31.54040 > fda1:b2:c3:0:127:12:2:31.53: 15791 SOA? good-undel-8.basic02.xa. (41)
14:24:44.476205 lo    In  IP 127.0.0.1.49898 > 127.12.2.31.53: 26946 SOA? good-undel-8.basic02.xa. (41)
14:24:49.481339 lo    In  IP 127.0.0.1.39207 > 127.12.2.31.53: 26946 SOA? good-undel-8.basic02.xa. (41)
14:24:54.514080 lo    In  IP6 fda1:b2:c3:0:127:12:2:34.37387 > fda1:b2:c3:0:127:12:2:34.53: 13114 SOA? good-undel-8.basic02.xa. (41)
14:24:54.514392 lo    In  IP6 fda1:b2:c3:0:127:12:2:34.53 > fda1:b2:c3:0:127:12:2:34.37387: 13114*- 1/2/0 SOA (262)
14:24:54.524601 lo    In  IP 127.0.0.1.47732 > 127.12.2.33.53: 49149 SOA? good-undel-8.basic02.xa. (41)
14:24:54.524778 lo    In  IP 127.12.2.33.53 > 127.0.0.1.47732: 49149*- 1/2/0 SOA (262)
14:24:54.526115 lo    In  IP6 fda1:b2:c3:0:127:12:2:33.38002 > fda1:b2:c3:0:127:12:2:33.53: 9132 SOA? good-undel-8.basic02.xa. (41)
14:24:54.526284 lo    In  IP6 fda1:b2:c3:0:127:12:2:33.53 > fda1:b2:c3:0:127:12:2:33.38002: 9132*- 1/2/0 SOA (262)
14:24:54.527431 lo    In  IP 127.0.0.1.46264 > 127.12.2.34.53: 10132 SOA? good-undel-8.basic02.xa. (41)
14:24:54.527572 lo    In  IP 127.12.2.34.53 > 127.0.0.1.46264: 10132*- 1/2/0 SOA (262)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-BugType: Bug in software or error in test case description

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions