summaryrefslogtreecommitdiffstats
path: root/bin/tests/system/ednscompliance
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:29 +0000
commite2fc8e037ea6bb5de92b25ec9c12a624737ac5ca (patch)
tree65e6bbf5e12c3fe09b43e577f8d1786d06bcd559 /bin/tests/system/ednscompliance
parentReleasing progress-linux version 1:9.18.19-1~deb12u1progress7u1. (diff)
downloadbind9-e2fc8e037ea6bb5de92b25ec9c12a624737ac5ca.tar.xz
bind9-e2fc8e037ea6bb5de92b25ec9c12a624737ac5ca.zip
Merging upstream version 1:9.18.24.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/tests/system/ednscompliance')
-rw-r--r--bin/tests/system/ednscompliance/tests.sh143
1 files changed, 109 insertions, 34 deletions
diff --git a/bin/tests/system/ednscompliance/tests.sh b/bin/tests/system/ednscompliance/tests.sh
index 0c630f4..515951a 100644
--- a/bin/tests/system/ednscompliance/tests.sh
+++ b/bin/tests/system/ednscompliance/tests.sh
@@ -24,88 +24,163 @@ zone=.
n=$((n + 1))
echo_i "check +edns=100 sets version 100 ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +qr +edns=100 soa $zone > dig.out$n || ret=1
-grep "EDNS: version: 100," dig.out$n > /dev/null || { ret=1; reason="version"; }
+$DIG $DIGOPTS @10.53.0.1 +qr +edns=100 soa $zone >dig.out$n || ret=1
+grep "EDNS: version: 100," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
ret=0 reason=
echo_i "check +ednsopt=100 adds option 100 ($n)"
-$DIG $DIGOPTS @10.53.0.1 +qr +ednsopt=100 soa $zone > dig.out$n || ret=1
-grep "; OPT=100" dig.out$n > /dev/null || { ret=1; reason="option"; }
+$DIG $DIGOPTS @10.53.0.1 +qr +ednsopt=100 soa $zone >dig.out$n || ret=1
+grep "; OPT=100" dig.out$n >/dev/null || {
+ ret=1
+ reason="option"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "check +ednsflags=0x80 sets flags to 0x0080 ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +qr +ednsflags=0x80 soa $zone > dig.out$n || ret=1
-grep "MBZ: 0x0080," dig.out$n > /dev/null || { ret=1; reason="flags"; }
+$DIG $DIGOPTS @10.53.0.1 +qr +ednsflags=0x80 soa $zone >dig.out$n || ret=1
+grep "MBZ: 0x0080," dig.out$n >/dev/null || {
+ ret=1
+ reason="flags"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "Unknown EDNS version ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsnegotiation soa $zone > dig.out$n || ret=1
-grep "status: BADVERS," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "IN.SOA." dig.out$n > /dev/null && { ret=1; reason="soa"; }
+$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsnegotiation soa $zone >dig.out$n || ret=1
+grep "status: BADVERS," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "IN.SOA." dig.out$n >/dev/null && {
+ ret=1
+ reason="soa"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "Unknown EDNS option ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +ednsopt=100 soa $zone > dig.out$n || ret=1
-grep "status: NOERROR," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "; OPT=100" dig.out$n > /dev/null && { ret=1; reason="option"; }
-grep "IN.SOA." dig.out$n > /dev/null || { ret=1; reason="nosoa"; }
+$DIG $DIGOPTS @10.53.0.1 +ednsopt=100 soa $zone >dig.out$n || ret=1
+grep "status: NOERROR," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "; OPT=100" dig.out$n >/dev/null && {
+ ret=1
+ reason="option"
+}
+grep "IN.SOA." dig.out$n >/dev/null || {
+ ret=1
+ reason="nosoa"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "Unknown EDNS version + option ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsneg +ednsopt=100 soa $zone > dig.out$n || ret=1
-grep "status: BADVERS," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "; OPT=100" dig.out$n > /dev/null && { ret=1; reason="option"; }
-grep "IN.SOA." dig.out$n > /dev/null && { ret=1; reason="soa"; }
+$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsneg +ednsopt=100 soa $zone >dig.out$n || ret=1
+grep "status: BADVERS," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "; OPT=100" dig.out$n >/dev/null && {
+ ret=1
+ reason="option"
+}
+grep "IN.SOA." dig.out$n >/dev/null && {
+ ret=1
+ reason="soa"
+}
if [ $ret != 0 ]; then echo_i "failed: $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "Unknown EDNS flag ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +ednsflags=0x80 soa $zone > dig.out$n || ret=1
-grep "status: NOERROR," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "EDNS:.*MBZ" dig.out$n > /dev/null > /dev/null && { ret=1; reason="mbz"; }
-grep ".IN.SOA." dig.out$n > /dev/null || { ret=1; reason="nosoa"; }
+$DIG $DIGOPTS @10.53.0.1 +ednsflags=0x80 soa $zone >dig.out$n || ret=1
+grep "status: NOERROR," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "EDNS:.*MBZ" dig.out$n >/dev/null >/dev/null && {
+ ret=1
+ reason="mbz"
+}
+grep ".IN.SOA." dig.out$n >/dev/null || {
+ ret=1
+ reason="nosoa"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "Unknown EDNS version + flag ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsneg +ednsflags=0x80 soa $zone > dig.out$n || ret=1
-grep "status: BADVERS," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "EDNS:.*MBZ" dig.out$n > /dev/null > /dev/null && { ret=1; reason="mbz"; }
-grep "IN.SOA." dig.out$n > /dev/null && { ret=1; reason="soa"; }
+$DIG $DIGOPTS @10.53.0.1 +edns=100 +noednsneg +ednsflags=0x80 soa $zone >dig.out$n || ret=1
+grep "status: BADVERS," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "EDNS:.*MBZ" dig.out$n >/dev/null >/dev/null && {
+ ret=1
+ reason="mbz"
+}
+grep "IN.SOA." dig.out$n >/dev/null && {
+ ret=1
+ reason="soa"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "DiG's EDNS negotiation ($n)"
ret=0 reason=
-$DIG $DIGOPTS @10.53.0.1 +edns=100 soa $zone > dig.out$n || ret=1
-grep "status: NOERROR," dig.out$n > /dev/null || { ret=1; reason="status"; }
-grep "EDNS: version: 0," dig.out$n > /dev/null || { ret=1; reason="version"; }
-grep "IN.SOA." dig.out$n > /dev/null || { ret=1; reason="soa"; }
+$DIG $DIGOPTS @10.53.0.1 +edns=100 soa $zone >dig.out$n || ret=1
+grep "status: NOERROR," dig.out$n >/dev/null || {
+ ret=1
+ reason="status"
+}
+grep "EDNS: version: 0," dig.out$n >/dev/null || {
+ ret=1
+ reason="version"
+}
+grep "IN.SOA." dig.out$n >/dev/null || {
+ ret=1
+ reason="soa"
+}
if [ $ret != 0 ]; then echo_i "failed $reason"; fi
status=$((status + ret))
n=$((n + 1))