add source port configuration tests
check in the log files of receiving servers that the originating ports for notify and SOA query messages were set correctly from configured notify-source and transfer-source options.
This commit is contained in:
@@ -51,16 +51,17 @@ primaries noport { 10.53.0.4; };
|
||||
masters x21 port @EXTRAPORT1@ { noport; };
|
||||
|
||||
zone x1 {
|
||||
type primary;
|
||||
type primary;
|
||||
file "generic.db";
|
||||
also-notify { 10.53.0.3; };
|
||||
notify primary-only;
|
||||
notify-source 10.53.0.2 port @EXTRAPORT2@;
|
||||
notify primary-only;
|
||||
};
|
||||
zone x2 {
|
||||
type primary;
|
||||
type primary;
|
||||
file "generic.db";
|
||||
also-notify { 10.53.0.3; };
|
||||
notify master-only; # test old syntax
|
||||
notify master-only; # test old syntax
|
||||
};
|
||||
|
||||
zone x3 { type primary; file "generic.db"; also-notify { 10.53.0.3; }; };
|
||||
|
||||
@@ -202,6 +202,10 @@ grep "sending notify to 10.53.0.5#[0-9]* : TSIG (b)" ns5/named.run > /dev/null |
|
||||
grep "sending notify to 10.53.0.5#[0-9]* : TSIG (c)" ns5/named.run > /dev/null || ret=1
|
||||
test_end
|
||||
|
||||
test_start "checking notify-source uses port option correctly"
|
||||
grep "10.53.0.2#${EXTRAPORT2}: received notify for zone 'x1'" ns3/named.run > /dev/null || ret=1
|
||||
test_end
|
||||
|
||||
# notify messages were sent to unresponsive 10.53.10.53 during the tests
|
||||
# above, which should time out at some point; we need to wait for them to
|
||||
# appear in the logs in case the tests run faster than the notify timeouts
|
||||
|
||||
@@ -50,6 +50,7 @@ zone "example" {
|
||||
|
||||
zone "primary" {
|
||||
type secondary;
|
||||
transfer-source 10.53.0.3 port @EXTRAPORT1@;
|
||||
primaries { 10.53.0.6; };
|
||||
file "primary.bk";
|
||||
};
|
||||
|
||||
@@ -573,5 +573,12 @@ retry_quiet 10 check_xfer_stats || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=$((status+tmp))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "test that transfer-source uses port option correctly ($n)"
|
||||
tmp=0
|
||||
grep "10.53.0.3#${EXTRAPORT1} (primary): query 'primary/SOA/IN' approved" ns6/named.run > /dev/null || ret=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=$((status+tmp))
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
Reference in New Issue
Block a user