DNS COOKIE and NSID should also be being processed when returning
BADVERS. Check that this has actually occured by looking for the
cookie and nsid in the response.
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
+ server-id "ns1";
};
zone "." {
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
+$DIG $DIGOPTS @10.53.0.1 +edns=100 +nsid +noednsnegotiation soa $zone >dig.out$n || ret=1
grep "status: BADVERS," dig.out$n >/dev/null || {
ret=1
reason="status"
ret=1
reason="version"
}
+grep "; COOKIE: .* (good)" dig.out$n >/dev/null || {
+ ret=1
+ reason="cookie missing"
+}
+grep '; NSID: 6e 73 31 ("ns1")' dig.out$n >/dev/null || {
+ ret=1
+ reason="nsid missing"
+}
grep "IN.SOA." dig.out$n >/dev/null && {
ret=1
reason="soa"