mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-11 04:17:42 +02:00
intermediate commit V3; Working up to test
This commit is contained in:
@@ -103,6 +103,15 @@ for input in $PRE/testdata/*.rpl $PRE/testdata/*.crpl; do
|
||||
fi
|
||||
fi
|
||||
|
||||
# detect if cachedb is needed
|
||||
if echo $cleaninput | grep cachedb >/dev/null 2>&1; then
|
||||
if grep "define USE_CACHEDB 1" $PRE/config.h >/dev/null 2>&1; then
|
||||
: # CACHEDB is supported
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $do_valgrind = "yes"; then
|
||||
echo
|
||||
if (valgrind $VALGRIND_FLAGS $PRE/testbound -p $input >tmpout 2>&1;); then
|
||||
|
||||
+10
@@ -28,6 +28,12 @@ if grep "define UB_ON_WINDOWS 1" ../../config.h; then
|
||||
else
|
||||
onwin=0
|
||||
fi
|
||||
# detect dnscrypt
|
||||
if grep "define USE_DNSCRYPT 1" ../../config.h; then
|
||||
with_dnscrypt=1
|
||||
else
|
||||
with_dnscrypt=0
|
||||
fi
|
||||
|
||||
# test check of config files.
|
||||
for f in bad.*; do
|
||||
@@ -37,6 +43,10 @@ for f in bad.*; do
|
||||
echo "skipped on windows"
|
||||
continue
|
||||
fi
|
||||
if test $f = "bad.proxy-and-dnscrypt" -a $with_dnscrypt -eq 0; then
|
||||
echo "skipped; no DNSCRYPT support"
|
||||
continue
|
||||
fi
|
||||
|
||||
$PRE/unbound-checkconf $f
|
||||
if test $? != 1; then
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
server:
|
||||
interface: 127.0.0.1
|
||||
proxy-protocol-port: 53
|
||||
dnscrypt:
|
||||
dnscrypt-enable: yes
|
||||
dnscrypt-port: 53
|
||||
@@ -0,0 +1,4 @@
|
||||
server:
|
||||
interface: 127.0.0.1
|
||||
proxy-protocol-port: 53
|
||||
https-port: 53
|
||||
+1
-1
@@ -8,7 +8,7 @@ Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Pre: 07-confroot.pre
|
||||
Post:
|
||||
Test: 07-confroot.test
|
||||
AuxFiles:
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# #-- 07-confroot.pre --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
PRE="../.."
|
||||
|
||||
if uname | grep "MINGW" >/dev/null; then
|
||||
# no chroot, no need to test.
|
||||
# (test fails on / and \ comparisons, by the way).
|
||||
skip_test "no chroot on windows, end test"
|
||||
fi
|
||||
-7
@@ -6,13 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
|
||||
if uname | grep "MINGW" >/dev/null; then
|
||||
# no chroot, no need to test.
|
||||
# (test fails on / en \ comparisons, by the way).
|
||||
echo "no chroot on windows, end test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# create config file
|
||||
cwd=`pwd -P`
|
||||
subdir=$cwd/subdir
|
||||
|
||||
+9
@@ -4,7 +4,16 @@
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
|
||||
# nothing
|
||||
:
|
||||
else
|
||||
skip_test "forking is not available; test skipped."
|
||||
fi
|
||||
|
||||
get_random_port 2
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
|
||||
-8
@@ -7,14 +7,6 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
|
||||
# nothing
|
||||
:
|
||||
else
|
||||
echo "forking is not available; test skipped."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# test if fwder is up
|
||||
echo "> dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile"
|
||||
dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile
|
||||
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
server:
|
||||
verbosity: 7
|
||||
use-syslog: no
|
||||
directory: ""
|
||||
pidfile: "unbound.pid"
|
||||
chroot: ""
|
||||
username: ""
|
||||
do-not-query-localhost: no
|
||||
use-caps-for-id: no
|
||||
define-tag: "one two refuse"
|
||||
|
||||
# Interface configuration for IPv4
|
||||
interface: @IPV4_ADDR@@@PORT_ALLOW@
|
||||
interface: @IPV4_ADDR@@@PORT_DENY@
|
||||
interface: @IPV4_ADDR@@@PORT_REFUSE@
|
||||
interface: @IPV4_ADDR@@@PORT_TAG_1@
|
||||
interface: @IPV4_ADDR@@@PORT_TAG_2@
|
||||
interface: @IPV4_ADDR@@@PORT_TAG_3@
|
||||
interface: @IPV4_ADDR@@@PORT_VIEW_INT@
|
||||
interface: @IPV4_ADDR@@@PORT_VIEW_EXT@
|
||||
interface: @IPV4_ADDR@@@PORT_VIEW_INTEXT@
|
||||
|
||||
interface-action: @IPV4_ADDR@@@PORT_ALLOW@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_DENY@ deny
|
||||
# interface-action: @IPV4_ADDR@@@PORT_REFUSE@ refuse # This is the default action
|
||||
interface-action: @IPV4_ADDR@@@PORT_TAG_1@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_TAG_2@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_TAG_3@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_VIEW_INT@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_VIEW_EXT@ allow
|
||||
interface-action: @IPV4_ADDR@@@PORT_VIEW_INTEXT@ allow
|
||||
|
||||
interface-tag: @IPV4_ADDR@@@PORT_TAG_1@ "one"
|
||||
interface-tag: @IPV4_ADDR@@@PORT_TAG_2@ "two"
|
||||
interface-tag: @IPV4_ADDR@@@PORT_TAG_3@ "refuse"
|
||||
interface-tag-action: @IPV4_ADDR@@@PORT_TAG_1@ one redirect
|
||||
interface-tag-data: @IPV4_ADDR@@@PORT_TAG_1@ one "A 1.1.1.1"
|
||||
interface-tag-action: @IPV4_ADDR@@@PORT_TAG_2@ two redirect
|
||||
interface-tag-data: @IPV4_ADDR@@@PORT_TAG_2@ two "A 2.2.2.2"
|
||||
interface-tag-action: @IPV4_ADDR@@@PORT_TAG_3@ refuse always_refuse
|
||||
|
||||
interface-view: @IPV4_ADDR@@@PORT_VIEW_INT@ "int"
|
||||
interface-view: @IPV4_ADDR@@@PORT_VIEW_EXT@ "ext"
|
||||
interface-view: @IPV4_ADDR@@@PORT_VIEW_INTEXT@ "intext"
|
||||
|
||||
# Mirrored interface configuration for IPv6
|
||||
interface: @IPV6_ADDR@@@PORT_ALLOW@
|
||||
interface: @IPV6_ADDR@@@PORT_DENY@
|
||||
interface: @IPV6_ADDR@@@PORT_REFUSE@
|
||||
interface: @IPV6_ADDR@@@PORT_TAG_1@
|
||||
interface: @IPV6_ADDR@@@PORT_TAG_2@
|
||||
interface: @IPV6_ADDR@@@PORT_TAG_3@
|
||||
interface: @IPV6_ADDR@@@PORT_VIEW_INT@
|
||||
interface: @IPV6_ADDR@@@PORT_VIEW_EXT@
|
||||
interface: @IPV6_ADDR@@@PORT_VIEW_INTEXT@
|
||||
|
||||
interface-action: @IPV6_ADDR@@@PORT_ALLOW@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_DENY@ deny
|
||||
# interface-action: @IPV6_ADDR@@@PORT_REFUSE@ refuse # This is the default action
|
||||
interface-action: @IPV6_ADDR@@@PORT_TAG_1@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_TAG_2@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_TAG_3@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_VIEW_INT@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_VIEW_EXT@ allow
|
||||
interface-action: @IPV6_ADDR@@@PORT_VIEW_INTEXT@ allow
|
||||
|
||||
interface-tag: @IPV6_ADDR@@@PORT_TAG_1@ "one"
|
||||
interface-tag: @IPV6_ADDR@@@PORT_TAG_2@ "two"
|
||||
interface-tag: @IPV6_ADDR@@@PORT_TAG_3@ "refuse"
|
||||
interface-tag-action: @IPV6_ADDR@@@PORT_TAG_1@ one redirect
|
||||
interface-tag-data: @IPV6_ADDR@@@PORT_TAG_1@ one "A 1.1.1.1"
|
||||
interface-tag-action: @IPV6_ADDR@@@PORT_TAG_2@ two redirect
|
||||
interface-tag-data: @IPV6_ADDR@@@PORT_TAG_2@ two "A 2.2.2.2"
|
||||
interface-tag-action: @IPV6_ADDR@@@PORT_TAG_3@ refuse always_refuse
|
||||
|
||||
interface-view: @IPV6_ADDR@@@PORT_VIEW_INT@ "int"
|
||||
interface-view: @IPV6_ADDR@@@PORT_VIEW_EXT@ "ext"
|
||||
interface-view: @IPV6_ADDR@@@PORT_VIEW_INTEXT@ "intext"
|
||||
|
||||
# Mirrored interface configuration for interface name
|
||||
interface: @INTERFACE@@@PORT_ALLOW@
|
||||
interface: @INTERFACE@@@PORT_DENY@
|
||||
interface: @INTERFACE@@@PORT_REFUSE@
|
||||
interface: @INTERFACE@@@PORT_TAG_1@
|
||||
interface: @INTERFACE@@@PORT_TAG_2@
|
||||
interface: @INTERFACE@@@PORT_TAG_3@
|
||||
interface: @INTERFACE@@@PORT_VIEW_INT@
|
||||
interface: @INTERFACE@@@PORT_VIEW_EXT@
|
||||
interface: @INTERFACE@@@PORT_VIEW_INTEXT@
|
||||
|
||||
interface-action: @INTERFACE@@@PORT_ALLOW@ allow
|
||||
interface-action: @INTERFACE@@@PORT_DENY@ deny
|
||||
# interface-action: @INTERFACE@@@PORT_REFUSE@ refuse # This is the default action
|
||||
interface-action: @INTERFACE@@@PORT_TAG_1@ allow
|
||||
interface-action: @INTERFACE@@@PORT_TAG_2@ allow
|
||||
interface-action: @INTERFACE@@@PORT_TAG_3@ allow
|
||||
interface-action: @INTERFACE@@@PORT_VIEW_INT@ allow
|
||||
interface-action: @INTERFACE@@@PORT_VIEW_EXT@ allow
|
||||
interface-action: @INTERFACE@@@PORT_VIEW_INTEXT@ allow
|
||||
|
||||
interface-tag: @INTERFACE@@@PORT_TAG_1@ "one"
|
||||
interface-tag: @INTERFACE@@@PORT_TAG_2@ "two"
|
||||
interface-tag: @INTERFACE@@@PORT_TAG_3@ "refuse"
|
||||
interface-tag-action: @INTERFACE@@@PORT_TAG_1@ one redirect
|
||||
interface-tag-data: @INTERFACE@@@PORT_TAG_1@ one "A 1.1.1.1"
|
||||
interface-tag-action: @INTERFACE@@@PORT_TAG_2@ two redirect
|
||||
interface-tag-data: @INTERFACE@@@PORT_TAG_2@ two "A 2.2.2.2"
|
||||
interface-tag-action: @INTERFACE@@@PORT_TAG_3@ refuse always_refuse
|
||||
|
||||
interface-view: @INTERFACE@@@PORT_VIEW_INT@ "int"
|
||||
interface-view: @INTERFACE@@@PORT_VIEW_EXT@ "ext"
|
||||
interface-view: @INTERFACE@@@PORT_VIEW_INTEXT@ "intext"
|
||||
|
||||
# Local zones configuration
|
||||
local-zone: local. transparent
|
||||
local-data: "local. A 0.0.0.0"
|
||||
local-zone-tag: local. "one two refuse"
|
||||
|
||||
# Views configuration
|
||||
view:
|
||||
name: "int"
|
||||
view-first: yes
|
||||
local-zone: "." refuse
|
||||
local-zone: "internal" transparent
|
||||
view:
|
||||
name: "ext"
|
||||
view-first: yes
|
||||
local-zone: "internal" refuse
|
||||
view:
|
||||
name: "intext"
|
||||
view-first: yes
|
||||
|
||||
# Stubs configuration
|
||||
forward-zone:
|
||||
name: "."
|
||||
forward-addr: @IPV4_ADDR@@@FORWARD_PORT@
|
||||
|
||||
stub-zone:
|
||||
name: "internal"
|
||||
stub-addr: @IPV4_ADDR@@@STUB_PORT@
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
BaseName: acl_interface
|
||||
Version: 1.0
|
||||
Description: Check the interface-* settings
|
||||
CreationDate: Fri 8 Oct 18:14:40 CEST 2021
|
||||
Maintainer:
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: acl_interface.pre
|
||||
Post: acl_interface.post
|
||||
Test: acl_interface.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# #-- acl_interface.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
kill_pid $UNBOUND_PID
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $STUB_PID
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
# #-- acl_interface.pre--#
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# This test uses the unshare utility
|
||||
if test ! -x "`which unshare 2>&1`"; then
|
||||
skip_test "no unshare (from util-linux package) available, skip test"
|
||||
fi
|
||||
|
||||
get_random_port 11
|
||||
|
||||
PORT_ALLOW=$RND_PORT
|
||||
PORT_DENY=$(($RND_PORT + 1))
|
||||
PORT_REFUSE=$(($RND_PORT + 2))
|
||||
PORT_TAG_1=$(($RND_PORT + 3))
|
||||
PORT_TAG_2=$(($RND_PORT + 4))
|
||||
PORT_TAG_3=$(($RND_PORT + 5))
|
||||
PORT_VIEW_INT=$(($RND_PORT + 6))
|
||||
PORT_VIEW_EXT=$(($RND_PORT + 7))
|
||||
PORT_VIEW_INTEXT=$(($RND_PORT + 8))
|
||||
FORWARD_PORT=$(($RND_PORT + 9))
|
||||
STUB_PORT=$(($RND_PORT + 10))
|
||||
|
||||
IPV4_ADDR=192.168.1.1
|
||||
IPV6_ADDR=2001:db8::1
|
||||
|
||||
INTERFACE=eth24
|
||||
INTERFACE_ADDR_1=10.0.0.1
|
||||
INTERFACE_ADDR_2=10.0.0.2
|
||||
INTERFACE_ADDR_3=10.0.0.3
|
||||
INTERFACE_ADDR_4=10.0.0.4
|
||||
|
||||
# make config file
|
||||
sed \
|
||||
-e 's/@PORT_ALLOW\@/'$PORT_ALLOW'/' \
|
||||
-e 's/@PORT_DENY\@/'$PORT_DENY'/' \
|
||||
-e 's/@PORT_REFUSE\@/'$PORT_REFUSE'/' \
|
||||
-e 's/@PORT_TAG_1\@/'$PORT_TAG_1'/' \
|
||||
-e 's/@PORT_TAG_2\@/'$PORT_TAG_2'/' \
|
||||
-e 's/@PORT_TAG_3\@/'$PORT_TAG_3'/' \
|
||||
-e 's/@PORT_VIEW_INT\@/'$PORT_VIEW_INT'/' \
|
||||
-e 's/@PORT_VIEW_EXT\@/'$PORT_VIEW_EXT'/' \
|
||||
-e 's/@PORT_VIEW_INTEXT\@/'$PORT_VIEW_INTEXT'/' \
|
||||
-e 's/@FORWARD_PORT\@/'$FORWARD_PORT'/' \
|
||||
-e 's/@STUB_PORT\@/'$STUB_PORT'/' \
|
||||
-e 's/@IPV4_ADDR\@/'$IPV4_ADDR'/' \
|
||||
-e 's/@IPV6_ADDR\@/'$IPV6_ADDR'/' \
|
||||
-e 's/@INTERFACE\@/'$INTERFACE'/' \
|
||||
< acl_interface.conf > ub.conf
|
||||
|
||||
if test -x "`which bash`"; then
|
||||
shell="bash"
|
||||
else
|
||||
shell="sh"
|
||||
fi
|
||||
|
||||
echo "PORT_ALLOW=$PORT_ALLOW" >> .tpkg.var.test
|
||||
echo "PORT_DENY=$PORT_DENY" >> .tpkg.var.test
|
||||
echo "PORT_REFUSE=$PORT_REFUSE" >> .tpkg.var.test
|
||||
echo "PORT_TAG_1=$PORT_TAG_1" >> .tpkg.var.test
|
||||
echo "PORT_TAG_2=$PORT_TAG_2" >> .tpkg.var.test
|
||||
echo "PORT_TAG_3=$PORT_TAG_3" >> .tpkg.var.test
|
||||
echo "PORT_VIEW_INT=$PORT_VIEW_INT" >> .tpkg.var.test
|
||||
echo "PORT_VIEW_EXT=$PORT_VIEW_EXT" >> .tpkg.var.test
|
||||
echo "PORT_VIEW_INTEXT=$PORT_VIEW_INTEXT" >> .tpkg.var.test
|
||||
echo "FORWARD_PORT=$FORWARD_PORT" >> .tpkg.var.test
|
||||
echo "STUB_PORT=$STUB_PORT" >> .tpkg.var.test
|
||||
echo "IPV4_ADDR=$IPV4_ADDR" >> .tpkg.var.test
|
||||
echo "IPV6_ADDR=$IPV6_ADDR" >> .tpkg.var.test
|
||||
echo "INTERFACE=$INTERFACE" >> .tpkg.var.test
|
||||
echo "INTERFACE_ADDR_1=$INTERFACE_ADDR_1" >> .tpkg.var.test
|
||||
echo "INTERFACE_ADDR_2=$INTERFACE_ADDR_2" >> .tpkg.var.test
|
||||
echo "INTERFACE_ADDR_3=$INTERFACE_ADDR_3" >> .tpkg.var.test
|
||||
echo "INTERFACE_ADDR_4=$INTERFACE_ADDR_4" >> .tpkg.var.test
|
||||
echo "shell=$shell" >> .tpkg.var.test
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# #-- acl_interface.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Run the scenario in an unshared namespace
|
||||
unshare -rUn $shell acl_interface.test.scenario
|
||||
exit $?
|
||||
@@ -0,0 +1,205 @@
|
||||
# #-- acl_interface.test.scenario --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
ip addr add $IPV4_ADDR dev lo
|
||||
ip addr add $IPV6_ADDR dev lo
|
||||
ip link set lo up
|
||||
|
||||
ip link add $INTERFACE type dummy
|
||||
ip addr add $INTERFACE_ADDR_1 dev $INTERFACE
|
||||
ip addr add $INTERFACE_ADDR_2 dev $INTERFACE
|
||||
ip addr add $INTERFACE_ADDR_3 dev $INTERFACE
|
||||
ip addr add $INTERFACE_ADDR_4 dev $INTERFACE
|
||||
ip link set $INTERFACE up
|
||||
|
||||
# start the forwarder in the background
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FORWARD_PORT acl_interface.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
# start the stub in the background
|
||||
$LDNS_TESTNS -p $STUB_PORT acl_interface.testns2 >fwd2.log 2>&1 &
|
||||
STUB_PID=$!
|
||||
echo "STUB_PID=$STUB_PID" >> .tpkg.var.test
|
||||
|
||||
# start unbound in the background
|
||||
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
||||
UNBOUND_PID=$!
|
||||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_ldns_testns_up fwd.log
|
||||
wait_ldns_testns_up fwd2.log
|
||||
wait_unbound_up unbound.log
|
||||
|
||||
end () {
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat fwd2.log
|
||||
cat unbound.log
|
||||
exit $1
|
||||
}
|
||||
|
||||
# Query for the given domain to the given port
|
||||
# $1: address family [4, 6]
|
||||
# $2: port
|
||||
# $3: dname
|
||||
query () {
|
||||
addr=$IPV4_ADDR
|
||||
if test "$1" -eq 6; then
|
||||
addr=$IPV6_ADDR
|
||||
fi
|
||||
echo "> dig -p $2 $3"
|
||||
dig @"$addr" -p $2 $3 | tee outfile
|
||||
}
|
||||
|
||||
# Query for the given domain to the given port
|
||||
# $1: address
|
||||
# $2: port
|
||||
# $3: dname
|
||||
query_addr () {
|
||||
echo "> dig @$1 -p $2 $3"
|
||||
dig @"$1" -p $2 $3 | tee outfile
|
||||
}
|
||||
|
||||
expect_refused () {
|
||||
echo "> check answer for REFUSED"
|
||||
if grep "REFUSED" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
end 1
|
||||
fi
|
||||
}
|
||||
|
||||
expect_external_answer () {
|
||||
echo "> check external answer"
|
||||
if grep "1.2.3.4" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
end 1
|
||||
fi
|
||||
}
|
||||
|
||||
expect_internal_answer () {
|
||||
echo "> check internal answer"
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
end 1
|
||||
fi
|
||||
}
|
||||
|
||||
expect_tag_one_answer () {
|
||||
echo "> check tag 'one' answer"
|
||||
if grep "1.1.1.1" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
end 1
|
||||
fi
|
||||
}
|
||||
|
||||
expect_tag_two_answer () {
|
||||
echo "> check tag 'two' answer"
|
||||
if grep "2.2.2.2" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
end 1
|
||||
fi
|
||||
}
|
||||
|
||||
# do the test
|
||||
|
||||
for i in 4 6; do
|
||||
query $i $PORT_REFUSE "www.external"
|
||||
expect_refused
|
||||
|
||||
query $i $PORT_REFUSE "www.internal"
|
||||
expect_refused
|
||||
|
||||
query $i $PORT_ALLOW "www.external"
|
||||
expect_external_answer
|
||||
|
||||
query $i $PORT_ALLOW "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query $i $PORT_TAG_1 "local"
|
||||
expect_tag_one_answer
|
||||
|
||||
query $i $PORT_TAG_2 "local"
|
||||
expect_tag_two_answer
|
||||
|
||||
query $i $PORT_TAG_3 "local"
|
||||
expect_refused
|
||||
|
||||
query $i $PORT_VIEW_INT "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query $i $PORT_VIEW_INT "www.external"
|
||||
expect_refused
|
||||
|
||||
query $i $PORT_VIEW_EXT "www.internal"
|
||||
expect_refused
|
||||
|
||||
query $i $PORT_VIEW_EXT "www.external"
|
||||
expect_external_answer
|
||||
|
||||
query $i $PORT_VIEW_INTEXT "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query $i $PORT_VIEW_INTEXT "www.external"
|
||||
expect_external_answer
|
||||
done
|
||||
|
||||
for addr in $INTERFACE_ADDR_1 $INTERFACE_ADDR_2 $INTERFACE_ADDR_3 $INTERFACE_ADDR_4; do
|
||||
query_addr $addr $PORT_REFUSE "www.external"
|
||||
expect_refused
|
||||
|
||||
query_addr $addr $PORT_REFUSE "www.internal"
|
||||
expect_refused
|
||||
|
||||
query_addr $addr $PORT_ALLOW "www.external"
|
||||
expect_external_answer
|
||||
|
||||
query_addr $addr $PORT_ALLOW "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query_addr $addr $PORT_TAG_1 "local"
|
||||
expect_tag_one_answer
|
||||
|
||||
query_addr $addr $PORT_TAG_2 "local"
|
||||
expect_tag_two_answer
|
||||
|
||||
query_addr $addr $PORT_TAG_3 "local"
|
||||
expect_refused
|
||||
|
||||
query_addr $addr $PORT_VIEW_INT "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query_addr $addr $PORT_VIEW_INT "www.external"
|
||||
expect_refused
|
||||
|
||||
query_addr $addr $PORT_VIEW_EXT "www.internal"
|
||||
expect_refused
|
||||
|
||||
query_addr $addr $PORT_VIEW_EXT "www.external"
|
||||
expect_external_answer
|
||||
|
||||
query_addr $addr $PORT_VIEW_INTEXT "www.internal"
|
||||
expect_internal_answer
|
||||
|
||||
query_addr $addr $PORT_VIEW_INTEXT "www.external"
|
||||
expect_external_answer
|
||||
done
|
||||
|
||||
end 0
|
||||
@@ -0,0 +1,26 @@
|
||||
; nameserver test file
|
||||
$ORIGIN external.
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
$ORIGIN local.
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
@ IN A
|
||||
SECTION ANSWER
|
||||
@ IN A 127.0.0.1
|
||||
ENTRY_END
|
||||
@@ -0,0 +1,13 @@
|
||||
; nameserver test file
|
||||
$ORIGIN internal.
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 10.20.30.40
|
||||
ENTRY_END
|
||||
Vendored
+181
@@ -0,0 +1,181 @@
|
||||
; config options
|
||||
server:
|
||||
target-fetch-policy: "0 0 0 0 0"
|
||||
qname-minimisation: no
|
||||
minimal-responses: no
|
||||
;serve-expired: yes
|
||||
module-config: "cachedb iterator"
|
||||
|
||||
cachedb:
|
||||
backend: "testframe"
|
||||
secret-seed: "testvalue"
|
||||
|
||||
stub-zone:
|
||||
name: "."
|
||||
stub-addr: 193.0.14.129
|
||||
CONFIG_END
|
||||
|
||||
SCENARIO_BEGIN Test cachedb store and servfail reply from cname.
|
||||
; the servfail reply should not overwrite the cache contents.
|
||||
|
||||
; K.ROOT-SERVERS.NET.
|
||||
RANGE_BEGIN 0 100
|
||||
ADDRESS 193.0.14.129
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
SECTION ANSWER
|
||||
. IN NS K.ROOT-SERVERS.NET.
|
||||
SECTION ADDITIONAL
|
||||
K.ROOT-SERVERS.NET. IN A 193.0.14.129
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode subdomain
|
||||
ADJUST copy_id copy_query
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
com. IN NS
|
||||
SECTION AUTHORITY
|
||||
com. IN NS a.gtld-servers.net.
|
||||
SECTION ADDITIONAL
|
||||
a.gtld-servers.net. IN A 192.5.6.30
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; a.gtld-servers.net.
|
||||
RANGE_BEGIN 0 100
|
||||
ADDRESS 192.5.6.30
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode subdomain
|
||||
ADJUST copy_id copy_query
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
example.com. IN NS
|
||||
SECTION AUTHORITY
|
||||
example.com. IN NS ns2.example.com.
|
||||
SECTION ADDITIONAL
|
||||
ns2.example.com. IN A 1.2.3.5
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode subdomain
|
||||
ADJUST copy_id copy_query
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
foo.com. IN NS
|
||||
SECTION AUTHORITY
|
||||
foo.com. IN NS ns.example.com.
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; ns2.example.com.
|
||||
RANGE_BEGIN 0 20
|
||||
ADDRESS 1.2.3.5
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname qtype
|
||||
REPLY QR AA NOERROR
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION ANSWER
|
||||
www.example.com. 10 IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; ns2.example.com., now failing
|
||||
RANGE_BEGIN 20 100
|
||||
ADDRESS 1.2.3.5
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname qtype
|
||||
REPLY QR AA NOERROR
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION ANSWER
|
||||
www.example.com. 10 IN CNAME foo.example.com.
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname qtype
|
||||
REPLY QR AA SERVFAIL
|
||||
SECTION QUESTION
|
||||
foo.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname qtype
|
||||
REPLY QR AA SERVFAIL
|
||||
SECTION QUESTION
|
||||
ns2.example.com. IN A
|
||||
SECTION ANSWER
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname qtype
|
||||
REPLY QR AA SERVFAIL
|
||||
SECTION QUESTION
|
||||
ns2.example.com. IN AAAA
|
||||
SECTION ANSWER
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; get and entry in cache, to make it expired.
|
||||
STEP 1 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
; get the answer for it
|
||||
STEP 10 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA NOERROR
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION ANSWER
|
||||
www.example.com. 10 IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
; it is now expired
|
||||
STEP 20 TIME_PASSES ELAPSE 20
|
||||
|
||||
; get a servfail in cache for the destination
|
||||
STEP 30 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
foo.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
STEP 40 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA SERVFAIL
|
||||
SECTION QUESTION
|
||||
foo.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
; the query is now a CNAME to servfail.
|
||||
; there is a valid, but expired, entry in cache.
|
||||
STEP 50 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
STEP 60 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA SERVFAIL
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION ANSWER
|
||||
www.example.com. 10 IN CNAME foo.example.com.
|
||||
ENTRY_END
|
||||
|
||||
SCENARIO_END
|
||||
+1
-1
@@ -7,7 +7,7 @@ Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Pre: clang-analysis.pre
|
||||
Post:
|
||||
Test: clang-analysis.test
|
||||
AuxFiles:
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# #-- clang-analysis.pre --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# common functions
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if test ! -x "`which clang 2>&1`"; then
|
||||
skip_test "No clang in path"
|
||||
fi
|
||||
#echo "have clang"
|
||||
# test if assertions are enabled
|
||||
if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
|
||||
:
|
||||
else
|
||||
skip_test "UNBOUND_DEBUG is not enabled, skip test"
|
||||
# no unbound debug means no assertions, and clang analyzer uses
|
||||
# the assertions to make inferences.
|
||||
fi
|
||||
@@ -7,20 +7,6 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if test ! -x "`which clang 2>&1`"; then
|
||||
echo "No clang in path"
|
||||
exit 0
|
||||
fi
|
||||
#echo "have clang"
|
||||
# test if assertions are enabled
|
||||
if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "UNBOUND_DEBUG is not enabled, skip test"
|
||||
# no unbound debug means no assertions, and clang analyzer uses
|
||||
# the assertions to make inferences.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# read value from Makefile
|
||||
# $1: result variable name
|
||||
|
||||
Vendored
+8
@@ -27,6 +27,7 @@
|
||||
# wait_petal_up : wait for petal to come up.
|
||||
# wait_nsd_up : wait for nsd to come up.
|
||||
# wait_server_up_or_fail: wait for server to come up or print a failure string
|
||||
# skip_test x : print message and skip test (must be called in .pre)
|
||||
# kill_pid : kill a server, make sure and wait for it to go down.
|
||||
|
||||
|
||||
@@ -109,6 +110,13 @@ skip_if_in_list () {
|
||||
fi
|
||||
}
|
||||
|
||||
# Print a message and skip the test. Must be called in the .pre file.
|
||||
# $1: message to print.
|
||||
skip_test () {
|
||||
echo "$1"
|
||||
exit 3
|
||||
}
|
||||
|
||||
# function to get a number of random port numbers.
|
||||
# $1: number of random ports.
|
||||
# RND_PORT is returned as the starting port number
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $UNBOUND_PID
|
||||
|
||||
|
||||
+5
-1
@@ -8,7 +8,11 @@ PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
|
||||
echo "have dnscrypt"
|
||||
else
|
||||
skip_test "no dnscrypt"
|
||||
fi
|
||||
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
|
||||
# do the test
|
||||
|
||||
# Query plain request over DNSCrypt channel get closed
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
# dnscrypt precheck.sh
|
||||
|
||||
# if no dnscrypt; exit
|
||||
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
|
||||
echo "have dnscrypt"
|
||||
else
|
||||
echo "no dnscrypt"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# if no xchacha20 support in unbound; exit
|
||||
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
|
||||
xchacha20=1
|
||||
else
|
||||
xchacha20=0
|
||||
fi
|
||||
@@ -8,10 +8,5 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
|
||||
kill_pid $FWD_PID
|
||||
if [ $xchacha20 -ne 0 ]; then
|
||||
kill_pid $UNBOUND_PID
|
||||
fi
|
||||
kill_pid $UNBOUND_PID
|
||||
|
||||
+12
-8
@@ -7,8 +7,17 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
# if no dnscrypt; exit
|
||||
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
|
||||
echo "have dnscrypt"
|
||||
else
|
||||
skip_test "no dnscrypt"
|
||||
fi
|
||||
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
|
||||
echo "have XChacha20 support"
|
||||
else
|
||||
skip_test "no XChacha20 support"
|
||||
fi
|
||||
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
@@ -34,10 +43,5 @@ echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_ldns_testns_up fwd.log
|
||||
if [ $xchacha20 -eq 0 ]; then
|
||||
# no xchacha20 support, we expect unbound to exit with an error message.
|
||||
wait_server_up unbound.log "Certificate for XChacha20 but libsodium does not support it"
|
||||
else
|
||||
wait_unbound_up unbound.log
|
||||
fi
|
||||
wait_unbound_up unbound.log
|
||||
|
||||
|
||||
@@ -6,17 +6,9 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
# Check if we can run the test.
|
||||
. ./precheck.sh
|
||||
|
||||
# do the test
|
||||
|
||||
if [ $xchacha20 -eq 0 ]; then
|
||||
# Unbound would exit before we can attempt any tests.
|
||||
echo "OK"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Query plain request over DNSCrypt channel get closed
|
||||
# We use TCP to avoid hanging on waiting for UDP.
|
||||
# We expect `outfile` to contain no DNS payload
|
||||
@@ -104,7 +96,7 @@ do
|
||||
echo "> check answer"
|
||||
grep -F 'DNSC\000\002\000\000\1716\226\255*\244\002L\177g\025_\127tR\151\246R\203\178\153\248\006\137\"\138\173|G/,\160\152\015\010\172\184\220`\175\217\255,\162\018\178-d\007\246k0\003I[\205w\026)\204B\002\161\010\245\243W\191\189Z\216\210x\025\204\247\173\227t\138\018\162~\152\253\211\031z\\\002m5\008\254\2244\246\243W\191\189Z\216\210Y\160\2158Y\160\2158u\210\219\184' outfile
|
||||
cert_found=$?
|
||||
if [ \( $cert_found -eq 0 -a $xchacha20 -eq 1 \) -o \( $cert_found -ne 0 -a $xchacha20 -eq 0 \) ]; then
|
||||
if [ \( $cert_found -eq 0 \) ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
# dnscrypt precheck.sh
|
||||
|
||||
# if no dnscrypt; exit
|
||||
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
|
||||
echo "have dnscrypt"
|
||||
else
|
||||
echo "no dnscrypt"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# if no xchacha20 support in unbound; exit
|
||||
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
|
||||
xchacha20=1
|
||||
else
|
||||
xchacha20=0
|
||||
fi
|
||||
Vendored
-1
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
Vendored
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $DNSTAP_SOCKET_PID
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 4
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#
|
||||
# do your teardown here
|
||||
PRE="../.."
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $UNBOUND_PID
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
get_make
|
||||
(cd $PRE; $MAKE dohclient)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#
|
||||
# do your teardown here
|
||||
PRE="../.."
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
. ../common.sh
|
||||
kill_pid $UNBOUND_PID
|
||||
cat unbound.log
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 1
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
get_make
|
||||
(cd $PRE; $MAKE dohclient)
|
||||
|
||||
|
||||
@@ -7,6 +7,5 @@
|
||||
# do your teardown here
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $UNBOUND_PID
|
||||
cat unbound.log
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
get_random_port 1
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
get_make
|
||||
(cd $PRE; $MAKE dohclient)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#
|
||||
# do your teardown here
|
||||
PRE="../.."
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $UNBOUND_PID
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
get_make
|
||||
(cd $PRE; $MAKE dohclient)
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $UNBOUND_PID
|
||||
cat unbound.log
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
get_make
|
||||
(cd $PRE; $MAKE dohclient)
|
||||
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $FWD_PID
|
||||
kill $UNBOUND_PID
|
||||
kill $UNBOUND_PID >/dev/null 2>&1
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# compile the dynamic library module
|
||||
if grep "define USE_WINSOCK 1" $PRE/config.h; then
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
rm -f K* piece1 base expired notyetincepted trust-anchors dnssec-failures.test.signed dnskey-failures.test.signed nsec-failures.test.signed rrsig-failures.test.signed
|
||||
@@ -0,0 +1,7 @@
|
||||
dnskey-failures.test. 3600 IN SOA ns.dnskey-failures.test. hostmaster.dnskey-failures.test. 1 14400 1800 2419200 300
|
||||
dnskey-failures.test. 3600 IN RRSIG SOA 13 2 3600 20010201000000 20001230000000 45928 dnskey-failures.test. NKixvGKa0WHSI8oE5THI1hjm5nExVkryUmW15VoNZ3pwqUYexGWLIlfuYsTaDE5GVEtPpSKbA+PlYDk19EsLNQ==
|
||||
dnskey-failures.test. 3600 IN A 192.0.2.1
|
||||
dnskey-failures.test. 3600 IN RRSIG A 13 2 3600 20010201000000 20001230000000 45928 dnskey-failures.test. FCEvbVL3TkzO7jWeOz7E/A3Q64QkpegVazS4OL+ybxN2o8OzXdCJN3QbCGdFP26/Rbj089ThDCZ0+OormAk1dw==
|
||||
dnskey-failures.test. 3600 IN RRSIG DNSKEY 13 2 3600 20010201000000 20001230000000 45928 dnskey-failures.test. pEjWVsJbFiQBvwNGV3v0nVirMJDOYKXqC4IX9dFuRTnoWSb95anvB08pgaZ1ie+thk6YC1fX2fUTRKRFr3vHnA==
|
||||
dnskey-failures.test. 300 IN NSEC dnskey-failures.test. A SOA RRSIG NSEC DNSKEY
|
||||
dnskey-failures.test. 300 IN RRSIG NSEC 13 2 300 20010201000000 20001230000000 45928 dnskey-failures.test. /vAazBDetA5+np+fE7V6f9W+faEQT3ETGueNNhFPjUsPF1dU9Gglu4PZ15fWOxsk0DPWHNmTMF70ZCGQJ2k+fw==
|
||||
@@ -0,0 +1,25 @@
|
||||
dnssec-failures.test. 3600 IN SOA ns.dnssec-failures.test. hostmaster.dnssec-failures.test. 1 14400 1800 2419200 300
|
||||
dnssec-failures.test. 3600 IN RRSIG SOA 13 2 3600 20010201000000 20001230000000 53876 dnssec-failures.test. K37BIR/jLR4tN1JtTx3MwzgozslvnFtwUquCSfiBykCcKIv6wErSI9Gnw/tjH0tXrLI1eoLa5oWkgtxy0KKybg==
|
||||
dnssec-failures.test. 3600 IN NS ns.dnssec-failures.test.
|
||||
dnssec-failures.test. 3600 IN RRSIG NS 13 2 3600 20010201000000 20001230000000 53876 dnssec-failures.test. JP6mYQORwnwwv+2q9UxpeeaVs5/171y3lyc1FKAY3FHmFqjd4Uo0byW8jgk/BrJyVkaDeZbjvuZq+BED0codpw==
|
||||
dnssec-failures.test. 3600 IN DNSKEY 257 3 13 mx6xe39HZrYCpyC+9YmquHIf1WdWYaDqOfcpXg2Gtv5VJGS/WSO14txlUoKjYCldyRwcg9wT6JAwikpkzWS6UQ== ;{id = 53876 (ksk), size = 256b}
|
||||
dnssec-failures.test. 3600 IN RRSIG DNSKEY 13 2 3600 20010201000000 20001230000000 53876 dnssec-failures.test. F760TrogHIBkenX7nGr6LEvocTcGAZamfAaiftIkwprBp21/LZ+qotGsFu9YWsxlGqB3KAINXYATjS6AEJfGEQ==
|
||||
dnssec-failures.test. 300 IN NSEC expired.dnssec-failures.test. NS SOA RRSIG NSEC DNSKEY
|
||||
dnssec-failures.test. 300 IN RRSIG NSEC 13 2 300 20010201000000 20001230000000 53876 dnssec-failures.test. Zk+RW0mbLSzwvSYuNQJhNdd4XmtQv47CiLtHbqOyS8/xt5Pt87T0v1UxnCkZAlA+VTEWbJkasq06ER1wMuTetA==
|
||||
expired.dnssec-failures.test. 300 IN RRSIG NSEC 13 3 300 20010201000000 20001230000000 53876 dnssec-failures.test. UAhzOVumQZ2PVspwJS5NyOjZypIaQXfHMiXGEUYaZ161IfQdB3coBx2vF8MHdqbePOl6Z4oa51ltITMlBL+Stw==
|
||||
missingrrsigs.dnssec-failures.test. 3600 IN TXT "Signatures missing"
|
||||
missingrrsigs.dnssec-failures.test. 300 IN NSEC notyetincepted.dnssec-failures.test. TXT RRSIG NSEC
|
||||
missingrrsigs.dnssec-failures.test. 300 IN RRSIG NSEC 13 3 300 20010201000000 20001230000000 53876 dnssec-failures.test. 4phKld6eMt4cxA4w6I1i29uAbdfbwFrkpRGLBWwerUgDbOdDwUm1de6t4QhBys7DtoZb3wIS+DLJYjBNbz7Sig==
|
||||
notyetincepted.dnssec-failures.test. 300 IN RRSIG NSEC 13 3 300 20010201000000 20001230000000 53876 dnssec-failures.test. ix6Gg9uUZ0A56IQXbDJuBQ3vIm6QipuvzQTKd2wF6kZuEW/53wuy4ROBDIQ4IgnQD17vG8tJNeDOCfj0hh8+dQ==
|
||||
ns.dnssec-failures.test. 3600 IN A 192.0.2.1
|
||||
ns.dnssec-failures.test. 3600 IN RRSIG A 13 3 3600 20010201000000 20001230000000 53876 dnssec-failures.test. PbcykgJEHG218vCkj9pD8W5JVqyCD9VRNOy3SHqCTvWGVAApasdZ7n5wzNVpHdKrqlTpyLwf6z6vv4NMYbEQdw==
|
||||
ns.dnssec-failures.test. 300 IN NSEC sigsinvalid.dnssec-failures.test. A RRSIG NSEC
|
||||
ns.dnssec-failures.test. 300 IN RRSIG NSEC 13 3 300 20010201000000 20001230000000 53876 dnssec-failures.test. SEO+C116gcmI0sY4lnIM4DQrUxqyaGIIqlvhxyGrzF9jJopRZB8gflQcYPy5qhIwGZJoEMB+SO4er4LCaS8NwA==
|
||||
sigsinvalid.dnssec-failures.test. 3600 IN TXT "Signatures INVALID"
|
||||
sigsinvalid.dnssec-failures.test. 3600 IN RRSIG TXT 13 3 3600 20010201000000 20001230000000 53876 dnssec-failures.test. 3XFjjPt+UyY4ZIj8PAINTtOTh7sk4OIAO5akFDQhqgB/Wv6f7dWdqvl8Y2RIqdh0WQz+nGPRMktS8exA3FKW4Q==
|
||||
sigsinvalid.dnssec-failures.test. 300 IN NSEC dnssec-failures.test. TXT RRSIG NSEC
|
||||
sigsinvalid.dnssec-failures.test. 300 IN RRSIG NSEC 13 3 300 20010201000000 20001230000000 53876 dnssec-failures.test. gmft6HYmqZalLwmdnuWBqJod3JD5fRoGqiwYXVFxySm2bHPvz8J9xSe7RdTSONXPUc+7mE8IHYff/gGW7gctqw==
|
||||
expired.dnssec-failures.test. 3600 IN TXT "Expired"
|
||||
expired.dnssec-failures.test. 3600 IN RRSIG TXT 13 3 3600 20001230000000 20001201000000 53876 dnssec-failures.test. 8zosYGmmGGcGcBuWaf3oL3TE/hpKDrddtm7ZQGndjmqkZ8CVg6RwFb+8YLqcG5du3Si0rmTuZId+qBOV/pnViA==
|
||||
notyetincepted.dnssec-failures.test. 3600 IN TXT "Not yet incepted"
|
||||
notyetincepted.dnssec-failures.test. 3600 IN RRSIG TXT 13 3 3600 20010201000000 20010103000000 53876 dnssec-failures.test. lmk0+oEdnnKa1oujIsMeimuElrKvrUSlBknsfSNqOo07VxJxT2R4qkKc95oiEmeSWHcVTOrXxEhtl4kAAactPg==
|
||||
+23
-15
@@ -1,21 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# create oudated zones
|
||||
CSK=`ldns-keygen -a ECDSAP256SHA256 -k -r /dev/urandom dnssec-failures.test`
|
||||
echo $CSK
|
||||
# This script was used to generate the broken signed zones used for testing.
|
||||
|
||||
echo ". IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d" | \
|
||||
cat $CSK.ds - > bogus/trust-anchors
|
||||
# Override the current date; it is used in Unbound's configuration also.
|
||||
NOW=20010101
|
||||
|
||||
# differentiate for MacOS with "gdate"
|
||||
DATE=date
|
||||
which gdate > /dev/null 2>&1 && DATE=gdate
|
||||
|
||||
ONEMONTHAGO=`$DATE -d 'now - 1 month' +%Y%m%d`
|
||||
YESTERDAY=`$DATE -d 'now - 2 days' +%Y%m%d`
|
||||
TOMORROW=`$DATE -d 'now + 2 days' +%Y%m%d`
|
||||
ONEMONTHAGO=`$DATE -d "$NOW - 1 month" +%Y%m%d`
|
||||
ONEMONTH=`$DATE -d "$NOW + 1 month" +%Y%m%d`
|
||||
YESTERDAY=`$DATE -d "$NOW - 2 days" +%Y%m%d`
|
||||
TOMORROW=`$DATE -d "$NOW + 2 days" +%Y%m%d`
|
||||
|
||||
ldns-signzone -i $YESTERDAY -f - bogus/dnssec-failures.test $CSK | \
|
||||
# Root trust anchor
|
||||
echo ". IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d" > bogus/trust-anchors
|
||||
|
||||
# create oudated zones
|
||||
CSK=`ldns-keygen -a ECDSAP256SHA256 -k -r /dev/urandom dnssec-failures.test`
|
||||
echo $CSK
|
||||
cat $CSK.ds >> bogus/trust-anchors
|
||||
|
||||
ldns-signzone -i $YESTERDAY -e $ONEMONTH -f - bogus/dnssec-failures.test $CSK | \
|
||||
grep -v '^missingrrsigs\.dnssec-failures\.test\..*IN.*RRSIG.*TXT' | \
|
||||
sed 's/Signatures invalid/Signatures INVALID/g' | \
|
||||
grep -v '^notyetincepted\.dnssec-failures\.test\..*IN.*TXT' | \
|
||||
@@ -25,7 +32,7 @@ ldns-signzone -i $YESTERDAY -f - bogus/dnssec-failures.test $CSK | \
|
||||
ldns-signzone -i $ONEMONTHAGO -e $YESTERDAY -f - bogus/dnssec-failures.test $CSK | \
|
||||
grep -v '[ ]NSEC[ ]' | \
|
||||
grep '^expired\.dnssec-failures\.test\..*IN.*TXT' > expired
|
||||
ldns-signzone -i $TOMORROW -f - bogus/dnssec-failures.test $CSK | \
|
||||
ldns-signzone -i $TOMORROW -e $ONEMONTH -f - bogus/dnssec-failures.test $CSK | \
|
||||
grep -v '[ ]NSEC[ ]' | \
|
||||
grep '^notyetincepted\.dnssec-failures\.test\..*IN.*TXT' > notyetincepted
|
||||
|
||||
@@ -33,34 +40,35 @@ cat base expired notyetincepted > bogus/dnssec-failures.test.signed
|
||||
|
||||
# cleanup old zone keys
|
||||
rm -f $CSK.*
|
||||
|
||||
# create zone with DNSKEY missing
|
||||
CSK=`ldns-keygen -a ECDSAP256SHA256 -k -r /dev/urandom dnskey-failures.test`
|
||||
echo $CSK
|
||||
cat $CSK.ds >> bogus/trust-anchors
|
||||
|
||||
ldns-signzone -f tmp.signed bogus/dnskey-failures.test $CSK
|
||||
ldns-signzone -i $YESTERDAY -e $ONEMONTH -f tmp.signed bogus/dnskey-failures.test $CSK
|
||||
grep -v ' DNSKEY ' tmp.signed > bogus/dnskey-failures.test.signed
|
||||
|
||||
|
||||
# cleanup old zone keys
|
||||
rm -f $CSK.*
|
||||
|
||||
# create zone with NSEC missing
|
||||
CSK=`ldns-keygen -a ECDSAP256SHA256 -k -r /dev/urandom nsec-failures.test`
|
||||
echo $CSK
|
||||
cat $CSK.ds >> bogus/trust-anchors
|
||||
|
||||
ldns-signzone -f tmp.signed bogus/nsec-failures.test $CSK
|
||||
ldns-signzone -i $YESTERDAY -e $ONEMONTH -f tmp.signed bogus/nsec-failures.test $CSK
|
||||
grep -v ' NSEC ' tmp.signed > bogus/nsec-failures.test.signed
|
||||
|
||||
|
||||
# cleanup old zone keys
|
||||
rm -f $CSK.*
|
||||
|
||||
# create zone with RRSIGs missing
|
||||
CSK=`ldns-keygen -a ECDSAP256SHA256 -k -r /dev/urandom rrsig-failures.test`
|
||||
echo $CSK
|
||||
cat $CSK.ds >> bogus/trust-anchors
|
||||
|
||||
ldns-signzone -f tmp.signed bogus/rrsig-failures.test $CSK
|
||||
ldns-signzone -i $YESTERDAY -e $ONEMONTH -f tmp.signed bogus/rrsig-failures.test $CSK
|
||||
grep -v ' RRSIG ' tmp.signed > bogus/rrsig-failures.test.signed
|
||||
|
||||
# cleanup
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
nsec-failures.test. 3600 IN SOA ns.nsec-failures.test. hostmaster.nsec-failures.test. 1 14400 1800 2419200 300
|
||||
nsec-failures.test. 3600 IN RRSIG SOA 13 2 3600 20010201000000 20001230000000 12342 nsec-failures.test. ZdnRF2uI0IDJsHTXsd4TclX9gUEkxjp19LykHuI3DaCKe3bY8uTETta8i73hlKWJWeRjmgQojIsi9tBlivOwjQ==
|
||||
nsec-failures.test. 3600 IN A 192.0.2.1
|
||||
nsec-failures.test. 3600 IN RRSIG A 13 2 3600 20010201000000 20001230000000 12342 nsec-failures.test. /JccCtWkuQgSF81gv6DPsxaicmlJoGAhVpCpR4JGgVz3tZMhIp+iXUGeI+CkBofw9G/MK66Hk937JRmMh9UTvQ==
|
||||
nsec-failures.test. 3600 IN DNSKEY 257 3 13 41tJnzHY0o3WKid0ZsIo6S5SJdC1JiW0H/KizsAD2phHdi1AIDiBclL+nG2lKvPjMoX2hcMfd8h9DfU99HR3kg== ;{id = 12342 (ksk), size = 256b}
|
||||
nsec-failures.test. 3600 IN RRSIG DNSKEY 13 2 3600 20010201000000 20001230000000 12342 nsec-failures.test. Y23xTzxdqQBjFsWLlqCRgPKT7raPcP0lAy2tR8trW5+vUAhBePXdVixp4AjoxEqXsLLalAtnJnc4QgH7+HO6PA==
|
||||
nsec-failures.test. 300 IN RRSIG NSEC 13 2 300 20010201000000 20001230000000 12342 nsec-failures.test. KfpncqGIzIPNB2ExkH22/z0jAPmq8jTTjDkLte29iKqR9t3bSZlcS0MQ2QB7Z6tgks8fo7Zpc9+BvaDq7Y6ONg==
|
||||
@@ -0,0 +1,4 @@
|
||||
rrsig-failures.test. 3600 IN SOA ns.rrsig-failures.test. hostmaster.rrsig-failures.test. 1 14400 1800 2419200 300
|
||||
rrsig-failures.test. 3600 IN A 192.0.2.1
|
||||
rrsig-failures.test. 3600 IN DNSKEY 257 3 13 rIMJ4/qnOb91GuxKzAYiCdPNdEtUhyt+mi1Jz+NPP0rJQdGOhXr37LpctEiKK4isabCXcwYlVtFdDPopa4RufA== ;{id = 13838 (ksk), size = 256b}
|
||||
rrsig-failures.test. 300 IN NSEC rrsig-failures.test. A SOA RRSIG NSEC DNSKEY
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
. IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
|
||||
dnssec-failures.test. IN DS 53876 13 2 e0207223d847e0d8f3bd2afcf887f727178777a94563b94e1d0be8ca2f070d9a
|
||||
dnskey-failures.test. IN DS 45928 13 2 9295d5c0d9296599809ce968f994a974d4da7752266ee124ead4ce980c006c20
|
||||
nsec-failures.test. IN DS 12342 13 2 b0a994fe4ff12a706b2a47a794601b254a8d28e040832ad6e39e96dbf7736ca2
|
||||
rrsig-failures.test. IN DS 13838 13 2 b083d59d2e7ac370e1103bc5ada2a921e4e65745ea8550350b6fcb57eba9f917
|
||||
Vendored
+1
@@ -11,6 +11,7 @@ server:
|
||||
val-log-level: 2
|
||||
|
||||
trust-anchor-file: "bogus/trust-anchors"
|
||||
val-override-date: "20010101020202"
|
||||
|
||||
module-config: "respip validator iterator"
|
||||
|
||||
|
||||
Vendored
+2
-6
@@ -4,7 +4,9 @@
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
UNBOUND_PORT2=$(($RND_PORT + 1))
|
||||
@@ -16,11 +18,7 @@ sed -e 's/@PORT\@/'$UNBOUND_PORT'/' < ede.conf > temp.conf
|
||||
sed -e 's/@PORT2\@/'$UNBOUND_PORT2'/' < temp.conf > ub.conf
|
||||
sed -e 's/@PORT2\@/'$UNBOUND_PORT2'/' < ede-auth.conf > ub2.conf
|
||||
|
||||
# create broken dnssec zone
|
||||
bogus/make-broken-zone.sh
|
||||
|
||||
# start unbound in the background
|
||||
PRE="../.."
|
||||
$PRE/unbound -d -c ub.conf > unbound.log 2>&1 &
|
||||
UNBOUND_PID=$!
|
||||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
@@ -30,8 +28,6 @@ $PRE/unbound -d -c ub2.conf > unbound2.log 2>&1 &
|
||||
UNBOUND_PID2=$!
|
||||
echo "UNBOUND_PID2=$UNBOUND_PID2" >> .tpkg.var.test
|
||||
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_unbound_up unbound.log
|
||||
wait_unbound_up unbound2.log
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: edns_upstream_cookies
|
||||
Version: 1.0
|
||||
Description: Test Upstream cookies with changing interfaces
|
||||
CreationDate: Fri Aug 20 15:42:11 UTC 2021
|
||||
Maintainer: Tom Carpay
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: edns_upstream_cookies.pre
|
||||
Post: edns_upstream_cookies.post
|
||||
Test: edns_upstream_cookies.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,13 @@
|
||||
# #-- edns_upstream_cookies.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
# teardown
|
||||
. ../common.sh
|
||||
kill_pid $UNBOUND_PID
|
||||
kill_pid $UNBOUND_PID2
|
||||
|
||||
# remove virtual interface
|
||||
ip link del veth0 type veth peer name veth1
|
||||
@@ -7,14 +7,33 @@
|
||||
. ../common.sh
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
NSD_PORT=$(($RND_PORT + 1))
|
||||
UNBOUND2_PORT=$(($RND_PORT + 1))
|
||||
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
||||
echo "NSD_PORT=$NSD_PORT" >> .tpkg.var.test
|
||||
|
||||
UPSTREAM_IP=10.0.0.1
|
||||
UB_IP1=192.128.123.121
|
||||
UB_IP2=192.128.123.122
|
||||
|
||||
echo "UPSTREAM_IP=$UPSTREAM_IP" >> .tpkg.var.test
|
||||
echo "UB_IP1=$UB_IP1" >> .tpkg.var.test
|
||||
echo "UB_IP2=$UB_IP2" >> .tpkg.var.test
|
||||
|
||||
|
||||
# rewrite config file with created ports
|
||||
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' < edns_upstream_cookies.conf > temp.conf
|
||||
# sed -e 's/@PORT2\@/'$NSD_PORT'/' < temp.conf > ub.conf
|
||||
sed -e 's/@PORT2\@/'$NSD_PORT'/' < nsd.conf > nsd1.conf
|
||||
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' < unbound.conf > ub.conf
|
||||
sed -e 's/@PORT2\@/'$UNBOUND2_PORT'/' < unbound_auth.conf > temp2.conf
|
||||
sed -e 's/@IP2\@/'$UPSTREAM_IP'/' < temp2.conf > ub2.conf
|
||||
|
||||
|
||||
# create virtual interfaces
|
||||
ip link add veth0 type veth peer name veth1
|
||||
ip link add veth0 type veth peer name veth1
|
||||
ip link set dev veth0 up
|
||||
ip link set dev veth1 up
|
||||
|
||||
ip addr add $UPSTREAM_IP dev veth0
|
||||
ip addr add $UB_IP1 dev veth1
|
||||
|
||||
# start unbound in the background
|
||||
PRE="../.."
|
||||
@@ -23,12 +42,11 @@ UNBOUND_PID=$!
|
||||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
|
||||
# start nsd in the background (for downstream cookies)
|
||||
# TODO replace this with unbound when downstream cookies are available
|
||||
nsd -d -c nsd1.conf > nsd1.log 2>&1 &
|
||||
NSD_PID=$!
|
||||
echo "NSD_PID=$NSD_PID" >> .tpkg.var.test
|
||||
$PRE/unbound -d -c ub2.conf > unbound2.log 2>&1 &
|
||||
UNBOUND_PID2=$!
|
||||
echo "UNBOUND_PID2=$UNBOUND_PID2" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_unbound_up unbound.log
|
||||
wait_unbound_up nsd1.log
|
||||
wait_unbound_up unbound2.log
|
||||
|
||||
|
||||
+37
-15
@@ -1,3 +1,8 @@
|
||||
# #-- edns_upstream_cookies.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
# The problem of this test lies in that we want to look at the connection between
|
||||
# the resolver and the upstream. I cannot think of a way for this to be done
|
||||
@@ -19,22 +24,12 @@
|
||||
|
||||
|
||||
#NSD_IP=192.128.123.120
|
||||
NSD_IP=10.0.0.1
|
||||
# UB_IP1=192.128.123.121
|
||||
# UB_IP2=192.128.123.122
|
||||
|
||||
# UB_IP3=192.128.123.123
|
||||
# UB_IP4=192.128.123.124
|
||||
|
||||
# create virtual interfaces
|
||||
ip link add veth0 type veth peer name veth1
|
||||
ip link set dev veth0 up
|
||||
ip link set dev veth1 up
|
||||
|
||||
ip addr add $NSD_IP dev veth0
|
||||
ip addr add $UB_IP1 dev veth1
|
||||
ip addr add $UB_IP2 dev veth1
|
||||
ip addr add $UB_IP3 dev veth1
|
||||
ip addr add $UB_IP4 dev veth1
|
||||
# ip addr add $UB_IP2 dev veth1
|
||||
# ip addr add $UB_IP3 dev veth1
|
||||
# ip addr add $UB_IP4 dev veth1
|
||||
|
||||
# start cookie connection by sending first message
|
||||
dig @$UNBOUND -p 9999 example.nl
|
||||
@@ -52,6 +47,11 @@ IFACE=sed -n -e "s/^.*\!\!\!\!\! iterator:udp socket: *//" -e "s/ port.*//p" unb
|
||||
# flush unbound log
|
||||
echo > unbound.log
|
||||
|
||||
|
||||
# bring up second interface so we verify it keep using the first interface
|
||||
ip addr add $UB_IP2 dev veth1
|
||||
|
||||
|
||||
# send second query with the previous complete cookie attached
|
||||
dig @$UNBOUND -p 9999 example.nl
|
||||
|
||||
@@ -72,7 +72,29 @@ fi
|
||||
# check on which interface, MUST be the same as last time
|
||||
if [ "$(sed -n -e "s/^.*\!\!\!\!\! iterator:udp socket: *//" -e "s/ port.*//p" unbound.log) != $IFACE" ]
|
||||
|
||||
# remove interface that the cookie used last time
|
||||
|
||||
# remove the first interface so the kernel will have to use the second interface
|
||||
ip addr del $UB_IP1 dev veth1
|
||||
|
||||
# flush unbound log
|
||||
echo > unbound.log
|
||||
|
||||
|
||||
dig @$UNBOUND -p 9999 example.nl
|
||||
|
||||
# check logs that we get the same complete cookie back
|
||||
sed -n "s/^.*complete cookie: \[24:0\] *//p" unbound.log > second_query.txt
|
||||
if ! grep -e "complete cookie: [24:0] " grep_test.txt
|
||||
then
|
||||
echo "No complete cookie in the response to the second upstream query"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# !!!!!! interface unavailable, renewing cookie
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# send query (on different interface) with different (!) client cookie
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
server:
|
||||
verbosity: 2
|
||||
use-syslog: no
|
||||
chroot: ""
|
||||
username: ""
|
||||
directory: ""
|
||||
pidfile: "unbound.pid"
|
||||
interface: 127.0.0.1
|
||||
port: @PORT1@
|
||||
|
||||
val-log-level: 2
|
||||
upstream-cookies: yes
|
||||
|
||||
forward-zone:
|
||||
name: "example.nl"
|
||||
forward-addr: 127.0.0.1@9998
|
||||
forward-no-cache: yes
|
||||
testdata/edns_upstream_cookies.tdir/nsd.conf → testdata/edns_upstream_cookies.tdir/unbound_auth.conf
Vendored
+8
-9
@@ -1,17 +1,16 @@
|
||||
server:
|
||||
verbosity: 1
|
||||
use-syslog: no
|
||||
chroot: ""
|
||||
username: ""
|
||||
database: ""
|
||||
zonesdir: ""
|
||||
xfrdfile: ""
|
||||
#ip-address: 127.0.0.1
|
||||
ip-address: 127.0.0.3
|
||||
port: 9998
|
||||
|
||||
nsid: ABC1
|
||||
directory: ""
|
||||
pidfile: "unbound2.pid"
|
||||
interface: @UPSTREAM_IP@
|
||||
port: @PORT2@
|
||||
|
||||
answer-cookie: yes
|
||||
cookie-secret: "e5e973e5a6b2a43f48e7dc849e37bfcf"
|
||||
|
||||
zone:
|
||||
auth-zone:
|
||||
name: example.nl
|
||||
zonefile: example.nl.zone
|
||||
Vendored
+2
-31
@@ -176,36 +176,7 @@ SECTION ADDITIONAL
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
; due to ordering of answer packets, this is still outstanding, remove it
|
||||
STEP 21 CHECK_OUT_QUERY
|
||||
ENTRY_BEGIN
|
||||
ADJUST copy_id
|
||||
MATCH qname qtype
|
||||
REPLY QR
|
||||
SECTION QUESTION
|
||||
ns.example.com IN AAAA
|
||||
ENTRY_END
|
||||
|
||||
; some more recursion needed.
|
||||
; to finish the NS query
|
||||
STEP 40 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
ENTRY_END
|
||||
|
||||
STEP 41 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA NOERROR
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
SECTION ANSWER
|
||||
. IN NS K.ROOT-SERVERS.NET.
|
||||
SECTION AUTHORITY
|
||||
SECTION ADDITIONAL
|
||||
K.ROOT-SERVERS.NET. IN A 193.0.14.129
|
||||
ENTRY_END
|
||||
; let (possible) outstanding queries finish resolving
|
||||
STEP 21 TRAFFIC
|
||||
|
||||
SCENARIO_END
|
||||
|
||||
Vendored
+3
-32
@@ -155,7 +155,7 @@ ENTRY_END
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
REPLY QR AA NOERROR
|
||||
SECTION QUESTION
|
||||
ns.example.com. IN AAAA
|
||||
SECTION AUTHORITY
|
||||
@@ -188,36 +188,7 @@ SECTION ADDITIONAL
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
; due to ordering of answer packets, this is still outstanding, remove it
|
||||
STEP 21 CHECK_OUT_QUERY
|
||||
ENTRY_BEGIN
|
||||
ADJUST copy_id
|
||||
MATCH qname qtype
|
||||
REPLY QR
|
||||
SECTION QUESTION
|
||||
ns.example.com IN AAAA
|
||||
ENTRY_END
|
||||
|
||||
; some more recursion needed.
|
||||
; to finish the NS query
|
||||
STEP 40 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
ENTRY_END
|
||||
|
||||
STEP 41 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA NOERROR
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
SECTION ANSWER
|
||||
. IN NS K.ROOT-SERVERS.NET.
|
||||
SECTION AUTHORITY
|
||||
SECTION ADDITIONAL
|
||||
K.ROOT-SERVERS.NET. IN A 193.0.14.129
|
||||
ENTRY_END
|
||||
; let (possible) outstanding queries finish resolving
|
||||
STEP 21 TRAFFIC
|
||||
|
||||
SCENARIO_END
|
||||
|
||||
-5
@@ -6,11 +6,6 @@
|
||||
#
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
|
||||
echo "In jail, no ::1, skip test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
kill_pid $FWD_PID
|
||||
if fgrep "service stopped" unbound.log; then
|
||||
exit 0
|
||||
|
||||
+2
-4
@@ -6,8 +6,7 @@
|
||||
. ../common.sh
|
||||
|
||||
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
|
||||
echo "In jail, no ::1, skip test"
|
||||
exit 0
|
||||
skip_test "In jail, no ::1, skip test"
|
||||
fi
|
||||
|
||||
get_random_port 2
|
||||
@@ -38,7 +37,6 @@ wait_ldns_testns_up fwd.log
|
||||
# string 'Start of service' in log.
|
||||
wait_server_up_or_fail unbound.log "start of service" "disable interface-automatic"
|
||||
if fgrep "disable interface-automatic" unbound.log; then
|
||||
echo "skip test"
|
||||
exit 1
|
||||
skip_test "skip test"
|
||||
fi
|
||||
|
||||
|
||||
-5
@@ -7,11 +7,6 @@
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
|
||||
echo "In jail, no ::1, skip test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if fgrep "disable interface-automatic" unbound.log; then
|
||||
echo "skip test"
|
||||
exit 0
|
||||
|
||||
Vendored
-1
@@ -7,7 +7,6 @@
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $UNBOUND_PID
|
||||
cat unbound.log
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
. ../common.sh
|
||||
|
||||
PRE="../.."
|
||||
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
|
||||
|
||||
get_random_port 2
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
|
||||
Vendored
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||
|
||||
# Make all the queries. They need to succeed by the way.
|
||||
echo "> dig www.example.net."
|
||||
|
||||
Vendored
+138
@@ -0,0 +1,138 @@
|
||||
; config options
|
||||
server:
|
||||
target-fetch-policy: "0 0 0 0 0"
|
||||
qname-minimisation: "no"
|
||||
minimal-responses: no
|
||||
|
||||
stub-zone:
|
||||
name: "."
|
||||
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||
CONFIG_END
|
||||
|
||||
SCENARIO_BEGIN Test authoritative response with erroneous TC flag
|
||||
|
||||
; K.ROOT-SERVERS.NET.
|
||||
RANGE_BEGIN 0 100
|
||||
ADDRESS 193.0.14.129
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
. IN NS
|
||||
SECTION ANSWER
|
||||
. IN NS K.ROOT-SERVERS.NET.
|
||||
SECTION ADDITIONAL
|
||||
K.ROOT-SERVERS.NET. IN A 193.0.14.129
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION AUTHORITY
|
||||
com. IN NS a.gtld-servers.net.
|
||||
SECTION ADDITIONAL
|
||||
a.gtld-servers.net. IN A 192.5.6.30
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; a.gtld-servers.net.
|
||||
RANGE_BEGIN 0 100
|
||||
ADDRESS 192.5.6.30
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
com. IN NS
|
||||
SECTION ANSWER
|
||||
com. IN NS a.gtld-servers.net.
|
||||
SECTION ADDITIONAL
|
||||
a.gtld-servers.net. IN A 192.5.6.30
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode subdomain
|
||||
ADJUST copy_id copy_query
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
example.com. IN NS
|
||||
SECTION AUTHORITY
|
||||
example.com. IN NS ns.example.com.
|
||||
SECTION ADDITIONAL
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
; ns.example.com.
|
||||
RANGE_BEGIN 0 100
|
||||
ADDRESS 1.2.3.4
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
example.com. IN NS
|
||||
SECTION ANSWER
|
||||
example.com. IN NS ns.example.com.
|
||||
SECTION ADDITIONAL
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR AA NOERROR
|
||||
SECTION QUESTION
|
||||
ns.example.com. IN A
|
||||
SECTION ANSWER
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
REPLY QR AA NOERROR
|
||||
SECTION QUESTION
|
||||
ns.example.com. IN AAAA
|
||||
SECTION ANSWER
|
||||
SECTION AUTHORITY
|
||||
example.com. IN NS ns.example.com.
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
ADJUST copy_id
|
||||
; erroneous TC flag here
|
||||
REPLY QR TC NOERROR
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
SECTION ANSWER
|
||||
www.example.com. IN A 10.20.30.40
|
||||
SECTION AUTHORITY
|
||||
example.com. IN NS ns.example.com.
|
||||
SECTION ADDITIONAL
|
||||
ns.example.com. IN A 1.2.3.4
|
||||
ENTRY_END
|
||||
RANGE_END
|
||||
|
||||
STEP 1 QUERY
|
||||
ENTRY_BEGIN
|
||||
REPLY RD
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
; recursion happens here.
|
||||
STEP 10 CHECK_ANSWER
|
||||
ENTRY_BEGIN
|
||||
MATCH all
|
||||
REPLY QR RD RA SERVFAIL
|
||||
SECTION QUESTION
|
||||
www.example.com. IN A
|
||||
ENTRY_END
|
||||
|
||||
SCENARIO_END
|
||||
Vendored
+2
-2
@@ -164,11 +164,11 @@ a.gtld-servers.net. IN A 192.5.6.30
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qname
|
||||
MATCH opcode subdomain
|
||||
ADJUST copy_id copy_query
|
||||
REPLY QR NOERROR
|
||||
SECTION QUESTION
|
||||
ns.example.org. IN A
|
||||
example.org. IN A
|
||||
SECTION AUTHORITY
|
||||
example.org. NS ns.example.net.
|
||||
example.org. NS ns.example.org.
|
||||
|
||||
Vendored
+2
-9
@@ -216,14 +216,7 @@ example.com. IN NS ns.example.net.
|
||||
;ns.example.net IN A 1.2.3.44
|
||||
ENTRY_END
|
||||
|
||||
; due to ordering of answer packets, this is still outstanding, remove it
|
||||
STEP 21 CHECK_OUT_QUERY
|
||||
ENTRY_BEGIN
|
||||
ADJUST copy_id
|
||||
MATCH qname qtype
|
||||
REPLY QR
|
||||
SECTION QUESTION
|
||||
ns.example.net IN AAAA
|
||||
ENTRY_END
|
||||
; let (possible) outstanding queries finish resolving
|
||||
STEP 21 TRAFFIC
|
||||
|
||||
SCENARIO_END
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Pre: nss_compile.pre
|
||||
Post:
|
||||
Test: nss_compile.test
|
||||
AuxFiles:
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# #-- nss_compile.pre --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
|
||||
. ../common.sh
|
||||
if test "`hostname`" = "open.nlnetlabs.nl"; then
|
||||
echo "on open, continue test"
|
||||
else
|
||||
skip_test "not on open, no test, do this explicitly"
|
||||
fi
|
||||
exit 0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user