Imported Debian patch 1.4.3-1
Robert S. Edmonds
12 years ago
418 | 418 | |
419 | 419 | /* default username */ |
420 | 420 | #undef UB_USERNAME |
421 | ||
422 | /* use to enable lightweight alloc assertions, for debug use */ | |
423 | #undef UNBOUND_ALLOC_LITE | |
424 | ||
425 | /* use malloc not regions, for debug use */ | |
426 | #undef UNBOUND_ALLOC_NONREGIONAL | |
421 | 427 | |
422 | 428 | /* use statistics for allocs and frees, for debug use */ |
423 | 429 | #undef UNBOUND_ALLOC_STATS |
831 | 837 | const char* func); |
832 | 838 | void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, |
833 | 839 | int line, const char* func); |
834 | #endif /* UNBOUND_ALLOC_STATS */ | |
840 | #elif defined(UNBOUND_ALLOC_LITE) | |
841 | # include "util/alloc.h" | |
842 | #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ | |
835 | 843 | |
836 | 844 | /** default port for DNS traffic. */ |
837 | 845 | #define UNBOUND_DNS_PORT 53 |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.63 for unbound 1.4.2. | |
2 | # Generated by GNU Autoconf 2.63 for unbound 1.4.3. | |
3 | 3 | # |
4 | 4 | # Report bugs to <unbound-bugs@nlnetlabs.nl>. |
5 | 5 | # |
744 | 744 | # Identity of this package. |
745 | 745 | PACKAGE_NAME='unbound' |
746 | 746 | PACKAGE_TARNAME='unbound' |
747 | PACKAGE_VERSION='1.4.2' | |
748 | PACKAGE_STRING='unbound 1.4.2' | |
747 | PACKAGE_VERSION='1.4.3' | |
748 | PACKAGE_STRING='unbound 1.4.3' | |
749 | 749 | PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' |
750 | 750 | |
751 | 751 | # Factoring default headers for most tests. |
931 | 931 | enable_staticexe |
932 | 932 | enable_lock_checks |
933 | 933 | enable_alloc_checks |
934 | enable_alloc_lite | |
935 | enable_alloc_nonregional | |
934 | 936 | enable_largefile |
935 | 937 | with_ldns |
936 | 938 | with_ldns_builtin |
1499 | 1501 | # Omit some internal or obsolete options to make the list less imposing. |
1500 | 1502 | # This message is too long to be a string in the A/UX 3.1 sh. |
1501 | 1503 | cat <<_ACEOF |
1502 | \`configure' configures unbound 1.4.2 to adapt to many kinds of systems. | |
1504 | \`configure' configures unbound 1.4.3 to adapt to many kinds of systems. | |
1503 | 1505 | |
1504 | 1506 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1505 | 1507 | |
1564 | 1566 | |
1565 | 1567 | if test -n "$ac_init_help"; then |
1566 | 1568 | case $ac_init_help in |
1567 | short | recursive ) echo "Configuration of unbound 1.4.2:";; | |
1569 | short | recursive ) echo "Configuration of unbound 1.4.3:";; | |
1568 | 1570 | esac |
1569 | 1571 | cat <<\_ACEOF |
1570 | 1572 | |
1586 | 1588 | event, ldns libs, for debug purposes |
1587 | 1589 | --enable-lock-checks enable to check lock and unlock calls, for debug |
1588 | 1590 | purposes |
1589 | --enable-alloc-checks enable to check memory allocation, for debug | |
1591 | --enable-alloc-checks enable to memory allocation statistics, for debug | |
1592 | purposes | |
1593 | --enable-alloc-lite enable for lightweight alloc assertions, for debug | |
1594 | purposes | |
1595 | --enable-alloc-nonregional | |
1596 | enable nonregional allocs, slow but exposes regional | |
1597 | allocations to other memory purifiers, for debug | |
1590 | 1598 | purposes |
1591 | 1599 | --disable-largefile omit support for large files |
1592 | 1600 | |
1710 | 1718 | test -n "$ac_init_help" && exit $ac_status |
1711 | 1719 | if $ac_init_version; then |
1712 | 1720 | cat <<\_ACEOF |
1713 | unbound configure 1.4.2 | |
1721 | unbound configure 1.4.3 | |
1714 | 1722 | generated by GNU Autoconf 2.63 |
1715 | 1723 | |
1716 | 1724 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
1724 | 1732 | This file contains any messages produced by compilers while |
1725 | 1733 | running configure, to aid debugging if configure makes a mistake. |
1726 | 1734 | |
1727 | It was created by unbound $as_me 1.4.2, which was | |
1735 | It was created by unbound $as_me 1.4.3, which was | |
1728 | 1736 | generated by GNU Autoconf 2.63. Invocation command line was |
1729 | 1737 | |
1730 | 1738 | $ $0 $@ |
2094 | 2102 | |
2095 | 2103 | |
2096 | 2104 | LIBUNBOUND_CURRENT=2 |
2097 | LIBUNBOUND_REVISION=2 | |
2105 | LIBUNBOUND_REVISION=3 | |
2098 | 2106 | LIBUNBOUND_AGE=0 |
2099 | 2107 | # 1.0.0 had 0:12:0 |
2100 | 2108 | # 1.0.1 had 0:13:0 |
2112 | 2120 | # 1.4.0 had 1:5:0 (not 2:0:0) # ub_result.why_bogus |
2113 | 2121 | # 1.4.1 had 2:1:0 |
2114 | 2122 | # 1.4.2 had 2:2:0 |
2123 | # 1.4.3 had 2:3:0 | |
2115 | 2124 | |
2116 | 2125 | # Current -- the number of the binary API that we're implementing |
2117 | 2126 | # Revision -- which iteration of the implementation of the binary |
7288 | 7297 | else |
7289 | 7298 | lt_cv_nm_interface="BSD nm" |
7290 | 7299 | echo "int some_variable = 0;" > conftest.$ac_ext |
7291 | (eval echo "\"\$as_me:7292: $ac_compile\"" >&5) | |
7300 | (eval echo "\"\$as_me:7301: $ac_compile\"" >&5) | |
7292 | 7301 | (eval "$ac_compile" 2>conftest.err) |
7293 | 7302 | cat conftest.err >&5 |
7294 | (eval echo "\"\$as_me:7295: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
7303 | (eval echo "\"\$as_me:7304: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
7295 | 7304 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
7296 | 7305 | cat conftest.err >&5 |
7297 | (eval echo "\"\$as_me:7298: output\"" >&5) | |
7306 | (eval echo "\"\$as_me:7307: output\"" >&5) | |
7298 | 7307 | cat conftest.out >&5 |
7299 | 7308 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
7300 | 7309 | lt_cv_nm_interface="MS dumpbin" |
8499 | 8508 | ;; |
8500 | 8509 | *-*-irix6*) |
8501 | 8510 | # Find out which ABI we are using. |
8502 | echo '#line 8503 "configure"' > conftest.$ac_ext | |
8511 | echo '#line 8512 "configure"' > conftest.$ac_ext | |
8503 | 8512 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8504 | 8513 | (eval $ac_compile) 2>&5 |
8505 | 8514 | ac_status=$? |
9866 | 9875 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
9867 | 9876 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
9868 | 9877 | -e 's:$: $lt_compiler_flag:'` |
9869 | (eval echo "\"\$as_me:9870: $lt_compile\"" >&5) | |
9878 | (eval echo "\"\$as_me:9879: $lt_compile\"" >&5) | |
9870 | 9879 | (eval "$lt_compile" 2>conftest.err) |
9871 | 9880 | ac_status=$? |
9872 | 9881 | cat conftest.err >&5 |
9873 | echo "$as_me:9874: \$? = $ac_status" >&5 | |
9882 | echo "$as_me:9883: \$? = $ac_status" >&5 | |
9874 | 9883 | if (exit $ac_status) && test -s "$ac_outfile"; then |
9875 | 9884 | # The compiler can only warn and ignore the option if not recognized |
9876 | 9885 | # So say no if there are warnings other than the usual output. |
10205 | 10214 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
10206 | 10215 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
10207 | 10216 | -e 's:$: $lt_compiler_flag:'` |
10208 | (eval echo "\"\$as_me:10209: $lt_compile\"" >&5) | |
10217 | (eval echo "\"\$as_me:10218: $lt_compile\"" >&5) | |
10209 | 10218 | (eval "$lt_compile" 2>conftest.err) |
10210 | 10219 | ac_status=$? |
10211 | 10220 | cat conftest.err >&5 |
10212 | echo "$as_me:10213: \$? = $ac_status" >&5 | |
10221 | echo "$as_me:10222: \$? = $ac_status" >&5 | |
10213 | 10222 | if (exit $ac_status) && test -s "$ac_outfile"; then |
10214 | 10223 | # The compiler can only warn and ignore the option if not recognized |
10215 | 10224 | # So say no if there are warnings other than the usual output. |
10310 | 10319 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
10311 | 10320 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
10312 | 10321 | -e 's:$: $lt_compiler_flag:'` |
10313 | (eval echo "\"\$as_me:10314: $lt_compile\"" >&5) | |
10322 | (eval echo "\"\$as_me:10323: $lt_compile\"" >&5) | |
10314 | 10323 | (eval "$lt_compile" 2>out/conftest.err) |
10315 | 10324 | ac_status=$? |
10316 | 10325 | cat out/conftest.err >&5 |
10317 | echo "$as_me:10318: \$? = $ac_status" >&5 | |
10326 | echo "$as_me:10327: \$? = $ac_status" >&5 | |
10318 | 10327 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
10319 | 10328 | then |
10320 | 10329 | # The compiler can only warn and ignore the option if not recognized |
10365 | 10374 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
10366 | 10375 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
10367 | 10376 | -e 's:$: $lt_compiler_flag:'` |
10368 | (eval echo "\"\$as_me:10369: $lt_compile\"" >&5) | |
10377 | (eval echo "\"\$as_me:10378: $lt_compile\"" >&5) | |
10369 | 10378 | (eval "$lt_compile" 2>out/conftest.err) |
10370 | 10379 | ac_status=$? |
10371 | 10380 | cat out/conftest.err >&5 |
10372 | echo "$as_me:10373: \$? = $ac_status" >&5 | |
10381 | echo "$as_me:10382: \$? = $ac_status" >&5 | |
10373 | 10382 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
10374 | 10383 | then |
10375 | 10384 | # The compiler can only warn and ignore the option if not recognized |
13168 | 13177 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
13169 | 13178 | lt_status=$lt_dlunknown |
13170 | 13179 | cat > conftest.$ac_ext <<_LT_EOF |
13171 | #line 13172 "configure" | |
13180 | #line 13181 "configure" | |
13172 | 13181 | #include "confdefs.h" |
13173 | 13182 | |
13174 | 13183 | #if HAVE_DLFCN_H |
13264 | 13273 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
13265 | 13274 | lt_status=$lt_dlunknown |
13266 | 13275 | cat > conftest.$ac_ext <<_LT_EOF |
13267 | #line 13268 "configure" | |
13276 | #line 13277 "configure" | |
13268 | 13277 | #include "confdefs.h" |
13269 | 13278 | |
13270 | 13279 | #if HAVE_DLFCN_H |
19263 | 19272 | enableval=$enable_alloc_checks; |
19264 | 19273 | fi |
19265 | 19274 | |
19275 | # Check whether --enable-alloc-lite was given. | |
19276 | if test "${enable_alloc_lite+set}" = set; then | |
19277 | enableval=$enable_alloc_lite; | |
19278 | fi | |
19279 | ||
19280 | # Check whether --enable-alloc-nonregional was given. | |
19281 | if test "${enable_alloc_nonregional+set}" = set; then | |
19282 | enableval=$enable_alloc_nonregional; | |
19283 | fi | |
19284 | ||
19285 | if test x_$enable_alloc_nonregional = x_yes; then | |
19286 | ||
19287 | cat >>confdefs.h <<\_ACEOF | |
19288 | #define UNBOUND_ALLOC_NONREGIONAL 1 | |
19289 | _ACEOF | |
19290 | ||
19291 | fi | |
19266 | 19292 | if test x_$enable_alloc_checks = x_yes; then |
19267 | 19293 | |
19268 | 19294 | cat >>confdefs.h <<\_ACEOF |
19270 | 19296 | _ACEOF |
19271 | 19297 | |
19272 | 19298 | else |
19299 | if test x_$enable_alloc_lite = x_yes; then | |
19300 | ||
19301 | cat >>confdefs.h <<\_ACEOF | |
19302 | #define UNBOUND_ALLOC_LITE 1 | |
19303 | _ACEOF | |
19304 | ||
19305 | else | |
19273 | 19306 | |
19274 | 19307 | |
19275 | 19308 | for ac_header in stdlib.h |
19523 | 19556 | |
19524 | 19557 | fi |
19525 | 19558 | |
19559 | fi | |
19526 | 19560 | fi |
19527 | 19561 | |
19528 | 19562 | |
22870 | 22904 | |
22871 | 22905 | fi |
22872 | 22906 | |
22907 | { $as_echo "$as_me:$LINENO: checking for ldns_key_buf2rsa_raw" >&5 | |
22908 | $as_echo_n "checking for ldns_key_buf2rsa_raw... " >&6; } | |
22909 | if test "${ac_cv_func_ldns_key_buf2rsa_raw+set}" = set; then | |
22910 | $as_echo_n "(cached) " >&6 | |
22911 | else | |
22912 | cat >conftest.$ac_ext <<_ACEOF | |
22913 | /* confdefs.h. */ | |
22914 | _ACEOF | |
22915 | cat confdefs.h >>conftest.$ac_ext | |
22916 | cat >>conftest.$ac_ext <<_ACEOF | |
22917 | /* end confdefs.h. */ | |
22918 | /* Define ldns_key_buf2rsa_raw to an innocuous variant, in case <limits.h> declares ldns_key_buf2rsa_raw. | |
22919 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
22920 | #define ldns_key_buf2rsa_raw innocuous_ldns_key_buf2rsa_raw | |
22921 | ||
22922 | /* System header to define __stub macros and hopefully few prototypes, | |
22923 | which can conflict with char ldns_key_buf2rsa_raw (); below. | |
22924 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
22925 | <limits.h> exists even on freestanding compilers. */ | |
22926 | ||
22927 | #ifdef __STDC__ | |
22928 | # include <limits.h> | |
22929 | #else | |
22930 | # include <assert.h> | |
22931 | #endif | |
22932 | ||
22933 | #undef ldns_key_buf2rsa_raw | |
22934 | ||
22935 | /* Override any GCC internal prototype to avoid an error. | |
22936 | Use char because int might match the return type of a GCC | |
22937 | builtin and then its argument prototype would still apply. */ | |
22938 | #ifdef __cplusplus | |
22939 | extern "C" | |
22940 | #endif | |
22941 | char ldns_key_buf2rsa_raw (); | |
22942 | /* The GNU C library defines this for functions which it implements | |
22943 | to always fail with ENOSYS. Some functions are actually named | |
22944 | something starting with __ and the normal name is an alias. */ | |
22945 | #if defined __stub_ldns_key_buf2rsa_raw || defined __stub___ldns_key_buf2rsa_raw | |
22946 | choke me | |
22947 | #endif | |
22948 | ||
22949 | int | |
22950 | main () | |
22951 | { | |
22952 | return ldns_key_buf2rsa_raw (); | |
22953 | ; | |
22954 | return 0; | |
22955 | } | |
22956 | _ACEOF | |
22957 | rm -f conftest.$ac_objext conftest$ac_exeext | |
22958 | if { (ac_try="$ac_link" | |
22959 | case "(($ac_try" in | |
22960 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
22961 | *) ac_try_echo=$ac_try;; | |
22962 | esac | |
22963 | eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" | |
22964 | $as_echo "$ac_try_echo") >&5 | |
22965 | (eval "$ac_link") 2>conftest.er1 | |
22966 | ac_status=$? | |
22967 | grep -v '^ *+' conftest.er1 >conftest.err | |
22968 | rm -f conftest.er1 | |
22969 | cat conftest.err >&5 | |
22970 | $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
22971 | (exit $ac_status); } && { | |
22972 | test -z "$ac_c_werror_flag" || | |
22973 | test ! -s conftest.err | |
22974 | } && test -s conftest$ac_exeext && { | |
22975 | test "$cross_compiling" = yes || | |
22976 | $as_test_x conftest$ac_exeext | |
22977 | }; then | |
22978 | ac_cv_func_ldns_key_buf2rsa_raw=yes | |
22979 | else | |
22980 | $as_echo "$as_me: failed program was:" >&5 | |
22981 | sed 's/^/| /' conftest.$ac_ext >&5 | |
22982 | ||
22983 | ac_cv_func_ldns_key_buf2rsa_raw=no | |
22984 | fi | |
22985 | ||
22986 | rm -rf conftest.dSYM | |
22987 | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | |
22988 | conftest$ac_exeext conftest.$ac_ext | |
22989 | fi | |
22990 | { $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldns_key_buf2rsa_raw" >&5 | |
22991 | $as_echo "$ac_cv_func_ldns_key_buf2rsa_raw" >&6; } | |
22992 | ||
22873 | 22993 | |
22874 | 22994 | for ac_header in ldns/ldns.h |
22875 | 22995 | do |
22933 | 23053 | done |
22934 | 23054 | |
22935 | 23055 | if test $ac_cv_lib_ldns_ldns_buffer_copy = yes \ |
23056 | -a $ac_cv_func_ldns_key_buf2rsa_raw = yes \ | |
22936 | 23057 | -a $ac_cv_header_ldns_ldns_h = yes; then |
22937 | 23058 | { $as_echo "$as_me:$LINENO: checking for ldns_b32_ntop_extended_hex" >&5 |
22938 | 23059 | $as_echo_n "checking for ldns_b32_ntop_extended_hex... " >&6; } |
23575 | 23696 | # report actual input values of CONFIG_FILES etc. instead of their |
23576 | 23697 | # values after options handling. |
23577 | 23698 | ac_log=" |
23578 | This file was extended by unbound $as_me 1.4.2, which was | |
23699 | This file was extended by unbound $as_me 1.4.3, which was | |
23579 | 23700 | generated by GNU Autoconf 2.63. Invocation command line was |
23580 | 23701 | |
23581 | 23702 | CONFIG_FILES = $CONFIG_FILES |
23638 | 23759 | _ACEOF |
23639 | 23760 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
23640 | 23761 | ac_cs_version="\\ |
23641 | unbound config.status 1.4.2 | |
23762 | unbound config.status 1.4.3 | |
23642 | 23763 | configured by $0, generated by GNU Autoconf 2.63, |
23643 | 23764 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" |
23644 | 23765 |
5 | 5 | sinclude(acx_python.m4) |
6 | 6 | sinclude(ac_pkg_swig.m4) |
7 | 7 | |
8 | AC_INIT(unbound, 1.4.2, unbound-bugs@nlnetlabs.nl, unbound) | |
8 | AC_INIT(unbound, 1.4.3, unbound-bugs@nlnetlabs.nl, unbound) | |
9 | 9 | |
10 | 10 | LIBUNBOUND_CURRENT=2 |
11 | LIBUNBOUND_REVISION=2 | |
11 | LIBUNBOUND_REVISION=3 | |
12 | 12 | LIBUNBOUND_AGE=0 |
13 | 13 | # 1.0.0 had 0:12:0 |
14 | 14 | # 1.0.1 had 0:13:0 |
26 | 26 | # 1.4.0 had 1:5:0 (not 2:0:0) # ub_result.why_bogus |
27 | 27 | # 1.4.1 had 2:1:0 |
28 | 28 | # 1.4.2 had 2:2:0 |
29 | # 1.4.3 had 2:3:0 | |
29 | 30 | |
30 | 31 | # Current -- the number of the binary API that we're implementing |
31 | 32 | # Revision -- which iteration of the implementation of the binary |
514 | 515 | |
515 | 516 | # set memory allocation checking if requested |
516 | 517 | AC_ARG_ENABLE(alloc-checks, AC_HELP_STRING([--enable-alloc-checks], |
517 | [ enable to check memory allocation, for debug purposes ]), | |
518 | [ enable to memory allocation statistics, for debug purposes ]), | |
518 | 519 | , ) |
520 | AC_ARG_ENABLE(alloc-lite, AC_HELP_STRING([--enable-alloc-lite], | |
521 | [ enable for lightweight alloc assertions, for debug purposes ]), | |
522 | , ) | |
523 | AC_ARG_ENABLE(alloc-nonregional, AC_HELP_STRING([--enable-alloc-nonregional], | |
524 | [ enable nonregional allocs, slow but exposes regional allocations to other memory purifiers, for debug purposes ]), | |
525 | , ) | |
526 | if test x_$enable_alloc_nonregional = x_yes; then | |
527 | AC_DEFINE(UNBOUND_ALLOC_NONREGIONAL, 1, [use malloc not regions, for debug use]) | |
528 | fi | |
519 | 529 | if test x_$enable_alloc_checks = x_yes; then |
520 | 530 | AC_DEFINE(UNBOUND_ALLOC_STATS, 1, [use statistics for allocs and frees, for debug use]) |
521 | 531 | else |
522 | ACX_FUNC_MALLOC([unbound]) | |
532 | if test x_$enable_alloc_lite = x_yes; then | |
533 | AC_DEFINE(UNBOUND_ALLOC_LITE, 1, [use to enable lightweight alloc assertions, for debug use]) | |
534 | else | |
535 | ACX_FUNC_MALLOC([unbound]) | |
536 | fi | |
523 | 537 | fi |
524 | 538 | |
525 | 539 | AC_FUNC_CHOWN |
593 | 607 | # check if ldns is good enough |
594 | 608 | if test "$use_ldns_builtin" = "no"; then |
595 | 609 | AC_CHECK_LIB(ldns, ldns_buffer_copy) |
610 | AC_CHECK_FUNC(ldns_key_buf2rsa_raw) | |
596 | 611 | AC_CHECK_HEADERS([ldns/ldns.h],,, [AC_INCLUDES_DEFAULT]) |
597 | 612 | if test $ac_cv_lib_ldns_ldns_buffer_copy = yes \ |
613 | -a $ac_cv_func_ldns_key_buf2rsa_raw = yes \ | |
598 | 614 | -a $ac_cv_header_ldns_ldns_h = yes; then |
599 | 615 | dnl ldns was found, check compat functions |
600 | 616 | AC_CHECK_FUNC([ldns_b32_ntop_extended_hex],, [ |
769 | 785 | const char* func); |
770 | 786 | void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, |
771 | 787 | int line, const char* func); |
772 | #endif /* UNBOUND_ALLOC_STATS */ | |
788 | #elif defined(UNBOUND_ALLOC_LITE) | |
789 | # include "util/alloc.h" | |
790 | #endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */ | |
773 | 791 | |
774 | 792 | /** default port for DNS traffic. */ |
775 | 793 | #define UNBOUND_DNS_PORT 53 |
312 | 312 | if(daemon(1, 0) != 0) |
313 | 313 | fatal_exit("daemon failed: %s", strerror(errno)); |
314 | 314 | #else /* no HAVE_DAEMON */ |
315 | #ifdef HAVE_WORKING_FORK | |
315 | #ifdef HAVE_FORK | |
316 | 316 | int fd; |
317 | 317 | /* Take off... */ |
318 | 318 | switch (fork()) { |
336 | 336 | if (fd > 2) |
337 | 337 | (void)close(fd); |
338 | 338 | } |
339 | #endif /* HAVE_WORKING_FORK */ | |
339 | #endif /* HAVE_FORK */ | |
340 | 340 | #endif /* HAVE_DAEMON */ |
341 | 341 | } |
342 | 342 |
0 | unbound (1.4.3-1) unstable; urgency=low | |
1 | ||
2 | * New upstream release. | |
3 | ||
4 | -- Robert S. Edmonds <edmonds@debian.org> Thu, 11 Mar 2010 15:55:33 -0500 | |
5 | ||
0 | 6 | unbound (1.4.2-1) unstable; urgency=low |
1 | 7 | |
2 | 8 | * New upstream release. |
0 | 11 March 2010: Wouter | |
1 | - another memory allocation option: --enable-alloc-nonregional. | |
2 | exposes the regional allocations to other memory purifiers. | |
3 | - fix for memory alignment in struct sock_list allocation. | |
4 | - Fix for MacPorts ldns without ssl default, unbound checks if ldns | |
5 | has dnssec functionality and uses the builtin if not. | |
6 | - Fix daemonize on Solaris 10, it did not detach from terminal. | |
7 | ||
8 | 10 March 2010: Wouter | |
9 | - --enable-alloc-lite works with test set. | |
10 | - portability in the testset: printf format conversions, prototypes. | |
11 | ||
12 | 9 March 2010: Wouter | |
13 | - tag 1.4.2 created. | |
14 | - trunk is 1.4.3 in development. | |
15 | - --enable-alloc-lite debug option. | |
16 | ||
0 | 17 | 8 March 2010: Wouter |
1 | 18 | - iana portlist updated. |
2 | 19 |
0 | README for Unbound 1.4.2 | |
0 | README for Unbound 1.4.3 | |
1 | 1 | Copyright 2007 NLnet Labs |
2 | 2 | http://unbound.net |
3 | 3 |
0 | .TH "libunbound" "3" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "libunbound" "3" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" libunbound.3 -- unbound library functions manual |
3 | 3 | .\" |
41 | 41 | .B ub_ctx_zone_remove, |
42 | 42 | .B ub_ctx_data_add, |
43 | 43 | .B ub_ctx_data_remove |
44 | \- Unbound DNS validating resolver 1.4.2 functions. | |
44 | \- Unbound DNS validating resolver 1.4.3 functions. | |
45 | 45 | .SH "SYNOPSIS" |
46 | 46 | .LP |
47 | 47 | .B #include <unbound.h> |
0 | .TH "unbound-checkconf" "8" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "unbound-checkconf" "8" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" unbound-checkconf.8 -- unbound configuration checker manual |
3 | 3 | .\" |
0 | .TH "unbound-control" "8" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "unbound-control" "8" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" unbound-control.8 -- unbound remote control manual |
3 | 3 | .\" |
0 | .TH "unbound\-host" "1" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "unbound\-host" "1" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" unbound-host.1 -- unbound DNS lookup utility |
3 | 3 | .\" |
0 | .TH "unbound" "8" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "unbound" "8" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" unbound.8 -- unbound manual |
3 | 3 | .\" |
9 | 9 | .SH "NAME" |
10 | 10 | .LP |
11 | 11 | .B unbound |
12 | \- Unbound DNS validating resolver 1.4.2. | |
12 | \- Unbound DNS validating resolver 1.4.3. | |
13 | 13 | .SH "SYNOPSIS" |
14 | 14 | .LP |
15 | 15 | .B unbound |
0 | .TH "unbound.conf" "5" "Mar 9, 2010" "NLnet Labs" "unbound 1.4.2" | |
0 | .TH "unbound.conf" "5" "Mar 11, 2010" "NLnet Labs" "unbound 1.4.3" | |
1 | 1 | .\" |
2 | 2 | .\" unbound.conf.5 -- unbound.conf manual |
3 | 3 | .\" |
483 | 483 | if(!rdf) { |
484 | 484 | return 0; |
485 | 485 | } |
486 | #ifdef UNBOUND_ALLOC_LITE | |
487 | qinfo->qname = memdup(ldns_rdf_data(rdf), ldns_rdf_size(rdf)); | |
488 | qinfo->qname_len = ldns_rdf_size(rdf); | |
489 | ldns_rdf_deep_free(rdf); | |
490 | rdf = 0; | |
491 | #else | |
486 | 492 | qinfo->qname = ldns_rdf_data(rdf); |
487 | 493 | qinfo->qname_len = ldns_rdf_size(rdf); |
494 | #endif | |
488 | 495 | edns->edns_present = 1; |
489 | 496 | edns->ext_rcode = 0; |
490 | 497 | edns->edns_version = 0; |
46 | 46 | #undef calloc |
47 | 47 | #undef free |
48 | 48 | #undef realloc |
49 | #endif | |
50 | #ifdef UNBOUND_ALLOC_LITE | |
51 | #undef malloc | |
52 | #undef calloc | |
53 | #undef free | |
54 | #undef realloc | |
55 | #undef strdup | |
56 | #define unbound_lite_wrapstr(s) s | |
49 | 57 | #endif |
50 | 58 | #include "libunbound/unbound.h" |
51 | 59 | #include <ldns/ldns.h> |
44 | 44 | #include "libunbound/context.h" |
45 | 45 | #include "util/locks.h" |
46 | 46 | #include "util/log.h" |
47 | #ifdef UNBOUND_ALLOC_LITE | |
48 | #undef malloc | |
49 | #undef calloc | |
50 | #undef realloc | |
51 | #undef free | |
52 | #undef strdup | |
53 | #endif | |
47 | 54 | |
48 | 55 | /** keeping track of the async ids */ |
49 | 56 | struct track_id { |
6 | 6 | NEED_NC='fwd_compress_c00c.tpkg fwd_zero.tpkg' |
7 | 7 | NEED_CURL='06-ianaports.tpkg' |
8 | 8 | NEED_WHOAMI='07-confroot.tpkg' |
9 | NEED_IPV6='fwd_ancil.tpkg fwd_tcp_tc6.tpkg' | |
9 | NEED_IPV6='fwd_ancil.tpkg fwd_tcp_tc6.tpkg stub_udp6.tpkg' | |
10 | 10 | NEED_NOMINGW='tcp_sigpipe.tpkg 07-confroot.tpkg 08-host-lib.tpkg fwd_ancil.tpkg' |
11 | ||
12 | # test if dig, wdiff and ldns-testns are available. | |
13 | if test ! -x "`which dig 2>&1`"; then echo No 'dig' in path; exit 1; fi | |
14 | if test ! -x "`which wdiff 2>&1`"; then echo No 'wdiff' in path; exit 1; fi | |
15 | if test ! -x "`which ldns-testns 2>&1`"; then echo No 'ldns-testns' in path; exit 1; fi | |
11 | 16 | |
12 | 17 | # test for ipv6, uses streamptcp peculiarity. |
13 | 18 | if ./streamtcp -f ::1 2>&1 | grep "not supported" >/dev/null 2>&1; then |
72 | 72 | #include "libunbound/unbound.h" |
73 | 73 | #ifdef HAVE_SYS_STAT_H |
74 | 74 | #include <sys/stat.h> |
75 | #endif | |
76 | #ifdef UNBOUND_ALLOC_LITE | |
77 | #undef malloc | |
78 | #undef calloc | |
79 | #undef realloc | |
80 | #undef free | |
81 | #undef strdup | |
82 | #define unbound_lite_wrapstr(s) s | |
75 | 83 | #endif |
76 | 84 | struct todo_item; |
77 | 85 | struct labdata; |
30 | 30 | /** string to show in warnings and errors */ |
31 | 31 | static const char* prog_name = "ldns-testpkts"; |
32 | 32 | |
33 | #ifndef UTIL_LOG_H | |
34 | /** verbosity definition for compat */ | |
35 | enum verbosity_value { NO_VERBOSE=0 }; | |
36 | #endif | |
33 | 37 | /** logging routine, provided by caller */ |
34 | void verbose(int lvl, const char* msg, ...); | |
38 | void verbose(enum verbosity_value lvl, const char* msg, ...) ATTR_FORMAT(printf, 2, 3); | |
35 | 39 | |
36 | 40 | /** print error and exit */ |
37 | 41 | static void error(const char* msg, ...) |
588 | 592 | { |
589 | 593 | if(ldns_rr_compare(ldns_rr_list_rr(q, i), |
590 | 594 | ldns_rr_list_rr(p, i)) != 0) { |
591 | verbose(3, "rr %d different", i); | |
595 | verbose(3, "rr %d different", (int)i); | |
592 | 596 | return 0; |
593 | 597 | } |
594 | 598 | if(mttl && ldns_rr_ttl(ldns_rr_list_rr(q, i)) != |
595 | 599 | ldns_rr_ttl(ldns_rr_list_rr(p, i))) { |
596 | verbose(3, "rr %d ttl different", i); | |
600 | verbose(3, "rr %d ttl different", (int)i); | |
597 | 601 | return 0; |
598 | 602 | } |
599 | 603 | } |
767 | 771 | |
768 | 772 | query_rr = ldns_rr_list_rr(ldns_pkt_question(query_pkt), 0); |
769 | 773 | verbose(1, "query %d: id %d: %s %d bytes: ", ++(*count), (int)ldns_pkt_id(query_pkt), |
770 | (transport==transport_tcp)?"TCP":"UDP", inlen); | |
774 | (transport==transport_tcp)?"TCP":"UDP", (int)inlen); | |
771 | 775 | if(verbose_out) ldns_rr_print(verbose_out, query_rr); |
772 | 776 | if(verbose_out) ldns_pkt_print(verbose_out, query_pkt); |
773 | 777 |
Binary diff not shown
471 | 471 | } |
472 | 472 | |
473 | 473 | #endif /* UNBOUND_ALLOC_STATS */ |
474 | #ifdef UNBOUND_ALLOC_LITE | |
475 | #undef malloc | |
476 | #undef calloc | |
477 | #undef free | |
478 | #undef realloc | |
479 | /** length of prefix and suffix */ | |
480 | static size_t lite_pad = 16; | |
481 | /** prefix value to check */ | |
482 | static char* lite_pre = "checkfront123456"; | |
483 | /** suffix value to check */ | |
484 | static char* lite_post= "checkafter123456"; | |
485 | ||
486 | void *unbound_stat_malloc_lite(size_t size, const char* file, int line, | |
487 | const char* func) | |
488 | { | |
489 | /* [prefix .. len .. actual data .. suffix] */ | |
490 | void* res = malloc(size+lite_pad*2+sizeof(size_t)); | |
491 | if(!res) return NULL; | |
492 | memmove(res, lite_pre, lite_pad); | |
493 | memmove(res+lite_pad, &size, sizeof(size_t)); | |
494 | memset(res+lite_pad+sizeof(size_t), 0x1a, size); /* init the memory */ | |
495 | memmove(res+lite_pad+size+sizeof(size_t), lite_post, lite_pad); | |
496 | return res+lite_pad+sizeof(size_t); | |
497 | } | |
498 | ||
499 | void *unbound_stat_calloc_lite(size_t nmemb, size_t size, const char* file, | |
500 | int line, const char* func) | |
501 | { | |
502 | size_t req = nmemb * size; | |
503 | void* res = malloc(req+lite_pad*2+sizeof(size_t)); | |
504 | if(!res) return NULL; | |
505 | memmove(res, lite_pre, lite_pad); | |
506 | memmove(res+lite_pad, &req, sizeof(size_t)); | |
507 | memset(res+lite_pad+sizeof(size_t), 0, req); | |
508 | memmove(res+lite_pad+req+sizeof(size_t), lite_post, lite_pad); | |
509 | return res+lite_pad+sizeof(size_t); | |
510 | } | |
511 | ||
512 | void unbound_stat_free_lite(void *ptr, const char* file, int line, | |
513 | const char* func) | |
514 | { | |
515 | void* real; | |
516 | size_t orig = 0; | |
517 | if(!ptr) return; | |
518 | real = ptr-lite_pad-sizeof(size_t); | |
519 | if(memcmp(real, lite_pre, lite_pad) != 0) { | |
520 | log_err("free(): prefix failed %s:%d %s", file, line, func); | |
521 | log_hex("prefix here", real, lite_pad); | |
522 | log_hex(" should be", lite_pre, lite_pad); | |
523 | fatal_exit("alloc assertion failed"); | |
524 | } | |
525 | memmove(&orig, real+lite_pad, sizeof(size_t)); | |
526 | if(memcmp(real+lite_pad+orig+sizeof(size_t), lite_post, lite_pad)!=0){ | |
527 | log_err("free(): suffix failed %s:%d %s", file, line, func); | |
528 | log_err("alloc size is %d", (int)orig); | |
529 | log_hex("suffix here", real+lite_pad+orig+sizeof(size_t), | |
530 | lite_pad); | |
531 | log_hex(" should be", lite_post, lite_pad); | |
532 | fatal_exit("alloc assertion failed"); | |
533 | } | |
534 | memset(real, 0xdd, orig+lite_pad*2+sizeof(size_t)); /* mark it */ | |
535 | free(real); | |
536 | } | |
537 | ||
538 | void *unbound_stat_realloc_lite(void *ptr, size_t size, const char* file, | |
539 | int line, const char* func) | |
540 | { | |
541 | /* always free and realloc (no growing) */ | |
542 | void* real, *newa; | |
543 | size_t orig = 0; | |
544 | if(!ptr) { | |
545 | /* like malloc() */ | |
546 | return unbound_stat_malloc_lite(size, file, line, func); | |
547 | } | |
548 | if(!size) { | |
549 | /* like free() */ | |
550 | unbound_stat_free_lite(ptr, file, line, func); | |
551 | return NULL; | |
552 | } | |
553 | /* change allocation size and copy */ | |
554 | real = ptr-lite_pad-sizeof(size_t); | |
555 | if(memcmp(real, lite_pre, lite_pad) != 0) { | |
556 | log_err("realloc(): prefix failed %s:%d %s", file, line, func); | |
557 | log_hex("prefix here", real, lite_pad); | |
558 | log_hex(" should be", lite_pre, lite_pad); | |
559 | fatal_exit("alloc assertion failed"); | |
560 | } | |
561 | memmove(&orig, real+lite_pad, sizeof(size_t)); | |
562 | if(memcmp(real+lite_pad+orig+sizeof(size_t), lite_post, lite_pad)!=0){ | |
563 | log_err("realloc(): suffix failed %s:%d %s", file, line, func); | |
564 | log_err("alloc size is %d", (int)orig); | |
565 | log_hex("suffix here", real+lite_pad+orig+sizeof(size_t), | |
566 | lite_pad); | |
567 | log_hex(" should be", lite_post, lite_pad); | |
568 | fatal_exit("alloc assertion failed"); | |
569 | } | |
570 | /* new alloc and copy over */ | |
571 | newa = unbound_stat_malloc_lite(size, file, line, func); | |
572 | if(!newa) | |
573 | return NULL; | |
574 | if(orig < size) | |
575 | memmove(newa, ptr, orig); | |
576 | else memmove(newa, ptr, size); | |
577 | memset(real, 0xdd, orig+lite_pad*2+sizeof(size_t)); /* mark it */ | |
578 | free(real); | |
579 | return newa; | |
580 | } | |
581 | ||
582 | char* unbound_strdup_lite(const char* s, const char* file, int line, | |
583 | const char* func) | |
584 | { | |
585 | /* this routine is made to make sure strdup() uses the malloc_lite */ | |
586 | size_t l = strlen(s)+1; | |
587 | char* n = (char*)unbound_stat_malloc_lite(l, file, line, func); | |
588 | if(!n) return NULL; | |
589 | memmove(n, s, l); | |
590 | return n; | |
591 | } | |
592 | ||
593 | char* unbound_lite_wrapstr(char* s) | |
594 | { | |
595 | char* n = unbound_strdup_lite(s, __FILE__, __LINE__, __func__); | |
596 | free(s); | |
597 | return n; | |
598 | } | |
599 | ||
600 | #undef ldns_pkt2wire | |
601 | ldns_status unbound_lite_pkt2wire(uint8_t **dest, const ldns_pkt *p, | |
602 | size_t *size) | |
603 | { | |
604 | uint8_t* md = NULL; | |
605 | size_t ms = 0; | |
606 | ldns_status s = ldns_pkt2wire(&md, p, &ms); | |
607 | if(md) { | |
608 | *dest = unbound_stat_malloc_lite(ms, __FILE__, __LINE__, | |
609 | __func__); | |
610 | *size = ms; | |
611 | if(!*dest) { free(md); return LDNS_STATUS_MEM_ERR; } | |
612 | memcpy(*dest, md, ms); | |
613 | free(md); | |
614 | } else { | |
615 | *dest = NULL; | |
616 | *size = 0; | |
617 | } | |
618 | return s; | |
619 | } | |
620 | ||
621 | #undef i2d_DSA_SIG | |
622 | int unbound_lite_i2d_DSA_SIG(DSA_SIG* dsasig, unsigned char** sig) | |
623 | { | |
624 | unsigned char* n = NULL; | |
625 | int r= i2d_DSA_SIG(dsasig, &n); | |
626 | if(n) { | |
627 | *sig = unbound_stat_malloc_lite((size_t)r, __FILE__, __LINE__, | |
628 | __func__); | |
629 | if(!*sig) return -1; | |
630 | memcpy(*sig, n, (size_t)r); | |
631 | free(n); | |
632 | return r; | |
633 | } | |
634 | *sig = NULL; | |
635 | return r; | |
636 | } | |
637 | ||
638 | #endif /* UNBOUND_ALLOC_LITE */ |
175 | 175 | void alloc_set_id_cleanup(struct alloc_cache* alloc, void (*cleanup)(void*), |
176 | 176 | void* arg); |
177 | 177 | |
178 | #ifdef UNBOUND_ALLOC_LITE | |
179 | # define malloc(s) unbound_stat_malloc_lite(s, __FILE__, __LINE__, __func__) | |
180 | # define calloc(n,s) unbound_stat_calloc_lite(n, s, __FILE__, __LINE__, __func__) | |
181 | # define free(p) unbound_stat_free_lite(p, __FILE__, __LINE__, __func__) | |
182 | # define realloc(p,s) unbound_stat_realloc_lite(p, s, __FILE__, __LINE__, __func__) | |
183 | void *unbound_stat_malloc_lite(size_t size, const char* file, int line, | |
184 | const char* func); | |
185 | void *unbound_stat_calloc_lite(size_t nmemb, size_t size, const char* file, | |
186 | int line, const char* func); | |
187 | void unbound_stat_free_lite(void *ptr, const char* file, int line, | |
188 | const char* func); | |
189 | void *unbound_stat_realloc_lite(void *ptr, size_t size, const char* file, | |
190 | int line, const char* func); | |
191 | # ifdef strdup | |
192 | # undef strdup | |
193 | # endif | |
194 | # define strdup(s) unbound_strdup_lite(s, __FILE__, __LINE__, __func__) | |
195 | char* unbound_strdup_lite(const char* s, const char* file, int line, | |
196 | const char* func); | |
197 | char* unbound_lite_wrapstr(char* s); | |
198 | # define ldns_rr2str(rr) unbound_lite_wrapstr(ldns_rr2str(rr)) | |
199 | # define ldns_rdf2str(rdf) unbound_lite_wrapstr(ldns_rdf2str(rdf)) | |
200 | # define ldns_rr_type2str(t) unbound_lite_wrapstr(ldns_rr_type2str(t)) | |
201 | # define ldns_rr_class2str(c) unbound_lite_wrapstr(ldns_rr_class2str(c)) | |
202 | # define ldns_rr_list2str(r) unbound_lite_wrapstr(ldns_rr_list2str(r)) | |
203 | # define ldns_pkt2str(p) unbound_lite_wrapstr(ldns_pkt2str(p)) | |
204 | # define ldns_pkt_rcode2str(r) unbound_lite_wrapstr(ldns_pkt_rcode2str(r)) | |
205 | # define ldns_pkt2wire(a, r, s) unbound_lite_pkt2wire(a, r, s) | |
206 | ldns_status unbound_lite_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size); | |
207 | # define i2d_DSA_SIG(d, s) unbound_lite_i2d_DSA_SIG(d, s) | |
208 | int unbound_lite_i2d_DSA_SIG(DSA_SIG* dsasig, unsigned char** sig); | |
209 | #endif /* UNBOUND_ALLOC_LITE */ | |
210 | ||
178 | 211 | #endif /* UTIL_ALLOC_H */ |
496 | 496 | socklen_t len, struct regional* region) |
497 | 497 | { |
498 | 498 | struct sock_list* add = (struct sock_list*)regional_alloc(region, |
499 | sizeof(add->next) + sizeof(add->len) + (size_t)len); | |
499 | sizeof(*add) - sizeof(add->addr) + (size_t)len); | |
500 | 500 | if(!add) { |
501 | 501 | log_err("out of memory in socketlist insert"); |
502 | 502 | return; |
53 | 53 | |
54 | 54 | /** Default reasonable size for chunks */ |
55 | 55 | #define REGIONAL_CHUNK_SIZE 8192 |
56 | #ifdef UNBOUND_ALLOC_NONREGIONAL | |
57 | /** All objects allocated outside of chunks, for debug */ | |
58 | #define REGIONAL_LARGE_OBJECT_SIZE 0 | |
59 | #else | |
56 | 60 | /** Default size for large objects - allocated outside of chunks. */ |
57 | 61 | #define REGIONAL_LARGE_OBJECT_SIZE 2048 |
62 | #endif | |
58 | 63 | |
59 | 64 | struct regional* |
60 | 65 | regional_create() |