mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Merge branch 'master' into rpz-triggers
This commit is contained in:
commit
6f507eb036
151 changed files with 16416 additions and 5835 deletions
|
|
@ -173,10 +173,10 @@ UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \
|
||||||
testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \
|
testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \
|
||||||
testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \
|
testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \
|
||||||
testcode/unitverify.c testcode/readhex.c testcode/testpkts.c testcode/unitldns.c \
|
testcode/unitverify.c testcode/readhex.c testcode/testpkts.c testcode/unitldns.c \
|
||||||
testcode/unitecs.c testcode/unitauth.c
|
testcode/unitecs.c testcode/unitauth.c testcode/unitzonemd.c
|
||||||
UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \
|
UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \
|
||||||
unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \
|
unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \
|
||||||
readhex.lo testpkts.lo unitldns.lo unitecs.lo unitauth.lo
|
readhex.lo testpkts.lo unitldns.lo unitecs.lo unitauth.lo unitzonemd.lo
|
||||||
UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(SLDNS_OBJ) \
|
UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(SLDNS_OBJ) \
|
||||||
$(COMPAT_OBJ)
|
$(COMPAT_OBJ)
|
||||||
DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \
|
DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \
|
||||||
|
|
@ -248,6 +248,7 @@ DNSTAP_SOCKET_SRC=dnstap/unbound-dnstap-socket.c
|
||||||
DNSTAP_SOCKET_OBJ=unbound-dnstap-socket.lo
|
DNSTAP_SOCKET_OBJ=unbound-dnstap-socket.lo
|
||||||
DNSTAP_SOCKET_OBJ_LINK=$(DNSTAP_SOCKET_OBJ) $(COMMON_OBJ) \
|
DNSTAP_SOCKET_OBJ_LINK=$(DNSTAP_SOCKET_OBJ) $(COMMON_OBJ) \
|
||||||
$(COMPAT_OBJ) $(SLDNS_OBJ)
|
$(COMPAT_OBJ) $(SLDNS_OBJ)
|
||||||
|
DNSTAP_SOCKET_TESTBIN=@DNSTAP_SOCKET_TESTBIN@
|
||||||
LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \
|
LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \
|
||||||
libunbound/libworker.c
|
libunbound/libworker.c
|
||||||
LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo
|
LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo
|
||||||
|
|
@ -323,7 +324,7 @@ rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound_checkconf.rc config.h
|
||||||
TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \
|
TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \
|
||||||
lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \
|
lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \
|
||||||
petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \
|
petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \
|
||||||
unbound-dnstap-socket$(EXEEXT) dohclient$(EXEEXT) \
|
$(DNSTAP_SOCKET_TESTBIN) dohclient$(EXEEXT) \
|
||||||
testbound$(EXEEXT) unittest$(EXEEXT)
|
testbound$(EXEEXT) unittest$(EXEEXT)
|
||||||
tests: all $(TEST_BIN)
|
tests: all $(TEST_BIN)
|
||||||
|
|
||||||
|
|
@ -1263,6 +1264,7 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcod
|
||||||
unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \
|
unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \
|
||||||
$(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h \
|
$(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h \
|
||||||
$(srcdir)/sldns/parseutil.h
|
$(srcdir)/sldns/parseutil.h
|
||||||
|
unitzonemd.lo unitzonemd.o: $(srcdir)/testcode/unitzonemd.c config.h $(srcdir)/services/authzone.h
|
||||||
unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h $(srcdir)/util/log.h $(srcdir)/util/module.h \
|
unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h $(srcdir)/util/log.h $(srcdir)/util/module.h \
|
||||||
$(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h \
|
$(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h \
|
||||||
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
|
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
|
||||||
|
|
|
||||||
|
|
@ -465,6 +465,7 @@ packed_rrset_ttl_subtract(struct packed_rrset_data* data, time_t subtract)
|
||||||
data->rr_ttl[i] -= subtract;
|
data->rr_ttl[i] -= subtract;
|
||||||
else data->rr_ttl[i] = 0;
|
else data->rr_ttl[i] = 0;
|
||||||
}
|
}
|
||||||
|
data->ttl_add = (subtract < data->ttl_add) ? (data->ttl_add - subtract) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust the TTL of a DNS message and its RRs by 'adjust'. If 'adjust' is
|
/* Adjust the TTL of a DNS message and its RRs by 'adjust'. If 'adjust' is
|
||||||
|
|
|
||||||
92
configure
vendored
92
configure
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for unbound 1.13.1.
|
# Generated by GNU Autoconf 2.69 for unbound 1.13.2.
|
||||||
#
|
#
|
||||||
# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
|
# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
|
||||||
#
|
#
|
||||||
|
|
@ -591,8 +591,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='unbound'
|
PACKAGE_NAME='unbound'
|
||||||
PACKAGE_TARNAME='unbound'
|
PACKAGE_TARNAME='unbound'
|
||||||
PACKAGE_VERSION='1.13.1'
|
PACKAGE_VERSION='1.13.2'
|
||||||
PACKAGE_STRING='unbound 1.13.1'
|
PACKAGE_STRING='unbound 1.13.2'
|
||||||
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
|
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
|
|
@ -649,6 +649,7 @@ ENABLE_DNSCRYPT
|
||||||
ENABLE_DNSCRYPT_XCHACHA20
|
ENABLE_DNSCRYPT_XCHACHA20
|
||||||
DNSTAP_OBJ
|
DNSTAP_OBJ
|
||||||
DNSTAP_SRC
|
DNSTAP_SRC
|
||||||
|
DNSTAP_SOCKET_TESTBIN
|
||||||
DNSTAP_SOCKET_PATH
|
DNSTAP_SOCKET_PATH
|
||||||
opt_dnstap_socket_path
|
opt_dnstap_socket_path
|
||||||
ENABLE_DNSTAP
|
ENABLE_DNSTAP
|
||||||
|
|
@ -1459,7 +1460,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures unbound 1.13.1 to adapt to many kinds of systems.
|
\`configure' configures unbound 1.13.2 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
|
@ -1524,7 +1525,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of unbound 1.13.1:";;
|
short | recursive ) echo "Configuration of unbound 1.13.2:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
|
@ -1752,7 +1753,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
unbound configure 1.13.1
|
unbound configure 1.13.2
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
|
@ -2461,7 +2462,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by unbound $as_me 1.13.1, which was
|
It was created by unbound $as_me 1.13.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
|
@ -2813,11 +2814,11 @@ UNBOUND_VERSION_MAJOR=1
|
||||||
|
|
||||||
UNBOUND_VERSION_MINOR=13
|
UNBOUND_VERSION_MINOR=13
|
||||||
|
|
||||||
UNBOUND_VERSION_MICRO=1
|
UNBOUND_VERSION_MICRO=2
|
||||||
|
|
||||||
|
|
||||||
LIBUNBOUND_CURRENT=9
|
LIBUNBOUND_CURRENT=9
|
||||||
LIBUNBOUND_REVISION=12
|
LIBUNBOUND_REVISION=13
|
||||||
LIBUNBOUND_AGE=1
|
LIBUNBOUND_AGE=1
|
||||||
# 1.0.0 had 0:12:0
|
# 1.0.0 had 0:12:0
|
||||||
# 1.0.1 had 0:13:0
|
# 1.0.1 had 0:13:0
|
||||||
|
|
@ -2897,6 +2898,7 @@ LIBUNBOUND_AGE=1
|
||||||
# 1.12.0 had 9:10:1
|
# 1.12.0 had 9:10:1
|
||||||
# 1.13.0 had 9:11:1
|
# 1.13.0 had 9:11:1
|
||||||
# 1.13.1 had 9:12:1
|
# 1.13.1 had 9:12:1
|
||||||
|
# 1.13.2 had 9:13:1
|
||||||
|
|
||||||
# Current -- the number of the binary API that we're implementing
|
# Current -- the number of the binary API that we're implementing
|
||||||
# Revision -- which iteration of the implementation of the binary
|
# Revision -- which iteration of the implementation of the binary
|
||||||
|
|
@ -17235,9 +17237,68 @@ $as_echo "#define WITH_DYNLIBMODULE 1" >>confdefs.h
|
||||||
DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
|
DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
|
||||||
|
|
||||||
if test $on_mingw = "no"; then
|
if test $on_mingw = "no"; then
|
||||||
DYNLIBMOD_EXTRALIBS="-ldl -export-dynamic"
|
# link with -ldl if not already there, for all executables because
|
||||||
|
# dlopen call is in the dynlib module. For unbound executable, also
|
||||||
|
# export symbols.
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
|
||||||
|
$as_echo_n "checking for library containing dlopen... " >&6; }
|
||||||
|
if ${ac_cv_search_dlopen+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_func_search_save_LIBS=$LIBS
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
|
Use char because int might match the return type of a GCC
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
char dlopen ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return dlopen ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
for ac_lib in '' dl; do
|
||||||
|
if test -z "$ac_lib"; then
|
||||||
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.a"
|
ac_res=-l$ac_lib
|
||||||
|
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||||
|
fi
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_search_dlopen=$ac_res
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext
|
||||||
|
if ${ac_cv_search_dlopen+:} false; then :
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if ${ac_cv_search_dlopen+:} false; then :
|
||||||
|
|
||||||
|
else
|
||||||
|
ac_cv_search_dlopen=no
|
||||||
|
fi
|
||||||
|
rm conftest.$ac_ext
|
||||||
|
LIBS=$ac_func_search_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
|
||||||
|
$as_echo "$ac_cv_search_dlopen" >&6; }
|
||||||
|
ac_res=$ac_cv_search_dlopen
|
||||||
|
if test "$ac_res" != no; then :
|
||||||
|
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
DYNLIBMOD_EXTRALIBS="-export-dynamic"
|
||||||
|
else
|
||||||
|
DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
@ -19765,6 +19826,7 @@ if test x_$enable_static_exe = x_yes; then
|
||||||
LIBS="$LIBS -lgdi32"
|
LIBS="$LIBS -lgdi32"
|
||||||
fi
|
fi
|
||||||
LIBS="$LIBS -lz"
|
LIBS="$LIBS -lz"
|
||||||
|
LIBS="$LIBS -l:libssp.a"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -19784,6 +19846,7 @@ if test x_$enable_fully_static = x_yes; then
|
||||||
LIBS="$LIBS -lgdi32"
|
LIBS="$LIBS -lgdi32"
|
||||||
fi
|
fi
|
||||||
LIBS="$LIBS -lz"
|
LIBS="$LIBS -lz"
|
||||||
|
LIBS="$LIBS -l:libssp.a"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -21191,6 +21254,7 @@ _ACEOF
|
||||||
|
|
||||||
DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
|
DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path"
|
||||||
|
|
||||||
|
DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)'
|
||||||
|
|
||||||
DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
|
DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"
|
||||||
|
|
||||||
|
|
@ -21697,7 +21761,7 @@ _ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
version=1.13.1
|
version=1.13.2
|
||||||
|
|
||||||
date=`date +'%b %e, %Y'`
|
date=`date +'%b %e, %Y'`
|
||||||
|
|
||||||
|
|
@ -22216,7 +22280,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by unbound $as_me 1.13.1, which was
|
This file was extended by unbound $as_me 1.13.2, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
|
@ -22282,7 +22346,7 @@ _ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
unbound config.status 1.13.1
|
unbound config.status 1.13.2
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|
|
||||||
17
configure.ac
17
configure.ac
|
|
@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4)
|
||||||
# must be numbers. ac_defun because of later processing
|
# must be numbers. ac_defun because of later processing
|
||||||
m4_define([VERSION_MAJOR],[1])
|
m4_define([VERSION_MAJOR],[1])
|
||||||
m4_define([VERSION_MINOR],[13])
|
m4_define([VERSION_MINOR],[13])
|
||||||
m4_define([VERSION_MICRO],[1])
|
m4_define([VERSION_MICRO],[2])
|
||||||
AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues],[unbound])
|
AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues],[unbound])
|
||||||
AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
|
AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
|
||||||
AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
|
AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
|
||||||
AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
|
AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
|
||||||
|
|
||||||
LIBUNBOUND_CURRENT=9
|
LIBUNBOUND_CURRENT=9
|
||||||
LIBUNBOUND_REVISION=12
|
LIBUNBOUND_REVISION=13
|
||||||
LIBUNBOUND_AGE=1
|
LIBUNBOUND_AGE=1
|
||||||
# 1.0.0 had 0:12:0
|
# 1.0.0 had 0:12:0
|
||||||
# 1.0.1 had 0:13:0
|
# 1.0.1 had 0:13:0
|
||||||
|
|
@ -98,6 +98,7 @@ LIBUNBOUND_AGE=1
|
||||||
# 1.12.0 had 9:10:1
|
# 1.12.0 had 9:10:1
|
||||||
# 1.13.0 had 9:11:1
|
# 1.13.0 had 9:11:1
|
||||||
# 1.13.1 had 9:12:1
|
# 1.13.1 had 9:12:1
|
||||||
|
# 1.13.2 had 9:13:1
|
||||||
|
|
||||||
# Current -- the number of the binary API that we're implementing
|
# Current -- the number of the binary API that we're implementing
|
||||||
# Revision -- which iteration of the implementation of the binary
|
# Revision -- which iteration of the implementation of the binary
|
||||||
|
|
@ -642,9 +643,13 @@ if test x_$withval != x_no; then
|
||||||
DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
|
DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h'
|
||||||
AC_SUBST(DYNLIBMOD_HEADER)
|
AC_SUBST(DYNLIBMOD_HEADER)
|
||||||
if test $on_mingw = "no"; then
|
if test $on_mingw = "no"; then
|
||||||
DYNLIBMOD_EXTRALIBS="-ldl -export-dynamic"
|
# link with -ldl if not already there, for all executables because
|
||||||
|
# dlopen call is in the dynlib module. For unbound executable, also
|
||||||
|
# export symbols.
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl])
|
||||||
|
DYNLIBMOD_EXTRALIBS="-export-dynamic"
|
||||||
else
|
else
|
||||||
DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.a"
|
DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(DYNLIBMOD_EXTRALIBS)
|
AC_SUBST(DYNLIBMOD_EXTRALIBS)
|
||||||
fi
|
fi
|
||||||
|
|
@ -1438,6 +1443,7 @@ if test x_$enable_static_exe = x_yes; then
|
||||||
LIBS="$LIBS -lgdi32"
|
LIBS="$LIBS -lgdi32"
|
||||||
fi
|
fi
|
||||||
LIBS="$LIBS -lz"
|
LIBS="$LIBS -lz"
|
||||||
|
LIBS="$LIBS -l:libssp.a"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1454,6 +1460,7 @@ if test x_$enable_fully_static = x_yes; then
|
||||||
LIBS="$LIBS -lgdi32"
|
LIBS="$LIBS -lgdi32"
|
||||||
fi
|
fi
|
||||||
LIBS="$LIBS -lz"
|
LIBS="$LIBS -lz"
|
||||||
|
LIBS="$LIBS -l:libssp.a"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1743,7 +1750,7 @@ dt_DNSTAP([$UNBOUND_RUN_DIR/dnstap.sock],
|
||||||
AC_DEFINE_UNQUOTED(DNSTAP_SOCKET_PATH,
|
AC_DEFINE_UNQUOTED(DNSTAP_SOCKET_PATH,
|
||||||
["$hdr_dnstap_socket_path"], [default dnstap socket path])
|
["$hdr_dnstap_socket_path"], [default dnstap socket path])
|
||||||
AC_SUBST(DNSTAP_SOCKET_PATH,["$hdr_dnstap_socket_path"])
|
AC_SUBST(DNSTAP_SOCKET_PATH,["$hdr_dnstap_socket_path"])
|
||||||
|
AC_SUBST(DNSTAP_SOCKET_TESTBIN,['unbound-dnstap-socket$(EXEEXT)'])
|
||||||
AC_SUBST([DNSTAP_SRC], ["dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"])
|
AC_SUBST([DNSTAP_SRC], ["dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c"])
|
||||||
AC_SUBST([DNSTAP_OBJ], ["dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"])
|
AC_SUBST([DNSTAP_OBJ], ["dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo"])
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,8 @@ daemon_open_shared_ports(struct daemon* daemon)
|
||||||
free(daemon->ports);
|
free(daemon->ports);
|
||||||
daemon->ports = NULL;
|
daemon->ports = NULL;
|
||||||
}
|
}
|
||||||
if(!resolve_interface_names(daemon->cfg, &resif, &num_resif))
|
if(!resolve_interface_names(daemon->cfg->ifs,
|
||||||
|
daemon->cfg->num_ifs, NULL, &resif, &num_resif))
|
||||||
return 0;
|
return 0;
|
||||||
/* see if we want to reuseport */
|
/* see if we want to reuseport */
|
||||||
#ifdef SO_REUSEPORT
|
#ifdef SO_REUSEPORT
|
||||||
|
|
@ -632,19 +633,19 @@ daemon_fork(struct daemon* daemon)
|
||||||
fatal_exit("Could not set up per-view response IP sets");
|
fatal_exit("Could not set up per-view response IP sets");
|
||||||
daemon->use_response_ip = !respip_set_is_empty(daemon->respip_set) ||
|
daemon->use_response_ip = !respip_set_is_empty(daemon->respip_set) ||
|
||||||
have_view_respip_cfg;
|
have_view_respip_cfg;
|
||||||
|
|
||||||
|
/* setup modules */
|
||||||
|
daemon_setup_modules(daemon);
|
||||||
|
|
||||||
/* read auth zonefiles */
|
/* read auth zonefiles */
|
||||||
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
|
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
|
||||||
&daemon->use_rpz))
|
&daemon->use_rpz, daemon->env, &daemon->mods))
|
||||||
fatal_exit("auth_zones could not be setup");
|
fatal_exit("auth_zones could not be setup");
|
||||||
|
|
||||||
/* Set-up EDNS strings */
|
/* Set-up EDNS strings */
|
||||||
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
|
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
|
||||||
fatal_exit("Could not set up EDNS strings");
|
fatal_exit("Could not set up EDNS strings");
|
||||||
|
|
||||||
/* setup modules */
|
|
||||||
daemon_setup_modules(daemon);
|
|
||||||
|
|
||||||
/* response-ip-xxx options don't work as expected without the respip
|
/* response-ip-xxx options don't work as expected without the respip
|
||||||
* module. To avoid run-time operational surprise we reject such
|
* module. To avoid run-time operational surprise we reject such
|
||||||
* configuration. */
|
* configuration. */
|
||||||
|
|
|
||||||
|
|
@ -364,13 +364,20 @@ struct listen_port* daemon_remote_open_ports(struct config_file* cfg)
|
||||||
struct listen_port* l = NULL;
|
struct listen_port* l = NULL;
|
||||||
log_assert(cfg->remote_control_enable && cfg->control_port);
|
log_assert(cfg->remote_control_enable && cfg->control_port);
|
||||||
if(cfg->control_ifs.first) {
|
if(cfg->control_ifs.first) {
|
||||||
struct config_strlist* p;
|
char** rcif = NULL;
|
||||||
for(p = cfg->control_ifs.first; p; p = p->next) {
|
int i, num_rcif = 0;
|
||||||
if(!add_open(p->str, cfg->control_port, &l, 1, cfg)) {
|
if(!resolve_interface_names(NULL, 0, cfg->control_ifs.first,
|
||||||
|
&rcif, &num_rcif)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
for(i=0; i<num_rcif; i++) {
|
||||||
|
if(!add_open(rcif[i], cfg->control_port, &l, 1, cfg)) {
|
||||||
listening_ports_free(l);
|
listening_ports_free(l);
|
||||||
|
config_del_strarray(rcif, num_rcif);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
config_del_strarray(rcif, num_rcif);
|
||||||
} else {
|
} else {
|
||||||
/* defaults */
|
/* defaults */
|
||||||
if(cfg->do_ip6 &&
|
if(cfg->do_ip6 &&
|
||||||
|
|
@ -2510,6 +2517,8 @@ do_auth_zone_reload(RES* ssl, struct worker* worker, char* arg)
|
||||||
uint8_t* nm = NULL;
|
uint8_t* nm = NULL;
|
||||||
struct auth_zones* az = worker->env.auth_zones;
|
struct auth_zones* az = worker->env.auth_zones;
|
||||||
struct auth_zone* z = NULL;
|
struct auth_zone* z = NULL;
|
||||||
|
struct auth_xfer* xfr = NULL;
|
||||||
|
char* reason = NULL;
|
||||||
if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
|
if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
|
||||||
return;
|
return;
|
||||||
if(az) {
|
if(az) {
|
||||||
|
|
@ -2518,19 +2527,63 @@ do_auth_zone_reload(RES* ssl, struct worker* worker, char* arg)
|
||||||
if(z) {
|
if(z) {
|
||||||
lock_rw_wrlock(&z->lock);
|
lock_rw_wrlock(&z->lock);
|
||||||
}
|
}
|
||||||
|
xfr = auth_xfer_find(az, nm, nmlen, LDNS_RR_CLASS_IN);
|
||||||
|
if(xfr) {
|
||||||
|
lock_basic_lock(&xfr->lock);
|
||||||
|
}
|
||||||
lock_rw_unlock(&az->lock);
|
lock_rw_unlock(&az->lock);
|
||||||
}
|
}
|
||||||
free(nm);
|
free(nm);
|
||||||
if(!z) {
|
if(!z) {
|
||||||
|
if(xfr) {
|
||||||
|
lock_basic_unlock(&xfr->lock);
|
||||||
|
}
|
||||||
(void)ssl_printf(ssl, "error no auth-zone %s\n", arg);
|
(void)ssl_printf(ssl, "error no auth-zone %s\n", arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!auth_zone_read_zonefile(z, worker->env.cfg)) {
|
if(!auth_zone_read_zonefile(z, worker->env.cfg)) {
|
||||||
lock_rw_unlock(&z->lock);
|
lock_rw_unlock(&z->lock);
|
||||||
|
if(xfr) {
|
||||||
|
lock_basic_unlock(&xfr->lock);
|
||||||
|
}
|
||||||
(void)ssl_printf(ssl, "error failed to read %s\n", arg);
|
(void)ssl_printf(ssl, "error failed to read %s\n", arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
z->zone_expired = 0;
|
||||||
|
if(xfr) {
|
||||||
|
xfr->zone_expired = 0;
|
||||||
|
if(!xfr_find_soa(z, xfr)) {
|
||||||
|
if(z->data.count == 0) {
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
lock_basic_unlock(&xfr->lock);
|
||||||
|
(void)ssl_printf(ssl, "zone %s has no contents\n", arg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
lock_basic_unlock(&xfr->lock);
|
||||||
|
(void)ssl_printf(ssl, "error: no SOA in zone after read %s\n", arg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(xfr->have_zone)
|
||||||
|
xfr->lease_time = *worker->env.now;
|
||||||
|
lock_basic_unlock(&xfr->lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
auth_zone_verify_zonemd(z, &worker->env, &worker->env.mesh->mods,
|
||||||
|
&reason, 0, 0);
|
||||||
|
if(reason && z->zone_expired) {
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
(void)ssl_printf(ssl, "error zonemd for %s failed: %s\n",
|
||||||
|
arg, reason);
|
||||||
|
free(reason);
|
||||||
|
return;
|
||||||
|
} else if(reason && strcmp(reason, "ZONEMD verification successful")
|
||||||
|
==0) {
|
||||||
|
(void)ssl_printf(ssl, "%s: %s\n", arg, reason);
|
||||||
|
}
|
||||||
lock_rw_unlock(&z->lock);
|
lock_rw_unlock(&z->lock);
|
||||||
|
free(reason);
|
||||||
send_ok(ssl);
|
send_ok(ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,33 @@ checkrlimits(struct config_file* cfg)
|
||||||
size_t total = numthread * perthread + misc;
|
size_t total = numthread * perthread + misc;
|
||||||
size_t avail;
|
size_t avail;
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
|
size_t memsize_expect = cfg->msg_cache_size + cfg->rrset_cache_size
|
||||||
|
+ (cfg->do_tcp?cfg->stream_wait_size:0)
|
||||||
|
+ (cfg->ip_ratelimit?cfg->ip_ratelimit_size:0)
|
||||||
|
+ (cfg->ratelimit?cfg->ratelimit_size:0)
|
||||||
|
+ (cfg->dnscrypt?cfg->dnscrypt_shared_secret_cache_size + cfg->dnscrypt_nonce_cache_size:0)
|
||||||
|
+ cfg->infra_cache_numhosts * (sizeof(struct infra_key)+sizeof(struct infra_data));
|
||||||
|
if(strstr(cfg->module_conf, "validator") && (cfg->trust_anchor_file_list || cfg->trust_anchor_list || cfg->auto_trust_anchor_file_list || cfg->trusted_keys_file_list)) {
|
||||||
|
memsize_expect += cfg->key_cache_size + cfg->neg_cache_size;
|
||||||
|
}
|
||||||
|
#ifdef HAVE_NGHTTP2_NGHTTP2_H
|
||||||
|
if(cfg_has_https(cfg)) {
|
||||||
|
memsize_expect += cfg->http_query_buffer_size + cfg->http_response_buffer_size;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(getrlimit(RLIMIT_AS, &rlim) == 0) {
|
||||||
|
if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY &&
|
||||||
|
rlim.rlim_cur < (rlim_t)memsize_expect) {
|
||||||
|
log_warn("the ulimit(max memory size) is smaller than the expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsize_expect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(getrlimit(RLIMIT_DATA, &rlim) == 0) {
|
||||||
|
if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY &&
|
||||||
|
rlim.rlim_cur < memsize_expect) {
|
||||||
|
log_warn("the ulimit(data seg size) is smaller than the expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsize_expect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(total > 1024 &&
|
if(total > 1024 &&
|
||||||
strncmp(ub_event_get_version(), "mini-event", 10) == 0) {
|
strncmp(ub_event_get_version(), "mini-event", 10) == 0) {
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@
|
||||||
#include "util/edns.h"
|
#include "util/edns.h"
|
||||||
#include "iterator/iter_fwd.h"
|
#include "iterator/iter_fwd.h"
|
||||||
#include "iterator/iter_hints.h"
|
#include "iterator/iter_hints.h"
|
||||||
|
#include "iterator/iter_utils.h"
|
||||||
#include "validator/autotrust.h"
|
#include "validator/autotrust.h"
|
||||||
#include "validator/val_anchor.h"
|
#include "validator/val_anchor.h"
|
||||||
#include "respip/respip.h"
|
#include "respip/respip.h"
|
||||||
|
|
@ -1166,9 +1167,14 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
if(worker->dtenv.log_client_query_messages)
|
/*
|
||||||
dt_msg_send_client_query(&worker->dtenv, &repinfo->addr, c->type,
|
* sending src (client)/dst (local service) addresses over DNSTAP from incoming request handler
|
||||||
c->buffer);
|
*/
|
||||||
|
if(worker->dtenv.log_client_query_messages) {
|
||||||
|
log_addr(VERB_ALGO, "request from client", &repinfo->addr, repinfo->addrlen);
|
||||||
|
log_addr(VERB_ALGO, "to local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
|
||||||
|
dt_msg_send_client_query(&worker->dtenv, &repinfo->addr, (void*)repinfo->c->socket->addr->ai_addr, c->type, c->buffer);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
acladdr = acl_addr_lookup(worker->daemon->acl, &repinfo->addr,
|
acladdr = acl_addr_lookup(worker->daemon->acl, &repinfo->addr,
|
||||||
repinfo->addrlen);
|
repinfo->addrlen);
|
||||||
|
|
@ -1289,6 +1295,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
|
||||||
edns.udp_size = EDNS_ADVERTISED_SIZE;
|
edns.udp_size = EDNS_ADVERTISED_SIZE;
|
||||||
edns.bits &= EDNS_DO;
|
edns.bits &= EDNS_DO;
|
||||||
edns.opt_list = NULL;
|
edns.opt_list = NULL;
|
||||||
|
edns.padding_block_size = 0;
|
||||||
verbose(VERB_ALGO, "query with bad edns version.");
|
verbose(VERB_ALGO, "query with bad edns version.");
|
||||||
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
|
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
|
||||||
error_encode(c->buffer, EDNS_RCODE_BADVERS&0xf, &qinfo,
|
error_encode(c->buffer, EDNS_RCODE_BADVERS&0xf, &qinfo,
|
||||||
|
|
@ -1591,9 +1598,14 @@ send_reply_rc:
|
||||||
if(is_secure_answer) worker->stats.ans_secure++;
|
if(is_secure_answer) worker->stats.ans_secure++;
|
||||||
}
|
}
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
if(worker->dtenv.log_client_response_messages)
|
/*
|
||||||
dt_msg_send_client_response(&worker->dtenv, &repinfo->addr,
|
* sending src (client)/dst (local service) addresses over DNSTAP from send_reply code label (when we serviced local zone for ex.)
|
||||||
c->type, c->buffer);
|
*/
|
||||||
|
if(worker->dtenv.log_client_response_messages) {
|
||||||
|
log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr->ai_addr, repinfo->c->socket->addr->ai_addrlen);
|
||||||
|
log_addr(VERB_ALGO, "response to client", &repinfo->addr, repinfo->addrlen);
|
||||||
|
dt_msg_send_client_response(&worker->dtenv, &repinfo->addr, (void*)repinfo->c->socket->addr->ai_addr, c->type, c->buffer);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if(worker->env.cfg->log_replies)
|
if(worker->env.cfg->log_replies)
|
||||||
{
|
{
|
||||||
|
|
@ -1820,6 +1832,8 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
||||||
worker_delete(worker);
|
worker_delete(worker);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
|
||||||
|
worker->back);
|
||||||
/* start listening to commands */
|
/* start listening to commands */
|
||||||
if(!tube_setup_bg_listen(worker->cmd, worker->base,
|
if(!tube_setup_bg_listen(worker->cmd, worker->base,
|
||||||
&worker_handle_control_cmd, worker)) {
|
&worker_handle_control_cmd, worker)) {
|
||||||
|
|
@ -1913,6 +1927,8 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
auth_xfer_pickup_initial(worker->env.auth_zones, &worker->env);
|
auth_xfer_pickup_initial(worker->env.auth_zones, &worker->env);
|
||||||
|
auth_zones_pickup_zonemd_verify(worker->env.auth_zones,
|
||||||
|
&worker->env);
|
||||||
}
|
}
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
if(worker->daemon->cfg->dnstap
|
if(worker->daemon->cfg->dnstap
|
||||||
|
|
|
||||||
|
|
@ -198,14 +198,17 @@ uitoa(unsigned n, char* s)
|
||||||
static uint32_t
|
static uint32_t
|
||||||
extract_ipv4(const uint8_t ipv6[], size_t ipv6_len, const int offset)
|
extract_ipv4(const uint8_t ipv6[], size_t ipv6_len, const int offset)
|
||||||
{
|
{
|
||||||
uint32_t ipv4;
|
uint32_t ipv4 = 0;
|
||||||
|
int i, pos;
|
||||||
log_assert(ipv6_len == 16); (void)ipv6_len;
|
log_assert(ipv6_len == 16); (void)ipv6_len;
|
||||||
ipv4 = (uint32_t)ipv6[offset/8+0] << (24 + (offset%8))
|
log_assert(offset == 32 || offset == 40 || offset == 48 || offset == 56 ||
|
||||||
| (uint32_t)ipv6[offset/8+1] << (16 + (offset%8))
|
offset == 64 || offset == 96);
|
||||||
| (uint32_t)ipv6[offset/8+2] << ( 8 + (offset%8))
|
for(i = 0, pos = offset / 8; i < 4; i++, pos++) {
|
||||||
| (uint32_t)ipv6[offset/8+3] << ( 0 + (offset%8));
|
if (pos == 8)
|
||||||
if (offset/8+4 < 16)
|
pos++;
|
||||||
ipv4 |= (uint32_t)ipv6[offset/8+4] >> (8 - offset%8);
|
ipv4 = ipv4 << 8;
|
||||||
|
ipv4 |= ipv6[pos];
|
||||||
|
}
|
||||||
return ipv4;
|
return ipv4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,18 +299,18 @@ synthesize_aaaa(const uint8_t prefix_addr[], size_t prefix_addr_len,
|
||||||
int prefix_net, const uint8_t a[], size_t a_len, uint8_t aaaa[],
|
int prefix_net, const uint8_t a[], size_t a_len, uint8_t aaaa[],
|
||||||
size_t aaaa_len)
|
size_t aaaa_len)
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
|
int pos;
|
||||||
log_assert(prefix_addr_len == 16 && a_len == 4 && aaaa_len == 16);
|
log_assert(prefix_addr_len == 16 && a_len == 4 && aaaa_len == 16);
|
||||||
|
log_assert(prefix_net == 32 || prefix_net == 40 || prefix_net == 48 ||
|
||||||
|
prefix_net == 56 || prefix_net == 64 || prefix_net == 96);
|
||||||
(void)prefix_addr_len; (void)a_len; (void)aaaa_len;
|
(void)prefix_addr_len; (void)a_len; (void)aaaa_len;
|
||||||
memcpy(aaaa, prefix_addr, 16);
|
memcpy(aaaa, prefix_addr, 16);
|
||||||
aaaa[prefix_net/8+0] |= a[0] >> (0+prefix_net%8);
|
for(i = 0, pos = prefix_net / 8; i < a_len; i++, pos++) {
|
||||||
aaaa[prefix_net/8+1] |= a[0] << (8-prefix_net%8);
|
if(pos == 8)
|
||||||
aaaa[prefix_net/8+1] |= a[1] >> (0+prefix_net%8);
|
aaaa[pos++] = 0;
|
||||||
aaaa[prefix_net/8+2] |= a[1] << (8-prefix_net%8);
|
aaaa[pos] = a[i];
|
||||||
aaaa[prefix_net/8+2] |= a[2] >> (0+prefix_net%8);
|
}
|
||||||
aaaa[prefix_net/8+3] |= a[2] << (8-prefix_net%8);
|
|
||||||
aaaa[prefix_net/8+3] |= a[3] >> (0+prefix_net%8);
|
|
||||||
if (prefix_net/8+4 < 16) /* <-- my beautiful symmetry is destroyed! */
|
|
||||||
aaaa[prefix_net/8+4] |= a[3] << (8-prefix_net%8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -374,8 +377,10 @@ dns64_apply_cfg(struct dns64_env* dns64_env, struct config_file* cfg)
|
||||||
log_err("dns64_prefix is not IPv6: %s", cfg->dns64_prefix);
|
log_err("dns64_prefix is not IPv6: %s", cfg->dns64_prefix);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (dns64_env->prefix_net < 0 || dns64_env->prefix_net > 96) {
|
if (dns64_env->prefix_net != 32 && dns64_env->prefix_net != 40 &&
|
||||||
log_err("dns64-prefix length it not between 0 and 96: %s",
|
dns64_env->prefix_net != 48 && dns64_env->prefix_net != 56 &&
|
||||||
|
dns64_env->prefix_net != 64 && dns64_env->prefix_net != 96 ) {
|
||||||
|
log_err("dns64-prefix length it not 32, 40, 48, 56, 64 or 96: %s",
|
||||||
cfg->dns64_prefix);
|
cfg->dns64_prefix);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -722,7 +727,7 @@ dns64_synth_aaaa_data(const struct ub_packed_rrset_key* fk,
|
||||||
*dd_out = NULL;
|
*dd_out = NULL;
|
||||||
return; /* integer overflow protection in alloc */
|
return; /* integer overflow protection in alloc */
|
||||||
}
|
}
|
||||||
if (!(dd = *dd_out = regional_alloc(region,
|
if (!(dd = *dd_out = regional_alloc_zero(region,
|
||||||
sizeof(struct packed_rrset_data)
|
sizeof(struct packed_rrset_data)
|
||||||
+ fd->count * (sizeof(size_t) + sizeof(time_t) +
|
+ fd->count * (sizeof(size_t) + sizeof(time_t) +
|
||||||
sizeof(uint8_t*) + 2 + 16)))) {
|
sizeof(uint8_t*) + 2 + 16)))) {
|
||||||
|
|
|
||||||
104
dnstap/dnstap.c
104
dnstap/dnstap.c
|
|
@ -302,44 +302,75 @@ dt_fill_buffer(sldns_buffer *b, ProtobufCBinaryData *p, protobuf_c_boolean *has)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dt_msg_fill_net(struct dt_msg *dm,
|
dt_msg_fill_net(struct dt_msg *dm,
|
||||||
struct sockaddr_storage *ss,
|
struct sockaddr_storage *qs,
|
||||||
|
struct sockaddr_storage *rs,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
ProtobufCBinaryData *addr, protobuf_c_boolean *has_addr,
|
ProtobufCBinaryData *qaddr, protobuf_c_boolean *has_qaddr,
|
||||||
uint32_t *port, protobuf_c_boolean *has_port)
|
uint32_t *qport, protobuf_c_boolean *has_qport,
|
||||||
|
ProtobufCBinaryData *raddr, protobuf_c_boolean *has_raddr,
|
||||||
|
uint32_t *rport, protobuf_c_boolean *has_rport)
|
||||||
{
|
{
|
||||||
log_assert(ss->ss_family == AF_INET6 || ss->ss_family == AF_INET);
|
log_assert(qs->ss_family == AF_INET6 || qs->ss_family == AF_INET);
|
||||||
if (ss->ss_family == AF_INET6) {
|
if (qs->ss_family == AF_INET6) {
|
||||||
struct sockaddr_in6 *s = (struct sockaddr_in6 *) ss;
|
struct sockaddr_in6 *q = (struct sockaddr_in6 *) qs;
|
||||||
|
|
||||||
/* socket_family */
|
/* socket_family */
|
||||||
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET6;
|
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET6;
|
||||||
dm->m.has_socket_family = 1;
|
dm->m.has_socket_family = 1;
|
||||||
|
|
||||||
/* addr: query_address or response_address */
|
/* addr: query_address or response_address */
|
||||||
addr->data = s->sin6_addr.s6_addr;
|
qaddr->data = q->sin6_addr.s6_addr;
|
||||||
addr->len = 16; /* IPv6 */
|
qaddr->len = 16; /* IPv6 */
|
||||||
*has_addr = 1;
|
*has_qaddr = 1;
|
||||||
|
|
||||||
/* port: query_port or response_port */
|
/* port: query_port or response_port */
|
||||||
*port = ntohs(s->sin6_port);
|
*qport = ntohs(q->sin6_port);
|
||||||
*has_port = 1;
|
*has_qport = 1;
|
||||||
} else if (ss->ss_family == AF_INET) {
|
} else if (qs->ss_family == AF_INET) {
|
||||||
struct sockaddr_in *s = (struct sockaddr_in *) ss;
|
struct sockaddr_in *q = (struct sockaddr_in *) qs;
|
||||||
|
|
||||||
/* socket_family */
|
/* socket_family */
|
||||||
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET;
|
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET;
|
||||||
dm->m.has_socket_family = 1;
|
dm->m.has_socket_family = 1;
|
||||||
|
|
||||||
/* addr: query_address or response_address */
|
/* addr: query_address or response_address */
|
||||||
addr->data = (uint8_t *) &s->sin_addr.s_addr;
|
qaddr->data = (uint8_t *) &q->sin_addr.s_addr;
|
||||||
addr->len = 4; /* IPv4 */
|
qaddr->len = 4; /* IPv4 */
|
||||||
*has_addr = 1;
|
*has_qaddr = 1;
|
||||||
|
|
||||||
/* port: query_port or response_port */
|
/* port: query_port or response_port */
|
||||||
*port = ntohs(s->sin_port);
|
*qport = ntohs(q->sin_port);
|
||||||
*has_port = 1;
|
*has_qport = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This block is to fill second set of fields in DNSTAP-message defined as request_/response_ names.
|
||||||
|
* Additional responsive structure is: struct sockaddr_storage *rs
|
||||||
|
*/
|
||||||
|
if (rs && rs->ss_family == AF_INET6) {
|
||||||
|
struct sockaddr_in6 *r = (struct sockaddr_in6 *) rs;
|
||||||
|
|
||||||
|
/* addr: query_address or response_address */
|
||||||
|
raddr->data = r->sin6_addr.s6_addr;
|
||||||
|
raddr->len = 16; /* IPv6 */
|
||||||
|
*has_raddr = 1;
|
||||||
|
|
||||||
|
/* port: query_port or response_port */
|
||||||
|
*rport = ntohs(r->sin6_port);
|
||||||
|
*has_rport = 1;
|
||||||
|
} else if (rs && rs->ss_family == AF_INET) {
|
||||||
|
struct sockaddr_in *r = (struct sockaddr_in *) rs;
|
||||||
|
|
||||||
|
/* addr: query_address or response_address */
|
||||||
|
raddr->data = (uint8_t *) &r->sin_addr.s_addr;
|
||||||
|
raddr->len = 4; /* IPv4 */
|
||||||
|
*has_raddr = 1;
|
||||||
|
|
||||||
|
/* port: query_port or response_port */
|
||||||
|
*rport = ntohs(r->sin_port);
|
||||||
|
*has_rport = 1;
|
||||||
|
}
|
||||||
|
|
||||||
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
||||||
if (cptype == comm_udp) {
|
if (cptype == comm_udp) {
|
||||||
/* socket_protocol */
|
/* socket_protocol */
|
||||||
|
|
@ -355,6 +386,7 @@ dt_msg_fill_net(struct dt_msg *dm,
|
||||||
void
|
void
|
||||||
dt_msg_send_client_query(struct dt_env *env,
|
dt_msg_send_client_query(struct dt_env *env,
|
||||||
struct sockaddr_storage *qsock,
|
struct sockaddr_storage *qsock,
|
||||||
|
struct sockaddr_storage *rsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
sldns_buffer *qmsg)
|
sldns_buffer *qmsg)
|
||||||
{
|
{
|
||||||
|
|
@ -374,11 +406,14 @@ dt_msg_send_client_query(struct dt_env *env,
|
||||||
/* query_message */
|
/* query_message */
|
||||||
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
|
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
|
||||||
|
|
||||||
/* socket_family, socket_protocol, query_address, query_port */
|
/* socket_family, socket_protocol, query_address, query_port, response_address, response_port */
|
||||||
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
||||||
dt_msg_fill_net(&dm, qsock, cptype,
|
dt_msg_fill_net(&dm, qsock, rsock, cptype,
|
||||||
&dm.m.query_address, &dm.m.has_query_address,
|
&dm.m.query_address, &dm.m.has_query_address,
|
||||||
&dm.m.query_port, &dm.m.has_query_port);
|
&dm.m.query_port, &dm.m.has_query_port,
|
||||||
|
&dm.m.response_address, &dm.m.has_response_address,
|
||||||
|
&dm.m.response_port, &dm.m.has_response_port);
|
||||||
|
|
||||||
|
|
||||||
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
||||||
dt_send(env, dm.buf, dm.len_buf);
|
dt_send(env, dm.buf, dm.len_buf);
|
||||||
|
|
@ -387,6 +422,7 @@ dt_msg_send_client_query(struct dt_env *env,
|
||||||
void
|
void
|
||||||
dt_msg_send_client_response(struct dt_env *env,
|
dt_msg_send_client_response(struct dt_env *env,
|
||||||
struct sockaddr_storage *qsock,
|
struct sockaddr_storage *qsock,
|
||||||
|
struct sockaddr_storage *rsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
sldns_buffer *rmsg)
|
sldns_buffer *rmsg)
|
||||||
{
|
{
|
||||||
|
|
@ -406,11 +442,13 @@ dt_msg_send_client_response(struct dt_env *env,
|
||||||
/* response_message */
|
/* response_message */
|
||||||
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
|
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
|
||||||
|
|
||||||
/* socket_family, socket_protocol, query_address, query_port */
|
/* socket_family, socket_protocol, query_address, query_port, response_address, response_port */
|
||||||
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
||||||
dt_msg_fill_net(&dm, qsock, cptype,
|
dt_msg_fill_net(&dm, qsock, rsock, cptype,
|
||||||
&dm.m.query_address, &dm.m.has_query_address,
|
&dm.m.query_address, &dm.m.has_query_address,
|
||||||
&dm.m.query_port, &dm.m.has_query_port);
|
&dm.m.query_port, &dm.m.has_query_port,
|
||||||
|
&dm.m.response_address, &dm.m.has_response_address,
|
||||||
|
&dm.m.response_port, &dm.m.has_response_port);
|
||||||
|
|
||||||
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
||||||
dt_send(env, dm.buf, dm.len_buf);
|
dt_send(env, dm.buf, dm.len_buf);
|
||||||
|
|
@ -419,6 +457,7 @@ dt_msg_send_client_response(struct dt_env *env,
|
||||||
void
|
void
|
||||||
dt_msg_send_outside_query(struct dt_env *env,
|
dt_msg_send_outside_query(struct dt_env *env,
|
||||||
struct sockaddr_storage *rsock,
|
struct sockaddr_storage *rsock,
|
||||||
|
struct sockaddr_storage *qsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
uint8_t *zone, size_t zone_len,
|
uint8_t *zone, size_t zone_len,
|
||||||
sldns_buffer *qmsg)
|
sldns_buffer *qmsg)
|
||||||
|
|
@ -454,11 +493,13 @@ dt_msg_send_outside_query(struct dt_env *env,
|
||||||
/* query_message */
|
/* query_message */
|
||||||
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
|
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
|
||||||
|
|
||||||
/* socket_family, socket_protocol, response_address, response_port */
|
/* socket_family, socket_protocol, response_address, response_port, query_address, query_port */
|
||||||
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
||||||
dt_msg_fill_net(&dm, rsock, cptype,
|
dt_msg_fill_net(&dm, rsock, qsock, cptype,
|
||||||
&dm.m.response_address, &dm.m.has_response_address,
|
&dm.m.response_address, &dm.m.has_response_address,
|
||||||
&dm.m.response_port, &dm.m.has_response_port);
|
&dm.m.response_port, &dm.m.has_response_port,
|
||||||
|
&dm.m.query_address, &dm.m.has_query_address,
|
||||||
|
&dm.m.query_port, &dm.m.has_query_port);
|
||||||
|
|
||||||
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
||||||
dt_send(env, dm.buf, dm.len_buf);
|
dt_send(env, dm.buf, dm.len_buf);
|
||||||
|
|
@ -467,6 +508,7 @@ dt_msg_send_outside_query(struct dt_env *env,
|
||||||
void
|
void
|
||||||
dt_msg_send_outside_response(struct dt_env *env,
|
dt_msg_send_outside_response(struct dt_env *env,
|
||||||
struct sockaddr_storage *rsock,
|
struct sockaddr_storage *rsock,
|
||||||
|
struct sockaddr_storage *qsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
uint8_t *zone, size_t zone_len,
|
uint8_t *zone, size_t zone_len,
|
||||||
uint8_t *qbuf, size_t qbuf_len,
|
uint8_t *qbuf, size_t qbuf_len,
|
||||||
|
|
@ -510,11 +552,13 @@ dt_msg_send_outside_response(struct dt_env *env,
|
||||||
/* response_message */
|
/* response_message */
|
||||||
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
|
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
|
||||||
|
|
||||||
/* socket_family, socket_protocol, response_address, response_port */
|
/* socket_family, socket_protocol, response_address, response_port, query_address, query_port */
|
||||||
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
log_assert(cptype == comm_udp || cptype == comm_tcp);
|
||||||
dt_msg_fill_net(&dm, rsock, cptype,
|
dt_msg_fill_net(&dm, rsock, qsock, cptype,
|
||||||
&dm.m.response_address, &dm.m.has_response_address,
|
&dm.m.response_address, &dm.m.has_response_address,
|
||||||
&dm.m.response_port, &dm.m.has_response_port);
|
&dm.m.response_port, &dm.m.has_response_port,
|
||||||
|
&dm.m.query_address, &dm.m.has_query_address,
|
||||||
|
&dm.m.query_port, &dm.m.has_query_port);
|
||||||
|
|
||||||
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
|
||||||
dt_send(env, dm.buf, dm.len_buf);
|
dt_send(env, dm.buf, dm.len_buf);
|
||||||
|
|
|
||||||
|
|
@ -123,12 +123,14 @@ dt_delete(struct dt_env *env);
|
||||||
* Create and send a new dnstap "Message" event of type CLIENT_QUERY.
|
* Create and send a new dnstap "Message" event of type CLIENT_QUERY.
|
||||||
* @param env: dnstap environment object.
|
* @param env: dnstap environment object.
|
||||||
* @param qsock: address/port of client.
|
* @param qsock: address/port of client.
|
||||||
|
* @param rsock: local (service) address/port.
|
||||||
* @param cptype: comm_udp or comm_tcp.
|
* @param cptype: comm_udp or comm_tcp.
|
||||||
* @param qmsg: query message.
|
* @param qmsg: query message.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dt_msg_send_client_query(struct dt_env *env,
|
dt_msg_send_client_query(struct dt_env *env,
|
||||||
struct sockaddr_storage *qsock,
|
struct sockaddr_storage *qsock,
|
||||||
|
struct sockaddr_storage *rsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
struct sldns_buffer *qmsg);
|
struct sldns_buffer *qmsg);
|
||||||
|
|
||||||
|
|
@ -136,12 +138,14 @@ dt_msg_send_client_query(struct dt_env *env,
|
||||||
* Create and send a new dnstap "Message" event of type CLIENT_RESPONSE.
|
* Create and send a new dnstap "Message" event of type CLIENT_RESPONSE.
|
||||||
* @param env: dnstap environment object.
|
* @param env: dnstap environment object.
|
||||||
* @param qsock: address/port of client.
|
* @param qsock: address/port of client.
|
||||||
|
* @param rsock: local (service) address/port.
|
||||||
* @param cptype: comm_udp or comm_tcp.
|
* @param cptype: comm_udp or comm_tcp.
|
||||||
* @param rmsg: response message.
|
* @param rmsg: response message.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dt_msg_send_client_response(struct dt_env *env,
|
dt_msg_send_client_response(struct dt_env *env,
|
||||||
struct sockaddr_storage *qsock,
|
struct sockaddr_storage *qsock,
|
||||||
|
struct sockaddr_storage *rsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
struct sldns_buffer *rmsg);
|
struct sldns_buffer *rmsg);
|
||||||
|
|
||||||
|
|
@ -150,7 +154,8 @@ dt_msg_send_client_response(struct dt_env *env,
|
||||||
* FORWARDER_QUERY. The type used is dependent on the value of the RD bit
|
* FORWARDER_QUERY. The type used is dependent on the value of the RD bit
|
||||||
* in the query header.
|
* in the query header.
|
||||||
* @param env: dnstap environment object.
|
* @param env: dnstap environment object.
|
||||||
* @param rsock: address/port of server the query is being sent to.
|
* @param rsock: address/port of server (upstream) the query is being sent to.
|
||||||
|
* @param qsock: address/port of server (local) the query is being sent from.
|
||||||
* @param cptype: comm_udp or comm_tcp.
|
* @param cptype: comm_udp or comm_tcp.
|
||||||
* @param zone: query zone.
|
* @param zone: query zone.
|
||||||
* @param zone_len: length of zone.
|
* @param zone_len: length of zone.
|
||||||
|
|
@ -159,6 +164,7 @@ dt_msg_send_client_response(struct dt_env *env,
|
||||||
void
|
void
|
||||||
dt_msg_send_outside_query(struct dt_env *env,
|
dt_msg_send_outside_query(struct dt_env *env,
|
||||||
struct sockaddr_storage *rsock,
|
struct sockaddr_storage *rsock,
|
||||||
|
struct sockaddr_storage *qsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
uint8_t *zone, size_t zone_len,
|
uint8_t *zone, size_t zone_len,
|
||||||
struct sldns_buffer *qmsg);
|
struct sldns_buffer *qmsg);
|
||||||
|
|
@ -168,7 +174,8 @@ dt_msg_send_outside_query(struct dt_env *env,
|
||||||
* FORWARDER_RESPONSE. The type used is dependent on the value of the RD bit
|
* FORWARDER_RESPONSE. The type used is dependent on the value of the RD bit
|
||||||
* in the query header.
|
* in the query header.
|
||||||
* @param env: dnstap environment object.
|
* @param env: dnstap environment object.
|
||||||
* @param rsock: address/port of server the response was received from.
|
* @param rsock: address/port of server (upstream) the response was received from.
|
||||||
|
* @param qsock: address/port of server (local) the response was received to.
|
||||||
* @param cptype: comm_udp or comm_tcp.
|
* @param cptype: comm_udp or comm_tcp.
|
||||||
* @param zone: query zone.
|
* @param zone: query zone.
|
||||||
* @param zone_len: length of zone.
|
* @param zone_len: length of zone.
|
||||||
|
|
@ -181,6 +188,7 @@ dt_msg_send_outside_query(struct dt_env *env,
|
||||||
void
|
void
|
||||||
dt_msg_send_outside_response(struct dt_env *env,
|
dt_msg_send_outside_response(struct dt_env *env,
|
||||||
struct sockaddr_storage *rsock,
|
struct sockaddr_storage *rsock,
|
||||||
|
struct sockaddr_storage *qsock,
|
||||||
enum comm_point_type cptype,
|
enum comm_point_type cptype,
|
||||||
uint8_t *zone, size_t zone_len,
|
uint8_t *zone, size_t zone_len,
|
||||||
uint8_t *qbuf, size_t qbuf_len,
|
uint8_t *qbuf, size_t qbuf_len,
|
||||||
|
|
|
||||||
137
doc/Changelog
137
doc/Changelog
|
|
@ -1,3 +1,140 @@
|
||||||
|
11 March 2021: Wouter
|
||||||
|
- Fix parse of LOC RR type for decimetres.
|
||||||
|
|
||||||
|
5 March 2021: Wouter
|
||||||
|
- Workaround for #439: prevent loops in the reuse rbtree.
|
||||||
|
- Debug output for #411 and #439: printout internal error and details.
|
||||||
|
|
||||||
|
4 March 2021: Wouter
|
||||||
|
- iana portlist update.
|
||||||
|
- Fix spurious errors about "Could not generate request: out of
|
||||||
|
memory". The mesh detect cycle routine no longer wrongly stops
|
||||||
|
the check when the calling mesh state is unique.
|
||||||
|
|
||||||
|
26 February 2021: George
|
||||||
|
- Fix for #367: rc_ports don't have ub_sock; skip cleaning up.
|
||||||
|
|
||||||
|
26 February 2021: Wouter
|
||||||
|
- Fix: Resolve interface names on control-interface too.
|
||||||
|
|
||||||
|
25 February 2021: Wouter
|
||||||
|
- Merge PR #367 : DNSTAP log local address. With code from PR #365
|
||||||
|
and fixes #368 : dnstap does not log the DNS message ID for
|
||||||
|
FORWARDER_QUERY.
|
||||||
|
- Fix to allow rpz with wildcard that applies to all TLDs at once.
|
||||||
|
|
||||||
|
24 February 2021: George
|
||||||
|
- Fix #384: (1) A minor request to improve the log (2) A minor bug in one
|
||||||
|
log message.
|
||||||
|
- ipsecmod: Better logging for detecting a cycle when attaching the
|
||||||
|
A/AAAA subquery.
|
||||||
|
|
||||||
|
24 February 2021: Wouter
|
||||||
|
- On startup of unbound it checks if rlimits on memory size look
|
||||||
|
sufficient for the configured cache size, and logs warning if not.
|
||||||
|
- Fix function documentation.
|
||||||
|
- Fix unit test for added ulimit checks.
|
||||||
|
- spelling fix in header.
|
||||||
|
|
||||||
|
23 February 2021: Wouter
|
||||||
|
- Fix for zonemd, that domain-insecure zones work without dnssec.
|
||||||
|
- Fix for zonemd, do not reject insecure result from trust anchor
|
||||||
|
validation step in dnssec chain of trust.
|
||||||
|
|
||||||
|
22 February 2021: Wouter
|
||||||
|
- Fix #431: Squelch permission denied errors for tcp connect
|
||||||
|
and udp connect from the logs, unless at high verbosity.
|
||||||
|
- Fix for zonemd, that nxdomain for the chain of trust is allowed
|
||||||
|
for island zones, it is treated as an insecure zone for verification.
|
||||||
|
|
||||||
|
18 February 2021: Wouter
|
||||||
|
- Merge PR #317: ZONEMD Zone Verification, with RFC 8976 support.
|
||||||
|
ZONEMD records are checked for zones loaded as auth-zone,
|
||||||
|
with DNSSEC if available. There is an added option
|
||||||
|
zonemd-permissive-mode that makes it log but not fail wrong zones.
|
||||||
|
With zonemd-reject-absence for an auth-zone the presence of a
|
||||||
|
zonemd can be mandated for specific zones.
|
||||||
|
- Fix doxygen and pydoc warnings.
|
||||||
|
- Fix #429: rpz: url: with https: broken (regression in 1.13.1).
|
||||||
|
- rpz skip nsec3param records, and nicer log for unsupported actions.
|
||||||
|
|
||||||
|
15 February 2021: Wouter
|
||||||
|
- Fix #422: IPv6 fallback issues when IPv6 is not properly
|
||||||
|
enabled/configured.
|
||||||
|
- Fix to make tests work with support indicators set for iterator.
|
||||||
|
- Fix build on Python 3.10.
|
||||||
|
|
||||||
|
10 February 2021: Wouter
|
||||||
|
- Merge PR #420 from dyunwei: DOH not responsing with
|
||||||
|
"http2_query_read_done failure" logged.
|
||||||
|
|
||||||
|
9 February 2021: Wouter
|
||||||
|
- Fix for Python 3.9, no longer use deprecated functions of
|
||||||
|
PyEval_CallObject (now PyObject_Call), PyEval_InitThreads (now
|
||||||
|
none), PyParser_SimpleParseFile (now Py_CompileString).
|
||||||
|
|
||||||
|
4 February 2021: Wouter
|
||||||
|
- release 1.13.1rc2 tag on branch-1.13.1 with added changes of 2 feb.
|
||||||
|
This became 1.13.1 release tag on 9 feb. The main branch is set
|
||||||
|
to version 1.13.2.
|
||||||
|
|
||||||
|
2 February 2021: Wouter
|
||||||
|
- branch-1.13.1 is created, with release-1.13.1rc1 tag.
|
||||||
|
- Fix dynlibmod link on rhel8 for -ldl inclusion.
|
||||||
|
- Fix windows dependency on libssp.dll because of default stack
|
||||||
|
protector in mingw.
|
||||||
|
- Fix indentation of root anchor for use by windows install script.
|
||||||
|
|
||||||
|
1 February 2021: George
|
||||||
|
- Attempt to fix NULL keys in the reuse_tcp tree; relates to #411.
|
||||||
|
|
||||||
|
29 January 2021: Wouter
|
||||||
|
- Fix for doxygen 1.8.20 compatibility.
|
||||||
|
|
||||||
|
28 January 2021: Wouter
|
||||||
|
- Annotate that we ignore the return value of if_indextoname.
|
||||||
|
- Fix to use correct type for label count in rpz routine.
|
||||||
|
- Fix empty clause warning in config_file nsid parse.
|
||||||
|
- Fix to use correct type for label count in ipdnametoaddr rpz routine.
|
||||||
|
- Fix empty clause warning in edns pass for padding.
|
||||||
|
- Fix fwd ancil test post script when not supported.
|
||||||
|
|
||||||
|
26 January 2021: George
|
||||||
|
- Merge PR #408 from fobser: Prevent a few more yacc clashes.
|
||||||
|
- Merge PR #275 from Roland van Rijswijk-Deij: Add feature to return the
|
||||||
|
original instead of a decrementing TTL ('serve-original-ttl')
|
||||||
|
- Merge PR #355 from noloader: Make ICANN Update CA and DS Trust Anchor
|
||||||
|
static data.
|
||||||
|
- Ignore cache blacklisting when trying to reply with expired data from
|
||||||
|
cache (#394).
|
||||||
|
|
||||||
|
26 January 2021: Wouter
|
||||||
|
- Fix compile of unbound-dnstap-socket without dnstap installed.
|
||||||
|
|
||||||
|
22 January 2021: Willem
|
||||||
|
- Padding of queries and responses with DNS over TLS as specified in
|
||||||
|
RFC7830 and RFC8467.
|
||||||
|
|
||||||
|
22 January 2021: George
|
||||||
|
- Fix TTL of SOA record for negative answers (localzone and
|
||||||
|
authzone data) to be the minimum of the SOA TTL and the SOA.MINIMUM.
|
||||||
|
|
||||||
|
19 January 2021: Willem
|
||||||
|
- Support for RFC5001: DNS Name Server Identifier (NSID) Option
|
||||||
|
with the nsid: option in unbound.conf
|
||||||
|
|
||||||
|
18 January 2021: Wouter
|
||||||
|
- Fix #404: DNS query with small edns bufsize fail.
|
||||||
|
- Fix declaration before statement and signed comparison warning in
|
||||||
|
dns64.
|
||||||
|
|
||||||
|
15 January 2021: Wouter
|
||||||
|
- Merge #402 from fobser: Implement IPv4-Embedded addresses according
|
||||||
|
to RFC6052.
|
||||||
|
|
||||||
|
14 January 2021: Wouter
|
||||||
|
- Fix for #93: dynlibmodule import library is named libunbound.dll.a.
|
||||||
|
|
||||||
13 January 2021: Wouter
|
13 January 2021: Wouter
|
||||||
- Merge #399 from xiangbao227: The lock of lruhash table should
|
- Merge #399 from xiangbao227: The lock of lruhash table should
|
||||||
unlocked after markdel entry.
|
unlocked after markdel entry.
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ RFC 4343: case insensitive handling of domain names.
|
||||||
RFC 4509: SHA256 DS hash.
|
RFC 4509: SHA256 DS hash.
|
||||||
RFC 4592: wildcards.
|
RFC 4592: wildcards.
|
||||||
RFC 4697: No DNS Resolution Misbehavior.
|
RFC 4697: No DNS Resolution Misbehavior.
|
||||||
|
RFC 5001: DNS Name Server Identifier (NSID) Option
|
||||||
RFC 5011: update of trust anchors with timers.
|
RFC 5011: update of trust anchors with timers.
|
||||||
RFC 5155: NSEC3, NSEC3PARAM types
|
RFC 5155: NSEC3, NSEC3PARAM types
|
||||||
RFC 5358: reflectors-are-evil: access control list for recursive
|
RFC 5358: reflectors-are-evil: access control list for recursive
|
||||||
|
|
|
||||||
1
doc/TODO
1
doc/TODO
|
|
@ -14,7 +14,6 @@ o (option) store primed key data in a overlaid keyhints file (sort of like draft
|
||||||
o windows version, auto update feature, a query to check for the version.
|
o windows version, auto update feature, a query to check for the version.
|
||||||
o command the server with TSIG inband. get-config, clearcache,
|
o command the server with TSIG inband. get-config, clearcache,
|
||||||
get stats, get memstats, get ..., reload, clear one zone from cache
|
get stats, get memstats, get ..., reload, clear one zone from cache
|
||||||
o NSID rfc 5001 support.
|
|
||||||
o timers rfc 5011 support.
|
o timers rfc 5011 support.
|
||||||
o Treat YXDOMAIN from a DNAME properly, in iterator (not throwaway), validator.
|
o Treat YXDOMAIN from a DNAME properly, in iterator (not throwaway), validator.
|
||||||
o make timeout backoffs randomized (a couple percent random) to spread traffic.
|
o make timeout backoffs randomized (a couple percent random) to spread traffic.
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,9 @@ server:
|
||||||
# the version to report. Leave "" or default to return package version.
|
# the version to report. Leave "" or default to return package version.
|
||||||
# version: ""
|
# version: ""
|
||||||
|
|
||||||
|
# NSID identity (hex string, or "ascii_somestring"). default disabled.
|
||||||
|
# nsid: "aabbccdd"
|
||||||
|
|
||||||
# the target fetch policy.
|
# the target fetch policy.
|
||||||
# series of integers describing the policy per dependency depth.
|
# series of integers describing the policy per dependency depth.
|
||||||
# The number of values in the list determines the maximum dependency
|
# The number of values in the list determines the maximum dependency
|
||||||
|
|
@ -388,7 +391,7 @@ server:
|
||||||
# target-fetch-policy: "3 2 1 0 0"
|
# target-fetch-policy: "3 2 1 0 0"
|
||||||
|
|
||||||
# Harden against very small EDNS buffer sizes.
|
# Harden against very small EDNS buffer sizes.
|
||||||
# harden-short-bufsize: no
|
# harden-short-bufsize: yes
|
||||||
|
|
||||||
# Harden against unseemly large queries.
|
# Harden against unseemly large queries.
|
||||||
# harden-large-queries: no
|
# harden-large-queries: no
|
||||||
|
|
@ -595,6 +598,13 @@ server:
|
||||||
# A recommended value is 1800.
|
# A recommended value is 1800.
|
||||||
# serve-expired-client-timeout: 0
|
# serve-expired-client-timeout: 0
|
||||||
|
|
||||||
|
# Return the original TTL as received from the upstream name server rather
|
||||||
|
# than the decrementing TTL as stored in the cache. Enabling this feature
|
||||||
|
# does not impact cache expiry, it only changes the TTL unbound embeds in
|
||||||
|
# responses to queries. Note that enabling this feature implicitly disables
|
||||||
|
# enforcement of the configured minimum and maximum TTL.
|
||||||
|
# serve-original-ttl: no
|
||||||
|
|
||||||
# Have the validator log failed validations for your diagnosis.
|
# Have the validator log failed validations for your diagnosis.
|
||||||
# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
|
# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
|
||||||
# val-log-level: 0
|
# val-log-level: 0
|
||||||
|
|
@ -605,6 +615,9 @@ server:
|
||||||
# List in ascending order the keysize and count values.
|
# List in ascending order the keysize and count values.
|
||||||
# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
|
# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
|
||||||
|
|
||||||
|
# if enabled, ZONEMD verification failures do not block the zone.
|
||||||
|
# zonemd-permissive-mode: no
|
||||||
|
|
||||||
# instruct the auto-trust-anchor-file probing to add anchors after ttl.
|
# instruct the auto-trust-anchor-file probing to add anchors after ttl.
|
||||||
# add-holddown: 2592000 # 30 days
|
# add-holddown: 2592000 # 30 days
|
||||||
|
|
||||||
|
|
@ -755,6 +768,12 @@ server:
|
||||||
# cipher setting for TLSv1.3
|
# cipher setting for TLSv1.3
|
||||||
# tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
|
# tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
|
||||||
|
|
||||||
|
# Pad responses to padded queries received over TLS
|
||||||
|
# pad-responses: yes
|
||||||
|
|
||||||
|
# Padded responses will be padded to the closest multiple of this size.
|
||||||
|
# pad-responses-block-size: 468
|
||||||
|
|
||||||
# Use the SNI extension for TLS connections. Default is yes.
|
# Use the SNI extension for TLS connections. Default is yes.
|
||||||
# Changing the value requires a reload.
|
# Changing the value requires a reload.
|
||||||
# tls-use-sni: yes
|
# tls-use-sni: yes
|
||||||
|
|
@ -777,6 +796,12 @@ server:
|
||||||
# Add system certs to the cert bundle, from the Windows Cert Store
|
# Add system certs to the cert bundle, from the Windows Cert Store
|
||||||
# tls-win-cert: no
|
# tls-win-cert: no
|
||||||
|
|
||||||
|
# Pad queries over TLS upstreams
|
||||||
|
# pad-queries: yes
|
||||||
|
|
||||||
|
# Padded queries will be padded to the closest multiple of this size.
|
||||||
|
# pad-queries-block-size: 128
|
||||||
|
|
||||||
# Also serve tls on these port numbers (eg. 443, ...), by listing
|
# Also serve tls on these port numbers (eg. 443, ...), by listing
|
||||||
# tls-additional-port: portno for each of the port numbers.
|
# tls-additional-port: portno for each of the port numbers.
|
||||||
|
|
||||||
|
|
@ -1000,6 +1025,7 @@ remote-control:
|
||||||
# name: "example.org"
|
# name: "example.org"
|
||||||
# for-downstream: yes
|
# for-downstream: yes
|
||||||
# for-upstream: yes
|
# for-upstream: yes
|
||||||
|
# zonemd-reject-absence: no
|
||||||
# zonefile: "example.org.zone"
|
# zonefile: "example.org.zone"
|
||||||
|
|
||||||
# Views
|
# Views
|
||||||
|
|
|
||||||
|
|
@ -564,6 +564,26 @@ and that is the default.
|
||||||
Set the list of ciphersuites to allow when serving TLS. This is for newer
|
Set the list of ciphersuites to allow when serving TLS. This is for newer
|
||||||
TLS 1.3 connections. Use "" for defaults, and that is the default.
|
TLS 1.3 connections. Use "" for defaults, and that is the default.
|
||||||
.TP
|
.TP
|
||||||
|
.B pad\-responses: \fI<yes or no>
|
||||||
|
If enabled, TLS serviced queries that contained an EDNS Padding option will
|
||||||
|
cause responses padded to the closest multiple of the size specified in
|
||||||
|
\fBpad\-responses\-block\-size\fR.
|
||||||
|
Default is yes.
|
||||||
|
.TP
|
||||||
|
.B pad\-responses\-block\-size: \fI<number>
|
||||||
|
The block size with which to pad responses serviced over TLS. Only responses
|
||||||
|
to padded queries will be padded.
|
||||||
|
Default is 468.
|
||||||
|
.TP
|
||||||
|
.B pad\-queries: \fI<yes or no>
|
||||||
|
If enabled, all queries sent over TLS upstreams will be padded to the closest
|
||||||
|
multiple of the size specified in \fBpad\-queries\-block\-size\fR.
|
||||||
|
Default is yes.
|
||||||
|
.TP
|
||||||
|
.B pad\-queries\-block\-size: \fI<number>
|
||||||
|
The block size with which to pad queries sent over TLS upstreams.
|
||||||
|
Default is 128.
|
||||||
|
.TP
|
||||||
.B tls\-use\-sni: \fI<yes or no>
|
.B tls\-use\-sni: \fI<yes or no>
|
||||||
Enable or disable sending the SNI extension on TLS connections.
|
Enable or disable sending the SNI extension on TLS connections.
|
||||||
Default is yes.
|
Default is yes.
|
||||||
|
|
@ -819,6 +839,11 @@ If enabled version.server and version.bind queries are refused.
|
||||||
Set the version to report. If set to "", the default, then the package
|
Set the version to report. If set to "", the default, then the package
|
||||||
version is returned.
|
version is returned.
|
||||||
.TP
|
.TP
|
||||||
|
.B nsid:\fR <string>
|
||||||
|
Add the specified nsid to the EDNS section of the answer when queried
|
||||||
|
with an NSID EDNS enabled packet. As a sequence of hex characters or
|
||||||
|
with ascii_ prefix and then an ascii string.
|
||||||
|
.TP
|
||||||
.B hide\-trustanchor: \fI<yes or no>
|
.B hide\-trustanchor: \fI<yes or no>
|
||||||
If enabled trustanchor.unbound queries are refused.
|
If enabled trustanchor.unbound queries are refused.
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -839,9 +864,8 @@ closer to that of BIND 9, while setting "\-1 \-1 \-1 \-1 \-1" gives behaviour
|
||||||
rumoured to be closer to that of BIND 8.
|
rumoured to be closer to that of BIND 8.
|
||||||
.TP
|
.TP
|
||||||
.B harden\-short\-bufsize: \fI<yes or no>
|
.B harden\-short\-bufsize: \fI<yes or no>
|
||||||
Very small EDNS buffer sizes from queries are ignored. Default is off, since
|
Very small EDNS buffer sizes from queries are ignored. Default is on, as
|
||||||
it is legal protocol wise to send these, and unbound tries to give very
|
described in the standard.
|
||||||
small answers to these queries, where possible.
|
|
||||||
.TP
|
.TP
|
||||||
.B harden\-large\-queries: \fI<yes or no>
|
.B harden\-large\-queries: \fI<yes or no>
|
||||||
Very large queries are ignored. Default is off, since it is legal protocol
|
Very large queries are ignored. Default is off, since it is legal protocol
|
||||||
|
|
@ -1163,6 +1187,19 @@ responding with expired data. A recommended value per
|
||||||
RFC 8767 is 1800. Setting this to 0 will disable this
|
RFC 8767 is 1800. Setting this to 0 will disable this
|
||||||
behavior. Default is 0.
|
behavior. Default is 0.
|
||||||
.TP
|
.TP
|
||||||
|
.B serve\-original\-ttl: \fI<yes or no>
|
||||||
|
If enabled, unbound will always return the original TTL as received from
|
||||||
|
the upstream name server rather than the decrementing TTL as
|
||||||
|
stored in the cache. This feature may be useful if unbound serves as a
|
||||||
|
front-end to a hidden authoritative name server. Enabling this feature does
|
||||||
|
not impact cache expiry, it only changes the TTL unbound embeds in responses to
|
||||||
|
queries. Note that enabling this feature implicitly disables enforcement of
|
||||||
|
the configured minimum and maximum TTL, as it is assumed users who enable this
|
||||||
|
feature do not want unbound to change the TTL obtained from an upstream server.
|
||||||
|
Thus, the values set using \fBcache\-min\-ttl\fR and \fBcache\-max\-ttl\fR are
|
||||||
|
ignored.
|
||||||
|
Default is "no".
|
||||||
|
.TP
|
||||||
.B val\-nsec3\-keysize\-iterations: \fI<"list of values">
|
.B val\-nsec3\-keysize\-iterations: \fI<"list of values">
|
||||||
List of keysize and iteration count values, separated by spaces, surrounded
|
List of keysize and iteration count values, separated by spaces, surrounded
|
||||||
by quotes. Default is "1024 150 2048 500 4096 2500". This determines the
|
by quotes. Default is "1024 150 2048 500 4096 2500". This determines the
|
||||||
|
|
@ -1172,6 +1209,12 @@ be in ascending order and have at least one entry. If you set it to
|
||||||
"1024 65535" there is no restriction to NSEC3 iteration values.
|
"1024 65535" there is no restriction to NSEC3 iteration values.
|
||||||
This table must be kept short; a very long list could cause slower operation.
|
This table must be kept short; a very long list could cause slower operation.
|
||||||
.TP
|
.TP
|
||||||
|
.B zonemd\-permissive\-mode: \fI<yes or no>
|
||||||
|
If enabled the ZONEMD verification failures are only logged and do not cause
|
||||||
|
the zone to be blocked and only return servfail. Useful for testing out
|
||||||
|
if it works, or if the operator only wants to be notified of a problem without
|
||||||
|
disrupting service. Default is no.
|
||||||
|
.TP
|
||||||
.B add\-holddown: \fI<seconds>
|
.B add\-holddown: \fI<seconds>
|
||||||
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
|
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
|
||||||
autotrust updates to add new trust anchors only after they have been
|
autotrust updates to add new trust anchors only after they have been
|
||||||
|
|
@ -1839,6 +1882,19 @@ to the authority servers for this zone, it'll fetch the data directly from
|
||||||
the zone data. Turn it on when you want unbound to provide recursion for
|
the zone data. Turn it on when you want unbound to provide recursion for
|
||||||
downstream clients, and use the zone data as a local copy to speed up lookups.
|
downstream clients, and use the zone data as a local copy to speed up lookups.
|
||||||
.TP
|
.TP
|
||||||
|
.B zonemd\-reject\-absence: \fI<yes or no>
|
||||||
|
Enable this option to reject the absence of the ZONEMD record. Without it,
|
||||||
|
when zonemd is not there it is not checked. It is useful to enable for a
|
||||||
|
nonDNSSEC signed zone where the operator wants to require the verification
|
||||||
|
of a ZONEMD, hence a missing ZONEMD is a failure. The action upon
|
||||||
|
failure is controlled by the \fBzonemd\-permissive\-mode\fR option, for
|
||||||
|
log only or also block the zone. The default is no.
|
||||||
|
.IP
|
||||||
|
Without the option absence of a ZONEMD is only a failure when the zone is
|
||||||
|
DNSSEC signed, and we have a trust anchor, and the DNSSEC verification of
|
||||||
|
the absence of the ZONEMD fails. With the option enabled, the absence of
|
||||||
|
a ZONEMD is always a failure, also for nonDNSSEC signed zones.
|
||||||
|
.TP
|
||||||
.B zonefile: \fI<filename>
|
.B zonefile: \fI<filename>
|
||||||
The filename where the zone is stored. If not given then no zonefile is used.
|
The filename where the zone is stored. If not given then no zonefile is used.
|
||||||
If the file does not exist or is empty, unbound will attempt to fetch zone
|
If the file does not exist or is empty, unbound will attempt to fetch zone
|
||||||
|
|
|
||||||
|
|
@ -1143,7 +1143,7 @@ COMPACT_LATEX = NO
|
||||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||||
# executive. If left blank a4wide will be used.
|
# executive. If left blank a4wide will be used.
|
||||||
|
|
||||||
PAPER_TYPE = a4wide
|
#PAPER_TYPE = a4wide
|
||||||
|
|
||||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||||
# packages that should be included in the LaTeX output.
|
# packages that should be included in the LaTeX output.
|
||||||
|
|
@ -1451,7 +1451,7 @@ EXTERNAL_GROUPS = YES
|
||||||
# The PERL_PATH should be the absolute path and name of the perl script
|
# The PERL_PATH should be the absolute path and name of the perl script
|
||||||
# interpreter (i.e. the result of `which perl').
|
# interpreter (i.e. the result of `which perl').
|
||||||
|
|
||||||
PERL_PATH = /usr/bin/perl
|
#PERL_PATH = /usr/bin/perl
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the dot tool
|
# Configuration options related to the dot tool
|
||||||
|
|
@ -1473,7 +1473,7 @@ CLASS_DIAGRAMS = YES
|
||||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||||
# default search path.
|
# default search path.
|
||||||
|
|
||||||
MSCGEN_PATH =
|
#MSCGEN_PATH =
|
||||||
|
|
||||||
# If set to YES, the inheritance and collaboration graphs will hide
|
# If set to YES, the inheritance and collaboration graphs will hide
|
||||||
# inheritance and usage relations if the target is undocumented
|
# inheritance and usage relations if the target is undocumented
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@
|
||||||
* And to build for windows, first make unbound with the --with-dynlibmod
|
* And to build for windows, first make unbound with the --with-dynlibmod
|
||||||
* switch, then use this command:
|
* switch, then use this command:
|
||||||
* x86_64-w64-mingw32-gcc -m64 -I../.. -shared -Wall -Werror -fpic
|
* x86_64-w64-mingw32-gcc -m64 -I../.. -shared -Wall -Werror -fpic
|
||||||
* -o helloworld.dll helloworld.c -L../.. -l:libunbound.a
|
* -o helloworld.dll helloworld.c -L../.. -l:libunbound.dll.a
|
||||||
* to cross-compile a 64-bit Windows DLL.
|
* to cross-compile a 64-bit Windows DLL. The libunbound.dll.a is produced
|
||||||
|
* by the compile step that makes unbound.exe and allows the dynlib dll to
|
||||||
|
* access definitions in unbound.exe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ subnetmod_init(struct module_env *env, int id)
|
||||||
subnet_data_delete, NULL);
|
subnet_data_delete, NULL);
|
||||||
slabhash_setmarkdel(sn_env->subnet_msg_cache, &subnet_markdel);
|
slabhash_setmarkdel(sn_env->subnet_msg_cache, &subnet_markdel);
|
||||||
if(!sn_env->subnet_msg_cache) {
|
if(!sn_env->subnet_msg_cache) {
|
||||||
log_err("subnet: could not create cache");
|
log_err("subnetcache: could not create cache");
|
||||||
free(sn_env);
|
free(sn_env);
|
||||||
env->modinfo[id] = NULL;
|
env->modinfo[id] = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -214,21 +214,21 @@ subnetmod_init(struct module_env *env, int id)
|
||||||
sn_env->whitelist = ecs_whitelist_create();
|
sn_env->whitelist = ecs_whitelist_create();
|
||||||
if(!sn_env->whitelist ||
|
if(!sn_env->whitelist ||
|
||||||
!ecs_whitelist_apply_cfg(sn_env->whitelist, env->cfg)) {
|
!ecs_whitelist_apply_cfg(sn_env->whitelist, env->cfg)) {
|
||||||
log_err("subnet: could not create ECS whitelist");
|
log_err("subnetcache: could not create ECS whitelist");
|
||||||
slabhash_delete(sn_env->subnet_msg_cache);
|
slabhash_delete(sn_env->subnet_msg_cache);
|
||||||
free(sn_env);
|
free(sn_env);
|
||||||
env->modinfo[id] = NULL;
|
env->modinfo[id] = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
verbose(VERB_QUERY, "subnet: option registered (%d)",
|
verbose(VERB_QUERY, "subnetcache: option registered (%d)",
|
||||||
env->cfg->client_subnet_opcode);
|
env->cfg->client_subnet_opcode);
|
||||||
/* Create new mesh state for all queries. */
|
/* Create new mesh state for all queries. */
|
||||||
env->unique_mesh = 1;
|
env->unique_mesh = 1;
|
||||||
if(!edns_register_option(env->cfg->client_subnet_opcode,
|
if(!edns_register_option(env->cfg->client_subnet_opcode,
|
||||||
env->cfg->client_subnet_always_forward /* bypass cache */,
|
env->cfg->client_subnet_always_forward /* bypass cache */,
|
||||||
0 /* no aggregation */, env)) {
|
0 /* no aggregation */, env)) {
|
||||||
log_err("subnet: could not register opcode");
|
log_err("subnetcache: could not register opcode");
|
||||||
ecs_whitelist_delete(sn_env->whitelist);
|
ecs_whitelist_delete(sn_env->whitelist);
|
||||||
slabhash_delete(sn_env->subnet_msg_cache);
|
slabhash_delete(sn_env->subnet_msg_cache);
|
||||||
free(sn_env);
|
free(sn_env);
|
||||||
|
|
@ -365,7 +365,7 @@ update_cache(struct module_qstate *qstate, int id)
|
||||||
/* Step 2, find the correct tree */
|
/* Step 2, find the correct tree */
|
||||||
if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) {
|
if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) {
|
||||||
lock_rw_unlock(&lru_entry->lock);
|
lock_rw_unlock(&lru_entry->lock);
|
||||||
log_err("Subnet cache insertion failed");
|
log_err("subnetcache: cache insertion failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lock_quick_lock(&sne->alloc.lock);
|
lock_quick_lock(&sne->alloc.lock);
|
||||||
|
|
@ -373,7 +373,7 @@ update_cache(struct module_qstate *qstate, int id)
|
||||||
lock_quick_unlock(&sne->alloc.lock);
|
lock_quick_unlock(&sne->alloc.lock);
|
||||||
if (!rep) {
|
if (!rep) {
|
||||||
lock_rw_unlock(&lru_entry->lock);
|
lock_rw_unlock(&lru_entry->lock);
|
||||||
log_err("Subnet cache insertion failed");
|
log_err("subnetcache: cache insertion failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -487,7 +487,7 @@ eval_response(struct module_qstate *qstate, int id, struct subnet_qstate *sq)
|
||||||
/* We have not asked for subnet data */
|
/* We have not asked for subnet data */
|
||||||
if (!sq->subnet_sent) {
|
if (!sq->subnet_sent) {
|
||||||
if (s_in->subnet_validdata)
|
if (s_in->subnet_validdata)
|
||||||
verbose(VERB_QUERY, "subnet: received spurious data");
|
verbose(VERB_QUERY, "subnetcache: received spurious data");
|
||||||
if (sq->subnet_downstream) /* Copy back to client */
|
if (sq->subnet_downstream) /* Copy back to client */
|
||||||
cp_edns_bad_response(c_out, c_in);
|
cp_edns_bad_response(c_out, c_in);
|
||||||
return module_finished;
|
return module_finished;
|
||||||
|
|
@ -499,7 +499,7 @@ eval_response(struct module_qstate *qstate, int id, struct subnet_qstate *sq)
|
||||||
* consequence the answer ended up in the regular cache. It
|
* consequence the answer ended up in the regular cache. It
|
||||||
* is still usefull to put it in the edns subnet cache for
|
* is still usefull to put it in the edns subnet cache for
|
||||||
* when a client explicitly asks for subnet specific answer. */
|
* when a client explicitly asks for subnet specific answer. */
|
||||||
verbose(VERB_QUERY, "subnet: Authority indicates no support");
|
verbose(VERB_QUERY, "subnetcache: Authority indicates no support");
|
||||||
if(!sq->started_no_cache_store) {
|
if(!sq->started_no_cache_store) {
|
||||||
lock_rw_wrlock(&sne->biglock);
|
lock_rw_wrlock(&sne->biglock);
|
||||||
update_cache(qstate, id);
|
update_cache(qstate, id);
|
||||||
|
|
@ -521,7 +521,7 @@ eval_response(struct module_qstate *qstate, int id, struct subnet_qstate *sq)
|
||||||
s_out->subnet_source_mask))
|
s_out->subnet_source_mask))
|
||||||
{
|
{
|
||||||
/* we can not accept, restart query without option */
|
/* we can not accept, restart query without option */
|
||||||
verbose(VERB_QUERY, "subnet: forged data");
|
verbose(VERB_QUERY, "subnetcache: forged data");
|
||||||
s_out->subnet_validdata = 0;
|
s_out->subnet_validdata = 0;
|
||||||
(void)edns_opt_list_remove(&qstate->edns_opts_back_out,
|
(void)edns_opt_list_remove(&qstate->edns_opts_back_out,
|
||||||
qstate->env->cfg->client_subnet_opcode);
|
qstate->env->cfg->client_subnet_opcode);
|
||||||
|
|
@ -700,10 +700,10 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
struct subnet_env *sne = qstate->env->modinfo[id];
|
struct subnet_env *sne = qstate->env->modinfo[id];
|
||||||
struct subnet_qstate *sq = (struct subnet_qstate*)qstate->minfo[id];
|
struct subnet_qstate *sq = (struct subnet_qstate*)qstate->minfo[id];
|
||||||
|
|
||||||
verbose(VERB_QUERY, "subnet[module %d] operate: extstate:%s "
|
verbose(VERB_QUERY, "subnetcache[module %d] operate: extstate:%s "
|
||||||
"event:%s", id, strextstate(qstate->ext_state[id]),
|
"event:%s", id, strextstate(qstate->ext_state[id]),
|
||||||
strmodulevent(event));
|
strmodulevent(event));
|
||||||
log_query_info(VERB_QUERY, "subnet operate: query", &qstate->qinfo);
|
log_query_info(VERB_QUERY, "subnetcache operate: query", &qstate->qinfo);
|
||||||
|
|
||||||
if((event == module_event_new || event == module_event_pass) &&
|
if((event == module_event_new || event == module_event_pass) &&
|
||||||
sq == NULL) {
|
sq == NULL) {
|
||||||
|
|
@ -738,7 +738,7 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
/* No clients are interested in result or we could not
|
/* No clients are interested in result or we could not
|
||||||
* parse it, we don't do client subnet */
|
* parse it, we don't do client subnet */
|
||||||
sq->ecs_server_out.subnet_validdata = 0;
|
sq->ecs_server_out.subnet_validdata = 0;
|
||||||
verbose(VERB_ALGO, "subnet: pass to next module");
|
verbose(VERB_ALGO, "subnetcache: pass to next module");
|
||||||
qstate->ext_state[id] = module_wait_module;
|
qstate->ext_state[id] = module_wait_module;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -758,7 +758,7 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
if (lookup_and_reply(qstate, id, sq)) {
|
if (lookup_and_reply(qstate, id, sq)) {
|
||||||
sne->num_msg_cache++;
|
sne->num_msg_cache++;
|
||||||
lock_rw_unlock(&sne->biglock);
|
lock_rw_unlock(&sne->biglock);
|
||||||
verbose(VERB_QUERY, "subnet: answered from cache");
|
verbose(VERB_QUERY, "subnetcache: answered from cache");
|
||||||
qstate->ext_state[id] = module_finished;
|
qstate->ext_state[id] = module_finished;
|
||||||
|
|
||||||
ecs_opt_list_append(&sq->ecs_client_out,
|
ecs_opt_list_append(&sq->ecs_client_out,
|
||||||
|
|
@ -798,7 +798,7 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
|
|
||||||
/* pass request to next module */
|
/* pass request to next module */
|
||||||
verbose(VERB_ALGO,
|
verbose(VERB_ALGO,
|
||||||
"subnet: not found in cache. pass to next module");
|
"subnetcache: not found in cache. pass to next module");
|
||||||
qstate->ext_state[id] = module_wait_module;
|
qstate->ext_state[id] = module_wait_module;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -819,7 +819,7 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
/* We are being revisited */
|
/* We are being revisited */
|
||||||
if(event == module_event_pass || event == module_event_new) {
|
if(event == module_event_pass || event == module_event_new) {
|
||||||
/* Just pass it on, we already did the work */
|
/* Just pass it on, we already did the work */
|
||||||
verbose(VERB_ALGO, "subnet: pass to next module");
|
verbose(VERB_ALGO, "subnetcache: pass to next module");
|
||||||
qstate->ext_state[id] = module_wait_module;
|
qstate->ext_state[id] = module_wait_module;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -828,7 +828,7 @@ subnetmod_operate(struct module_qstate *qstate, enum module_ev event,
|
||||||
qstate->ext_state[id] = module_finished;
|
qstate->ext_state[id] = module_finished;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log_err("subnet: bad event %s", strmodulevent(event));
|
log_err("subnetcache: bad event %s", strmodulevent(event));
|
||||||
qstate->ext_state[id] = module_error;
|
qstate->ext_state[id] = module_error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -861,7 +861,7 @@ subnetmod_get_mem(struct module_env *env, int id)
|
||||||
* The module function block
|
* The module function block
|
||||||
*/
|
*/
|
||||||
static struct module_func_block subnetmod_block = {
|
static struct module_func_block subnetmod_block = {
|
||||||
"subnet", &subnetmod_init, &subnetmod_deinit, &subnetmod_operate,
|
"subnetcache", &subnetmod_init, &subnetmod_deinit, &subnetmod_operate,
|
||||||
&subnetmod_inform_super, &subnetmod_clear, &subnetmod_get_mem
|
&subnetmod_inform_super, &subnetmod_clear, &subnetmod_get_mem
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,17 @@ generate_request(struct module_qstate* qstate, int id, uint8_t* name,
|
||||||
ask.qclass = qclass;
|
ask.qclass = qclass;
|
||||||
ask.local_alias = NULL;
|
ask.local_alias = NULL;
|
||||||
log_query_info(VERB_ALGO, "ipsecmod: generate request", &ask);
|
log_query_info(VERB_ALGO, "ipsecmod: generate request", &ask);
|
||||||
|
|
||||||
|
/* Explicitly check for cycle before trying to attach. Will result in
|
||||||
|
* cleaner error message. The attach_sub code also checks for cycle but the
|
||||||
|
* message will be out of memory in both cases then. */
|
||||||
|
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
|
||||||
|
if((*qstate->env->detect_cycle)(qstate, &ask,
|
||||||
|
(uint16_t)(BIT_RD|flags), 0, 0)) {
|
||||||
|
verbose(VERB_ALGO, "Could not generate request: cycle detected");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
|
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
|
||||||
if(!(*qstate->env->attach_sub)(qstate, &ask,
|
if(!(*qstate->env->attach_sub)(qstate, &ask,
|
||||||
(uint16_t)(BIT_RD|flags), 0, 0, &newq)){
|
(uint16_t)(BIT_RD|flags), 0, 0, &newq)){
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@
|
||||||
#include "services/cache/infra.h"
|
#include "services/cache/infra.h"
|
||||||
#include "services/cache/dns.h"
|
#include "services/cache/dns.h"
|
||||||
#include "services/cache/rrset.h"
|
#include "services/cache/rrset.h"
|
||||||
|
#include "services/outside_network.h"
|
||||||
#include "util/net_help.h"
|
#include "util/net_help.h"
|
||||||
#include "util/module.h"
|
#include "util/module.h"
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
|
|
@ -1435,3 +1436,19 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void iterator_set_ip46_support(struct module_stack* mods,
|
||||||
|
struct module_env* env, struct outside_network* outnet)
|
||||||
|
{
|
||||||
|
int m = modstack_find(mods, "iterator");
|
||||||
|
struct iter_env* ie = NULL;
|
||||||
|
if(m == -1)
|
||||||
|
return;
|
||||||
|
ie = (struct iter_env*)env->modinfo[m];
|
||||||
|
if(outnet->pending == NULL)
|
||||||
|
return; /* we are in testbound, no rbtree for UDP */
|
||||||
|
if(outnet->num_ip4 == 0)
|
||||||
|
ie->supports_ipv4 = 0;
|
||||||
|
if(outnet->num_ip6 == 0)
|
||||||
|
ie->supports_ipv6 = 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ struct reply_info;
|
||||||
struct module_qstate;
|
struct module_qstate;
|
||||||
struct sock_list;
|
struct sock_list;
|
||||||
struct ub_packed_rrset_key;
|
struct ub_packed_rrset_key;
|
||||||
|
struct module_stack;
|
||||||
|
struct outside_network;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process config options and set iterator module state.
|
* Process config options and set iterator module state.
|
||||||
|
|
@ -130,7 +132,7 @@ struct dns_msg* dns_copy_msg(struct dns_msg* from, struct regional* regional);
|
||||||
* can be prefetch-updates.
|
* can be prefetch-updates.
|
||||||
* @param region: to copy modified (cache is better) rrs back to.
|
* @param region: to copy modified (cache is better) rrs back to.
|
||||||
* @param flags: with BIT_CD for dns64 AAAA translated queries.
|
* @param flags: with BIT_CD for dns64 AAAA translated queries.
|
||||||
* @return void, because we are not interested in alloc errors,
|
* return void, because we are not interested in alloc errors,
|
||||||
* the iterator and validator can operate on the results in their
|
* the iterator and validator can operate on the results in their
|
||||||
* scratch space (the qstate.region) and are not dependent on the cache.
|
* scratch space (the qstate.region) and are not dependent on the cache.
|
||||||
* It is useful to log the alloc failure (for the server operator),
|
* It is useful to log the alloc failure (for the server operator),
|
||||||
|
|
@ -385,4 +387,16 @@ int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp);
|
||||||
int iter_stub_fwd_no_cache(struct module_qstate *qstate,
|
int iter_stub_fwd_no_cache(struct module_qstate *qstate,
|
||||||
struct query_info *qinf);
|
struct query_info *qinf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set support for IP4 and IP6 depending on outgoing interfaces
|
||||||
|
* in the outside network. If none, no support, so no use to lookup
|
||||||
|
* the AAAA and then attempt to use it if there is no outgoing-interface
|
||||||
|
* for it.
|
||||||
|
* @param mods: modstack to find iterator module in.
|
||||||
|
* @param env: module env, find iterator module (if one) in there.
|
||||||
|
* @param outnet: outside network structure.
|
||||||
|
*/
|
||||||
|
void iterator_set_ip46_support(struct module_stack* mods,
|
||||||
|
struct module_env* env, struct outside_network* outnet);
|
||||||
|
|
||||||
#endif /* ITERATOR_ITER_UTILS_H */
|
#endif /* ITERATOR_ITER_UTILS_H */
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@ context_finalize(struct ub_ctx* ctx)
|
||||||
return UB_NOMEM;
|
return UB_NOMEM;
|
||||||
if(!local_zones_apply_cfg(ctx->local_zones, cfg))
|
if(!local_zones_apply_cfg(ctx->local_zones, cfg))
|
||||||
return UB_INITFAIL;
|
return UB_INITFAIL;
|
||||||
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz))
|
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
|
||||||
|
ctx->env, &ctx->mods))
|
||||||
return UB_INITFAIL;
|
return UB_INITFAIL;
|
||||||
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
|
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
|
||||||
return UB_INITFAIL;
|
return UB_INITFAIL;
|
||||||
|
|
|
||||||
|
|
@ -577,6 +577,7 @@ setup_qinfo_edns(struct libworker* w, struct ctx_query* q,
|
||||||
edns->edns_version = 0;
|
edns->edns_version = 0;
|
||||||
edns->bits = EDNS_DO;
|
edns->bits = EDNS_DO;
|
||||||
edns->opt_list = NULL;
|
edns->opt_list = NULL;
|
||||||
|
edns->padding_block_size = 0;
|
||||||
if(sldns_buffer_capacity(w->back->udp_buff) < 65535)
|
if(sldns_buffer_capacity(w->back->udp_buff) < 65535)
|
||||||
edns->udp_size = (uint16_t)sldns_buffer_capacity(
|
edns->udp_size = (uint16_t)sldns_buffer_capacity(
|
||||||
w->back->udp_buff);
|
w->back->udp_buff);
|
||||||
|
|
|
||||||
|
|
@ -916,7 +916,13 @@ int _ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype, int rrclass, v
|
||||||
struct cb_data* id;
|
struct cb_data* id;
|
||||||
id = (struct cb_data*) iddata;
|
id = (struct cb_data*) iddata;
|
||||||
arglist = Py_BuildValue("(OiO)",id->data,status, SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ub_result, 0 | 0 )); // Build argument list
|
arglist = Py_BuildValue("(OiO)",id->data,status, SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ub_result, 0 | 0 )); // Build argument list
|
||||||
|
#if PY_MAJOR_VERSION <= 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 9)
|
||||||
|
/* for python before 3.9 */
|
||||||
fresult = PyEval_CallObject(id->func,arglist); // Call Python
|
fresult = PyEval_CallObject(id->func,arglist); // Call Python
|
||||||
|
#else
|
||||||
|
/* for python 3.9 and newer */
|
||||||
|
fresult = PyObject_Call(id->func,arglist,NULL);
|
||||||
|
#endif
|
||||||
Py_DECREF(id->func);
|
Py_DECREF(id->func);
|
||||||
Py_DECREF(id->data);
|
Py_DECREF(id->data);
|
||||||
free(id);
|
free(id);
|
||||||
|
|
|
||||||
|
|
@ -412,6 +412,11 @@ if [ "$DOWIN" = "yes" ]; then
|
||||||
cp ../unbound.exe ../unbound-anchor.exe ../unbound-host.exe ../unbound-control.exe ../unbound-checkconf.exe ../unbound-service-install.exe ../unbound-service-remove.exe ../LICENSE ../winrc/unbound-control-setup.cmd ../winrc/unbound-website.url ../winrc/service.conf ../winrc/README.txt ../contrib/create_unbound_ad_servers.cmd ../contrib/warmup.cmd ../contrib/unbound_cache.cmd .
|
cp ../unbound.exe ../unbound-anchor.exe ../unbound-host.exe ../unbound-control.exe ../unbound-checkconf.exe ../unbound-service-install.exe ../unbound-service-remove.exe ../LICENSE ../winrc/unbound-control-setup.cmd ../winrc/unbound-website.url ../winrc/service.conf ../winrc/README.txt ../contrib/create_unbound_ad_servers.cmd ../contrib/warmup.cmd ../contrib/unbound_cache.cmd .
|
||||||
mkdir libunbound
|
mkdir libunbound
|
||||||
cp ../../unbound_shared/unbound.h ../../unbound_shared/.libs/libunbound*.dll ../../unbound_shared/.libs/libunbound.dll.a ../../unbound_shared/.libs/libunbound.a ../../unbound_shared/.libs/libunbound*.def ../../sslsharedinstall/lib/libcrypto.dll.a ../../sslsharedinstall/lib/libssl.dll.a ../../sslsharedinstall/bin/libcrypto*.dll ../../sslsharedinstall/bin/libssl*.dll ../../wxpinstall/bin/libexpat*.dll ../../wxpinstall/lib/libexpat.dll.a libunbound/.
|
cp ../../unbound_shared/unbound.h ../../unbound_shared/.libs/libunbound*.dll ../../unbound_shared/.libs/libunbound.dll.a ../../unbound_shared/.libs/libunbound.a ../../unbound_shared/.libs/libunbound*.def ../../sslsharedinstall/lib/libcrypto.dll.a ../../sslsharedinstall/lib/libssl.dll.a ../../sslsharedinstall/bin/libcrypto*.dll ../../sslsharedinstall/bin/libssl*.dll ../../wxpinstall/bin/libexpat*.dll ../../wxpinstall/lib/libexpat.dll.a libunbound/.
|
||||||
|
if test "$W64" = "no"; then
|
||||||
|
cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libssp-0.dll libunbound/.
|
||||||
|
else
|
||||||
|
cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libssp-0.dll libunbound/.
|
||||||
|
fi
|
||||||
# zipfile
|
# zipfile
|
||||||
zip -r ../$file LICENSE README.txt unbound.exe unbound-anchor.exe unbound-host.exe unbound-control.exe unbound-checkconf.exe unbound-service-install.exe unbound-service-remove.exe unbound-control-setup.cmd example.conf service.conf root.key unbound-website.url create_unbound_ad_servers.cmd warmup.cmd unbound_cache.cmd Changelog libunbound
|
zip -r ../$file LICENSE README.txt unbound.exe unbound-anchor.exe unbound-host.exe unbound-control.exe unbound-checkconf.exe unbound-service-install.exe unbound-service-remove.exe unbound-control-setup.cmd example.conf service.conf root.key unbound-website.url create_unbound_ad_servers.cmd warmup.cmd unbound_cache.cmd Changelog libunbound
|
||||||
info "Testing $file"
|
info "Testing $file"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ Inplace callbacks
|
||||||
.. function:: inplace_cb_reply(qinfo, qstate, rep, rcode, edns, opt_list_out, region, \*\*kwargs)
|
.. function:: inplace_cb_reply(qinfo, qstate, rep, rcode, edns, opt_list_out, region, \*\*kwargs)
|
||||||
|
|
||||||
Function prototype for callback functions used in
|
Function prototype for callback functions used in
|
||||||
`register_inplace_cb_reply`_, `register_inplace_cb_reply_cache`_,
|
`register_inplace_cb_reply`, `register_inplace_cb_reply_cache`,
|
||||||
`register_inplace_cb_reply_local` and `register_inplace_cb_reply_servfail`.
|
`register_inplace_cb_reply_local` and `register_inplace_cb_reply_servfail`.
|
||||||
|
|
||||||
:param qinfo: :class:`query_info`
|
:param qinfo: :class:`query_info`
|
||||||
|
|
@ -109,7 +109,7 @@ Inplace callbacks
|
||||||
.. function:: inplace_cb_query(qinfo, flags, qstate, addr, zone, region)
|
.. function:: inplace_cb_query(qinfo, flags, qstate, addr, zone, region)
|
||||||
|
|
||||||
Function prototype for callback functions used in
|
Function prototype for callback functions used in
|
||||||
`register_inplace_cb_query`_.
|
`register_inplace_cb_query`.
|
||||||
|
|
||||||
:param qinfo: :class:`query_info`
|
:param qinfo: :class:`query_info`
|
||||||
:param flags: query flags (integer)
|
:param flags: query flags (integer)
|
||||||
|
|
@ -122,7 +122,7 @@ Inplace callbacks
|
||||||
|
|
||||||
Register py_cb as an inplace reply callback function.
|
Register py_cb as an inplace reply callback function.
|
||||||
|
|
||||||
:param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
|
:param py_cb: Python function that follows `inplace_cb_reply`'s prototype. **Must** be callable.
|
||||||
:param env: :class:`module_env`
|
:param env: :class:`module_env`
|
||||||
:param id: Module ID.
|
:param id: Module ID.
|
||||||
:return: True on success, False otherwise
|
:return: True on success, False otherwise
|
||||||
|
|
@ -132,7 +132,7 @@ Inplace callbacks
|
||||||
|
|
||||||
Register py_cb as an inplace reply_cache callback function.
|
Register py_cb as an inplace reply_cache callback function.
|
||||||
|
|
||||||
:param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
|
:param py_cb: Python function that follows `inplace_cb_reply`'s prototype. **Must** be callable.
|
||||||
:param env: :class:`module_env`
|
:param env: :class:`module_env`
|
||||||
:param id: Module ID.
|
:param id: Module ID.
|
||||||
:return: True on success, False otherwise
|
:return: True on success, False otherwise
|
||||||
|
|
@ -142,7 +142,7 @@ Inplace callbacks
|
||||||
|
|
||||||
Register py_cb as an inplace reply_local callback function.
|
Register py_cb as an inplace reply_local callback function.
|
||||||
|
|
||||||
:param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
|
:param py_cb: Python function that follows `inplace_cb_reply`'s prototype. **Must** be callable.
|
||||||
:param env: :class:`module_env`
|
:param env: :class:`module_env`
|
||||||
:param id: Module ID.
|
:param id: Module ID.
|
||||||
:return: True on success, False otherwise
|
:return: True on success, False otherwise
|
||||||
|
|
@ -152,7 +152,7 @@ Inplace callbacks
|
||||||
|
|
||||||
Register py_cb as an inplace reply_servfail callback function.
|
Register py_cb as an inplace reply_servfail callback function.
|
||||||
|
|
||||||
:param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
|
:param py_cb: Python function that follows `inplace_cb_reply`'s prototype. **Must** be callable.
|
||||||
:param env: :class:`module_env`
|
:param env: :class:`module_env`
|
||||||
:param id: Module ID.
|
:param id: Module ID.
|
||||||
:return: True on success, False otherwise
|
:return: True on success, False otherwise
|
||||||
|
|
@ -162,7 +162,7 @@ Inplace callbacks
|
||||||
|
|
||||||
Register py_cb as an inplace query callback function.
|
Register py_cb as an inplace query callback function.
|
||||||
|
|
||||||
:param py_cb: Python function that follows `inplace_cb_query`_'s prototype. **Must** be callable.
|
:param py_cb: Python function that follows `inplace_cb_query`'s prototype. **Must** be callable.
|
||||||
:param env: :class:`module_env`
|
:param env: :class:`module_env`
|
||||||
:param id: Module ID.
|
:param id: Module ID.
|
||||||
:return: True on success, False otherwise
|
:return: True on success, False otherwise
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,10 @@ int pythonmod_init(struct module_env* env, int id)
|
||||||
PyImport_AppendInittab(SWIG_name, (void*)SWIG_init);
|
PyImport_AppendInittab(SWIG_name, (void*)SWIG_init);
|
||||||
#endif
|
#endif
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
|
#if PY_MAJOR_VERSION <= 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 6)
|
||||||
|
/* initthreads only for python 3.6 and older */
|
||||||
PyEval_InitThreads();
|
PyEval_InitThreads();
|
||||||
|
#endif
|
||||||
SWIG_init();
|
SWIG_init();
|
||||||
mainthr = PyEval_SaveThread();
|
mainthr = PyEval_SaveThread();
|
||||||
}
|
}
|
||||||
|
|
@ -335,7 +338,7 @@ int pythonmod_init(struct module_env* env, int id)
|
||||||
PyFileObject = PyFile_FromString((char*)pe->fname, "r");
|
PyFileObject = PyFile_FromString((char*)pe->fname, "r");
|
||||||
script_py = PyFile_AsFile(PyFileObject);
|
script_py = PyFile_AsFile(PyFileObject);
|
||||||
#else
|
#else
|
||||||
script_py = _Py_fopen(pe->fname, "r");
|
script_py = fopen(pe->fname, "r");
|
||||||
#endif
|
#endif
|
||||||
if (script_py == NULL)
|
if (script_py == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -354,6 +357,8 @@ int pythonmod_init(struct module_env* env, int id)
|
||||||
/* TODO: deallocation of pe->... if an error occurs */
|
/* TODO: deallocation of pe->... if an error occurs */
|
||||||
|
|
||||||
if (PyRun_SimpleFile(script_py, pe->fname) < 0) {
|
if (PyRun_SimpleFile(script_py, pe->fname) < 0) {
|
||||||
|
#if PY_MAJOR_VERSION <= 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 9)
|
||||||
|
/* for python before 3.9 */
|
||||||
log_err("pythonmod: can't parse Python script %s", pe->fname);
|
log_err("pythonmod: can't parse Python script %s", pe->fname);
|
||||||
/* print the error to logs too, run it again */
|
/* print the error to logs too, run it again */
|
||||||
fseek(script_py, 0, SEEK_SET);
|
fseek(script_py, 0, SEEK_SET);
|
||||||
|
|
@ -369,9 +374,45 @@ int pythonmod_init(struct module_env* env, int id)
|
||||||
/* ignore the NULL return of _node, it is NULL due to the parse failure
|
/* ignore the NULL return of _node, it is NULL due to the parse failure
|
||||||
* that we are expecting */
|
* that we are expecting */
|
||||||
(void)PyParser_SimpleParseFile(script_py, pe->fname, Py_file_input);
|
(void)PyParser_SimpleParseFile(script_py, pe->fname, Py_file_input);
|
||||||
|
#else
|
||||||
|
/* for python 3.9 and newer */
|
||||||
|
char* fstr = NULL;
|
||||||
|
size_t flen = 0;
|
||||||
|
log_err("pythonmod: can't parse Python script %s", pe->fname);
|
||||||
|
/* print the error to logs too, run it again */
|
||||||
|
fseek(script_py, 0, SEEK_END);
|
||||||
|
flen = (size_t)ftell(script_py);
|
||||||
|
fstr = malloc(flen+1);
|
||||||
|
if(!fstr) {
|
||||||
|
log_err("malloc failure to print parse error");
|
||||||
|
PyGILState_Release(gil);
|
||||||
|
fclose(script_py);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
fseek(script_py, 0, SEEK_SET);
|
||||||
|
if(fread(fstr, flen, 1, script_py) < 1) {
|
||||||
|
log_err("file read failed to print parse error: %s: %s",
|
||||||
|
pe->fname, strerror(errno));
|
||||||
|
PyGILState_Release(gil);
|
||||||
|
fclose(script_py);
|
||||||
|
free(fstr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
fstr[flen] = 0;
|
||||||
|
/* we compile the string, but do not run it, to stop side-effects */
|
||||||
|
/* ignore the NULL return of _node, it is NULL due to the parse failure
|
||||||
|
* that we are expecting */
|
||||||
|
(void)Py_CompileString(fstr, pe->fname, Py_file_input);
|
||||||
|
#endif
|
||||||
log_py_err();
|
log_py_err();
|
||||||
PyGILState_Release(gil);
|
PyGILState_Release(gil);
|
||||||
fclose(script_py);
|
fclose(script_py);
|
||||||
|
#if PY_MAJOR_VERSION <= 2 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 9)
|
||||||
|
/* no cleanup needed for python before 3.9 */
|
||||||
|
#else
|
||||||
|
/* cleanup for python 3.9 and newer */
|
||||||
|
free(fstr);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#if PY_MAJOR_VERSION < 3
|
#if PY_MAJOR_VERSION < 3
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@ respip_copy_rrset(const struct ub_packed_rrset_key* key, struct regional* region
|
||||||
return NULL; /* guard against integer overflow */
|
return NULL; /* guard against integer overflow */
|
||||||
dsize += data->rr_len[i];
|
dsize += data->rr_len[i];
|
||||||
}
|
}
|
||||||
d = regional_alloc(region, dsize);
|
d = regional_alloc_zero(region, dsize);
|
||||||
if(!d)
|
if(!d)
|
||||||
return NULL;
|
return NULL;
|
||||||
*d = *data;
|
*d = *data;
|
||||||
|
|
|
||||||
1397
services/authzone.c
1397
services/authzone.c
File diff suppressed because it is too large
Load diff
|
|
@ -132,8 +132,15 @@ struct auth_zone {
|
||||||
/** for upstream: this zone answers queries that unbound intends to
|
/** for upstream: this zone answers queries that unbound intends to
|
||||||
* send upstream. */
|
* send upstream. */
|
||||||
int for_upstream;
|
int for_upstream;
|
||||||
|
/** reject absence of ZONEMD records */
|
||||||
|
int zonemd_reject_absence;
|
||||||
/** RPZ zones */
|
/** RPZ zones */
|
||||||
struct rpz* rpz;
|
struct rpz* rpz;
|
||||||
|
/** store the env (worker thread specific) for the zonemd callbacks
|
||||||
|
* from the mesh with the results of the lookup, if nonNULL, some
|
||||||
|
* worker has already picked up the zonemd verification task and
|
||||||
|
* this worker does not have to do it as well. */
|
||||||
|
struct module_env* zonemd_callback_env;
|
||||||
/** zone has been deleted */
|
/** zone has been deleted */
|
||||||
int zone_deleted;
|
int zone_deleted;
|
||||||
/** deletelist pointer, unused normally except during delete */
|
/** deletelist pointer, unused normally except during delete */
|
||||||
|
|
@ -474,10 +481,13 @@ struct auth_zones* auth_zones_create(void);
|
||||||
* @param cfg: config to apply.
|
* @param cfg: config to apply.
|
||||||
* @param setup: if true, also sets up values in the auth zones structure
|
* @param setup: if true, also sets up values in the auth zones structure
|
||||||
* @param is_rpz: set to 1 if at least one RPZ zone is configured.
|
* @param is_rpz: set to 1 if at least one RPZ zone is configured.
|
||||||
|
* @param env: environment for offline verification.
|
||||||
|
* @param mods: modules in environment.
|
||||||
* @return false on failure.
|
* @return false on failure.
|
||||||
*/
|
*/
|
||||||
int auth_zones_apply_cfg(struct auth_zones* az, struct config_file* cfg,
|
int auth_zones_apply_cfg(struct auth_zones* az, struct config_file* cfg,
|
||||||
int setup, int* is_rpz);
|
int setup, int* is_rpz, struct module_env* env,
|
||||||
|
struct module_stack* mods);
|
||||||
|
|
||||||
/** initial pick up of worker timeouts, ties events to worker event loop
|
/** initial pick up of worker timeouts, ties events to worker event loop
|
||||||
* @param az: auth zones structure
|
* @param az: auth zones structure
|
||||||
|
|
@ -625,6 +635,9 @@ int auth_zone_read_zonefile(struct auth_zone* z, struct config_file* cfg);
|
||||||
/** find serial number of zone or false if none (no SOA record) */
|
/** find serial number of zone or false if none (no SOA record) */
|
||||||
int auth_zone_get_serial(struct auth_zone* z, uint32_t* serial);
|
int auth_zone_get_serial(struct auth_zone* z, uint32_t* serial);
|
||||||
|
|
||||||
|
/** Find auth_zone SOA and populate the values in xfr(soa values). */
|
||||||
|
int xfr_find_soa(struct auth_zone* z, struct auth_xfer* xfr);
|
||||||
|
|
||||||
/** compare auth_zones for sorted rbtree */
|
/** compare auth_zones for sorted rbtree */
|
||||||
int auth_zone_cmp(const void* z1, const void* z2);
|
int auth_zone_cmp(const void* z1, const void* z2);
|
||||||
|
|
||||||
|
|
@ -685,4 +698,83 @@ void auth_xfer_transfer_lookup_callback(void* arg, int rcode,
|
||||||
*/
|
*/
|
||||||
int compare_serial(uint32_t a, uint32_t b);
|
int compare_serial(uint32_t a, uint32_t b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate ZONEMD digest for the auth zone.
|
||||||
|
* @param z: the auth zone to digest.
|
||||||
|
* omits zonemd at apex and its RRSIG from the digest.
|
||||||
|
* @param scheme: the collation scheme to use. Numbers as defined for ZONEMD.
|
||||||
|
* @param hashalgo: the hash algo, from the registry defined for ZONEMD type.
|
||||||
|
* @param hash: the result buffer.
|
||||||
|
* @param buflen: size of the result buffer, must be large enough. or the
|
||||||
|
* routine fails.
|
||||||
|
* @param resultlen: size of the hash in the result buffer of the result.
|
||||||
|
* @param region: temp region for allocs during canonicalisation.
|
||||||
|
* @param buf: temp buffer during canonicalisation.
|
||||||
|
* @param reason: failure reason, returns a string, NULL on success.
|
||||||
|
* @return false on failure.
|
||||||
|
*/
|
||||||
|
int auth_zone_generate_zonemd_hash(struct auth_zone* z, int scheme,
|
||||||
|
int hashalgo, uint8_t* hash, size_t buflen, size_t* resultlen,
|
||||||
|
struct regional* region, struct sldns_buffer* buf, char** reason);
|
||||||
|
|
||||||
|
/** ZONEMD scheme definitions */
|
||||||
|
#define ZONEMD_SCHEME_SIMPLE 1
|
||||||
|
|
||||||
|
/** ZONEMD hash algorithm definition for SHA384 */
|
||||||
|
#define ZONEMD_ALGO_SHA384 1
|
||||||
|
/** ZONEMD hash algorithm definition for SHA512 */
|
||||||
|
#define ZONEMD_ALGO_SHA512 2
|
||||||
|
|
||||||
|
/** returns true if a zonemd hash algo is supported */
|
||||||
|
int zonemd_hashalgo_supported(int hashalgo);
|
||||||
|
/** returns true if a zonemd scheme is supported */
|
||||||
|
int zonemd_scheme_supported(int scheme);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check ZONEMD digest for the auth zone.
|
||||||
|
* @param z: auth zone to digest.
|
||||||
|
* @param scheme: zonemd scheme.
|
||||||
|
* @param hashalgo: zonemd hash algorithm.
|
||||||
|
* @param hash: the hash to check.
|
||||||
|
* @param hashlen: length of hash buffer.
|
||||||
|
* @param region: temp region for allocs during canonicalisation.
|
||||||
|
* @param buf: temp buffer during canonicalisation.
|
||||||
|
* @param reason: string returned with failure reason.
|
||||||
|
* @return false on failure.
|
||||||
|
*/
|
||||||
|
int auth_zone_generate_zonemd_check(struct auth_zone* z, int scheme,
|
||||||
|
int hashalgo, uint8_t* hash, size_t hashlen, struct regional* region,
|
||||||
|
struct sldns_buffer* buf, char** reason);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform ZONEMD checks and verification for the auth zone.
|
||||||
|
* This includes DNSSEC verification if applicable.
|
||||||
|
* @param z: auth zone to check. Caller holds lock. wrlock.
|
||||||
|
* @param env: with temp region, buffer and config.
|
||||||
|
* @param mods: module stack for validator env.
|
||||||
|
* @param result: if not NULL, result string strdupped in here.
|
||||||
|
* @param offline: if true, there is no spawned lookup when online is needed.
|
||||||
|
* Those zones are skipped for ZONEMD checking.
|
||||||
|
* @param only_online: if true, only for ZONEMD that need online lookup
|
||||||
|
* of DNSKEY chain of trust are processed.
|
||||||
|
*/
|
||||||
|
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
|
||||||
|
struct module_stack* mods, char** result, int offline,
|
||||||
|
int only_online);
|
||||||
|
|
||||||
|
/** mesh callback for zonemd on lookup of dnskey */
|
||||||
|
void auth_zonemd_dnskey_lookup_callback(void* arg, int rcode,
|
||||||
|
struct sldns_buffer* buf, enum sec_status sec, char* why_bogus,
|
||||||
|
int was_ratelimited);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the ZONEMD records that need online DNSSEC chain lookups,
|
||||||
|
* for them spawn the lookup process to get it checked out.
|
||||||
|
* Attaches the lookup process to the worker event base and mesh state.
|
||||||
|
* @param az: auth zones, every zones is checked.
|
||||||
|
* @param env: env of the worker where the task is attached.
|
||||||
|
*/
|
||||||
|
void auth_zones_pickup_zonemd_verify(struct auth_zones* az,
|
||||||
|
struct module_env* env);
|
||||||
|
|
||||||
#endif /* SERVICES_AUTHZONE_H */
|
#endif /* SERVICES_AUTHZONE_H */
|
||||||
|
|
|
||||||
2
services/cache/rrset.c
vendored
2
services/cache/rrset.c
vendored
|
|
@ -45,6 +45,7 @@
|
||||||
#include "util/config_file.h"
|
#include "util/config_file.h"
|
||||||
#include "util/data/packed_rrset.h"
|
#include "util/data/packed_rrset.h"
|
||||||
#include "util/data/msgreply.h"
|
#include "util/data/msgreply.h"
|
||||||
|
#include "util/data/msgparse.h"
|
||||||
#include "util/regional.h"
|
#include "util/regional.h"
|
||||||
#include "util/alloc.h"
|
#include "util/alloc.h"
|
||||||
#include "util/net_help.h"
|
#include "util/net_help.h"
|
||||||
|
|
@ -396,6 +397,7 @@ rrset_update_sec_status(struct rrset_cache* r,
|
||||||
cachedata->ttl = updata->ttl + now;
|
cachedata->ttl = updata->ttl + now;
|
||||||
for(i=0; i<cachedata->count+cachedata->rrsig_count; i++)
|
for(i=0; i<cachedata->count+cachedata->rrsig_count; i++)
|
||||||
cachedata->rr_ttl[i] = updata->rr_ttl[i]+now;
|
cachedata->rr_ttl[i] = updata->rr_ttl[i]+now;
|
||||||
|
cachedata->ttl_add = now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lock_rw_unlock(&e->lock);
|
lock_rw_unlock(&e->lock);
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,16 @@ verbose_print_addr(struct addrinfo *addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
verbose_print_unbound_socket(struct unbound_socket* ub_sock)
|
||||||
|
{
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
log_info("listing of unbound_socket structure:");
|
||||||
|
verbose_print_addr(ub_sock->addr);
|
||||||
|
log_info("s is: %d, fam is: %s", ub_sock->s, ub_sock->fam == AF_INET?"AF_INET":"AF_INET6");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SYSTEMD
|
#ifdef HAVE_SYSTEMD
|
||||||
static int
|
static int
|
||||||
systemd_get_activated(int family, int socktype, int listen,
|
systemd_get_activated(int family, int socktype, int listen,
|
||||||
|
|
@ -916,7 +926,7 @@ static int
|
||||||
make_sock(int stype, const char* ifname, const char* port,
|
make_sock(int stype, const char* ifname, const char* port,
|
||||||
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
|
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
|
||||||
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
|
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
|
||||||
int use_systemd, int dscp)
|
int use_systemd, int dscp, struct unbound_socket* ub_sock)
|
||||||
{
|
{
|
||||||
struct addrinfo *res = NULL;
|
struct addrinfo *res = NULL;
|
||||||
int r, s, inuse, noproto;
|
int r, s, inuse, noproto;
|
||||||
|
|
@ -958,7 +968,11 @@ make_sock(int stype, const char* ifname, const char* port,
|
||||||
*noip6 = 1;
|
*noip6 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freeaddrinfo(res);
|
|
||||||
|
ub_sock->addr = res;
|
||||||
|
ub_sock->s = s;
|
||||||
|
ub_sock->fam = hints->ai_family;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -967,7 +981,7 @@ static int
|
||||||
make_sock_port(int stype, const char* ifname, const char* port,
|
make_sock_port(int stype, const char* ifname, const char* port,
|
||||||
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
|
struct addrinfo *hints, int v6only, int* noip6, size_t rcv, size_t snd,
|
||||||
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
|
int* reuseport, int transparent, int tcp_mss, int nodelay, int freebind,
|
||||||
int use_systemd, int dscp)
|
int use_systemd, int dscp, struct unbound_socket* ub_sock)
|
||||||
{
|
{
|
||||||
char* s = strchr(ifname, '@');
|
char* s = strchr(ifname, '@');
|
||||||
if(s) {
|
if(s) {
|
||||||
|
|
@ -990,11 +1004,11 @@ make_sock_port(int stype, const char* ifname, const char* port,
|
||||||
p[strlen(s+1)]=0;
|
p[strlen(s+1)]=0;
|
||||||
return make_sock(stype, newif, p, hints, v6only, noip6, rcv,
|
return make_sock(stype, newif, p, hints, v6only, noip6, rcv,
|
||||||
snd, reuseport, transparent, tcp_mss, nodelay, freebind,
|
snd, reuseport, transparent, tcp_mss, nodelay, freebind,
|
||||||
use_systemd, dscp);
|
use_systemd, dscp, ub_sock);
|
||||||
}
|
}
|
||||||
return make_sock(stype, ifname, port, hints, v6only, noip6, rcv, snd,
|
return make_sock(stype, ifname, port, hints, v6only, noip6, rcv, snd,
|
||||||
reuseport, transparent, tcp_mss, nodelay, freebind, use_systemd,
|
reuseport, transparent, tcp_mss, nodelay, freebind, use_systemd,
|
||||||
dscp);
|
dscp, ub_sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1002,10 +1016,11 @@ make_sock_port(int stype, const char* ifname, const char* port,
|
||||||
* @param list: list head. changed.
|
* @param list: list head. changed.
|
||||||
* @param s: fd.
|
* @param s: fd.
|
||||||
* @param ftype: if fd is UDP.
|
* @param ftype: if fd is UDP.
|
||||||
|
* @param ub_sock: socket with address.
|
||||||
* @return false on failure. list in unchanged then.
|
* @return false on failure. list in unchanged then.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
port_insert(struct listen_port** list, int s, enum listen_type ftype)
|
port_insert(struct listen_port** list, int s, enum listen_type ftype, struct unbound_socket* ub_sock)
|
||||||
{
|
{
|
||||||
struct listen_port* item = (struct listen_port*)malloc(
|
struct listen_port* item = (struct listen_port*)malloc(
|
||||||
sizeof(struct listen_port));
|
sizeof(struct listen_port));
|
||||||
|
|
@ -1014,6 +1029,7 @@ port_insert(struct listen_port** list, int s, enum listen_type ftype)
|
||||||
item->next = *list;
|
item->next = *list;
|
||||||
item->fd = s;
|
item->fd = s;
|
||||||
item->ftype = ftype;
|
item->ftype = ftype;
|
||||||
|
item->socket = ub_sock;
|
||||||
*list = item;
|
*list = item;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1043,7 +1059,7 @@ set_recvpktinfo(int s, int family)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
log_err("no IPV6_RECVPKTINFO and no IPV6_PKTINFO option, please "
|
log_err("no IPV6_RECVPKTINFO and IPV6_PKTINFO options, please "
|
||||||
"disable interface-automatic or do-ip6 in config");
|
"disable interface-automatic or do-ip6 in config");
|
||||||
return 0;
|
return 0;
|
||||||
# endif /* defined IPV6_RECVPKTINFO */
|
# endif /* defined IPV6_RECVPKTINFO */
|
||||||
|
|
@ -1093,18 +1109,6 @@ if_is_ssl(const char* ifname, const char* port, int ssl_port,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** see if interface is https, its port number == the https port number */
|
|
||||||
static int
|
|
||||||
if_is_https(const char* ifname, const char* port, int https_port)
|
|
||||||
{
|
|
||||||
char* p = strchr(ifname, '@');
|
|
||||||
if(!p && atoi(port) == https_port)
|
|
||||||
return 1;
|
|
||||||
if(p && atoi(p+1) == https_port)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for ports_open. Creates one interface (or NULL for default).
|
* Helper for ports_open. Creates one interface (or NULL for default).
|
||||||
* @param ifname: The interface ip address.
|
* @param ifname: The interface ip address.
|
||||||
|
|
@ -1142,6 +1146,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
int s, noip6=0;
|
int s, noip6=0;
|
||||||
int is_https = if_is_https(ifname, port, https_port);
|
int is_https = if_is_https(ifname, port, https_port);
|
||||||
int nodelay = is_https && http2_nodelay;
|
int nodelay = is_https && http2_nodelay;
|
||||||
|
struct unbound_socket* ub_sock;
|
||||||
#ifdef USE_DNSCRYPT
|
#ifdef USE_DNSCRYPT
|
||||||
int is_dnscrypt = ((strchr(ifname, '@') &&
|
int is_dnscrypt = ((strchr(ifname, '@') &&
|
||||||
atoi(strchr(ifname, '@')+1) == dnscrypt_port) ||
|
atoi(strchr(ifname, '@')+1) == dnscrypt_port) ||
|
||||||
|
|
@ -1153,10 +1158,15 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
|
|
||||||
if(!do_udp && !do_tcp)
|
if(!do_udp && !do_tcp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(do_auto) {
|
if(do_auto) {
|
||||||
|
ub_sock = calloc(1, sizeof(struct unbound_socket));
|
||||||
|
if(!ub_sock)
|
||||||
|
return 0;
|
||||||
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
|
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
|
||||||
&noip6, rcv, snd, reuseport, transparent,
|
&noip6, rcv, snd, reuseport, transparent,
|
||||||
tcp_mss, nodelay, freebind, use_systemd, dscp)) == -1) {
|
tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
|
||||||
|
free(ub_sock);
|
||||||
if(noip6) {
|
if(noip6) {
|
||||||
log_warn("IPv6 protocol not available");
|
log_warn("IPv6 protocol not available");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1166,18 +1176,24 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
/* getting source addr packet info is highly non-portable */
|
/* getting source addr packet info is highly non-portable */
|
||||||
if(!set_recvpktinfo(s, hints->ai_family)) {
|
if(!set_recvpktinfo(s, hints->ai_family)) {
|
||||||
sock_close(s);
|
sock_close(s);
|
||||||
|
free(ub_sock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(!port_insert(list, s,
|
if(!port_insert(list, s,
|
||||||
is_dnscrypt?listen_type_udpancil_dnscrypt:listen_type_udpancil)) {
|
is_dnscrypt?listen_type_udpancil_dnscrypt:listen_type_udpancil, ub_sock)) {
|
||||||
sock_close(s);
|
sock_close(s);
|
||||||
|
free(ub_sock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if(do_udp) {
|
} else if(do_udp) {
|
||||||
|
ub_sock = calloc(1, sizeof(struct unbound_socket));
|
||||||
|
if(!ub_sock)
|
||||||
|
return 0;
|
||||||
/* regular udp socket */
|
/* regular udp socket */
|
||||||
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
|
if((s = make_sock_port(SOCK_DGRAM, ifname, port, hints, 1,
|
||||||
&noip6, rcv, snd, reuseport, transparent,
|
&noip6, rcv, snd, reuseport, transparent,
|
||||||
tcp_mss, nodelay, freebind, use_systemd, dscp)) == -1) {
|
tcp_mss, nodelay, freebind, use_systemd, dscp, ub_sock)) == -1) {
|
||||||
|
free(ub_sock);
|
||||||
if(noip6) {
|
if(noip6) {
|
||||||
log_warn("IPv6 protocol not available");
|
log_warn("IPv6 protocol not available");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1185,8 +1201,9 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(!port_insert(list, s,
|
if(!port_insert(list, s,
|
||||||
is_dnscrypt?listen_type_udp_dnscrypt:listen_type_udp)) {
|
is_dnscrypt?listen_type_udp_dnscrypt:listen_type_udp, ub_sock)) {
|
||||||
sock_close(s);
|
sock_close(s);
|
||||||
|
free(ub_sock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1194,6 +1211,9 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
int is_ssl = if_is_ssl(ifname, port, ssl_port,
|
int is_ssl = if_is_ssl(ifname, port, ssl_port,
|
||||||
tls_additional_port);
|
tls_additional_port);
|
||||||
enum listen_type port_type;
|
enum listen_type port_type;
|
||||||
|
ub_sock = calloc(1, sizeof(struct unbound_socket));
|
||||||
|
if(!ub_sock)
|
||||||
|
return 0;
|
||||||
if(is_ssl)
|
if(is_ssl)
|
||||||
port_type = listen_type_ssl;
|
port_type = listen_type_ssl;
|
||||||
else if(is_https)
|
else if(is_https)
|
||||||
|
|
@ -1204,7 +1224,8 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
port_type = listen_type_tcp;
|
port_type = listen_type_tcp;
|
||||||
if((s = make_sock_port(SOCK_STREAM, ifname, port, hints, 1,
|
if((s = make_sock_port(SOCK_STREAM, ifname, port, hints, 1,
|
||||||
&noip6, 0, 0, reuseport, transparent, tcp_mss, nodelay,
|
&noip6, 0, 0, reuseport, transparent, tcp_mss, nodelay,
|
||||||
freebind, use_systemd, dscp)) == -1) {
|
freebind, use_systemd, dscp, ub_sock)) == -1) {
|
||||||
|
free(ub_sock);
|
||||||
if(noip6) {
|
if(noip6) {
|
||||||
/*log_warn("IPv6 protocol not available");*/
|
/*log_warn("IPv6 protocol not available");*/
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1213,8 +1234,9 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
}
|
}
|
||||||
if(is_ssl)
|
if(is_ssl)
|
||||||
verbose(VERB_ALGO, "setup TCP for SSL service");
|
verbose(VERB_ALGO, "setup TCP for SSL service");
|
||||||
if(!port_insert(list, s, port_type)) {
|
if(!port_insert(list, s, port_type, ub_sock)) {
|
||||||
sock_close(s);
|
sock_close(s);
|
||||||
|
free(ub_sock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1280,14 +1302,14 @@ listen_create(struct comm_base* base, struct listen_port* ports,
|
||||||
if(ports->ftype == listen_type_udp ||
|
if(ports->ftype == listen_type_udp ||
|
||||||
ports->ftype == listen_type_udp_dnscrypt)
|
ports->ftype == listen_type_udp_dnscrypt)
|
||||||
cp = comm_point_create_udp(base, ports->fd,
|
cp = comm_point_create_udp(base, ports->fd,
|
||||||
front->udp_buff, cb, cb_arg);
|
front->udp_buff, cb, cb_arg, ports->socket);
|
||||||
else if(ports->ftype == listen_type_tcp ||
|
else if(ports->ftype == listen_type_tcp ||
|
||||||
ports->ftype == listen_type_tcp_dnscrypt)
|
ports->ftype == listen_type_tcp_dnscrypt)
|
||||||
cp = comm_point_create_tcp(base, ports->fd,
|
cp = comm_point_create_tcp(base, ports->fd,
|
||||||
tcp_accept_count, tcp_idle_timeout,
|
tcp_accept_count, tcp_idle_timeout,
|
||||||
harden_large_queries, 0, NULL,
|
harden_large_queries, 0, NULL,
|
||||||
tcp_conn_limit, bufsize, front->udp_buff,
|
tcp_conn_limit, bufsize, front->udp_buff,
|
||||||
ports->ftype, cb, cb_arg);
|
ports->ftype, cb, cb_arg, ports->socket);
|
||||||
else if(ports->ftype == listen_type_ssl ||
|
else if(ports->ftype == listen_type_ssl ||
|
||||||
ports->ftype == listen_type_http) {
|
ports->ftype == listen_type_http) {
|
||||||
cp = comm_point_create_tcp(base, ports->fd,
|
cp = comm_point_create_tcp(base, ports->fd,
|
||||||
|
|
@ -1295,7 +1317,7 @@ listen_create(struct comm_base* base, struct listen_port* ports,
|
||||||
harden_large_queries,
|
harden_large_queries,
|
||||||
http_max_streams, http_endpoint,
|
http_max_streams, http_endpoint,
|
||||||
tcp_conn_limit, bufsize, front->udp_buff,
|
tcp_conn_limit, bufsize, front->udp_buff,
|
||||||
ports->ftype, cb, cb_arg);
|
ports->ftype, cb, cb_arg, ports->socket);
|
||||||
if(http_notls && ports->ftype == listen_type_http)
|
if(http_notls && ports->ftype == listen_type_http)
|
||||||
cp->ssl = NULL;
|
cp->ssl = NULL;
|
||||||
else
|
else
|
||||||
|
|
@ -1322,7 +1344,7 @@ listen_create(struct comm_base* base, struct listen_port* ports,
|
||||||
} else if(ports->ftype == listen_type_udpancil ||
|
} else if(ports->ftype == listen_type_udpancil ||
|
||||||
ports->ftype == listen_type_udpancil_dnscrypt)
|
ports->ftype == listen_type_udpancil_dnscrypt)
|
||||||
cp = comm_point_create_udp_ancil(base, ports->fd,
|
cp = comm_point_create_udp_ancil(base, ports->fd,
|
||||||
front->udp_buff, cb, cb_arg);
|
front->udp_buff, cb, cb_arg, ports->socket);
|
||||||
if(!cp) {
|
if(!cp) {
|
||||||
log_err("can't create commpoint");
|
log_err("can't create commpoint");
|
||||||
listen_delete(front);
|
listen_delete(front);
|
||||||
|
|
@ -1456,7 +1478,7 @@ resolve_ifa_name(struct ifaddrs *ifas, const char *search_ifa, char ***ip_addres
|
||||||
log_err("inet_ntop failed");
|
log_err("inet_ntop failed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if_indextoname(in6->sin6_scope_id,
|
(void)if_indextoname(in6->sin6_scope_id,
|
||||||
(char *)if_index_name);
|
(char *)if_index_name);
|
||||||
if (strlen(if_index_name) != 0) {
|
if (strlen(if_index_name) != 0) {
|
||||||
snprintf(addr_buf, sizeof(addr_buf),
|
snprintf(addr_buf, sizeof(addr_buf),
|
||||||
|
|
@ -1506,13 +1528,12 @@ resolve_ifa_name(struct ifaddrs *ifas, const char *search_ifa, char ***ip_addres
|
||||||
}
|
}
|
||||||
#endif /* HAVE_GETIFADDRS */
|
#endif /* HAVE_GETIFADDRS */
|
||||||
|
|
||||||
int resolve_interface_names(struct config_file* cfg, char*** resif,
|
int resolve_interface_names(char** ifs, int num_ifs,
|
||||||
int* num_resif)
|
struct config_strlist* list, char*** resif, int* num_resif)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETIFADDRS
|
#ifdef HAVE_GETIFADDRS
|
||||||
int i;
|
|
||||||
struct ifaddrs *addrs = NULL;
|
struct ifaddrs *addrs = NULL;
|
||||||
if(cfg->num_ifs == 0) {
|
if(num_ifs == 0 && list == NULL) {
|
||||||
*resif = NULL;
|
*resif = NULL;
|
||||||
*num_resif = 0;
|
*num_resif = 0;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1523,38 +1544,71 @@ int resolve_interface_names(struct config_file* cfg, char*** resif,
|
||||||
freeifaddrs(addrs);
|
freeifaddrs(addrs);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for(i=0; i<cfg->num_ifs; i++) {
|
if(ifs) {
|
||||||
if(!resolve_ifa_name(addrs, cfg->ifs[i], resif, num_resif)) {
|
int i;
|
||||||
freeifaddrs(addrs);
|
for(i=0; i<num_ifs; i++) {
|
||||||
config_del_strarray(*resif, *num_resif);
|
if(!resolve_ifa_name(addrs, ifs[i], resif, num_resif)) {
|
||||||
*resif = NULL;
|
freeifaddrs(addrs);
|
||||||
*num_resif = 0;
|
config_del_strarray(*resif, *num_resif);
|
||||||
return 0;
|
*resif = NULL;
|
||||||
|
*num_resif = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(list) {
|
||||||
|
struct config_strlist* p;
|
||||||
|
for(p = list; p; p = p->next) {
|
||||||
|
if(!resolve_ifa_name(addrs, p->str, resif, num_resif)) {
|
||||||
|
freeifaddrs(addrs);
|
||||||
|
config_del_strarray(*resif, *num_resif);
|
||||||
|
*resif = NULL;
|
||||||
|
*num_resif = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
freeifaddrs(addrs);
|
freeifaddrs(addrs);
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
#else
|
||||||
int i;
|
struct config_strlist* p;
|
||||||
if(cfg->num_ifs == 0) {
|
if(num_ifs == 0 && list == NULL) {
|
||||||
*resif = NULL;
|
*resif = NULL;
|
||||||
*num_resif = 0;
|
*num_resif = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*num_resif = cfg->num_ifs;
|
*num_resif = num_ifs;
|
||||||
|
for(p = list; p; p = p->next) {
|
||||||
|
*num_resif ++;
|
||||||
|
}
|
||||||
*resif = calloc(*num_resif, sizeof(**resif));
|
*resif = calloc(*num_resif, sizeof(**resif));
|
||||||
if(!*resif) {
|
if(!*resif) {
|
||||||
log_err("out of memory");
|
log_err("out of memory");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for(i=0; i<*num_resif; i++) {
|
if(ifs) {
|
||||||
(*resif)[i] = strdup(cfg->ifs[i]);
|
int i;
|
||||||
if(!((*resif)[i])) {
|
for(i=0; i<num_ifs; i++) {
|
||||||
log_err("out of memory");
|
(*resif)[i] = strdup(ifs[i]);
|
||||||
config_del_strarray(*resif, *num_resif);
|
if(!((*resif)[i])) {
|
||||||
*resif = NULL;
|
log_err("out of memory");
|
||||||
*num_resif = 0;
|
config_del_strarray(*resif, *num_resif);
|
||||||
return 0;
|
*resif = NULL;
|
||||||
|
*num_resif = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(list) {
|
||||||
|
for(p = list; p; p = p->next) {
|
||||||
|
(*resif)[i] = strdup(p->str);
|
||||||
|
if(!((*resif)[i])) {
|
||||||
|
log_err("out of memory");
|
||||||
|
config_del_strarray(*resif, *num_resif);
|
||||||
|
*resif = NULL;
|
||||||
|
*num_resif = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1656,6 +1710,7 @@ listening_ports_open(struct config_file* cfg, char** ifs, int num_ifs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1667,6 +1722,11 @@ void listening_ports_free(struct listen_port* list)
|
||||||
if(list->fd != -1) {
|
if(list->fd != -1) {
|
||||||
sock_close(list->fd);
|
sock_close(list->fd);
|
||||||
}
|
}
|
||||||
|
/* rc_ports don't have ub_socket */
|
||||||
|
if(list->socket) {
|
||||||
|
freeaddrinfo(list->socket->addr);
|
||||||
|
free(list->socket);
|
||||||
|
}
|
||||||
free(list);
|
free(list);
|
||||||
list = nx;
|
list = nx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,18 @@ enum listen_type {
|
||||||
listen_type_http
|
listen_type_http
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* socket properties (just like NSD nsd_socket structure definition)
|
||||||
|
*/
|
||||||
|
struct unbound_socket {
|
||||||
|
/** socket-address structure */
|
||||||
|
struct addrinfo * addr;
|
||||||
|
/** socket descriptor returned by socket() syscall */
|
||||||
|
int s;
|
||||||
|
/** address family (AF_INET/IF_INET6) */
|
||||||
|
int fam;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Single linked list to store shared ports that have been
|
* Single linked list to store shared ports that have been
|
||||||
* opened for use by all threads.
|
* opened for use by all threads.
|
||||||
|
|
@ -113,6 +125,8 @@ struct listen_port {
|
||||||
int fd;
|
int fd;
|
||||||
/** type of file descriptor, udp or tcp */
|
/** type of file descriptor, udp or tcp */
|
||||||
enum listen_type ftype;
|
enum listen_type ftype;
|
||||||
|
/** fill in unbpound_socket structure for every opened socket at Unbound startup */
|
||||||
|
struct unbound_socket* socket;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -136,16 +150,19 @@ struct listen_port* listening_ports_open(struct config_file* cfg,
|
||||||
*/
|
*/
|
||||||
void listening_ports_free(struct listen_port* list);
|
void listening_ports_free(struct listen_port* list);
|
||||||
|
|
||||||
|
struct config_strlist;
|
||||||
/**
|
/**
|
||||||
* Resolve interface names in config and store result IP addresses
|
* Resolve interface names in config and store result IP addresses
|
||||||
* @param cfg: config
|
* @param ifs: array of interfaces. The list of interface names, if not NULL.
|
||||||
|
* @param num_ifs: length of ifs array.
|
||||||
|
* @param list: if not NULL, this is used as the list of interface names.
|
||||||
* @param resif: string array (malloced array of malloced strings) with
|
* @param resif: string array (malloced array of malloced strings) with
|
||||||
* result. NULL if cfg has none.
|
* result. NULL if cfg has none.
|
||||||
* @param num_resif: length of resif. Zero if cfg has zero num_ifs.
|
* @param num_resif: length of resif. Zero if cfg has zero num_ifs.
|
||||||
* @return 0 on failure.
|
* @return 0 on failure.
|
||||||
*/
|
*/
|
||||||
int resolve_interface_names(struct config_file* cfg, char*** resif,
|
int resolve_interface_names(char** ifs, int num_ifs,
|
||||||
int* num_resif);
|
struct config_strlist* list, char*** resif, int* num_resif);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create commpoints with for this thread for the shared ports.
|
* Create commpoints with for this thread for the shared ports.
|
||||||
|
|
@ -424,4 +441,9 @@ int http2_submit_dns_response(void* v);
|
||||||
|
|
||||||
char* set_ip_dscp(int socket, int addrfamily, int ds);
|
char* set_ip_dscp(int socket, int addrfamily, int ds);
|
||||||
|
|
||||||
|
/** for debug and profiling purposes only
|
||||||
|
* @param ub_sock: the structure containing created socket info we want to print or log for
|
||||||
|
*/
|
||||||
|
void verbose_print_unbound_socket(struct unbound_socket* ub_sock);
|
||||||
|
|
||||||
#endif /* LISTEN_DNSPORT_H */
|
#endif /* LISTEN_DNSPORT_H */
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,48 @@ lz_find_create_node(struct local_zone* z, uint8_t* nm, size_t nmlen,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Mark the SOA record for the zone. This only marks the SOA rrset; the data
|
||||||
|
* for the RR is entered later on local_zone_enter_rr() as with the other
|
||||||
|
* records. An artifical soa_negative record with a modified TTL (minimum of
|
||||||
|
* the TTL and the SOA.MINIMUM) is also created and marked for usage with
|
||||||
|
* negative answers and to avoid allocations during those answers. */
|
||||||
|
static int
|
||||||
|
lz_mark_soa_for_zone(struct local_zone* z, struct ub_packed_rrset_key* soa_rrset,
|
||||||
|
uint8_t* rdata, size_t rdata_len, time_t ttl, const char* rrstr)
|
||||||
|
{
|
||||||
|
struct packed_rrset_data* pd = (struct packed_rrset_data*)
|
||||||
|
regional_alloc_zero(z->region, sizeof(*pd));
|
||||||
|
struct ub_packed_rrset_key* rrset_negative = (struct ub_packed_rrset_key*)
|
||||||
|
regional_alloc_zero(z->region, sizeof(*rrset_negative));
|
||||||
|
time_t minimum;
|
||||||
|
if(!rrset_negative||!pd) {
|
||||||
|
log_err("out of memory");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* Mark the original SOA record and then continue with the negative one. */
|
||||||
|
z->soa = soa_rrset;
|
||||||
|
rrset_negative->entry.key = rrset_negative;
|
||||||
|
pd->trust = rrset_trust_prim_noglue;
|
||||||
|
pd->security = sec_status_insecure;
|
||||||
|
rrset_negative->entry.data = pd;
|
||||||
|
rrset_negative->rk.dname = soa_rrset->rk.dname;
|
||||||
|
rrset_negative->rk.dname_len = soa_rrset->rk.dname_len;
|
||||||
|
rrset_negative->rk.type = soa_rrset->rk.type;
|
||||||
|
rrset_negative->rk.rrset_class = soa_rrset->rk.rrset_class;
|
||||||
|
if(!rrset_insert_rr(z->region, pd, rdata, rdata_len, ttl, rrstr))
|
||||||
|
return 0;
|
||||||
|
/* last 4 bytes are minimum ttl in network format */
|
||||||
|
if(pd->count == 0 || pd->rr_len[0] < 2+4)
|
||||||
|
return 0;
|
||||||
|
minimum = (time_t)sldns_read_uint32(pd->rr_data[0]+(pd->rr_len[0]-4));
|
||||||
|
minimum = ttl<minimum?ttl:minimum;
|
||||||
|
pd->ttl = minimum;
|
||||||
|
pd->rr_ttl[0] = minimum;
|
||||||
|
|
||||||
|
z->soa_negative = rrset_negative;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
local_zone_enter_rr(struct local_zone* z, uint8_t* nm, size_t nmlen,
|
local_zone_enter_rr(struct local_zone* z, uint8_t* nm, size_t nmlen,
|
||||||
int nmlabs, uint16_t rrtype, uint16_t rrclass, time_t ttl,
|
int nmlabs, uint16_t rrtype, uint16_t rrclass, time_t ttl,
|
||||||
|
|
@ -502,8 +544,10 @@ local_zone_enter_rr(struct local_zone* z, uint8_t* nm, size_t nmlen,
|
||||||
if(query_dname_compare(node->name, z->name) == 0) {
|
if(query_dname_compare(node->name, z->name) == 0) {
|
||||||
if(rrtype == LDNS_RR_TYPE_NSEC)
|
if(rrtype == LDNS_RR_TYPE_NSEC)
|
||||||
rrset->rrset->rk.flags = PACKED_RRSET_NSEC_AT_APEX;
|
rrset->rrset->rk.flags = PACKED_RRSET_NSEC_AT_APEX;
|
||||||
if(rrtype == LDNS_RR_TYPE_SOA)
|
if(rrtype == LDNS_RR_TYPE_SOA &&
|
||||||
z->soa = rrset->rrset;
|
!lz_mark_soa_for_zone(z, rrset->rrset, rdata, rdata_len, ttl,
|
||||||
|
rrstr))
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pd = (struct packed_rrset_data*)rrset->rrset->entry.data;
|
pd = (struct packed_rrset_data*)rrset->rrset->entry.data;
|
||||||
|
|
@ -1561,9 +1605,9 @@ local_zones_zone_answer(struct local_zone* z, struct module_env* env,
|
||||||
lz_type == local_zone_truncate)?
|
lz_type == local_zone_truncate)?
|
||||||
LDNS_RCODE_NOERROR:LDNS_RCODE_NXDOMAIN;
|
LDNS_RCODE_NOERROR:LDNS_RCODE_NXDOMAIN;
|
||||||
rcode = lz_type == local_zone_truncate ? (rcode|BIT_TC) : rcode;
|
rcode = lz_type == local_zone_truncate ? (rcode|BIT_TC) : rcode;
|
||||||
if(z != NULL && z->soa)
|
if(z != NULL && z->soa && z->soa_negative)
|
||||||
return local_encode(qinfo, env, edns, repinfo, buf, temp,
|
return local_encode(qinfo, env, edns, repinfo, buf, temp,
|
||||||
z->soa, 0, rcode);
|
z->soa_negative, 0, rcode);
|
||||||
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
|
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
|
||||||
(rcode|BIT_AA));
|
(rcode|BIT_AA));
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1618,9 +1662,9 @@ local_zones_zone_answer(struct local_zone* z, struct module_env* env,
|
||||||
* does not, then we should make this noerror/nodata */
|
* does not, then we should make this noerror/nodata */
|
||||||
if(ld && ld->rrsets) {
|
if(ld && ld->rrsets) {
|
||||||
int rcode = LDNS_RCODE_NOERROR;
|
int rcode = LDNS_RCODE_NOERROR;
|
||||||
if(z != NULL && z->soa)
|
if(z != NULL && z->soa && z->soa_negative)
|
||||||
return local_encode(qinfo, env, edns, repinfo, buf, temp,
|
return local_encode(qinfo, env, edns, repinfo, buf, temp,
|
||||||
z->soa, 0, rcode);
|
z->soa_negative, 0, rcode);
|
||||||
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
|
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
|
||||||
(rcode|BIT_AA));
|
(rcode|BIT_AA));
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -2059,8 +2103,10 @@ void local_zones_del_data(struct local_zones* zones,
|
||||||
/* no memory recycling for zone deletions ... */
|
/* no memory recycling for zone deletions ... */
|
||||||
d->rrsets = NULL;
|
d->rrsets = NULL;
|
||||||
/* did we delete the soa record ? */
|
/* did we delete the soa record ? */
|
||||||
if(query_dname_compare(d->name, z->name) == 0)
|
if(query_dname_compare(d->name, z->name) == 0) {
|
||||||
z->soa = NULL;
|
z->soa = NULL;
|
||||||
|
z->soa_negative = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* cleanup the empty nonterminals for this name */
|
/* cleanup the empty nonterminals for this name */
|
||||||
del_empty_term(z, d, name, len, labs);
|
del_empty_term(z, d, name, len, labs);
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,10 @@ struct local_zone {
|
||||||
rbtree_type data;
|
rbtree_type data;
|
||||||
/** if data contains zone apex SOA data, this is a ptr to it. */
|
/** if data contains zone apex SOA data, this is a ptr to it. */
|
||||||
struct ub_packed_rrset_key* soa;
|
struct ub_packed_rrset_key* soa;
|
||||||
|
/** if data contains zone apex SOA data, this is a prt to an
|
||||||
|
* artificial negative SOA rrset (TTL is the minimum of the TTL and the
|
||||||
|
* SOA.MINIMUM). */
|
||||||
|
struct ub_packed_rrset_key* soa_negative;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1834,8 +1834,7 @@ mesh_detect_cycle(struct module_qstate* qstate, struct query_info* qinfo,
|
||||||
{
|
{
|
||||||
struct mesh_area* mesh = qstate->env->mesh;
|
struct mesh_area* mesh = qstate->env->mesh;
|
||||||
struct mesh_state* dep_m = NULL;
|
struct mesh_state* dep_m = NULL;
|
||||||
if(!mesh_state_is_unique(qstate->mesh_info))
|
dep_m = mesh_area_find(mesh, NULL, qinfo, flags, prime, valrec);
|
||||||
dep_m = mesh_area_find(mesh, NULL, qinfo, flags, prime, valrec);
|
|
||||||
return mesh_detect_cycle_found(qstate, dep_m);
|
return mesh_detect_cycle_found(qstate, dep_m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1950,7 +1949,9 @@ mesh_serve_expired_callback(void* arg)
|
||||||
verbose(VERB_ALGO, "Serve expired: Trying to reply with expired data");
|
verbose(VERB_ALGO, "Serve expired: Trying to reply with expired data");
|
||||||
comm_timer_delete(qstate->serve_expired_data->timer);
|
comm_timer_delete(qstate->serve_expired_data->timer);
|
||||||
qstate->serve_expired_data->timer = NULL;
|
qstate->serve_expired_data->timer = NULL;
|
||||||
if(qstate->blacklist || qstate->no_cache_lookup || qstate->is_drop) {
|
/* If is_drop or no_cache_lookup (modules that handle their own cache e.g.,
|
||||||
|
* subnetmod) ignore stale data from the main cache. */
|
||||||
|
if(qstate->no_cache_lookup || qstate->is_drop) {
|
||||||
verbose(VERB_ALGO,
|
verbose(VERB_ALGO,
|
||||||
"Serve expired: Not allowed to look into cache for stale");
|
"Serve expired: Not allowed to look into cache for stale");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -88,57 +88,56 @@ count_modules(const char* s)
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
modstack_init(struct module_stack* stack)
|
modstack_init(struct module_stack* stack)
|
||||||
{
|
{
|
||||||
stack->num = 0;
|
stack->num = 0;
|
||||||
stack->mod = NULL;
|
stack->mod = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
modstack_config(struct module_stack* stack, const char* module_conf)
|
modstack_config(struct module_stack* stack, const char* module_conf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
verbose(VERB_QUERY, "module config: \"%s\"", module_conf);
|
verbose(VERB_QUERY, "module config: \"%s\"", module_conf);
|
||||||
stack->num = count_modules(module_conf);
|
stack->num = count_modules(module_conf);
|
||||||
if(stack->num == 0) {
|
if(stack->num == 0) {
|
||||||
log_err("error: no modules specified");
|
log_err("error: no modules specified");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(stack->num > MAX_MODULE) {
|
if(stack->num > MAX_MODULE) {
|
||||||
log_err("error: too many modules (%d max %d)",
|
log_err("error: too many modules (%d max %d)",
|
||||||
stack->num, MAX_MODULE);
|
stack->num, MAX_MODULE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
stack->mod = (struct module_func_block**)calloc((size_t)
|
stack->mod = (struct module_func_block**)calloc((size_t)
|
||||||
stack->num, sizeof(struct module_func_block*));
|
stack->num, sizeof(struct module_func_block*));
|
||||||
if(!stack->mod) {
|
if(!stack->mod) {
|
||||||
log_err("out of memory");
|
log_err("out of memory");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for(i=0; i<stack->num; i++) {
|
for(i=0; i<stack->num; i++) {
|
||||||
stack->mod[i] = module_factory(&module_conf);
|
stack->mod[i] = module_factory(&module_conf);
|
||||||
if(!stack->mod[i]) {
|
if(!stack->mod[i]) {
|
||||||
char md[256];
|
char md[256];
|
||||||
snprintf(md, sizeof(md), "%s", module_conf);
|
snprintf(md, sizeof(md), "%s", module_conf);
|
||||||
if(strchr(md, ' ')) *(strchr(md, ' ')) = 0;
|
if(strchr(md, ' ')) *(strchr(md, ' ')) = 0;
|
||||||
if(strchr(md, '\t')) *(strchr(md, '\t')) = 0;
|
if(strchr(md, '\t')) *(strchr(md, '\t')) = 0;
|
||||||
log_err("Unknown value in module-config, module: '%s'."
|
log_err("Unknown value in module-config, module: '%s'."
|
||||||
" This module is not present (not compiled in),"
|
" This module is not present (not compiled in),"
|
||||||
" See the list of linked modules with unbound -h",
|
" See the list of linked modules with unbound -V", md);
|
||||||
md);
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
}
|
||||||
}
|
return 1;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The list of module names */
|
/** The list of module names */
|
||||||
const char**
|
const char**
|
||||||
module_list_avail(void)
|
module_list_avail(void)
|
||||||
{
|
{
|
||||||
/* these are the modules available */
|
/* these are the modules available */
|
||||||
static const char* names[] = {
|
static const char* names[] = {
|
||||||
"dns64",
|
"dns64",
|
||||||
#ifdef WITH_PYTHONMODULE
|
#ifdef WITH_PYTHONMODULE
|
||||||
"python",
|
"python",
|
||||||
|
|
@ -156,7 +155,7 @@ module_list_avail(void)
|
||||||
"subnetcache",
|
"subnetcache",
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_IPSET
|
#ifdef USE_IPSET
|
||||||
"ipset",
|
"ipset",
|
||||||
#endif
|
#endif
|
||||||
"respip",
|
"respip",
|
||||||
"validator",
|
"validator",
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,10 @@ static int randomize_and_send_udp(struct pending* pend, sldns_buffer* packet,
|
||||||
static void waiting_list_remove(struct outside_network* outnet,
|
static void waiting_list_remove(struct outside_network* outnet,
|
||||||
struct waiting_tcp* w);
|
struct waiting_tcp* w);
|
||||||
|
|
||||||
|
/** remove reused element from tree and lru list */
|
||||||
|
static void reuse_tcp_remove_tree_list(struct outside_network* outnet,
|
||||||
|
struct reuse_tcp* reuse);
|
||||||
|
|
||||||
int
|
int
|
||||||
pending_cmp(const void* key1, const void* key2)
|
pending_cmp(const void* key1, const void* key2)
|
||||||
{
|
{
|
||||||
|
|
@ -194,15 +198,17 @@ waiting_tcp_delete(struct waiting_tcp* w)
|
||||||
* Pick random outgoing-interface of that family, and bind it.
|
* Pick random outgoing-interface of that family, and bind it.
|
||||||
* port set to 0 so OS picks a port number for us.
|
* port set to 0 so OS picks a port number for us.
|
||||||
* if it is the ANY address, do not bind.
|
* if it is the ANY address, do not bind.
|
||||||
|
* @param pend: pending tcp structure, for storing the local address choice.
|
||||||
* @param w: tcp structure with destination address.
|
* @param w: tcp structure with destination address.
|
||||||
* @param s: socket fd.
|
* @param s: socket fd.
|
||||||
* @return false on error, socket closed.
|
* @return false on error, socket closed.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
pick_outgoing_tcp(struct waiting_tcp* w, int s)
|
pick_outgoing_tcp(struct pending_tcp* pend, struct waiting_tcp* w, int s)
|
||||||
{
|
{
|
||||||
struct port_if* pi = NULL;
|
struct port_if* pi = NULL;
|
||||||
int num;
|
int num;
|
||||||
|
pend->pi = NULL;
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
if(addr_is_ip6(&w->addr, w->addrlen))
|
if(addr_is_ip6(&w->addr, w->addrlen))
|
||||||
num = w->outnet->num_ip6;
|
num = w->outnet->num_ip6;
|
||||||
|
|
@ -222,6 +228,7 @@ pick_outgoing_tcp(struct waiting_tcp* w, int s)
|
||||||
#endif
|
#endif
|
||||||
pi = &w->outnet->ip4_ifs[ub_random_max(w->outnet->rnd, num)];
|
pi = &w->outnet->ip4_ifs[ub_random_max(w->outnet->rnd, num)];
|
||||||
log_assert(pi);
|
log_assert(pi);
|
||||||
|
pend->pi = pi;
|
||||||
if(addr_is_any(&pi->addr, pi->addrlen)) {
|
if(addr_is_any(&pi->addr, pi->addrlen)) {
|
||||||
/* binding to the ANY interface is for listening sockets */
|
/* binding to the ANY interface is for listening sockets */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -424,8 +431,11 @@ static int
|
||||||
reuse_tcp_insert(struct outside_network* outnet, struct pending_tcp* pend_tcp)
|
reuse_tcp_insert(struct outside_network* outnet, struct pending_tcp* pend_tcp)
|
||||||
{
|
{
|
||||||
log_reuse_tcp(VERB_CLIENT, "reuse_tcp_insert", &pend_tcp->reuse);
|
log_reuse_tcp(VERB_CLIENT, "reuse_tcp_insert", &pend_tcp->reuse);
|
||||||
if(pend_tcp->reuse.item_on_lru_list)
|
if(pend_tcp->reuse.item_on_lru_list) {
|
||||||
|
if(!pend_tcp->reuse.node.key)
|
||||||
|
log_err("internal error: reuse_tcp_insert: on lru list without key");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
pend_tcp->reuse.node.key = &pend_tcp->reuse;
|
pend_tcp->reuse.node.key = &pend_tcp->reuse;
|
||||||
pend_tcp->reuse.pending = pend_tcp;
|
pend_tcp->reuse.pending = pend_tcp;
|
||||||
if(!rbtree_insert(&outnet->tcp_reuse, &pend_tcp->reuse.node)) {
|
if(!rbtree_insert(&outnet->tcp_reuse, &pend_tcp->reuse.node)) {
|
||||||
|
|
@ -477,7 +487,7 @@ reuse_tcp_find(struct outside_network* outnet, struct sockaddr_storage* addr,
|
||||||
if(outnet->tcp_reuse.root == NULL ||
|
if(outnet->tcp_reuse.root == NULL ||
|
||||||
outnet->tcp_reuse.root == RBTREE_NULL)
|
outnet->tcp_reuse.root == RBTREE_NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(rbtree_find_less_equal(&outnet->tcp_reuse, &key_p.reuse.node,
|
if(rbtree_find_less_equal(&outnet->tcp_reuse, &key_p.reuse,
|
||||||
&result)) {
|
&result)) {
|
||||||
/* exact match */
|
/* exact match */
|
||||||
/* but the key is on stack, and ptr is compared, impossible */
|
/* but the key is on stack, and ptr is compared, impossible */
|
||||||
|
|
@ -560,7 +570,7 @@ outnet_tcp_take_into_use(struct waiting_tcp* w)
|
||||||
if(s == -1)
|
if(s == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(!pick_outgoing_tcp(w, s))
|
if(!pick_outgoing_tcp(pend, w, s))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fd_set_nonblock(s);
|
fd_set_nonblock(s);
|
||||||
|
|
@ -661,6 +671,14 @@ outnet_tcp_take_into_use(struct waiting_tcp* w)
|
||||||
pend->reuse.cp_more_write_again = 0;
|
pend->reuse.cp_more_write_again = 0;
|
||||||
memcpy(&pend->c->repinfo.addr, &w->addr, w->addrlen);
|
memcpy(&pend->c->repinfo.addr, &w->addr, w->addrlen);
|
||||||
pend->reuse.pending = pend;
|
pend->reuse.pending = pend;
|
||||||
|
|
||||||
|
/* Remove from tree in case the is_ssl will be different and causes the
|
||||||
|
* identity of the reuse_tcp to change; could result in nodes not being
|
||||||
|
* deleted from the tree (because the new identity does not match the
|
||||||
|
* previous node) but their ->key would be changed to NULL. */
|
||||||
|
if(pend->reuse.node.key)
|
||||||
|
reuse_tcp_remove_tree_list(w->outnet, &pend->reuse);
|
||||||
|
|
||||||
if(pend->c->ssl)
|
if(pend->c->ssl)
|
||||||
pend->reuse.is_ssl = 1;
|
pend->reuse.is_ssl = 1;
|
||||||
else pend->reuse.is_ssl = 0;
|
else pend->reuse.is_ssl = 0;
|
||||||
|
|
@ -677,8 +695,10 @@ outnet_tcp_take_into_use(struct waiting_tcp* w)
|
||||||
static void
|
static void
|
||||||
reuse_tcp_lru_touch(struct outside_network* outnet, struct reuse_tcp* reuse)
|
reuse_tcp_lru_touch(struct outside_network* outnet, struct reuse_tcp* reuse)
|
||||||
{
|
{
|
||||||
if(!reuse->item_on_lru_list)
|
if(!reuse->item_on_lru_list) {
|
||||||
|
log_err("internal error: we need to touch the lru_list but item not in list");
|
||||||
return; /* not on the list, no lru to modify */
|
return; /* not on the list, no lru to modify */
|
||||||
|
}
|
||||||
if(!reuse->lru_prev)
|
if(!reuse->lru_prev)
|
||||||
return; /* already first in the list */
|
return; /* already first in the list */
|
||||||
/* remove at current position */
|
/* remove at current position */
|
||||||
|
|
@ -714,6 +734,9 @@ use_free_buffer(struct outside_network* outnet)
|
||||||
struct waiting_tcp* w;
|
struct waiting_tcp* w;
|
||||||
while(outnet->tcp_free && outnet->tcp_wait_first
|
while(outnet->tcp_free && outnet->tcp_wait_first
|
||||||
&& !outnet->want_to_quit) {
|
&& !outnet->want_to_quit) {
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
struct pending_tcp* pend_tcp = NULL;
|
||||||
|
#endif
|
||||||
struct reuse_tcp* reuse = NULL;
|
struct reuse_tcp* reuse = NULL;
|
||||||
w = outnet->tcp_wait_first;
|
w = outnet->tcp_wait_first;
|
||||||
outnet->tcp_wait_first = w->next_waiting;
|
outnet->tcp_wait_first = w->next_waiting;
|
||||||
|
|
@ -725,6 +748,9 @@ use_free_buffer(struct outside_network* outnet)
|
||||||
if(reuse) {
|
if(reuse) {
|
||||||
log_reuse_tcp(VERB_CLIENT, "use free buffer for waiting tcp: "
|
log_reuse_tcp(VERB_CLIENT, "use free buffer for waiting tcp: "
|
||||||
"found reuse", reuse);
|
"found reuse", reuse);
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
pend_tcp = reuse->pending;
|
||||||
|
#endif
|
||||||
reuse_tcp_lru_touch(outnet, reuse);
|
reuse_tcp_lru_touch(outnet, reuse);
|
||||||
comm_timer_disable(w->timer);
|
comm_timer_disable(w->timer);
|
||||||
w->next_waiting = (void*)reuse->pending;
|
w->next_waiting = (void*)reuse->pending;
|
||||||
|
|
@ -751,8 +777,25 @@ use_free_buffer(struct outside_network* outnet)
|
||||||
waiting_tcp_callback(w, NULL, NETEVENT_CLOSED,
|
waiting_tcp_callback(w, NULL, NETEVENT_CLOSED,
|
||||||
NULL);
|
NULL);
|
||||||
waiting_tcp_delete(w);
|
waiting_tcp_delete(w);
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
w = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
pend_tcp = pend;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
if(outnet->dtenv && pend_tcp && w && w->sq &&
|
||||||
|
(outnet->dtenv->log_resolver_query_messages ||
|
||||||
|
outnet->dtenv->log_forwarder_query_messages)) {
|
||||||
|
sldns_buffer tmp;
|
||||||
|
sldns_buffer_init_frm_data(&tmp, w->pkt, w->pkt_len);
|
||||||
|
dt_msg_send_outside_query(outnet->dtenv, &w->sq->addr,
|
||||||
|
&pend_tcp->pi->addr, comm_tcp, w->sq->zone,
|
||||||
|
w->sq->zonelen, &tmp);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -847,8 +890,17 @@ reuse_tcp_remove_tree_list(struct outside_network* outnet,
|
||||||
verbose(VERB_CLIENT, "reuse_tcp_remove_tree_list");
|
verbose(VERB_CLIENT, "reuse_tcp_remove_tree_list");
|
||||||
if(reuse->node.key) {
|
if(reuse->node.key) {
|
||||||
/* delete it from reuse tree */
|
/* delete it from reuse tree */
|
||||||
(void)rbtree_delete(&outnet->tcp_reuse, &reuse->node);
|
if(!rbtree_delete(&outnet->tcp_reuse, reuse)) {
|
||||||
|
/* should not be possible, it should be there */
|
||||||
|
char buf[256];
|
||||||
|
addr_to_str(&reuse->addr, reuse->addrlen, buf,
|
||||||
|
sizeof(buf));
|
||||||
|
log_err("reuse tcp delete: node not present, internal error, %s ssl %d lru %d", buf, reuse->is_ssl, reuse->item_on_lru_list);
|
||||||
|
}
|
||||||
reuse->node.key = NULL;
|
reuse->node.key = NULL;
|
||||||
|
/* defend against loops on broken tree by zeroing the
|
||||||
|
* rbnode structure */
|
||||||
|
memset(&reuse->node, 0, sizeof(reuse->node));
|
||||||
}
|
}
|
||||||
/* delete from reuse list */
|
/* delete from reuse list */
|
||||||
if(reuse->item_on_lru_list) {
|
if(reuse->item_on_lru_list) {
|
||||||
|
|
@ -1440,7 +1492,7 @@ outside_network_create(struct comm_base *base, size_t bufsize,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
pc->cp = comm_point_create_udp(outnet->base, -1,
|
pc->cp = comm_point_create_udp(outnet->base, -1,
|
||||||
outnet->udp_buff, outnet_udp_cb, outnet);
|
outnet->udp_buff, outnet_udp_cb, outnet, NULL);
|
||||||
if(!pc->cp) {
|
if(!pc->cp) {
|
||||||
log_err("malloc failed");
|
log_err("malloc failed");
|
||||||
free(pc);
|
free(pc);
|
||||||
|
|
@ -1762,6 +1814,7 @@ static int udp_connect_needs_log(int err)
|
||||||
# ifdef ENETDOWN
|
# ifdef ENETDOWN
|
||||||
case ENETDOWN:
|
case ENETDOWN:
|
||||||
# endif
|
# endif
|
||||||
|
case EPERM:
|
||||||
if(verbosity >= VERB_ALGO)
|
if(verbosity >= VERB_ALGO)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1914,11 +1967,21 @@ randomize_and_send_udp(struct pending* pend, sldns_buffer* packet, int timeout)
|
||||||
comm_timer_set(pend->timer, &tv);
|
comm_timer_set(pend->timer, &tv);
|
||||||
|
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
|
/*
|
||||||
|
* sending src (local service)/dst (upstream) addresses over DNSTAP
|
||||||
|
* There are no chances to get the src (local service) addr if unbound
|
||||||
|
* is not configured with specific outgoing IP-addresses. So we will
|
||||||
|
* pass 0.0.0.0 (::) to argument for
|
||||||
|
* dt_msg_send_outside_query()/dt_msg_send_outside_response() calls.
|
||||||
|
*/
|
||||||
if(outnet->dtenv &&
|
if(outnet->dtenv &&
|
||||||
(outnet->dtenv->log_resolver_query_messages ||
|
(outnet->dtenv->log_resolver_query_messages ||
|
||||||
outnet->dtenv->log_forwarder_query_messages))
|
outnet->dtenv->log_forwarder_query_messages)) {
|
||||||
dt_msg_send_outside_query(outnet->dtenv, &pend->addr, comm_udp,
|
log_addr(VERB_ALGO, "from local addr", &pend->pc->pif->addr, pend->pc->pif->addrlen);
|
||||||
pend->sq->zone, pend->sq->zonelen, packet);
|
log_addr(VERB_ALGO, "request to upstream", &pend->addr, pend->addrlen);
|
||||||
|
dt_msg_send_outside_query(outnet->dtenv, &pend->addr, &pend->pc->pif->addr, comm_udp,
|
||||||
|
pend->sq->zone, pend->sq->zonelen, packet);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -2150,6 +2213,9 @@ pending_tcp_query(struct serviced_query* sq, sldns_buffer* packet,
|
||||||
w->write_wait_next = NULL;
|
w->write_wait_next = NULL;
|
||||||
w->write_wait_queued = 0;
|
w->write_wait_queued = 0;
|
||||||
w->error_count = 0;
|
w->error_count = 0;
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
w->sq = NULL;
|
||||||
|
#endif
|
||||||
if(pend) {
|
if(pend) {
|
||||||
/* we have a buffer available right now */
|
/* we have a buffer available right now */
|
||||||
if(reuse) {
|
if(reuse) {
|
||||||
|
|
@ -2184,20 +2250,28 @@ pending_tcp_query(struct serviced_query* sq, sldns_buffer* packet,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
if(sq->outnet->dtenv &&
|
||||||
|
(sq->outnet->dtenv->log_resolver_query_messages ||
|
||||||
|
sq->outnet->dtenv->log_forwarder_query_messages)) {
|
||||||
|
/* use w->pkt, because it has the ID value */
|
||||||
|
sldns_buffer tmp;
|
||||||
|
sldns_buffer_init_frm_data(&tmp, w->pkt, w->pkt_len);
|
||||||
|
dt_msg_send_outside_query(sq->outnet->dtenv, &sq->addr,
|
||||||
|
&pend->pi->addr, comm_tcp, sq->zone,
|
||||||
|
sq->zonelen, &tmp);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/* queue up */
|
/* queue up */
|
||||||
/* waiting for a buffer on the outside network buffer wait
|
/* waiting for a buffer on the outside network buffer wait
|
||||||
* list */
|
* list */
|
||||||
verbose(VERB_CLIENT, "pending_tcp_query: queue to wait");
|
verbose(VERB_CLIENT, "pending_tcp_query: queue to wait");
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
w->sq = sq;
|
||||||
|
#endif
|
||||||
outnet_add_tcp_waiting(sq->outnet, w);
|
outnet_add_tcp_waiting(sq->outnet, w);
|
||||||
}
|
}
|
||||||
#ifdef USE_DNSTAP
|
|
||||||
if(sq->outnet->dtenv &&
|
|
||||||
(sq->outnet->dtenv->log_resolver_query_messages ||
|
|
||||||
sq->outnet->dtenv->log_forwarder_query_messages))
|
|
||||||
dt_msg_send_outside_query(sq->outnet->dtenv, &sq->addr,
|
|
||||||
comm_tcp, sq->zone, sq->zonelen, packet);
|
|
||||||
#endif
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2242,7 +2316,8 @@ static struct serviced_query*
|
||||||
serviced_create(struct outside_network* outnet, sldns_buffer* buff, int dnssec,
|
serviced_create(struct outside_network* outnet, sldns_buffer* buff, int dnssec,
|
||||||
int want_dnssec, int nocaps, int tcp_upstream, int ssl_upstream,
|
int want_dnssec, int nocaps, int tcp_upstream, int ssl_upstream,
|
||||||
char* tls_auth_name, struct sockaddr_storage* addr, socklen_t addrlen,
|
char* tls_auth_name, struct sockaddr_storage* addr, socklen_t addrlen,
|
||||||
uint8_t* zone, size_t zonelen, int qtype, struct edns_option* opt_list)
|
uint8_t* zone, size_t zonelen, int qtype, struct edns_option* opt_list,
|
||||||
|
size_t pad_queries_block_size)
|
||||||
{
|
{
|
||||||
struct serviced_query* sq = (struct serviced_query*)malloc(sizeof(*sq));
|
struct serviced_query* sq = (struct serviced_query*)malloc(sizeof(*sq));
|
||||||
#ifdef UNBOUND_DEBUG
|
#ifdef UNBOUND_DEBUG
|
||||||
|
|
@ -2300,6 +2375,7 @@ serviced_create(struct outside_network* outnet, sldns_buffer* buff, int dnssec,
|
||||||
sq->status = serviced_initial;
|
sq->status = serviced_initial;
|
||||||
sq->retry = 0;
|
sq->retry = 0;
|
||||||
sq->to_be_deleted = 0;
|
sq->to_be_deleted = 0;
|
||||||
|
sq->padding_block_size = pad_queries_block_size;
|
||||||
#ifdef UNBOUND_DEBUG
|
#ifdef UNBOUND_DEBUG
|
||||||
ins =
|
ins =
|
||||||
#else
|
#else
|
||||||
|
|
@ -2481,6 +2557,7 @@ serviced_encode(struct serviced_query* sq, sldns_buffer* buff, int with_edns)
|
||||||
if(with_edns) {
|
if(with_edns) {
|
||||||
/* add edns section */
|
/* add edns section */
|
||||||
struct edns_data edns;
|
struct edns_data edns;
|
||||||
|
struct edns_option padding_option;
|
||||||
edns.edns_present = 1;
|
edns.edns_present = 1;
|
||||||
edns.ext_rcode = 0;
|
edns.ext_rcode = 0;
|
||||||
edns.edns_version = EDNS_ADVERTISED_VERSION;
|
edns.edns_version = EDNS_ADVERTISED_VERSION;
|
||||||
|
|
@ -2503,6 +2580,14 @@ serviced_encode(struct serviced_query* sq, sldns_buffer* buff, int with_edns)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
if(sq->dnssec & BIT_CD)
|
if(sq->dnssec & BIT_CD)
|
||||||
LDNS_CD_SET(sldns_buffer_begin(buff));
|
LDNS_CD_SET(sldns_buffer_begin(buff));
|
||||||
|
if (sq->ssl_upstream && sq->padding_block_size) {
|
||||||
|
padding_option.opt_code = LDNS_EDNS_PADDING;
|
||||||
|
padding_option.opt_len = 0;
|
||||||
|
padding_option.opt_data = NULL;
|
||||||
|
padding_option.next = edns.opt_list;
|
||||||
|
edns.opt_list = &padding_option;
|
||||||
|
edns.padding_block_size = sq->padding_block_size;
|
||||||
|
}
|
||||||
attach_edns_record(buff, &edns);
|
attach_edns_record(buff, &edns);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2692,6 +2777,11 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
|
||||||
{
|
{
|
||||||
struct serviced_query* sq = (struct serviced_query*)arg;
|
struct serviced_query* sq = (struct serviced_query*)arg;
|
||||||
struct comm_reply r2;
|
struct comm_reply r2;
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
struct waiting_tcp* w = (struct waiting_tcp*)sq->pending;
|
||||||
|
struct pending_tcp* pend_tcp = (struct pending_tcp*)w->next_waiting;
|
||||||
|
struct port_if* pi = pend_tcp->pi;
|
||||||
|
#endif
|
||||||
sq->pending = NULL; /* removed after this callback */
|
sq->pending = NULL; /* removed after this callback */
|
||||||
if(error != NETEVENT_NOERROR)
|
if(error != NETEVENT_NOERROR)
|
||||||
log_addr(VERB_QUERY, "tcp error for address",
|
log_addr(VERB_QUERY, "tcp error for address",
|
||||||
|
|
@ -2700,12 +2790,19 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
|
||||||
infra_update_tcp_works(sq->outnet->infra, &sq->addr,
|
infra_update_tcp_works(sq->outnet->infra, &sq->addr,
|
||||||
sq->addrlen, sq->zone, sq->zonelen);
|
sq->addrlen, sq->zone, sq->zonelen);
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
|
/*
|
||||||
|
* sending src (local service)/dst (upstream) addresses over DNSTAP
|
||||||
|
*/
|
||||||
if(error==NETEVENT_NOERROR && sq->outnet->dtenv &&
|
if(error==NETEVENT_NOERROR && sq->outnet->dtenv &&
|
||||||
(sq->outnet->dtenv->log_resolver_response_messages ||
|
(sq->outnet->dtenv->log_resolver_response_messages ||
|
||||||
sq->outnet->dtenv->log_forwarder_response_messages))
|
sq->outnet->dtenv->log_forwarder_response_messages)) {
|
||||||
|
log_addr(VERB_ALGO, "response from upstream", &sq->addr, sq->addrlen);
|
||||||
|
log_addr(VERB_ALGO, "to local addr", &pi->addr, pi->addrlen);
|
||||||
dt_msg_send_outside_response(sq->outnet->dtenv, &sq->addr,
|
dt_msg_send_outside_response(sq->outnet->dtenv, &sq->addr,
|
||||||
c->type, sq->zone, sq->zonelen, sq->qbuf, sq->qbuflen,
|
&pi->addr, c->type, sq->zone, sq->zonelen, sq->qbuf,
|
||||||
&sq->last_sent_time, sq->outnet->now_tv, c->buffer);
|
sq->qbuflen, &sq->last_sent_time, sq->outnet->now_tv,
|
||||||
|
c->buffer);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if(error==NETEVENT_NOERROR && sq->status == serviced_query_TCP_EDNS &&
|
if(error==NETEVENT_NOERROR && sq->status == serviced_query_TCP_EDNS &&
|
||||||
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
|
(LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) ==
|
||||||
|
|
@ -2859,6 +2956,10 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
|
||||||
struct serviced_query* sq = (struct serviced_query*)arg;
|
struct serviced_query* sq = (struct serviced_query*)arg;
|
||||||
struct outside_network* outnet = sq->outnet;
|
struct outside_network* outnet = sq->outnet;
|
||||||
struct timeval now = *sq->outnet->now_tv;
|
struct timeval now = *sq->outnet->now_tv;
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
struct pending* p = (struct pending*)sq->pending;
|
||||||
|
struct port_if* pi = p->pc->pif;
|
||||||
|
#endif
|
||||||
|
|
||||||
sq->pending = NULL; /* removed after callback */
|
sq->pending = NULL; /* removed after callback */
|
||||||
if(error == NETEVENT_TIMEOUT) {
|
if(error == NETEVENT_TIMEOUT) {
|
||||||
|
|
@ -2896,12 +2997,18 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#ifdef USE_DNSTAP
|
#ifdef USE_DNSTAP
|
||||||
|
/*
|
||||||
|
* sending src (local service)/dst (upstream) addresses over DNSTAP
|
||||||
|
*/
|
||||||
if(error == NETEVENT_NOERROR && outnet->dtenv &&
|
if(error == NETEVENT_NOERROR && outnet->dtenv &&
|
||||||
(outnet->dtenv->log_resolver_response_messages ||
|
(outnet->dtenv->log_resolver_response_messages ||
|
||||||
outnet->dtenv->log_forwarder_response_messages))
|
outnet->dtenv->log_forwarder_response_messages)) {
|
||||||
dt_msg_send_outside_response(outnet->dtenv, &sq->addr, c->type,
|
log_addr(VERB_ALGO, "response from upstream", &sq->addr, sq->addrlen);
|
||||||
sq->zone, sq->zonelen, sq->qbuf, sq->qbuflen,
|
log_addr(VERB_ALGO, "to local addr", &pi->addr, pi->addrlen);
|
||||||
&sq->last_sent_time, sq->outnet->now_tv, c->buffer);
|
dt_msg_send_outside_response(outnet->dtenv, &sq->addr, &pi->addr, c->type,
|
||||||
|
sq->zone, sq->zonelen, sq->qbuf, sq->qbuflen,
|
||||||
|
&sq->last_sent_time, sq->outnet->now_tv, c->buffer);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if( (sq->status == serviced_query_UDP_EDNS
|
if( (sq->status == serviced_query_UDP_EDNS
|
||||||
||sq->status == serviced_query_UDP_EDNS_FRAG)
|
||sq->status == serviced_query_UDP_EDNS_FRAG)
|
||||||
|
|
@ -3026,7 +3133,9 @@ outnet_serviced_query(struct outside_network* outnet,
|
||||||
sq = serviced_create(outnet, buff, dnssec, want_dnssec, nocaps,
|
sq = serviced_create(outnet, buff, dnssec, want_dnssec, nocaps,
|
||||||
tcp_upstream, ssl_upstream, tls_auth_name, addr,
|
tcp_upstream, ssl_upstream, tls_auth_name, addr,
|
||||||
addrlen, zone, zonelen, (int)qinfo->qtype,
|
addrlen, zone, zonelen, (int)qinfo->qtype,
|
||||||
qstate->edns_opts_back_out);
|
qstate->edns_opts_back_out,
|
||||||
|
( ssl_upstream && env->cfg->pad_queries
|
||||||
|
? env->cfg->pad_queries_block_size : 0 ));
|
||||||
if(!sq) {
|
if(!sq) {
|
||||||
free(cb);
|
free(cb);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -3173,7 +3282,7 @@ outnet_comm_point_for_udp(struct outside_network* outnet,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
cp = comm_point_create_udp(outnet->base, fd, outnet->udp_buff,
|
cp = comm_point_create_udp(outnet->base, fd, outnet->udp_buff,
|
||||||
cb, cb_arg);
|
cb, cb_arg, NULL);
|
||||||
if(!cp) {
|
if(!cp) {
|
||||||
log_err("malloc failure");
|
log_err("malloc failure");
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,8 @@ struct pending {
|
||||||
struct pending_tcp {
|
struct pending_tcp {
|
||||||
/** next in list of free tcp comm points, or NULL. */
|
/** next in list of free tcp comm points, or NULL. */
|
||||||
struct pending_tcp* next_free;
|
struct pending_tcp* next_free;
|
||||||
|
/** port for of the outgoing interface that is used */
|
||||||
|
struct port_if* pi;
|
||||||
/** tcp comm point it was sent on (and reply must come back on). */
|
/** tcp comm point it was sent on (and reply must come back on). */
|
||||||
struct comm_point* c;
|
struct comm_point* c;
|
||||||
/** the query being serviced, NULL if the pending_tcp is unused. */
|
/** the query being serviced, NULL if the pending_tcp is unused. */
|
||||||
|
|
@ -408,6 +410,10 @@ struct waiting_tcp {
|
||||||
char* tls_auth_name;
|
char* tls_auth_name;
|
||||||
/** the packet was involved in an error, to stop looping errors */
|
/** the packet was involved in an error, to stop looping errors */
|
||||||
int error_count;
|
int error_count;
|
||||||
|
#ifdef USE_DNSTAP
|
||||||
|
/** serviced query pointer for dnstap to get logging info, if nonNULL*/
|
||||||
|
struct serviced_query* sq;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -502,6 +508,8 @@ struct serviced_query {
|
||||||
struct service_callback* cblist;
|
struct service_callback* cblist;
|
||||||
/** the UDP or TCP query that is pending, see status which */
|
/** the UDP or TCP query that is pending, see status which */
|
||||||
void* pending;
|
void* pending;
|
||||||
|
/** block size with which to pad encrypted queries (default: 128) */
|
||||||
|
size_t padding_block_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,7 @@ rpz_rr_to_action(uint16_t rr_type, uint8_t* rdatawl, size_t rdatalen)
|
||||||
case LDNS_RR_TYPE_RRSIG:
|
case LDNS_RR_TYPE_RRSIG:
|
||||||
case LDNS_RR_TYPE_NSEC:
|
case LDNS_RR_TYPE_NSEC:
|
||||||
case LDNS_RR_TYPE_NSEC3:
|
case LDNS_RR_TYPE_NSEC3:
|
||||||
|
case LDNS_RR_TYPE_NSEC3PARAM:
|
||||||
return RPZ_INVALID_ACTION;
|
return RPZ_INVALID_ACTION;
|
||||||
case LDNS_RR_TYPE_CNAME:
|
case LDNS_RR_TYPE_CNAME:
|
||||||
break;
|
break;
|
||||||
|
|
@ -566,9 +567,26 @@ rpz_insert_local_zones_trigger(struct local_zones* lz, uint8_t* dname,
|
||||||
struct local_zone* z;
|
struct local_zone* z;
|
||||||
enum localzone_type tp = local_zone_always_transparent;
|
enum localzone_type tp = local_zone_always_transparent;
|
||||||
int dnamelabs = dname_count_labels(dname);
|
int dnamelabs = dname_count_labels(dname);
|
||||||
|
|
||||||
int newzone = 0;
|
int newzone = 0;
|
||||||
|
|
||||||
|
if(a == RPZ_TCP_ONLY_ACTION || a == RPZ_INVALID_ACTION) {
|
||||||
|
char str[255+1];
|
||||||
|
if(rrtype == LDNS_RR_TYPE_SOA || rrtype == LDNS_RR_TYPE_NS ||
|
||||||
|
rrtype == LDNS_RR_TYPE_DNAME ||
|
||||||
|
rrtype == LDNS_RR_TYPE_DNSKEY ||
|
||||||
|
rrtype == LDNS_RR_TYPE_RRSIG ||
|
||||||
|
rrtype == LDNS_RR_TYPE_NSEC ||
|
||||||
|
rrtype == LDNS_RR_TYPE_NSEC3PARAM ||
|
||||||
|
rrtype == LDNS_RR_TYPE_NSEC3 ||
|
||||||
|
rrtype == LDNS_RR_TYPE_DS)
|
||||||
|
return; /* no need to log these types as unsupported */
|
||||||
|
dname_str(dname, str);
|
||||||
|
verbose(VERB_ALGO, "RPZ: qname trigger, %s skipping unsupported action: %s",
|
||||||
|
str, rpz_action_to_string(a));
|
||||||
|
free(dname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lock_rw_wrlock(&lz->lock);
|
lock_rw_wrlock(&lz->lock);
|
||||||
/* exact match */
|
/* exact match */
|
||||||
z = local_zones_find(lz, dname, dnamelen, dnamelabs, LDNS_RR_CLASS_IN);
|
z = local_zones_find(lz, dname, dnamelen, dnamelabs, LDNS_RR_CLASS_IN);
|
||||||
|
|
@ -686,6 +704,14 @@ rpz_insert_ipaddr_based_trigger(struct respip_set* set, struct sockaddr_storage*
|
||||||
enum respip_action respa = rpz_action_to_respip_action(a);
|
enum respip_action respa = rpz_action_to_respip_action(a);
|
||||||
|
|
||||||
lock_rw_wrlock(&set->lock);
|
lock_rw_wrlock(&set->lock);
|
||||||
|
if(a == RPZ_TCP_ONLY_ACTION || a == RPZ_INVALID_ACTION ||
|
||||||
|
respa == respip_invalid) {
|
||||||
|
char str[255+1];
|
||||||
|
dname_str(dname, str);
|
||||||
|
verbose(VERB_ALGO, "RPZ: respip trigger, %s skipping unsupported action: %s",
|
||||||
|
str, rpz_action_to_string(a));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
rrstr = sldns_wire2str_rr(rr, rr_len);
|
rrstr = sldns_wire2str_rr(rr, rr_len);
|
||||||
if(rrstr == NULL) {
|
if(rrstr == NULL) {
|
||||||
|
|
@ -1022,7 +1048,8 @@ rpz_find_zone(struct local_zones* zones, uint8_t* qname, size_t qname_len, uint1
|
||||||
int only_exact, int wr, int zones_keep_lock)
|
int only_exact, int wr, int zones_keep_lock)
|
||||||
{
|
{
|
||||||
uint8_t* ce;
|
uint8_t* ce;
|
||||||
size_t ce_len, ce_labs;
|
size_t ce_len;
|
||||||
|
int ce_labs;
|
||||||
uint8_t wc[LDNS_MAX_DOMAINLEN+1];
|
uint8_t wc[LDNS_MAX_DOMAINLEN+1];
|
||||||
int exact;
|
int exact;
|
||||||
struct local_zone* z = NULL;
|
struct local_zone* z = NULL;
|
||||||
|
|
@ -1056,7 +1083,7 @@ rpz_find_zone(struct local_zones* zones, uint8_t* qname, size_t qname_len, uint1
|
||||||
* zone match, append '*' to that and do another lookup. */
|
* zone match, append '*' to that and do another lookup. */
|
||||||
|
|
||||||
ce = dname_get_shared_topdomain(z->name, qname);
|
ce = dname_get_shared_topdomain(z->name, qname);
|
||||||
if(!ce /* should not happen */ || !*ce /* root */) {
|
if(!ce /* should not happen */) {
|
||||||
lock_rw_unlock(&z->lock);
|
lock_rw_unlock(&z->lock);
|
||||||
if(zones_keep_lock) {
|
if(zones_keep_lock) {
|
||||||
lock_rw_unlock(&zones->lock);
|
lock_rw_unlock(&zones->lock);
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,6 @@ int sldns_bgetc(struct sldns_buffer *buffer);
|
||||||
* the position to the first character that is not in *s.
|
* the position to the first character that is not in *s.
|
||||||
* \param[in] *buffer buffer to use
|
* \param[in] *buffer buffer to use
|
||||||
* \param[in] *s characters to skip
|
* \param[in] *s characters to skip
|
||||||
* \return void
|
|
||||||
*/
|
*/
|
||||||
void sldns_bskipcs(struct sldns_buffer *buffer, const char *s);
|
void sldns_bskipcs(struct sldns_buffer *buffer, const char *s);
|
||||||
|
|
||||||
|
|
@ -162,7 +161,6 @@ void sldns_bskipcs(struct sldns_buffer *buffer, const char *s);
|
||||||
* the position to the first character that is not in *s.
|
* the position to the first character that is not in *s.
|
||||||
* \param[in] *fp file to use
|
* \param[in] *fp file to use
|
||||||
* \param[in] *s characters to skip
|
* \param[in] *s characters to skip
|
||||||
* \return void
|
|
||||||
*/
|
*/
|
||||||
void sldns_fskipcs(FILE *fp, const char *s);
|
void sldns_fskipcs(FILE *fp, const char *s);
|
||||||
|
|
||||||
|
|
@ -173,7 +171,6 @@ void sldns_fskipcs(FILE *fp, const char *s);
|
||||||
* \param[in] *fp file to use
|
* \param[in] *fp file to use
|
||||||
* \param[in] *s characters to skip
|
* \param[in] *s characters to skip
|
||||||
* \param[in] line_nr pointer to an integer containing the current line number (for debugging purposes)
|
* \param[in] line_nr pointer to an integer containing the current line number (for debugging purposes)
|
||||||
* \return void
|
|
||||||
*/
|
*/
|
||||||
void sldns_fskipcs_l(FILE *fp, const char *s, int *line_nr);
|
void sldns_fskipcs_l(FILE *fp, const char *s, int *line_nr);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,9 @@ static const sldns_rdf_type type_openpgpkey_wireformat[] = {
|
||||||
static const sldns_rdf_type type_csync_wireformat[] = {
|
static const sldns_rdf_type type_csync_wireformat[] = {
|
||||||
LDNS_RDF_TYPE_INT32, LDNS_RDF_TYPE_INT16, LDNS_RDF_TYPE_NSEC
|
LDNS_RDF_TYPE_INT32, LDNS_RDF_TYPE_INT16, LDNS_RDF_TYPE_NSEC
|
||||||
};
|
};
|
||||||
|
static const sldns_rdf_type type_zonemd_wireformat[] = {
|
||||||
|
LDNS_RDF_TYPE_INT32, LDNS_RDF_TYPE_INT8, LDNS_RDF_TYPE_INT8, LDNS_RDF_TYPE_HEX
|
||||||
|
};
|
||||||
/* nsec3 is some vars, followed by same type of data of nsec */
|
/* nsec3 is some vars, followed by same type of data of nsec */
|
||||||
static const sldns_rdf_type type_nsec3_wireformat[] = {
|
static const sldns_rdf_type type_nsec3_wireformat[] = {
|
||||||
/* LDNS_RDF_TYPE_NSEC3_VARS, LDNS_RDF_TYPE_NSEC3_NEXT_OWNER, LDNS_RDF_TYPE_NSEC*/
|
/* LDNS_RDF_TYPE_NSEC3_VARS, LDNS_RDF_TYPE_NSEC3_NEXT_OWNER, LDNS_RDF_TYPE_NSEC*/
|
||||||
|
|
@ -372,7 +375,8 @@ static sldns_rr_descriptor rdata_field_descriptors[] = {
|
||||||
{LDNS_RR_TYPE_OPENPGPKEY, "OPENPGPKEY", 1, 1, type_openpgpkey_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
{LDNS_RR_TYPE_OPENPGPKEY, "OPENPGPKEY", 1, 1, type_openpgpkey_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
/* 62 */
|
/* 62 */
|
||||||
{LDNS_RR_TYPE_CSYNC, "CSYNC", 3, 3, type_csync_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
{LDNS_RR_TYPE_CSYNC, "CSYNC", 3, 3, type_csync_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
{(enum sldns_enum_rr_type)0, "TYPE63", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
/* 63 */
|
||||||
|
{LDNS_RR_TYPE_ZONEMD, "ZONEMD", 4, 4, type_zonemd_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
{(enum sldns_enum_rr_type)0, "TYPE64", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
{(enum sldns_enum_rr_type)0, "TYPE64", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
{(enum sldns_enum_rr_type)0, "TYPE65", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
{(enum sldns_enum_rr_type)0, "TYPE65", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
{(enum sldns_enum_rr_type)0, "TYPE66", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
{(enum sldns_enum_rr_type)0, "TYPE66", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@ enum sldns_enum_rr_type
|
||||||
LDNS_RR_TYPE_CDNSKEY = 60, /** RFC 7344 */
|
LDNS_RR_TYPE_CDNSKEY = 60, /** RFC 7344 */
|
||||||
LDNS_RR_TYPE_OPENPGPKEY = 61, /* RFC 7929 */
|
LDNS_RR_TYPE_OPENPGPKEY = 61, /* RFC 7929 */
|
||||||
LDNS_RR_TYPE_CSYNC = 62, /* RFC 7477 */
|
LDNS_RR_TYPE_CSYNC = 62, /* RFC 7477 */
|
||||||
|
LDNS_RR_TYPE_ZONEMD = 63, /* draft-ietf-dnsop-dns-zone-digest-12 */
|
||||||
|
|
||||||
LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */
|
LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ INLINE void sldns_buffer_clear(sldns_buffer *buffer)
|
||||||
* the position is set to 0.
|
* the position is set to 0.
|
||||||
*
|
*
|
||||||
* \param[in] buffer the buffer to flip
|
* \param[in] buffer the buffer to flip
|
||||||
* \return void
|
|
||||||
*/
|
*/
|
||||||
INLINE void sldns_buffer_flip(sldns_buffer *buffer)
|
INLINE void sldns_buffer_flip(sldns_buffer *buffer)
|
||||||
{
|
{
|
||||||
|
|
@ -732,7 +731,6 @@ int sldns_buffer_printf(sldns_buffer *buffer, const char *format, ...)
|
||||||
/**
|
/**
|
||||||
* frees the buffer.
|
* frees the buffer.
|
||||||
* \param[in] *buffer the buffer to be freed
|
* \param[in] *buffer the buffer to be freed
|
||||||
* \return void
|
|
||||||
*/
|
*/
|
||||||
void sldns_buffer_free(sldns_buffer *buffer);
|
void sldns_buffer_free(sldns_buffer *buffer);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1491,13 +1491,17 @@ static int
|
||||||
loc_parse_cm(char* my_str, char** endstr, uint8_t* m, uint8_t* e)
|
loc_parse_cm(char* my_str, char** endstr, uint8_t* m, uint8_t* e)
|
||||||
{
|
{
|
||||||
uint32_t meters = 0, cm = 0, val;
|
uint32_t meters = 0, cm = 0, val;
|
||||||
|
char* cm_endstr;
|
||||||
while (isblank((unsigned char)*my_str)) {
|
while (isblank((unsigned char)*my_str)) {
|
||||||
my_str++;
|
my_str++;
|
||||||
}
|
}
|
||||||
meters = (uint32_t)strtol(my_str, &my_str, 10);
|
meters = (uint32_t)strtol(my_str, &my_str, 10);
|
||||||
if (*my_str == '.') {
|
if (*my_str == '.') {
|
||||||
my_str++;
|
my_str++;
|
||||||
cm = (uint32_t)strtol(my_str, &my_str, 10);
|
cm = (uint32_t)strtol(my_str, &cm_endstr, 10);
|
||||||
|
if(cm_endstr == my_str + 1)
|
||||||
|
cm *= 10;
|
||||||
|
my_str = cm_endstr;
|
||||||
}
|
}
|
||||||
if (meters >= 1) {
|
if (meters >= 1) {
|
||||||
*e = 2;
|
*e = 2;
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,36 @@
|
||||||
char* wsa_strerror(int err);
|
char* wsa_strerror(int err);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static const char ICANN_UPDATE_CA[] =
|
||||||
|
/* The ICANN CA fetched at 24 Sep 2010. Valid to 2028 */
|
||||||
|
"-----BEGIN CERTIFICATE-----\n"
|
||||||
|
"MIIDdzCCAl+gAwIBAgIBATANBgkqhkiG9w0BAQsFADBdMQ4wDAYDVQQKEwVJQ0FO\n"
|
||||||
|
"TjEmMCQGA1UECxMdSUNBTk4gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxFjAUBgNV\n"
|
||||||
|
"BAMTDUlDQU5OIFJvb3QgQ0ExCzAJBgNVBAYTAlVTMB4XDTA5MTIyMzA0MTkxMloX\n"
|
||||||
|
"DTI5MTIxODA0MTkxMlowXTEOMAwGA1UEChMFSUNBTk4xJjAkBgNVBAsTHUlDQU5O\n"
|
||||||
|
"IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRYwFAYDVQQDEw1JQ0FOTiBSb290IENB\n"
|
||||||
|
"MQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKDb\n"
|
||||||
|
"cLhPNNqc1NB+u+oVvOnJESofYS9qub0/PXagmgr37pNublVThIzyLPGCJ8gPms9S\n"
|
||||||
|
"G1TaKNIsMI7d+5IgMy3WyPEOECGIcfqEIktdR1YWfJufXcMReZwU4v/AdKzdOdfg\n"
|
||||||
|
"ONiwc6r70duEr1IiqPbVm5T05l1e6D+HkAvHGnf1LtOPGs4CHQdpIUcy2kauAEy2\n"
|
||||||
|
"paKcOcHASvbTHK7TbbvHGPB+7faAztABLoneErruEcumetcNfPMIjXKdv1V1E3C7\n"
|
||||||
|
"MSJKy+jAqqQJqjZoQGB0necZgUMiUv7JK1IPQRM2CXJllcyJrm9WFxY0c1KjBO29\n"
|
||||||
|
"iIKK69fcglKcBuFShUECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B\n"
|
||||||
|
"Af8EBAMCAf4wHQYDVR0OBBYEFLpS6UmDJIZSL8eZzfyNa2kITcBQMA0GCSqGSIb3\n"
|
||||||
|
"DQEBCwUAA4IBAQAP8emCogqHny2UYFqywEuhLys7R9UKmYY4suzGO4nkbgfPFMfH\n"
|
||||||
|
"6M+Zj6owwxlwueZt1j/IaCayoKU3QsrYYoDRolpILh+FPwx7wseUEV8ZKpWsoDoD\n"
|
||||||
|
"2JFbLg2cfB8u/OlE4RYmcxxFSmXBg0yQ8/IoQt/bxOcEEhhiQ168H2yE5rxJMt9h\n"
|
||||||
|
"15nu5JBSewrCkYqYYmaxyOC3WrVGfHZxVI7MpIFcGdvSb2a1uyuua8l0BKgk3ujF\n"
|
||||||
|
"0/wsHNeP22qNyVO+XVBzrM8fk8BSUFuiT/6tZTYXRtEt5aKQZgXbKU5dUF3jT9qg\n"
|
||||||
|
"j/Br5BZw3X/zd325TvnswzMC1+ljLzHnQGGk\n"
|
||||||
|
"-----END CERTIFICATE-----\n";
|
||||||
|
|
||||||
|
static const char DS_TRUST_ANCHOR[] =
|
||||||
|
/* The anchors must start on a new line with ". IN DS and end with \n"[;]
|
||||||
|
* because the makedist script greps on the source here */
|
||||||
|
/* anchor 20326 is from 2017 */
|
||||||
|
". IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D\n";
|
||||||
|
|
||||||
/** verbosity for this application */
|
/** verbosity for this application */
|
||||||
static int verb = 0;
|
static int verb = 0;
|
||||||
|
|
||||||
|
|
@ -213,48 +243,21 @@ usage(void)
|
||||||
static const char*
|
static const char*
|
||||||
get_builtin_cert(void)
|
get_builtin_cert(void)
|
||||||
{
|
{
|
||||||
return
|
return ICANN_UPDATE_CA;
|
||||||
/* The ICANN CA fetched at 24 Sep 2010. Valid to 2028 */
|
|
||||||
"-----BEGIN CERTIFICATE-----\n"
|
|
||||||
"MIIDdzCCAl+gAwIBAgIBATANBgkqhkiG9w0BAQsFADBdMQ4wDAYDVQQKEwVJQ0FO\n"
|
|
||||||
"TjEmMCQGA1UECxMdSUNBTk4gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxFjAUBgNV\n"
|
|
||||||
"BAMTDUlDQU5OIFJvb3QgQ0ExCzAJBgNVBAYTAlVTMB4XDTA5MTIyMzA0MTkxMloX\n"
|
|
||||||
"DTI5MTIxODA0MTkxMlowXTEOMAwGA1UEChMFSUNBTk4xJjAkBgNVBAsTHUlDQU5O\n"
|
|
||||||
"IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRYwFAYDVQQDEw1JQ0FOTiBSb290IENB\n"
|
|
||||||
"MQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKDb\n"
|
|
||||||
"cLhPNNqc1NB+u+oVvOnJESofYS9qub0/PXagmgr37pNublVThIzyLPGCJ8gPms9S\n"
|
|
||||||
"G1TaKNIsMI7d+5IgMy3WyPEOECGIcfqEIktdR1YWfJufXcMReZwU4v/AdKzdOdfg\n"
|
|
||||||
"ONiwc6r70duEr1IiqPbVm5T05l1e6D+HkAvHGnf1LtOPGs4CHQdpIUcy2kauAEy2\n"
|
|
||||||
"paKcOcHASvbTHK7TbbvHGPB+7faAztABLoneErruEcumetcNfPMIjXKdv1V1E3C7\n"
|
|
||||||
"MSJKy+jAqqQJqjZoQGB0necZgUMiUv7JK1IPQRM2CXJllcyJrm9WFxY0c1KjBO29\n"
|
|
||||||
"iIKK69fcglKcBuFShUECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B\n"
|
|
||||||
"Af8EBAMCAf4wHQYDVR0OBBYEFLpS6UmDJIZSL8eZzfyNa2kITcBQMA0GCSqGSIb3\n"
|
|
||||||
"DQEBCwUAA4IBAQAP8emCogqHny2UYFqywEuhLys7R9UKmYY4suzGO4nkbgfPFMfH\n"
|
|
||||||
"6M+Zj6owwxlwueZt1j/IaCayoKU3QsrYYoDRolpILh+FPwx7wseUEV8ZKpWsoDoD\n"
|
|
||||||
"2JFbLg2cfB8u/OlE4RYmcxxFSmXBg0yQ8/IoQt/bxOcEEhhiQ168H2yE5rxJMt9h\n"
|
|
||||||
"15nu5JBSewrCkYqYYmaxyOC3WrVGfHZxVI7MpIFcGdvSb2a1uyuua8l0BKgk3ujF\n"
|
|
||||||
"0/wsHNeP22qNyVO+XVBzrM8fk8BSUFuiT/6tZTYXRtEt5aKQZgXbKU5dUF3jT9qg\n"
|
|
||||||
"j/Br5BZw3X/zd325TvnswzMC1+ljLzHnQGGk\n"
|
|
||||||
"-----END CERTIFICATE-----\n"
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** return the built in root DS trust anchor */
|
/** return the built in root DS trust anchor */
|
||||||
static const char*
|
static const char*
|
||||||
get_builtin_ds(void)
|
get_builtin_ds(void)
|
||||||
{
|
{
|
||||||
return
|
return DS_TRUST_ANCHOR;
|
||||||
/* The anchors must start on a new line with ". IN DS and end with \n"[;]
|
|
||||||
* because the makedist script greps on the source here */
|
|
||||||
/* anchor 20326 is from 2017 */
|
|
||||||
". IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** print hex data */
|
/** print hex data */
|
||||||
static void
|
static void
|
||||||
print_data(const char* msg, const char* data, int len)
|
print_data(const char* msg, const char* data, size_t len)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
printf("%s: ", msg);
|
printf("%s: ", msg);
|
||||||
for(i=0; i<len; i++) {
|
for(i=0; i<len; i++) {
|
||||||
printf(" %2.2x", (unsigned char)data[i]);
|
printf(" %2.2x", (unsigned char)data[i]);
|
||||||
|
|
@ -1110,7 +1113,7 @@ read_http_result(SSL* ssl)
|
||||||
data = read_data_chunk(ssl, len);
|
data = read_data_chunk(ssl, len);
|
||||||
}
|
}
|
||||||
if(!data) return NULL;
|
if(!data) return NULL;
|
||||||
if(verb >= 4) print_data("read data", data, (int)len);
|
if(verb >= 4) print_data("read data", data, len);
|
||||||
m = BIO_new(BIO_s_mem());
|
m = BIO_new(BIO_s_mem());
|
||||||
if(!m) {
|
if(!m) {
|
||||||
if(verb) printf("out of memory\n");
|
if(verb) printf("out of memory\n");
|
||||||
|
|
|
||||||
|
|
@ -851,7 +851,7 @@ check_auth(struct config_file* cfg)
|
||||||
{
|
{
|
||||||
int is_rpz = 0;
|
int is_rpz = 0;
|
||||||
struct auth_zones* az = auth_zones_create();
|
struct auth_zones* az = auth_zones_create();
|
||||||
if(!az || !auth_zones_apply_cfg(az, cfg, 0, &is_rpz)) {
|
if(!az || !auth_zones_apply_cfg(az, cfg, 0, &is_rpz, NULL, NULL)) {
|
||||||
fatal_exit("Could not setup authority zones");
|
fatal_exit("Could not setup authority zones");
|
||||||
}
|
}
|
||||||
auth_zones_delete(az);
|
auth_zones_delete(az);
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
#include "sldns/wire2str.h"
|
#include "sldns/wire2str.h"
|
||||||
#include "sldns/pkthdr.h"
|
#include "sldns/pkthdr.h"
|
||||||
#include "services/rpz.h"
|
#include "services/rpz.h"
|
||||||
|
#include "services/listen_dnsport.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_IPC_H
|
#ifdef HAVE_SYS_IPC_H
|
||||||
#include "sys/ipc.h"
|
#include "sys/ipc.h"
|
||||||
|
|
@ -583,10 +584,27 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
|
||||||
socklen_t addrlen;
|
socklen_t addrlen;
|
||||||
int addrfamily = 0, proto = IPPROTO_TCP;
|
int addrfamily = 0, proto = IPPROTO_TCP;
|
||||||
int fd, useport = 1;
|
int fd, useport = 1;
|
||||||
|
char** rcif = NULL;
|
||||||
|
int num_rcif = 0;
|
||||||
/* use svr or the first config entry */
|
/* use svr or the first config entry */
|
||||||
if(!svr) {
|
if(!svr) {
|
||||||
if(cfg->control_ifs.first) {
|
if(cfg->control_ifs.first) {
|
||||||
svr = cfg->control_ifs.first->str;
|
struct sockaddr_storage addr2;
|
||||||
|
socklen_t addrlen2;
|
||||||
|
if(extstrtoaddr(cfg->control_ifs.first->str, &addr2,
|
||||||
|
&addrlen2)) {
|
||||||
|
svr = cfg->control_ifs.first->str;
|
||||||
|
} else {
|
||||||
|
if(!resolve_interface_names(NULL, 0,
|
||||||
|
cfg->control_ifs.first, &rcif,
|
||||||
|
&num_rcif)) {
|
||||||
|
fatal_exit("could not resolve interface names");
|
||||||
|
}
|
||||||
|
if(rcif == NULL || num_rcif == 0) {
|
||||||
|
fatal_exit("no control interfaces");
|
||||||
|
}
|
||||||
|
svr = rcif[0];
|
||||||
|
}
|
||||||
} else if(cfg->do_ip4) {
|
} else if(cfg->do_ip4) {
|
||||||
svr = "127.0.0.1";
|
svr = "127.0.0.1";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -697,6 +715,7 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fd_set_block(fd);
|
fd_set_block(fd);
|
||||||
|
config_del_strarray(rcif, num_rcif);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1229,6 +1229,7 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
|
||||||
edns.bits = 0;
|
edns.bits = 0;
|
||||||
if(dnssec)
|
if(dnssec)
|
||||||
edns.bits = EDNS_DO;
|
edns.bits = EDNS_DO;
|
||||||
|
edns.padding_block_size = 0;
|
||||||
if((client_string_addr = edns_string_addr_lookup(
|
if((client_string_addr = edns_string_addr_lookup(
|
||||||
&env->edns_strings->client_strings,
|
&env->edns_strings->client_strings,
|
||||||
addr, addrlen))) {
|
addr, addrlen))) {
|
||||||
|
|
@ -1305,8 +1306,9 @@ void outnet_serviced_query_stop(struct serviced_query* sq, void* cb_arg)
|
||||||
log_info("double delete of pending serviced query");
|
log_info("double delete of pending serviced query");
|
||||||
}
|
}
|
||||||
|
|
||||||
int resolve_interface_names(struct config_file* ATTR_UNUSED(cfg),
|
int resolve_interface_names(char** ATTR_UNUSED(ifs), int ATTR_UNUSED(num_ifs),
|
||||||
char*** ATTR_UNUSED(resif), int* ATTR_UNUSED(num_resif))
|
struct config_strlist* ATTR_UNUSED(list), char*** ATTR_UNUSED(resif),
|
||||||
|
int* ATTR_UNUSED(num_resif))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1628,7 +1630,8 @@ int create_udp_sock(int ATTR_UNUSED(family), int ATTR_UNUSED(socktype),
|
||||||
struct comm_point* comm_point_create_udp(struct comm_base *ATTR_UNUSED(base),
|
struct comm_point* comm_point_create_udp(struct comm_base *ATTR_UNUSED(base),
|
||||||
int ATTR_UNUSED(fd), sldns_buffer* ATTR_UNUSED(buffer),
|
int ATTR_UNUSED(fd), sldns_buffer* ATTR_UNUSED(buffer),
|
||||||
comm_point_callback_type* ATTR_UNUSED(callback),
|
comm_point_callback_type* ATTR_UNUSED(callback),
|
||||||
void* ATTR_UNUSED(callback_arg))
|
void* ATTR_UNUSED(callback_arg),
|
||||||
|
struct unbound_socket* ATTR_UNUSED(socket))
|
||||||
{
|
{
|
||||||
log_assert(0);
|
log_assert(0);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
|
|
@ -517,8 +517,8 @@ del_tmp_file(char* fname)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add zone from file for testing */
|
/** Add zone from file for testing */
|
||||||
static struct auth_zone*
|
struct auth_zone*
|
||||||
addzone(struct auth_zones* az, const char* name, char* fname)
|
authtest_addzone(struct auth_zones* az, const char* name, char* fname)
|
||||||
{
|
{
|
||||||
struct auth_zone* z;
|
struct auth_zone* z;
|
||||||
size_t nmlen;
|
size_t nmlen;
|
||||||
|
|
@ -593,7 +593,7 @@ check_read_exact(const char* name, const char* zone)
|
||||||
|
|
||||||
az = auth_zones_create();
|
az = auth_zones_create();
|
||||||
unit_assert(az);
|
unit_assert(az);
|
||||||
z = addzone(az, name, fname);
|
z = authtest_addzone(az, name, fname);
|
||||||
unit_assert(z);
|
unit_assert(z);
|
||||||
outf = create_tmp_file(NULL);
|
outf = create_tmp_file(NULL);
|
||||||
if(!auth_zone_write_file(z, outf)) {
|
if(!auth_zone_write_file(z, outf)) {
|
||||||
|
|
@ -844,7 +844,7 @@ check_queries(const char* name, const char* zone, struct q_ans* queries)
|
||||||
fname = create_tmp_file(zone);
|
fname = create_tmp_file(zone);
|
||||||
az = auth_zones_create();
|
az = auth_zones_create();
|
||||||
if(!az) fatal_exit("out of memory");
|
if(!az) fatal_exit("out of memory");
|
||||||
z = addzone(az, name, fname);
|
z = authtest_addzone(az, name, fname);
|
||||||
if(!z) fatal_exit("could not read zone for queries test");
|
if(!z) fatal_exit("could not read zone for queries test");
|
||||||
del_tmp_file(fname);
|
del_tmp_file(fname);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
#include "sldns/parseutil.h"
|
#include "sldns/parseutil.h"
|
||||||
|
|
||||||
/** verbose this unit test */
|
/** verbose this unit test */
|
||||||
static int vbmp = 0;
|
static int vbmp = 0;
|
||||||
|
|
||||||
/** print buffer to hex into string */
|
/** print buffer to hex into string */
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -952,6 +952,7 @@ main(int argc, char* argv[])
|
||||||
slabhash_test();
|
slabhash_test();
|
||||||
infra_test();
|
infra_test();
|
||||||
ldns_test();
|
ldns_test();
|
||||||
|
zonemd_test();
|
||||||
msgparse_test();
|
msgparse_test();
|
||||||
tcpid_test();
|
tcpid_test();
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
|
|
|
||||||
|
|
@ -80,5 +80,7 @@ void ecs_test(void);
|
||||||
void ldns_test(void);
|
void ldns_test(void);
|
||||||
/** unit test for auth zone functions */
|
/** unit test for auth zone functions */
|
||||||
void authzone_test(void);
|
void authzone_test(void);
|
||||||
|
/** unit test for zonemd functions */
|
||||||
|
void zonemd_test(void);
|
||||||
|
|
||||||
#endif /* TESTCODE_UNITMAIN_H */
|
#endif /* TESTCODE_UNITMAIN_H */
|
||||||
|
|
|
||||||
501
testcode/unitzonemd.c
Normal file
501
testcode/unitzonemd.c
Normal file
|
|
@ -0,0 +1,501 @@
|
||||||
|
/*
|
||||||
|
* testcode/unitzonemd.c - unit test for zonemd.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020, NLnet Labs. All rights reserved.
|
||||||
|
*
|
||||||
|
* This software is open source.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of the NLNET LABS nor the names of its contributors may
|
||||||
|
* be used to endorse or promote products derived from this software without
|
||||||
|
* specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||||
|
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* Unit tests for ZONEMD functionality.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <ctype.h>
|
||||||
|
#include "util/log.h"
|
||||||
|
#include "testcode/unitmain.h"
|
||||||
|
#include "sldns/str2wire.h"
|
||||||
|
#include "services/authzone.h"
|
||||||
|
#include "util/data/dname.h"
|
||||||
|
#include "util/regional.h"
|
||||||
|
#include "validator/val_anchor.h"
|
||||||
|
|
||||||
|
/** Add zone from file for testing */
|
||||||
|
struct auth_zone* authtest_addzone(struct auth_zones* az, const char* name,
|
||||||
|
char* fname);
|
||||||
|
|
||||||
|
/** zonemd unit test, generate a zonemd digest and check if correct */
|
||||||
|
static void zonemd_generate_test(const char* zname, char* zfile,
|
||||||
|
int scheme, int hashalgo, const char* digest)
|
||||||
|
{
|
||||||
|
uint8_t zonemd_hash[512];
|
||||||
|
size_t hashlen = 0;
|
||||||
|
char output[1024+1];
|
||||||
|
size_t i;
|
||||||
|
struct auth_zones* az;
|
||||||
|
struct auth_zone* z;
|
||||||
|
int result;
|
||||||
|
struct regional* region = NULL;
|
||||||
|
struct sldns_buffer* buf = NULL;
|
||||||
|
char* reason = NULL;
|
||||||
|
char* digestdup;
|
||||||
|
|
||||||
|
if(!zonemd_hashalgo_supported(hashalgo))
|
||||||
|
return; /* cannot test unsupported algo */
|
||||||
|
|
||||||
|
/* setup environment */
|
||||||
|
az = auth_zones_create();
|
||||||
|
unit_assert(az);
|
||||||
|
region = regional_create();
|
||||||
|
unit_assert(region);
|
||||||
|
buf = sldns_buffer_new(65535);
|
||||||
|
unit_assert(buf);
|
||||||
|
|
||||||
|
/* read file */
|
||||||
|
z = authtest_addzone(az, zname, zfile);
|
||||||
|
unit_assert(z);
|
||||||
|
|
||||||
|
/* create zonemd digest */
|
||||||
|
result = auth_zone_generate_zonemd_hash(z, scheme, hashalgo,
|
||||||
|
zonemd_hash, sizeof(zonemd_hash), &hashlen, region, buf,
|
||||||
|
&reason);
|
||||||
|
if(reason) printf("zonemd failure reason: %s\n", reason);
|
||||||
|
unit_assert(result);
|
||||||
|
|
||||||
|
/* check digest */
|
||||||
|
unit_assert(hashlen*2+1 <= sizeof(output));
|
||||||
|
for(i=0; i<hashlen; i++) {
|
||||||
|
const char* hexl = "0123456789ABCDEF";
|
||||||
|
output[i*2] = hexl[(zonemd_hash[i]&0xf0)>>4];
|
||||||
|
output[i*2+1] = hexl[zonemd_hash[i]&0xf];
|
||||||
|
}
|
||||||
|
output[hashlen*2] = 0;
|
||||||
|
digestdup = strdup(digest);
|
||||||
|
unit_assert(digestdup);
|
||||||
|
for(i=0; i<strlen(digestdup); i++) {
|
||||||
|
digestdup[i] = toupper(digestdup[i]);
|
||||||
|
}
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
char zname[255+1];
|
||||||
|
dname_str(z->name, zname);
|
||||||
|
printf("zonemd generated for %s in %s with "
|
||||||
|
"scheme=%d hashalgo=%d\n", zname, z->zonefile,
|
||||||
|
scheme, hashalgo);
|
||||||
|
printf("digest %s\n", output);
|
||||||
|
printf("wanted %s\n", digestdup);
|
||||||
|
}
|
||||||
|
unit_assert(strcmp(output, digestdup) == 0);
|
||||||
|
|
||||||
|
/* delete environment */
|
||||||
|
free(digestdup);
|
||||||
|
auth_zones_delete(az);
|
||||||
|
regional_destroy(region);
|
||||||
|
sldns_buffer_free(buf);
|
||||||
|
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** loop over files and test generated zonemd digest */
|
||||||
|
static void zonemd_generate_tests(void)
|
||||||
|
{
|
||||||
|
unit_show_func("services/authzone.c", "auth_zone_generate_zonemd_hash");
|
||||||
|
zonemd_generate_test("example.org", "testdata/zonemd.example1.zone",
|
||||||
|
1, 2, "20564D10F50A0CEBEC856C64032B7DFB53D3C449A421A5BC7A21F7627B4ACEA4DF29F2C6FE82ED9C23ADF6F4D420D5DD63EF6E6349D60FDAB910B65DF8D481B7");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.1 */
|
||||||
|
zonemd_generate_test("example", "testdata/zonemd.example_a1.zone",
|
||||||
|
1, 1, "c68090d90a7aed716bc459f9340e3d7c1370d4d24b7e2fc3a1ddc0b9a87153b9a9713b3c9ae5cc27777f98b8e730044c");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.2 */
|
||||||
|
zonemd_generate_test("example", "testdata/zonemd.example_a2.zone",
|
||||||
|
1, 1, "31cefb03814f5062ad12fa951ba0ef5f8da6ae354a415767246f7dc932ceb1e742a2108f529db6a33a11c01493de358d");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.3 SHA384 digest */
|
||||||
|
zonemd_generate_test("example", "testdata/zonemd.example_a3.zone",
|
||||||
|
1, 1, "62e6cf51b02e54b9b5f967d547ce43136792901f9f88e637493daaf401c92c279dd10f0edb1c56f8080211f8480ee306");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.3 SHA512 digest*/
|
||||||
|
zonemd_generate_test("example", "testdata/zonemd.example_a3.zone",
|
||||||
|
1, 2, "08cfa1115c7b948c4163a901270395ea226a930cd2cbcf2fa9a5e6eb85f37c8a4e114d884e66f176eab121cb02db7d652e0cc4827e7a3204f166b47e5613fd27");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.4 */
|
||||||
|
zonemd_generate_test("uri.arpa", "testdata/zonemd.example_a4.zone",
|
||||||
|
1, 1, "1291b78ddf7669b1a39d014d87626b709b55774c5d7d58fadc556439889a10eaf6f11d615900a4f996bd46279514e473");
|
||||||
|
|
||||||
|
/* https://tools.ietf.org/html/draft-ietf-dnsop-dns-zone-digest-12
|
||||||
|
* from section A.5 */
|
||||||
|
zonemd_generate_test("root-servers.net", "testdata/zonemd.example_a5.zone",
|
||||||
|
1, 1, "f1ca0ccd91bd5573d9f431c00ee0101b2545c97602be0a978a3b11dbfc1c776d5b3e86ae3d973d6b5349ba7f04340f79");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** test the zonemd check routine */
|
||||||
|
static void zonemd_check_test(void)
|
||||||
|
{
|
||||||
|
const char* zname = "example.org";
|
||||||
|
char* zfile = "testdata/zonemd.example1.zone";
|
||||||
|
int scheme = 1;
|
||||||
|
int hashalgo = 2;
|
||||||
|
const char* digest = "20564D10F50A0CEBEC856C64032B7DFB53D3C449A421A5BC7A21F7627B4ACEA4DF29F2C6FE82ED9C23ADF6F4D420D5DD63EF6E6349D60FDAB910B65DF8D481B7";
|
||||||
|
const char* digestwrong = "20564D10F50A0CEBEC856C64032B7DFB53D3C449A421A5BC7A21F7627B4ACEA4DF29F2C6FE82ED9C23ADF6F4D420D5DD63EF6E6349D60FDAB910B65DF8D48100";
|
||||||
|
uint8_t hash[512], hashwrong[512];
|
||||||
|
size_t hashlen = 0, hashwronglen = 0;
|
||||||
|
struct auth_zones* az;
|
||||||
|
struct auth_zone* z;
|
||||||
|
int result;
|
||||||
|
struct regional* region = NULL;
|
||||||
|
struct sldns_buffer* buf = NULL;
|
||||||
|
char* reason = NULL;
|
||||||
|
|
||||||
|
if(!zonemd_hashalgo_supported(hashalgo))
|
||||||
|
return; /* cannot test unsupported algo */
|
||||||
|
unit_show_func("services/authzone.c", "auth_zone_generate_zonemd_check");
|
||||||
|
|
||||||
|
/* setup environment */
|
||||||
|
az = auth_zones_create();
|
||||||
|
unit_assert(az);
|
||||||
|
region = regional_create();
|
||||||
|
unit_assert(region);
|
||||||
|
buf = sldns_buffer_new(65535);
|
||||||
|
unit_assert(buf);
|
||||||
|
|
||||||
|
/* read file */
|
||||||
|
z = authtest_addzone(az, zname, zfile);
|
||||||
|
unit_assert(z);
|
||||||
|
hashlen = sizeof(hash);
|
||||||
|
if(sldns_str2wire_hex_buf(digest, hash, &hashlen) != 0) {
|
||||||
|
unit_assert(0); /* parse failure */
|
||||||
|
}
|
||||||
|
hashwronglen = sizeof(hashwrong);
|
||||||
|
if(sldns_str2wire_hex_buf(digestwrong, hashwrong, &hashwronglen) != 0) {
|
||||||
|
unit_assert(0); /* parse failure */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check return values of the check routine */
|
||||||
|
result = auth_zone_generate_zonemd_check(z, scheme, hashalgo,
|
||||||
|
hash, hashlen, region, buf, &reason);
|
||||||
|
unit_assert(result && reason == NULL);
|
||||||
|
result = auth_zone_generate_zonemd_check(z, 241, hashalgo,
|
||||||
|
hash, hashlen, region, buf, &reason);
|
||||||
|
unit_assert(!result && strcmp(reason, "unsupported scheme")==0);
|
||||||
|
result = auth_zone_generate_zonemd_check(z, scheme, 242,
|
||||||
|
hash, hashlen, region, buf, &reason);
|
||||||
|
unit_assert(!result && strcmp(reason, "unsupported algorithm")==0);
|
||||||
|
result = auth_zone_generate_zonemd_check(z, scheme, hashalgo,
|
||||||
|
hash, 2, region, buf, &reason);
|
||||||
|
unit_assert(!result && strcmp(reason, "digest length too small, less than 12")==0);
|
||||||
|
result = auth_zone_generate_zonemd_check(z, scheme, hashalgo,
|
||||||
|
hashwrong, hashwronglen, region, buf, &reason);
|
||||||
|
unit_assert(!result && strcmp(reason, "incorrect digest")==0);
|
||||||
|
result = auth_zone_generate_zonemd_check(z, scheme, hashalgo,
|
||||||
|
hashwrong, hashwronglen-3, region, buf, &reason);
|
||||||
|
unit_assert(!result && strcmp(reason, "incorrect digest length")==0);
|
||||||
|
|
||||||
|
/* delete environment */
|
||||||
|
auth_zones_delete(az);
|
||||||
|
regional_destroy(region);
|
||||||
|
sldns_buffer_free(buf);
|
||||||
|
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** zonemd test verify */
|
||||||
|
static void zonemd_verify_test(char* zname, char* zfile, char* tastr,
|
||||||
|
char* date_override, char* result_wanted)
|
||||||
|
{
|
||||||
|
time_t now = 0;
|
||||||
|
struct module_stack mods;
|
||||||
|
struct module_env env;
|
||||||
|
char* result = NULL;
|
||||||
|
struct auth_zone* z;
|
||||||
|
|
||||||
|
/* setup test harness */
|
||||||
|
memset(&mods, 0, sizeof(mods));
|
||||||
|
memset(&env, 0, sizeof(env));
|
||||||
|
env.scratch = regional_create();
|
||||||
|
if(!env.scratch)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
env.scratch_buffer = sldns_buffer_new(65553);
|
||||||
|
if(!env.scratch_buffer)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
env.cfg = config_create();
|
||||||
|
if(!env.cfg)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
env.now = &now;
|
||||||
|
env.cfg->val_date_override = cfg_convert_timeval(date_override);
|
||||||
|
if(!env.cfg->val_date_override)
|
||||||
|
fatal_exit("could not parse datetime %s", date_override);
|
||||||
|
if(env.cfg->module_conf)
|
||||||
|
free(env.cfg->module_conf);
|
||||||
|
env.cfg->module_conf = strdup("validator iterator");
|
||||||
|
if(!env.cfg->module_conf)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
if(tastr) {
|
||||||
|
if(!cfg_strlist_insert(&env.cfg->trust_anchor_list,
|
||||||
|
strdup(tastr)))
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
}
|
||||||
|
env.anchors = anchors_create();
|
||||||
|
if(!env.anchors)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
env.auth_zones = auth_zones_create();
|
||||||
|
if(!env.auth_zones)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
modstack_init(&mods);
|
||||||
|
if(!modstack_setup(&mods, env.cfg->module_conf, &env))
|
||||||
|
fatal_exit("could not modstack_setup");
|
||||||
|
env.mesh = mesh_create(&mods, &env);
|
||||||
|
if(!env.mesh)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
|
||||||
|
/* load data */
|
||||||
|
z = authtest_addzone(env.auth_zones, zname, zfile);
|
||||||
|
if(!z)
|
||||||
|
fatal_exit("could not addzone %s %s", zname, zfile);
|
||||||
|
|
||||||
|
/* test */
|
||||||
|
lock_rw_wrlock(&z->lock);
|
||||||
|
auth_zone_verify_zonemd(z, &env, &mods, &result, 1, 0);
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
printf("auth zone %s: ZONEMD verification %s: %s\n", zname,
|
||||||
|
(strcmp(result, "ZONEMD verification successful")==0?"successful":"failed"),
|
||||||
|
result);
|
||||||
|
}
|
||||||
|
if(!result)
|
||||||
|
fatal_exit("out of memory");
|
||||||
|
unit_assert(strcmp(result, result_wanted) == 0);
|
||||||
|
if(strcmp(result, "ZONEMD verification successful") == 0 ||
|
||||||
|
strcmp(result, "DNSSEC verified nonexistence of ZONEMD") == 0 ||
|
||||||
|
strcmp(result, "no ZONEMD present") == 0) {
|
||||||
|
lock_rw_rdlock(&z->lock);
|
||||||
|
unit_assert(!z->zone_expired);
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
} else {
|
||||||
|
lock_rw_rdlock(&z->lock);
|
||||||
|
unit_assert(z->zone_expired);
|
||||||
|
lock_rw_unlock(&z->lock);
|
||||||
|
}
|
||||||
|
free(result);
|
||||||
|
|
||||||
|
/* desetup test harness */
|
||||||
|
mesh_delete(env.mesh);
|
||||||
|
modstack_desetup(&mods, &env);
|
||||||
|
auth_zones_delete(env.auth_zones);
|
||||||
|
anchors_delete(env.anchors);
|
||||||
|
config_delete(env.cfg);
|
||||||
|
regional_destroy(env.scratch);
|
||||||
|
sldns_buffer_free(env.scratch_buffer);
|
||||||
|
|
||||||
|
if(verbosity >= VERB_ALGO) {
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** zonemd test verify suite */
|
||||||
|
static void zonemd_verify_tests(void)
|
||||||
|
{
|
||||||
|
unit_show_func("services/authzone.c", "auth_zone_verify_zonemd");
|
||||||
|
/* give trustanchor for unsigned zone, should fail */
|
||||||
|
zonemd_verify_test("example.org",
|
||||||
|
"testdata/zonemd.example1.zone",
|
||||||
|
"example.org. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20180302005009",
|
||||||
|
"verify DNSKEY RRset with trust anchor failed: have trust anchor, but zone has no DNSKEY");
|
||||||
|
/* unsigned zone without ZONEMD in it */
|
||||||
|
zonemd_verify_test("example.org",
|
||||||
|
"testdata/zonemd.example1.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"no ZONEMD present");
|
||||||
|
/* no trust anchor, so it succeeds for zone with a correct ZONEMD */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example2.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
/* trust anchor for another zone, so it is indeterminate */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example2.zone",
|
||||||
|
"example.org. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
|
||||||
|
/* load a DNSSEC signed zone, but no trust anchor */
|
||||||
|
/* this zonefile has an incorrect ZONEMD digest, with correct
|
||||||
|
* DNSSEC signature. */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example3.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"incorrect digest");
|
||||||
|
/* load a DNSSEC zone with NSEC3, but no trust anchor */
|
||||||
|
/* this zonefile has an incorrect ZONEMD digest, with correct
|
||||||
|
* DNSSEC signature. */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example4.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"incorrect digest");
|
||||||
|
/* valid zonemd, in dnssec signed zone, no trust anchor*/
|
||||||
|
/* this zonefile has a correct ZONEMD digest and
|
||||||
|
* correct DNSSEC signature */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example5.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
/* valid zonemd, in dnssec NSEC3 zone, no trust anchor*/
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example6.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
|
||||||
|
/* load a DNSSEC signed zone with a trust anchor, valid ZONEMD */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example5.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
/* load a DNSSEC NSEC3 signed zone with a trust anchor, valid ZONEMD */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example6.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
|
||||||
|
/* load a DNSSEC NSEC zone without ZONEMD */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example7.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verified nonexistence of ZONEMD");
|
||||||
|
/* load a DNSSEC NSEC3 zone without ZONEMD */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example8.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verified nonexistence of ZONEMD");
|
||||||
|
|
||||||
|
/* load DNSSEC zone but RRSIG on ZONEMD is wrong */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example9.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verify failed for ZONEMD RRset: signature crypto failed");
|
||||||
|
/* load DNSSEC zone but RRSIG on SOA is wrong */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example10.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verify failed for SOA RRset: signature crypto failed");
|
||||||
|
|
||||||
|
/* load DNSSEC zone without ZONEMD, but NSEC bitmap says it exists */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example11.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC NSEC bitmap says type ZONEMD exists");
|
||||||
|
/* load DNSSEC zone without ZONEMD, but NSEC3 bitmap says it exists */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example12.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC NSEC3 bitmap says type ZONEMD exists");
|
||||||
|
|
||||||
|
/* load DNSSEC zone without ZONEMD, but RRSIG on NSEC not okay */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example13.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verify failed for NSEC RRset: signature crypto failed");
|
||||||
|
/* load DNSSEC zone without ZONEMD, but RRSIG on NSEC3 not okay */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example14.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"DNSSEC verify failed for NSEC3 RRset: signature crypto failed");
|
||||||
|
|
||||||
|
/* load DNSSEC zone, with ZONEMD, but DNSKEY RRSIG is not okay. */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example15.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"verify DNSKEY RRset with trust anchor failed: signature crypto failed");
|
||||||
|
/* load DNSSEC zone, but trust anchor mismatches DNSKEY */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example5.zone",
|
||||||
|
/* okay anchor is
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af", */
|
||||||
|
"example.com. IN DS 55566 8 2 0000000000111111222223333444444dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
"20201020135527",
|
||||||
|
"verify DNSKEY RRset with trust anchor failed: DS hash mismatches key");
|
||||||
|
/* load DNSSEC zone, but trust anchor fails because the zone
|
||||||
|
* has expired signatures. We set the date for it */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example5.zone",
|
||||||
|
"example.com. IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af",
|
||||||
|
/* okay date: "20201020135527", */
|
||||||
|
"20221020135527",
|
||||||
|
"verify DNSKEY RRset with trust anchor failed: signature expired");
|
||||||
|
|
||||||
|
/* duplicate zonemd with same scheme and algorithm */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example16.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD RRSet contains more than one RR with the same scheme and hash algorithm");
|
||||||
|
/* different capitalisation of ns name and owner names, should
|
||||||
|
* be canonicalized. */
|
||||||
|
zonemd_verify_test("example.com",
|
||||||
|
"testdata/zonemd.example17.zone",
|
||||||
|
NULL,
|
||||||
|
"20180302005009",
|
||||||
|
"ZONEMD verification successful");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** zonemd unit tests */
|
||||||
|
void zonemd_test(void)
|
||||||
|
{
|
||||||
|
unit_show_feature("zonemd");
|
||||||
|
zonemd_generate_tests();
|
||||||
|
zonemd_check_test();
|
||||||
|
zonemd_verify_tests();
|
||||||
|
}
|
||||||
1
testdata/auth_zonefile_dnssec.rpl
vendored
1
testdata/auth_zonefile_dnssec.rpl
vendored
|
|
@ -5,6 +5,7 @@ server:
|
||||||
target-fetch-policy: "0 0 0 0 0"
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
fake-sha1: yes
|
fake-sha1: yes
|
||||||
trust-anchor-signaling: no
|
trust-anchor-signaling: no
|
||||||
|
zonemd-permissive-mode: yes
|
||||||
|
|
||||||
auth-zone:
|
auth-zone:
|
||||||
name: "example.com."
|
name: "example.com."
|
||||||
|
|
|
||||||
158
testdata/auth_zonefile_down.rpl
vendored
158
testdata/auth_zonefile_down.rpl
vendored
|
|
@ -1,6 +1,13 @@
|
||||||
; config options
|
; config options
|
||||||
server:
|
server:
|
||||||
target-fetch-policy: "0 0 0 0 0"
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
; Options for signed zone. The zone is partially copied from val_negcache_nxdomain.rpl
|
||||||
|
trust-anchor: "testzone.nlnetlabs.nl. IN DS 2926 8 2 6f8512d1e82eecbd684fc4a76f39f8c5b411af385494873bdead663ddb78a88b"
|
||||||
|
val-override-date: "20180213111425"
|
||||||
|
qname-minimisation: "no"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
aggressive-nsec: yes
|
||||||
|
zonemd-permissive-mode: yes
|
||||||
|
|
||||||
auth-zone:
|
auth-zone:
|
||||||
name: "example.com."
|
name: "example.com."
|
||||||
|
|
@ -41,6 +48,50 @@ ns1 3600 IN A 1.2.3.4
|
||||||
ns2 3600 IN AAAA ::2
|
ns2 3600 IN AAAA ::2
|
||||||
TEMPFILE_END
|
TEMPFILE_END
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "soa.high.com."
|
||||||
|
for-downstream: yes
|
||||||
|
for-upstream: no
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME soa.high.com
|
||||||
|
TEMPFILE_CONTENTS soa.high.com
|
||||||
|
$ORIGIN high.com.
|
||||||
|
soa 500 IN SOA dns.example.de. hostmaster.dns.example.de. (
|
||||||
|
1379078166 28800 7200 604800 200 )
|
||||||
|
3600 IN NS ns1.example.com.
|
||||||
|
3600 IN NS ns2.example.com.
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "soa.low.com."
|
||||||
|
for-downstream: yes
|
||||||
|
for-upstream: no
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME soa.low.com
|
||||||
|
TEMPFILE_CONTENTS soa.low.com
|
||||||
|
$ORIGIN low.com.
|
||||||
|
soa 200 IN SOA dns.example.de. hostmaster.dns.example.de. (
|
||||||
|
1379078166 28800 7200 604800 500 )
|
||||||
|
3600 IN NS ns1.example.com.
|
||||||
|
3600 IN NS ns2.example.com.
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "testzone.nlnetlabs.nl."
|
||||||
|
for-downstream: yes
|
||||||
|
for-upstream: no
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME testzone.nlnetlabs.nl
|
||||||
|
TEMPFILE_CONTENTS testzone.nlnetlabs.nl
|
||||||
|
$ORIGIN testzone.nlnetlabs.nl.
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN NSEC alligator.testzone.nlnetlabs.nl. NS SOA RRSIG NSEC DNSKEY
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN RRSIG NSEC 8 3 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. gTKn6U1nal9oA79IRxLa/7zexl6A0yJZzeEGBbZ5rh5feyAr2X4LTR9bPCgcHeMVggf4FP+kD1L/sxzj/YLwB1ZKGKlwnzsHtPFTlmvDClaqQ76DRZq5Vejr2ZfnclBUb2vtxaXywTRW8oueaaq9flcShEQ/cQ+KRU8sc344qd0=
|
||||||
|
alligator.testzone.nlnetlabs.nl. 3600 IN NSEC cheetah.testzone.nlnetlabs.nl. TXT RRSIG NSEC
|
||||||
|
alligator.testzone.nlnetlabs.nl. 3600 IN RRSIG NSEC 8 4 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. QAgQ0AsMoYG02+VPfoOctSPlTHdQOkQt5fFkSkzIbVhUzNOqa+dB/Qkc81AwFeJosA+PvYjt6utcVkIWmK2Djy9eXC49gILtVF79vUe4G7ZrybO5NXjqNa5ANoUGM+yew4wkjeNOMVAsvs+1kvFY7S8RAa/0AIYlZHQ8vNBPNaI=
|
||||||
|
testzone.nlnetlabs.nl. 4600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 1 14400 3600 604800 3600
|
||||||
|
testzone.nlnetlabs.nl. 4600 IN RRSIG SOA 8 3 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. GhmXNFQktZIgaBpGKwj9Q2mfq5+jcbRPK+PPgtRVicUPZga/d/iGEL8PV/8DzGwkaZbM14pamSUMgdJibW4zNhLz/ukjPilbjoj6giH1jtbdZLAQ6iK9pZ/4jKUEq4txviTczZNnDeolgPEEl4xo4NclQmi7zj1XBlQRbjvG0/0=
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
stub-zone:
|
stub-zone:
|
||||||
name: "."
|
name: "."
|
||||||
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
|
@ -50,7 +101,7 @@ SCENARIO_BEGIN Test authority zone with zonefile for downstream responses
|
||||||
|
|
||||||
; K.ROOT-SERVERS.NET.
|
; K.ROOT-SERVERS.NET.
|
||||||
RANGE_BEGIN 0 100
|
RANGE_BEGIN 0 100
|
||||||
ADDRESS 193.0.14.129
|
ADDRESS 193.0.14.129
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH opcode qtype qname
|
MATCH opcode qtype qname
|
||||||
ADJUST copy_id
|
ADJUST copy_id
|
||||||
|
|
@ -182,4 +233,109 @@ SECTION ANSWER
|
||||||
www.example.com. IN A 1.2.3.4
|
www.example.com. IN A 1.2.3.4
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
|
|
||||||
|
; check SOA TTL to be the minimum of the SOA.minimum and the SOA TTL
|
||||||
|
STEP 30 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
nonexistent.soa.high.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
STEP 31 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD RA AA NXDOMAIN
|
||||||
|
SECTION QUESTION
|
||||||
|
nonexistent.soa.high.com IN A
|
||||||
|
SECTION AUTHORITY
|
||||||
|
soa.high.com. 200 IN SOA dns.example.de. hostmaster.dns.example.de. 1379078166 28800 7200 604800 200
|
||||||
|
ENTRY_END
|
||||||
|
; check that the original SOA is also returned
|
||||||
|
STEP 32 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
soa.high.com. IN SOA
|
||||||
|
ENTRY_END
|
||||||
|
STEP 33 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD RA AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
soa.high.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
soa.high.com. 500 IN SOA dns.example.de. hostmaster.dns.example.de. 1379078166 28800 7200 604800 200
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; check SOA TTL to be the minimum of the SOA.minimum and the SOA TTL
|
||||||
|
STEP 40 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
nonexistent.soa.low.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
STEP 41 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD RA AA NXDOMAIN
|
||||||
|
SECTION QUESTION
|
||||||
|
nonexistent.soa.low.com. IN A
|
||||||
|
SECTION AUTHORITY
|
||||||
|
soa.low.com. 200 IN SOA dns.example.de. hostmaster.dns.example.de. 1379078166 28800 7200 604800 500
|
||||||
|
ENTRY_END
|
||||||
|
; check that the original SOA is also returned
|
||||||
|
STEP 42 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
soa.low.com. IN SOA
|
||||||
|
ENTRY_END
|
||||||
|
STEP 43 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD RA AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
soa.low.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
soa.low.com. 200 IN SOA dns.example.de. hostmaster.dns.example.de. 1379078166 28800 7200 604800 500
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; check SOA TTL to be minimum of the SOA.minimum and the SOA TTL for DNSSEC
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD DO
|
||||||
|
SECTION QUESTION
|
||||||
|
ant.testzone.nlnetlabs.nl. IN A
|
||||||
|
ENTRY_END
|
||||||
|
STEP 51 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD DO RA AA NXDOMAIN
|
||||||
|
SECTION QUESTION
|
||||||
|
ant.testzone.nlnetlabs.nl. IN A
|
||||||
|
SECTION AUTHORITY
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 1 14400 3600 604800 3600
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN RRSIG SOA 8 3 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. GhmXNFQktZIgaBpGKwj9Q2mfq5+jcbRPK+PPgtRVicUPZga/d/iGEL8PV/8DzGwkaZbM14pamSUMgdJibW4zNhLz/ukjPilbjoj6giH1jtbdZLAQ6iK9pZ/4jKUEq4txviTczZNnDeolgPEEl4xo4NclQmi7zj1XBlQRbjvG0/0=
|
||||||
|
alligator.testzone.nlnetlabs.nl. 3600 IN NSEC cheetah.testzone.nlnetlabs.nl. TXT RRSIG NSEC
|
||||||
|
alligator.testzone.nlnetlabs.nl. 3600 IN RRSIG NSEC 8 4 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. QAgQ0AsMoYG02+VPfoOctSPlTHdQOkQt5fFkSkzIbVhUzNOqa+dB/Qkc81AwFeJosA+PvYjt6utcVkIWmK2Djy9eXC49gILtVF79vUe4G7ZrybO5NXjqNa5ANoUGM+yew4wkjeNOMVAsvs+1kvFY7S8RAa/0AIYlZHQ8vNBPNaI=
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN NSEC alligator.testzone.nlnetlabs.nl. NS SOA RRSIG NSEC DNSKEY
|
||||||
|
testzone.nlnetlabs.nl. 3600 IN RRSIG NSEC 8 3 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. gTKn6U1nal9oA79IRxLa/7zexl6A0yJZzeEGBbZ5rh5feyAr2X4LTR9bPCgcHeMVggf4FP+kD1L/sxzj/YLwB1ZKGKlwnzsHtPFTlmvDClaqQ76DRZq5Vejr2ZfnclBUb2vtxaXywTRW8oueaaq9flcShEQ/cQ+KRU8sc344qd0=
|
||||||
|
ENTRY_END
|
||||||
|
; check that the original SOA is also returned
|
||||||
|
STEP 52 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD DO
|
||||||
|
SECTION QUESTION
|
||||||
|
testzone.nlnetlabs.nl. IN SOA
|
||||||
|
ENTRY_END
|
||||||
|
STEP 53 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD DO RA AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
testzone.nlnetlabs.nl. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
testzone.nlnetlabs.nl. 4600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 1 14400 3600 604800 3600
|
||||||
|
testzone.nlnetlabs.nl. 4600 IN RRSIG SOA 8 3 3600 20180313102201 20180213102201 44940 testzone.nlnetlabs.nl. GhmXNFQktZIgaBpGKwj9Q2mfq5+jcbRPK+PPgtRVicUPZga/d/iGEL8PV/8DzGwkaZbM14pamSUMgdJibW4zNhLz/ukjPilbjoj6giH1jtbdZLAQ6iK9pZ/4jKUEq4txviTczZNnDeolgPEEl4xo4NclQmi7zj1XBlQRbjvG0/0=
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
SCENARIO_END
|
SCENARIO_END
|
||||||
|
|
|
||||||
233
testdata/auth_zonemd_anchor.rpl
vendored
Normal file
233
testdata/auth_zonemd_anchor.rpl
vendored
Normal file
|
|
@ -0,0 +1,233 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "example.com. DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile with trust anchor
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
235
testdata/auth_zonemd_anchor_fail.rpl
vendored
Normal file
235
testdata/auth_zonemd_anchor_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,235 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
; correct anchor
|
||||||
|
; trust-anchor: "example.com. DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af"
|
||||||
|
; wrong anchor
|
||||||
|
trust-anchor: "example.com. DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deeaaaaa"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile with failed trust anchor
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
233
testdata/auth_zonemd_chain.rpl
vendored
Normal file
233
testdata/auth_zonemd_chain.rpl
vendored
Normal file
|
|
@ -0,0 +1,233 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile with chain of trust
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
235
testdata/auth_zonemd_chain_fail.rpl
vendored
Normal file
235
testdata/auth_zonemd_chain_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,235 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
; dnskey is wrong:
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+AAAAA ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
; dnskey that was correct:
|
||||||
|
;example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile with failed chain of trust
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
182
testdata/auth_zonemd_file.rpl
vendored
Normal file
182
testdata/auth_zonemd_file.rpl
vendored
Normal file
|
|
@ -0,0 +1,182 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
184
testdata/auth_zonemd_file_fail.rpl
vendored
Normal file
184
testdata/auth_zonemd_file_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,184 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; good zonemd
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
; wrong zonemd
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D7AAAAA
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD failure from zonefile
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
214
testdata/auth_zonemd_insecure.rpl
vendored
Normal file
214
testdata/auth_zonemd_insecure.rpl
vendored
Normal file
|
|
@ -0,0 +1,214 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD that is securely insecure
|
||||||
|
; the trust anchor finds an online delegation with an insecure DS referral.
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION AUTHORITY
|
||||||
|
com. SOA a.gtld-servers.net. nstld.verisign-grs.com. 1603979208 1800 900 604800 86400
|
||||||
|
com. 3600 IN RRSIG SOA 8 1 3600 20201116135527 20201019135527 1444 com. LTUZ8PlkMLX+dBZLGcJcahrzOgf1PgYbi/s5VKyR9iyYKeP6qdxO5VehUVHdXfmUiXrsszvhAHzo4AZnfRbDkK6uTfMKCSIB1aXOU4A74LpjhJBsXjyo3CN3IK/dMS/FpJfAb6JnuQV1E3ytDd34yNsoBazEjYeoN1kymGAttbM=
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
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.
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
216
testdata/auth_zonemd_insecure_absent.rpl
vendored
Normal file
216
testdata/auth_zonemd_insecure_absent.rpl
vendored
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; the missing ZONEMD record
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with absent ZONEMD that is securely insecure
|
||||||
|
; the trust anchor finds an online delegation with an insecure DS referral.
|
||||||
|
; the ZONEMD is not there.
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION AUTHORITY
|
||||||
|
com. SOA a.gtld-servers.net. nstld.verisign-grs.com. 1603979208 1800 900 604800 86400
|
||||||
|
com. 3600 IN RRSIG SOA 8 1 3600 20201116135527 20201019135527 1444 com. LTUZ8PlkMLX+dBZLGcJcahrzOgf1PgYbi/s5VKyR9iyYKeP6qdxO5VehUVHdXfmUiXrsszvhAHzo4AZnfRbDkK6uTfMKCSIB1aXOU4A74LpjhJBsXjyo3CN3IK/dMS/FpJfAb6JnuQV1E3ytDd34yNsoBazEjYeoN1kymGAttbM=
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
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.
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
217
testdata/auth_zonemd_insecure_absent_reject.rpl
vendored
Normal file
217
testdata/auth_zonemd_insecure_absent_reject.rpl
vendored
Normal file
|
|
@ -0,0 +1,217 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
zonemd-reject-absence: yes
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; the missing ZONEMD record
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with reject-absence ZONEMD that is securely insecure
|
||||||
|
; the trust anchor finds an online delegation with an insecure DS referral.
|
||||||
|
; the ZONEMD is not there. This is not allowed by the zonemd-reject-absence
|
||||||
|
; option in config, so it fails the zone.
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION AUTHORITY
|
||||||
|
com. SOA a.gtld-servers.net. nstld.verisign-grs.com. 1603979208 1800 900 604800 86400
|
||||||
|
com. 3600 IN RRSIG SOA 8 1 3600 20201116135527 20201019135527 1444 com. LTUZ8PlkMLX+dBZLGcJcahrzOgf1PgYbi/s5VKyR9iyYKeP6qdxO5VehUVHdXfmUiXrsszvhAHzo4AZnfRbDkK6uTfMKCSIB1aXOU4A74LpjhJBsXjyo3CN3IK/dMS/FpJfAb6JnuQV1E3ytDd34yNsoBazEjYeoN1kymGAttbM=
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
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.
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
217
testdata/auth_zonemd_insecure_fail.rpl
vendored
Normal file
217
testdata/auth_zonemd_insecure_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,217 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; correct ZONEMD
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
; wrong ZONEMD
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D7AAAAA
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD fail that is securely insecure
|
||||||
|
; the trust anchor finds an online delegation with an insecure DS referral.
|
||||||
|
; the ZONEMD is wrong, eg. the hash does not match the zone data.
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION AUTHORITY
|
||||||
|
com. SOA a.gtld-servers.net. nstld.verisign-grs.com. 1603979208 1800 900 604800 86400
|
||||||
|
com. 3600 IN RRSIG SOA 8 1 3600 20201116135527 20201019135527 1444 com. LTUZ8PlkMLX+dBZLGcJcahrzOgf1PgYbi/s5VKyR9iyYKeP6qdxO5VehUVHdXfmUiXrsszvhAHzo4AZnfRbDkK6uTfMKCSIB1aXOU4A74LpjhJBsXjyo3CN3IK/dMS/FpJfAb6JnuQV1E3ytDd34yNsoBazEjYeoN1kymGAttbM=
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
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.
|
||||||
|
example.com. IN NSEC foo.com. NS RRSIG
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 1444 com. KK6ci3DUnGJ9gaBBqS+71TiFBGcl51YLZAYGADDWuSgFOLLbh1nV//la08zE1i8ITQjjsqyRw7/MA8LWpPR3TnUjJLk6mBd/kB3dJ8BHWRqcyreFo6Pu383oCcXTpwkFcL4ulhp54LUxbA3arWVjWbx8815vvNKsEtWUyrz4LN8=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
211
testdata/auth_zonemd_nokey.rpl
vendored
Normal file
211
testdata/auth_zonemd_nokey.rpl
vendored
Normal file
|
|
@ -0,0 +1,211 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with ZONEMD that lacks a DNSKEY
|
||||||
|
; the zone has no DNSSEC, but the trust anchor requires it.
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
186
testdata/auth_zonemd_permissive_mode.rpl
vendored
Normal file
186
testdata/auth_zonemd_permissive_mode.rpl
vendored
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
zonemd-permissive-mode: yes
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: no
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; good zonemd
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
; wrong zonemd
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D7AAAAA
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test zonemd permissive mode
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
237
testdata/auth_zonemd_xfr.rpl
vendored
Normal file
237
testdata/auth_zonemd_xfr.rpl
vendored
Normal file
|
|
@ -0,0 +1,237 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
284
testdata/auth_zonemd_xfr_anchor.rpl
vendored
Normal file
284
testdata/auth_zonemd_xfr_anchor.rpl
vendored
Normal file
|
|
@ -0,0 +1,284 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "example.com. DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD with trust anchor
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY ZONEMD
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN ZONEMD 200154054 1 2 58F7620F93204BBB31B44F795B3409CC4ABD9EF5601DECC15675BD7751213152984EDDCE0626E6062E744B03B3E47711202FBB79E4A2EB8BC5CF46741B5CAE6F
|
||||||
|
example.com. 3600 IN RRSIG ZONEMD 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
265
testdata/auth_zonemd_xfr_anchor_fail.rpl
vendored
Normal file
265
testdata/auth_zonemd_xfr_anchor_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,265 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "example.com. DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD fail with trust anchor
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOTIMPL
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN IXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
; this is the bad RR that causes the wrong zonemd. RRSIG is wrong too.
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.55
|
||||||
|
; orig RR
|
||||||
|
;bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
309
testdata/auth_zonemd_xfr_chain.rpl
vendored
Normal file
309
testdata/auth_zonemd_xfr_chain.rpl
vendored
Normal file
|
|
@ -0,0 +1,309 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD with chain of trust
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY ZONEMD
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN ZONEMD 200154054 1 2 58F7620F93204BBB31B44F795B3409CC4ABD9EF5601DECC15675BD7751213152984EDDCE0626E6062E744B03B3E47711202FBB79E4A2EB8BC5CF46741B5CAE6F
|
||||||
|
example.com. 3600 IN RRSIG ZONEMD 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
320
testdata/auth_zonemd_xfr_chain_fail.rpl
vendored
Normal file
320
testdata/auth_zonemd_xfr_chain_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,320 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
trust-anchor: "com. DS 1444 8 2 0d72034e3e18a9ef383c164b68302433bbde957616e10cf44575fea2abae469c"
|
||||||
|
trust-anchor-signaling: no
|
||||||
|
val-override-date: 20201020135527
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD failure with chain of trust
|
||||||
|
|
||||||
|
; 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 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 qname qtype
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN DS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
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.
|
||||||
|
example.com. 3600 IN DS 55566 8 2 9c148338951ce1c3b5cd3da532f3d90dfcf92595148022f2c2fd98e5deee90af
|
||||||
|
example.com. 3600 IN RRSIG DS 8 2 3600 20201116135527 20201019135527 1444 com. BpV1M171SSkbdlGawwweJwQ0W+aNaCrgkt2QTsxCvbo1acR5i3AKm4REOUzo4I36lRx26mYkF9Topkeu0aFmov7P2uUhCxk4faFK7k87k97FAqZaDGp/K9b3YCfiwJBc5pJSUW0ndU/Ve5zAh/wL493RMSC7LwJr5JjV0NxydFk=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
com. IN DNSKEY
|
||||||
|
SECTION ANSWER
|
||||||
|
com. 3600 IN DNSKEY 257 3 8 AwEAAbd9WqjzE2Pynz21OG5doSf9hFzMr5dhzz2waZ3vTa+0o5r7AjTAqmA1yH/B3+aAMihUm5ucZSfVqo7+kOaRE8yFj9aivOmA1n1+JLevJq/oyvQyjxQN2Qb89LyaNUT5oKZIiL+uyyhNW3KDR3SSbQ/GBwQNDHVcZi+JDR3RC0r7 ;{id = 1444 (ksk), size = 1024b}
|
||||||
|
com. 3600 IN RRSIG DNSKEY 8 1 3600 20201116135527 20201019135527 1444 com. BEOMfWvi6RgnHaHsst+Ed265hBuCkgMR7gDpu89J7ZrVL6DzMKnNVFdgjl/9xwLj/pkukc7qeLSHjAfLlN0E4THW7PVshscQnjvXCkktG2Ejx9fTyllAqeGDh9z9QDGlQZIGTMgb9413qZhNqe2Tda9PTJRpiZ8b4bdQp6V1kVo=
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOTIMPL
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN IXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
; this is the bad RR that causes the wrong zonemd. RRSIG is wrong too.
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.55
|
||||||
|
; orig RR
|
||||||
|
;bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY ZONEMD
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN ZONEMD 200154054 1 2 58F7620F93204BBB31B44F795B3409CC4ABD9EF5601DECC15675BD7751213152984EDDCE0626E6062E744B03B3E47711202FBB79E4A2EB8BC5CF46741B5CAE6F
|
||||||
|
example.com. 3600 IN RRSIG ZONEMD 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.55
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
240
testdata/auth_zonemd_xfr_fail.rpl
vendored
Normal file
240
testdata/auth_zonemd_xfr_fail.rpl
vendored
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
|
||||||
|
auth-zone:
|
||||||
|
name: "example.com."
|
||||||
|
## zonefile (or none).
|
||||||
|
## zonefile: "example.com.zone"
|
||||||
|
## master by IP address or hostname
|
||||||
|
## can list multiple masters, each on one line.
|
||||||
|
## master:
|
||||||
|
master: 1.2.3.44
|
||||||
|
## url for http fetch
|
||||||
|
## url:
|
||||||
|
## queries from downstream clients get authoritative answers.
|
||||||
|
## for-downstream: yes
|
||||||
|
for-downstream: yes
|
||||||
|
## queries are used to fetch authoritative answers from this zone,
|
||||||
|
## instead of unbound itself sending queries there.
|
||||||
|
## for-upstream: yes
|
||||||
|
for-upstream: yes
|
||||||
|
## on failures with for-upstream, fallback to sending queries to
|
||||||
|
## the authority servers
|
||||||
|
## fallback-enabled: no
|
||||||
|
|
||||||
|
## this line generates zonefile: \n"/tmp/xxx.example.com"\n
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME example.com
|
||||||
|
## this is the inline file /tmp/xxx.example.com
|
||||||
|
## the tempfiles are deleted when the testrun is over.
|
||||||
|
TEMPFILE_CONTENTS example.com
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "."
|
||||||
|
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test authority zone with AXFR with failed ZONEMD
|
||||||
|
|
||||||
|
; 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 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.44
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; ns.example.net.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 1.2.3.44
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.net. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ns.example.net. IN A 1.2.3.44
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
ns.example.net. IN AAAA
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.net. IN NS ns.example.net.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
www.example.net. IN A 1.2.3.44
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
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.net.
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
www.example.com. IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN SOA
|
||||||
|
SECTION ANSWER
|
||||||
|
; serial, refresh, retry, expire, minimum
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOTIMPL
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN IXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN AXFR
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
; old zonemd
|
||||||
|
;example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
|
||||||
|
; wrong zonemd
|
||||||
|
example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D7AAAAA
|
||||||
|
www.example.com. IN A 127.0.0.1
|
||||||
|
ns.example.com. IN A 127.0.0.1
|
||||||
|
bar.example.com. IN A 1.2.3.4
|
||||||
|
ding.example.com. IN A 1.2.3.4
|
||||||
|
foo.example.com. IN A 1.2.3.4
|
||||||
|
example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 TIME_PASSES ELAPSE 10
|
||||||
|
STEP 40 TRAFFIC
|
||||||
|
|
||||||
|
STEP 50 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; recursion happens here.
|
||||||
|
STEP 60 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR AA RD RA SERVFAIL
|
||||||
|
SECTION QUESTION
|
||||||
|
www.example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; the zonefile was updated with new contents
|
||||||
|
STEP 70 CHECK_TEMPFILE example.com
|
||||||
|
FILE_BEGIN
|
||||||
|
FILE_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
6
testdata/fwd_ancil.tdir/fwd_ancil.post
vendored
6
testdata/fwd_ancil.tdir/fwd_ancil.post
vendored
|
|
@ -14,5 +14,9 @@ fi
|
||||||
kill_pid $FWD_PID
|
kill_pid $FWD_PID
|
||||||
if fgrep "service stopped" unbound.log; then
|
if fgrep "service stopped" unbound.log; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
if fgrep "disable interface-automatic" unbound.log; then
|
||||||
|
echo "skip test"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
kill_pid $UNBOUND_PID
|
kill_pid $UNBOUND_PID
|
||||||
|
|
|
||||||
18
testdata/localdata.rpl
vendored
18
testdata/localdata.rpl
vendored
|
|
@ -88,12 +88,12 @@ local. IN A
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
STEP 6 CHECK_ANSWER
|
STEP 6 CHECK_ANSWER
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH all
|
MATCH all ttl
|
||||||
REPLY QR RA AA
|
REPLY QR RA AA
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
local. IN A
|
local. IN A
|
||||||
SECTION AUTHORITY
|
SECTION AUTHORITY
|
||||||
local. 3600 IN SOA nobody nobody 1 2 3 4 5
|
local. 5 IN SOA nobody nobody 1 2 3 4 5
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
|
|
||||||
; positive SOA
|
; positive SOA
|
||||||
|
|
@ -104,7 +104,7 @@ local. IN SOA
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
STEP 8 CHECK_ANSWER
|
STEP 8 CHECK_ANSWER
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH all
|
MATCH all ttl
|
||||||
REPLY QR RA AA
|
REPLY QR RA AA
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
local. IN SOA
|
local. IN SOA
|
||||||
|
|
@ -136,12 +136,12 @@ serv.local. IN MX
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
STEP 12 CHECK_ANSWER
|
STEP 12 CHECK_ANSWER
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH all
|
MATCH all ttl
|
||||||
REPLY QR RA AA
|
REPLY QR RA AA
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
serv.local. IN MX
|
serv.local. IN MX
|
||||||
SECTION AUTHORITY
|
SECTION AUTHORITY
|
||||||
local. 3600 IN SOA nobody nobody 1 2 3 4 5
|
local. 5 IN SOA nobody nobody 1 2 3 4 5
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
|
|
||||||
; no such type, empty nonterminal
|
; no such type, empty nonterminal
|
||||||
|
|
@ -152,12 +152,12 @@ bla.local. IN MX
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
STEP 14 CHECK_ANSWER
|
STEP 14 CHECK_ANSWER
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH all
|
MATCH all ttl
|
||||||
REPLY QR RA AA
|
REPLY QR RA AA
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
bla.local. IN MX
|
bla.local. IN MX
|
||||||
SECTION AUTHORITY
|
SECTION AUTHORITY
|
||||||
local. 3600 IN SOA nobody nobody 1 2 3 4 5
|
local. 5 IN SOA nobody nobody 1 2 3 4 5
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
|
|
||||||
; nxdomain with SOA
|
; nxdomain with SOA
|
||||||
|
|
@ -168,12 +168,12 @@ doing.local. IN MX
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
STEP 16 CHECK_ANSWER
|
STEP 16 CHECK_ANSWER
|
||||||
ENTRY_BEGIN
|
ENTRY_BEGIN
|
||||||
MATCH all
|
MATCH all ttl
|
||||||
REPLY QR RA AA NXDOMAIN
|
REPLY QR RA AA NXDOMAIN
|
||||||
SECTION QUESTION
|
SECTION QUESTION
|
||||||
doing.local. IN MX
|
doing.local. IN MX
|
||||||
SECTION AUTHORITY
|
SECTION AUTHORITY
|
||||||
local. 3600 IN SOA nobody nobody 1 2 3 4 5
|
local. 5 IN SOA nobody nobody 1 2 3 4 5
|
||||||
ENTRY_END
|
ENTRY_END
|
||||||
|
|
||||||
; nxdomain without SOA
|
; nxdomain without SOA
|
||||||
|
|
|
||||||
54
testdata/nsid_ascii.rpl
vendored
Normal file
54
testdata/nsid_ascii.rpl
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
nsid: "ascii_hopsa kidee"
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "example."
|
||||||
|
stub-addr: 192.0.2.1
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test EDNS string tag option
|
||||||
|
|
||||||
|
RANGE_BEGIN 0 1000
|
||||||
|
ADDRESS 192.0.2.1
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 10 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
00 03 ; Opcode NSID (3)
|
||||||
|
00 00 ; Length 0
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
00 03 ; Opcode NSID (3)
|
||||||
|
00 0b ; Length 11
|
||||||
|
68 6F 70 73 61 20 ; "hopsa "
|
||||||
|
6B 69 64 65 65 ; "kidee"
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
SCENARIO_END
|
||||||
54
testdata/nsid_hex.rpl
vendored
Normal file
54
testdata/nsid_hex.rpl
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
nsid: "0123456789abcdef"
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "example."
|
||||||
|
stub-addr: 192.0.2.1
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test EDNS string tag option
|
||||||
|
|
||||||
|
RANGE_BEGIN 0 1000
|
||||||
|
ADDRESS 192.0.2.1
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 10 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
00 03 ; Opcode NSID (3)
|
||||||
|
00 00 ; Length 0
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
00 03 ; Opcode NSID (3)
|
||||||
|
00 08 ; Length 8
|
||||||
|
01 23 45 67 ;
|
||||||
|
89 ab cd ef ;
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
SCENARIO_END
|
||||||
47
testdata/nsid_not_set.rpl
vendored
Normal file
47
testdata/nsid_not_set.rpl
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
; config options
|
||||||
|
stub-zone:
|
||||||
|
name: "example."
|
||||||
|
stub-addr: 192.0.2.1
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test EDNS string tag option
|
||||||
|
|
||||||
|
RANGE_BEGIN 0 1000
|
||||||
|
ADDRESS 192.0.2.1
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 10 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
00 03 ; Opcode NSID (3)
|
||||||
|
00 00 ; Length 0
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN A 198.51.100.1
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
HEX_EDNSDATA_BEGIN
|
||||||
|
HEX_EDNSDATA_END
|
||||||
|
ENTRY_END
|
||||||
|
SCENARIO_END
|
||||||
27
testdata/padding.tdir/padding.conf
vendored
Normal file
27
testdata/padding.tdir/padding.conf
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
server:
|
||||||
|
interface: 127.0.0.1
|
||||||
|
port: @PORT@
|
||||||
|
use-syslog: no
|
||||||
|
directory: .
|
||||||
|
pidfile: "unbound.pid"
|
||||||
|
chroot: ""
|
||||||
|
username: ""
|
||||||
|
do-not-query-localhost: no
|
||||||
|
|
||||||
|
tls-cert-bundle: "unbound_server.pem"
|
||||||
|
tls-upstream: yes
|
||||||
|
|
||||||
|
remote-control:
|
||||||
|
control-enable: yes
|
||||||
|
control-interface: 127.0.0.1
|
||||||
|
control-port: @CONTROL_PORT@
|
||||||
|
server-key-file: "unbound_server.key"
|
||||||
|
server-cert-file: "unbound_server.pem"
|
||||||
|
control-key-file: "unbound_control.key"
|
||||||
|
control-cert-file: "unbound_control.pem"
|
||||||
|
|
||||||
|
forward-zone:
|
||||||
|
name: "."
|
||||||
|
forward-addr: "127.0.0.1@@TOPORT@#unbound"
|
||||||
|
|
||||||
|
|
||||||
47
testdata/padding.tdir/padding.conf2
vendored
Normal file
47
testdata/padding.tdir/padding.conf2
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
# this is the upstream server that has pipelining and responds to queries.
|
||||||
|
server:
|
||||||
|
verbosity: 1
|
||||||
|
# num-threads: 1
|
||||||
|
interface: 127.0.0.1@@PORT@
|
||||||
|
port: @PORT@
|
||||||
|
use-syslog: no
|
||||||
|
directory: .
|
||||||
|
pidfile: "unbound2.pid"
|
||||||
|
chroot: ""
|
||||||
|
username: ""
|
||||||
|
do-not-query-localhost: no
|
||||||
|
tls-port: @PORT@
|
||||||
|
tls-service-key: "unbound_server.key"
|
||||||
|
tls-service-pem: "unbound_server.pem"
|
||||||
|
tcp-idle-timeout: 10000
|
||||||
|
log-queries: yes
|
||||||
|
log-replies: yes
|
||||||
|
log-identity: "upstream"
|
||||||
|
|
||||||
|
remote-control:
|
||||||
|
control-enable: yes
|
||||||
|
control-interface: 127.0.0.1
|
||||||
|
# control-interface: ::1
|
||||||
|
control-port: @CONTROL_PORT2@
|
||||||
|
server-key-file: "unbound_server.key"
|
||||||
|
server-cert-file: "unbound_server.pem"
|
||||||
|
control-key-file: "unbound_control.key"
|
||||||
|
control-cert-file: "unbound_control.pem"
|
||||||
|
|
||||||
|
forward-zone:
|
||||||
|
name: "."
|
||||||
|
forward-addr: "127.0.0.1@@TOPORT@"
|
||||||
|
|
||||||
|
dnstap:
|
||||||
|
dnstap-enable: yes
|
||||||
|
dnstap-socket-path: "dnstap.socket"
|
||||||
|
dnstap-send-identity: yes
|
||||||
|
dnstap-send-version: yes
|
||||||
|
#dnstap-identity
|
||||||
|
#dnstap-version
|
||||||
|
dnstap-log-resolver-query-messages: no
|
||||||
|
dnstap-log-resolver-response-messages: no
|
||||||
|
dnstap-log-client-query-messages: yes
|
||||||
|
dnstap-log-client-response-messages: yes
|
||||||
|
dnstap-log-forwarder-query-messages: no
|
||||||
|
dnstap-log-forwarder-response-messages: no
|
||||||
16
testdata/padding.tdir/padding.dsc
vendored
Normal file
16
testdata/padding.tdir/padding.dsc
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
BaseName: padding
|
||||||
|
Version: 1.0
|
||||||
|
Description: Test EDNS0 padding option (RFC7830 and RFC8467).
|
||||||
|
CreationDate: Sun Jan 24 16:41:42 CET 2021
|
||||||
|
Maintainer: Willem Toorop
|
||||||
|
Category:
|
||||||
|
Component:
|
||||||
|
CmdDepends:
|
||||||
|
Depends:
|
||||||
|
Help:
|
||||||
|
Pre: padding.pre
|
||||||
|
Post: padding.post
|
||||||
|
Test: padding.test
|
||||||
|
AuxFiles:
|
||||||
|
Passed:
|
||||||
|
Failure:
|
||||||
20
testdata/padding.tdir/padding.msgsizes
vendored
Normal file
20
testdata/padding.tdir/padding.msgsizes
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
;; MSG SIZE rcvd: 128
|
||||||
|
;; MSG SIZE rcvd: 468
|
||||||
|
;; MSG SIZE rcvd: 128
|
||||||
|
;; MSG SIZE rcvd: 936
|
||||||
|
;; MSG SIZE rcvd: 128
|
||||||
|
;; MSG SIZE rcvd: 60
|
||||||
|
;; MSG SIZE rcvd: 128
|
||||||
|
;; MSG SIZE rcvd: 502
|
||||||
|
;; MSG SIZE rcvd: 44
|
||||||
|
;; MSG SIZE rcvd: 60
|
||||||
|
;; MSG SIZE rcvd: 44
|
||||||
|
;; MSG SIZE rcvd: 502
|
||||||
|
;; MSG SIZE rcvd: 48
|
||||||
|
;; MSG SIZE rcvd: 64
|
||||||
|
;; MSG SIZE rcvd: 48
|
||||||
|
;; MSG SIZE rcvd: 512
|
||||||
|
;; MSG SIZE rcvd: 48
|
||||||
|
;; MSG SIZE rcvd: 512
|
||||||
|
;; MSG SIZE rcvd: 48
|
||||||
|
;; MSG SIZE rcvd: 512
|
||||||
23
testdata/padding.tdir/padding.post
vendored
Normal file
23
testdata/padding.tdir/padding.post
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# #-- padding.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
|
||||||
|
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_pid `cat unbound2.pid`
|
||||||
|
if test -f unbound2.log; then
|
||||||
|
echo ">>> upstream log"
|
||||||
|
cat unbound2.log
|
||||||
|
fi
|
||||||
|
#kill_pid $UNBOUND_PID
|
||||||
|
kill_pid `cat unbound.pid`
|
||||||
|
if test -f unbound.log; then
|
||||||
|
echo ">>> unbound log"
|
||||||
|
cat unbound.log
|
||||||
|
fi
|
||||||
69
testdata/padding.tdir/padding.pre
vendored
Normal file
69
testdata/padding.tdir/padding.pre
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# #-- padding.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="../.."
|
||||||
|
. ../common.sh
|
||||||
|
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||||
|
|
||||||
|
get_random_port 5
|
||||||
|
UNBOUND_PORT=$RND_PORT
|
||||||
|
UPSTREAM_PORT=$(($RND_PORT + 1))
|
||||||
|
FWD_PORT=$(($RND_PORT + 2))
|
||||||
|
CONTROL_PORT=$(($RND_PORT + 3))
|
||||||
|
CONTROL_PORT2=$(($RND_PORT + 4))
|
||||||
|
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
||||||
|
echo "UPSTREAM_PORT=$UPSTREAM_PORT" >> .tpkg.var.test
|
||||||
|
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||||
|
echo "CONTROL_PORT=$CONTROL_PORT" >> .tpkg.var.test
|
||||||
|
echo "CONTROL_PORT2=$CONTROL_PORT2" >> .tpkg.var.test
|
||||||
|
|
||||||
|
# start ldns-testnd
|
||||||
|
get_ldns_testns
|
||||||
|
$LDNS_TESTNS -p $FWD_PORT padding.testns >fwd.log 2>&1 &
|
||||||
|
FWD_PID=$!
|
||||||
|
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||||
|
|
||||||
|
# start the dnstap log server
|
||||||
|
# the -vvvv flag prints protocol and connection information from the
|
||||||
|
# unbound-dnstap-socket server.
|
||||||
|
# the -l flag prints the DNS info in the DNSTAP packet in multiline output.
|
||||||
|
# stderr is the '-vvvv' server logs and errors.
|
||||||
|
# stdout is the one-line packet logs (or with -l, multiline).
|
||||||
|
$PRE/unbound-dnstap-socket -u dnstap.socket -l -vvvv 2>tap.errlog >tap.log &
|
||||||
|
if test $? -ne 0; then
|
||||||
|
echo "could not start unbound-dnstap-socket server"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
DNSTAP_SOCKET_PID=$!
|
||||||
|
echo "DNSTAP_SOCKET_PID=$DNSTAP_SOCKET_PID" >> .tpkg.var.test
|
||||||
|
# wait for the server to go up and make the dnstap.socket file
|
||||||
|
wait_server_up "tap.errlog" "creating unix socket"
|
||||||
|
if test ! -S dnstap.socket; then
|
||||||
|
echo "the dnstap.socket file does not exist!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# make config file
|
||||||
|
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$UPSTREAM_PORT'/' -e 's/@CONTROL_PORT\@/'$CONTROL_PORT'/' < padding.conf > ub.conf
|
||||||
|
# start unbound in the background
|
||||||
|
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
||||||
|
#$PRE/unbound -d -c ub.conf 2>&1 | tee unbound.log &
|
||||||
|
UNBOUND_PID=$!
|
||||||
|
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||||
|
|
||||||
|
# make upstream config file
|
||||||
|
sed -e 's/@PORT\@/'$UPSTREAM_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's/@CONTROL_PORT2\@/'$CONTROL_PORT2'/' < padding.conf2 > ub2.conf
|
||||||
|
# start upstream unbound in the background
|
||||||
|
$PRE/unbound -d -c ub2.conf >unbound2.log 2>&1 &
|
||||||
|
#$PRE/unbound -d -c ub2.conf 2>&1 | tee unbound2.log &
|
||||||
|
UPSTREAM_PID=$!
|
||||||
|
echo "UPSTREAM_PID=$UPSTREAM_PID" >> .tpkg.var.test
|
||||||
|
|
||||||
|
wait_ldns_testns_up fwd.log
|
||||||
|
wait_unbound_up unbound.log
|
||||||
|
wait_unbound_up unbound2.log
|
||||||
|
|
||||||
|
cat .tpkg.var.test
|
||||||
|
|
||||||
170
testdata/padding.tdir/padding.test
vendored
Normal file
170
testdata/padding.tdir/padding.test
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
||||||
|
echo There we go...
|
||||||
|
|
||||||
|
# #-- padding.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
|
||||||
|
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
|
||||||
|
|
||||||
|
echo "> query www.example.com. A"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
|
||||||
|
echo "> check answer"
|
||||||
|
if grep "10.20.30.40" outfile; then
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound2.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "> wait for log to happen on timer"
|
||||||
|
sleep 3
|
||||||
|
echo "> check tap.log for dnstap info"
|
||||||
|
# see if it logged the information in tap.log
|
||||||
|
# wait for a moment for filesystem to catch up.
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "www.example.com" tap.log >/dev/null; then :; else sleep 10; fi
|
||||||
|
if grep "www.example.com" tap.log; then echo "yes it is in tap.log";
|
||||||
|
else
|
||||||
|
echo "information not in tap.log"
|
||||||
|
echo "failed"
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "> query txt.example.com. TXT"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT txt.example.com. TXT | tee outfile
|
||||||
|
echo "> check answer"
|
||||||
|
if grep "Lorem ipsum" outfile; then
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound2.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "> check tap.log for dnstap info"
|
||||||
|
# see if it logged the information in tap.log
|
||||||
|
# wait for a moment for filesystem to catch up.
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "txt.example.com" tap.log >/dev/null; then :; else sleep 10; fi
|
||||||
|
if grep "txt.example.com" tap.log; then echo "yes it is in tap.log";
|
||||||
|
else
|
||||||
|
echo "information not in tap.log"
|
||||||
|
echo "failed"
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "> flush cache entries."
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type www.example.com A
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type txt.example.com TXT
|
||||||
|
echo "> disable padding of responses."
|
||||||
|
$PRE/unbound-control -c ub2.conf set_option pad-responses: no
|
||||||
|
echo "> query www.example.com. A"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. A | tee outfile
|
||||||
|
echo "> query txt.example.com. TXT"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT txt.example.com. TXT | tee outfile
|
||||||
|
echo "> flush cache entries."
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type www.example.com A
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type txt.example.com TXT
|
||||||
|
echo "> enable padding of responses."
|
||||||
|
$PRE/unbound-control -c ub2.conf set_option pad-responses: yes
|
||||||
|
echo "> set pad responses block size to 64"
|
||||||
|
$PRE/unbound-control -c ub2.conf set_option pad-responses-block-size: 64
|
||||||
|
echo "> disable padding of queries."
|
||||||
|
$PRE/unbound-control -c ub.conf set_option pad-queries: no
|
||||||
|
echo "> query www.example.com. A"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. A | tee outfile
|
||||||
|
echo "> query txt.example.com. TXT"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT txt.example.com. TXT | tee outfile
|
||||||
|
echo "> flush cache entries."
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type www.example.com A
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type txt.example.com TXT
|
||||||
|
echo "> enable padding of queries."
|
||||||
|
$PRE/unbound-control -c ub.conf set_option pad-queries: yes
|
||||||
|
echo "> set pad queries block size to 48"
|
||||||
|
$PRE/unbound-control -c ub.conf set_option pad-queries-block-size: 48
|
||||||
|
echo "> query www.example.com. A"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. A | tee outfile
|
||||||
|
echo "> query txt.example.com. TXT"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT txt.example.com. TXT | tee outfile
|
||||||
|
echo "> flush cache entries."
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type www.example.com A
|
||||||
|
$PRE/unbound-control -c ub.conf flush_type txt.example.com TXT
|
||||||
|
echo "> set pad responses block size to 512"
|
||||||
|
$PRE/unbound-control -c ub2.conf set_option pad-responses-block-size: 512
|
||||||
|
echo "> query www.example.com. A"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. A | tee outfile
|
||||||
|
echo "> query fin.example.com. TXT"
|
||||||
|
dig @127.0.0.1 -p $UNBOUND_PORT fin.example.com. TXT | tee outfile
|
||||||
|
echo "> check tap.log for dnstap info"
|
||||||
|
# see if it logged the information in tap.log
|
||||||
|
# wait for a moment for filesystem to catch up.
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 1; fi
|
||||||
|
if grep "fini" tap.log >/dev/null; then :; else sleep 10; fi
|
||||||
|
if grep "fini" tap.log; then echo "yes it is in tap.log";
|
||||||
|
else
|
||||||
|
echo "information not in tap.log"
|
||||||
|
echo "failed"
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
grep '^;; MSG SIZE rcvd: ' tap.log > message.sizes
|
||||||
|
|
||||||
|
if diff message.sizes padding.msgsizes
|
||||||
|
then
|
||||||
|
echo "OK - Message sizes matched expected sizes"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "unexpected message sizes"
|
||||||
|
echo "failed"
|
||||||
|
echo "> cat logfiles"
|
||||||
|
cat tap.log
|
||||||
|
cat tap.errlog
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound.log
|
||||||
|
echo "Not OK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
34
testdata/padding.tdir/padding.testns
vendored
Normal file
34
testdata/padding.tdir/padding.testns
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
; nameserver test file
|
||||||
|
$ORIGIN example.com.
|
||||||
|
$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
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
ADJUST copy_id
|
||||||
|
SECTION QUESTION
|
||||||
|
txt IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
txt IN TXT "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
REPLY QR AA NOERROR
|
||||||
|
ADJUST copy_id
|
||||||
|
SECTION QUESTION
|
||||||
|
fin IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
fin IN TXT "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." "fini"
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
39
testdata/padding.tdir/unbound_control.key
vendored
Normal file
39
testdata/padding.tdir/unbound_control.key
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIG4gIBAAKCAYEAstEp+Pyh8XGrtZ77A4FhYjvbeB3dMa7Q2rGWxobzlA9przhA
|
||||||
|
1aChAvUtCOAuM+rB6NTNB8YWfZJbQHawyMNpmC77cg6vXLYCGUQHZyAqidN049RJ
|
||||||
|
F5T7j4N8Vniv17LiRdr0S6swy4PRvEnIPPV43EQHZqC5jVvHsKkhIfmBF/Dj5TXR
|
||||||
|
ypeawWV/m5jeU6/4HRYMfytBZdO1mPXuWLh0lgbQ4SCbgrOUVD3rniMk1yZIbQOm
|
||||||
|
vlDHYqekjDb/vOW2KxUQLG04aZMJ1mWfdbwG0CKQkSjISEDZ1l76vhM6mTM0fwXb
|
||||||
|
IvyFZ9yPPCle1mF5aSlxS2cmGuGVSRQaw8XF9fe3a9ACJJTr33HdSpyaZkKRAUzL
|
||||||
|
cKqLCl323daKv3NwwAT03Tj4iQM416ASMoiyfFa/2GWTKQVjddu8Crar7tGaf5xr
|
||||||
|
lig4DBmrBvdYA3njy72/RD71hLwmlRoCGU7dRuDr9O6KASUm1Ri91ONZ/qdjMvov
|
||||||
|
15l2vj4GV+KXR00dAgMBAAECggGAHepIL1N0dEQkCdpy+/8lH54L9WhpnOo2HqAf
|
||||||
|
LU9eaKK7d4jdr9+TkD8cLaPzltPrZNxVALvu/0sA4SP6J1wpyj/x6P7z73qzly5+
|
||||||
|
Xo5PD4fEwmi9YaiW/UduAblnEZrnp/AddptJKoL/D5T4XtpiQddPtael4zQ7kB57
|
||||||
|
YIexRSQTvEDovA/o3/nvA0TrzOxfgd4ycQP3iOWGN/TMzyLsvjydrUwbOB567iz9
|
||||||
|
whL3Etdgvnwh5Sz2blbFfH+nAR8ctvFFz+osPvuIVR21VMEI6wm7kTpSNnQ6sh/c
|
||||||
|
lrLb/bTADn4g7z/LpIZJ+MrLvyEcoqValrLYeFBhM9CV8woPxvkO2P3pU47HVGax
|
||||||
|
tC7GV6a/kt5RoKFd/TNdiA3OC7NGZtaeXv9VkPf4fVwBtSO9d5ZZXTGEynDD/rUQ
|
||||||
|
U4KFJe6OD23APjse08HiiKqTPhsOneOONU67iqoaTdIkT2R4EdlkVEDpXVtWb+G9
|
||||||
|
Q+IqYzVljlzuyHrhWXLJw/FMa2aBAoHBAOnZbi4gGpH+P6886WDWVgIlTccuXoyc
|
||||||
|
Mg9QQYk9UDeXxL0AizR5bZy49Sduegz9vkHpAiZARQsUnizHjZ8YlRcrmn4t6tx3
|
||||||
|
ahTIKAjdprnxJfYINM580j8CGbXvX5LhIlm3O267D0Op+co3+7Ujy+cjsIuFQrP+
|
||||||
|
1MqMgXSeBjzC1APivmps7HeFE+4w0k2PfN5wSMDNCzLo99PZuUG5XZ93OVOS5dpN
|
||||||
|
b+WskdcD8NOoJy/X/5A08veEI/jYO/DyqQKBwQDDwUQCOWf41ecvJLtBHKmEnHDz
|
||||||
|
ftzHino9DRKG8a9XaN4rmetnoWEaM2vHGX3pf3mwH+dAe8vJdAQueDhBKYeEpm6C
|
||||||
|
TYNOpou1+Zs5s99BilCTNYo8fkMOAyqwRwmz9zgHS6QxXuPwsghKefLJGt6o6RFF
|
||||||
|
tfWVTfLlYJ+I3GQe3ySsk3wjVz4oUTKiyiq5+KzD+HhEkS7u+RQ7Z0ZI2xd2cF8Y
|
||||||
|
aN2hjKDpcOiFf3CDoqka5D1qMNLgIHO52AHww1UCgcA1h7o7AMpURRka6hyaODY0
|
||||||
|
A4oMYEbwdQjYjIyT998W+rzkbu1us6UtzQEBZ760npkgyU/epbOoV63lnkCC/MOU
|
||||||
|
LD0PST+L/CHiY/cWIHb79YG1EifUZKpUFg0Aoq0EGFkepF0MefGCkbRGYA5UZr9U
|
||||||
|
R80wAu9D+L+JJiS0J0BSRF74DL196zUuHt5zFeXuLzxsRtPAnq9DliS08BACRYZy
|
||||||
|
7H3I7cWD9Vn5/0jbKWHFcaaWwyETR6uekTcSzZzbCRECgcBeoE3/xUA9SSk34Mmj
|
||||||
|
7/cB4522Ft0imA3+9RK/qJTZ7Bd5fC4PKjOGNtUiqW/0L2rjeIiQ40bfWvWqgPKw
|
||||||
|
jSK1PL6uvkl6+4cNsFsYyZpiVDoe7wKju2UuoNlB3RUTqa2r2STFuNj2wRjA57I1
|
||||||
|
BIgdnox65jqQsd14g/yaa+75/WP9CE45xzKEyrtvdcqxm0Pod3OrsYK+gikFjiar
|
||||||
|
kT0GQ8u0QPzh2tjt/2ZnIfOBrl+QYERP0MofDZDjhUdq2wECgcB0Lu841+yP5cdR
|
||||||
|
qbJhXO4zJNh7oWNcJlOuQp3ZMNFrA1oHpe9pmLukiROOy01k9WxIMQDzU5GSqRv3
|
||||||
|
VLkYOIcbhJ3kClKAcM3j95SkKbU2H5/RENb3Ck52xtl4pNU1x/3PnVFZfDVuuHO9
|
||||||
|
MZ9YBcIeK98MyP2jr5JtFKnOyPE7xKq0IHIhXadpbc2wjje5FtZ1cUtMyEECCXNa
|
||||||
|
C1TpXebHGyXGpY9WdWXhjdE/1jPvfS+uO5WyuDpYPr339gsdq1g=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
22
testdata/padding.tdir/unbound_control.pem
vendored
Normal file
22
testdata/padding.tdir/unbound_control.pem
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDszCCAhsCFGD5193whHQ2bVdzbaQfdf1gc4SkMA0GCSqGSIb3DQEBCwUAMBIx
|
||||||
|
EDAOBgNVBAMMB3VuYm91bmQwHhcNMjAwNzA4MTMzMjMwWhcNNDAwMzI1MTMzMjMw
|
||||||
|
WjAaMRgwFgYDVQQDDA91bmJvdW5kLWNvbnRyb2wwggGiMA0GCSqGSIb3DQEBAQUA
|
||||||
|
A4IBjwAwggGKAoIBgQCy0Sn4/KHxcau1nvsDgWFiO9t4Hd0xrtDasZbGhvOUD2mv
|
||||||
|
OEDVoKEC9S0I4C4z6sHo1M0HxhZ9kltAdrDIw2mYLvtyDq9ctgIZRAdnICqJ03Tj
|
||||||
|
1EkXlPuPg3xWeK/XsuJF2vRLqzDLg9G8Scg89XjcRAdmoLmNW8ewqSEh+YEX8OPl
|
||||||
|
NdHKl5rBZX+bmN5Tr/gdFgx/K0Fl07WY9e5YuHSWBtDhIJuCs5RUPeueIyTXJkht
|
||||||
|
A6a+UMdip6SMNv+85bYrFRAsbThpkwnWZZ91vAbQIpCRKMhIQNnWXvq+EzqZMzR/
|
||||||
|
Bdsi/IVn3I88KV7WYXlpKXFLZyYa4ZVJFBrDxcX197dr0AIklOvfcd1KnJpmQpEB
|
||||||
|
TMtwqosKXfbd1oq/c3DABPTdOPiJAzjXoBIyiLJ8Vr/YZZMpBWN127wKtqvu0Zp/
|
||||||
|
nGuWKDgMGasG91gDeePLvb9EPvWEvCaVGgIZTt1G4Ov07ooBJSbVGL3U41n+p2My
|
||||||
|
+i/XmXa+PgZX4pdHTR0CAwEAATANBgkqhkiG9w0BAQsFAAOCAYEAd++Wen6l8Ifj
|
||||||
|
4h3p/y16PhSsWJWuJ4wdNYy3/GM84S26wGjzlEEwiW76HpH6VJzPOiBAeWnFKE83
|
||||||
|
hFyetEIxgJeIPbcs9ZP/Uoh8GZH9tRISBSN9Hgk2Slr9llo4t1H0g/XTgA5HqMQU
|
||||||
|
9YydlBh43G7Vw3FVwh09OM6poNOGQKNc/tq2/QdKeUMtyBbLWpRmjH5XcCT35fbn
|
||||||
|
ZiVOUldqSHD4kKrFO4nJYXZyipRbcXybsLiX9GP0GLemc3IgIvOXyJ2RPp06o/SJ
|
||||||
|
pzlMlkcAfLJaSuEW57xRakhuNK7m051TKKzJzIEX+NFYOVdafFHS8VwGrYsdrFvD
|
||||||
|
72tMfu+Fu55y3awdWWGc6YlaGogZiuMnJkvQphwgn+5qE/7CGEckoKEsH601rqIZ
|
||||||
|
muaIc85+nEcHJeijd/ZlBN9zeltjFoMuqTUENgmv8+tUAdVm/UMY9Vjme6b43ydP
|
||||||
|
uv6DS02+k9z8toxXworLiPr94BGaiGV1NxgwZKLZigYJt/Fi2Qte
|
||||||
|
-----END CERTIFICATE-----
|
||||||
39
testdata/padding.tdir/unbound_server.key
vendored
Normal file
39
testdata/padding.tdir/unbound_server.key
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIG5AIBAAKCAYEAvjSVSN2QMXudpzukdLCqgg/IOhCX8KYkD0FFFfWcQjgKq5wI
|
||||||
|
0x41iG32a6wbGanre4IX7VxaSPu9kkHfnGgynCk5nwDRedE/FLFhAU78PoT0+Nqq
|
||||||
|
GRS7XVQ24vLmIz9Hqc2Ozx1um1BXBTmIT0UfN2e22I0LWQ6a3seZlEDRj45gnk7Z
|
||||||
|
uh9MDgotaBdm+v1JAbupSf6Zis4VEH3JNdvVGE3O1DHEIeuuz/3BDhpf6WBDH+8K
|
||||||
|
WaBe1ca4TZHr9ThL2gEMEfAQl0wXDwRWRoi3NjNMH+mw0L1rjwThI5GXqNIee7o5
|
||||||
|
FzUReSXZuTdFMyGe3Owcx+XoYnwi6cplSNoGsDBu4B9bKKglR9YleJVw4L4Xi8xP
|
||||||
|
q6O9UPj4+nypHk/DOoC7DIM3ufN0yxPBsFo5TVowxfhdjZXJbbftd2TZv7AH8+XL
|
||||||
|
A5UoZgRzXgzECelXSCTBFlMTnT48LfA9pMLydyjAz2UdPHs5Iv+TK5nnI+aJoeaP
|
||||||
|
7kFZSngxdy1+A/bNAgMBAAECggGBALpTOIqQwVg4CFBylL/a8K1IWJTI/I65sklf
|
||||||
|
XxYL7G7SB2HlEJ//z+E+F0+S4Vlao1vyLQ5QkgE82pAUB8FoMWvY1qF0Y8A5wtm6
|
||||||
|
iZSGk4OLK488ZbT8Ii9i+AGKgPe2XbVxsJwj8N4k7Zooqec9hz73Up8ATEWJkRz7
|
||||||
|
2u7oMGG4z91E0PULA64dOi3l/vOQe5w/Aa+CwVbAWtI05o7kMvQEBMDJn6C7CByo
|
||||||
|
MB5op9wueJMnz7PM7hns+U7Dy6oE4ljuolJUy51bDzFWwoM54cRoQqLFNHd8JVQj
|
||||||
|
WxldCkbfF43iyprlsEcUrTyUjtdA+ZeiG39vg/mtdmgNpGmdupHJZQvSuG8IcVlz
|
||||||
|
O+eMSeQS1QXPD6Ik8UK4SU0h+zOl8xIWtRrsxQuh4fnTN40udm/YUWl/6gOebsBI
|
||||||
|
IrVLlKGqJSfB3tMjpCRqdTzJ0dA9keVpkqm2ugZkxEf1+/efq/rFIQ2pUBLCqNTN
|
||||||
|
qpNqruK8y8FphP30I2uI4Ej2UIB8AQKBwQDd2Yptj2FyDyaXCycsyde0wYkNyzGU
|
||||||
|
dRnzdibfHnMZwjgTjwAwgIUBVIS8H0/z7ZJQKN7osJfddMrtjJtYYUk9g/dCpHXs
|
||||||
|
bNh2QSoWah3FdzNGuWd0iRf9+LFxhjAAMo/FS8zFJAJKrFsBdCGTfFUMdsLC0bjr
|
||||||
|
YjiWBuvV72uKf8XIZX5KIZruKdWBBcWukcb21R1UDyFYyXRBsly5XHaIYKZql3km
|
||||||
|
7pV7MKWO0IYgHbHIqGUqPQlzZ/lkunS1jKECgcEA23wHffD6Ou9/x3okPx2AWpTr
|
||||||
|
gh8rgqbyo6hQkBW5Y90Wz824cqaYebZDaBR/xlVx/YwjKkohv8Bde2lpH/ZxRZ1Z
|
||||||
|
5Sk2s6GJ/vU0L9RsJZgCgj4L6Coal1NMxuZtCXAlnOpiCdxSZgfqbshbTVz30KsG
|
||||||
|
ZJG361Cua1ScdAHxlZBxT52/1Sm0zRC2hnxL7h4qo7Idmtzs40LAJvYOKekR0pPN
|
||||||
|
oWeJfra7vgx/jVNvMFWoOoSLpidVO4g+ot4ery6tAoHAdW3rCic1C2zdnmH28Iw+
|
||||||
|
s50l8Lk3mz+I5wgJd1zkzCO0DxZIoWPGA3g7cmCYr6N3KRsZMs4W9NAXgjpFGDkW
|
||||||
|
zYsG3K21BdpvkdjYcFjnPVjlOXB2RIc0vehf9Jl02wXoeCSxVUDEPcaRvWk9RJYx
|
||||||
|
ZpGOchUU7vNkxHURbIJ4yCzuAi9G8/Jp0dsu+kaV5tufF5SjG5WOrzKjaQsCbdN1
|
||||||
|
oqaWMCHRrTvov/Z2C+xwsptFOdN5CSyZzg6hQiI4GMlBAoHAXyb6KINcOEi0YMp3
|
||||||
|
BFXJ23tMTnEs78tozcKeipigcsbaqORK3omS+NEnj+uzKUzJyl4CsMbKstK2tFYS
|
||||||
|
mSTCHqgE3PBtIpsZtEqhgUraR8IK9GPpzZDTTl9ynZgwFTNlWw3RyuyVXF56J+T8
|
||||||
|
kCGJ3hEHCHqT/ZRQyX85BKIDFhA0z4tYKxWVqIFiYBNq56R0X9tMMmMs36mEnF93
|
||||||
|
7Ht6mowxTZQRa7nU0qOgeKh/P7ki4Zus3y+WJ+T9IqahLtlRAoHBAIhqMrcxSAB8
|
||||||
|
RpB9jukJlAnidw2jCMPgrFE8tP0khhVvGrXMldxAUsMKntDIo8dGCnG1KTcWDI0O
|
||||||
|
jepvSPHSsxVLFugL79h0eVIS5z4huW48i9xgU8VlHdgAcgEPIAOFcOw2BCu/s0Vp
|
||||||
|
O+MM/EyUOdo3NsibB3qc/GJI6iNBYS7AljYEVo6rXo5V/MZvZUF4vClen6Obzsre
|
||||||
|
MTTb+4sJjfqleWuvr1XNMeu2mBfXBQkWGZP1byBK0MvD/aQ2PWq92A==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
22
testdata/padding.tdir/unbound_server.pem
vendored
Normal file
22
testdata/padding.tdir/unbound_server.pem
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDqzCCAhMCFBHWXeQ6ZIa9QcQbXLFfC6tj+KA+MA0GCSqGSIb3DQEBCwUAMBIx
|
||||||
|
EDAOBgNVBAMMB3VuYm91bmQwHhcNMjAwNzA4MTMzMjI5WhcNNDAwMzI1MTMzMjI5
|
||||||
|
WjASMRAwDgYDVQQDDAd1bmJvdW5kMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
||||||
|
igKCAYEAvjSVSN2QMXudpzukdLCqgg/IOhCX8KYkD0FFFfWcQjgKq5wI0x41iG32
|
||||||
|
a6wbGanre4IX7VxaSPu9kkHfnGgynCk5nwDRedE/FLFhAU78PoT0+NqqGRS7XVQ2
|
||||||
|
4vLmIz9Hqc2Ozx1um1BXBTmIT0UfN2e22I0LWQ6a3seZlEDRj45gnk7Zuh9MDgot
|
||||||
|
aBdm+v1JAbupSf6Zis4VEH3JNdvVGE3O1DHEIeuuz/3BDhpf6WBDH+8KWaBe1ca4
|
||||||
|
TZHr9ThL2gEMEfAQl0wXDwRWRoi3NjNMH+mw0L1rjwThI5GXqNIee7o5FzUReSXZ
|
||||||
|
uTdFMyGe3Owcx+XoYnwi6cplSNoGsDBu4B9bKKglR9YleJVw4L4Xi8xPq6O9UPj4
|
||||||
|
+nypHk/DOoC7DIM3ufN0yxPBsFo5TVowxfhdjZXJbbftd2TZv7AH8+XLA5UoZgRz
|
||||||
|
XgzECelXSCTBFlMTnT48LfA9pMLydyjAz2UdPHs5Iv+TK5nnI+aJoeaP7kFZSngx
|
||||||
|
dy1+A/bNAgMBAAEwDQYJKoZIhvcNAQELBQADggGBABunf93MKaCUHiZgnoOTinsW
|
||||||
|
84/EgInrgtKzAyH+BhnKkJOhhR0kkIAx5d9BpDlaSiRTACFon9moWCgDIIsK/Ar7
|
||||||
|
JE0Kln9cV//wiiNoFU0O4mnzyGUIMvlaEX6QHMJJQYvL05+w/3AAcf5XmMJtR5ca
|
||||||
|
fJ8FqvGC34b2WxX9lTQoyT52sRt+1KnQikiMEnEyAdKktMG+MwKsFDdOwDXyZhZg
|
||||||
|
XZhRrfX3/NVJolqB6EahjWIGXDeKuSSKZVtCyib6LskyeMzN5lcRfvubKDdlqFVF
|
||||||
|
qlD7rHBsKhQUWK/IO64mGf7y/de+CgHtED5vDvr/p2uj/9sABATfbrOQR3W/Of25
|
||||||
|
sLBj4OEfrJ7lX8hQgFaxkMI3x6VFT3W8dTCp7xnQgb6bgROWB5fNEZ9jk/gjSRmD
|
||||||
|
yIU+r0UbKe5kBk/CmZVFXL2TyJ92V5NYEQh8V4DGy19qZ6u/XKYyNJL4ocs35GGe
|
||||||
|
CA8SBuyrmdhx38h1RHErR2Skzadi1S7MwGf1y431fQ==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
162
testdata/rpz_rootwc.rpl
vendored
Normal file
162
testdata/rpz_rootwc.rpl
vendored
Normal file
|
|
@ -0,0 +1,162 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
module-config: "respip validator iterator"
|
||||||
|
target-fetch-policy: "0 0 0 0 0"
|
||||||
|
qname-minimisation: no
|
||||||
|
|
||||||
|
rpz:
|
||||||
|
name: "rpz.example.com."
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME rpz.example.com
|
||||||
|
TEMPFILE_CONTENTS rpz.example.com
|
||||||
|
$ORIGIN example.com.
|
||||||
|
rpz 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
|
||||||
|
1379078166 28800 7200 604800 7200 )
|
||||||
|
3600 IN NS ns1.rpz.example.com.
|
||||||
|
3600 IN NS ns2.rpz.example.com.
|
||||||
|
$ORIGIN rpz.example.com.
|
||||||
|
a CNAME .
|
||||||
|
a CNAME *. ; duplicate CNAME here on purpose
|
||||||
|
*.a TXT "wildcard local data"
|
||||||
|
* CNAME .
|
||||||
|
b.a CNAME *.
|
||||||
|
c.a CNAME rpz-passthru.
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
rpz:
|
||||||
|
name: "rpz2.example.com."
|
||||||
|
zonefile:
|
||||||
|
TEMPFILE_NAME rpz2.example.com
|
||||||
|
TEMPFILE_CONTENTS rpz2.example.com
|
||||||
|
$ORIGIN example.com.
|
||||||
|
rpz2 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. (
|
||||||
|
1379078166 28800 7200 604800 7200 )
|
||||||
|
3600 IN NS ns1.rpz.example.com.
|
||||||
|
3600 IN NS ns2.rpz.example.com.
|
||||||
|
$ORIGIN rpz2.example.com.
|
||||||
|
a TXT "local data 2nd zone"
|
||||||
|
d TXT "local data 2nd zone"
|
||||||
|
e CNAME *.a.example.
|
||||||
|
*.e CNAME *.b.example.
|
||||||
|
drop CNAME rpz-drop.
|
||||||
|
TEMPFILE_END
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "a."
|
||||||
|
stub-addr: 10.20.30.40
|
||||||
|
stub-zone:
|
||||||
|
name: "example."
|
||||||
|
stub-addr: 10.20.30.50
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test RPZ QNAME trigger for root wildcard.
|
||||||
|
|
||||||
|
; a.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 10.20.30.40
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
a. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
a. IN NS ns.a.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.a IN A 10.20.30.40
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
c.a. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
c.a. IN TXT "answer from upstream ns"
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
x.b.a. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
x.b.a. IN TXT "answer from upstream ns"
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; example.
|
||||||
|
RANGE_BEGIN 0 100
|
||||||
|
ADDRESS 10.20.30.50
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example. IN NS
|
||||||
|
SECTION ANSWER
|
||||||
|
example. IN NS ns.example.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example IN A 10.20.30.50
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
e.a.example. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
e.a.example. IN TXT "e.a.example. answer from upstream ns"
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH opcode qtype qname
|
||||||
|
ADJUST copy_id
|
||||||
|
REPLY QR NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
something.e.b.example. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
something.e.b.example. IN TXT "*.b.example. answer from upstream ns"
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
STEP 10 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
x. IN TXT
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; wildcard deny all
|
||||||
|
STEP 20 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA AA NXDOMAIN
|
||||||
|
SECTION QUESTION
|
||||||
|
x. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
STEP 30 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
y.tld. IN TXT
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; wildcard deny all
|
||||||
|
STEP 40 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all
|
||||||
|
REPLY QR RD RA AA NXDOMAIN
|
||||||
|
SECTION QUESTION
|
||||||
|
y.tld. IN TXT
|
||||||
|
SECTION ANSWER
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
136
testdata/serve_original_ttl.rpl
vendored
Normal file
136
testdata/serve_original_ttl.rpl
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
; config options
|
||||||
|
server:
|
||||||
|
access-control: 127.0.0.1 allow_snoop
|
||||||
|
module-config: "validator iterator"
|
||||||
|
qname-minimisation: "no"
|
||||||
|
minimal-responses: no
|
||||||
|
serve-original-ttl: yes
|
||||||
|
cache-max-ttl: 1000
|
||||||
|
cache-min-ttl: 20
|
||||||
|
serve-expired: yes
|
||||||
|
serve-expired-reply-ttl: 123
|
||||||
|
|
||||||
|
stub-zone:
|
||||||
|
name: "example.com"
|
||||||
|
stub-addr: 1.2.3.4
|
||||||
|
CONFIG_END
|
||||||
|
|
||||||
|
SCENARIO_BEGIN Test serve-original-ttl
|
||||||
|
; Scenario overview:
|
||||||
|
; - query for example.com. IN A
|
||||||
|
; - check that we get an answer for example.com. IN A with the correct TTL
|
||||||
|
; - query again after a couple seconds and check that we get the original TTL
|
||||||
|
; (next steps are combination with serve-expired)
|
||||||
|
; - query again after the TTL expired
|
||||||
|
; - check that we get the expired cached answer with the original TTL
|
||||||
|
|
||||||
|
; 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 NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 10 IN A 5.6.7.8
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.4
|
||||||
|
ENTRY_END
|
||||||
|
RANGE_END
|
||||||
|
|
||||||
|
; Query with RD flag
|
||||||
|
STEP 1 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY RD
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Check that we got the correct answer (should be cached)
|
||||||
|
STEP 10 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RD RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 10 IN A 5.6.7.8
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.com. IN NS ns.example.com.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. IN A 1.2.3.4
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Wait a couple of seconds (< 10)
|
||||||
|
STEP 11 TIME_PASSES ELAPSE 5
|
||||||
|
|
||||||
|
; Query again
|
||||||
|
STEP 20 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Check that we got the cached answer with the original TTL
|
||||||
|
; (Passively checks that minimum and maximum TTLs are ignored)
|
||||||
|
STEP 30 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 10 A 5.6.7.8
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.com. 3600 NS ns.example.com.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. 3600 A 1.2.3.4
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Wait for the TTL to expire
|
||||||
|
STEP 31 TIME_PASSES ELAPSE 3601
|
||||||
|
|
||||||
|
; Query again
|
||||||
|
STEP 40 QUERY
|
||||||
|
ENTRY_BEGIN
|
||||||
|
REPLY
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Check that we got a stale answer with the original TTL
|
||||||
|
STEP 50 CHECK_ANSWER
|
||||||
|
ENTRY_BEGIN
|
||||||
|
MATCH all ttl
|
||||||
|
REPLY QR RA NOERROR
|
||||||
|
SECTION QUESTION
|
||||||
|
example.com. IN A
|
||||||
|
SECTION ANSWER
|
||||||
|
example.com. 10 A 5.6.7.8
|
||||||
|
SECTION AUTHORITY
|
||||||
|
example.com. NS ns.example.com.
|
||||||
|
SECTION ADDITIONAL
|
||||||
|
ns.example.com. A 1.2.3.4
|
||||||
|
ENTRY_END
|
||||||
|
|
||||||
|
; Give time for the pending query to get answered
|
||||||
|
STEP 51 TRAFFIC
|
||||||
|
|
||||||
|
SCENARIO_END
|
||||||
21
testdata/test_ldnsrr.5
vendored
21
testdata/test_ldnsrr.5
vendored
|
|
@ -151,3 +151,24 @@ blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585012 300 16 k9mSMs2t5vq5FV2D
|
||||||
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480523776 300 16 sBfx00GRs+tfRTm4uRCjyQ== 25791 0 0
|
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480523776 300 16 sBfx00GRs+tfRTm4uRCjyQ== 25791 0 0
|
||||||
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585449 300 0 59692 BADSIG 0
|
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585449 300 0 59692 BADSIG 0
|
||||||
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585462 300 16 6wvlG82sEVHyqsTtBLvRQw== 26044 NOERROR 0
|
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585462 300 16 6wvlG82sEVHyqsTtBLvRQw== 26044 NOERROR 0
|
||||||
|
|
||||||
|
; Test for ZONEMD
|
||||||
|
example.org. 86400 IN ZONEMD 5 1 2 c1b8eddf4ef128db88125ede9008d6ff0b33a047b8a8a4d77b00271f7d8e7ae5ccd6c86d8398f64f0de0615bf3121ffba6946a3cd5f32acbc4e8d0649b4a78e6
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-2.4
|
||||||
|
example.com. 86400 IN ZONEMD 2018031500 1 1 ( FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE 7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE )
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-A.1
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 ( c68090d90a7aed71 6bc459f9340e3d7c 1370d4d24b7e2fc3 a1ddc0b9a87153b9 a9713b3c9ae5cc27 777f98b8e730044c )
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-A.2
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 ( 31cefb03814f5062 ad12fa951ba0ef5f 8da6ae354a415767 246f7dc932ceb1e7 42a2108f529db6a3 3a11c01493de358d )
|
||||||
|
non-apex.example. 900 IN ZONEMD 2018031900 1 1 ( 616c6c6f77656420 6275742069676e6f 7265642e20616c6c 6f77656420627574 2069676e6f726564 2e20616c6c6f7765 )
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-A.3
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 ( 62e6cf51b02e54b9 b5f967d547ce4313 6792901f9f88e637 493daaf401c92c27 9dd10f0edb1c56f8 080211f8480ee306 )
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 2 ( 08cfa1115c7b948c 4163a901270395ea 226a930cd2cbcf2f a9a5e6eb85f37c8a 4e114d884e66f176 eab121cb02db7d65 2e0cc4827e7a3204 f166b47e5613fd27 )
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 240 ( e2d523f654b9422a 96c5a8f44607bbee )
|
||||||
|
example. 86400 IN ZONEMD 2018031900 241 1 ( e1846540e33a9e41 89792d18d5d131f6 05fc283e )
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-A.4
|
||||||
|
uri.arpa. 3600 IN ZONEMD 2018100702 1 1 ( 1291b78ddf7669b1a39d014d87626b709b55774c5d7d58fa dc556439889a10eaf6f11d615900a4f996bd46279514e473 )
|
||||||
|
; from draft-ietf-dnsop-dns-zone-digest-12#section-A.5
|
||||||
|
root-servers.net. 3600000 IN ZONEMD 2018091100 1 1 ( f1ca0ccd91bd5573d9f431c00ee0101b2545c97602be0a97 8a3b11dbfc1c776d5b3e86ae3d973d6b5349ba7f04340f79 )
|
||||||
|
; from ldns issue #121, 0.10m was parsed as 0.01m.
|
||||||
|
foo. 12345 IN LOC 12 45 52.333 N 105 40 33.452 W -24m 0.1m 0.1m 0.1m
|
||||||
|
|
|
||||||
24
testdata/test_ldnsrr.c5
vendored
24
testdata/test_ldnsrr.c5
vendored
|
|
@ -188,3 +188,27 @@ blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480523776 300 16 sBfx00GRs+tfRTm4u
|
||||||
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585449 300 0 59692 BADSIG 0
|
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585449 300 0 59692 BADSIG 0
|
||||||
06626C61626C610000FA00FF00000000003A08686D61632D6D6435077369672D616C670372656703696E74000000583FF0F6012C0010EB0BE51BCDAC1151F2AAC4ED04BBD14365BC00000000
|
06626C61626C610000FA00FF00000000003A08686D61632D6D6435077369672D616C670372656703696E74000000583FF0F6012C0010EB0BE51BCDAC1151F2AAC4ED04BBD14365BC00000000
|
||||||
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585462 300 16 6wvlG82sEVHyqsTtBLvRQw== 26044 NOERROR 0
|
blabla. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1480585462 300 16 6wvlG82sEVHyqsTtBLvRQw== 26044 NOERROR 0
|
||||||
|
076578616D706C65036F726700003F0001000151800046000000050102C1B8EDDF4EF128DB88125EDE9008D6FF0B33A047B8A8A4D77B00271F7D8E7AE5CCD6C86D8398F64F0DE0615BF3121FFBA6946A3CD5F32ACBC4E8D0649B4A78E6
|
||||||
|
example.org. 86400 IN ZONEMD 5 1 2 C1B8EDDF4EF128DB88125EDE9008D6FF0B33A047B8A8A4D77B00271F7D8E7AE5CCD6C86D8398F64F0DE0615BF3121FFBA6946A3CD5F32ACBC4E8D0649B4A78E6
|
||||||
|
076578616D706C6503636F6D00003F00010001518000367848B78C0101FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE
|
||||||
|
example.com. 86400 IN ZONEMD 2018031500 1 1 FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE
|
||||||
|
076578616D706C6500003F00010001518000367848B91C0101C68090D90A7AED716BC459F9340E3D7C1370D4D24B7E2FC3A1DDC0B9A87153B9A9713B3C9AE5CC27777F98B8E730044C
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 C68090D90A7AED716BC459F9340E3D7C1370D4D24B7E2FC3A1DDC0B9A87153B9A9713B3C9AE5CC27777F98B8E730044C
|
||||||
|
076578616D706C6500003F00010001518000367848B91C010131CEFB03814F5062AD12FA951BA0EF5F8DA6AE354A415767246F7DC932CEB1E742A2108F529DB6A33A11C01493DE358D
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 31CEFB03814F5062AD12FA951BA0EF5F8DA6AE354A415767246F7DC932CEB1E742A2108F529DB6A33A11C01493DE358D
|
||||||
|
086E6F6E2D61706578076578616D706C6500003F00010000038400367848B91C0101616C6C6F776564206275742069676E6F7265642E20616C6C6F776564206275742069676E6F7265642E20616C6C6F7765
|
||||||
|
non-apex.example. 900 IN ZONEMD 2018031900 1 1 616C6C6F776564206275742069676E6F7265642E20616C6C6F776564206275742069676E6F7265642E20616C6C6F7765
|
||||||
|
076578616D706C6500003F00010001518000367848B91C010162E6CF51B02E54B9B5F967D547CE43136792901F9F88E637493DAAF401C92C279DD10F0EDB1C56F8080211F8480EE306
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 1 62E6CF51B02E54B9B5F967D547CE43136792901F9F88E637493DAAF401C92C279DD10F0EDB1C56F8080211F8480EE306
|
||||||
|
076578616D706C6500003F00010001518000467848B91C010208CFA1115C7B948C4163A901270395EA226A930CD2CBCF2FA9A5E6EB85F37C8A4E114D884E66F176EAB121CB02DB7D652E0CC4827E7A3204F166B47E5613FD27
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 2 08CFA1115C7B948C4163A901270395EA226A930CD2CBCF2FA9A5E6EB85F37C8A4E114D884E66F176EAB121CB02DB7D652E0CC4827E7A3204F166B47E5613FD27
|
||||||
|
076578616D706C6500003F00010001518000167848B91C01F0E2D523F654B9422A96C5A8F44607BBEE
|
||||||
|
example. 86400 IN ZONEMD 2018031900 1 240 E2D523F654B9422A96C5A8F44607BBEE
|
||||||
|
076578616D706C6500003F000100015180001A7848B91CF101E1846540E33A9E4189792D18D5D131F605FC283E
|
||||||
|
example. 86400 IN ZONEMD 2018031900 241 1 E1846540E33A9E4189792D18D5D131F605FC283E
|
||||||
|
03757269046172706100003F000100000E1000367849C5DE01011291B78DDF7669B1A39D014D87626B709B55774C5D7D58FADC556439889A10EAF6F11D615900A4F996BD46279514E473
|
||||||
|
uri.arpa. 3600 IN ZONEMD 2018100702 1 1 1291B78DDF7669B1A39D014D87626B709B55774C5D7D58FADC556439889A10EAF6F11D615900A4F996BD46279514E473
|
||||||
|
0C726F6F742D73657276657273036E657400003F00010036EE8000367849A05C0101F1CA0CCD91BD5573D9F431C00EE0101B2545C97602BE0A978A3B11DBFC1C776D5B3E86AE3D973D6B5349BA7F04340F79
|
||||||
|
root-servers.net. 3600000 IN ZONEMD 2018091100 1 1 F1CA0CCD91BD5573D9F431C00EE0101B2545C97602BE0A978A3B11DBFC1C776D5B3E86AE3D973D6B5349BA7F04340F79
|
||||||
|
03666F6F00001D00010000303900100011111182BD2D4D69530BD400988D20
|
||||||
|
foo. 12345 IN LOC 12 45 52.333 N 105 40 33.452 W -24m 0.10m 0.10m 0.10m
|
||||||
|
|
|
||||||
4
testdata/zonemd.example1.zone
vendored
Normal file
4
testdata/zonemd.example1.zone
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
example.org. IN SOA ns.example.org. hostmaster.example.org. 200154054 28800 7200 604800 3600
|
||||||
|
example.org. IN NS ns.example.org.
|
||||||
|
www.example.org. IN A 127.0.0.1
|
||||||
|
ns.example.org. IN A 127.0.0.1
|
||||||
35
testdata/zonemd.example10.zone
vendored
Normal file
35
testdata/zonemd.example10.zone
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
; DNSSEC signed but RRSIG on SOA is wrong.
|
||||||
|
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
; old sig
|
||||||
|
; example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
; wrong sig
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgeAAAAA=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
33
testdata/zonemd.example11.zone
vendored
Normal file
33
testdata/zonemd.example11.zone
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
; DNSSEC NSEC zone, but ZONEMD is missing
|
||||||
|
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
; missing ZONEMD
|
||||||
|
;example.com. 3600 IN TYPE63 \# 70 0bee1bc6010258f7620f93204bbb31b44f795b3409cc4abd9ef5601decc15675bd7751213152984eddce0626e6062e744b03b3e47711202fbb79e4a2eb8bc5cf46741b5cae6f
|
||||||
|
;example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. orn8ZF/yqj9u4WrhiO6gtEcTaVsnZSWWZLfXhcIOiWSB8kKCxtZl5cG17dD3Du1NllUwMRqkp0KleLhIoUS9xeQ/0x05u+CYLrfQ62oAiD7q54ZQzpXJIH52aQzKV70ZnO03CZowhQBnetmIoKX6xLogKo8pt+BdQbo3oVHxV8Y=
|
||||||
|
example.com. 3600 IN NSEC bar.example.com. NS SOA RRSIG NSEC DNSKEY TYPE63
|
||||||
|
example.com. 3600 IN RRSIG NSEC 8 2 3600 20201116135527 20201019135527 55566 example.com. ufLrlOQprAqjnH85Rt3T0Mxd3ZB0mBeeNIr84eFJ8Rk6WiWEPm0Y1R7GRufNI24Mj7iqLcL4nJM6KK6B7dJqjqu73jw1acuYNnbsoV2BNDRXRFP2FNWTpctVdi+955f3FzgsmEJXfGiSUG0YXAEcZmdCPCn5ii2jk8mk7r6KKYo=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
bar.example.com. 3600 IN NSEC ding.example.com. A RRSIG NSEC
|
||||||
|
bar.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. VhsGuBx20DXQZNU8ITAMnasn6NVyEjN9xtB8msH5xJn80UCuaqvFBURzcPWN3aHnykEvGfdPF/9P3WvlON0cMikWkqSLy6Q9bpvgAq13HWYh+ZcDoqLtICaB7RkBQc+6aHAqZFyQbD8/m8Kxt5eVJtV6rEuf+yPX0+3aXHhsRg0=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
ding.example.com. 3600 IN NSEC foo.example.com. A RRSIG NSEC
|
||||||
|
ding.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. nb1W2aaKrU5iAQiY8gMsoMOejID19JMTEwY2rRoe+KsvzMs0rE0ifEkqit4blXaU0tfy0foJ70uqdJFqBoGz1NcSwZ6GNk/iNfGvG3XpxZ/zqEe7kkIucqqei794G7z9psqV94yZ3WaT+IswPpWrSaWv1w41RtcWufPhe4fOAmU=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
foo.example.com. 3600 IN NSEC ns.example.com. A RRSIG NSEC
|
||||||
|
foo.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. fUZEpkEULRWDntN5Z7Kr8M83Hjhf08ECMKRpo6IBoBc3ayenj+YMgWAvFXC825wjENPYYWNGag0d32U83zCZxqgv+8uXZd3B7QDpTbL41aWZdc++s5YWTkYjyOWwJ1XHOv4nL3qEnJBXVzo/E1gbSKhTFuG97i+7J1MFd9MsC5s=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
ns.example.com. 3600 IN NSEC www.example.com. A RRSIG NSEC
|
||||||
|
ns.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. 0upKNYjiow4NDJm3I1RbUddE9GGuFYEVKswww5BAc/6WHuukupncL30lskvcSKGpByDssP2Hi2CufyEtYeGWh6q1TxtOFRqFBX1p6Q5b3tBlCtvv4h31dQR9uqLvq+GkGS5MR+0LO5kWagIpZmnI8YY5plVdXEtNbp2Ar8zvz/A=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
www.example.com. 3600 IN NSEC example.com. A RRSIG NSEC
|
||||||
|
www.example.com. 3600 IN RRSIG NSEC 8 3 3600 20201116135527 20201019135527 55566 example.com. meg/t6nIBqQZ0d5/dT7uu/3CuP4vE+HxqFQaj2fjUNceA/6C7QIQnqQ5Kyblg+XijDkQX0yvyFNHYdgF16UDgFT7tlNUCHk1SpF5BWzV4c4tBEhxASTz7UQo111O3Tyd6CldPzO/Se15Ud0/ZYltHEqWTfY5nJoXC/OJD9V2QOI=
|
||||||
35
testdata/zonemd.example12.zone
vendored
Normal file
35
testdata/zonemd.example12.zone
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
; DNSSEC NSEC3 zone, but ZONEMD is missing
|
||||||
|
|
||||||
|
example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
|
||||||
|
example.com. 3600 IN RRSIG SOA 8 2 3600 20201116135527 20201019135527 55566 example.com. gcFHT/Q4iDZ78CK6fyY2HZr8sRtgH2Rna9fEs06RW0gqMnfDntweoIaBamOZ7NlAP84aY2bZeanmEccmkHexByUpodCoKQ4NzVXctLr0TO4PVoFyfUfj62fjhM56SF8ioDxsoDQcPtYXcjNQjwfntWofMqHCMxrb9LzbgePzhOM=
|
||||||
|
example.com. 3600 IN NS ns.example.com.
|
||||||
|
example.com. 3600 IN RRSIG NS 8 2 3600 20201116135527 20201019135527 55566 example.com. X+V3XsbJbBi9OsHpjMkGCox8RLY/uXp/XX/O/flTrIre9fMDWm9ZGnewtuQFpLgGc6hUTi0eLsuRWRA5fZXEKUBhmoR2Ph01KgE1gvlL7v6zPWQwXVcBRUr3mOSbYdNNkHkXEjiDBGEhNkfqR216zNgw563eEGXOkLUFNIx5Zpg=
|
||||||
|
example.com. 3600 IN DNSKEY 256 3 8 AwEAAdug/L739i0mgN2nuK/bhxu3wFn5Ud9nK2+XUmZQlPUEZUC5YZvm1rfMmEWTGBn87fFxEu/kjFZHJ55JLzqsbbpVHLbmKCTT2gYR2FV2WDKROGKuYbVkJIXdKAjJ0ONuK507NinYvlWXIoxHn22KAWOd9wKgSTNHBlmGkX+ts3hh ;{id = 55566 (zsk), size = 1024b}
|
||||||
|
example.com. 3600 IN RRSIG DNSKEY 8 2 3600 20201116135527 20201019135527 55566 example.com. fsdnVg38PKQTH2mDOwkXL6Jre7JP7Gf8WI3CvIbmeYQUJtAlpcSbZkS3wInm3kKMxOuT55BWzndQzpfmpo91OqJjG27W0k9301NMLUwFprA6b9HK+iPAT0JpYPDPzcm1bQdarLzLS+eD/GPwmyVSX7Gze+08VfE8m8sOW2r7UjA=
|
||||||
|
example.com. 3600 IN NSEC3PARAM 1 0 1 012345
|
||||||
|
example.com. 3600 IN RRSIG NSEC3PARAM 8 2 3600 20201116135527 20201019135527 55566 example.com. CDbcPLDrpVUyk3v7kwQ3LNzzhDHS40e0LDv7IZrzMt2AO/6SJ7xhlG+qByhc7CFBUMvBNaOteO5th0tvotWxk0UrVhqRyyXNCr8SmDdAaPH4SGwJ2p+XPIwn0CTXDpyOcgCrW0Kt2OjubA+4fQwjkGYFuDATY5QOITe6kGJpKpw=
|
||||||
|
; missing ZONEMD
|
||||||
|
;example.com. 3600 IN TYPE63 \# 70 0bee1bc6010246e31506f321c58db811c934c6446141d651a8574fb21088a2bb6feec875fc8b60f50beae00e7f6554e2cf3cb048350ef92e2946137443e30079813db4d1bfbd
|
||||||
|
;example.com. 3600 IN RRSIG TYPE63 8 2 3600 20201116135527 20201019135527 55566 example.com. M0f4wkOn6dcYtaQtwvp698QL7HuKEgi+PPjYJawV8d1VNOWbbRTF9L9tHFDK42Ylq238uOxi223ZEk/pq4BP64Sm31dV54K2V95QqdzN9NDD34+sqKEgGyRcmBiE50gm3kZZ4ENqBQKc+GdlbZ2fHSI6gf6X694sSmZ7dfjq+2k=
|
||||||
|
v4cknoe1mioduf5bmhgfjjq4dlqet8fm.example.com. 3600 IN NSEC3 1 0 1 012345 2v43f6ripfocif5h6bbi07glq6849rnj NS SOA RRSIG DNSKEY NSEC3PARAM TYPE63
|
||||||
|
v4cknoe1mioduf5bmhgfjjq4dlqet8fm.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. Yd+g1m2aDKDUuZNv2KpKk4uSNrpB5KLM3QUqypm484VjOpnj5Wy3BjUULH3P8z+S9PG7XbaOf+yUYHK8cI6i5GTcrMhoLKaanAD09i1KbXbTVJujwA9Za7WzlFVZ3o6f1D8CbrSS3YPWNF3Mb2FYaptvZ9so7MlecuLYdEer7DY=
|
||||||
|
bar.example.com. 3600 IN A 1.2.3.4
|
||||||
|
bar.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. NYhmRicF4C9+YxpWeQrepy4ALM1CM0USoDuGi3W5Xtp4/+YpCJfSIdR9vlJaJ2WayYuZrz9Ai2ci7oWwE1Fn3oywGwCKvGo9m0c3mC2eEtphE19wrop6pWu6um4RiFhmzYS1voraA3PAdYzze9U4NHzlk0+sb5vNZW9dSZS30Ds=
|
||||||
|
c6ntadrd765diocebcrq6trs8npn83o3.example.com. 3600 IN NSEC3 1 0 1 012345 f0lpjkgefgrobj5pucem78r2ouo53fq8 A RRSIG
|
||||||
|
c6ntadrd765diocebcrq6trs8npn83o3.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. gTDi/2e/RPeSOwoBr6oqfoFsGXAknLX3J96EHzMmhtRR7W4pEW8uXKsMJ3rr4qgUUX+ZtzoCMYy+UBkiJfjpWvMToGtuADNOzz0rF8BESaW/8k6iDKPmqmwdGyLGMmfGjYPcb4qg3+9egLejA+fF1OSrhHuINeO80ouw++PL0ns=
|
||||||
|
ding.example.com. 3600 IN A 1.2.3.4
|
||||||
|
ding.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. OERsruISkpd1s68ute8Xm8YXisBCTkkiDMt34K+0dVqvySOJq63d3qN18BeUxZxLyHDB1eR3nZZKqEdkTqrv2r98skhWhjnOECpFbu5gKjtN/KPexbbJ+rxC0QqciuWOC7M6YE0cvI17/RB9KhVRy5rqY2X4Gt2wk2CNeD1dAko=
|
||||||
|
r18q2sl76hceldh0keqr7vnqc15db64a.example.com. 3600 IN NSEC3 1 0 1 012345 v4cknoe1mioduf5bmhgfjjq4dlqet8fm A RRSIG
|
||||||
|
r18q2sl76hceldh0keqr7vnqc15db64a.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. VugivzPyv5+qZhl+x0frrykYyOOdZfcKdmIA13P4OzhtiRNhCRHznhrdTlmfLw/b5Rs5jFX7Iw/hhU80Geg72cYG4KVJwtP6zTyFApDl/8x3rj3vhZOc2nwpYmjjFsyrlb7M2RhcStnS6c/2R4+dBFwwVZXyJBi3fo9NybujI9g=
|
||||||
|
foo.example.com. 3600 IN A 1.2.3.4
|
||||||
|
foo.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. ZcUngb2pUejwnsshbJN/Dfr+Bzu8fcZXyqLArQ+10Bw1IPHyfx7yyUJ43V5tTYVHPSEsJzTnaWj+olVrNhVZxq5e0pgzSYPfGln2FEItEvMIOn33j8yKTpPW2MLyuFF5ZkXhosG20EUwRMvMmRHRz9mIZfwWoMbSGPukmLh8zMA=
|
||||||
|
f0lpjkgefgrobj5pucem78r2ouo53fq8.example.com. 3600 IN NSEC3 1 0 1 012345 r18q2sl76hceldh0keqr7vnqc15db64a A RRSIG
|
||||||
|
f0lpjkgefgrobj5pucem78r2ouo53fq8.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. zishUbm8GxjaHOOUdbz0ZEut99dm+DQ/zvxhOTeS3kmUnL8t3ISew641JeNvvajAUk/xn6eGHjLBuHfwNG+itF2pSD8Gl6Ppo22Y0C9uO5TyRQalYpjtz1kI/VlIelcd0TyusmIMaRChswtpctPKITbr8Wl+MoZZtPQhJ5NjQlQ=
|
||||||
|
ns.example.com. 3600 IN A 127.0.0.1
|
||||||
|
ns.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. SiuxuPtN/ITd+Z20j8UNUHJWbLHirE8zQOWMv5fAZ1rPKpAidrZgUL8J417GdrTwkueU2ywAJ7EzFJSwNTa7o/wUnq7svmOR6Ze6UQsKuZFZGEfqPNDRp4YuF86LU5jChuo+f/IRpydHrxVwGxDPCR9KarDM+ewfW+yI5bZeZcg=
|
||||||
|
2v43f6ripfocif5h6bbi07glq6849rnj.example.com. 3600 IN NSEC3 1 0 1 012345 91onuasouslv1so1i62id4rf0l763dss A RRSIG
|
||||||
|
2v43f6ripfocif5h6bbi07glq6849rnj.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. d9CluwN3zWfLe20J212CuwNzJVbVsDR4eijuJyLpyHzziSc10CauWtUiuHeQMXCVJNwhPSb5kQTfKtql+Jd44BQlenRt/sHfa6YZEOwClN4O8V0vZ43K4vlwwWbh5kxQbFQ/e+w4vlYb1m4PHwzDLtqocNQ9T4A8SXl3A8paZqI=
|
||||||
|
www.example.com. 3600 IN A 127.0.0.1
|
||||||
|
www.example.com. 3600 IN RRSIG A 8 3 3600 20201116135527 20201019135527 55566 example.com. AaIeICaPjV50TDrpbyOn94+hs8EYIMTmN4pYqj7e8GIGimqQIk5jgpwSx6SOoOF+uOqkf9GKHkQTn5YVGaeXwEQleg7mPTmMYKAOk06Y7MFUO1Vwt1Vt7Wo+Cpa3x2a1CmEkfFOi4WqP43VJnUtjjKmXoKRz3VUmqByyJYUAGbQ=
|
||||||
|
91onuasouslv1so1i62id4rf0l763dss.example.com. 3600 IN NSEC3 1 0 1 012345 c6ntadrd765diocebcrq6trs8npn83o3 A RRSIG
|
||||||
|
91onuasouslv1so1i62id4rf0l763dss.example.com. 3600 IN RRSIG NSEC3 8 3 3600 20201116135527 20201019135527 55566 example.com. czJf5HkfHLpfGcku2iZnCu9tXnM7VWOYYhGtVAwkYG0M6BO4LzRxGCV3SkUvHLFxoqQY0DZLnafPl2MKg8zsF+tusf3e3xmpcCSR29IfuDYH7GzuVCj3H0ScmXM0lvyQ92JpJ0AMqq2mW1nvKmgjkyugs+EMpxcFVjhibljocLU=
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue