3987. [func] Allow the zone serial of a dynamically updatable
zone to be updated via rndc. [RT #37404]
This commit is contained in:
@@ -890,4 +890,93 @@ $IMPORTKEY -f import.key import.example > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:testing updating inline secure serial via 'rndc signing -serial' ($n)"
|
||||
ret=0
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.n3.pre.test$n
|
||||
newserial=`awk '$4 == "SOA" { print $7 + 10}' dig.out.n3.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -serial ${newserial:-0} nsec3 > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.ns3.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:testing updating inline secure serial via 'rndc signing -serial' with negative change ($n)"
|
||||
ret=0
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.n3.pre.test$n
|
||||
oldserial=`awk '$4 == "SOA" { print $7 }' dig.out.n3.pre.test$n`
|
||||
newserial=`awk '$4 == "SOA" { print $7 - 10}' dig.out.n3.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -serial ${newserial:-0} nsec3 > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.ns3.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
|
||||
[ ${oldserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
#
|
||||
# Freezing only operates on the raw zone.
|
||||
#
|
||||
n=`expr $n + 1`
|
||||
echo "I:testing updating inline secure serial via 'rndc signing -serial' when frozen ($n)"
|
||||
ret=0
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.n3.pre.test$n
|
||||
oldserial=`awk '$4 == "SOA" { print $7 }' dig.out.n3.pre.test$n`
|
||||
newserial=`awk '$4 == "SOA" { print $7 + 10}' dig.out.n3.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze nsec3 > /dev/null 2>&1
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -serial ${newserial:-0} nsec3 > /dev/null 2>&1
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 thaw nsec3 > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG nsec3. SOA -p 5300 @10.53.0.3 > dig.out.ns3.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
|
||||
echo "I:testing updating dynamic serial via 'rndc signing -serial' ($n)"
|
||||
ret=0
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.pre.test$n
|
||||
newserial=`awk '$4 == "SOA" { print $7 + 10}' dig.out.ns2.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:testing updating dynamic serial via 'rndc signing -serial' with negative change ($n)"
|
||||
ret=0
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.pre.test$n
|
||||
oldserial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.pre.test$n`
|
||||
newserial=`awk '$4 == "SOA" { print $7 - 10}' dig.out.ns2.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${oldserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:testing updating dynamic serial via 'rndc signing -serial' when frozen ($n)"
|
||||
ret=0
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.pre.test$n
|
||||
oldserial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.pre.test$n`
|
||||
newserial=`awk '$4 == "SOA" { print $7 + 10}' dig.out.ns2.pre.test$n`
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 freeze bits > /dev/null 2>&1
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 thaw bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG bits. SOA -p 5300 @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${oldserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user