From 6ecc5850ef7fa91be2984f72df4cf338e3eaaea2 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 19 Apr 2011 22:31:43 +0000 Subject: [PATCH] 3099. [test] "dlz" system test now runs but gives R:SKIPPED if not compiled with --with-dlz-filesystem. [RT #24146] 3098. [bug] DLZ zones were answering without setting the AA bit. [RT #24146] --- CHANGES | 6 ++++++ bin/named/query.c | 7 ++++--- bin/tests/system/conf.sh.in | 6 +++--- bin/tests/system/dlz/prereq.sh.in | 25 +++++++++++++++++++++++++ bin/tests/system/dlz/tests.sh | 3 ++- configure.in | 8 ++++++-- contrib/dlz/config.dlz.in | 2 +- 7 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 bin/tests/system/dlz/prereq.sh.in diff --git a/CHANGES b/CHANGES index 5324c64f13..5d654a2a34 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +3099. [test] "dlz" system test now runs but gives R:SKIPPED if + not compiled with --with-dlz-filesystem. [RT #24146] + +3098. [bug] DLZ zones were answering without setting the AA bit. + [RT #24146] + 3097. [test] Add a tool to test handling of malformed packets. [RT #24096] diff --git a/bin/named/query.c b/bin/named/query.c index 0e1c6f32b8..017e640fdc 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.353.8.5 2011/03/18 21:25:18 fdupont Exp $ */ +/* $Id: query.c,v 1.353.8.6 2011/04/19 22:31:42 each Exp $ */ /*! \file */ @@ -5181,9 +5181,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) } is_staticstub_zone = ISC_FALSE; - if (is_zone && zone != NULL) { + if (is_zone) { authoritative = ISC_TRUE; - if (dns_zone_gettype(zone) == dns_zone_staticstub) + if (zone != NULL && + dns_zone_gettype(zone) == dns_zone_staticstub) is_staticstub_zone = ISC_TRUE; } diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index d514d23906..f97163c143 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: conf.sh.in,v 1.59.8.5 2011/03/18 21:27:51 fdupont Exp $ +# $Id: conf.sh.in,v 1.59.8.6 2011/04/19 22:31:42 each Exp $ # # Common configuration data for system tests, to be sourced into @@ -53,8 +53,8 @@ JOURNALPRINT=$TOP/bin/tools/named-journalprint # load on the machine to make it unusable to other users. # v6synth SUBDIRS="acl allow_query addzone autosign cacheclean checkconf - checknames checkzone database dlv dlvauto @DLZ_SYSTEM_TEST@ - dlzexternal dname dns64 dnssec forward glue gost ixfr limits + checknames checkzone database dlv dlvauto dlz dlzexternal + dname dns64 dnssec forward glue gost ixfr limits logfileconfig lwresd masterfile masterformat metadata notify nsupdate pending pkcs11 resolver rpz rrsetorder sortlist smartsign staticstub stub tkey tsig tsiggss unknown upforwd diff --git a/bin/tests/system/dlz/prereq.sh.in b/bin/tests/system/dlz/prereq.sh.in new file mode 100644 index 0000000000..4557442605 --- /dev/null +++ b/bin/tests/system/dlz/prereq.sh.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright (C) 2011 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: prereq.sh.in,v 1.2.2.2 2011/04/19 22:31:43 each Exp $ + +TOP=${SYSTEMTESTTOP:=.}/../../../.. + +if [ "@DLZ_SYSTEM_TEST@" != "filesystem" ]; then + echo "I:DLZ filesystem driver not supported" + exit 255 +fi +exit 0 diff --git a/bin/tests/system/dlz/tests.sh b/bin/tests/system/dlz/tests.sh index 112d13ac3e..f384b3aef3 100644 --- a/bin/tests/system/dlz/tests.sh +++ b/bin/tests/system/dlz/tests.sh @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.2 2010/08/16 04:46:15 marka Exp $ +# $Id: tests.sh,v 1.2.76.1 2011/04/19 22:31:43 each Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -35,6 +35,7 @@ $DIG $DIGOPTS +norec foo.example.com. \ grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1 grep "example.com..*DNAME.*example.net." dig.out.ns1.test$n > /dev/null || ret=1 grep "foo.example.com..*CNAME.*foo.example.net." dig.out.ns1.test$n > /dev/null || ret=1 +grep "flags:[^;]* aa[ ;]" dig.out.ns1.test$n > /dev/null || ret=1 n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` diff --git a/configure.in b/configure.in index 4886787416..ac4433a1c3 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.512.8.8 $) +AC_REVISION($Revision: 1.512.8.9 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.59) @@ -3195,7 +3195,10 @@ AC_ARG_WITH(dlopen, dlopen="$withval", dlopen="yes") if test "$dlopen" = "yes"; then - AC_CHECK_LIB(dl, dlclose, have_dl=yes, have_dl=no) + AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) + if test "$have_dl" = "yes"; then + LIBS="-ldl $LIBS" + fi AC_CHECK_FUNCS(dlopen dlclose dlsym,,dlopen=no) fi @@ -3422,6 +3425,7 @@ AC_CONFIG_FILES([ bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh + bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/named.conf bin/tests/system/filter-aaaa/Makefile diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in index a693b56566..0aa34fa8a0 100644 --- a/contrib/dlz/config.dlz.in +++ b/contrib/dlz/config.dlz.in @@ -339,7 +339,7 @@ case "$use_dlz_filesystem" in ;; *) DLZ_ADD_DRIVER(FILESYSTEM, dlz_filesystem_driver) - DLZ_SYSTEM_TEST=dlz + DLZ_SYSTEM_TEST=filesystem AC_MSG_RESULT(yes) ;; esac