From: Matthijs Mekking Date: Mon, 1 Nov 2021 07:46:35 +0000 (+0100) Subject: Test for EDE option with non-EDNS query X-Git-Tag: v9.17.21~28^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4354047f97406095b51632aaf82902d784e2a8a5;p=thirdparty%2Fbind9.git Test for EDE option with non-EDNS query Add a test case to make sure the EDE option is not set on an EDNS disabled query. --- diff --git a/bin/tests/system/allow-query/tests.sh b/bin/tests/system/allow-query/tests.sh index 276766e3c9f..c0398febe25 100644 --- a/bin/tests/system/allow-query/tests.sh +++ b/bin/tests/system/allow-query/tests.sh @@ -96,6 +96,18 @@ grep '^a.normal.example' dig.out.ns2.$n > /dev/null && ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +n=`expr $n + 1` +DIGNOEDNS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +noedns -p ${PORT}" + +echo_i "test $n: none - query refused (no edns)" +ret=0 +$DIG $DIGNOEDNS @10.53.0.2 -b 10.53.0.2 a.normal.example a > dig.out.ns2.$n || ret=1 +grep 'status: REFUSED' dig.out.ns2.$n > /dev/null || ret=1 +grep 'EDE: 18 (Prohibited)' dig.out.ns2.$n > /dev/null && ret=1 +grep '^a.normal.example' dig.out.ns2.$n > /dev/null && ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=`expr $status + $ret` + # Test 4 - address allowed, query allowed n=`expr $n + 1` copy_setports ns2/named04.conf.in ns2/named.conf