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.
(cherry picked from commit
f69b4bc5e0472035259dfc9df03ee0a9c02925dc)
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"