mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
Check synthesis of A record from wildcard A
This commit is contained in:
committed by
Petr Špaček
parent
b8563db96a
commit
25915e81b4
@@ -51,6 +51,19 @@ check_nosynth_soa() (
|
|||||||
return 0
|
return 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
check_synth_a() (
|
||||||
|
name=$(echo "$1" | sed 's/\./\\./g')
|
||||||
|
grep "^${name}.*[0-9]*.IN.A.[0-2]" ${2} > /dev/null || return 1
|
||||||
|
grep "^${name}.*3600.IN.A.[0-2]" ${2} > /dev/null && return 1
|
||||||
|
return 0
|
||||||
|
)
|
||||||
|
|
||||||
|
check_nosynth_a() (
|
||||||
|
name=$(echo "$1" | sed 's/\./\\./g')
|
||||||
|
grep "^${name}.*3600.IN.A.[0-2]" ${2} > /dev/null || return 1
|
||||||
|
return 0
|
||||||
|
)
|
||||||
|
|
||||||
for ns in 2 4 5
|
for ns in 2 4 5
|
||||||
do
|
do
|
||||||
case $ns in
|
case $ns in
|
||||||
@@ -86,7 +99,7 @@ do
|
|||||||
dig_with_opts a.wild-a.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
|
dig_with_opts a.wild-a.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
|
||||||
check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
|
check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
|
||||||
check_status NOERROR dig.out.ns${ns}.test$n || ret=1
|
check_status NOERROR dig.out.ns${ns}.test$n || ret=1
|
||||||
grep "a.wild-a.example.*3600.IN.A" dig.out.ns${ns}.test$n > /dev/null || ret=1
|
check_nosynth_a a.wild-a.example. dig.out.ns${ns}.test$n || ret=1
|
||||||
n=$((n+1))
|
n=$((n+1))
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status+ret))
|
status=$((status+ret))
|
||||||
@@ -164,10 +177,9 @@ do
|
|||||||
check_status NOERROR dig.out.ns${ns}.test$n || ret=1
|
check_status NOERROR dig.out.ns${ns}.test$n || ret=1
|
||||||
if [ ${synth} = yes ]
|
if [ ${synth} = yes ]
|
||||||
then
|
then
|
||||||
grep "b\.wild-a\.example\..*IN.A" dig.out.ns${ns}.test$n > /dev/null || ret=1
|
check_synth_a b.wild-a.example. dig.out.ns${ns}.test$n || ret=1
|
||||||
grep "b\.wild-a\.example\..*3600.IN.A" dig.out.ns${ns}.test$n > /dev/null && ret=1
|
|
||||||
else
|
else
|
||||||
grep "b\.wild-a\.example\..*3600.IN.A" dig.out.ns${ns}.test$n > /dev/null || ret=1
|
check_nosynth_a b.wild-a.example. dig.out.ns${ns}.test$n || ret=1
|
||||||
fi
|
fi
|
||||||
n=$((n+1))
|
n=$((n+1))
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
Reference in New Issue
Block a user