4037. [bug] also-notify was ignoring the tsig key when checking
for duplicates resulting in some expected notify
messages not being sent. [RT #38369]
This commit is contained in:
@@ -20,12 +20,18 @@
|
||||
#
|
||||
|
||||
rm -f */named.memstats
|
||||
rm -f dig.out.?.ns5.test*
|
||||
rm -f dig.out.ns2.test*
|
||||
rm -f dig.out.ns3.test*
|
||||
rm -f dig.out.ns4.test*
|
||||
rm -f log.out
|
||||
rm -f ns*/named.lock
|
||||
rm -f ns2/example.db
|
||||
rm -f ns2/x21.db*
|
||||
rm -f ns3/example.bk
|
||||
rm -f ns4/x21.bk*
|
||||
rm -f ns*/named.lock
|
||||
rm -f ns5/x21.bk-b
|
||||
rm -f ns5/x21.bk-b.jnl
|
||||
rm -f ns5/x21.bk-c
|
||||
rm -f ns5/x21.bk-c.jnl
|
||||
rm -f ns5/x21.db.jnl
|
||||
|
||||
75
bin/tests/system/notify/ns5/named.conf
Normal file
75
bin/tests/system/notify/ns5/named.conf
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.24 2007/06/18 23:47:29 tbox Exp $ */
|
||||
|
||||
controls { /* empty */ };
|
||||
|
||||
key "a" {
|
||||
algorithm "hmac-md5";
|
||||
secret "aaaaaaaaaaaaaaaaaaaa";
|
||||
};
|
||||
|
||||
key "b" {
|
||||
algorithm "hmac-md5";
|
||||
secret "bbbbbbbbbbbbbbbbbbbb";
|
||||
};
|
||||
|
||||
key "c" {
|
||||
algorithm "hmac-md5";
|
||||
secret "cccccccccccccccccccc";
|
||||
};
|
||||
|
||||
options {
|
||||
query-source address 10.53.0.5;
|
||||
notify-source 10.53.0.5;
|
||||
transfer-source 10.53.0.5;
|
||||
port 5300;
|
||||
pid-file "named.pid";
|
||||
listen-on { 10.53.0.5; };
|
||||
listen-on-v6 { none; };
|
||||
recursion yes;
|
||||
acache-enable yes;
|
||||
notify yes;
|
||||
};
|
||||
|
||||
view "a" {
|
||||
match-clients { key "a"; };
|
||||
zone "x21" {
|
||||
type master;
|
||||
also-notify { 10.53.0.5 key "b"; 10.53.0.5 key "c"; };
|
||||
file "x21.db";
|
||||
allow-update { any; };
|
||||
};
|
||||
};
|
||||
|
||||
view "b" {
|
||||
match-clients { key "b"; };
|
||||
zone "x21" {
|
||||
type slave;
|
||||
masters { 10.53.0.5 key "a"; };
|
||||
file "x21.bk-b";
|
||||
};
|
||||
};
|
||||
|
||||
view "c" {
|
||||
match-clients { key "c"; };
|
||||
zone "x21" {
|
||||
type slave;
|
||||
masters { 10.53.0.5 key "a"; };
|
||||
file "x21.bk-c";
|
||||
};
|
||||
};
|
||||
25
bin/tests/system/notify/ns5/x21.db
Normal file
25
bin/tests/system/notify/ns5/x21.db
Normal file
@@ -0,0 +1,25 @@
|
||||
; Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; Permission to use, copy, modify, and/or distribute this software for any
|
||||
; purpose with or without fee is hereby granted, provided that the above
|
||||
; copyright notice and this permission notice appear in all copies.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
; PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
$TTL 300 ; 5 minutes
|
||||
@ IN SOA mname1. . (
|
||||
1 ; serial
|
||||
300 ; refresh (300 seconds)
|
||||
300 ; retry (300 seconds)
|
||||
1814400 ; expire (3 weeks)
|
||||
3600 ; minimum (1 hour)
|
||||
)
|
||||
NS ns5
|
||||
ns5 A 10.53.0.5
|
||||
a A 10.0.0.1
|
||||
@@ -170,5 +170,35 @@ grep "test string" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
[ $ret = 0 ] || echo "I:failed"
|
||||
status=`expr $ret + $status`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking notify to multiple views using tsig"
|
||||
ret=0
|
||||
$NSUPDATE << EOF
|
||||
server 10.53.0.5 5300
|
||||
zone x21
|
||||
key a aaaaaaaaaaaaaaaaaaaa
|
||||
update add added.x21 0 in txt "test string"
|
||||
send
|
||||
EOF
|
||||
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd added.x21.\
|
||||
-y b:bbbbbbbbbbbbbbbbbbbb @10.53.0.5 \
|
||||
txt -p 5300 > dig.out.b.ns5.test$n || ret=1
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd added.x21.\
|
||||
-y c:cccccccccccccccccccc @10.53.0.5 \
|
||||
txt -p 5300 > dig.out.c.ns5.test$n || ret=1
|
||||
grep "test string" dig.out.b.ns5.test$n > /dev/null &&
|
||||
grep "test string" dig.out.c.ns5.test$n > /dev/null &&
|
||||
break
|
||||
sleep 1
|
||||
done
|
||||
grep "test string" dig.out.b.ns5.test$n > /dev/null || ret=1
|
||||
grep "test string" dig.out.c.ns5.test$n > /dev/null || ret=1
|
||||
|
||||
[ $ret = 0 ] || echo "I:failed"
|
||||
status=`expr $ret + $status`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user