From 2284b84d74cdfd62ecb962feb850de981bbc2196 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 23 Apr 2008 21:32:57 +0000 Subject: [PATCH] Make "rrset-order fixed" a compile-time option. settable by "./configure --enable-fixed-rrset". Disabled by default. [rt17977] --- CHANGES | 4 +++ config.h.in | 5 ++- configure | 84 +++++++++++++++++++++++++++++---------------- configure.in | 21 +++++++++++- lib/bind9/check.c | 9 ++--- lib/dns/rbtdb.c | 6 +--- lib/dns/rdataslab.c | 8 ++--- 7 files changed, 89 insertions(+), 48 deletions(-) diff --git a/CHANGES b/CHANGES index 77ce4effae..561a7c6242 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +2362. [cleanup] Make "rrset-order fixed" a compile-time option. + settable by "./configure --enable-fixed-rrset". + Disabled by default. [rt17977] + 2361. [bug] "recursion" statistics counter could be counted multiple times for a single query. [RT #17990] diff --git a/config.h.in b/config.h.in index 3e6b2e4255..40069bc86a 100644 --- a/config.h.in +++ b/config.h.in @@ -16,7 +16,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.in,v 1.96 2008/03/20 04:51:00 marka Exp $ */ +/* $Id: config.h.in,v 1.97 2008/04/23 21:32:01 each Exp $ */ /*! \file */ @@ -326,3 +326,6 @@ int sigwait(const unsigned int *set, int *sig); /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile + +/* Define to enable "rrset-order fixed" syntax. */ +#undef DNS_RDATASET_FIXED diff --git a/configure b/configure index e22606b87e..917ba4c281 100755 --- a/configure +++ b/configure @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. # -# $Id: configure,v 1.425 2008/03/31 14:59:39 fdupont Exp $ +# $Id: configure,v 1.426 2008/04/23 21:32:57 each Exp $ # # Portions Copyright (C) 1996-2001 Nominum, Inc. # @@ -29,7 +29,7 @@ # 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. -# From configure.in Revision: 1.440 . +# From configure.in Revision: 1.441 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -1638,6 +1638,8 @@ Optional Features: --disable-linux-caps disable linux capabilities --enable-atomic enable machine specific atomic operations [default=autodetect] + --enable-fixed-rrset enable fixed rrset ordering + [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -9614,7 +9616,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 9617 "configure"' > conftest.$ac_ext + echo '#line 9619 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11736,11 +11738,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11739: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11741: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11743: \$? = $ac_status" >&5 + echo "$as_me:11745: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11979,11 +11981,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11982: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11984: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11986: \$? = $ac_status" >&5 + echo "$as_me:11988: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12039,11 +12041,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12042: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12044: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12046: \$? = $ac_status" >&5 + echo "$as_me:12048: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14187,7 +14189,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:16483: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16485: \$? = $ac_status" >&5 + echo "$as_me:16487: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16538,11 +16540,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16541: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16543: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16545: \$? = $ac_status" >&5 + echo "$as_me:16547: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17866,7 +17868,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:18806: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18808: \$? = $ac_status" >&5 + echo "$as_me:18810: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -18861,11 +18863,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18864: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18866: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18868: \$? = $ac_status" >&5 + echo "$as_me:18870: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20895,11 +20897,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20898: $lt_compile\"" >&5) + (eval echo "\"\$as_me:20900: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:20902: \$? = $ac_status" >&5 + echo "$as_me:20904: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21138,11 +21140,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21141: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21143: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21145: \$? = $ac_status" >&5 + echo "$as_me:21147: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21198,11 +21200,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21201: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21203: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21205: \$? = $ac_status" >&5 + echo "$as_me:21207: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23346,7 +23348,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <>confdefs.h <<\_ACEOF +#define DNS_RDATASET_FIXED 1 +_ACEOF + + ;; + no) + ;; + *) + ;; +esac + # # The following sets up how non-blocking i/o is established. # Sunos, cygwin and solaris 2.x (x<5) require special handling. diff --git a/configure.in b/configure.in index 5674d8ced0..94935bfee3 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.440 $) +AC_REVISION($Revision: 1.441 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.59) @@ -2261,6 +2261,25 @@ AC_SUBST(ISC_PLATFORM_USEMACASM) ISC_ARCH_DIR=$arch AC_SUBST(ISC_ARCH_DIR) +# +# Activate "rrset-order fixed" or not? +# +AC_ARG_ENABLE(fixed-rrset, + [ --enable-fixed-rrset enable fixed rrset ordering + [[default=no]]], + enable_fixed="$enableval", + enable_fixed="no") +case "$enable_fixed" in + yes) + AC_DEFINE(DNS_RDATASET_FIXED, 1, + [Define to enable "rrset-order fixed" syntax.]) + ;; + no) + ;; + *) + ;; +esac + # # The following sets up how non-blocking i/o is established. # Sunos, cygwin and solaris 2.x (x<5) require special handling. diff --git a/lib/bind9/check.c b/lib/bind9/check.c index 3422f92cb4..d4f2192228 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.91 2008/04/02 02:37:42 marka Exp $ */ +/* $Id: check.c,v 1.92 2008/04/23 21:32:01 each Exp $ */ /*! \file */ @@ -46,10 +46,6 @@ #include -#ifndef DNS_RDATASET_FIXED -#define DNS_RDATASET_FIXED 1 -#endif - static void freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) { UNUSED(type); @@ -128,7 +124,8 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) { } else if (strcasecmp(cfg_obj_asstring(obj), "fixed") == 0) { #if !DNS_RDATASET_FIXED cfg_obj_log(obj, logctx, ISC_LOG_WARNING, - "rrset-order: order 'fixed' not fully implemented"); + "rrset-order: order 'fixed' was disabled at " + "compilation time"); #endif } else if (strcasecmp(cfg_obj_asstring(obj), "random") != 0 && strcasecmp(cfg_obj_asstring(obj), "cyclic") != 0) { diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 13da2b1f1e..ed2f16fca7 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.258 2008/04/09 04:31:11 marka Exp $ */ +/* $Id: rbtdb.c,v 1.259 2008/04/23 21:32:01 each Exp $ */ /*! \file */ @@ -186,10 +186,6 @@ typedef isc_mutex_t nodelock_t; #define NODE_WEAKDOWNGRADE(l) ((void)0) #endif -#ifndef DNS_RDATASET_FIXED -#define DNS_RDATASET_FIXED 1 -#endif - /* * Allow clients with a virtual time of up to 5 minutes in the past to see * records that would have otherwise have expired. diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index 13e223337e..f84bed0393 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdataslab.c,v 1.46 2008/04/02 02:37:42 marka Exp $ */ +/* $Id: rdataslab.c,v 1.47 2008/04/23 21:32:01 each Exp $ */ /*! \file */ @@ -33,10 +33,6 @@ #include #include -#ifndef DNS_RDATASET_FIXED -#define DNS_RDATASET_FIXED 1 -#endif - /* * The rdataslab structure allows iteration to occur in both load order * and DNSSEC order. The structure is as follows: @@ -848,8 +844,8 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab, #if DNS_RDATASET_FIXED unsigned char *offsetbase; unsigned int *offsettable; -#endif unsigned int order; +#endif REQUIRE(tslabp != NULL && *tslabp == NULL); REQUIRE(mslab != NULL && sslab != NULL); -- GitLab