Codebase list unbound / ab7435c
Merge tag 'upstream/1.5.1' Upstream version 1.5.1 Robert Edmonds 9 years ago
43 changed file(s) with 1458 addition(s) and 2315 deletion(s). Raw diff Collapse all Expand all
7979 # FreeBSD
8080 LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_METHOD=int" "-D_RuneLocale=int" "-D__va_list=va_list"
8181
82 INSTALL=$(srcdir)/install-sh
82 INSTALL=$(SHELL) $(srcdir)/install-sh
8383
8484 #pythonmod.c is not here, it is mentioned by itself in its own rules,
8585 #makedepend fails on missing interface.h otherwise.
5252
5353 void _ARC4_LOCK(void)
5454 {
55 if(!arc4lockinit)
55 if(!arc4lockinit) {
56 arc4lockinit = 1;
5657 lock_quick_init(&arc4lock);
58 }
5759 lock_quick_lock(&arc4lock);
5860 }
5961
4747 #include <time.h>
4848 #include <openssl/sha.h>
4949
50 #include <linux/types.h>
5051 #include <linux/random.h>
5152 #include <linux/sysctl.h>
5253 #ifdef HAVE_GETAUXVAL
7677 #endif
7778 static int gotdata(char *buf, size_t len);
7879 static int getentropy_urandom(void *buf, size_t len);
79 #ifdef CTL_MAXNAME
80 #ifdef SYS__sysctl
8081 static int getentropy_sysctl(void *buf, size_t len);
8182 #endif
8283 static int getentropy_fallback(void *buf, size_t len);
101102 if (ret != -1)
102103 return (ret);
103104
104 #ifdef CTL_MAXNAME
105 #ifdef SYS__sysctl
105106 /*
106107 * Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID.
107108 * sysctl is a failsafe API, so it guarantees a result. This
123124 ret = getentropy_sysctl(buf, len);
124125 if (ret != -1)
125126 return (ret);
126 #endif /* CTL_MAXNAME */
127 #endif /* SYS__sysctl */
127128
128129 /*
129130 * Entropy collection via /dev/urandom and sysctl have failed.
234235 return -1;
235236 }
236237
237 #ifdef CTL_MAXNAME
238 #ifdef SYS__sysctl
238239 static int
239240 getentropy_sysctl(void *buf, size_t len)
240241 {
264265 errno = EIO;
265266 return -1;
266267 }
267 #endif /* CTL_MAXNAME */
268 #endif /* SYS__sysctl */
268269
269270 static int cl[] = {
270271 CLOCK_REALTIME,
4040 }
4141
4242 if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
43 CRYPT_VERIFYCONTEXT) != 0)
43 CRYPT_VERIFYCONTEXT) == 0)
4444 goto fail;
45 if (CryptGenRandom(provider, len, buf) != 0) {
45 if (CryptGenRandom(provider, len, buf) == 0) {
4646 CryptReleaseContext(provider, 0);
4747 goto fail;
4848 }
00 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* define if a library can reference the 'main' symbol */
3 #undef CAN_REFERENCE_MAIN
41
52 /* Directory to chroot to */
63 #undef CHROOT_DIR
+768
-2173
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for unbound 1.5.0rc1.
2 # Generated by GNU Autoconf 2.69 for unbound 1.5.1.
33 #
44 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='unbound'
591591 PACKAGE_TARNAME='unbound'
592 PACKAGE_VERSION='1.5.0rc1'
593 PACKAGE_STRING='unbound 1.5.0rc1'
592 PACKAGE_VERSION='1.5.1'
593 PACKAGE_STRING='unbound 1.5.1'
594594 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
595595 PACKAGE_URL=''
596596
13861386 # Omit some internal or obsolete options to make the list less imposing.
13871387 # This message is too long to be a string in the A/UX 3.1 sh.
13881388 cat <<_ACEOF
1389 \`configure' configures unbound 1.5.0rc1 to adapt to many kinds of systems.
1389 \`configure' configures unbound 1.5.1 to adapt to many kinds of systems.
13901390
13911391 Usage: $0 [OPTION]... [VAR=VALUE]...
13921392
14511451
14521452 if test -n "$ac_init_help"; then
14531453 case $ac_init_help in
1454 short | recursive ) echo "Configuration of unbound 1.5.0rc1:";;
1454 short | recursive ) echo "Configuration of unbound 1.5.1:";;
14551455 esac
14561456 cat <<\_ACEOF
14571457
16261626 test -n "$ac_init_help" && exit $ac_status
16271627 if $ac_init_version; then
16281628 cat <<\_ACEOF
1629 unbound configure 1.5.0rc1
1629 unbound configure 1.5.1
16301630 generated by GNU Autoconf 2.69
16311631
16321632 Copyright (C) 2012 Free Software Foundation, Inc.
23352335 This file contains any messages produced by compilers while
23362336 running configure, to aid debugging if configure makes a mistake.
23372337
2338 It was created by unbound $as_me 1.5.0rc1, which was
2338 It was created by unbound $as_me 1.5.1, which was
23392339 generated by GNU Autoconf 2.69. Invocation command line was
23402340
23412341 $ $0 $@
26872687
26882688 UNBOUND_VERSION_MINOR=5
26892689
2690 UNBOUND_VERSION_MICRO=0rc1
2690 UNBOUND_VERSION_MICRO=1
26912691
26922692
26932693 LIBUNBOUND_CURRENT=5
27312731 # 1.4.21 had 4:1:2
27322732 # 1.4.22 had 4:1:2
27332733 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2734 # 1.5.1 had 5:4:3
27342735
27352736 # Current -- the number of the binary API that we're implementing
27362737 # Revision -- which iteration of the implementation of the binary
1831118312
1831218313 ;;
1831318314 esac
18314 # generate libtool to test if linking main
18315 # from a dynamic library works.
18316 : ${CONFIG_LT=./config.lt}
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
18318 $as_echo "$as_me: creating $CONFIG_LT" >&6;}
18315 fi
18316
18317 fi
18318 done
18319
18320 fi
18321 fi
18322 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
18323
18324 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
18325 if test "x$ac_cv_func_ctime_r" = xyes; then :
18326 $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
18327
18328 else
18329 case " $LIBOBJS " in
18330 *" ctime_r.$ac_objext "* ) ;;
18331 *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
18332 ;;
18333 esac
18334
18335 fi
18336
18337
18338
18339 # Check whether --enable-allsymbols was given.
18340 if test "${enable_allsymbols+set}" = set; then :
18341 enableval=$enable_allsymbols;
18342 fi
18343
18344 case "$enable_allsymbols" in
18345 yes)
18346 COMMON_OBJ_ALL_SYMBOLS=""
18347 UBSYMS=""
18348 EXTRALINK="-L. -L.libs -lunbound"
18349
18350 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
18351
18352 ;;
18353 no|*)
18354 COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
18355 UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
18356 EXTRALINK=""
18357 ;;
18358 esac
18359
18360
18361
18362 if test x_$enable_lock_checks = x_yes; then
18363 UBSYMS="-export-symbols clubsyms.def"
18364 cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
18365 echo lock_protect >> clubsyms.def
18366 echo lock_unprotect >> clubsyms.def
18367 echo lock_get_mem >> clubsyms.def
18368 echo checklock_start >> clubsyms.def
18369 echo checklock_stop >> clubsyms.def
18370 echo checklock_lock >> clubsyms.def
18371 echo checklock_unlock >> clubsyms.def
18372 echo checklock_init >> clubsyms.def
18373 echo checklock_thrcreate >> clubsyms.def
18374 echo checklock_thrjoin >> clubsyms.def
18375 fi
18376
18377 # check for dnstap if requested
18378
18379 # Check whether --enable-dnstap was given.
18380 if test "${enable_dnstap+set}" = set; then :
18381 enableval=$enable_dnstap; opt_dnstap=$enableval
18382 else
18383 opt_dnstap=no
18384 fi
18385
18386
18387
18388 # Check whether --with-dnstap-socket-path was given.
18389 if test "${with_dnstap_socket_path+set}" = set; then :
18390 withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
18391 else
18392 opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
18393 fi
18394
18395
18396 if test "x$opt_dnstap" != "xno"; then
18397 # Extract the first word of "protoc-c", so it can be a program name with args.
18398 set dummy protoc-c; ac_word=$2
18399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400 $as_echo_n "checking for $ac_word... " >&6; }
18401 if ${ac_cv_path_PROTOC_C+:} false; then :
18402 $as_echo_n "(cached) " >&6
18403 else
18404 case $PROTOC_C in
18405 [\\/]* | ?:[\\/]*)
18406 ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
18407 ;;
18408 *)
18409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410 for as_dir in $PATH
18411 do
18412 IFS=$as_save_IFS
18413 test -z "$as_dir" && as_dir=.
18414 for ac_exec_ext in '' $ac_executable_extensions; do
18415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416 ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
18417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418 break 2
18419 fi
18420 done
18421 done
18422 IFS=$as_save_IFS
18423
18424 ;;
18425 esac
18426 fi
18427 PROTOC_C=$ac_cv_path_PROTOC_C
18428 if test -n "$PROTOC_C"; then
18429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
18430 $as_echo "$PROTOC_C" >&6; }
18431 else
18432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433 $as_echo "no" >&6; }
18434 fi
18435
18436
18437 if test -z "$PROTOC_C"; then
18438 as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
18439 fi
18440
18441 # Check whether --with-protobuf-c was given.
18442 if test "${with_protobuf_c+set}" = set; then :
18443 withval=$with_protobuf_c;
18444 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18445 if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
18446 CFLAGS="$CFLAGS -I$withval/include/google"
18447 else
18448 CFLAGS="$CFLAGS -I$withval/include"
18449 fi
18450 LDFLAGS="$LDFLAGS -L$withval/lib"
18451
18452 else
18453
18454 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
18455 if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
18456 CFLAGS="$CFLAGS -I/usr/include/google"
18457 else
18458 if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
18459 CFLAGS="$CFLAGS -I/usr/local/include/google"
18460 LDFLAGS="$LDFLAGS -L/usr/local/lib"
18461 fi
18462 fi
18463
18464 fi
18465
18466
18467 # Check whether --with-libfstrm was given.
18468 if test "${with_libfstrm+set}" = set; then :
18469 withval=$with_libfstrm;
18470 CFLAGS="$CFLAGS -I$withval/include"
18471 LDFLAGS="$LDFLAGS -L$withval/lib"
18472
18473 fi
18474
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
18476 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
18477 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18478 $as_echo_n "(cached) " >&6
18479 else
18480 ac_func_search_save_LIBS=$LIBS
18481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18482 /* end confdefs.h. */
18483
18484 /* Override any GCC internal prototype to avoid an error.
18485 Use char because int might match the return type of a GCC
18486 builtin and then its argument prototype would still apply. */
18487 #ifdef __cplusplus
18488 extern "C"
18489 #endif
18490 char fstrm_iothr_init ();
18491 int
18492 main ()
18493 {
18494 return fstrm_iothr_init ();
18495 ;
18496 return 0;
18497 }
18498 _ACEOF
18499 for ac_lib in '' fstrm; do
18500 if test -z "$ac_lib"; then
18501 ac_res="none required"
18502 else
18503 ac_res=-l$ac_lib
18504 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18505 fi
18506 if ac_fn_c_try_link "$LINENO"; then :
18507 ac_cv_search_fstrm_iothr_init=$ac_res
18508 fi
18509 rm -f core conftest.err conftest.$ac_objext \
18510 conftest$ac_exeext
18511 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18512 break
18513 fi
18514 done
18515 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
18516
18517 else
18518 ac_cv_search_fstrm_iothr_init=no
18519 fi
18520 rm conftest.$ac_ext
18521 LIBS=$ac_func_search_save_LIBS
18522 fi
18523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
18524 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
18525 ac_res=$ac_cv_search_fstrm_iothr_init
18526 if test "$ac_res" != no; then :
18527 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18528
18529 else
18530 as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
18531 fi
18532
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
18534 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
18535 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18536 $as_echo_n "(cached) " >&6
18537 else
18538 ac_func_search_save_LIBS=$LIBS
18539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18540 /* end confdefs.h. */
18541
18542 /* Override any GCC internal prototype to avoid an error.
18543 Use char because int might match the return type of a GCC
18544 builtin and then its argument prototype would still apply. */
18545 #ifdef __cplusplus
18546 extern "C"
18547 #endif
18548 char protobuf_c_message_pack ();
18549 int
18550 main ()
18551 {
18552 return protobuf_c_message_pack ();
18553 ;
18554 return 0;
18555 }
18556 _ACEOF
18557 for ac_lib in '' protobuf-c; do
18558 if test -z "$ac_lib"; then
18559 ac_res="none required"
18560 else
18561 ac_res=-l$ac_lib
18562 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18563 fi
18564 if ac_fn_c_try_link "$LINENO"; then :
18565 ac_cv_search_protobuf_c_message_pack=$ac_res
18566 fi
18567 rm -f core conftest.err conftest.$ac_objext \
18568 conftest$ac_exeext
18569 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18570 break
18571 fi
18572 done
18573 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
18574
18575 else
18576 ac_cv_search_protobuf_c_message_pack=no
18577 fi
18578 rm conftest.$ac_ext
18579 LIBS=$ac_func_search_save_LIBS
18580 fi
18581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
18582 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
18583 ac_res=$ac_cv_search_protobuf_c_message_pack
18584 if test "$ac_res" != no; then :
18585 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18586
18587 else
18588 as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
18589 fi
18590
18591
18592
18593 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
18594
18595 ENABLE_DNSTAP=1
18596
18597
18598
18599 hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
18600
18601
18602 cat >>confdefs.h <<_ACEOF
18603 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
18604 _ACEOF
18605
18606
18607 DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
18608
18609 DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
18610
18611
18612 else
18613
18614 ENABLE_DNSTAP=0
18615
18616
18617
18618 fi
18619
18620
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
18622 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
18623 # on openBSD, the implicit rule make $< work.
18624 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
18625 # gmake works.
18626 cat >conftest.make <<EOF
18627 all: conftest.lo
18628
18629 conftest.lo foo.lo bla.lo:
18630 if test -f "\$<"; then touch \$@; fi
18631
18632 .SUFFIXES: .lo
18633 .c.lo:
18634 if test -f "\$<"; then touch \$@; fi
18635
18636 conftest.lo: conftest.dir/conftest.c
18637 EOF
18638 mkdir conftest.dir
18639 touch conftest.dir/conftest.c
18640 rm -f conftest.lo conftest.c
18641 ${MAKE:-make} -f conftest.make >/dev/null
18642 rm -f conftest.make conftest.c conftest.dir/conftest.c
18643 rm -rf conftest.dir
18644 if test ! -f conftest.lo; then
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18646 $as_echo "no" >&6; }
18647 SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
18648 SOURCEFILE='`cat .source`'
18649 else
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18651 $as_echo "yes" >&6; }
18652 SOURCEDETERMINE=':'
18653 SOURCEFILE='$<'
18654 fi
18655 rm -f conftest.lo
18656
18657
18658
18659 # see if we want to build the library or everything
18660 ALLTARGET="alltargets"
18661 INSTALLTARGET="install-all"
18662
18663 # Check whether --with-libunbound-only was given.
18664 if test "${with_libunbound_only+set}" = set; then :
18665 withval=$with_libunbound_only;
18666 if test "$withval" = "yes"; then
18667 ALLTARGET="lib"
18668 INSTALLTARGET="install-lib"
18669 fi
18670
18671 fi
18672
18673
18674
18675
18676
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
18678 $as_echo "$as_me: Stripping extension flags..." >&6;}
18679
18680 if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
18681 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
18682
18683 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
18684
18685 fi
18686
18687
18688 if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
18689 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
18690
18691 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
18692
18693 fi
18694
18695
18696 if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
18697 CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
18698
18699 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
18700
18701 fi
18702
18703
18704 if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
18705 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
18706
18707 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
18708
18709 fi
18710
18711
18712 if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
18713 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
18714
18715 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
18716
18717 fi
18718
18719
18720 if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
18721 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
18722
18723 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
18724
18725 fi
18726
18727
18728 if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
18729 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
18730
18731 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
18732
18733 fi
18734
18735
18736 if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
18737 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
18738
18739 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
18740
18741 fi
18742
18743
18744 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
18745
18746
18747 cat >>confdefs.h <<_ACEOF
18748 #define MAXSYSLOGMSGLEN 10240
18749 _ACEOF
18750
18751
18752
18753
18754 version=1.5.1
18755
18756 date=`date +'%b %e, %Y'`
18757
18758
18759 ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h"
18760
18761 ac_config_headers="$ac_config_headers config.h"
18762
18763 cat >confcache <<\_ACEOF
18764 # This file is a shell script that caches the results of configure
18765 # tests run on this system so they can be shared between configure
18766 # scripts and configure runs, see configure's option --config-cache.
18767 # It is not useful on other systems. If it contains results you don't
18768 # want to keep, you may remove or edit it.
18769 #
18770 # config.status only pays attention to the cache file if you give it
18771 # the --recheck option to rerun configure.
18772 #
18773 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18774 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18775 # following values.
18776
18777 _ACEOF
18778
18779 # The following way of writing the cache mishandles newlines in values,
18780 # but we know of no workaround that is simple, portable, and efficient.
18781 # So, we kill variables containing newlines.
18782 # Ultrix sh set writes to stderr and can't be redirected directly,
18783 # and sets the high bit in the cache file unless we assign to the vars.
18784 (
18785 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18786 eval ac_val=\$$ac_var
18787 case $ac_val in #(
18788 *${as_nl}*)
18789 case $ac_var in #(
18790 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18791 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18792 esac
18793 case $ac_var in #(
18794 _ | IFS | as_nl) ;; #(
18795 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18796 *) { eval $ac_var=; unset $ac_var;} ;;
18797 esac ;;
18798 esac
18799 done
18800
18801 (set) 2>&1 |
18802 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18803 *${as_nl}ac_space=\ *)
18804 # `set' does not quote correctly, so add quotes: double-quote
18805 # substitution turns \\\\ into \\, and sed turns \\ into \.
18806 sed -n \
18807 "s/'/'\\\\''/g;
18808 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18809 ;; #(
18810 *)
18811 # `set' quotes correctly as required by POSIX, so do not add quotes.
18812 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18813 ;;
18814 esac |
18815 sort
18816 ) |
18817 sed '
18818 /^ac_cv_env_/b end
18819 t clear
18820 :clear
18821 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18822 t end
18823 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18824 :end' >>confcache
18825 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18826 if test -w "$cache_file"; then
18827 if test "x$cache_file" != "x/dev/null"; then
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18829 $as_echo "$as_me: updating cache $cache_file" >&6;}
18830 if test ! -f "$cache_file" || test -h "$cache_file"; then
18831 cat confcache >"$cache_file"
18832 else
18833 case $cache_file in #(
18834 */* | ?:*)
18835 mv -f confcache "$cache_file"$$ &&
18836 mv -f "$cache_file"$$ "$cache_file" ;; #(
18837 *)
18838 mv -f confcache "$cache_file" ;;
18839 esac
18840 fi
18841 fi
18842 else
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18844 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18845 fi
18846 fi
18847 rm -f confcache
18848
18849 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18850 # Let make expand exec_prefix.
18851 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18852
18853 DEFS=-DHAVE_CONFIG_H
18854
18855 ac_libobjs=
18856 ac_ltlibobjs=
18857 U=
18858 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18859 # 1. Remove the extension, and $U if already installed.
18860 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18861 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18862 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18863 # will be set to the directory where LIBOBJS objects are built.
18864 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18865 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18866 done
18867 LIBOBJS=$ac_libobjs
18868
18869 LTLIBOBJS=$ac_ltlibobjs
18870
18871
18872
18873 : "${CONFIG_STATUS=./config.status}"
18874 ac_write_fail=0
18875 ac_clean_files_save=$ac_clean_files
18876 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18877 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18878 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
1831918879 as_write_fail=0
18320 cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
18880 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
1832118881 #! $SHELL
1832218882 # Generated by $as_me.
18323 # Run this file to recreate a libtool stub with the current configuration.
18883 # Run this file to recreate the current configuration.
18884 # Compiler output produced by configure, useful for debugging
18885 # configure, is in config.log if it exists.
18886
18887 debug=false
18888 ac_cs_recheck=false
18889 ac_cs_silent=false
18890
1832418891 SHELL=\${CONFIG_SHELL-$SHELL}
1832518892 export SHELL
1832618893 _ASEOF
18327 cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
18894 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
1832818895 ## -------------------- ##
1832918896 ## M4sh Initialization. ##
1833018897 ## -------------------- ##
1868819255
1868919256
1869019257 exec 6>&1
18691 ## --------------------------------- ##
18692 ## Main body of "$CONFIG_LT" script. ##
18693 ## --------------------------------- ##
19258 ## ----------------------------------- ##
19259 ## Main body of $CONFIG_STATUS script. ##
19260 ## ----------------------------------- ##
1869419261 _ASEOF
18695 test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
18696
18697 cat >>"$CONFIG_LT" <<\_LTEOF
18698 lt_cl_silent=false
19262 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19263
19264 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19265 # Save the log message, to keep $0 and so on meaningful, and to
19266 # report actual input values of CONFIG_FILES etc. instead of their
19267 # values after options handling.
19268 ac_log="
19269 This file was extended by unbound $as_me 1.5.1, which was
19270 generated by GNU Autoconf 2.69. Invocation command line was
19271
19272 CONFIG_FILES = $CONFIG_FILES
19273 CONFIG_HEADERS = $CONFIG_HEADERS
19274 CONFIG_LINKS = $CONFIG_LINKS
19275 CONFIG_COMMANDS = $CONFIG_COMMANDS
19276 $ $0 $@
19277
19278 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19279 "
19280
19281 _ACEOF
19282
19283 case $ac_config_files in *"
19284 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19285 esac
19286
19287 case $ac_config_headers in *"
19288 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19289 esac
19290
19291
19292 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19293 # Files that config.status was made for.
19294 config_files="$ac_config_files"
19295 config_headers="$ac_config_headers"
19296 config_commands="$ac_config_commands"
19297
19298 _ACEOF
19299
19300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19301 ac_cs_usage="\
19302 \`$as_me' instantiates files and other configuration actions
19303 from templates according to the current configuration. Unless the files
19304 and actions are specified as TAGs, all are instantiated by default.
19305
19306 Usage: $0 [OPTION]... [TAG]...
19307
19308 -h, --help print this help, then exit
19309 -V, --version print version number and configuration settings, then exit
19310 --config print configuration, then exit
19311 -q, --quiet, --silent
19312 do not print progress messages
19313 -d, --debug don't remove temporary files
19314 --recheck update $as_me by reconfiguring in the same conditions
19315 --file=FILE[:TEMPLATE]
19316 instantiate the configuration file FILE
19317 --header=FILE[:TEMPLATE]
19318 instantiate the configuration header FILE
19319
19320 Configuration files:
19321 $config_files
19322
19323 Configuration headers:
19324 $config_headers
19325
19326 Configuration commands:
19327 $config_commands
19328
19329 Report bugs to <unbound-bugs@nlnetlabs.nl>."
19330
19331 _ACEOF
19332 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19333 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19334 ac_cs_version="\\
19335 unbound config.status 1.5.1
19336 configured by $0, generated by GNU Autoconf 2.69,
19337 with options \\"\$ac_cs_config\\"
19338
19339 Copyright (C) 2012 Free Software Foundation, Inc.
19340 This config.status script is free software; the Free Software Foundation
19341 gives unlimited permission to copy, distribute and modify it."
19342
19343 ac_pwd='$ac_pwd'
19344 srcdir='$srcdir'
19345 AWK='$AWK'
19346 test -n "\$AWK" || AWK=awk
19347 _ACEOF
19348
19349 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19350 # The default lists apply if the user does not specify any file.
19351 ac_need_defaults=:
19352 while test $# != 0
19353 do
19354 case $1 in
19355 --*=?*)
19356 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19357 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19358 ac_shift=:
19359 ;;
19360 --*=)
19361 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19362 ac_optarg=
19363 ac_shift=:
19364 ;;
19365 *)
19366 ac_option=$1
19367 ac_optarg=$2
19368 ac_shift=shift
19369 ;;
19370 esac
19371
19372 case $ac_option in
19373 # Handling of the options.
19374 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19375 ac_cs_recheck=: ;;
19376 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19377 $as_echo "$ac_cs_version"; exit ;;
19378 --config | --confi | --conf | --con | --co | --c )
19379 $as_echo "$ac_cs_config"; exit ;;
19380 --debug | --debu | --deb | --de | --d | -d )
19381 debug=: ;;
19382 --file | --fil | --fi | --f )
19383 $ac_shift
19384 case $ac_optarg in
19385 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19386 '') as_fn_error $? "missing file argument" ;;
19387 esac
19388 as_fn_append CONFIG_FILES " '$ac_optarg'"
19389 ac_need_defaults=false;;
19390 --header | --heade | --head | --hea )
19391 $ac_shift
19392 case $ac_optarg in
19393 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19394 esac
19395 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19396 ac_need_defaults=false;;
19397 --he | --h)
19398 # Conflict between --help and --header
19399 as_fn_error $? "ambiguous option: \`$1'
19400 Try \`$0 --help' for more information.";;
19401 --help | --hel | -h )
19402 $as_echo "$ac_cs_usage"; exit ;;
19403 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19404 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19405 ac_cs_silent=: ;;
19406
19407 # This is an error.
19408 -*) as_fn_error $? "unrecognized option: \`$1'
19409 Try \`$0 --help' for more information." ;;
19410
19411 *) as_fn_append ac_config_targets " $1"
19412 ac_need_defaults=false ;;
19413
19414 esac
19415 shift
19416 done
19417
19418 ac_configure_extra_args=
19419
19420 if $ac_cs_silent; then
19421 exec 6>/dev/null
19422 ac_configure_extra_args="$ac_configure_extra_args --silent"
19423 fi
19424
19425 _ACEOF
19426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19427 if \$ac_cs_recheck; then
19428 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19429 shift
19430 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19431 CONFIG_SHELL='$SHELL'
19432 export CONFIG_SHELL
19433 exec "\$@"
19434 fi
19435
19436 _ACEOF
19437 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1869919438 exec 5>>config.log
1870019439 {
1870119440 echo
1870219441 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1870319442 ## Running $as_me. ##
1870419443 _ASBOX
19444 $as_echo "$ac_log"
1870519445 } >&5
1870619446
18707 lt_cl_help="\
18708 \`$as_me' creates a local libtool stub from the current configuration,
18709 for use in further configure time tests before the real libtool is
18710 generated.
18711
18712 Usage: $0 [OPTIONS]
18713
18714 -h, --help print this help, then exit
18715 -V, --version print version number, then exit
18716 -q, --quiet do not print progress messages
18717 -d, --debug don't remove temporary files
18718
18719 Report bugs to <bug-libtool@gnu.org>."
18720
18721 lt_cl_version="\
18722 unbound config.lt 1.5.0rc1
18723 configured by $0, generated by GNU Autoconf 2.69.
18724
18725 Copyright (C) 2011 Free Software Foundation, Inc.
18726 This config.lt script is free software; the Free Software Foundation
18727 gives unlimited permision to copy, distribute and modify it."
18728
18729 while test $# != 0
18730 do
18731 case $1 in
18732 --version | --v* | -V )
18733 echo "$lt_cl_version"; exit 0 ;;
18734 --help | --h* | -h )
18735 echo "$lt_cl_help"; exit 0 ;;
18736 --debug | --d* | -d )
18737 debug=: ;;
18738 --quiet | --q* | --silent | --s* | -q )
18739 lt_cl_silent=: ;;
18740
18741 -*) as_fn_error $? "unrecognized option: $1
18742 Try \`$0 --help' for more information." "$LINENO" 5 ;;
18743
18744 *) as_fn_error $? "unrecognized argument: $1
18745 Try \`$0 --help' for more information." "$LINENO" 5 ;;
18746 esac
18747 shift
18748 done
18749
18750 if $lt_cl_silent; then
18751 exec 6>/dev/null
18752 fi
18753 _LTEOF
18754
18755 cat >>"$CONFIG_LT" <<_LTEOF
19447 _ACEOF
19448 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19449 #
19450 # INIT-COMMANDS
19451 #
1875619452
1875719453
1875819454 # The HP-UX ksh and POSIX shell print the target directory to stdout
1903019726
1903119727
1903219728
19033 _LTEOF
19034
19035 cat >>"$CONFIG_LT" <<\_LTEOF
19036 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
19037 $as_echo "$as_me: creating $ofile" >&6;}
19038
19039
19040 # See if we are running on zsh, and set the options which allow our
19041 # commands through without removal of \ escapes.
19042 if test -n "${ZSH_VERSION+set}" ; then
19043 setopt NO_GLOB_SUBST
19044 fi
19045
19046 cfgfile="${ofile}T"
19047 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
19048 $RM "$cfgfile"
19049
19050 cat <<_LT_EOF >> "$cfgfile"
19051 #! $SHELL
19052
19053 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
19054 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
19055 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19056 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
19057 #
19058 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
19059 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
19060 # Foundation, Inc.
19061 # Written by Gordon Matzigkeit, 1996
19062 #
19063 # This file is part of GNU Libtool.
19064 #
19065 # GNU Libtool is free software; you can redistribute it and/or
19066 # modify it under the terms of the GNU General Public License as
19067 # published by the Free Software Foundation; either version 2 of
19068 # the License, or (at your option) any later version.
19069 #
19070 # As a special exception to the GNU General Public License,
19071 # if you distribute this file as part of a program or library that
19072 # is built using GNU Libtool, you may include this file under the
19073 # same distribution terms that you use for the rest of that program.
19074 #
19075 # GNU Libtool is distributed in the hope that it will be useful,
19076 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19077 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19078 # GNU General Public License for more details.
19079 #
19080 # You should have received a copy of the GNU General Public License
19081 # along with GNU Libtool; see the file COPYING. If not, a copy
19082 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
19083 # obtained by writing to the Free Software Foundation, Inc.,
19084 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19085
19086
19087 # The names of the tagged configurations supported by this script.
19088 available_tags=""
19089
19090 # ### BEGIN LIBTOOL CONFIG
19091
19092 # Which release of libtool.m4 was used?
19093 macro_version=$macro_version
19094 macro_revision=$macro_revision
19095
19096 # Whether or not to build shared libraries.
19097 build_libtool_libs=$enable_shared
19098
19099 # Whether or not to build static libraries.
19100 build_old_libs=$enable_static
19101
19102 # What type of objects to build.
19103 pic_mode=$pic_mode
19104
19105 # Whether or not to optimize for fast installation.
19106 fast_install=$enable_fast_install
19107
19108 # Shell to use when invoking shell scripts.
19109 SHELL=$lt_SHELL
19110
19111 # An echo program that protects backslashes.
19112 ECHO=$lt_ECHO
19113
19114 # The PATH separator for the build system.
19115 PATH_SEPARATOR=$lt_PATH_SEPARATOR
19116
19117 # The host system.
19118 host_alias=$host_alias
19119 host=$host
19120 host_os=$host_os
19121
19122 # The build system.
19123 build_alias=$build_alias
19124 build=$build
19125 build_os=$build_os
19126
19127 # A sed program that does not truncate output.
19128 SED=$lt_SED
19129
19130 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
19131 Xsed="\$SED -e 1s/^X//"
19132
19133 # A grep program that handles long lines.
19134 GREP=$lt_GREP
19135
19136 # An ERE matcher.
19137 EGREP=$lt_EGREP
19138
19139 # A literal string matcher.
19140 FGREP=$lt_FGREP
19141
19142 # A BSD- or MS-compatible name lister.
19143 NM=$lt_NM
19144
19145 # Whether we need soft or hard links.
19146 LN_S=$lt_LN_S
19147
19148 # What is the maximum length of a command?
19149 max_cmd_len=$max_cmd_len
19150
19151 # Object file suffix (normally "o").
19152 objext=$ac_objext
19153
19154 # Executable file suffix (normally "").
19155 exeext=$exeext
19156
19157 # whether the shell understands "unset".
19158 lt_unset=$lt_unset
19159
19160 # turn spaces into newlines.
19161 SP2NL=$lt_lt_SP2NL
19162
19163 # turn newlines into spaces.
19164 NL2SP=$lt_lt_NL2SP
19165
19166 # convert \$build file names to \$host format.
19167 to_host_file_cmd=$lt_cv_to_host_file_cmd
19168
19169 # convert \$build files to toolchain format.
19170 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
19171
19172 # An object symbol dumper.
19173 OBJDUMP=$lt_OBJDUMP
19174
19175 # Method to check whether dependent libraries are shared objects.
19176 deplibs_check_method=$lt_deplibs_check_method
19177
19178 # Command to use when deplibs_check_method = "file_magic".
19179 file_magic_cmd=$lt_file_magic_cmd
19180
19181 # How to find potential files when deplibs_check_method = "file_magic".
19182 file_magic_glob=$lt_file_magic_glob
19183
19184 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
19185 want_nocaseglob=$lt_want_nocaseglob
19186
19187 # DLL creation program.
19188 DLLTOOL=$lt_DLLTOOL
19189
19190 # Command to associate shared and link libraries.
19191 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
19192
19193 # The archiver.
19194 AR=$lt_AR
19195
19196 # Flags to create an archive.
19197 AR_FLAGS=$lt_AR_FLAGS
19198
19199 # How to feed a file listing to the archiver.
19200 archiver_list_spec=$lt_archiver_list_spec
19201
19202 # A symbol stripping program.
19203 STRIP=$lt_STRIP
19204
19205 # Commands used to install an old-style archive.
19206 RANLIB=$lt_RANLIB
19207 old_postinstall_cmds=$lt_old_postinstall_cmds
19208 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19209
19210 # Whether to use a lock for old archive extraction.
19211 lock_old_archive_extraction=$lock_old_archive_extraction
19212
19213 # A C compiler.
19214 LTCC=$lt_CC
19215
19216 # LTCC compiler flags.
19217 LTCFLAGS=$lt_CFLAGS
19218
19219 # Take the output of nm and produce a listing of raw symbols and C names.
19220 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19221
19222 # Transform the output of nm in a proper C declaration.
19223 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19224
19225 # Transform the output of nm in a C name address pair.
19226 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19227
19228 # Transform the output of nm in a C name address pair when lib prefix is needed.
19229 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
19230
19231 # Specify filename containing input files for \$NM.
19232 nm_file_list_spec=$lt_nm_file_list_spec
19233
19234 # The root where to search for dependent libraries,and in which our libraries should be installed.
19235 lt_sysroot=$lt_sysroot
19236
19237 # The name of the directory that contains temporary libtool files.
19238 objdir=$objdir
19239
19240 # Used to examine libraries when file_magic_cmd begins with "file".
19241 MAGIC_CMD=$MAGIC_CMD
19242
19243 # Must we lock files when doing compilation?
19244 need_locks=$lt_need_locks
19245
19246 # Manifest tool.
19247 MANIFEST_TOOL=$lt_MANIFEST_TOOL
19248
19249 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
19250 DSYMUTIL=$lt_DSYMUTIL
19251
19252 # Tool to change global to local symbols on Mac OS X.
19253 NMEDIT=$lt_NMEDIT
19254
19255 # Tool to manipulate fat objects and archives on Mac OS X.
19256 LIPO=$lt_LIPO
19257
19258 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
19259 OTOOL=$lt_OTOOL
19260
19261 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
19262 OTOOL64=$lt_OTOOL64
19263
19264 # Old archive suffix (normally "a").
19265 libext=$libext
19266
19267 # Shared library suffix (normally ".so").
19268 shrext_cmds=$lt_shrext_cmds
19269
19270 # The commands to extract the exported symbol list from a shared archive.
19271 extract_expsyms_cmds=$lt_extract_expsyms_cmds
19272
19273 # Variables whose values should be saved in libtool wrapper scripts and
19274 # restored at link time.
19275 variables_saved_for_relink=$lt_variables_saved_for_relink
19276
19277 # Do we need the "lib" prefix for modules?
19278 need_lib_prefix=$need_lib_prefix
19279
19280 # Do we need a version for libraries?
19281 need_version=$need_version
19282
19283 # Library versioning type.
19284 version_type=$version_type
19285
19286 # Shared library runtime path variable.
19287 runpath_var=$runpath_var
19288
19289 # Shared library path variable.
19290 shlibpath_var=$shlibpath_var
19291
19292 # Is shlibpath searched before the hard-coded library search path?
19293 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19294
19295 # Format of library name prefix.
19296 libname_spec=$lt_libname_spec
19297
19298 # List of archive names. First name is the real one, the rest are links.
19299 # The last name is the one that the linker finds with -lNAME
19300 library_names_spec=$lt_library_names_spec
19301
19302 # The coded name of the library, if different from the real name.
19303 soname_spec=$lt_soname_spec
19304
19305 # Permission mode override for installation of shared libraries.
19306 install_override_mode=$lt_install_override_mode
19307
19308 # Command to use after installation of a shared archive.
19309 postinstall_cmds=$lt_postinstall_cmds
19310
19311 # Command to use after uninstallation of a shared archive.
19312 postuninstall_cmds=$lt_postuninstall_cmds
19313
19314 # Commands used to finish a libtool library installation in a directory.
19315 finish_cmds=$lt_finish_cmds
19316
19317 # As "finish_cmds", except a single script fragment to be evaled but
19318 # not shown.
19319 finish_eval=$lt_finish_eval
19320
19321 # Whether we should hardcode library paths into libraries.
19322 hardcode_into_libs=$hardcode_into_libs
19323
19324 # Compile-time system search path for libraries.
19325 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
19326
19327 # Run-time system search path for libraries.
19328 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
19329
19330 # Whether dlopen is supported.
19331 dlopen_support=$enable_dlopen
19332
19333 # Whether dlopen of programs is supported.
19334 dlopen_self=$enable_dlopen_self
19335
19336 # Whether dlopen of statically linked programs is supported.
19337 dlopen_self_static=$enable_dlopen_self_static
19338
19339 # Commands to strip libraries.
19340 old_striplib=$lt_old_striplib
19341 striplib=$lt_striplib
19342
19343
19344 # The linker used to build libraries.
19345 LD=$lt_LD
19346
19347 # How to create reloadable object files.
19348 reload_flag=$lt_reload_flag
19349 reload_cmds=$lt_reload_cmds
19350
19351 # Commands used to build an old-style archive.
19352 old_archive_cmds=$lt_old_archive_cmds
19353
19354 # A language specific compiler.
19355 CC=$lt_compiler
19356
19357 # Is the compiler the GNU compiler?
19358 with_gcc=$GCC
19359
19360 # Compiler flag to turn off builtin functions.
19361 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
19362
19363 # Additional compiler flags for building library objects.
19364 pic_flag=$lt_lt_prog_compiler_pic
19365
19366 # How to pass a linker flag through the compiler.
19367 wl=$lt_lt_prog_compiler_wl
19368
19369 # Compiler flag to prevent dynamic linking.
19370 link_static_flag=$lt_lt_prog_compiler_static
19371
19372 # Does compiler simultaneously support -c and -o options?
19373 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
19374
19375 # Whether or not to add -lc for building shared libraries.
19376 build_libtool_need_lc=$archive_cmds_need_lc
19377
19378 # Whether or not to disallow shared libs when runtime libs are static.
19379 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
19380
19381 # Compiler flag to allow reflexive dlopens.
19382 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
19383
19384 # Compiler flag to generate shared objects directly from archives.
19385 whole_archive_flag_spec=$lt_whole_archive_flag_spec
19386
19387 # Whether the compiler copes with passing no objects directly.
19388 compiler_needs_object=$lt_compiler_needs_object
19389
19390 # Create an old-style archive from a shared archive.
19391 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
19392
19393 # Create a temporary old-style archive to link instead of a shared archive.
19394 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
19395
19396 # Commands used to build a shared archive.
19397 archive_cmds=$lt_archive_cmds
19398 archive_expsym_cmds=$lt_archive_expsym_cmds
19399
19400 # Commands used to build a loadable module if different from building
19401 # a shared archive.
19402 module_cmds=$lt_module_cmds
19403 module_expsym_cmds=$lt_module_expsym_cmds
19404
19405 # Whether we are building with GNU ld or not.
19406 with_gnu_ld=$lt_with_gnu_ld
19407
19408 # Flag that allows shared libraries with undefined symbols to be built.
19409 allow_undefined_flag=$lt_allow_undefined_flag
19410
19411 # Flag that enforces no undefined symbols.
19412 no_undefined_flag=$lt_no_undefined_flag
19413
19414 # Flag to hardcode \$libdir into a binary during linking.
19415 # This must work even if \$libdir does not exist
19416 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
19417
19418 # Whether we need a single "-rpath" flag with a separated argument.
19419 hardcode_libdir_separator=$lt_hardcode_libdir_separator
19420
19421 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19422 # DIR into the resulting binary.
19423 hardcode_direct=$hardcode_direct
19424
19425 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19426 # DIR into the resulting binary and the resulting library dependency is
19427 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
19428 # library is relocated.
19429 hardcode_direct_absolute=$hardcode_direct_absolute
19430
19431 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
19432 # into the resulting binary.
19433 hardcode_minus_L=$hardcode_minus_L
19434
19435 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
19436 # into the resulting binary.
19437 hardcode_shlibpath_var=$hardcode_shlibpath_var
19438
19439 # Set to "yes" if building a shared library automatically hardcodes DIR
19440 # into the library and all subsequent libraries and executables linked
19441 # against it.
19442 hardcode_automatic=$hardcode_automatic
19443
19444 # Set to yes if linker adds runtime paths of dependent libraries
19445 # to runtime path list.
19446 inherit_rpath=$inherit_rpath
19447
19448 # Whether libtool must link a program against all its dependency libraries.
19449 link_all_deplibs=$link_all_deplibs
19450
19451 # Set to "yes" if exported symbols are required.
19452 always_export_symbols=$always_export_symbols
19453
19454 # The commands to list exported symbols.
19455 export_symbols_cmds=$lt_export_symbols_cmds
19456
19457 # Symbols that should not be listed in the preloaded symbols.
19458 exclude_expsyms=$lt_exclude_expsyms
19459
19460 # Symbols that must always be exported.
19461 include_expsyms=$lt_include_expsyms
19462
19463 # Commands necessary for linking programs (against libraries) with templates.
19464 prelink_cmds=$lt_prelink_cmds
19465
19466 # Commands necessary for finishing linking programs.
19467 postlink_cmds=$lt_postlink_cmds
19468
19469 # Specify filename containing input files.
19470 file_list_spec=$lt_file_list_spec
19471
19472 # How to hardcode a shared library path into an executable.
19473 hardcode_action=$hardcode_action
19474
19475 # ### END LIBTOOL CONFIG
19476
19477 _LT_EOF
19478
19479 case $host_os in
19480 aix3*)
19481 cat <<\_LT_EOF >> "$cfgfile"
19482 # AIX sometimes has problems with the GCC collect2 program. For some
19483 # reason, if we set the COLLECT_NAMES environment variable, the problems
19484 # vanish in a puff of smoke.
19485 if test "X${COLLECT_NAMES+set}" != Xset; then
19486 COLLECT_NAMES=
19487 export COLLECT_NAMES
19488 fi
19489 _LT_EOF
19490 ;;
19491 esac
19492
19493
19494 ltmain="$ac_aux_dir/ltmain.sh"
19495
19496
19497 # We use sed instead of cat because bash on DJGPP gets confused if
19498 # if finds mixed CR/LF and LF-only lines. Since sed operates in
19499 # text mode, it properly converts lines to CR/LF. This bash problem
19500 # is reportedly fixed, but why not run on old versions too?
19501 sed '$q' "$ltmain" >> "$cfgfile" \
19502 || (rm -f "$cfgfile"; exit 1)
19503
19504 if test x"$xsi_shell" = xyes; then
19505 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
19506 func_dirname ()\
19507 {\
19508 \ case ${1} in\
19509 \ */*) func_dirname_result="${1%/*}${2}" ;;\
19510 \ * ) func_dirname_result="${3}" ;;\
19511 \ esac\
19512 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
19513 && mv -f "$cfgfile.tmp" "$cfgfile" \
19514 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19515 test 0 -eq $? || _lt_function_replace_fail=:
19516
19517
19518 sed -e '/^func_basename ()$/,/^} # func_basename /c\
19519 func_basename ()\
19520 {\
19521 \ func_basename_result="${1##*/}"\
19522 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
19523 && mv -f "$cfgfile.tmp" "$cfgfile" \
19524 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19525 test 0 -eq $? || _lt_function_replace_fail=:
19526
19527
19528 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
19529 func_dirname_and_basename ()\
19530 {\
19531 \ case ${1} in\
19532 \ */*) func_dirname_result="${1%/*}${2}" ;;\
19533 \ * ) func_dirname_result="${3}" ;;\
19534 \ esac\
19535 \ func_basename_result="${1##*/}"\
19536 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
19537 && mv -f "$cfgfile.tmp" "$cfgfile" \
19538 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19539 test 0 -eq $? || _lt_function_replace_fail=:
19540
19541
19542 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
19543 func_stripname ()\
19544 {\
19545 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
19546 \ # positional parameters, so assign one to ordinary parameter first.\
19547 \ func_stripname_result=${3}\
19548 \ func_stripname_result=${func_stripname_result#"${1}"}\
19549 \ func_stripname_result=${func_stripname_result%"${2}"}\
19550 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
19551 && mv -f "$cfgfile.tmp" "$cfgfile" \
19552 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19553 test 0 -eq $? || _lt_function_replace_fail=:
19554
19555
19556 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
19557 func_split_long_opt ()\
19558 {\
19559 \ func_split_long_opt_name=${1%%=*}\
19560 \ func_split_long_opt_arg=${1#*=}\
19561 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
19562 && mv -f "$cfgfile.tmp" "$cfgfile" \
19563 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19564 test 0 -eq $? || _lt_function_replace_fail=:
19565
19566
19567 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
19568 func_split_short_opt ()\
19569 {\
19570 \ func_split_short_opt_arg=${1#??}\
19571 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
19572 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
19573 && mv -f "$cfgfile.tmp" "$cfgfile" \
19574 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19575 test 0 -eq $? || _lt_function_replace_fail=:
19576
19577
19578 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
19579 func_lo2o ()\
19580 {\
19581 \ case ${1} in\
19582 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
19583 \ *) func_lo2o_result=${1} ;;\
19584 \ esac\
19585 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
19586 && mv -f "$cfgfile.tmp" "$cfgfile" \
19587 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19588 test 0 -eq $? || _lt_function_replace_fail=:
19589
19590
19591 sed -e '/^func_xform ()$/,/^} # func_xform /c\
19592 func_xform ()\
19593 {\
19594 func_xform_result=${1%.*}.lo\
19595 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
19596 && mv -f "$cfgfile.tmp" "$cfgfile" \
19597 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19598 test 0 -eq $? || _lt_function_replace_fail=:
19599
19600
19601 sed -e '/^func_arith ()$/,/^} # func_arith /c\
19602 func_arith ()\
19603 {\
19604 func_arith_result=$(( $* ))\
19605 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
19606 && mv -f "$cfgfile.tmp" "$cfgfile" \
19607 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19608 test 0 -eq $? || _lt_function_replace_fail=:
19609
19610
19611 sed -e '/^func_len ()$/,/^} # func_len /c\
19612 func_len ()\
19613 {\
19614 func_len_result=${#1}\
19615 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
19616 && mv -f "$cfgfile.tmp" "$cfgfile" \
19617 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19618 test 0 -eq $? || _lt_function_replace_fail=:
19619
19620 fi
19621
19622 if test x"$lt_shell_append" = xyes; then
19623 sed -e '/^func_append ()$/,/^} # func_append /c\
19624 func_append ()\
19625 {\
19626 eval "${1}+=\\${2}"\
19627 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
19628 && mv -f "$cfgfile.tmp" "$cfgfile" \
19629 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19630 test 0 -eq $? || _lt_function_replace_fail=:
19631
19632
19633 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
19634 func_append_quoted ()\
19635 {\
19636 \ func_quote_for_eval "${2}"\
19637 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
19638 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
19639 && mv -f "$cfgfile.tmp" "$cfgfile" \
19640 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19641 test 0 -eq $? || _lt_function_replace_fail=:
19642
19643
19644 # Save a `func_append' function call where possible by direct use of '+='
19645 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
19646 && mv -f "$cfgfile.tmp" "$cfgfile" \
19647 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19648 test 0 -eq $? || _lt_function_replace_fail=:
19649 else
19650 # Save a `func_append' function call even when '+=' is not available
19651 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
19652 && mv -f "$cfgfile.tmp" "$cfgfile" \
19653 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19654 test 0 -eq $? || _lt_function_replace_fail=:
19655 fi
19656
19657 if test x"$_lt_function_replace_fail" = x":"; then
19658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
19659 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
19660 fi
19661
19662
19663 mv -f "$cfgfile" "$ofile" ||
19664 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
19665 chmod +x "$ofile"
19666
19667
19668 as_fn_exit 0
19669 _LTEOF
19670 chmod +x "$CONFIG_LT"
19671
19672 # configure is writing to config.log, but config.lt does its own redirection,
19673 # appending to config.log, which fails on DOS, as config.log is still kept
19674 # open by configure. Here we exec the FD to /dev/null, effectively closing
19675 # config.log, so it can be properly (re)opened and appended to by config.lt.
19676 lt_cl_success=:
19677 test "$silent" = yes &&
19678 lt_config_lt_args="$lt_config_lt_args --quiet"
19679 exec 5>/dev/null
19680 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
19681 exec 5>>config.log
19682 $lt_cl_success || as_fn_exit 1
19683
19684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic lib can refer to main" >&5
19685 $as_echo_n "checking if dynamic lib can refer to main... " >&6; }
19686 cat >tmp.$$.def <<EOF
19687 myfunc
19688 EOF
19689 cat >tmp.$$.c <<EOF
19690 int myfunc(void);
19691 extern int main(int, char *argv);
19692 int myfunc(void)
19693 {
19694 return ((int)main) + 1;
19695 }
19696 EOF
19697 mylibtool=./libtool
19698 mylibdir=/usr/local/lib
19699 myok=yes
19700 $mylibtool --quiet --tag=CC --mode=compile $CC $CFLAGS -o tmp.$$.lo -c tmp.$$.c >/dev/null 2>&1
19701 if test $? = 0; then myok=yes; else myok=no; fi
19702 if test "$myok" = "yes"; then
19703 $mylibtool --quiet --tag=CC --mode=link $CC $CFLAGS -version-info 1:0:0 -no-undefined -export-symbols tmp.$$.def -o libtmp$$.la tmp.$$.lo $LDFLAGS -rpath $mylibdir $LIBS >/dev/null 2>&1
19704 if test $? = 0; then myok=yes; else myok=no; fi
19705 fi
19706 if test "$myok" = "yes"; then
19707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19708 $as_echo "yes" >&6; }
19709
19710 $as_echo "#define CAN_REFERENCE_MAIN 1" >>confdefs.h
19711
19712 else
19713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19714 $as_echo "no" >&6; }
19715 fi
19716 $mylibtool --quiet --mode=clean rm -rf libtmp$$.la tmp.$$.lo
19717 rm -f tmp.$$.def tmp.$$.c libtmp$$.la tmp.$$.lo tmp.$$.o
19718
19719 fi
19720
19721 fi
19722 done
19723
19724 fi
19725 fi
19726 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
19727
19728 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
19729 if test "x$ac_cv_func_ctime_r" = xyes; then :
19730 $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
19731
19732 else
19733 case " $LIBOBJS " in
19734 *" ctime_r.$ac_objext "* ) ;;
19735 *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
19736 ;;
19737 esac
19738
19739 fi
19740
19741
19742
19743 # Check whether --enable-allsymbols was given.
19744 if test "${enable_allsymbols+set}" = set; then :
19745 enableval=$enable_allsymbols;
19746 fi
19747
19748 case "$enable_allsymbols" in
19749 yes)
19750 COMMON_OBJ_ALL_SYMBOLS=""
19751 UBSYMS=""
19752 EXTRALINK="-L. -L.libs -lunbound"
19753
19754 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
19755
19756 ;;
19757 no|*)
19758 COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
19759 UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
19760 EXTRALINK=""
19761 ;;
19762 esac
19763
19764
19765
19766 if test x_$enable_lock_checks = x_yes; then
19767 UBSYMS="-export-symbols clubsyms.def"
19768 cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
19769 echo lock_protect >> clubsyms.def
19770 echo lock_unprotect >> clubsyms.def
19771 echo lock_get_mem >> clubsyms.def
19772 echo checklock_start >> clubsyms.def
19773 echo checklock_stop >> clubsyms.def
19774 echo checklock_lock >> clubsyms.def
19775 echo checklock_unlock >> clubsyms.def
19776 echo checklock_init >> clubsyms.def
19777 echo checklock_thrcreate >> clubsyms.def
19778 echo checklock_thrjoin >> clubsyms.def
19779 fi
19780
19781 # check for dnstap if requested
19782
19783 # Check whether --enable-dnstap was given.
19784 if test "${enable_dnstap+set}" = set; then :
19785 enableval=$enable_dnstap; opt_dnstap=$enableval
19786 else
19787 opt_dnstap=no
19788 fi
19789
19790
19791
19792 # Check whether --with-dnstap-socket-path was given.
19793 if test "${with_dnstap_socket_path+set}" = set; then :
19794 withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
19795 else
19796 opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
19797 fi
19798
19799
19800 if test "x$opt_dnstap" != "xno"; then
19801 # Extract the first word of "protoc-c", so it can be a program name with args.
19802 set dummy protoc-c; ac_word=$2
19803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19804 $as_echo_n "checking for $ac_word... " >&6; }
19805 if ${ac_cv_path_PROTOC_C+:} false; then :
19806 $as_echo_n "(cached) " >&6
19807 else
19808 case $PROTOC_C in
19809 [\\/]* | ?:[\\/]*)
19810 ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
19811 ;;
19812 *)
19813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19814 for as_dir in $PATH
19815 do
19816 IFS=$as_save_IFS
19817 test -z "$as_dir" && as_dir=.
19818 for ac_exec_ext in '' $ac_executable_extensions; do
19819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19820 ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
19821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19822 break 2
19823 fi
19824 done
19825 done
19826 IFS=$as_save_IFS
19827
19828 ;;
19829 esac
19830 fi
19831 PROTOC_C=$ac_cv_path_PROTOC_C
19832 if test -n "$PROTOC_C"; then
19833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
19834 $as_echo "$PROTOC_C" >&6; }
19835 else
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19837 $as_echo "no" >&6; }
19838 fi
19839
19840
19841 if test -z "$PROTOC_C"; then
19842 as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
19843 fi
19844
19845 # Check whether --with-protobuf-c was given.
19846 if test "${with_protobuf_c+set}" = set; then :
19847 withval=$with_protobuf_c;
19848 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
19849 if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
19850 CFLAGS="$CFLAGS -I$withval/include/google"
19851 else
19852 CFLAGS="$CFLAGS -I$withval/include"
19853 fi
19854 LDFLAGS="$LDFLAGS -L$withval/lib"
19855
19856 else
19857
19858 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
19859 if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
19860 CFLAGS="$CFLAGS -I/usr/include/google"
19861 else
19862 if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
19863 CFLAGS="$CFLAGS -I/usr/local/include/google"
19864 LDFLAGS="$LDFLAGS -L/usr/local/lib"
19865 fi
19866 fi
19867
19868 fi
19869
19870
19871 # Check whether --with-libfstrm was given.
19872 if test "${with_libfstrm+set}" = set; then :
19873 withval=$with_libfstrm;
19874 CFLAGS="$CFLAGS -I$withval/include"
19875 LDFLAGS="$LDFLAGS -L$withval/lib"
19876
19877 fi
19878
19879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
19880 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
19881 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19882 $as_echo_n "(cached) " >&6
19883 else
19884 ac_func_search_save_LIBS=$LIBS
19885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19886 /* end confdefs.h. */
19887
19888 /* Override any GCC internal prototype to avoid an error.
19889 Use char because int might match the return type of a GCC
19890 builtin and then its argument prototype would still apply. */
19891 #ifdef __cplusplus
19892 extern "C"
19893 #endif
19894 char fstrm_iothr_init ();
19895 int
19896 main ()
19897 {
19898 return fstrm_iothr_init ();
19899 ;
19900 return 0;
19901 }
19902 _ACEOF
19903 for ac_lib in '' fstrm; do
19904 if test -z "$ac_lib"; then
19905 ac_res="none required"
19906 else
19907 ac_res=-l$ac_lib
19908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19909 fi
19910 if ac_fn_c_try_link "$LINENO"; then :
19911 ac_cv_search_fstrm_iothr_init=$ac_res
19912 fi
19913 rm -f core conftest.err conftest.$ac_objext \
19914 conftest$ac_exeext
19915 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19916 break
19917 fi
19918 done
19919 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
19920
19921 else
19922 ac_cv_search_fstrm_iothr_init=no
19923 fi
19924 rm conftest.$ac_ext
19925 LIBS=$ac_func_search_save_LIBS
19926 fi
19927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
19928 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
19929 ac_res=$ac_cv_search_fstrm_iothr_init
19930 if test "$ac_res" != no; then :
19931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19932
19933 else
19934 as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
19935 fi
19936
19937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
19938 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
19939 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19940 $as_echo_n "(cached) " >&6
19941 else
19942 ac_func_search_save_LIBS=$LIBS
19943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19944 /* end confdefs.h. */
19945
19946 /* Override any GCC internal prototype to avoid an error.
19947 Use char because int might match the return type of a GCC
19948 builtin and then its argument prototype would still apply. */
19949 #ifdef __cplusplus
19950 extern "C"
19951 #endif
19952 char protobuf_c_message_pack ();
19953 int
19954 main ()
19955 {
19956 return protobuf_c_message_pack ();
19957 ;
19958 return 0;
19959 }
19960 _ACEOF
19961 for ac_lib in '' protobuf-c; do
19962 if test -z "$ac_lib"; then
19963 ac_res="none required"
19964 else
19965 ac_res=-l$ac_lib
19966 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19967 fi
19968 if ac_fn_c_try_link "$LINENO"; then :
19969 ac_cv_search_protobuf_c_message_pack=$ac_res
19970 fi
19971 rm -f core conftest.err conftest.$ac_objext \
19972 conftest$ac_exeext
19973 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19974 break
19975 fi
19976 done
19977 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
19978
19979 else
19980 ac_cv_search_protobuf_c_message_pack=no
19981 fi
19982 rm conftest.$ac_ext
19983 LIBS=$ac_func_search_save_LIBS
19984 fi
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
19986 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
19987 ac_res=$ac_cv_search_protobuf_c_message_pack
19988 if test "$ac_res" != no; then :
19989 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19990
19991 else
19992 as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
19993 fi
19994
19995
19996
19997 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
19998
19999 ENABLE_DNSTAP=1
20000
20001
20002
20003 hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20004
20005
20006 cat >>confdefs.h <<_ACEOF
20007 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20008 _ACEOF
20009
20010
20011 DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20012
20013 DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20014
20015
20016 else
20017
20018 ENABLE_DNSTAP=0
20019
20020
20021
20022 fi
20023
20024
20025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20026 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20027 # on openBSD, the implicit rule make $< work.
20028 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20029 # gmake works.
20030 cat >conftest.make <<EOF
20031 all: conftest.lo
20032
20033 conftest.lo foo.lo bla.lo:
20034 if test -f "\$<"; then touch \$@; fi
20035
20036 .SUFFIXES: .lo
20037 .c.lo:
20038 if test -f "\$<"; then touch \$@; fi
20039
20040 conftest.lo: conftest.dir/conftest.c
20041 EOF
20042 mkdir conftest.dir
20043 touch conftest.dir/conftest.c
20044 rm -f conftest.lo conftest.c
20045 ${MAKE:-make} -f conftest.make >/dev/null
20046 rm -f conftest.make conftest.c conftest.dir/conftest.c
20047 rm -rf conftest.dir
20048 if test ! -f conftest.lo; then
20049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20050 $as_echo "no" >&6; }
20051 SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20052 SOURCEFILE='`cat .source`'
20053 else
20054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20055 $as_echo "yes" >&6; }
20056 SOURCEDETERMINE=':'
20057 SOURCEFILE='$<'
20058 fi
20059 rm -f conftest.lo
20060
20061
20062
20063 # see if we want to build the library or everything
20064 ALLTARGET="alltargets"
20065 INSTALLTARGET="install-all"
20066
20067 # Check whether --with-libunbound-only was given.
20068 if test "${with_libunbound_only+set}" = set; then :
20069 withval=$with_libunbound_only;
20070 if test "$withval" = "yes"; then
20071 ALLTARGET="lib"
20072 INSTALLTARGET="install-lib"
20073 fi
20074
20075 fi
20076
20077
20078
20079
20080
20081 { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20082 $as_echo "$as_me: Stripping extension flags..." >&6;}
20083
20084 if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20085 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20086
20087 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20088
20089 fi
20090
20091
20092 if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20093 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20094
20095 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20096
20097 fi
20098
20099
20100 if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20101 CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20102
20103 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20104
20105 fi
20106
20107
20108 if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20109 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20110
20111 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20112
20113 fi
20114
20115
20116 if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
20117 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
20118
20119 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
20120
20121 fi
20122
20123
20124 if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
20125 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
20126
20127 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
20128
20129 fi
20130
20131
20132 if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
20133 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
20134
20135 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
20136
20137 fi
20138
20139
20140 if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
20141 CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
20142
20143 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
20144
20145 fi
20146
20147
20148 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
20149
20150
20151 cat >>confdefs.h <<_ACEOF
20152 #define MAXSYSLOGMSGLEN 10240
20153 _ACEOF
20154
20155
20156
20157
20158 version=1.5.0rc1
20159
20160 date=`date +'%b %e, %Y'`
20161
20162
20163 ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h"
20164
20165 ac_config_headers="$ac_config_headers config.h"
20166
20167 cat >confcache <<\_ACEOF
20168 # This file is a shell script that caches the results of configure
20169 # tests run on this system so they can be shared between configure
20170 # scripts and configure runs, see configure's option --config-cache.
20171 # It is not useful on other systems. If it contains results you don't
20172 # want to keep, you may remove or edit it.
20173 #
20174 # config.status only pays attention to the cache file if you give it
20175 # the --recheck option to rerun configure.
20176 #
20177 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20178 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20179 # following values.
20180
20181 _ACEOF
20182
20183 # The following way of writing the cache mishandles newlines in values,
20184 # but we know of no workaround that is simple, portable, and efficient.
20185 # So, we kill variables containing newlines.
20186 # Ultrix sh set writes to stderr and can't be redirected directly,
20187 # and sets the high bit in the cache file unless we assign to the vars.
20188 (
20189 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20190 eval ac_val=\$$ac_var
20191 case $ac_val in #(
20192 *${as_nl}*)
20193 case $ac_var in #(
20194 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20195 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20196 esac
20197 case $ac_var in #(
20198 _ | IFS | as_nl) ;; #(
20199 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20200 *) { eval $ac_var=; unset $ac_var;} ;;
20201 esac ;;
20202 esac
20203 done
20204
20205 (set) 2>&1 |
20206 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20207 *${as_nl}ac_space=\ *)
20208 # `set' does not quote correctly, so add quotes: double-quote
20209 # substitution turns \\\\ into \\, and sed turns \\ into \.
20210 sed -n \
20211 "s/'/'\\\\''/g;
20212 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20213 ;; #(
20214 *)
20215 # `set' quotes correctly as required by POSIX, so do not add quotes.
20216 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20217 ;;
20218 esac |
20219 sort
20220 ) |
20221 sed '
20222 /^ac_cv_env_/b end
20223 t clear
20224 :clear
20225 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20226 t end
20227 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20228 :end' >>confcache
20229 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20230 if test -w "$cache_file"; then
20231 if test "x$cache_file" != "x/dev/null"; then
20232 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20233 $as_echo "$as_me: updating cache $cache_file" >&6;}
20234 if test ! -f "$cache_file" || test -h "$cache_file"; then
20235 cat confcache >"$cache_file"
20236 else
20237 case $cache_file in #(
20238 */* | ?:*)
20239 mv -f confcache "$cache_file"$$ &&
20240 mv -f "$cache_file"$$ "$cache_file" ;; #(
20241 *)
20242 mv -f confcache "$cache_file" ;;
20243 esac
20244 fi
20245 fi
20246 else
20247 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20248 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20249 fi
20250 fi
20251 rm -f confcache
20252
20253 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20254 # Let make expand exec_prefix.
20255 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20256
20257 DEFS=-DHAVE_CONFIG_H
20258
20259 ac_libobjs=
20260 ac_ltlibobjs=
20261 U=
20262 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20263 # 1. Remove the extension, and $U if already installed.
20264 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20265 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20266 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20267 # will be set to the directory where LIBOBJS objects are built.
20268 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20269 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20270 done
20271 LIBOBJS=$ac_libobjs
20272
20273 LTLIBOBJS=$ac_ltlibobjs
20274
20275
20276
20277 : "${CONFIG_STATUS=./config.status}"
20278 ac_write_fail=0
20279 ac_clean_files_save=$ac_clean_files
20280 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20281 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20282 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20283 as_write_fail=0
20284 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20285 #! $SHELL
20286 # Generated by $as_me.
20287 # Run this file to recreate the current configuration.
20288 # Compiler output produced by configure, useful for debugging
20289 # configure, is in config.log if it exists.
20290
20291 debug=false
20292 ac_cs_recheck=false
20293 ac_cs_silent=false
20294
20295 SHELL=\${CONFIG_SHELL-$SHELL}
20296 export SHELL
20297 _ASEOF
20298 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20299 ## -------------------- ##
20300 ## M4sh Initialization. ##
20301 ## -------------------- ##
20302
20303 # Be more Bourne compatible
20304 DUALCASE=1; export DUALCASE # for MKS sh
20305 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20306 emulate sh
20307 NULLCMD=:
20308 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20309 # is contrary to our usage. Disable this feature.
20310 alias -g '${1+"$@"}'='"$@"'
20311 setopt NO_GLOB_SUBST
20312 else
20313 case `(set -o) 2>/dev/null` in #(
20314 *posix*) :
20315 set -o posix ;; #(
20316 *) :
20317 ;;
20318 esac
20319 fi
20320
20321
20322 as_nl='
20323 '
20324 export as_nl
20325 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20326 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20327 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20328 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20329 # Prefer a ksh shell builtin over an external printf program on Solaris,
20330 # but without wasting forks for bash or zsh.
20331 if test -z "$BASH_VERSION$ZSH_VERSION" \
20332 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20333 as_echo='print -r --'
20334 as_echo_n='print -rn --'
20335 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20336 as_echo='printf %s\n'
20337 as_echo_n='printf %s'
20338 else
20339 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20340 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20341 as_echo_n='/usr/ucb/echo -n'
20342 else
20343 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20344 as_echo_n_body='eval
20345 arg=$1;
20346 case $arg in #(
20347 *"$as_nl"*)
20348 expr "X$arg" : "X\\(.*\\)$as_nl";
20349 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20350 esac;
20351 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20352 '
20353 export as_echo_n_body
20354 as_echo_n='sh -c $as_echo_n_body as_echo'
20355 fi
20356 export as_echo_body
20357 as_echo='sh -c $as_echo_body as_echo'
20358 fi
20359
20360 # The user is always right.
20361 if test "${PATH_SEPARATOR+set}" != set; then
20362 PATH_SEPARATOR=:
20363 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20364 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20365 PATH_SEPARATOR=';'
20366 }
20367 fi
20368
20369
20370 # IFS
20371 # We need space, tab and new line, in precisely that order. Quoting is
20372 # there to prevent editors from complaining about space-tab.
20373 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20374 # splitting by setting IFS to empty value.)
20375 IFS=" "" $as_nl"
20376
20377 # Find who we are. Look in the path if we contain no directory separator.
20378 as_myself=
20379 case $0 in #((
20380 *[\\/]* ) as_myself=$0 ;;
20381 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20382 for as_dir in $PATH
20383 do
20384 IFS=$as_save_IFS
20385 test -z "$as_dir" && as_dir=.
20386 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20387 done
20388 IFS=$as_save_IFS
20389
20390 ;;
20391 esac
20392 # We did not find ourselves, most probably we were run as `sh COMMAND'
20393 # in which case we are not to be found in the path.
20394 if test "x$as_myself" = x; then
20395 as_myself=$0
20396 fi
20397 if test ! -f "$as_myself"; then
20398 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20399 exit 1
20400 fi
20401
20402 # Unset variables that we do not need and which cause bugs (e.g. in
20403 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20404 # suppresses any "Segmentation fault" message there. '((' could
20405 # trigger a bug in pdksh 5.2.14.
20406 for as_var in BASH_ENV ENV MAIL MAILPATH
20407 do eval test x\${$as_var+set} = xset \
20408 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20409 done
20410 PS1='$ '
20411 PS2='> '
20412 PS4='+ '
20413
20414 # NLS nuisances.
20415 LC_ALL=C
20416 export LC_ALL
20417 LANGUAGE=C
20418 export LANGUAGE
20419
20420 # CDPATH.
20421 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20422
20423
20424 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20425 # ----------------------------------------
20426 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20427 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20428 # script with STATUS, using 1 if that was 0.
20429 as_fn_error ()
20430 {
20431 as_status=$1; test $as_status -eq 0 && as_status=1
20432 if test "$4"; then
20433 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20434 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20435 fi
20436 $as_echo "$as_me: error: $2" >&2
20437 as_fn_exit $as_status
20438 } # as_fn_error
20439
20440
20441 # as_fn_set_status STATUS
20442 # -----------------------
20443 # Set $? to STATUS, without forking.
20444 as_fn_set_status ()
20445 {
20446 return $1
20447 } # as_fn_set_status
20448
20449 # as_fn_exit STATUS
20450 # -----------------
20451 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20452 as_fn_exit ()
20453 {
20454 set +e
20455 as_fn_set_status $1
20456 exit $1
20457 } # as_fn_exit
20458
20459 # as_fn_unset VAR
20460 # ---------------
20461 # Portably unset VAR.
20462 as_fn_unset ()
20463 {
20464 { eval $1=; unset $1;}
20465 }
20466 as_unset=as_fn_unset
20467 # as_fn_append VAR VALUE
20468 # ----------------------
20469 # Append the text in VALUE to the end of the definition contained in VAR. Take
20470 # advantage of any shell optimizations that allow amortized linear growth over
20471 # repeated appends, instead of the typical quadratic growth present in naive
20472 # implementations.
20473 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20474 eval 'as_fn_append ()
20475 {
20476 eval $1+=\$2
20477 }'
20478 else
20479 as_fn_append ()
20480 {
20481 eval $1=\$$1\$2
20482 }
20483 fi # as_fn_append
20484
20485 # as_fn_arith ARG...
20486 # ------------------
20487 # Perform arithmetic evaluation on the ARGs, and store the result in the
20488 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20489 # must be portable across $(()) and expr.
20490 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20491 eval 'as_fn_arith ()
20492 {
20493 as_val=$(( $* ))
20494 }'
20495 else
20496 as_fn_arith ()
20497 {
20498 as_val=`expr "$@" || test $? -eq 1`
20499 }
20500 fi # as_fn_arith
20501
20502
20503 if expr a : '\(a\)' >/dev/null 2>&1 &&
20504 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20505 as_expr=expr
20506 else
20507 as_expr=false
20508 fi
20509
20510 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20511 as_basename=basename
20512 else
20513 as_basename=false
20514 fi
20515
20516 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20517 as_dirname=dirname
20518 else
20519 as_dirname=false
20520 fi
20521
20522 as_me=`$as_basename -- "$0" ||
20523 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20524 X"$0" : 'X\(//\)$' \| \
20525 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20526 $as_echo X/"$0" |
20527 sed '/^.*\/\([^/][^/]*\)\/*$/{
20528 s//\1/
20529 q
20530 }
20531 /^X\/\(\/\/\)$/{
20532 s//\1/
20533 q
20534 }
20535 /^X\/\(\/\).*/{
20536 s//\1/
20537 q
20538 }
20539 s/.*/./; q'`
20540
20541 # Avoid depending upon Character Ranges.
20542 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20543 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20544 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20545 as_cr_digits='0123456789'
20546 as_cr_alnum=$as_cr_Letters$as_cr_digits
20547
20548 ECHO_C= ECHO_N= ECHO_T=
20549 case `echo -n x` in #(((((
20550 -n*)
20551 case `echo 'xy\c'` in
20552 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20553 xy) ECHO_C='\c';;
20554 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20555 ECHO_T=' ';;
20556 esac;;
20557 *)
20558 ECHO_N='-n';;
20559 esac
20560
20561 rm -f conf$$ conf$$.exe conf$$.file
20562 if test -d conf$$.dir; then
20563 rm -f conf$$.dir/conf$$.file
20564 else
20565 rm -f conf$$.dir
20566 mkdir conf$$.dir 2>/dev/null
20567 fi
20568 if (echo >conf$$.file) 2>/dev/null; then
20569 if ln -s conf$$.file conf$$ 2>/dev/null; then
20570 as_ln_s='ln -s'
20571 # ... but there are two gotchas:
20572 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20573 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20574 # In both cases, we have to default to `cp -pR'.
20575 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20576 as_ln_s='cp -pR'
20577 elif ln conf$$.file conf$$ 2>/dev/null; then
20578 as_ln_s=ln
20579 else
20580 as_ln_s='cp -pR'
20581 fi
20582 else
20583 as_ln_s='cp -pR'
20584 fi
20585 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20586 rmdir conf$$.dir 2>/dev/null
20587
20588
20589 # as_fn_mkdir_p
20590 # -------------
20591 # Create "$as_dir" as a directory, including parents if necessary.
20592 as_fn_mkdir_p ()
20593 {
20594
20595 case $as_dir in #(
20596 -*) as_dir=./$as_dir;;
20597 esac
20598 test -d "$as_dir" || eval $as_mkdir_p || {
20599 as_dirs=
20600 while :; do
20601 case $as_dir in #(
20602 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20603 *) as_qdir=$as_dir;;
20604 esac
20605 as_dirs="'$as_qdir' $as_dirs"
20606 as_dir=`$as_dirname -- "$as_dir" ||
20607 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20608 X"$as_dir" : 'X\(//\)[^/]' \| \
20609 X"$as_dir" : 'X\(//\)$' \| \
20610 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20611 $as_echo X"$as_dir" |
20612 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20613 s//\1/
20614 q
20615 }
20616 /^X\(\/\/\)[^/].*/{
20617 s//\1/
20618 q
20619 }
20620 /^X\(\/\/\)$/{
20621 s//\1/
20622 q
20623 }
20624 /^X\(\/\).*/{
20625 s//\1/
20626 q
20627 }
20628 s/.*/./; q'`
20629 test -d "$as_dir" && break
20630 done
20631 test -z "$as_dirs" || eval "mkdir $as_dirs"
20632 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20633
20634
20635 } # as_fn_mkdir_p
20636 if mkdir -p . 2>/dev/null; then
20637 as_mkdir_p='mkdir -p "$as_dir"'
20638 else
20639 test -d ./-p && rmdir ./-p
20640 as_mkdir_p=false
20641 fi
20642
20643
20644 # as_fn_executable_p FILE
20645 # -----------------------
20646 # Test if FILE is an executable regular file.
20647 as_fn_executable_p ()
20648 {
20649 test -f "$1" && test -x "$1"
20650 } # as_fn_executable_p
20651 as_test_x='test -x'
20652 as_executable_p=as_fn_executable_p
20653
20654 # Sed expression to map a string onto a valid CPP name.
20655 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20656
20657 # Sed expression to map a string onto a valid variable name.
20658 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20659
20660
20661 exec 6>&1
20662 ## ----------------------------------- ##
20663 ## Main body of $CONFIG_STATUS script. ##
20664 ## ----------------------------------- ##
20665 _ASEOF
20666 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20667
20668 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20669 # Save the log message, to keep $0 and so on meaningful, and to
20670 # report actual input values of CONFIG_FILES etc. instead of their
20671 # values after options handling.
20672 ac_log="
20673 This file was extended by unbound $as_me 1.5.0rc1, which was
20674 generated by GNU Autoconf 2.69. Invocation command line was
20675
20676 CONFIG_FILES = $CONFIG_FILES
20677 CONFIG_HEADERS = $CONFIG_HEADERS
20678 CONFIG_LINKS = $CONFIG_LINKS
20679 CONFIG_COMMANDS = $CONFIG_COMMANDS
20680 $ $0 $@
20681
20682 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20683 "
20684
20685 _ACEOF
20686
20687 case $ac_config_files in *"
20688 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20689 esac
20690
20691 case $ac_config_headers in *"
20692 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20693 esac
20694
20695
20696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20697 # Files that config.status was made for.
20698 config_files="$ac_config_files"
20699 config_headers="$ac_config_headers"
20700 config_commands="$ac_config_commands"
20701
20702 _ACEOF
20703
20704 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20705 ac_cs_usage="\
20706 \`$as_me' instantiates files and other configuration actions
20707 from templates according to the current configuration. Unless the files
20708 and actions are specified as TAGs, all are instantiated by default.
20709
20710 Usage: $0 [OPTION]... [TAG]...
20711
20712 -h, --help print this help, then exit
20713 -V, --version print version number and configuration settings, then exit
20714 --config print configuration, then exit
20715 -q, --quiet, --silent
20716 do not print progress messages
20717 -d, --debug don't remove temporary files
20718 --recheck update $as_me by reconfiguring in the same conditions
20719 --file=FILE[:TEMPLATE]
20720 instantiate the configuration file FILE
20721 --header=FILE[:TEMPLATE]
20722 instantiate the configuration header FILE
20723
20724 Configuration files:
20725 $config_files
20726
20727 Configuration headers:
20728 $config_headers
20729
20730 Configuration commands:
20731 $config_commands
20732
20733 Report bugs to <unbound-bugs@nlnetlabs.nl>."
20734
20735 _ACEOF
20736 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20737 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20738 ac_cs_version="\\
20739 unbound config.status 1.5.0rc1
20740 configured by $0, generated by GNU Autoconf 2.69,
20741 with options \\"\$ac_cs_config\\"
20742
20743 Copyright (C) 2012 Free Software Foundation, Inc.
20744 This config.status script is free software; the Free Software Foundation
20745 gives unlimited permission to copy, distribute and modify it."
20746
20747 ac_pwd='$ac_pwd'
20748 srcdir='$srcdir'
20749 AWK='$AWK'
20750 test -n "\$AWK" || AWK=awk
20751 _ACEOF
20752
20753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20754 # The default lists apply if the user does not specify any file.
20755 ac_need_defaults=:
20756 while test $# != 0
20757 do
20758 case $1 in
20759 --*=?*)
20760 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20761 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20762 ac_shift=:
20763 ;;
20764 --*=)
20765 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20766 ac_optarg=
20767 ac_shift=:
20768 ;;
20769 *)
20770 ac_option=$1
20771 ac_optarg=$2
20772 ac_shift=shift
20773 ;;
20774 esac
20775
20776 case $ac_option in
20777 # Handling of the options.
20778 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20779 ac_cs_recheck=: ;;
20780 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20781 $as_echo "$ac_cs_version"; exit ;;
20782 --config | --confi | --conf | --con | --co | --c )
20783 $as_echo "$ac_cs_config"; exit ;;
20784 --debug | --debu | --deb | --de | --d | -d )
20785 debug=: ;;
20786 --file | --fil | --fi | --f )
20787 $ac_shift
20788 case $ac_optarg in
20789 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20790 '') as_fn_error $? "missing file argument" ;;
20791 esac
20792 as_fn_append CONFIG_FILES " '$ac_optarg'"
20793 ac_need_defaults=false;;
20794 --header | --heade | --head | --hea )
20795 $ac_shift
20796 case $ac_optarg in
20797 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20798 esac
20799 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20800 ac_need_defaults=false;;
20801 --he | --h)
20802 # Conflict between --help and --header
20803 as_fn_error $? "ambiguous option: \`$1'
20804 Try \`$0 --help' for more information.";;
20805 --help | --hel | -h )
20806 $as_echo "$ac_cs_usage"; exit ;;
20807 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20808 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20809 ac_cs_silent=: ;;
20810
20811 # This is an error.
20812 -*) as_fn_error $? "unrecognized option: \`$1'
20813 Try \`$0 --help' for more information." ;;
20814
20815 *) as_fn_append ac_config_targets " $1"
20816 ac_need_defaults=false ;;
20817
20818 esac
20819 shift
20820 done
20821
20822 ac_configure_extra_args=
20823
20824 if $ac_cs_silent; then
20825 exec 6>/dev/null
20826 ac_configure_extra_args="$ac_configure_extra_args --silent"
20827 fi
20828
20829 _ACEOF
20830 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20831 if \$ac_cs_recheck; then
20832 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20833 shift
20834 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20835 CONFIG_SHELL='$SHELL'
20836 export CONFIG_SHELL
20837 exec "\$@"
20838 fi
20839
20840 _ACEOF
20841 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20842 exec 5>>config.log
20843 {
20844 echo
20845 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20846 ## Running $as_me. ##
20847 _ASBOX
20848 $as_echo "$ac_log"
20849 } >&5
20850
20851 _ACEOF
20852 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20853 #
20854 # INIT-COMMANDS
20855 #
20856
20857
20858 # The HP-UX ksh and POSIX shell print the target directory to stdout
20859 # if CDPATH is set.
20860 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20861
20862 sed_quote_subst='$sed_quote_subst'
20863 double_quote_subst='$double_quote_subst'
20864 delay_variable_subst='$delay_variable_subst'
20865 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
20866 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
20867 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
20868 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
20869 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
20870 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
20871 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
20872 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
20873 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
20874 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
20875 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
20876 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
20877 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
20878 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
20879 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
20880 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
20881 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
20882 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
20883 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
20884 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
20885 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
20886 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
20887 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
20888 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
20889 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
20890 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
20891 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
20892 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
20893 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
20894 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
20895 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
20896 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
20897 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
20898 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
20899 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
20900 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
20901 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
20902 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
20903 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
20904 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
20905 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
20906 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
20907 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
20908 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
20909 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
20910 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
20911 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
20912 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
20913 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
20914 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
20915 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
20916 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
20917 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
20918 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
20919 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
20920 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
20921 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
20922 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
20923 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
20924 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
20925 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
20926 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
20927 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
20928 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
20929 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
20930 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
20931 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
20932 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
20933 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
20934 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
20935 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
20936 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
20937 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
20938 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
20939 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
20940 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
20941 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
20942 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
20943 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
20944 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
20945 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
20946 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
20947 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
20948 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
20949 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
20950 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
20951 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
20952 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
20953 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
20954 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
20955 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
20956 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
20957 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
20958 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
20959 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
20960 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
20961 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
20962 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
20963 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
20964 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
20965 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
20966 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
20967 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
20968 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
20969 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
20970 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
20971 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
20972 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
20973 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
20974 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
20975 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
20976 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
20977 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
20978 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
20979 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
20980 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
20981 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
20982 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
20983 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
20984 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
20985 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
20986 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
20987 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
20988 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
20989 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
20990 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
20991 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
20992 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
20993 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
20994 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
20995
20996 LTCC='$LTCC'
20997 LTCFLAGS='$LTCFLAGS'
20998 compiler='$compiler_DEFAULT'
20999
21000 # A function that is used when there is no print builtin or printf.
21001 func_fallback_echo ()
21002 {
21003 eval 'cat <<_LTECHO_EOF
21004 \$1
21005 _LTECHO_EOF'
21006 }
21007
21008 # Quote evaled strings.
21009 for var in SHELL \
21010 ECHO \
21011 PATH_SEPARATOR \
21012 SED \
21013 GREP \
21014 EGREP \
21015 FGREP \
21016 LD \
21017 NM \
21018 LN_S \
21019 lt_SP2NL \
21020 lt_NL2SP \
21021 reload_flag \
21022 OBJDUMP \
21023 deplibs_check_method \
21024 file_magic_cmd \
21025 file_magic_glob \
21026 want_nocaseglob \
21027 DLLTOOL \
21028 sharedlib_from_linklib_cmd \
21029 AR \
21030 AR_FLAGS \
21031 archiver_list_spec \
21032 STRIP \
21033 RANLIB \
21034 CC \
21035 CFLAGS \
21036 compiler \
21037 lt_cv_sys_global_symbol_pipe \
21038 lt_cv_sys_global_symbol_to_cdecl \
21039 lt_cv_sys_global_symbol_to_c_name_address \
21040 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21041 nm_file_list_spec \
21042 lt_prog_compiler_no_builtin_flag \
21043 lt_prog_compiler_pic \
21044 lt_prog_compiler_wl \
21045 lt_prog_compiler_static \
21046 lt_cv_prog_compiler_c_o \
21047 need_locks \
21048 MANIFEST_TOOL \
21049 DSYMUTIL \
21050 NMEDIT \
21051 LIPO \
21052 OTOOL \
21053 OTOOL64 \
21054 shrext_cmds \
21055 export_dynamic_flag_spec \
21056 whole_archive_flag_spec \
21057 compiler_needs_object \
21058 with_gnu_ld \
21059 allow_undefined_flag \
21060 no_undefined_flag \
21061 hardcode_libdir_flag_spec \
21062 hardcode_libdir_separator \
21063 exclude_expsyms \
21064 include_expsyms \
21065 file_list_spec \
21066 variables_saved_for_relink \
21067 libname_spec \
21068 library_names_spec \
21069 soname_spec \
21070 install_override_mode \
21071 finish_eval \
21072 old_striplib \
21073 striplib; do
21074 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21075 *[\\\\\\\`\\"\\\$]*)
21076 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
21077 ;;
21078 *)
21079 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21080 ;;
21081 esac
21082 done
21083
21084 # Double-quote double-evaled strings.
21085 for var in reload_cmds \
21086 old_postinstall_cmds \
21087 old_postuninstall_cmds \
21088 old_archive_cmds \
21089 extract_expsyms_cmds \
21090 old_archive_from_new_cmds \
21091 old_archive_from_expsyms_cmds \
21092 archive_cmds \
21093 archive_expsym_cmds \
21094 module_cmds \
21095 module_expsym_cmds \
21096 export_symbols_cmds \
21097 prelink_cmds \
21098 postlink_cmds \
21099 postinstall_cmds \
21100 postuninstall_cmds \
21101 finish_cmds \
21102 sys_lib_search_path_spec \
21103 sys_lib_dlsearch_path_spec; do
21104 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21105 *[\\\\\\\`\\"\\\$]*)
21106 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
21107 ;;
21108 *)
21109 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21110 ;;
21111 esac
21112 done
21113
21114 ac_aux_dir='$ac_aux_dir'
21115 xsi_shell='$xsi_shell'
21116 lt_shell_append='$lt_shell_append'
21117
21118 # See if we are running on zsh, and set the options which allow our
21119 # commands through without removal of \ escapes INIT.
21120 if test -n "\${ZSH_VERSION+set}" ; then
21121 setopt NO_GLOB_SUBST
21122 fi
21123
21124
21125 PACKAGE='$PACKAGE'
21126 VERSION='$VERSION'
21127 TIMESTAMP='$TIMESTAMP'
21128 RM='$RM'
21129 ofile='$ofile'
21130
21131 ac_aux_dir='$ac_aux_dir'
21132
21133
2113419729
2113519730 _ACEOF
2113619731
99 # must be numbers. ac_defun because of later processing
1010 m4_define([VERSION_MAJOR],[1])
1111 m4_define([VERSION_MINOR],[5])
12 m4_define([VERSION_MICRO],[0rc1])
12 m4_define([VERSION_MICRO],[1])
1313 AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
1414 AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
1515 AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
5656 # 1.4.21 had 4:1:2
5757 # 1.4.22 had 4:1:2
5858 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
59 # 1.5.1 had 5:4:3
5960
6061 # Current -- the number of the binary API that we're implementing
6162 # Revision -- which iteration of the implementation of the binary
10211022 AC_SEARCH_LIBS([clock_gettime], [rt])
10221023 ;;
10231024 esac
1024 # generate libtool to test if linking main
1025 # from a dynamic library works.
1026 LT_OUTPUT
1027 AC_MSG_CHECKING([if dynamic lib can refer to main])
1028 cat >tmp.$$.def <<EOF
1029 myfunc
1030 EOF
1031 cat >tmp.$$.c <<EOF
1032 int myfunc(void);
1033 extern int main(int, char *argv[]);
1034 int myfunc(void)
1035 {
1036 return ((int)main) + 1;
1037 }
1038 EOF
1039 mylibtool=./libtool
1040 mylibdir=/usr/local/lib
1041 myok=yes
1042 $mylibtool --quiet --tag=CC --mode=compile $CC $CFLAGS -o tmp.$$.lo -c tmp.$$.c >/dev/null 2>&1
1043 if test $? = 0; then myok=yes; else myok=no; fi
1044 if test "$myok" = "yes"; then
1045 $mylibtool --quiet --tag=CC --mode=link $CC $CFLAGS -version-info 1:0:0 -no-undefined -export-symbols tmp.$$.def -o libtmp$$.la tmp.$$.lo $LDFLAGS -rpath $mylibdir $LIBS >/dev/null 2>&1
1046 if test $? = 0; then myok=yes; else myok=no; fi
1047 fi
1048 if test "$myok" = "yes"; then
1049 AC_MSG_RESULT(yes)
1050 AC_DEFINE(CAN_REFERENCE_MAIN, [1], [define if a library can reference the 'main' symbol])
1051 else
1052 AC_MSG_RESULT(no)
1053 fi
1054 $mylibtool --quiet --mode=clean rm -rf libtmp$$.la tmp.$$.lo
1055 rm -f tmp.$$.def tmp.$$.c libtmp$$.la tmp.$$.lo tmp.$$.o
1056
10571025 fi
10581026 ])
10591027 fi
2424 * unbound_cache.cmd: windows script to save and load the cache.
2525 * warmup.sh: shell script to warm up DNS cache by your own MRU domains.
2626 * warmup.cmd: windows script to warm up DNS cache by your own MRU domains.
27 * aaaa-filter-iterator.patch: adds config option aaaa-filter: yes that
28 works like the BIND feature (removes AAAA records unless AAAA-only domain).
29 Useful for certain 'broken IPv6 default route' scenarios.
30 Patch from Stephane Lapie for ASAHI Net.
2731
0 --- unbound-1.4.17.orig/doc/unbound.conf.5.in
1 +++ unbound-1.4.17/doc/unbound.conf.5.in
2 @@ -519,6 +519,13 @@ authority servers and checks if the repl
3 Disabled by default.
4 This feature is an experimental implementation of draft dns\-0x20.
5 .TP
6 +.B aaaa\-filter: \fI<yes or no>
7 +Activate behavior similar to BIND's AAAA-filter.
8 +This forces the dropping of all AAAA records, unless in the case of
9 +explicit AAAA queries, when no A records have been confirmed.
10 +This also causes an additional A query to be sent for each AAAA query.
11 +This breaks DNSSEC!
12 +.TP
13 .B private\-address: \fI<IP address or subnet>
14 Give IPv4 of IPv6 addresses or classless subnets. These are addresses
15 on your private network, and are not allowed to be returned for public
16 --- unbound-1.4.17.orig/util/config_file.c
17 +++ unbound-1.4.17/util/config_file.c
18 @@ -160,6 +160,7 @@ config_create(void)
19 cfg->harden_below_nxdomain = 0;
20 cfg->harden_referral_path = 0;
21 cfg->use_caps_bits_for_id = 0;
22 + cfg->aaaa_filter = 0; /* ASN: default is disabled */
23 cfg->private_address = NULL;
24 cfg->private_domain = NULL;
25 cfg->unwanted_threshold = 0;
26 --- unbound-1.4.17.orig/iterator/iter_scrub.c
27 +++ unbound-1.4.17/iterator/iter_scrub.c
28 @@ -580,6 +580,32 @@ static int sanitize_nsec_is_overreach(st
29 }
30
31 /**
32 + * ASN: Lookup A records from rrset cache.
33 + * @param qinfo: the question originally asked.
34 + * @param env: module environment with config and cache.
35 + * @param ie: iterator environment with private address data.
36 + * @return 0 if no A record found, 1 if A record found.
37 + */
38 +static int
39 +asn_lookup_a_record_from_cache(struct query_info* qinfo,
40 + struct module_env* env, struct iter_env* ie)
41 +{
42 + struct ub_packed_rrset_key* akey;
43 +
44 + /* get cached A records for queried name */
45 + akey = rrset_cache_lookup(env->rrset_cache, qinfo->qname,
46 + qinfo->qname_len, LDNS_RR_TYPE_A, qinfo->qclass,
47 + 0, *env->now, 0);
48 + if(akey) { /* we had some. */
49 + log_rrset_key(VERB_ALGO, "ASN-AAAA-filter: found A record",
50 + akey);
51 + lock_rw_unlock(&akey->entry.lock);
52 + return 1;
53 + }
54 + return 0;
55 +}
56 +
57 +/**
58 * Given a response event, remove suspect RRsets from the response.
59 * "Suspect" rrsets are potentially poison. Note that this routine expects
60 * the response to be in a "normalized" state -- that is, all "irrelevant"
61 @@ -598,6 +625,7 @@ scrub_sanitize(ldns_buffer* pkt, struct
62 struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
63 struct iter_env* ie)
64 {
65 + int found_a_record = 0; /* ASN: do we have a A record? */
66 int del_addi = 0; /* if additional-holding rrsets are deleted, we
67 do not trust the normalized additional-A-AAAA any more */
68 struct rrset_parse* rrset, *prev;
69 @@ -633,6 +661,13 @@ scrub_sanitize(ldns_buffer* pkt, struct
70 rrset = rrset->rrset_all_next;
71 }
72
73 + /* ASN: Locate any A record we can find */
74 + if((ie->aaaa_filter) && (qinfo->qtype == LDNS_RR_TYPE_AAAA)) {
75 + found_a_record = asn_lookup_a_record_from_cache(qinfo,
76 + env, ie);
77 + }
78 + /* ASN: End of added code */
79 +
80 /* At this point, we brutally remove ALL rrsets that aren't
81 * children of the originating zone. The idea here is that,
82 * as far as we know, the server that we contacted is ONLY
83 @@ -644,6 +679,24 @@ scrub_sanitize(ldns_buffer* pkt, struct
84 rrset = msg->rrset_first;
85 while(rrset) {
86
87 + /* ASN: For AAAA records only... */
88 + if((ie->aaaa_filter) && (rrset->type == LDNS_RR_TYPE_AAAA)) {
89 + /* ASN: If this is not a AAAA query, then remove AAAA
90 + * records, no questions asked. If this IS a AAAA query
91 + * then remove AAAA records if we have an A record.
92 + * Otherwise, leave things be. */
93 + if((qinfo->qtype != LDNS_RR_TYPE_AAAA) ||
94 + (found_a_record)) {
95 + remove_rrset("ASN-AAAA-filter: removing AAAA "
96 + "for record", pkt, msg, prev, &rrset);
97 + continue;
98 + }
99 + log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: "
100 + "keep AAAA for", zonename,
101 + LDNS_RR_TYPE_AAAA, qinfo->qclass);
102 + }
103 + /* ASN: End of added code */
104 +
105 /* remove private addresses */
106 if( (rrset->type == LDNS_RR_TYPE_A ||
107 rrset->type == LDNS_RR_TYPE_AAAA) &&
108 --- unbound-1.4.17.orig/iterator/iterator.c
109 +++ unbound-1.4.17/iterator/iterator.c
110 @@ -1579,6 +1579,53 @@ processDSNSFind(struct module_qstate* qs
111
112 return 0;
113 }
114 +
115 +/**
116 + * ASN: This event state was added as an intermediary step between
117 + * QUERYTARGETS_STATE and the next step, in order to cast a subquery for the
118 + * purpose of caching A records for the queried name.
119 + *
120 + * @param qstate: query state.
121 + * @param iq: iterator query state.
122 + * @param ie: iterator shared global environment.
123 + * @param id: module id.
124 + * @return true if the event requires more request processing immediately,
125 + * false if not. This state only returns true when it is generating
126 + * a SERVFAIL response because the query has hit a dead end.
127 + */
128 +static int
129 +asn_processQueryAAAA(struct module_qstate* qstate, struct iter_qstate* iq,
130 + struct iter_env* ie, int id)
131 +{
132 + struct module_qstate* subq = NULL;
133 +
134 + log_assert(iq->fetch_a_for_aaaa == 0);
135 +
136 + /* flag the query properly in order to not loop */
137 + iq->fetch_a_for_aaaa = 1;
138 +
139 + /* re-throw same query, but with a different type */
140 + if(!generate_sub_request(iq->qchase.qname,
141 + iq->qchase.qname_len, LDNS_RR_TYPE_A,
142 + iq->qchase.qclass, qstate, id, iq,
143 + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) {
144 + log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: failed "
145 + "preloading of A record for",
146 + iq->qchase.qname, LDNS_RR_TYPE_A,
147 + iq->qchase.qclass);
148 + return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
149 + }
150 + log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: "
151 + "preloading records in cache for",
152 + iq->qchase.qname, LDNS_RR_TYPE_A,
153 + iq->qchase.qclass);
154 +
155 + /* set this query as waiting */
156 + qstate->ext_state[id] = module_wait_subquery;
157 + /* at this point break loop */
158 + return 0;
159 +}
160 +/* ASN: End of added code */
161
162 /**
163 * This is the request event state where the request will be sent to one of
164 @@ -1626,6 +1673,13 @@ processQueryTargets(struct module_qstate
165 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
166 }
167
168 + /* ASN: If we have a AAAA query, then also query for A records */
169 + if((ie->aaaa_filter) && (iq->qchase.qtype == LDNS_RR_TYPE_AAAA) &&
170 + (iq->fetch_a_for_aaaa == 0)) {
171 + return next_state(iq, ASN_FETCH_A_FOR_AAAA_STATE);
172 + }
173 + /* ASN: End of added code */
174 +
175 /* Make sure we have a delegation point, otherwise priming failed
176 * or another failure occurred */
177 if(!iq->dp) {
178 @@ -2568,6 +2622,62 @@ processFinished(struct module_qstate* qs
179 return 0;
180 }
181
182 +/**
183 + * ASN: Do final processing on responses to A queries originated from AAAA
184 + * queries. Events reach this state after the iterative resolution algorithm
185 + * terminates.
186 + * This is required down the road to decide whether to scrub AAAA records
187 + * from the results or not.
188 + *
189 + * @param qstate: query state.
190 + * @param id: module id.
191 + * @param forq: super query state.
192 + */
193 +static void
194 +asn_processAAAAResponse(struct module_qstate* qstate, int id,
195 + struct module_qstate* super)
196 +{
197 + struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id];
198 + struct iter_qstate* super_iq = (struct iter_qstate*)super->minfo[id];
199 + struct ub_packed_rrset_key* rrset;
200 + struct delegpt_ns* dpns = NULL;
201 + int error = (qstate->return_rcode != LDNS_RCODE_NOERROR);
202 +
203 + log_assert(super_iq->fetch_a_for_aaaa > 0);
204 +
205 + /* let super go to evaluation of targets after this */
206 + super_iq->state = QUERYTARGETS_STATE;
207 +
208 + log_query_info(VERB_ALGO, "ASN-AAAA-filter: processAAAAResponse",
209 + &qstate->qinfo);
210 + log_query_info(VERB_ALGO, "ASN-AAAA-filter: processAAAAResponse super",
211 + &super->qinfo);
212 +
213 + if(super_iq->dp)
214 + dpns = delegpt_find_ns(super_iq->dp,
215 + qstate->qinfo.qname, qstate->qinfo.qname_len);
216 + if (!dpns) {
217 + /* not interested */
218 + verbose(VERB_ALGO, "ASN-AAAA-filter: subq: %s, but parent not "
219 + "interested%s", (error ? "error, but" : "success"),
220 + (super_iq->dp ? "anymore" : " (was reset)"));
221 + log_query_info(VERB_ALGO, "ASN-AAAA-filter: superq", &super->qinfo);
222 + if(super_iq->dp && error)
223 + delegpt_log(VERB_ALGO, super_iq->dp);
224 + return;
225 + } else if (error) {
226 + verbose(VERB_ALGO, "ASN-AAAA-filter: mark as failed, "
227 + "and go to target query.");
228 + /* see if the failure did get (parent-lame) info */
229 + if(!cache_fill_missing(super->env,
230 + super_iq->qchase.qclass, super->region,
231 + super_iq->dp))
232 + log_err("ASN-AAAA-filter: out of memory adding missing");
233 + dpns->resolved = 1; /* mark as failed */
234 + }
235 +}
236 +/* ASN: End of added code */
237 +
238 /*
239 * Return priming query results to interestes super querystates.
240 *
241 @@ -2587,6 +2697,9 @@ iter_inform_super(struct module_qstate*
242 else if(super->qinfo.qtype == LDNS_RR_TYPE_DS && ((struct iter_qstate*)
243 super->minfo[id])->state == DSNS_FIND_STATE)
244 processDSNSResponse(qstate, id, super);
245 + else if (super->qinfo.qtype == LDNS_RR_TYPE_AAAA && ((struct iter_qstate*)
246 + super->minfo[id])->state == ASN_FETCH_A_FOR_AAAA_STATE)
247 + asn_processAAAAResponse(qstate, id, super);
248 else if(qstate->return_rcode != LDNS_RCODE_NOERROR)
249 error_supers(qstate, id, super);
250 else if(qstate->is_priming)
251 @@ -2624,6 +2737,9 @@ iter_handle(struct module_qstate* qstate
252 case INIT_REQUEST_3_STATE:
253 cont = processInitRequest3(qstate, iq, id);
254 break;
255 + case ASN_FETCH_A_FOR_AAAA_STATE:
256 + cont = asn_processQueryAAAA(qstate, iq, ie, id);
257 + break;
258 case QUERYTARGETS_STATE:
259 cont = processQueryTargets(qstate, iq, ie, id);
260 break;
261 @@ -2863,6 +2979,8 @@ iter_state_to_string(enum iter_state sta
262 return "INIT REQUEST STATE (stage 2)";
263 case INIT_REQUEST_3_STATE:
264 return "INIT REQUEST STATE (stage 3)";
265 + case ASN_FETCH_A_FOR_AAAA_STATE:
266 + return "ASN_FETCH_A_FOR_AAAA_STATE";
267 case QUERYTARGETS_STATE :
268 return "QUERY TARGETS STATE";
269 case PRIME_RESP_STATE :
270 @@ -2887,6 +3005,7 @@ iter_state_is_responsestate(enum iter_st
271 case INIT_REQUEST_STATE :
272 case INIT_REQUEST_2_STATE :
273 case INIT_REQUEST_3_STATE :
274 + case ASN_FETCH_A_FOR_AAAA_STATE :
275 case QUERYTARGETS_STATE :
276 case COLLECT_CLASS_STATE :
277 return 0;
278 --- unbound-1.4.17.orig/iterator/iter_utils.c
279 +++ unbound-1.4.17/iterator/iter_utils.c
280 @@ -128,6 +128,7 @@ iter_apply_cfg(struct iter_env* iter_env
281 }
282 iter_env->supports_ipv6 = cfg->do_ip6;
283 iter_env->supports_ipv4 = cfg->do_ip4;
284 + iter_env->aaaa_filter = cfg->aaaa_filter;
285 return 1;
286 }
287
288 --- unbound-1.4.17.orig/iterator/iterator.h
289 +++ unbound-1.4.17/iterator/iterator.h
290 @@ -110,6 +110,9 @@ struct iter_env {
291 * array of max_dependency_depth+1 size.
292 */
293 int* target_fetch_policy;
294 +
295 + /** ASN: AAAA-filter flag */
296 + int aaaa_filter;
297 };
298
299 /**
300 @@ -135,6 +138,14 @@ enum iter_state {
301 INIT_REQUEST_3_STATE,
302
303 /**
304 + * This state is responsible for intercepting AAAA queries,
305 + * and launch a A subquery on the same target, to populate the
306 + * cache with A records, so the AAAA filter scrubbing logic can
307 + * work.
308 + */
309 + ASN_FETCH_A_FOR_AAAA_STATE,
310 +
311 + /**
312 * Each time a delegation point changes for a given query or a
313 * query times out and/or wakes up, this state is (re)visited.
314 * This state is reponsible for iterating through a list of
315 @@ -309,6 +320,13 @@ struct iter_qstate {
316 */
317 int refetch_glue;
318
319 + /**
320 + * ASN: This is a flag that, if true, means that this query is
321 + * for fetching A records to populate cache and determine if we must
322 + * return AAAA records or not.
323 + */
324 + int fetch_a_for_aaaa;
325 +
326 /** list of pending queries to authoritative servers. */
327 struct outbound_list outlist;
328 };
329 --- unbound-1.4.17.orig/util/config_file.h
330 +++ unbound-1.4.17/util/config_file.h
331 @@ -169,6 +169,8 @@ struct config_file {
332 int harden_referral_path;
333 /** use 0x20 bits in query as random ID bits */
334 int use_caps_bits_for_id;
335 + /** ASN: enable AAAA filter? */
336 + int aaaa_filter;
337 /** strip away these private addrs from answers, no DNS Rebinding */
338 struct config_strlist* private_address;
339 /** allow domain (and subdomains) to use private address space */
340 --- unbound-1.4.17.orig/util/configlexer.lex
341 +++ unbound-1.4.17/util/configlexer.lex
342 @@ -177,6 +177,7 @@ harden-below-nxdomain{COLON} { YDVAR(1,
343 harden-referral-path{COLON} { YDVAR(1, VAR_HARDEN_REFERRAL_PATH) }
344 use-caps-for-id{COLON} { YDVAR(1, VAR_USE_CAPS_FOR_ID) }
345 unwanted-reply-threshold{COLON} { YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
346 +aaaa-filter{COLON} { YDVAR(1, VAR_AAAA_FILTER) }
347 private-address{COLON} { YDVAR(1, VAR_PRIVATE_ADDRESS) }
348 private-domain{COLON} { YDVAR(1, VAR_PRIVATE_DOMAIN) }
349 prefetch-key{COLON} { YDVAR(1, VAR_PREFETCH_KEY) }
350 --- unbound-1.4.17.orig/util/configparser.y
351 +++ unbound-1.4.17/util/configparser.y
352 @@ -92,6 +92,7 @@ extern struct config_parser_state* cfg_p
353 %token VAR_STATISTICS_CUMULATIVE VAR_OUTGOING_PORT_PERMIT
354 %token VAR_OUTGOING_PORT_AVOID VAR_DLV_ANCHOR_FILE VAR_DLV_ANCHOR
355 %token VAR_NEG_CACHE_SIZE VAR_HARDEN_REFERRAL_PATH VAR_PRIVATE_ADDRESS
356 +%token VAR_AAAA_FILTER
357 %token VAR_PRIVATE_DOMAIN VAR_REMOTE_CONTROL VAR_CONTROL_ENABLE
358 %token VAR_CONTROL_INTERFACE VAR_CONTROL_PORT VAR_SERVER_KEY_FILE
359 %token VAR_SERVER_CERT_FILE VAR_CONTROL_KEY_FILE VAR_CONTROL_CERT_FILE
360 @@ -151,6 +152,7 @@ content_server: server_num_threads | ser
361 server_dlv_anchor_file | server_dlv_anchor | server_neg_cache_size |
362 server_harden_referral_path | server_private_address |
363 server_private_domain | server_extended_statistics |
364 + server_aaaa_filter |
365 server_local_data_ptr | server_jostle_timeout |
366 server_unwanted_reply_threshold | server_log_time_ascii |
367 server_domain_insecure | server_val_sig_skew_min |
368 @@ -802,6 +803,15 @@ server_use_caps_for_id: VAR_USE_CAPS_FOR
369 free($2);
370 }
371 ;
372 +server_aaaa_filter: VAR_AAAA_FILTER STRING_ARG
373 + {
374 + OUTYY(("P(server_aaaa_filter:%s)\n", $2));
375 + if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
376 + yyerror("expected yes or no.");
377 + else cfg_parser->cfg->aaaa_filter = (strcmp($2, "yes")==0);
378 + free($2);
379 + }
380 + ;
381 server_private_address: VAR_PRIVATE_ADDRESS STRING_ARG
382 {
383 OUTYY(("P(server_private_address:%s)\n", $2));
384 --- unbound-1.4.17.orig/pythonmod/interface.i
385 +++ unbound-1.4.17/pythonmod/interface.i
386 @@ -626,6 +626,7 @@ struct config_file {
387 int harden_dnssec_stripped;
388 int harden_referral_path;
389 int use_caps_bits_for_id;
390 + int aaaa_filter; /* ASN */
391 struct config_strlist* private_address;
392 struct config_strlist* private_domain;
393 size_t unwanted_threshold;
663663 if(!go_on)
664664 return 1; /* skip this one, not all references satisfied */
665665
666 if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL)) {
666 if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL, flags)) {
667667 log_warn("error out of memory");
668668 return 0;
669669 }
853853
854854 /* RCODE */
855855 for(i=0; i<STATS_RCODE_NUM; i++) {
856 if(inhibit_zero && s->svr.ans_rcode[i] == 0)
856 /* Always include RCODEs 0-5 */
857 if(inhibit_zero && i > LDNS_RCODE_REFUSED && s->svr.ans_rcode[i] == 0)
857858 continue;
858859 lt = sldns_lookup_by_id(sldns_rcodes, i);
859860 if(lt && lt->name) {
10931094 k.qname_len = nmlen;
10941095 k.qtype = t;
10951096 k.qclass = c;
1096 h = query_info_hash(&k);
1097 h = query_info_hash(&k, 0);
10971098 slabhash_remove(worker->env.msg_cache, h, &k);
1099 if(t == LDNS_RR_TYPE_AAAA) {
1100 /* for AAAA also flush dns64 bit_cd packet */
1101 h = query_info_hash(&k, BIT_CD);
1102 slabhash_remove(worker->env.msg_cache, h, &k);
1103 }
10981104 }
10991105
11001106 /** flush a type */
286286 #ifdef HAVE_SETRLIMIT
287287 }
288288 #endif
289 log_warn("increased limit(open files) from %u to %u",
289 verbose(VERB_ALGO, "increased limit(open files) from %u to %u",
290290 (unsigned)avail, (unsigned)total+10);
291291 }
292292 #else
934934 &repinfo->addr, repinfo->addrlen);
935935 goto send_reply;
936936 }
937 h = query_info_hash(&qinfo);
937 h = query_info_hash(&qinfo, sldns_buffer_read_u16_at(c->buffer, 2));
938938 if((e=slabhash_lookup(worker->env.msg_cache, h, &qinfo, 0))) {
939939 /* answer from cache - we have acquired a readlock on it */
940940 if(answer_from_cache(worker, &qinfo,
398398
399399 /* Create the new sub-query. */
400400 fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
401 if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0,
401 if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0, 0,
402402 &subq))
403403 return module_error;
404404 if (subq) {
450450 /* Start the sub-query. */
451451 fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
452452 if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0,
453 &subq))
453 0, &subq))
454454 {
455455 verbose(VERB_ALGO, "dns64: sub-query creation failed");
456456 return module_error;
519519 *
520520 * - An internal query.
521521 * - A query for a record type other than AAAA.
522 * - CD FLAG was set on querier
522523 * - An AAAA query for which an error was returned.
523524 * - A successful AAAA query with an answer.
524525 */
525526 if ( (enum dns64_qstate)qstate->minfo[id] == DNS64_INTERNAL_QUERY
526527 || qstate->qinfo.qtype != LDNS_RR_TYPE_AAAA
528 || (qstate->query_flags & BIT_CD)
527529 || qstate->return_rcode != LDNS_RCODE_NOERROR
528530 || (qstate->return_msg &&
529531 qstate->return_msg->rep &&
812814
813815 /* Store the generated response in cache. */
814816 if (!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
815 0, 0, 0, NULL))
817 0, 0, 0, NULL, super->query_flags))
816818 log_err("out of memory");
817819 }
818820
0 8 December 2014: Wouter
1 - Fix CVE-2014-8602: denial of service by making resolver chase
2 endless series of delegations.
3
4 1 December 2014: Wouter
5 - Fix bug#632: unbound fails to build on AArch64, protects
6 getentropy compat code from calling sysctl if it is has been removed.
7
8 29 November 2014: Wouter
9 - Add include to getentropy_linux.c, hopefully fixing debian build.
10
11 28 November 2014: Wouter
12 - Fix makefile for build from noexec source tree.
13
14 26 November 2014: Wouter
15 - Fix libunbound undefined symbol errors for main.
16 Referencing main does not seem to be possible for libunbound.
17
18 24 November 2014: Wouter
19 - Fix log at high verbosity and memory allocation failure.
20 - iana portlist update.
21
22 21 November 2014: Wouter
23 - Fix crash on multiple thread random usage on systems without
24 arc4random.
25
26 20 November 2014: Wouter
27 - fix compat/getentropy_win.c check if CryptGenRandom works and no
28 immediate exit on windows.
29
30 19 November 2014: Wouter
31 - Fix cdflag dns64 processing.
32
33 18 November 2014: Wouter
34 - Fix that CD flag disables DNS64 processing, returning the DNSSEC
35 signed AAAA denial.
36 - iana portlist update.
37
38 17 November 2014: Wouter
39 - Fix #627: SSL_CTX_load_verify_locations return code not properly
40 checked.
41
42 14 November 2014: Wouter
43 - parser with bison 2.7
44
45 13 November 2014: Wouter
46 - Patch from Stephane Lapie for ASAHI Net that implements aaaa-filter,
47 added to contrib/aaaa-filter-iterator.patch.
48
49 12 November 2014: Wouter
50 - trunk has 1.5.1 in development.
51 - Patch from Robert Edmonds to build pyunbound python module
52 differently. No versioninfo, with -shared and without $(LIBS).
53 - Patch from Robert Edmonds fixes hyphens in unbound-anchor man page.
54 - Removed 'increased limit open files' log message that is written
55 to console. It is only written on verbosity 4 and higher.
56 This keeps system bootup console cleaner.
57 - Patch from James Raftery, always print stats for rcodes 0..5.
58
059 11 November 2014: Wouter
160 - iana portlist update.
261 - Fix bug where forward or stub addresses with same address but
362 different port number were not tried.
463 - version number in svn trunk is 1.5.0
564 - tag 1.5.0rc1
65 - review fix from Ralph.
666
767 7 November 2014: Wouter
868 - dnstap fixes by Robert Edmonds:
0 README for Unbound 1.5.0rc1
0 README for Unbound 1.5.1
11 Copyright 2007 NLnet Labs
22 http://unbound.net
33
00 #
11 # Example configuration file.
22 #
3 # See unbound.conf(5) man page, version 1.5.0rc1.
3 # See unbound.conf(5) man page, version 1.5.1.
44 #
55 # this is a comment.
66
0 .TH "libunbound" "3" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "libunbound" "3" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" libunbound.3 -- unbound library functions manual
33 .\"
4141 .B ub_ctx_zone_remove,
4242 .B ub_ctx_data_add,
4343 .B ub_ctx_data_remove
44 \- Unbound DNS validating resolver 1.5.0rc1 functions.
44 \- Unbound DNS validating resolver 1.5.1 functions.
4545 .SH "SYNOPSIS"
4646 .B #include <unbound.h>
4747 .LP
0 .TH "unbound-anchor" "8" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound-anchor" "8" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound-anchor.8 -- unbound anchor maintenance utility manual
33 .\"
0 .TH "unbound-checkconf" "8" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound-checkconf" "8" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound-checkconf.8 -- unbound configuration checker manual
33 .\"
0 .TH "unbound-control" "8" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound-control" "8" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound-control.8 -- unbound remote control manual
33 .\"
0 .TH "unbound\-host" "1" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound\-host" "1" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound-host.1 -- unbound DNS lookup utility
33 .\"
0 .TH "unbound" "8" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound" "8" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound.8 -- unbound manual
33 .\"
88 .\"
99 .SH "NAME"
1010 .B unbound
11 \- Unbound DNS validating resolver 1.5.0rc1.
11 \- Unbound DNS validating resolver 1.5.1.
1212 .SH "SYNOPSIS"
1313 .B unbound
1414 .RB [ \-h ]
0 .TH "unbound.conf" "5" "Nov 11, 2014" "NLnet Labs" "unbound 1.5.0rc1"
0 .TH "unbound.conf" "5" "Dec 8, 2014" "NLnet Labs" "unbound 1.5.1"
11 .\"
22 .\" unbound.conf.5 -- unbound.conf manual
33 .\"
424424 void
425425 iter_dns_store(struct module_env* env, struct query_info* msgqinf,
426426 struct reply_info* msgrep, int is_referral, time_t leeway, int pside,
427 struct regional* region)
427 struct regional* region, uint16_t flags)
428428 {
429429 if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
430 pside, region))
430 pside, region, flags))
431431 log_err("out of memory: cannot store data in cache");
432432 }
433433
456456 fptr_ok(fptr_whitelist_modenv_detect_cycle(
457457 qstate->env->detect_cycle));
458458 return (*qstate->env->detect_cycle)(qstate, &qinf,
459 (uint16_t)(BIT_RD|BIT_CD), qstate->is_priming);
459 (uint16_t)(BIT_RD|BIT_CD), qstate->is_priming,
460 qstate->is_valrec);
460461 }
461462
462463 void
123123 * @param pside: true if dp is parentside, thus message is 'fresh' and NS
124124 * can be prefetch-updates.
125125 * @param region: to copy modified (cache is better) rrs back to.
126 * @param flags: with BIT_CD for dns64 AAAA translated queries.
126127 * @return void, because we are not interested in alloc errors,
127128 * the iterator and validator can operate on the results in their
128129 * scratch space (the qstate.region) and are not dependent on the cache.
131132 */
132133 void iter_dns_store(struct module_env* env, struct query_info* qinf,
133134 struct reply_info* rep, int is_referral, time_t leeway, int pside,
134 struct regional* region);
135 struct regional* region, uint16_t flags);
135136
136137 /**
137138 * Select randomly with n/m probability.
119119 iq->query_restart_count = 0;
120120 iq->referral_count = 0;
121121 iq->sent_count = 0;
122 iq->target_count = NULL;
122123 iq->wait_priming_stub = 0;
123124 iq->refetch_glue = 0;
124125 iq->dnssec_expected = 0;
256257 verbose(VERB_ALGO, "error response for prefetch in cache");
257258 /* attempt to adjust the cache entry prefetch */
258259 if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
259 NORR_TTL))
260 NORR_TTL, qstate->query_flags))
260261 return error_response(qstate, id, rcode);
261262 /* if that fails (not in cache), fall through to store err */
262263 }
269270 /* do not waste time trying to validate this servfail */
270271 err.security = sec_status_indeterminate;
271272 verbose(VERB_ALGO, "store error response in message cache");
272 iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL);
273 iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
274 qstate->query_flags);
273275 return error_response(qstate, id, rcode);
274276 }
275277
452454 return 1;
453455 }
454456
457 /** create target count structure for this query */
458 static void
459 target_count_create(struct iter_qstate* iq)
460 {
461 if(!iq->target_count) {
462 iq->target_count = (int*)calloc(2, sizeof(int));
463 /* if calloc fails we simply do not track this number */
464 if(iq->target_count)
465 iq->target_count[0] = 1;
466 }
467 }
468
469 static void
470 target_count_increase(struct iter_qstate* iq, int num)
471 {
472 target_count_create(iq);
473 if(iq->target_count)
474 iq->target_count[1] += num;
475 }
476
455477 /**
456478 * Generate a subrequest.
457479 * Generate a local request event. Local events are tied to this module, and
485507 uint16_t qflags = 0; /* OPCODE QUERY, no flags */
486508 struct query_info qinf;
487509 int prime = (finalstate == PRIME_RESP_STATE)?1:0;
510 int valrec = 0;
488511 qinf.qname = qname;
489512 qinf.qname_len = qnamelen;
490513 qinf.qtype = qtype;
498521 * the resolution chain, which might have a validator. We are
499522 * uninterested in validating things not on the direct resolution
500523 * path. */
501 if(!v)
524 if(!v) {
502525 qflags |= BIT_CD;
526 valrec = 1;
527 }
503528
504529 /* attach subquery, lookup existing or make a new one */
505530 fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
506 if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, &subq)) {
531 if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, valrec,
532 &subq)) {
507533 return 0;
508534 }
509535 *subq_ret = subq;
523549 subiq = (struct iter_qstate*)subq->minfo[id];
524550 memset(subiq, 0, sizeof(*subiq));
525551 subiq->num_target_queries = 0;
552 target_count_create(iq);
553 subiq->target_count = iq->target_count;
554 if(iq->target_count)
555 iq->target_count[0] ++; /* extra reference */
526556 subiq->num_current_queries = 0;
527557 subiq->depth = iq->depth+1;
528558 outbound_list_init(&subiq->outlist);
937967 } else {
938968 msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
939969 iq->qchase.qname_len, iq->qchase.qtype,
940 iq->qchase.qclass, qstate->region, qstate->env->scratch);
970 iq->qchase.qclass, qstate->query_flags,
971 qstate->region, qstate->env->scratch);
941972 if(!msg && qstate->env->neg_cache) {
942973 /* lookup in negative cache; may result in
943974 * NOERROR/NODATA or NXDOMAIN answers that need validation */
13491380
13501381 if(iq->depth == ie->max_dependency_depth)
13511382 return 0;
1383 if(iq->depth > 0 && iq->target_count &&
1384 iq->target_count[1] > MAX_TARGET_COUNT) {
1385 verbose(VERB_QUERY, "request has exceeded the maximum "
1386 "number of glue fetches %d", iq->target_count[1]);
1387 return 0;
1388 }
13521389
13531390 iter_mark_cycle_targets(qstate, iq->dp);
13541391 missing = (int)delegpt_count_missing_targets(iq->dp);
15311568 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
15321569 }
15331570 iq->num_target_queries += qs;
1571 target_count_increase(iq, qs);
15341572 if(qs != 0) {
15351573 qstate->ext_state[id] = module_wait_subquery;
15361574 return 0; /* and wait for them */
15381576 }
15391577 if(iq->depth == ie->max_dependency_depth) {
15401578 verbose(VERB_QUERY, "maxdepth and need more nameservers, fail");
1579 return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
1580 }
1581 if(iq->depth > 0 && iq->target_count &&
1582 iq->target_count[1] > MAX_TARGET_COUNT) {
1583 verbose(VERB_QUERY, "request has exceeded the maximum "
1584 "number of glue fetches %d", iq->target_count[1]);
15411585 return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
15421586 }
15431587 /* mark cycle targets for parent-side lookups */
15691613 if(query_count != 0) { /* suspend to await results */
15701614 verbose(VERB_ALGO, "try parent-side glue lookup");
15711615 iq->num_target_queries += query_count;
1616 target_count_increase(iq, query_count);
15721617 qstate->ext_state[id] = module_wait_subquery;
15731618 return 0;
15741619 }
17241769 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
17251770 }
17261771 iq->num_target_queries += extra;
1772 target_count_increase(iq, extra);
17271773 if(iq->num_target_queries > 0) {
17281774 /* wait to get all targets, we want to try em */
17291775 verbose(VERB_ALGO, "wait for all targets for fallback");
17641810 /* errors ignored, these targets are not strictly necessary for
17651811 * this result, we do not have to reply with SERVFAIL */
17661812 iq->num_target_queries += extra;
1813 target_count_increase(iq, extra);
17671814 }
17681815
17691816 /* Add the current set of unused targets to our queue. */
18091856 return 1;
18101857 }
18111858 iq->num_target_queries += qs;
1859 target_count_increase(iq, qs);
18121860 }
18131861 /* Since a target query might have been made, we
18141862 * need to check again. */
19902038 iter_dns_store(qstate->env, &iq->response->qinfo,
19912039 iq->response->rep, 0, qstate->prefetch_leeway,
19922040 iq->dp&&iq->dp->has_parent_side_NS,
1993 qstate->region);
2041 qstate->region, qstate->query_flags);
19942042 /* close down outstanding requests to be discarded */
19952043 outbound_list_clear(&iq->outlist);
19962044 iq->num_current_queries = 0;
20282076 /* Store the referral under the current query */
20292077 /* no prefetch-leeway, since its not the answer */
20302078 iter_dns_store(qstate->env, &iq->response->qinfo,
2031 iq->response->rep, 1, 0, 0, NULL);
2079 iq->response->rep, 1, 0, 0, NULL, 0);
20322080 if(iq->store_parent_NS)
20332081 iter_store_parentside_NS(qstate->env,
20342082 iq->response->rep);
21272175 /* prefetchleeway applied because this updates answer parts */
21282176 iter_dns_store(qstate->env, &iq->response->qinfo,
21292177 iq->response->rep, 1, qstate->prefetch_leeway,
2130 iq->dp&&iq->dp->has_parent_side_NS, NULL);
2178 iq->dp&&iq->dp->has_parent_side_NS, NULL,
2179 qstate->query_flags);
21312180 /* set the current request's qname to the new value. */
21322181 iq->qchase.qname = sname;
21332182 iq->qchase.qname_len = snamelen;
22082257 }
22092258
22102259 /**
2211 * Return priming query results to interestes super querystates.
2260 * Return priming query results to interested super querystates.
22122261 *
22132262 * Sets the delegation point and delegation message (not nonRD queries).
22142263 * This is a callback from walk_supers.
26392688 iter_dns_store(qstate->env, &qstate->qinfo,
26402689 iq->response->rep, 0, qstate->prefetch_leeway,
26412690 iq->dp&&iq->dp->has_parent_side_NS,
2642 qstate->region);
2691 qstate->region, qstate->query_flags);
26432692 }
26442693 }
26452694 qstate->return_rcode = LDNS_RCODE_NOERROR;
29202969 iq = (struct iter_qstate*)qstate->minfo[id];
29212970 if(iq) {
29222971 outbound_list_clear(&iq->outlist);
2972 if(iq->target_count && --iq->target_count[0] == 0)
2973 free(iq->target_count);
29232974 iq->num_current_queries = 0;
29242975 }
29252976 qstate->minfo[id] = NULL;
5151 struct iter_prep_list;
5252 struct iter_priv;
5353
54 /** max number of targets spawned for a query and its subqueries */
55 #define MAX_TARGET_COUNT 32
5456 /** max number of query restarts. Determines max number of CNAME chain. */
5557 #define MAX_RESTART_COUNT 8
5658 /** max number of referrals. Makes sure resolver does not run away */
250252
251253 /** number of queries fired off */
252254 int sent_count;
255
256 /** number of target queries spawned in [1], for this query and its
257 * subqueries, the malloced-array is shared, [0] refcount. */
258 int* target_count;
253259
254260 /**
255261 * The query must store NS records from referrals as parentside RRs
356356 int ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname);
357357
358358 /**
359 * Add trust anchor to the give context that is tracked with RFC5011
359 * Add trust anchor to the given context that is tracked with RFC5011
360360 * automated trust anchor maintenance. The file is written to when the
361361 * trust anchor is changed.
362362 * Pass the name of a file that was output from eg. unbound-anchor,
6666 }
6767
6868 return dns_cache_store(qstate->env, qinfo, msgrep, is_referral,
69 qstate->prefetch_leeway, 0, NULL);
69 qstate->prefetch_leeway, 0, NULL, qstate->query_flags);
7070 }
7171
7272 /* Invalidate the message associated with query_info stored in message cache */
7777 struct reply_info *r;
7878 size_t i, j;
7979
80 h = query_info_hash(qinfo);
80 h = query_info_hash(qinfo, qstate->query_flags);
8181 if ((e=slabhash_lookup(qstate->env->msg_cache, h, qinfo, 0)))
8282 {
8383 r = (struct reply_info*)(e->data);
183183 /** lookup message in message cache */
184184 static struct msgreply_entry*
185185 msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
186 uint16_t qtype, uint16_t qclass, time_t now, int wr)
186 uint16_t qtype, uint16_t qclass, uint16_t flags, time_t now, int wr)
187187 {
188188 struct lruhash_entry* e;
189189 struct query_info k;
193193 k.qname_len = qnamelen;
194194 k.qtype = qtype;
195195 k.qclass = qclass;
196 h = query_info_hash(&k);
196 h = query_info_hash(&k, flags);
197197 e = slabhash_lookup(env->msg_cache, h, &k, wr);
198198
199199 if(!e) return NULL;
225225 addr_to_additional(akey, region, *msg, now);
226226 lock_rw_unlock(&akey->entry.lock);
227227 } else {
228 /* BIT_CD on false because delegpt lookup does
229 * not use dns64 translation */
228230 neg = msg_cache_lookup(env, ns->name, ns->namelen,
229 LDNS_RR_TYPE_A, qclass, now, 0);
231 LDNS_RR_TYPE_A, qclass, 0, now, 0);
230232 if(neg) {
231233 delegpt_add_neg_msg(dp, neg);
232234 lock_rw_unlock(&neg->entry.lock);
243245 addr_to_additional(akey, region, *msg, now);
244246 lock_rw_unlock(&akey->entry.lock);
245247 } else {
248 /* BIT_CD on false because delegpt lookup does
249 * not use dns64 translation */
246250 neg = msg_cache_lookup(env, ns->name, ns->namelen,
247 LDNS_RR_TYPE_AAAA, qclass, now, 0);
251 LDNS_RR_TYPE_AAAA, qclass, 0, now, 0);
248252 if(neg) {
249253 delegpt_add_neg_msg(dp, neg);
250254 lock_rw_unlock(&neg->entry.lock);
275279 ns->name, LDNS_RR_TYPE_A, qclass);
276280 lock_rw_unlock(&akey->entry.lock);
277281 } else {
282 /* BIT_CD on false because delegpt lookup does
283 * not use dns64 translation */
278284 neg = msg_cache_lookup(env, ns->name, ns->namelen,
279 LDNS_RR_TYPE_A, qclass, now, 0);
285 LDNS_RR_TYPE_A, qclass, 0, now, 0);
280286 if(neg) {
281287 delegpt_add_neg_msg(dp, neg);
282288 lock_rw_unlock(&neg->entry.lock);
293299 ns->name, LDNS_RR_TYPE_AAAA, qclass);
294300 lock_rw_unlock(&akey->entry.lock);
295301 } else {
302 /* BIT_CD on false because delegpt lookup does
303 * not use dns64 translation */
296304 neg = msg_cache_lookup(env, ns->name, ns->namelen,
297 LDNS_RR_TYPE_AAAA, qclass, now, 0);
305 LDNS_RR_TYPE_AAAA, qclass, 0, now, 0);
298306 if(neg) {
299307 delegpt_add_neg_msg(dp, neg);
300308 lock_rw_unlock(&neg->entry.lock);
625633 struct dns_msg*
626634 dns_cache_lookup(struct module_env* env,
627635 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
628 struct regional* region, struct regional* scratch)
636 uint16_t flags, struct regional* region, struct regional* scratch)
629637 {
630638 struct lruhash_entry* e;
631639 struct query_info k;
638646 k.qname_len = qnamelen;
639647 k.qtype = qtype;
640648 k.qclass = qclass;
641 h = query_info_hash(&k);
649 h = query_info_hash(&k, flags);
642650 e = slabhash_lookup(env->msg_cache, h, &k, 0);
643651 if(e) {
644652 struct msgreply_entry* key = (struct msgreply_entry*)e->key;
715723 if(env->cfg->harden_below_nxdomain)
716724 while(!dname_is_root(k.qname)) {
717725 dname_remove_label(&k.qname, &k.qname_len);
718 h = query_info_hash(&k);
726 h = query_info_hash(&k, flags);
719727 e = slabhash_lookup(env->msg_cache, h, &k, 0);
720728 if(e) {
721729 struct reply_info* data = (struct reply_info*)e->data;
740748 int
741749 dns_cache_store(struct module_env* env, struct query_info* msgqinf,
742750 struct reply_info* msgrep, int is_referral, time_t leeway, int pside,
743 struct regional* region)
751 struct regional* region, uint16_t flags)
744752 {
745753 struct reply_info* rep = NULL;
746754 /* alloc, malloc properly (not in region, like msg is) */
785793 * Not AA from cache. Not CD in cache (depends on client bit). */
786794 rep->flags |= (BIT_RA | BIT_QR);
787795 rep->flags &= ~(BIT_AA | BIT_CD);
788 h = query_info_hash(&qinf);
796 h = query_info_hash(&qinf, flags);
789797 dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
790798 region);
791799 /* qname is used inside query_info_entrysetup, and set to
797805
798806 int
799807 dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
800 time_t adjust)
808 time_t adjust, uint16_t flags)
801809 {
802810 struct msgreply_entry* msg;
803811 msg = msg_cache_lookup(env, qinfo->qname, qinfo->qname_len,
804 qinfo->qtype, qinfo->qclass, *env->now, 1);
812 qinfo->qtype, qinfo->qclass, flags, *env->now, 1);
805813 if(msg) {
806814 struct reply_info* rep = (struct reply_info*)msg->entry.data;
807815 if(rep) {
7878 * can be updated to full TTL even in prefetch situations.
7979 * @param region: region to allocate better entries from cache into.
8080 * (used when is_referral is false).
81 * @param flags: flags with BIT_CD for AAAA queries in dns64 translation.
8182 * @return 0 on alloc error (out of memory).
8283 */
8384 int dns_cache_store(struct module_env* env, struct query_info* qinf,
8485 struct reply_info* rep, int is_referral, time_t leeway, int pside,
85 struct regional* region);
86 struct regional* region, uint16_t flags);
8687
8788 /**
8889 * Store message in the cache. Stores in message cache and rrset cache.
131132 * @param qnamelen: length of qname.
132133 * @param qtype: query type.
133134 * @param qclass: query class.
135 * @param flags: flags with BIT_CD for AAAA queries in dns64 translation.
134136 * @param region: where to allocate result.
135137 * @param scratch: where to allocate temporary data.
136138 * @return new response message (alloced in region, rrsets do not have IDs).
139141 */
140142 struct dns_msg* dns_cache_lookup(struct module_env* env,
141143 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
142 struct regional* region, struct regional* scratch);
144 uint16_t flags, struct regional* region, struct regional* scratch);
143145
144146 /**
145147 * find and add A and AAAA records for missing nameservers in delegpt
185187 * @param env: module environment with caches and time.
186188 * @param qinfo: query info for the query that needs adjustment.
187189 * @param adjust: time in seconds to add to the prefetch_leeway.
190 * @param flags: flags with BIT_CD for AAAA queries in dns64 translation.
188191 * @return false if not in cache. true if added.
189192 */
190193 int dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
191 time_t adjust);
194 time_t adjust, uint16_t flags);
192195
193196 #endif /* SERVICES_CACHE_DNS_H */
131131 if(!a->s.is_priming && b->s.is_priming)
132132 return 1;
133133
134 if(a->s.is_valrec && !b->s.is_valrec)
135 return -1;
136 if(!a->s.is_valrec && b->s.is_valrec)
137 return 1;
138
134139 if((a->s.query_flags&BIT_RD) && !(b->s.query_flags&BIT_RD))
135140 return -1;
136141 if(!(a->s.query_flags&BIT_RD) && (b->s.query_flags&BIT_RD))
276281 uint16_t qflags, struct edns_data* edns, struct comm_reply* rep,
277282 uint16_t qid)
278283 {
279 /* do not use CD flag from user for mesh state, we want the CD-query
280 * to receive validation anyway, to protect out cache contents and
281 * avoid bad-data in this cache that a downstream validator cannot
282 * remove from this cache */
283 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&BIT_RD, 0);
284 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
284285 int was_detached = 0;
285286 int was_noreply = 0;
286287 int added = 0;
310311 #ifdef UNBOUND_DEBUG
311312 struct rbnode_t* n;
312313 #endif
313 s = mesh_state_create(mesh->env, qinfo, qflags&BIT_RD, 0);
314 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
314315 if(!s) {
315316 log_err("mesh_state_create: out of memory; SERVFAIL");
316317 error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL,
374375 uint16_t qflags, struct edns_data* edns, sldns_buffer* buf,
375376 uint16_t qid, mesh_cb_func_t cb, void* cb_arg)
376377 {
377 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&BIT_RD, 0);
378 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
378379 int was_detached = 0;
379380 int was_noreply = 0;
380381 int added = 0;
385386 #ifdef UNBOUND_DEBUG
386387 struct rbnode_t* n;
387388 #endif
388 s = mesh_state_create(mesh->env, qinfo, qflags&BIT_RD, 0);
389 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
389390 if(!s) {
390391 return 0;
391392 }
427428 void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
428429 uint16_t qflags, time_t leeway)
429430 {
430 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&BIT_RD, 0);
431 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
431432 #ifdef UNBOUND_DEBUG
432433 struct rbnode_t* n;
433434 #endif
446447 mesh->stats_dropped ++;
447448 return;
448449 }
449 s = mesh_state_create(mesh->env, qinfo, qflags&BIT_RD, 0);
450 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
450451 if(!s) {
451452 log_err("prefetch mesh_state_create: out of memory");
452453 return;
495496
496497 struct mesh_state*
497498 mesh_state_create(struct module_env* env, struct query_info* qinfo,
498 uint16_t qflags, int prime)
499 uint16_t qflags, int prime, int valrec)
499500 {
500501 struct regional* region = alloc_reg_obtain(env->alloc);
501502 struct mesh_state* mstate;
532533 /* remove all weird bits from qflags */
533534 mstate->s.query_flags = (qflags & (BIT_RD|BIT_CD));
534535 mstate->s.is_priming = prime;
536 mstate->s.is_valrec = valrec;
535537 mstate->s.reply = NULL;
536538 mstate->s.region = region;
537539 mstate->s.curmod = 0;
678680 }
679681
680682 int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
681 uint16_t qflags, int prime, struct module_qstate** newq)
683 uint16_t qflags, int prime, int valrec, struct module_qstate** newq)
682684 {
683685 /* find it, if not, create it */
684686 struct mesh_area* mesh = qstate->env->mesh;
685 struct mesh_state* sub = mesh_area_find(mesh, qinfo, qflags, prime);
687 struct mesh_state* sub = mesh_area_find(mesh, qinfo, qflags, prime,
688 valrec);
686689 int was_detached;
687690 if(mesh_detect_cycle_found(qstate, sub)) {
688691 verbose(VERB_ALGO, "attach failed, cycle detected");
693696 struct rbnode_t* n;
694697 #endif
695698 /* create a new one */
696 sub = mesh_state_create(qstate->env, qinfo, qflags, prime);
699 sub = mesh_state_create(qstate->env, qinfo, qflags, prime,
700 valrec);
697701 if(!sub) {
698702 log_err("mesh_attach_sub: out of memory");
699703 return 0;
940944 }
941945
942946 struct mesh_state* mesh_area_find(struct mesh_area* mesh,
943 struct query_info* qinfo, uint16_t qflags, int prime)
947 struct query_info* qinfo, uint16_t qflags, int prime, int valrec)
944948 {
945949 struct mesh_state key;
946950 struct mesh_state* result;
947951
948952 key.node.key = &key;
949953 key.s.is_priming = prime;
954 key.s.is_valrec = valrec;
950955 key.s.qinfo = *qinfo;
951956 key.s.query_flags = qflags;
952957
11061111 struct mesh_state* m;
11071112 int num = 0;
11081113 RBTREE_FOR(m, struct mesh_state*, &mesh->all) {
1109 snprintf(buf, sizeof(buf), "%d%s%s%s%s%s mod%d %s%s",
1114 snprintf(buf, sizeof(buf), "%d%s%s%s%s%s%s mod%d %s%s",
11101115 num++, (m->s.is_priming)?"p":"", /* prime */
1116 (m->s.is_valrec)?"v":"", /* prime */
11111117 (m->s.query_flags&BIT_RD)?"RD":"",
11121118 (m->s.query_flags&BIT_CD)?"CD":"",
11131119 (m->super_set.count==0)?"d":"", /* detached */
11771183
11781184 int
11791185 mesh_detect_cycle(struct module_qstate* qstate, struct query_info* qinfo,
1180 uint16_t flags, int prime)
1186 uint16_t flags, int prime, int valrec)
11811187 {
11821188 struct mesh_area* mesh = qstate->env->mesh;
1183 struct mesh_state* dep_m = mesh_area_find(mesh, qinfo, flags, prime);
1189 struct mesh_state* dep_m = mesh_area_find(mesh, qinfo, flags, prime,
1190 valrec);
11841191 return mesh_detect_cycle_found(qstate, dep_m);
11851192 }
11861193
352352 * @param qinfo: what to query for (copied).
353353 * @param qflags: what flags to use (RD / CD flag or not).
354354 * @param prime: if it is a (stub) priming query.
355 * @param valrec: if it is a validation recursion query (lookup of key, DS).
355356 * @param newq: If the new subquery needs initialisation, it is returned,
356357 * otherwise NULL is returned.
357358 * @return: false on error, true if success (and init may be needed).
358359 */
359360 int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
360 uint16_t qflags, int prime, struct module_qstate** newq);
361 uint16_t qflags, int prime, int valrec, struct module_qstate** newq);
361362
362363 /**
363364 * Query state is done, send messages to reply entries.
405406 * @param qinfo: query info that the mesh is for.
406407 * @param qflags: flags for query (RD / CD flag).
407408 * @param prime: if true, it is a priming query, set is_priming on mesh state.
409 * @param valrec: if true, it is a validation recursion query, and sets
410 * is_valrec on the mesh state.
408411 * @return: new mesh state or NULL on allocation error.
409412 */
410413 struct mesh_state* mesh_state_create(struct module_env* env,
411 struct query_info* qinfo, uint16_t qflags, int prime);
414 struct query_info* qinfo, uint16_t qflags, int prime, int valrec);
412415
413416 /**
414417 * Cleanup a mesh state and its query state. Does not do rbtree or
431434 * @param qinfo: what query
432435 * @param qflags: if RD / CD bit is set or not.
433436 * @param prime: if it is a priming query.
437 * @param valrec: if it is a validation-recursion query.
434438 * @return: mesh state or NULL if not found.
435439 */
436440 struct mesh_state* mesh_area_find(struct mesh_area* mesh,
437 struct query_info* qinfo, uint16_t qflags, int prime);
441 struct query_info* qinfo, uint16_t qflags, int prime, int valrec);
438442
439443 /**
440444 * Setup attachment super/sub relation between super and sub mesh state.
522526 * @param qinfo: query info for dependency.
523527 * @param flags: query flags of dependency.
524528 * @param prime: if dependency is a priming query or not.
529 * @param valrec: if it is a validation recursion query (lookup of key, DS).
525530 * @return true if the name,type,class exists and the given qstate mesh exists
526531 * as a dependency of that name. Thus if qstate becomes dependent on
527532 * name,type,class then a cycle is created, this is return value 1.
528533 * Too large to search is value 2 (also true).
529534 */
530535 int mesh_detect_cycle(struct module_qstate* qstate, struct query_info* qinfo,
531 uint16_t flags, int prime);
536 uint16_t flags, int prime, int valrec);
532537
533538 /** compare two mesh_states */
534539 int mesh_state_compare(const void* ap, const void* bp);
408408 /** getopt global, in case header files fail to declare it. */
409409 extern char* optarg;
410410
411 /** Main routine for checkconf */
411 /** Main routine for unbound-host */
412412 int main(int argc, char* argv[])
413413 {
414414 int c;
575575 }
576576
577577 hashvalue_t
578 query_info_hash(struct query_info *q)
578 query_info_hash(struct query_info *q, uint16_t flags)
579579 {
580580 hashvalue_t h = 0xab;
581581 h = hashlittle(&q->qtype, sizeof(q->qtype), h);
582 if(q->qtype == LDNS_RR_TYPE_AAAA && (flags&BIT_CD))
583 h++;
582584 h = hashlittle(&q->qclass, sizeof(q->qclass), h);
583585 h = dname_query_hash(q->qname, h);
584586 return h;
770772 region, 65535, 1)) {
771773 log_info("%s: log_dns_msg: out of memory", str);
772774 } else {
773 char* str = sldns_wire2str_pkt(sldns_buffer_begin(buf),
775 char* s = sldns_wire2str_pkt(sldns_buffer_begin(buf),
774776 sldns_buffer_limit(buf));
775 if(!str) {
777 if(!s) {
776778 log_info("%s: log_dns_msg: ldns tostr failed", str);
777779 } else {
778 log_info("%s %s",
779 str, (char*)sldns_buffer_begin(buf));
780 }
781 free(str);
780 log_info("%s %s", str, s);
781 }
782 free(s);
782783 }
783784 sldns_buffer_free(buf);
784785 regional_destroy(region);
304304 /** delete reply_info data structure */
305305 void reply_info_delete(void* d, void* arg);
306306
307 /** calculate hash value of query_info, lowercases the qname */
308 hashvalue_t query_info_hash(struct query_info *q);
307 /** calculate hash value of query_info, lowercases the qname,
308 * uses CD flag for AAAA qtype */
309 hashvalue_t query_info_hash(struct query_info *q, uint16_t flags);
309310
310311 /**
311312 * Setup query info entry
279279 int
280280 fptr_whitelist_modenv_attach_sub(int (*fptr)(
281281 struct module_qstate* qstate, struct query_info* qinfo,
282 uint16_t qflags, int prime, struct module_qstate** newq))
282 uint16_t qflags, int prime, int valrec, struct module_qstate** newq))
283283 {
284284 if(fptr == &mesh_attach_sub) return 1;
285285 return 0;
295295 int
296296 fptr_whitelist_modenv_detect_cycle(int (*fptr)(
297297 struct module_qstate* qstate, struct query_info* qinfo,
298 uint16_t flags, int prime))
298 uint16_t flags, int prime, int valrec))
299299 {
300300 if(fptr == &mesh_detect_cycle) return 1;
301301 return 0;
232232 */
233233 int fptr_whitelist_modenv_attach_sub(int (*fptr)(
234234 struct module_qstate* qstate, struct query_info* qinfo,
235 uint16_t qflags, int prime, struct module_qstate** newq));
235 uint16_t qflags, int prime, int valrec, struct module_qstate** newq));
236236
237237 /**
238238 * Check function pointer whitelist for module_env kill_sub callback values.
250250 */
251251 int fptr_whitelist_modenv_detect_cycle(int (*fptr)(
252252 struct module_qstate* qstate, struct query_info* qinfo,
253 uint16_t flags, int prime));
253 uint16_t flags, int prime, int valrec));
254254
255255 /**
256256 * Check function pointer whitelist for module init call values.
20602060 2423,
20612061 2424,
20622062 2425,
2063 2426,
20632064 2427,
20642065 2428,
20652066 2429,
53525353 35004,
53535354 35355,
53545355 36001,
5356 36411,
53555357 36865,
53565358 37475,
53575359 37654,
5360 38002,
53585361 38201,
53595362 38202,
53605363 38203,
255255 * @param qinfo: what to query for (copied).
256256 * @param qflags: what flags to use (RD, CD flag or not).
257257 * @param prime: if it is a (stub) priming query.
258 * @param valrec: validation lookup recursion, does not need validation
258259 * @param newq: If the new subquery needs initialisation, it is
259260 * returned, otherwise NULL is returned.
260261 * @return: false on error, true if success (and init may be needed).
261262 */
262263 int (*attach_sub)(struct module_qstate* qstate,
263264 struct query_info* qinfo, uint16_t qflags, int prime,
264 struct module_qstate** newq);
265 int valrec, struct module_qstate** newq);
265266
266267 /**
267268 * Kill newly attached sub. If attach_sub returns newq for
279280 * @param qinfo: query info for dependency.
280281 * @param flags: query flags of dependency, RD/CD flags.
281282 * @param prime: if dependency is a priming query or not.
283 * @param valrec: validation lookup recursion, does not need validation
282284 * @return true if the name,type,class exists and the given
283285 * qstate mesh exists as a dependency of that name. Thus
284286 * if qstate becomes dependent on name,type,class then a
285287 * cycle is created.
286288 */
287289 int (*detect_cycle)(struct module_qstate* qstate,
288 struct query_info* qinfo, uint16_t flags, int prime);
290 struct query_info* qinfo, uint16_t flags, int prime,
291 int valrec);
289292
290293 /** region for temporary usage. May be cleared after operate() call. */
291294 struct regional* scratch;
396399 uint16_t query_flags;
397400 /** if this is a (stub or root) priming query (with hints) */
398401 int is_priming;
402 /** if this is a validation recursion query that does not get
403 * validation itself */
404 int is_valrec;
399405
400406 /** comm_reply contains server replies */
401407 struct comm_reply* reply;
698698 }
699699 }
700700 if(verifypem && verifypem[0]) {
701 if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL) != 1) {
701 if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
702702 log_crypto_err("error in SSL_CTX verify");
703703 SSL_CTX_free(ctx);
704704 return NULL;
282282 {
283283 int rcode;
284284
285 /* If the CD bit is on in the original request, then we don't bother to
286 * validate anything.*/
285 /* If the CD bit is on in the original request, then you could think
286 * that we don't bother to validate anything.
287 * But this is signalled internally with the valrec flag.
288 * User queries are validated with BIT_CD to make our cache clean
289 * so that bogus messages get retried by the upstream also for
290 * downstream validators that set BIT_CD.
291 * For DNS64 bit_cd signals no dns64 processing, but we want to
292 * provide validation there too */
293 /*
287294 if(qstate->query_flags & BIT_CD) {
288295 verbose(VERB_ALGO, "not validating response due to CD bit");
296 return 0;
297 }
298 */
299 if(qstate->is_valrec) {
300 verbose(VERB_ALGO, "not validating response, is valrec"
301 "(validation recursion lookup)");
289302 return 0;
290303 }
291304
350363 struct val_qstate* vq = (struct val_qstate*)qstate->minfo[id];
351364 struct module_qstate* newq;
352365 struct query_info ask;
366 int valrec;
353367 ask.qname = name;
354368 ask.qname_len = namelen;
355369 ask.qtype = qtype;
356370 ask.qclass = qclass;
357371 log_query_info(VERB_ALGO, "generate request", &ask);
358372 fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
373 /* enable valrec flag to avoid recursion to the same validation
374 * routine, this lookup is simply a lookup. DLVs need validation */
375 if(qtype == LDNS_RR_TYPE_DLV)
376 valrec = 0;
377 else valrec = 1;
359378 if(!(*qstate->env->attach_sub)(qstate, &ask,
360 (uint16_t)(BIT_RD|flags), 0, &newq)){
379 (uint16_t)(BIT_RD|flags), 0, valrec, &newq)){
361380 log_err("Could not generate request: out of memory");
362381 return 0;
363382 }
20042023 /* if secure, this will override cache anyway, no need
20052024 * to check if from parentNS */
20062025 if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
2007 vq->orig_msg->rep, 0, qstate->prefetch_leeway, 0, NULL)) {
2026 vq->orig_msg->rep, 0, qstate->prefetch_leeway, 0, NULL,
2027 qstate->query_flags)) {
20082028 log_err("out of memory caching validator results");
20092029 }
20102030 } else {
20112031 /* for a referral, store the verified RRsets */
20122032 /* and this does not get prefetched, so no leeway */
20132033 if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
2014 vq->orig_msg->rep, 1, 0, 0, NULL)) {
2034 vq->orig_msg->rep, 1, 0, 0, NULL,
2035 qstate->query_flags)) {
20152036 log_err("out of memory caching validator results");
20162037 }
20172038 }