Commit 2d96b63d authored by Mark Andrews's avatar Mark Andrews

3067. [bug] ixfr-from-differences {master|slave}; failed to

                        select the master/slave zones.  [RT #23580]
parent c219c842
3067. [bug] ixfr-from-differences {master|slave}; failed to
select the master/slave zones. [RT #23580]
3066. [func] The DLZ "dlopen" driver is now built by default,
no longer requiring a configure option. To
disable it, use "configure --without-dlopen".
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.172 2011/03/10 04:36:14 each Exp $ */
/* $Id: zoneconf.c,v 1.173 2011/03/11 00:43:53 marka Exp $ */
/*% */
......@@ -1075,10 +1075,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_isboolean(obj))
ixfrdiff = cfg_obj_asboolean(obj);
else if (strcasecmp(cfg_obj_asstring(obj), "master") &&
else if (!strcasecmp(cfg_obj_asstring(obj), "master") &&
ztype == dns_zone_master)
ixfrdiff = ISC_TRUE;
else if (strcasecmp(cfg_obj_asstring(obj), "slave") &&
else if (!strcasecmp(cfg_obj_asstring(obj), "slave") &&
ztype == dns_zone_slave)
ixfrdiff = ISC_TRUE;
else
......
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* 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: rndc.key,v 1.2 2011/03/11 00:43:53 marka Exp $ */
key rndc_key {
secret "1234abcd8765";
algorithm hmac-md5;
};
......@@ -15,13 +15,22 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.14 2007/09/26 03:22:44 marka Exp $
# $Id: clean.sh,v 1.15 2011/03/11 00:43:53 marka Exp $
#
# Clean up after zone transfer tests.
#
rm -f dig.out.ns2 dig.out.ns3
rm -f dig.out.ns1 dig.out.ns2 dig.out.ns3
rm -f dig.out.ns5 dig.out.ns6 dig.out.ns7
rm -f ns1/slave.db
rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl
rm -f ns3/example.bk ns3/tsigzone.bk ns3/example.bk.jnl
rm -f ns3/master.bk ns3/master.bk.jnl
rm -f ns4/named.conf ns4/nil.db
rm -f ns6/*.db ns6/*.bk ns6/*.jnl
rm -f ns7/*.db ns7/*.bk ns7/*.jnl
rm -f */named.memstats
rm -f */named.run
rm -f */ans.run
......@@ -15,9 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.18 2007/06/19 23:47:07 tbox Exp $ */
/* $Id: named.conf,v 1.19 2011/03/11 00:43:54 marka Exp $ */
controls { /* empty */ };
include "../../common/rndc.key";
controls {
inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.1;
......@@ -35,3 +39,8 @@ zone "." {
type master;
file "root.db";
};
zone "slave" {
type master;
file "slave.db";
};
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.21 2007/06/18 23:47:32 tbox Exp $ */
/* $Id: named.conf,v 1.22 2011/03/11 00:43:54 marka Exp $ */
controls { /* empty */ };
......@@ -57,6 +57,12 @@ zone "example" {
file "example.bk";
};
zone "master" {
type slave;
masters { 10.53.0.6; };
file "master.bk";
};
server 10.53.0.2 {
keys { tsigzone.; };
};
......
/*
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* 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.2 2011/03/11 00:43:54 marka Exp $ */
include "../../common/rndc.key";
controls {
inet 10.53.0.6 port 9953 allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.6;
notify-source 10.53.0.6;
transfer-source 10.53.0.6;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.6; };
listen-on-v6 { none; };
recursion no;
notify yes;
ixfr-from-differences master;
check-integrity no;
};
zone "." {
type hint;
file "../../common/root.hint";
};
zone "master" {
type master;
file "master.db";
};
zone "slave" {
type slave;
notify no;
masters { 10.53.0.1; };
file "slave.bk";
};
/*
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* 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.2 2011/03/11 00:43:54 marka Exp $ */
include "../../common/rndc.key";
controls {
inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.7;
notify-source 10.53.0.7;
transfer-source 10.53.0.7;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.7; };
listen-on-v6 { none; };
recursion no;
notify yes;
ixfr-from-differences slave;
check-integrity no;
};
zone "." {
type hint;
file "../../common/root.hint";
};
zone "master2" {
type master;
file "master2.db";
};
zone "slave" {
type slave;
masters { 10.53.0.1; };
file "slave.bk";
};
......@@ -15,10 +15,15 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: setup.sh,v 1.7 2011/03/05 23:52:30 tbox Exp $
# $Id: setup.sh,v 1.8 2011/03/11 00:43:53 marka Exp $
sh clean.sh
sh ../genzone.sh 1 6 7 >ns1/slave.db
sh ../genzone.sh 2 3 >ns2/example.db
sh ../genzone.sh 2 3 >ns2/tsigzone.db
sh ../genzone.sh 6 3 >ns6/master.db
sh ../genzone.sh 7 >ns7/master2.db
rm -f ns4/*.db ns4/*.jnl
cp -f ns4/named.conf.base ns4/named.conf
......@@ -15,7 +15,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.33 2011/03/05 23:52:30 tbox Exp $
# $Id: tests.sh,v 1.34 2011/03/11 00:43:53 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
......@@ -74,7 +74,24 @@ grep ";" dig.out.ns3
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
echo "I:testing ixfr-from-differences"
echo "I:reload servers for in preparation for ixfr-from-differences tests"
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
$RNDC -c ../common/rndc.conf -s 10.53.0.6 -p 9953 reload 2>&1 | sed 's/^/I:ns6 /'
$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reload 2>&1 | sed 's/^/I:ns7 /'
sleep 2
echo "I:updating master zones for ixfr-from-differences tests"
$PERL -i -p -e '
s/0\.0\.0\.0/0.0.0.1/;
s/1397051952/1397051953/
' ns1/slave.db
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
$PERL -i -p -e '
s/0\.0\.0\.0/0.0.0.1/;
......@@ -83,20 +100,106 @@ $PERL -i -p -e '
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
sleep 5
$PERL -i -p -e '
s/0\.0\.0\.0/0.0.0.1/;
s/1397051952/1397051953/
' ns6/master.db
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
$RNDC -c ../common/rndc.conf -s 10.53.0.6 -p 9953 reload 2>&1 | sed 's/^/I:ns6 /'
$PERL -i -p -e '
s/0\.0\.0\.0/0.0.0.1/;
s/1397051952/1397051953/
' ns7/master2.db
sleep 5
$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reload 2>&1 | sed 's/^/I:ns7 /'
sleep 3
echo "I:testing ixfr-from-differences yes;"
tmp=0
$DIG $DIGOPTS example. \
@10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1
@10.53.0.3 axfr -p 5300 > dig.out.ns3 || tmp=1
grep ";" dig.out.ns3
$PERL ../digcomp.pl dig2.good dig.out.ns3 || status=1
$PERL ../digcomp.pl dig2.good dig.out.ns3 || tmp=1
# ns3 has a journal iff it received an IXFR.
test -f ns3/example.bk || tmp=1
test -f ns3/example.bk.jnl || tmp=1
if test $tmp != 0 ; then echo "I:failed"; fi
status=`expr $status + $tmp`
echo "I:testing ixfr-from-differences master; (master zone)"
tmp=0
$DIG $DIGOPTS master. \
@10.53.0.6 axfr -p 5300 > dig.out.ns6 || tmp=1
grep ";" dig.out.ns6
$DIG $DIGOPTS master. \
@10.53.0.3 axfr -p 5300 > dig.out.ns3 || tmp=1
grep ";" dig.out.ns3 && cat dig.out.ns3
$PERL ../digcomp.pl dig.out.ns6 dig.out.ns3 || tmp=1
# ns3 has a journal iff it received an IXFR.
test -f ns3/example.bk.jnl || status=1
test -f ns3/master.bk || tmp=1
test -f ns3/master.bk.jnl || tmp=1
if test $tmp != 0 ; then echo "I:failed"; fi
status=`expr $status + $tmp`
echo "I:testing ixfr-from-differences master; (slave zone)"
tmp=0
$DIG $DIGOPTS slave. \
@10.53.0.6 axfr -p 5300 > dig.out.ns6 || tmp=1
grep ";" dig.out.ns6
$DIG $DIGOPTS slave. \
@10.53.0.1 axfr -p 5300 > dig.out.ns1 || tmp=1
grep ";" dig.out.ns1
$PERL ../digcomp.pl dig.out.ns6 dig.out.ns1 || tmp=1
# ns6 has a journal iff it received an IXFR.
test -f ns6/slave.bk || tmp=1
test -f ns6/slave.bk.jnl && tmp=1
if test $tmp != 0 ; then echo "I:failed"; fi
status=`expr $status + $tmp`
echo "I:testing ixfr-from-differences slave; (master zone)"
tmp=0
# ns7 has a journal iff it generates an IXFR.
test -f ns7/master2.db || tmp=1
test -f ns7/master2.db.jnl && tmp=1
if test $tmp != 0 ; then echo "I:failed"; fi
status=`expr $status + $tmp`
echo "I:testing ixfr-from-differences slave; (slave zone)"
tmp=0
$DIG $DIGOPTS slave. \
@10.53.0.1 axfr -p 5300 > dig.out.ns1 || tmp=1
grep ";" dig.out.ns1
$DIG $DIGOPTS slave. \
@10.53.0.7 axfr -p 5300 > dig.out.ns7 || tmp=1
grep ";" dig.out.ns1
$PERL ../digcomp.pl dig.out.ns7 dig.out.ns1 || tmp=1
# ns7 has a journal iff it generates an IXFR.
test -f ns7/slave.bk || tmp=1
test -f ns7/slave.bk.jnl || tmp=1
if test $tmp != 0 ; then echo "I:failed"; fi
status=`expr $status + $tmp`
# now we test transfers with assorted TSIG glitches
DIGCMD="$DIG $DIGOPTS @10.53.0.4 -p 5300"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment