Commit 18d17ccc authored by Grigorii Demidov's avatar Grigorii Demidov

support for arbitrary IP addresses in *.rpl was added

parent 336a2b33
[submodule "contrib/libfaketime"]
path = contrib/libfaketime
url = https://github.com/wolfcw/libfaketime.git
[submodule "contrib/libswrap"]
path = contrib/libswrap
url = git@gitlab.labs.nic.cz:labs/socket_wrapper.git
......@@ -12,8 +12,9 @@ endif
# Dependencies
include platform.mk
$(eval $(call find_lib,socket_wrapper))
libcwrap := $(strip $(socket_wrapper_LIBS))
libcwrap_DIR := contrib/libswrap
libcwrap_cmake_DIR := $(libcwrap_DIR)/obj
libcwrap=$(abspath $(libcwrap_cmake_DIR))/src/libsocket_wrapper$(LIBEXT).0
libfaketime_DIR := contrib/libfaketime
libfaketime := $(abspath $(libfaketime_DIR))/src/libfaketime$(LIBEXT).1
......@@ -25,19 +26,23 @@ else
preload_syms := LD_PRELOAD="$(libfaketime):$(libcwrap)"
endif
# Targets
ifeq ($(HAS_socket_wrapper), yes)
all: depend
$(preload_syms) ./deckard.py $(TESTS) $(DAEMON) $(TEMPLATE) $(CONFIG) $(ADDITIONAL)
depend: $(libfaketime) $(libcwrap)
else
$(error missing required socket_wrapper)
endif
# Synchronize submodules
$(libfaketime_DIR)/Makefile:
@git submodule update --init
$(libfaketime): $(libfaketime_DIR)/Makefile
@CFLAGS="-O2 -g" $(MAKE) -C $(libfaketime_DIR)
$(libcwrap_DIR):
@git submodule update --init
$(libcwrap_cmake_DIR):$(libcwrap_DIR)
mkdir $(libcwrap_cmake_DIR)
$(libcwrap_cmake_DIR)/Makefile: $(libcwrap_cmake_DIR)
@cd $(libcwrap_cmake_DIR); cmake ..
$(libcwrap): $(libcwrap_cmake_DIR)/Makefile
@CFLAGS="-O2 -g" $(MAKE) -C $(libcwrap_cmake_DIR)
.PHONY: depend all
Subproject commit 6365ebb08b63151b1fbd5a060a7606a0f2a974fd
......@@ -15,6 +15,7 @@ from pydnstest import scenario, testserver, test
from datetime import datetime
import random
import string
import itertools
def str2bool(v):
""" Return conversion of JSON-ish string value to boolean. """
......@@ -33,16 +34,16 @@ INSTALLDIR = os.path.dirname(os.path.abspath(__file__))
if "SOCKET_WRAPPER_DEFAULT_IFACE" in os.environ:
DEFAULT_IFACE = int(os.environ["SOCKET_WRAPPER_DEFAULT_IFACE"])
if DEFAULT_IFACE < 2 or DEFAULT_IFACE > 254 :
DEFAULT_IFACE = 3
DEFAULT_IFACE = 2
os.environ["SOCKET_WRAPPER_DEFAULT_IFACE"]="{}".format(DEFAULT_IFACE)
if "KRESD_WRAPPER_DEFAULT_IFACE" in os.environ:
CHILD_IFACE = int(os.environ["KRESD_WRAPPER_DEFAULT_IFACE"])
if CHILD_IFACE < 2 or CHILD_IFACE > 254 or CHILD_IFACE == DEFAULT_IFACE:
OLD_CHILD_IFACE = CHILD_IFACE
CHILD_IFACE = DEFAULT_IFACE - 1
if CHILD_IFACE < 2:
CHILD_IFACE = 254
CHILD_IFACE = 254
if CHILD_IFACE == DEFAULT_IFACE:
CHILD_IFACE = 253
os.environ["KRESD_WRAPPER_DEFAULT_IFACE"] = "{}".format(CHILD_IFACE)
......@@ -182,7 +183,7 @@ def write_timestamp_file(path, tst):
time_file.flush()
time_file.close()
def setup_env(child_env, config, config_name, j2template):
def setup_env(child_env, config, config_name_list, j2template_list):
""" Set up test environment and config """
# Clear test directory
del_files(TMPDIR)
......@@ -198,6 +199,7 @@ def setup_env(child_env, config, config_name, j2template):
no_minimize = "true"
trust_anchor_str = ""
stub_addr = ""
selfaddr = testserver.get_local_addr_str(socket.AF_INET, DEFAULT_IFACE)
for k,v in config:
# Enable selectively for some tests
if k == 'query-minimization' and str2bool(v):
......@@ -209,7 +211,7 @@ def setup_env(child_env, config, config_name, j2template):
write_timestamp_file(child_env["FAKETIME_TIMESTAMP_FILE"], int(override_date_str))
elif k == 'stub-addr':
stub_addr = v.strip('"\'')
if stub_addr.startswith('127.0.0.') or stub_addr.startswith('::'):
if stub_addr != "":
selfaddr = stub_addr
else:
selfaddr = testserver.get_local_addr_str(socket.AF_INET, DEFAULT_IFACE)
......@@ -222,7 +224,9 @@ def setup_env(child_env, config, config_name, j2template):
sock.bind((childaddr, 53))
if sock_type == socket.SOCK_STREAM:
sock.listen(5)
# Generate configuration
# Generate configuration files
j2template_loader = jinja2.FileSystemLoader(searchpath=os.path.dirname(os.path.abspath(__file__)))
j2template_env = jinja2.Environment(loader=j2template_loader)
j2template_ctx = {
"ROOT_ADDR" : selfaddr,
"SELF_ADDR" : childaddr,
......@@ -231,10 +235,12 @@ def setup_env(child_env, config, config_name, j2template):
"WORKING_DIR" : TMPDIR,
"INSTALL_DIR" : INSTALLDIR
}
cfg_rendered = j2template.render(j2template_ctx)
f = open(os.path.join(TMPDIR,config_name), 'w')
f.write(cfg_rendered)
f.close()
for template_name, config_name in itertools.izip(j2template_list,config_name_list):
j2template = j2template_env.get_template(template_name)
cfg_rendered = j2template.render(j2template_ctx)
f = open(os.path.join(TMPDIR,config_name), 'w')
f.write(cfg_rendered)
f.close()
def play_object(path, binary_name, config_name, j2template, binary_additional_pars):
""" Play scenario from a file object. """
......@@ -299,35 +305,35 @@ if __name__ == '__main__':
print "Usage: test_integration.py <scenario> <binary> <template> <config name> [<additional>]"
print "\t<scenario> - path to scenario"
print "\t<binary> - executable to test"
print "\t<template> - jinja2 template file to generate configuration"
print "\t<config name> - name of configuration file to be generated"
print "\t<template> - colon-separated list of jinja2 template files"
print "\t<config name> - colon-separated list of files to be generated"
print "\t<additional> - additional parameters for <binary>"
sys.exit(0)
test_platform()
path_to_scenario = ""
binary_name = ""
template_name = ""
config_name = ""
template_name_list = ""
config_name_list = ""
binary_additional_pars = []
if len(sys.argv) > 4:
path_to_scenario = sys.argv[1]
binary_name = sys.argv[2]
template_name = sys.argv[3]
config_name = sys.argv[4]
template_name_list = sys.argv[3].split(':')
config_name_list = sys.argv[4].split(':')
if len(template_name_list) != len (config_name_list):
print "ERROR: Number of j2 template files not equal to number of file names to be generated"
print "i.e. len(<template>) != len(<config name>), see usage"
sys.exit(0)
if len(sys.argv) > 5:
binary_additional_pars = sys.argv[5:]
j2template_loader = jinja2.FileSystemLoader(searchpath=os.path.dirname(os.path.abspath(__file__)))
j2template_env = jinja2.Environment(loader=j2template_loader)
j2template = j2template_env.get_template(template_name)
# Scan for scenarios
test = test.Test()
for arg in [path_to_scenario]:
objects = find_objects(arg)
for path in objects:
test.add(path, play_object, path, binary_name, config_name, j2template, binary_additional_pars)
test.add(path, play_object, path, binary_name, config_name_list, template_name_list, binary_additional_pars)
sys.exit(test.run())
......@@ -7,10 +7,10 @@ TESTS=sets/resolver
DAEMON=pdns_recursor
# Template file name
TEMPLATE=template/recursor.j2
TEMPLATE=template/recursor.j2:template/hints_pdns.j2
# Config file name
CONFIG=recursor.conf
CONFIG=recursor.conf:hints.pdns
# Additional parameter for pdns_recursor
# it means configuration file can be found in working directory
......
example.com. 3600 SOA dns1.example.com. hostmaster.example.com. 2010111213 21600 3600 604800 86400
example.com. 3600 NS dns1.example.com.
example.com. 3600 NS dns2.example.com.
example.com. 3600 MX 10 mail.example.com.
dns1.example.com. 3600 A 127.0.0.10
dns1.example.com. 3600 AAAA fd00::5357:5f0a
dns2.example.com. 3600 A 127.0.0.11
dns2.example.com. 3600 AAAA fd00::5357:5f0b
mail.example.com. 3600 A 127.0.0.12
mail.example.com. 3600 AAAA fd00::5357:5f0c
$ORIGIN example.com.
$TTL 3600
@ SOA dns1.example.com. hostmaster.example.com. (
2010111213 ; serial
6h ; refresh
1h ; retry
1w ; expire
1d ) ; minimum
NS dns1
NS dns2
MX 10 mail
dns1 A 192.0.2.1
AAAA 2001:DB8::1
dns2 A 192.0.2.2
AAAA 2001:DB8::2
mail A 192.0.2.3
AAAA 2001:DB8::3
stub-addr: 127.0.0.3
stub-addr: 192.0.2.10
CONFIG_END
SCENARIO_BEGIN Simple knotd query.
......@@ -20,9 +20,9 @@ SECTION ANSWER
example.com. 3600 IN NS dns1.example.com.
example.com. 3600 IN NS dns2.example.com.
SECTION ADDITIONAL
dns1.example.com. 3600 IN A 127.0.0.10
dns1.example.com. 3600 IN AAAA fd00::5357:5f0a
dns2.example.com. 3600 IN A 127.0.0.11
dns2.example.com. 3600 IN AAAA fd00::5357:5f0b
dns1.example.com. 3600 IN A 192.0.2.1
dns1.example.com. 3600 IN AAAA 2001:DB8::1
dns2.example.com. 3600 IN A 192.0.2.2
dns2.example.com. 3600 IN AAAA 2001:DB8::2
ENTRY_END
stub-addr: 127.0.0.3
stub-addr: 192.0.2.10
CONFIG_END
SCENARIO_BEGIN Simple knotd query.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.3
ADDRESS 192.0.2.10
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -16,12 +16,12 @@ example.com. 3600 IN SOA dns1.example.com. hostmaster.example.com. 2010111213 2
example.com. 3600 IN NS dns1.example.com.
example.com. 3600 IN NS dns2.example.com.
example.com. 3600 IN MX 10 mail.example.com.
dns1.example.com. 3600 IN A 127.0.0.10
dns1.example.com. 3600 IN AAAA fd00::5357:5f0A
dns2.example.com. 3600 IN A 127.0.0.11
dns2.example.com. 3600 IN AAAA fd00::5357:5f0B
mail.example.com. 3600 IN A 127.0.0.12
mail.example.com. 3600 IN AAAA fd00::5357:5f0C
dns1.example.com. 3600 IN A 192.0.2.1
dns1.example.com. 3600 IN AAAA 2001:DB8::1
dns2.example.com. 3600 IN A 192.0.2.2
dns2.example.com. 3600 IN AAAA 2001:DB8::2
mail.example.com. 3600 IN A 192.0.2.3
mail.example.com. 3600 IN AAAA 2001:DB8::3
example.com. 3600 IN SOA dns1.example.com. hostmaster.example.com. 2010111213 21600 3600 604800 86400
ENTRY_END
......@@ -70,9 +70,9 @@ SECTION ANSWER
example.com. 3600 IN NS dns1.example.com.
example.com. 3600 IN NS dns2.example.com.
SECTION ADDITIONAL
dns1.example.com. 3600 IN A 127.0.0.10
dns1.example.com. 3600 IN AAAA fd00::5357:5f0A
dns2.example.com. 3600 IN A 127.0.0.11
dns2.example.com. 3600 IN AAAA fd00::5357:5f0B
dns1.example.com. 3600 IN A 192.0.2.1
dns1.example.com. 3600 IN AAAA 2001:DB8::1
dns2.example.com. 3600 IN A 192.0.2.2
dns2.example.com. 3600 IN AAAA 2001:DB8::2
ENTRY_END
name: "."
stub-addr: 127.0.0.3 # K.ROOT-SERVERS.NET.
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
SCENARIO_BEGIN raw queries from inbound.
......@@ -18641,7 +18641,7 @@ SECTION QUESTION
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
; query sent to root server
......@@ -18655,7 +18655,7 @@ cz. IN A
SECTION AUTHORITY
cz. IN NS ns1.cz.
SECTION ADDITIONAL
ns1.cz. IN A 127.0.0.4
ns1.cz. IN A 168.192.2.2
ENTRY_END
; this is the formerr answer
......@@ -18678,11 +18678,11 @@ REPLY QR AA NOERROR
SECTION QUESTION
cz. IN A
SECTION ANSWER
cz. IN A 127.0.0.5
cz. IN A 10.20.30.40
SECTION AUTHORITY
cz. IN NS ns1.cz.
SECTION ADDITIONAL
ns1.cz. IN A 127.0.0.4
ns1.cz. IN A 168.192.2.2
ENTRY_END
; is the final answer correct?
......@@ -18693,7 +18693,7 @@ REPLY QR RD RA
SECTION QUESTION
cz. IN A
SECTION ANSWER
cz. IN A 127.0.0.5
cz. IN A 10.20.30.40
ENTRY_END
SCENARIO END
; config options
target-fetch-policy: "3 2 1 0 0"
name: "."
stub-addr: 127.0.0.3 # K.ROOT-SERVERS.NET.
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
SCENARIO_BEGIN Test iterator with NS sending CNAME answer and authority of CNAME target.
; K.ROOT-SERVERS.NET.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.3
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -18,7 +18,7 @@ SECTION QUESTION
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
ENTRY_BEGIN
......@@ -30,7 +30,7 @@ ingdirect.com.au. IN A
SECTION AUTHORITY
ingdirect.com.au. IN NS l4.nstld.com.
SECTION ADDITIONAL
l4.nstld.com. IN A 127.0.0.4
l4.nstld.com. IN A 209.112.114.33
ENTRY_END
ENTRY_BEGIN
......@@ -40,7 +40,7 @@ REPLY QR NOERROR
SECTION QUESTION
l4.nstld.com. IN A
SECTION ANSWER
l4.nstld.com. IN A 127.0.0.4
l4.nstld.com. IN A 209.112.114.33
ENTRY_END
ENTRY_BEGIN
......@@ -62,7 +62,7 @@ clb.ingdirect.com.au. IN A
SECTION AUTHORITY
clb.ingdirect.com.au. IN NS ncfphywebgtm01-c.ingdirect.com.au.
SECTION ADDITIONAL
ncfphywebgtm01-c.ingdirect.com.au. IN A 127.0.0.5
ncfphywebgtm01-c.ingdirect.com.au. IN A 203.92.27.132
ENTRY_END
ENTRY_BEGIN
......@@ -79,7 +79,7 @@ RANGE_END
; l4.nstld.com.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.4
ADDRESS 209.112.114.33
ENTRY_BEGIN
MATCH opcode qtype qname
......@@ -92,14 +92,14 @@ www.ingdirect.com.au. IN CNAME www.clb.ingdirect.com.au.
SECTION AUTHORITY
clb.ingdirect.com.au. IN NS ncfphywebgtm01-c.ingdirect.com.au.
SECTION ADDITIONAL
ncfphywebgtm01-c.ingdirect.com.au. IN A 127.0.0.5
ncfphywebgtm01-c.ingdirect.com.au. IN A 203.92.27.132
ENTRY_END
RANGE_END
; ncfphywebgtm01-c.ingdirect.com.au.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.5
ADDRESS 203.92.27.132
ENTRY_BEGIN
MATCH opcode qtype qname
......@@ -108,7 +108,7 @@ REPLY QR AA NOERROR
SECTION QUESTION
www.clb.ingdirect.com.au. IN A
SECTION ANSWER
www.clb.ingdirect.com.au. IN A 127.0.0.6
www.clb.ingdirect.com.au. IN A 203.31.183.134
ENTRY_END
ENTRY_BEGIN
......@@ -137,7 +137,7 @@ SECTION QUESTION
www.ingdirect.com.au. IN A
SECTION ANSWER
www.ingdirect.com.au. IN CNAME www.clb.ingdirect.com.au.
www.clb.ingdirect.com.au. IN A 127.0.0.6
www.clb.ingdirect.com.au. IN A 203.31.183.134
ENTRY_END
SCENARIO_END
; config options
target-fetch-policy: "0 0 0 0 0"
name: "."
stub-addr: 127.0.0.3 # K.ROOT-SERVERS.NET.
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
SCENARIO_BEGIN Test iterative resolve with cached cname for nameserver
......@@ -14,7 +14,7 @@ SCENARIO_BEGIN Test iterative resolve with cached cname for nameserver
; K.ROOT-SERVERS.NET.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.3
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -24,7 +24,7 @@ SECTION QUESTION
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
ENTRY_BEGIN
......@@ -46,7 +46,7 @@ com. IN A
SECTION AUTHORITY
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
......@@ -58,13 +58,13 @@ nl. IN A
SECTION AUTHORITY
nl. IN NS ns2.nic.nl.
SECTION ADDITIONAL
ns2.nic.nl. IN A 127.0.0.5
ns2.nic.nl. IN A 192.1.1.2
ENTRY_END
RANGE_END
; a.gtld-servers.net. ".com"
RANGE_BEGIN 0 100
ADDRESS 127.0.0.4
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -74,7 +74,7 @@ com. IN NS
SECTION ANSWER
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
......@@ -88,9 +88,9 @@ example.com. IN NS ns.example.com.
example.com. IN NS ns2.example.com.
SECTION ADDITIONAL
;;; but really a CNAME in child server
ns.example.com. 1 IN A 127.0.0.6
ns2.example.com. IN A 127.0.0.7
ns2.example.com. IN AAAA fd00::5357:5f08
ns.example.com. 1 IN A 1.2.3.4
ns2.example.com. IN A 1.2.3.5
ns2.example.com. IN AAAA 2002::5
ENTRY_END
; lame answers back to root for .nl (.com server not authoritative for .nl)
......@@ -103,14 +103,14 @@ nl. IN A
SECTION AUTHORITY
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
RANGE_END
; ns2.nic.nl ".nl"
RANGE_BEGIN 0 100
ADDRESS 127.0.0.5
ADDRESS 192.1.1.2
ENTRY_BEGIN
MATCH opcode subdomain
......@@ -121,14 +121,14 @@ bla.nl. IN A
SECTION AUTHORITY
bla.nl. IN NS ns.bla.nl.
SECTION ADDITIONAL
ns.bla.nl. IN A 127.0.0.9
ns.bla.nl. IN A 1.2.3.6
ENTRY_END
RANGE_END
; ns.bla.nl "bla..nl"
RANGE_BEGIN 0 100
ADDRESS 127.0.0.9
ADDRESS 1.2.3.6
ENTRY_BEGIN
MATCH opcode qtype qname
......@@ -137,7 +137,7 @@ REPLY QR NOERROR
SECTION QUESTION
ns.bla.nl. IN A
SECTION ANSWER
ns.bla.nl. IN A 127.0.0.9
ns.bla.nl. IN A 1.2.3.6
SECTION AUTHORITY
bla.nl. IN NS ns.bla.nl.
SECTION ADDITIONAL
......@@ -172,13 +172,13 @@ REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
SECTION ANSWER
www.example.com. IN A 127.0.0.10
www.example.com. IN A 10.20.30.40
ENTRY_END
RANGE_END
; ns.example.com "example.com"
RANGE_BEGIN 0 100
ADDRESS 127.0.0.6
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id copy_query
......@@ -196,14 +196,14 @@ REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
SECTION ANSWER
www.example.com. IN A 127.0.0.10
www.example.com. IN A 10.20.30.40
ENTRY_END
RANGE_END
; ns2.example.com "example.com"
; bad failing server
RANGE_BEGIN 0 100
ADDRESS 127.0.0.7
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode
ADJUST copy_id copy_query
......@@ -217,7 +217,7 @@ RANGE_END
; ns2.example.com "example.com"
; bad failing server
RANGE_BEGIN 0 100
ADDRESS fd00::5357:5f08
ADDRESS 2002::5
ENTRY_BEGIN
MATCH opcode
ADJUST copy_id copy_query
......@@ -267,7 +267,7 @@ REPLY QR RD RA NOERROR
SECTION QUESTION
www.example.com. IN A
SECTION ANSWER
www.example.com. IN A 127.0.0.10
www.example.com. IN A 10.20.30.40
SECTION AUTHORITY
SECTION ADDITIONAL
ENTRY_END
......
; config options
target-fetch-policy: "0 0 0 0 0"
name: "."
stub-addr: 127.0.0.3 # K.ROOT-SERVERS.NET.
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
SCENARIO_BEGIN Test double cname in reply.
......@@ -10,7 +10,7 @@ SCENARIO_BEGIN Test double cname in reply.
; K.ROOT-SERVERS.NET.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.3
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -20,7 +20,7 @@ SECTION QUESTION
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
ENTRY_BEGIN
......@@ -32,7 +32,7 @@ www.example.com. IN A
SECTION AUTHORITY
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
......@@ -44,14 +44,14 @@ www.next.com. IN A
SECTION AUTHORITY
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
RANGE_END
; a.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.4
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -61,7 +61,7 @@ com. IN NS
SECTION ANSWER
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
......@@ -73,7 +73,7 @@ www.example.com. IN A
SECTION AUTHORITY
example.com. IN NS ns.example.com.
SECTION ADDITIONAL
ns.example.com. IN A 127.0.0.5
ns.example.com. IN A 1.2.3.4
ENTRY_END
ENTRY_BEGIN
......@@ -85,13 +85,13 @@ www.next.com. IN A
SECTION AUTHORITY
next.com. IN NS ns.next.com.
SECTION ADDITIONAL
ns.next.com. IN A 127.0.0.6
ns.next.com. IN A 1.2.3.5
ENTRY_END
RANGE_END
; ns.example.com.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.5
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -101,7 +101,7 @@ example.com. IN NS
SECTION ANSWER
example.com. IN NS ns.example.com.
SECTION ADDITIONAL
ns.example.com. IN A 127.0.0.5
ns.example.com. IN A 1.2.3.4
ENTRY_END
ENTRY_BEGIN
......@@ -117,13 +117,13 @@ www.example.com. IN CNAME www.next.com.
SECTION AUTHORITY
example.com. IN NS ns.example.com.
SECTION ADDITIONAL
ns.example.com. IN A 127.0.0.5
ns.example.com. IN A 1.2.3.4
ENTRY_END
RANGE_END
; ns.next.com.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.6
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -131,7 +131,7 @@ REPLY QR AA
SECTION QUESTION
www.next.com. IN A
SECTION ANSWER
www.next.com. IN A 127.0.0.7
www.next.com. IN A 10.20.30.40
SECTION AUTHORITY
SECTION ADDITIONAL
ENTRY_END
......@@ -145,7 +145,7 @@ next.com. IN NS
SECTION ANSWER
next.com. IN NS ns.next.com.
SECTION ADDITIONAL
ns.next.com. IN A 127.0.0.6
ns.next.com. IN A 1.2.3.5
ENTRY_END
RANGE_END
......@@ -165,7 +165,7 @@ SECTION QUESTION
www.example.com. IN A
SECTION ANSWER
www.example.com. IN CNAME www.next.com.
www.next.com. IN A 127.0.0.7
www.next.com. IN A 10.20.30.40
SECTION AUTHORITY
SECTION ADDITIONAL
ENTRY_END
......
; config options
target-fetch-policy: "0 0 0 0 0"
name: "."
stub-addr: 127.0.0.3 # K.ROOT-SERVERS.NET.
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
SCENARIO_BEGIN Test cname followed by nxdomain reply rcode.
; K.ROOT-SERVERS.NET.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.3
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......@@ -18,7 +18,7 @@ SECTION QUESTION
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 127.0.0.3
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
ENTRY_BEGIN
......@@ -30,13 +30,13 @@ www.example.com. IN A
SECTION AUTHORITY
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 127.0.0.4
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
RANGE_END
; a.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 127.0.0.4