Compare commits

...
Author SHA1 Message Date
Wouter Wijngaards 20a77f115f tag 1.4.18rc2
git-svn-id: file:///svn/unbound/tags/release-1.4.18rc2@2728 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-30 08:07:06 +00:00
Wouter Wijngaards 07470115e5 - fix bogus nodata cname chain not reported as bogus by validator,
(Thanks Peter van Dijk).


git-svn-id: file:///svn/unbound/trunk@2727 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-27 13:38:00 +00:00
Wouter Wijngaards 061e2dd431 fix so that make unbound-host works when compiled with libnss.
git-svn-id: file:///svn/unbound/trunk@2726 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-27 13:17:14 +00:00
Wouter Wijngaards 76f273aed5 1.4.18rc1 tag.
git-svn-id: file:///svn/unbound/trunk@2725 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-26 09:20:06 +00:00
Wouter Wijngaards fa94a9753d - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2724 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-26 09:10:36 +00:00
Wouter Wijngaards f82edc1b64 - review fix for libnss, check hash prefix allocation size.
git-svn-id: file:///svn/unbound/trunk@2723 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-25 14:32:37 +00:00
Wouter Wijngaards 3c55073799 - implemented forward_first for the root.
git-svn-id: file:///svn/unbound/trunk@2722 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-23 13:42:07 +00:00
Wouter Wijngaards 85c915f116 - fix missing break for GOST DS hash function.
- make depend


git-svn-id: file:///svn/unbound/trunk@2721 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-23 12:27:04 +00:00
Wouter Wijngaards d16524d39a make depend.
git-svn-id: file:///svn/unbound/trunk@2720 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-20 14:10:04 +00:00
Wouter Wijngaards b212b302e6 fixup warning.
git-svn-id: file:///svn/unbound/trunk@2719 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-20 14:08:51 +00:00
Wouter Wijngaards 0f1aa80123 - Fix bug#452 and another assertion failure in mesh.c, makes
assertions in mesh.c resist duplicates.  Fixes DS NS search to
  not generate duplicate sub queries.


git-svn-id: file:///svn/unbound/trunk@2718 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-20 13:08:19 +00:00
Wouter Wijngaards 68e7d81863 - Fix bug#454: Remove ACX_CHECK_COMPILER_FLAG from configure.ac,
if CFLAGS is specified at configure time then '-g -O2' is not
  appended to CFLAGS, so that the user can override them.



git-svn-id: file:///svn/unbound/trunk@2717 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-19 08:51:35 +00:00
Wouter Wijngaards 03c4ee417a - Fix libunbound report of errors when in background mode.
git-svn-id: file:///svn/unbound/trunk@2716 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-18 09:43:50 +00:00
Wouter Wijngaards 482fbf3872 - updated iana ports list.
git-svn-id: file:///svn/unbound/trunk@2714 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-11 09:31:39 +00:00
Willem Toorop d6aba21ac4 flush_bogus option for unbound-control
git-svn-id: file:///svn/unbound/trunk@2713 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-09 14:33:07 +00:00
Wouter Wijngaards d4f49a7a40 - Fix validation of qtype DS queries that result in no data for
non-optout NSEC3 zones.


git-svn-id: file:///svn/unbound/trunk@2712 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-06 13:56:44 +00:00
Wouter Wijngaards 6cab3a1dda fix compile with --enable-alloc-lite
git-svn-id: file:///svn/unbound/trunk@2711 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-04 15:49:48 +00:00
Wouter Wijngaards f37bd4f2ce - compile libunbound with libnss on Suse, passes regression tests.
git-svn-id: file:///svn/unbound/trunk@2710 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-04 12:33:32 +00:00
Wouter Wijngaards 64b28585e0 - FIPS_mode openssl does not use arc4random but RAND_pseudo_bytes.
git-svn-id: file:///svn/unbound/trunk@2709 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-03 09:32:16 +00:00
Wouter Wijngaards 6b1222dcb6 - updated iana ports list.
git-svn-id: file:///svn/unbound/trunk@2708 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-02 12:20:50 +00:00
Wouter Wijngaards 44e894b6c2 - patch for unbound_munin_ script to handle arbitrary thread count by
Sven Ulland.


git-svn-id: file:///svn/unbound/trunk@2707 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-29 08:58:18 +00:00
Wouter Wijngaards 4943101c09 updated iana ports list.
git-svn-id: file:///svn/unbound/trunk@2706 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-28 14:29:38 +00:00
Wouter Wijngaards c7872942ac - fix edns-buffer-size and msg-buffer-size manpage documentation.
git-svn-id: file:///svn/unbound/trunk@2705 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-28 14:25:10 +00:00
Wouter Wijngaards 1467c5de52 - code review: return value of cache_store can be ignored for better
performance in out of memory conditions.


git-svn-id: file:///svn/unbound/trunk@2704 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-28 14:18:41 +00:00
Wouter Wijngaards 097c70be91 - detect if openssl has FIPS_mode.
git-svn-id: file:///svn/unbound/trunk@2703 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-28 06:54:16 +00:00
Wouter Wijngaards 87ded67cb6 - disable RSAMD5 if in FIPS mode (for openssl and for libnss).
git-svn-id: file:///svn/unbound/trunk@2702 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-25 15:13:44 +00:00
Wouter Wijngaards 98b6f90637 - disable RSAMD5 if in FIPS mode (when compiled with openssl).
git-svn-id: file:///svn/unbound/trunk@2701 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-25 15:02:52 +00:00
Wouter Wijngaards b9ed797a22 Test for ECC support for libNSS.
git-svn-id: file:///svn/unbound/trunk@2700 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-22 15:20:56 +00:00
Wouter Wijngaards 25096aa3ab implement DNSSEC with libNSS: NSEC3, RSA, DSA, ECDSA, and DS hashes.
make test succeeds.


git-svn-id: file:///svn/unbound/trunk@2699 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-22 14:31:29 +00:00
Wouter Wijngaards 42e23da129 Fix compilation without SSL.
git-svn-id: file:///svn/unbound/trunk@2698 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-22 09:11:41 +00:00
Wouter Wijngaards cd8e4a0bc5 RSA with nss.
git-svn-id: file:///svn/unbound/trunk@2697 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-21 15:19:16 +00:00
Wouter Wijngaards d051dfaf19 remove double free.
git-svn-id: file:///svn/unbound/trunk@2696 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-21 12:01:34 +00:00
Wouter Wijngaards f2da5c6867 - nss check for verification failure.
git-svn-id: file:///svn/unbound/trunk@2695 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-21 12:00:48 +00:00
Wouter Wijngaards 97456b8f4c compile fix for fedora.
git-svn-id: file:///svn/unbound/trunk@2694 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-21 10:27:12 +00:00
Wouter Wijngaards 6ba973a8bd - fix error handling of alloc failure during rrsig verification.
git-svn-id: file:///svn/unbound/trunk@2693 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-21 07:22:01 +00:00
Wouter Wijngaards 7090975243 testbound compiles --with-nss.
git-svn-id: file:///svn/unbound/trunk@2692 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-20 15:23:03 +00:00
Wouter Wijngaards 62f3b7bb93 autoconf and make depend.
git-svn-id: file:///svn/unbound/trunk@2691 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-20 15:14:19 +00:00
Wouter Wijngaards ccf4099366 - work on --with-nss build option (for now, --with-libunbound-only).
git-svn-id: file:///svn/unbound/trunk@2690 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-20 15:11:53 +00:00
Wouter Wijngaards 15c805677c - --with-libunbound-only build option, only builds the library and
not the daemon and other tools.


git-svn-id: file:///svn/unbound/trunk@2689 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-19 12:20:11 +00:00
Wouter Wijngaards 15aacbe89b code review.
git-svn-id: file:///svn/unbound/trunk@2688 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-18 14:22:29 +00:00
Wouter Wijngaards 452b7fce3a - code review.
git-svn-id: file:///svn/unbound/trunk@2687 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-15 19:44:09 +00:00
Wouter Wijngaards 598beb1b06 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2686 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-15 12:33:10 +00:00
Wouter Wijngaards 06a3f735d7 - The key-cache bad key ttl is now 60 seconds.
git-svn-id: file:///svn/unbound/trunk@2685 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-15 12:25:29 +00:00
Wouter Wijngaards eb03758c79 - implement log-time-ascii on windows.
git-svn-id: file:///svn/unbound/trunk@2684 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-15 08:24:44 +00:00
Wouter Wijngaards c42a74b77c - bug #452: fix crash on assert in mesh_state_attachment.
git-svn-id: file:///svn/unbound/trunk@2683 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-06-11 12:04:58 +00:00
Wouter Wijngaards 8903dd175a change to test commit hook.
git-svn-id: file:///svn/unbound/trunk@2681 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-30 12:26:05 +00:00
Wouter Wijngaards 5c73dbdbc0 - silence warning from swig-generated code (md set but not used in
swig initmodule, due to ifdefs in swig generated code).


git-svn-id: file:///svn/unbound/trunk@2680 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-30 09:08:17 +00:00
Wouter Wijngaards 277b1a1c2d - Fix debian-bugs-658021: Please enable hardened build flags.
git-svn-id: file:///svn/unbound/trunk@2679 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-27 20:46:52 +00:00
Wouter Wijngaards da1bd6fd3f - updated iana ports list.
git-svn-id: file:///svn/unbound/trunk@2678 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-25 14:29:20 +00:00
Wouter Wijngaards fe56d9e504 trunk is 1.4.18
git-svn-id: file:///svn/unbound/trunk@2677 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-24 09:00:26 +00:00
Wouter Wijngaards 85016da2cb tag for 1.4.17 release.
git-svn-id: file:///svn/unbound/trunk@2676 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-24 08:37:33 +00:00
Wouter Wijngaards 159d5a18b6 - Review comments from Yuri, removed duplicate memset to zero in delegpt.
git-svn-id: file:///svn/unbound/trunk@2675 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-18 15:04:08 +00:00
Wouter Wijngaards b375ba3455 tag 1.4.17rc1
git-svn-id: file:///svn/unbound/trunk@2674 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 12:31:08 +00:00
Wouter Wijngaards 65cc9f1dd1 spelling fixup. svn: NO TEST
git-svn-id: file:///svn/unbound/trunk@2673 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 12:02:34 +00:00
Wouter Wijngaards 43ab18d6ed fix alloccheck
git-svn-id: file:///svn/unbound/trunk@2672 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 11:55:30 +00:00
Wouter Wijngaards aafed76b0f Fix mem compile.
git-svn-id: file:///svn/unbound/trunk@2671 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 10:57:35 +00:00
Wouter Wijngaards 0a1195f690 - Protect if statements in val_anchor for compilate without locks.
git-svn-id: file:///svn/unbound/trunk@2670 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 10:54:52 +00:00
Wouter Wijngaards ea158af48d - Updated doc/FEATURES with RFCs that are implemented but not listed.
git-svn-id: file:///svn/unbound/trunk@2669 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-16 10:30:42 +00:00
Wouter Wijngaards 6dd1dbd09f remove debug.
git-svn-id: file:///svn/unbound/trunk@2668 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-15 14:50:35 +00:00
Wouter Wijngaards 3d4f037f53 - fix configure ECDSA support in ldns detection for windows compile.
- fix possible uninitialised variable in windows pipe implementation.


git-svn-id: file:///svn/unbound/trunk@2667 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-15 14:50:21 +00:00
Wouter Wijngaards 3930e23b8c fix alignment problem in util/random.c for sparc64/freebsd.
git-svn-id: file:///svn/unbound/trunk@2666 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-09 09:13:57 +00:00
Wouter Wijngaards 6819016a83 fix warning
git-svn-id: file:///svn/unbound/trunk@2665 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-08 13:03:25 +00:00
Wouter Wijngaards 2d2c04c271 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2664 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-08 12:40:04 +00:00
Wouter Wijngaards 13a839d624 - Fix for accept spinning reported by OpenBSD.
git-svn-id: file:///svn/unbound/trunk@2663 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-08 12:08:55 +00:00
Wouter Wijngaards 2bf79c2e65 - Fix validation of nodata for DS query in NSEC zones, reported by
Ondrej Mikle.


git-svn-id: file:///svn/unbound/trunk@2662 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-05-02 11:58:27 +00:00
Wouter Wijngaards 53a448ffae - ECDSA support (RFC 6605) by default. Use --disable-ecdsa for older
openssl.


git-svn-id: file:///svn/unbound/trunk@2661 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-13 16:21:04 +00:00
Wouter Wijngaards d71a1ba0c2 ecdsa enabled by default.
git-svn-id: file:///svn/unbound/trunk@2660 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-13 16:19:13 +00:00
Wouter Wijngaards e1a817338e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2659 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-10 11:04:17 +00:00
Wouter Wijngaards cf147df593 - Applied patch from Daisuke HIGASHI for rrset-roundrobin and
minimal-responses features.


git-svn-id: file:///svn/unbound/trunk@2658 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-10 09:16:39 +00:00
Wouter Wijngaards 279f409636 - fix bug #444: setusercontext was called too late (thanks Bjorn
Ketelaars).



git-svn-id: file:///svn/unbound/trunk@2657 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-05 09:30:04 +00:00
Wouter Wijngaards a0db316445 - fix bug #443: --with-chroot-dir not honoured by configure.
git-svn-id: file:///svn/unbound/trunk@2656 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-04-05 09:10:56 +00:00
Wouter Wijngaards 8e472aa8c4 omit duplicate line.
git-svn-id: file:///svn/unbound/trunk@2655 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-27 08:49:30 +00:00
Wouter Wijngaards ec452bed83 - fix bug #442: Fix that Makefile depends on pythonmod headers
even using --without-pythonmodule.


git-svn-id: file:///svn/unbound/trunk@2654 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-27 07:31:22 +00:00
Wouter Wijngaards d9a2a36049 depend fix pythonmod header.
git-svn-id: file:///svn/unbound/trunk@2653 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-27 07:26:33 +00:00
Wouter Wijngaards 1b08416dbe configure change for pythonmod header
git-svn-id: file:///svn/unbound/trunk@2652 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-27 07:24:15 +00:00
Wouter Wijngaards 1c0f5a8aba configure change for pythonmod.
git-svn-id: file:///svn/unbound/trunk@2651 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-27 07:23:41 +00:00
Wouter Wijngaards bafc5741ba - contrib/validation-reporter follows rotated log file (patch from
Augie Schwer).


git-svn-id: file:///svn/unbound/trunk@2650 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-22 09:45:27 +00:00
Wouter Wijngaards eb926f15da lint fixes.
git-svn-id: file:///svn/unbound/trunk@2649 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-21 15:34:44 +00:00
Wouter Wijngaards b441875206 make depend.
git-svn-id: file:///svn/unbound/trunk@2648 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-21 15:06:21 +00:00
Wouter Wijngaards 8e20d58fa8 fixup include.
git-svn-id: file:///svn/unbound/trunk@2647 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-21 15:05:34 +00:00
Wouter Wijngaards fa3337d42a - new approach to NS fetches for DS lookup that works with
cornercases, and is more robust and considers forwarders.


git-svn-id: file:///svn/unbound/trunk@2646 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-21 15:01:01 +00:00
Wouter Wijngaards 0d5441bd8a - fix to locate nameservers for DS lookup with NS fetches.
git-svn-id: file:///svn/unbound/trunk@2645 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-19 15:44:21 +00:00
Wouter Wijngaards d17f39416b - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2644 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-19 11:10:35 +00:00
Wouter Wijngaards 4e92719611 - Patch for access to full DNS packet data in unbound python module
from Ondrej Mikle.


git-svn-id: file:///svn/unbound/trunk@2643 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-16 14:53:51 +00:00
Wouter Wijngaards fc52ee5aca - Applied line-buffer patch from Augie Schwer to validation.reporter.sh.
git-svn-id: file:///svn/unbound/trunk@2642 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-10 08:28:42 +00:00
Wouter Wijngaards ac103fc5bd removed warning from --enable-ecdsa.
git-svn-id: file:///svn/unbound/trunk@2641 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-02 12:17:09 +00:00
Wouter Wijngaards af71677114 flush_infra remove timeout counters too.
git-svn-id: file:///svn/unbound/trunk@2640 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-02 11:57:53 +00:00
Wouter Wijngaards 6e46110ae8 - flush_infra cleans timeouted servers from the cache too.
git-svn-id: file:///svn/unbound/trunk@2639 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-02 09:05:36 +00:00
Wouter Wijngaards 82ebbe32d1 comment for explanation of bit toggle.
git-svn-id: file:///svn/unbound/trunk@2638 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-01 13:38:28 +00:00
Wouter Wijngaards 1736d8078a - forward-first option. Tries without forward if a query fails.
Also stub-first option that is similar.


git-svn-id: file:///svn/unbound/trunk@2637 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-03-01 13:16:40 +00:00
Wouter Wijngaards 57199f80c9 - Fix from code review, if EINPROGRESS not defined chain if statement differently.
git-svn-id: file:///svn/unbound/trunk@2636 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-28 15:06:59 +00:00
Wouter Wijngaards d7172c55ed - Fix bug#434: on windows check registry for config file location
for unbound-control.exe, and unbound-checkconf.exe.


git-svn-id: file:///svn/unbound/trunk@2635 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-27 13:20:29 +00:00
Wouter Wijngaards 9429092966 - Fix to squelch 'network unreachable' errors from tcp connect in
logs, high verbosity will show them.


git-svn-id: file:///svn/unbound/trunk@2634 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-23 09:01:46 +00:00
Wouter Wijngaards 7f6827cc97 fix python module for prefetch-sticky changes.
git-svn-id: file:///svn/unbound/trunk@2633 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-16 17:38:59 +00:00
Wouter Wijngaards 773d8e3b84 Fix prefetch and stickyness.
git-svn-id: file:///svn/unbound/trunk@2632 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-16 11:04:53 +00:00
Wouter Wijngaards 682ff957ed lint and doxygen fixes.
git-svn-id: file:///svn/unbound/trunk@2631 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-16 10:08:07 +00:00
Wouter Wijngaards c90d6d2538 nicer error.
git-svn-id: file:///svn/unbound/trunk@2630 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-16 09:58:49 +00:00
Wouter Wijngaards 8e1cb52458 - iter_hints is now thread-owned in module env, and thus threadsafe.
git-svn-id: file:///svn/unbound/trunk@2629 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-16 09:55:50 +00:00
Wouter Wijngaards 987c707a4d remove superfluous white space.
git-svn-id: file:///svn/unbound/trunk@2628 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 15:50:03 +00:00
Wouter Wijngaards eac4a9604c no double free.
git-svn-id: file:///svn/unbound/trunk@2627 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 15:33:24 +00:00
Wouter Wijngaards 9bbc6f4b56 include for compile with alloc_stats
git-svn-id: file:///svn/unbound/trunk@2626 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 15:16:39 +00:00
Wouter Wijngaards 718dcce317 fix race condition.
git-svn-id: file:///svn/unbound/trunk@2625 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 15:03:36 +00:00
Wouter Wijngaards 08835e01ee free unsupported trust anchors.
git-svn-id: file:///svn/unbound/trunk@2624 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 14:53:45 +00:00
Wouter Wijngaards d64b14cff9 - unbound-control forward_add, forward_remove, stub_add, stub_remove
can modify stubs and forwards for running unbound (on mobile computer)
  they can also add and remove domain-insecure for the zone.


git-svn-id: file:///svn/unbound/trunk@2623 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 14:35:28 +00:00
Wouter Wijngaards 943f8f43b9 hints uses malloc for more dynamicity.
git-svn-id: file:///svn/unbound/trunk@2622 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 09:38:34 +00:00
Wouter Wijngaards 7a58fdcebc - Fix forward-zone memory, uses malloc and frees original root dp.
git-svn-id: file:///svn/unbound/trunk@2621 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-15 08:50:17 +00:00
Wouter Wijngaards db6cd0a635 - iter forwards uses malloc inside for more dynamicity.
git-svn-id: file:///svn/unbound/trunk@2620 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-14 15:41:09 +00:00
Wouter Wijngaards 03a7425ead - Fix sticky NS (ghost domain problem) if prefetch is yes.
git-svn-id: file:///svn/unbound/trunk@2619 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-14 11:06:44 +00:00
Wouter Wijngaards d25268b7ee iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2618 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-13 10:59:07 +00:00
Wouter Wijngaards e789dac9a1 - RT#2955. Fix for cygwin compilation.
git-svn-id: file:///svn/unbound/trunk@2617 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-13 10:42:22 +00:00
Wouter Wijngaards 850525139b debug infra lines for infa timeout counters.
git-svn-id: file:///svn/unbound/trunk@2616 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 14:48:09 +00:00
Wouter Wijngaards db33e4dbf6 fix unit test to be more reliable on slower systems.
git-svn-id: file:///svn/unbound/trunk@2615 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 14:09:39 +00:00
Wouter Wijngaards 05aaa8a138 - unit test fix for nomem_cnametopos.rpl race condition.
git-svn-id: file:///svn/unbound/trunk@2614 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 12:54:27 +00:00
Wouter Wijngaards 09b9ea04a3 - Fix timeouts to keep track of query type, A, AAAA and other, if
another has caused timeout blacklist, different type can still probe.


git-svn-id: file:///svn/unbound/trunk@2613 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 12:17:25 +00:00
Wouter Wijngaards 358fd2ad07 gmake no longer needed.
git-svn-id: file:///svn/unbound/trunk@2612 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 10:34:15 +00:00
Wouter Wijngaards 14059dca14 - Slightly smaller critical region in one case in infra cache.
git-svn-id: file:///svn/unbound/trunk@2611 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-10 09:21:06 +00:00
Wouter Wijngaards 388d0639bc - Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.
git-svn-id: file:///svn/unbound/trunk@2610 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-09 12:40:19 +00:00
Wouter Wijngaards e8050a5587 autoconf on fedora.
git-svn-id: file:///svn/unbound/trunk@2609 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-09 08:28:35 +00:00
Wouter Wijngaards c352ee2e85 - workaround for openssl 0.9.8 ecdsa sha2 and evp problem.
git-svn-id: file:///svn/unbound/trunk@2608 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-08 16:40:46 +00:00
Wouter Wijngaards 9117191d44 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2607 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-08 13:31:47 +00:00
Wouter Wijngaards 924789d877 - implement draft-ietf-dnsext-ecdsa-04; which is in IETF LC; This
implementation is experimental at this time and not recommended
  for use on the public internet (the protocol numbers have not
  been assigned).  Needs recent ldns with --enable-ecdsa.
- fix memory leak in errorcase for DSA signatures.


git-svn-id: file:///svn/unbound/trunk@2606 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-08 13:22:44 +00:00
Wouter Wijngaards 8c2f658cd1 - fix for windows, rename() is not posix compliant on windows.
git-svn-id: file:///svn/unbound/trunk@2605 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-03 14:56:09 +00:00
Wouter Wijngaards 8cafd0e379 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2604 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-02 09:47:02 +00:00
Wouter Wijngaards ad2fa5c810 trunk is 1.4.17 in development.
git-svn-id: file:///svn/unbound/trunk@2603 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-02 09:21:11 +00:00
Wouter Wijngaards bec8d15cd0 changelog.
git-svn-id: file:///svn/unbound/trunk@2601 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-02 09:05:29 +00:00
Wouter Wijngaards dff630c788 - Fix validation failures (like: validation failure xx: no NSEC3
closest encloser from yy for DS zz. while building chain of trust,
         because of a bug in the TTL-fix in 1.4.15, it picked the wrong rdata
         for an NSEC3.  Now it does not change rdata, and fixes TTL.


git-svn-id: file:///svn/unbound/trunk@2599 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-02-01 11:18:07 +00:00
Wouter Wijngaards 30038d8fa6 - Fix version-number in libtool to be version-info so it produces
libunbound.so.2 like it should.


git-svn-id: file:///svn/unbound/trunk@2598 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-30 08:46:25 +00:00
Wouter Wijngaards 71e85ee6fb use the ++.
git-svn-id: file:///svn/unbound/trunk@2597 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-26 10:46:14 +00:00
Wouter Wijngaards b54efa5c69 - applied patch to support outgoing-interface with ub_ctx_set_option.
git-svn-id: file:///svn/unbound/trunk@2596 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-26 10:37:10 +00:00
Wouter Wijngaards c480290a30 tag 1.4.15, trunk is now 1.4.16 development.
git-svn-id: file:///svn/unbound/trunk@2595 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-26 09:04:28 +00:00
Wouter Wijngaards c1d79638c4 fix memset in test code.
git-svn-id: file:///svn/unbound/trunk@2593 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-23 10:51:57 +00:00
Wouter Wijngaards 6f6ccee95b remake configure.
git-svn-id: file:///svn/unbound/trunk@2592 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-20 14:31:32 +00:00
Wouter Wijngaards c44ef11de5 fix bug #424.
git-svn-id: file:///svn/unbound/trunk@2591 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-20 14:30:56 +00:00
Wouter Wijngaards 9c8ac75026 - Fix to write key files completely to a temporary file, and if that
succeeds, replace the real key file.  So failures leave a useful file.


git-svn-id: file:///svn/unbound/trunk@2590 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-19 14:17:22 +00:00
Wouter Wijngaards 31f071db25 add symbol.
git-svn-id: file:///svn/unbound/trunk@2588 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-18 12:23:06 +00:00
Wouter Wijngaards b5337c1e05 tag 1.4.15rc1
git-svn-id: file:///svn/unbound/trunk@2587 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-18 12:09:18 +00:00
Wouter Wijngaards 2e26ec2d01 - Fix bug where canonical_compare of RRSIG did not downcase the
signer-name.  This is mostly harmless because RRSIGs do not have
  to be sorted in canonical order, usually.


git-svn-id: file:///svn/unbound/trunk@2586 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-17 09:06:18 +00:00
Wouter Wijngaards cf8ee796c9 fix changelog
svn:NO TEST


git-svn-id: file:///svn/unbound/trunk@2585 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-12 13:53:52 +00:00
Wouter Wijngaards 8b078cc509 - Added ub_version(). API version increase, with (binary) backwards
compatibility for the previous version.


git-svn-id: file:///svn/unbound/trunk@2584 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-12 13:52:38 +00:00
Wouter Wijngaards 589924e36c - uninitialised variable in reprobe for rtt blocked domains fixed.
- lintfix and new flex output.


git-svn-id: file:///svn/unbound/trunk@2583 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-10 15:07:16 +00:00
Wouter Wijngaards fd9aa53370 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2582 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-10 09:42:55 +00:00
Wouter Wijngaards 6dd2c0467e - Fix bug #425: unbound reports wrong TTL in reply, it reports a TTL
that would be permissible by the RFCs but it is not the TTL in the
  cache.


git-svn-id: file:///svn/unbound/trunk@2581 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-10 09:42:32 +00:00
Wouter Wijngaards a7ec2af62a - Fix to randomize hash function, based on 28c3 congress, reported
by Peter van Dijk.


git-svn-id: file:///svn/unbound/trunk@2580 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-02 13:16:18 +00:00
Wouter Wijngaards bbfb2f2202 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2579 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-24 11:28:14 +00:00
Wouter Wijngaards 1238b7979f - Fix for memory leak (about 20 bytes when a tcp or udp send
operation towards authority servers failed, takes about 50.000
such failures to leak one Mb, such failures are also
usually logged), reported by Robert Fleischmann.



git-svn-id: file:///svn/unbound/trunk@2578 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-24 11:27:53 +00:00
Wouter Wijngaards 1f29a98366 - trunk has 1.4.15 in development.
git-svn-id: file:///svn/unbound/trunk@2577 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-19 11:37:15 +00:00
Wouter Wijngaards 0916e1d0ea - Fix for VU#209659 CVE-2011-4528: Unbound denial of service
vulnerabilities from nonstandard redirection and denial of existence
http://www.unbound.net/downloads/CVE-2011-4528.txt
- robust checks for next-closer NSEC3s.
- tag 1.4.14 created.


git-svn-id: file:///svn/unbound/trunk@2574 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-19 10:55:32 +00:00
Wouter Wijngaards 65ad15da56 - Fix parse error on negative SOA RRSIGs if badly ordered in the packet.
git-svn-id: file:///svn/unbound/trunk@2573 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-15 13:37:13 +00:00
Wouter Wijngaards 5ae8bec719 - remove uninit warning from cachedump code.
git-svn-id: file:///svn/unbound/trunk@2572 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-15 10:55:59 +00:00
Wouter Wijngaards e0fd0ef80c - Fix to constrain signer_name to be a parent of the lookupname.
git-svn-id: file:///svn/unbound/trunk@2571 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-13 12:37:47 +00:00
Wouter Wijngaards 8e62925ffb fix infra cache comparison.
git-svn-id: file:///svn/unbound/trunk@2570 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-13 12:14:40 +00:00
Wouter Wijngaards e7282a291b 1.4.14rc1 tag.
git-svn-id: file:///svn/unbound/trunk@2569 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-13 08:57:29 +00:00
Wouter Wijngaards fa909b6cc7 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2568 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-13 08:50:26 +00:00
Wouter Wijngaards 5fa08a0be9 And LIBOBJ.
git-svn-id: file:///svn/unbound/trunk@2567 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 15:55:46 +00:00
Wouter Wijngaards 1cf44b0b5c Add -lws2_32 on mingw crosscompile.
git-svn-id: file:///svn/unbound/trunk@2566 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 15:48:03 +00:00
Wouter Wijngaards 111ef6f862 changelog for malloc fix.
git-svn-id: file:///svn/unbound/trunk@2565 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 15:38:41 +00:00
Wouter Wijngaards 33e6deb675 fix malloc detection (and double definition).
git-svn-id: file:///svn/unbound/trunk@2564 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 15:38:21 +00:00
Wouter Wijngaards 1aa1c1404c - Fix warning unused in compat/strptime.c.
git-svn-id: file:///svn/unbound/trunk@2563 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 14:59:24 +00:00
Wouter Wijngaards 694f02f1df - Fix warnings with gcc 4.6 in compat/inet_ntop.c.
git-svn-id: file:///svn/unbound/trunk@2562 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 14:25:01 +00:00
Wouter Wijngaards 9761d0c6de - Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
git-svn-id: file:///svn/unbound/trunk@2561 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-05 13:49:30 +00:00
Wouter Wijngaards 3b35e412f5 configure generated with autoconf 2.68
git-svn-id: file:///svn/unbound/trunk@2560 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-12-02 13:43:24 +00:00
Wouter Wijngaards 35172e89f4 - Fix for tcp-upstream and ssl-upstream for if a laptop sleeps,
causes SERVFAILs.  Also fixed for UDP (but less likely).


git-svn-id: file:///svn/unbound/trunk@2559 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-30 13:39:11 +00:00
Wouter Wijngaards eb29370697 iana ports updated.
git-svn-id: file:///svn/unbound/trunk@2558 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-28 14:59:41 +00:00
Wouter Wijngaards 01f3e90871 - Fix quartile time estimate, it was too low, (thanks Jan Komissar).
git-svn-id: file:///svn/unbound/trunk@2557 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-28 14:22:29 +00:00
Wouter Wijngaards 7bdae2d545 now quotes needed in Makefile.
git-svn-id: file:///svn/unbound/trunk@2556 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 14:49:19 +00:00
Wouter Wijngaards ae666ea203 dependency for checklocks.c
git-svn-id: file:///svn/unbound/trunk@2555 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 14:42:00 +00:00
Wouter Wijngaards 557aad4b72 run autoconf
git-svn-id: file:///svn/unbound/trunk@2554 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 14:37:41 +00:00
Wouter Wijngaards bbb583e754 checklock define fix
git-svn-id: file:///svn/unbound/trunk@2553 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 14:37:30 +00:00
Wouter Wijngaards 2824d0ad52 fix exit code of remote-threaded.post.
git-svn-id: file:///svn/unbound/trunk@2552 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 14:33:39 +00:00
Wouter Wijngaards 6dfa0d643b makefile compat, ports updated and remove unused substitutions.
git-svn-id: file:///svn/unbound/trunk@2551 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 13:02:48 +00:00
Wouter Wijngaards 3395637700 nicer output.
git-svn-id: file:///svn/unbound/trunk@2550 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 10:58:51 +00:00
Wouter Wijngaards 29ce27f300 better test for SunOS make.
git-svn-id: file:///svn/unbound/trunk@2549 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 10:54:45 +00:00
Wouter Wijngaards e3e6246860 fix escape
git-svn-id: file:///svn/unbound/trunk@2548 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 10:34:37 +00:00
Wouter Wijngaards c8696005a7 compat with SunOS.
git-svn-id: file:///svn/unbound/trunk@2547 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 10:31:35 +00:00
Wouter Wijngaards fc7f057d0b no $< in fixed rules.
git-svn-id: file:///svn/unbound/trunk@2546 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-11 10:17:00 +00:00
Wouter Wijngaards 1befacc444 fix lint.
git-svn-id: file:///svn/unbound/trunk@2545 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-10 18:48:53 +00:00
Wouter Wijngaards a1c76554a2 - Makefile changed for BSD make compatibility.
git-svn-id: file:///svn/unbound/trunk@2544 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-10 18:44:06 +00:00
Wouter Wijngaards cf1d2135e1 unit test for SSL upstream.
git-svn-id: file:///svn/unbound/trunk@2543 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-09 13:20:30 +00:00
Wouter Wijngaards 1cee11cba8 iana portlists updated.
git-svn-id: file:///svn/unbound/trunk@2542 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-08 15:47:05 +00:00
Wouter Wijngaards ae5d794c47 - Fix double free in unbound-host, reported by Steve Grubb.
git-svn-id: file:///svn/unbound/trunk@2541 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-08 15:41:21 +00:00
Wouter Wijngaards a08cf3c4e5 fixup windows compile with ssl support.
git-svn-id: file:///svn/unbound/trunk@2540 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-08 14:27:16 +00:00
Wouter Wijngaards 8f5596f643 ssl_port setting, so that the dnssec-trigger server can be on one host machine.
git-svn-id: file:///svn/unbound/trunk@2539 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-08 10:56:42 +00:00
Wouter Wijngaards a798dcb5bd run autoconf.
git-svn-id: file:///svn/unbound/trunk@2538 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 17:24:11 +00:00
Wouter Wijngaards 939c103a73 - fix -flto detection on Lion for llvm-gcc.
git-svn-id: file:///svn/unbound/trunk@2537 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 13:39:38 +00:00
Wouter Wijngaards ef4d9a1ecb fix warnings (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@2536 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 10:32:37 +00:00
Wouter Wijngaards 9a0b040403 fix tests, the ssl upstream setting is per-query (inside outside_network.c).
git-svn-id: file:///svn/unbound/trunk@2535 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 10:18:56 +00:00
Wouter Wijngaards b8b2ce58d0 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2534 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 09:54:57 +00:00
Wouter Wijngaards 6a918b841f - documentation for new options: ssl-upstream, ssl-service-key and
ssl-service.pem.


git-svn-id: file:///svn/unbound/trunk@2533 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 09:44:40 +00:00
Wouter Wijngaards 115c36a94e support for ssl-upstream (works from unbound-control).
git-svn-id: file:///svn/unbound/trunk@2532 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-11-01 09:26:58 +00:00
Wouter Wijngaards 03c34b695f debug printout certificate of ssl dns server.
git-svn-id: file:///svn/unbound/trunk@2531 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-31 14:56:48 +00:00
Wouter Wijngaards aa0536dcb5 - dns over ssl support, ssl-service-pem and ssl-service-key files
can be given and then TCP queries are serviced wrapped in SSL.


git-svn-id: file:///svn/unbound/trunk@2530 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-31 14:48:48 +00:00
Wouter Wijngaards 28131d5845 fix export_all_symbols on osx.
git-svn-id: file:///svn/unbound/trunk@2529 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-27 11:14:17 +00:00
Wouter Wijngaards 69aafe3a1c iana update and gzip compression.
git-svn-id: file:///svn/unbound/trunk@2528 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-27 08:46:32 +00:00
Wouter Wijngaards 2479955f9f - lame-ttl and lame-size options no longer exist, it is integrated
with the host info.  They are ignored (with verbose warning) if
  encountered to keep the config file backwards compatible.



git-svn-id: file:///svn/unbound/trunk@2527 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-27 08:33:02 +00:00
Wouter Wijngaards 9b47af529e fix iana update check for gzipped file.
git-svn-id: file:///svn/unbound/trunk@2526 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-26 16:00:58 +00:00
Wouter Wijngaards 11f5e16932 infra cache consolidated and stores per zone, IP.
git-svn-id: file:///svn/unbound/trunk@2525 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-26 15:46:23 +00:00
Wouter Wijngaards 3d5cef932e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2524 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-26 09:49:14 +00:00
Wouter Wijngaards 0f825eb283 - Fix make_new_space function so that the incoming query is not
overwritten if a jostled out query causes a waiting query to be
  resumed that then fails and sends an error message.  (Thanks to
  Matthew Lee).


git-svn-id: file:///svn/unbound/trunk@2523 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-24 13:49:59 +00:00
Wouter Wijngaards 7ea69fe9c2 - Fix resolve of partners.extranet.microsoft.com with a fix for the
server selection for choosing out of a (particular) list of bad choices.


git-svn-id: file:///svn/unbound/trunk@2522 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-24 08:34:59 +00:00
Wouter Wijngaards 83367411ef - fix --enable-allsymbols, fptr wlist is disabled on windows
with this option enabled because of memory layout exe vs dll.


git-svn-id: file:///svn/unbound/trunk@2521 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-21 12:33:46 +00:00
Wouter Wijngaards 51810c1408 lint fix.
git-svn-id: file:///svn/unbound/trunk@2520 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 14:39:35 +00:00
Wouter Wijngaards ddddbf284f - Implement ipv6%interface notation for scope_id usage.
git-svn-id: file:///svn/unbound/trunk@2519 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 14:34:11 +00:00
Wouter Wijngaards 28c9738062 detect if GOST works.
git-svn-id: file:///svn/unbound/trunk@2518 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 13:18:25 +00:00
Wouter Wijngaards cefc027dbc gost check if it works.
git-svn-id: file:///svn/unbound/trunk@2517 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 13:11:40 +00:00
Wouter Wijngaards d66ff13f9c gost detect works.
git-svn-id: file:///svn/unbound/trunk@2516 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 12:40:20 +00:00
Wouter Wijngaards 01027a8322 run strptime check while runnable.
git-svn-id: file:///svn/unbound/trunk@2515 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 12:20:45 +00:00
Wouter Wijngaards 086e31e88d configure for strptime detection.
git-svn-id: file:///svn/unbound/trunk@2514 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 12:17:01 +00:00
Wouter Wijngaards ce63172a67 fix strptime detection.
git-svn-id: file:///svn/unbound/trunk@2513 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-19 12:16:41 +00:00
Wouter Wijngaards 684429e6c8 - better documentation for inform_super (Thanks Yang Zhe).
git-svn-id: file:///svn/unbound/trunk@2512 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-17 13:11:58 +00:00
Wouter Wijngaards 80424bc16e - Fix for out-of-memory condition in libunbound (thanks Robert Fleischman).
git-svn-id: file:///svn/unbound/trunk@2511 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-14 07:15:41 +00:00
Wouter Wijngaards a16c24b4f0 changelog entry
git-svn-id: file:///svn/unbound/trunk@2510 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-13 14:11:27 +00:00
Wouter Wijngaards 52f4247c48 fix EXPORT_ALL_SYMBOLS.
git-svn-id: file:///svn/unbound/trunk@2509 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-13 14:09:50 +00:00
Wouter Wijngaards dfd769b60c fix install name and fix error report by munin autoconf.
git-svn-id: file:///svn/unbound/trunk@2508 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-12 08:37:15 +00:00
Wouter Wijngaards 680b0d1cce - updated contrib/unbound_munin_ to family=auto so that it works
with munin-node-configure automatically (if installed as
/usr/local/share/munin/plugins/unbound_ ).


git-svn-id: file:///svn/unbound/trunk@2507 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-12 08:25:38 +00:00
Matthijs Mekking bcdd32e7e1 revert dynlinking
git-svn-id: file:///svn/unbound/trunk@2506 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-10 08:56:23 +00:00
Matthijs Mekking b6d88c0b41 comment svn:NO TEST
git-svn-id: file:///svn/unbound/trunk@2505 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-06 08:58:55 +00:00
Matthijs Mekking 7cf757596c link unbound against unbound library
git-svn-id: file:///svn/unbound/trunk@2504 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-10-06 08:27:31 +00:00
Wouter Wijngaards 0f57f21ca2 unbound windows option to start and stop the service.
git-svn-id: file:///svn/unbound/trunk@2503 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-27 13:22:04 +00:00
Wouter Wijngaards 68d82e9ce4 - TCP-upstream calculates tcp-ping so server selection works if there
are alternatives.


git-svn-id: file:///svn/unbound/trunk@2502 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-23 12:56:28 +00:00
Wouter Wijngaards 881f0ad30f - Fix classification of NS set in answer section, where there is a
parent-child server, and the answer has the AA flag for dir.slb.com.
  Thanks to Amanda Constant from Secure64.


git-svn-id: file:///svn/unbound/trunk@2501 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-20 07:42:04 +00:00
Wouter Wijngaards d9ceec4005 better sent count handling
git-svn-id: file:///svn/unbound/trunk@2500 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 14:15:13 +00:00
Wouter Wijngaards f82a0847eb - max sent count. EDNS1480 only for rtt < 5000. No promiscuous
fetch if sentcount > 3, stop query if sentcount > 16.  Count is
reset when referral or CNAME happens.  This makes unbound better
at managing large NS sets, they are explored when there is continued
interest (in the form of queries).


git-svn-id: file:///svn/unbound/trunk@2499 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 14:11:12 +00:00
Wouter Wijngaards c3f5b5f773 fixup compilation.
git-svn-id: file:///svn/unbound/trunk@2498 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 12:43:07 +00:00
Wouter Wijngaards b72d40f3dd - fix various compiler warnings (reported by Paul Wouters).
git-svn-id: file:///svn/unbound/trunk@2497 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 11:35:01 +00:00
Wouter Wijngaards c4cac78f10 fix EDNS1480.
git-svn-id: file:///svn/unbound/trunk@2496 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 10:04:08 +00:00
Wouter Wijngaards 164f86e377 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2495 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 09:59:59 +00:00
Wouter Wijngaards c30e90b435 - fix bug #408: accept patch from Steve Snyder that comments out
unused functions in lookup3.c.


git-svn-id: file:///svn/unbound/trunk@2494 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-16 07:09:11 +00:00
Wouter Wijngaards 365f87a4a4 fix memleak and add edns section when 1480 probe.
git-svn-id: file:///svn/unbound/trunk@2493 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-15 15:35:04 +00:00
Wouter Wijngaards 1af30c02fc After UDP timeout EDNS1480 probe, stop fragmentation caused trouble.
git-svn-id: file:///svn/unbound/trunk@2492 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-15 14:32:17 +00:00
Wouter Wijngaards 83938e1d3b trunk has 1.4.14.
git-svn-id: file:///svn/unbound/trunk@2491 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-15 08:54:25 +00:00
Wouter Wijngaards 1daad9d9c0 tag 1.4.13rc2
git-svn-id: file:///svn/unbound/trunk@2489 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-12 11:58:29 +00:00
Wouter Wijngaards af93d6033c revert earlier commit.
git-svn-id: file:///svn/unbound/trunk@2488 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-12 11:28:14 +00:00
Wouter Wijngaards 46eeced066 - Fix operation in ipv6 only (do-ip4: no) mode.
git-svn-id: file:///svn/unbound/trunk@2487 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-07 14:34:10 +00:00
Wouter Wijngaards 70c8f304c2 fedora specfile updated (from Paul Wouters).
git-svn-id: file:///svn/unbound/trunk@2486 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-07 05:34:22 +00:00
Wouter Wijngaards 1a2b78e51a tag 1.4.13rc1
git-svn-id: file:///svn/unbound/trunk@2485 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-05 11:48:26 +00:00
Wouter Wijngaards 54d0ed9a70 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2484 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-09-02 15:05:31 +00:00
Wouter Wijngaards d56aef7b33 - Fix validation failures due to EDNS backoff retries, the retry
for fetch of data has want_dnssec because the iter_indicate_dnssec
         function returns true when validation failure retry happens, and
         then the serviced query code does not fallback to noEDNS, even if
         the cache says it has this.  This helps for DLV deployment when
         the DNSSEC status is not known for sure before the lookup concludes.


git-svn-id: file:///svn/unbound/trunk@2483 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-26 09:00:43 +00:00
Wouter Wijngaards accc4a6f68 Fix numthreads 0 handling.
git-svn-id: file:///svn/unbound/trunk@2482 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-26 06:50:23 +00:00
Wouter Wijngaards 39de97e176 - Applied patch from Karel Slany that fixes a memory leak in the
unbound python module, in string conversions.


git-svn-id: file:///svn/unbound/trunk@2481 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-24 11:03:29 +00:00
Wouter Wijngaards 05e118b7d5 tcp upstream option.
git-svn-id: file:///svn/unbound/trunk@2480 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-22 13:58:40 +00:00
Wouter Wijngaards 174604914f - Documented the options that work with control set_option command.
git-svn-id: file:///svn/unbound/trunk@2479 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-22 13:22:05 +00:00
Wouter Wijngaards d265c02f69 - Fix that internally, CNAMEs with NXDOMAIN have that as rcode.
git-svn-id: file:///svn/unbound/trunk@2478 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-22 12:11:54 +00:00
Wouter Wijngaards 17e5bba504 Fix validation of qtype ANY responses with CNAMEs (thanks Cathy Zhang and Luo Ce).
git-svn-id: file:///svn/unbound/trunk@2477 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-22 12:02:50 +00:00
Wouter Wijngaards 5ab9b9c8f9 Fix autoconf for makedist crosscompile RC or snapshot.
git-svn-id: file:///svn/unbound/trunk@2476 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-18 16:01:42 +00:00
Wouter Wijngaards 09375e16e7 iana portlist updated.
new xml format at iana.


git-svn-id: file:///svn/unbound/trunk@2475 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-17 15:12:39 +00:00
Wouter Wijngaards 22290ac234 - Fix validation of . DS query.
git-svn-id: file:///svn/unbound/trunk@2474 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-17 14:28:32 +00:00
Wouter Wijngaards 86c4c11ca2 - fix memory and fd leak after out-of-memory condition.
git-svn-id: file:///svn/unbound/trunk@2473 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-10 14:03:06 +00:00
Wouter Wijngaards 63c07d13ce updated patch from Tom.
git-svn-id: file:///svn/unbound/trunk@2472 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-10 07:37:57 +00:00
Wouter Wijngaards e8ec432579 - Fix python site-packages path to /usr/lib64.
git-svn-id: file:///svn/unbound/trunk@2471 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-10 06:05:09 +00:00
Wouter Wijngaards ad864b0f7e - patch from Tom Hendrikx fixes load of python modules.
git-svn-id: file:///svn/unbound/trunk@2470 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-09 07:28:22 +00:00
Wouter Wijngaards cafc73a74f - make clean had ldns-src reference, removed.
git-svn-id: file:///svn/unbound/trunk@2469 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-08 13:17:37 +00:00
Wouter Wijngaards 8c04c2e187 acx v14.
git-svn-id: file:///svn/unbound/trunk@2468 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-01 14:56:38 +00:00
Wouter Wijngaards 27b5d25703 Fix autoconf 2.68 warnings
git-svn-id: file:///svn/unbound/trunk@2467 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-08-01 11:14:33 +00:00
Wouter Wijngaards dbd816fafb iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2466 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-14 09:10:26 +00:00
Wouter Wijngaards 47653ae679 release 1.4.12 noted. 1.4.13 developed in svn trunk.
git-svn-id: file:///svn/unbound/trunk@2465 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-14 08:33:12 +00:00
Wouter Wijngaards 3d2156dacc - Unbound implements RFC6303 (since version 1.4.7).
git-svn-id: file:///svn/unbound/trunk@2463 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-14 08:17:11 +00:00
Wouter Wijngaards 25319e6737 - Quick fix for contrib/unbound.spec example, no ldns-builtin
any more.


git-svn-id: file:///svn/unbound/trunk@2462 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-13 12:17:13 +00:00
Wouter Wijngaards 7359d84e2f - Fix wildcard expansion no-data reply under an optout NSEC3 zone is
validated as insecure, reported by Jia Li (lijia@cnnic.cn).


git-svn-id: file:///svn/unbound/trunk@2461 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-11 09:03:18 +00:00
Wouter Wijngaards 5f08751b3b changelog entry tag.
git-svn-id: file:///svn/unbound/trunk@2460 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-04 10:44:10 +00:00
Wouter Wijngaards 60e8c22040 - fix that --enable-static-exe does not complain about it unknown.
git-svn-id: file:///svn/unbound/trunk@2458 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-01 08:58:34 +00:00
Wouter Wijngaards a742415b5c version number in example config file.
git-svn-id: file:///svn/unbound/trunk@2457 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-07-01 07:12:08 +00:00
Wouter Wijngaards 7b5262ccd2 autoconf
git-svn-id: file:///svn/unbound/trunk@2456 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:31:08 +00:00
Matthijs Mekking c3da97fb35 suggested change
git-svn-id: file:///svn/unbound/trunk@2455 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:26:58 +00:00
Wouter Wijngaards 844b5e71b1 nicer text
git-svn-id: file:///svn/unbound/trunk@2454 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:22:06 +00:00
Wouter Wijngaards 172260232e nicer text
git-svn-id: file:///svn/unbound/trunk@2453 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:19:23 +00:00
Wouter Wijngaards c155cfc8bc fixup.
git-svn-id: file:///svn/unbound/trunk@2452 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:15:41 +00:00
Wouter Wijngaards 447b6a1149 compile fix.
git-svn-id: file:///svn/unbound/trunk@2451 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:14:42 +00:00
Wouter Wijngaards 7070c35e11 nicer error messages.
git-svn-id: file:///svn/unbound/trunk@2450 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:13:48 +00:00
Wouter Wijngaards dd03b668c5 fix neater.
git-svn-id: file:///svn/unbound/trunk@2449 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 14:02:16 +00:00
Wouter Wijngaards 1dff4206d5 fix makedist for crosscompile to windows without ldns tarball builtin.
git-svn-id: file:///svn/unbound/trunk@2448 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 13:24:10 +00:00
Wouter Wijngaards bbe76430fe - removed ldns-src tarball inside the unbound tarball.
git-svn-id: file:///svn/unbound/trunk@2447 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 12:59:27 +00:00
Wouter Wijngaards 2c9bf883c9 - fix comment about rndc port, that referred to the old port number.
- fix that the listening socket is not closed when too many remote
  control connections are made at the same time.


git-svn-id: file:///svn/unbound/trunk@2446 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 12:13:55 +00:00
Wouter Wijngaards 59f5480df1 - fix replyaddr count wrong after jostled queries, which leads to
eventual starvation where the daemon has no replyaddrs left to use.


git-svn-id: file:///svn/unbound/trunk@2445 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 11:01:44 +00:00
Wouter Wijngaards bc06ab0377 fix bug#395: id bits of other query may leak out under conditions
git-svn-id: file:///svn/unbound/trunk@2444 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 09:42:20 +00:00
Wouter Wijngaards 668bcfc499 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2443 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 09:10:53 +00:00
Wouter Wijngaards 9229c58c2f 1.4.12 in trunk and configure updated.
git-svn-id: file:///svn/unbound/trunk@2442 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-30 08:56:56 +00:00
Wouter Wijngaards c89323ef93 tag rc3
git-svn-id: file:///svn/unbound/trunk@2439 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-23 11:49:15 +00:00
Wouter Wijngaards 4f68378640 - Changed -flto check to support clang compiler.
git-svn-id: file:///svn/unbound/trunk@2438 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-23 09:00:05 +00:00
Wouter Wijngaards ff23baadcc and new configure
git-svn-id: file:///svn/unbound/trunk@2436 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 12:03:58 +00:00
Wouter Wijngaards 7c128d5013 changelog
git-svn-id: file:///svn/unbound/trunk@2435 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 12:00:47 +00:00
Wouter Wijngaards b279987e9f updated autoconf files.
git-svn-id: file:///svn/unbound/trunk@2434 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 11:52:45 +00:00
Wouter Wijngaards 8ecb52c532 Different flex version, no warning about signed and unsigned comparison.
git-svn-id: file:///svn/unbound/trunk@2433 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 09:59:53 +00:00
Wouter Wijngaards 28912ed659 changelogentry
git-svn-id: file:///svn/unbound/trunk@2432 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 09:43:22 +00:00
Wouter Wijngaards f24f631838 tag 1.4.11rc1
git-svn-id: file:///svn/unbound/trunk@2431 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-17 09:42:37 +00:00
Wouter Wijngaards 42730aad99 - version is 1.4.11.
git-svn-id: file:///svn/unbound/trunk@2430 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-16 13:27:57 +00:00
Wouter Wijngaards 8def9c1043 - log-queries: yesno option, default is no, prints querylog.
git-svn-id: file:///svn/unbound/trunk@2429 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-16 13:15:57 +00:00
Wouter Wijngaards ecf4deedbe iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2428 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-14 09:01:45 +00:00
Wouter Wijngaards 139ab47dc6 - Use -flto compiler flag for link time optimization, if supported.
git-svn-id: file:///svn/unbound/trunk@2427 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-14 08:39:53 +00:00
Wouter Wijngaards 608f82a1cd IPv6 service address for d.root-servers.net (2001:500:2D::D)
git-svn-id: file:///svn/unbound/trunk@2426 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-12 09:51:00 +00:00
Wouter Wijngaards 5cbf6d059b - statistics-interval prints the number of jostled queries to log.
git-svn-id: file:///svn/unbound/trunk@2425 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-10 10:41:40 +00:00
Wouter Wijngaards a11fbf9ca0 - unbound-control has version number in the header,
UBCT[version]_space_ is the header sent by the client now.
- Unbound control port number is registered with IANA:
  ub-dns-control  8953/tcp    unbound dns nameserver control
  This is the new default for the control-port config setting.


git-svn-id: file:///svn/unbound/trunk@2424 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-06-10 10:11:38 +00:00
Wouter Wijngaards 30a339d1a8 updated ldns tarball.
git-svn-id: file:///svn/unbound/trunk@2423 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-30 12:09:05 +00:00
Wouter Wijngaards 92e1ec3444 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2422 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-30 12:04:31 +00:00
Wouter Wijngaards 62eea87455 - Fix Makefile for U in environment, since wrong U is more common than
deansification necessity.


git-svn-id: file:///svn/unbound/trunk@2421 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-30 11:52:14 +00:00
Wouter Wijngaards 30602d5d59 - defense in depth against the above bug, an error is printed to log
instead of an assertion failure.


git-svn-id: file:///svn/unbound/trunk@2420 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-25 11:32:05 +00:00
Wouter Wijngaards b23ed42b55 1.4.10 tag created.
git-svn-id: file:///svn/unbound/trunk@2419 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-25 06:09:01 +00:00
Wouter Wijngaards 784d659e91 - Fix TTL of SOA so negative TTL is separately cached from normal TTL.
git-svn-id: file:///svn/unbound/trunk@2416 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-10 12:34:47 +00:00
Wouter Wijngaards 4df60a1343 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2415 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-10 11:22:32 +00:00
Wouter Wijngaards ca38a8bd55 - feature, ignore-cd-flag: yesno to provide dnssec to legacy servers.
git-svn-id: file:///svn/unbound/trunk@2414 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-10 11:20:14 +00:00
Wouter Wijngaards 6e9d8fb22c - bug#386: --enable-allsymbols option links all binaries to libunbound
and reduces install size significantly.


git-svn-id: file:///svn/unbound/trunk@2413 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-05-10 10:57:42 +00:00
Wouter Wijngaards 35140bb612 - configure created with newer autoconf 2.66.
git-svn-id: file:///svn/unbound/trunk@2412 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-04-14 10:59:57 +00:00
Wouter Wijngaards de82245d3e - bug#378: Fix that configure checks for ldns_get_random presence.
git-svn-id: file:///svn/unbound/trunk@2411 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-04-12 07:01:18 +00:00
Wouter Wijngaards 3922eed584 val-override-date: -1 ignores dates entirely, for NTP usage.
git-svn-id: file:///svn/unbound/trunk@2410 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-04-08 14:06:46 +00:00
Wouter Wijngaards efb9c02d54 - iana portlist updated.
- queries with CD flag set cause DNSSEC validation, but the answer is
  not withheld if it is bogus.  Thus, unbound will retry if it is bad
  and curb the TTL if it is bad, thus protecting the cache for use by
  downstream validators.


git-svn-id: file:///svn/unbound/trunk@2409 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-04-08 13:58:41 +00:00
Wouter Wijngaards 04fa474ac3 fix test
git-svn-id: file:///svn/unbound/trunk@2408 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-29 10:38:59 +00:00
Wouter Wijngaards 3c87eb6c49 - harden-below-nxdomain: changed so that it activates when the
cached nxdomain is dnssec secure.  This avoids backwards
         incompatibility because those old servers do not have dnssec.


git-svn-id: file:///svn/unbound/trunk@2407 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-29 09:47:54 +00:00
Wouter Wijngaards fcc7f9dae0 trunk to 1.5.0
git-svn-id: file:///svn/unbound/trunk@2406 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-24 10:35:17 +00:00
Wouter Wijngaards 654a9160f5 iana portlist updated.
1.4.9 release.


git-svn-id: file:///svn/unbound/trunk@2404 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-24 10:08:43 +00:00
Wouter Wijngaards 682ad09bc4 -#370 new unbound.spec for CentOS 5.x from Harold Jones.
git-svn-id: file:///svn/unbound/trunk@2403 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-17 08:18:00 +00:00
Wouter Wijngaards ffb54322cb tag 1.4.9rc1 created. svn:NO TEST
git-svn-id: file:///svn/unbound/trunk@2402 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-14 09:38:42 +00:00
Wouter Wijngaards cc763c103b updated ldns tarball to 1.6.9rc1.
git-svn-id: file:///svn/unbound/trunk@2400 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-03 08:57:17 +00:00
Wouter Wijngaards 9053ee101d updated ldns tarball to 1.6.9.
git-svn-id: file:///svn/unbound/trunk@2399 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-01 13:06:38 +00:00
Wouter Wijngaards 0b0a580422 - give config parse error for multiple names on a stub or forward zone.
git-svn-id: file:///svn/unbound/trunk@2398 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-01 12:59:27 +00:00
Wouter Wijngaards b4a089ff0d - Fix no ADflag for NXDOMAIN in NSEC3 optout. And wildcard in optout.
git-svn-id: file:///svn/unbound/trunk@2397 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-03-01 12:48:45 +00:00
Wouter Wijngaards ee6f5c5b51 - bug #361: Fix, time.elapsed variable not reset with stats_noreset.
git-svn-id: file:///svn/unbound/trunk@2396 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-24 12:16:12 +00:00
Wouter Wijngaards c2299a3c5f version 3 for common.sh
git-svn-id: file:///svn/unbound/trunk@2395 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-23 15:17:49 +00:00
Wouter Wijngaards 255d669e58 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2394 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-23 10:27:53 +00:00
Wouter Wijngaards c07e17fda3 Compat with tpkg timing code.
git-svn-id: file:///svn/unbound/trunk@2393 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-23 09:56:13 +00:00
Wouter Wijngaards d8928e1b19 common.sh to version 2.
git-svn-id: file:///svn/unbound/trunk@2392 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-18 16:11:21 +00:00
Wouter Wijngaards 01dd4a3568 - Added explicit note on unbound-anchor usage:
Please note usage of unbound-anchor root anchor is at your own risk
  and under the terms of our LICENSE (see that file in the source).


git-svn-id: file:///svn/unbound/trunk@2391 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-15 12:58:37 +00:00
Wouter Wijngaards 1550bc65f3 use common functionality file.
git-svn-id: file:///svn/unbound/trunk@2390 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-11 12:30:42 +00:00
Wouter Wijngaards 4011c3861b iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2389 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-11 12:28:30 +00:00
Wouter Wijngaards 58c2cc2740 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2388 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-07 13:24:50 +00:00
Wouter Wijngaards 87296966ae - Added regression test for addition of a .net DS to the root, and
cache effects with different TTL for glue and DNSKEY.


git-svn-id: file:///svn/unbound/trunk@2387 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-02-07 12:07:46 +00:00
Wouter Wijngaards eed924d7be - Fix remove private address does not throw away entire response.
git-svn-id: file:///svn/unbound/trunk@2386 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-28 16:11:49 +00:00
Wouter Wijngaards 36d5a75848 Version bump.
git-svn-id: file:///svn/unbound/trunk@2385 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-24 14:59:33 +00:00
Wouter Wijngaards 5996f3b2a9 Note release point.
git-svn-id: file:///svn/unbound/trunk@2383 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-21 08:53:14 +00:00
Wouter Wijngaards 5e2a137562 fix bug 349
git-svn-id: file:///svn/unbound/trunk@2381 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-19 06:59:24 +00:00
Wouter Wijngaards 5a154aeb78 ldns tarball updated
git-svn-id: file:///svn/unbound/trunk@2380 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-18 08:35:20 +00:00
Wouter Wijngaards 5ecf75d623 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2379 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-17 14:49:09 +00:00
Matthijs Mekking 797ef20155 nicely outlined
git-svn-id: file:///svn/unbound/trunk@2378 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-17 13:59:07 +00:00
Wouter Wijngaards f7b911b120 - add get and set option for harden-below-nxdomain feature.
git-svn-id: file:///svn/unbound/trunk@2377 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-17 12:31:28 +00:00
Wouter Wijngaards 5feb72d1eb fix
git-svn-id: file:///svn/unbound/trunk@2376 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-14 15:58:05 +00:00
Wouter Wijngaards 22ac684cd9 and store bogus ttl (this is not picked out of the cache to send to, so saves work and avoids this target)
git-svn-id: file:///svn/unbound/trunk@2375 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-14 15:51:11 +00:00
Wouter Wijngaards e2dc829258 store if ttl expired
git-svn-id: file:///svn/unbound/trunk@2374 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-14 15:23:51 +00:00
Wouter Wijngaards f5a97a3e8f - Fix so a changed NS RRset does not get moved name stuck on old
server, for type NS the TTL is not increased.


git-svn-id: file:///svn/unbound/trunk@2373 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-14 13:56:25 +00:00
Wouter Wijngaards 790cb51775 - Fix prefetch so it does not get stuck on old server for moved names.
git-svn-id: file:///svn/unbound/trunk@2372 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-13 10:13:01 +00:00
Wouter Wijngaards eaee99fa3b doxygen compat with version 1.6.3, and splint compat.
git-svn-id: file:///svn/unbound/trunk@2371 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-12 09:17:59 +00:00
Wouter Wijngaards 583eabb13e iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2370 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-12 08:55:27 +00:00
Wouter Wijngaards 4a746142cf - Fix insecure CNAME sequence marked as secure, reported by Bert Hubert.
git-svn-id: file:///svn/unbound/trunk@2369 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-11 12:32:29 +00:00
Wouter Wijngaards 62230b5e04 more conservative timeout for a test that takes 20 seconds on older machines
git-svn-id: file:///svn/unbound/trunk@2368 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-10 16:13:17 +00:00
Wouter Wijngaards b25ebf0be2 Fix library exports and asynclook for lock debugging.
git-svn-id: file:///svn/unbound/trunk@2367 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-10 15:24:23 +00:00
Wouter Wijngaards 35c3a25896 - faster lruhash get_mem routine.
git-svn-id: file:///svn/unbound/trunk@2366 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-10 13:28:48 +00:00
Wouter Wijngaards 6457e97255 Fix compile failure using sun studio compiler, cast to correct type.
git-svn-id: file:///svn/unbound/trunk@2365 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-07 16:20:15 +00:00
Wouter Wijngaards 05e9f914c5 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2364 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-04 07:28:36 +00:00
Wouter Wijngaards 046143af20 Fix bug #346: itar is discontinued.
git-svn-id: file:///svn/unbound/trunk@2363 be551aaa-1e26-0410-a405-d3ace91eadb9
2011-01-04 06:53:57 +00:00
Wouter Wijngaards c71f33ead4 validation reporter minidaemon
git-svn-id: file:///svn/unbound/trunk@2362 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-24 09:15:49 +00:00
Wouter Wijngaards 0bc54677db - Fix in infra cache that could cause rto larger than TOP_TIMEOUT kept.
git-svn-id: file:///svn/unbound/trunk@2361 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-23 10:49:47 +00:00
Wouter Wijngaards 003658eea0 test and cleanup.
git-svn-id: file:///svn/unbound/trunk@2360 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-22 09:41:38 +00:00
Wouter Wijngaards 15b14306ed iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2359 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-21 14:43:29 +00:00
Wouter Wijngaards daab92e954 - algorithm compromise protection using the algorithms signalled in
the DS record.  Also, trust anchors, DLV, and RFC5011 receive this,
         and thus, if you have multiple algorithms in your trust-anchor-file
         then it will now behave different than before.  Also, 5011 rollover
         for algorithms needs to be double-signature until the old algorithm
         is revoked.


git-svn-id: file:///svn/unbound/trunk@2358 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-21 14:19:55 +00:00
Wouter Wijngaards f378068b32 please lint
git-svn-id: file:///svn/unbound/trunk@2357 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-20 16:08:52 +00:00
Wouter Wijngaards e9582487d9 Work on validation of multiple algorithms.
git-svn-id: file:///svn/unbound/trunk@2356 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-20 15:58:12 +00:00
Wouter Wijngaards c4c8a65ff2 - fix validation in this case: CNAME to nodata for co-hosted opt-in
NSEC3 insecure delegation, was bogus, fixed to be insecure.


git-svn-id: file:///svn/unbound/trunk@2355 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-17 10:05:56 +00:00
Wouter Wijngaards f8796f94f4 squelch 'tcp connect: bla' errors in logfile.
git-svn-id: file:///svn/unbound/trunk@2354 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-17 09:10:46 +00:00
Wouter Wijngaards ecb9db442d - Fix our 'BDS' license (typo reported by Xavier Belanger).
git-svn-id: file:///svn/unbound/trunk@2353 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-16 16:18:30 +00:00
Wouter Wijngaards bc7ac1981a Fix compile on WinXP.
git-svn-id: file:///svn/unbound/trunk@2352 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-15 14:44:04 +00:00
Wouter Wijngaards 57f309ab1d - iana portlist updated.
- review changes for unbound-anchor.


git-svn-id: file:///svn/unbound/trunk@2351 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-10 15:01:39 +00:00
Wouter Wijngaards dd8e44ac37 - feature typetransparent localzone, does not block other RR types.
git-svn-id: file:///svn/unbound/trunk@2350 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-02 12:39:33 +00:00
Wouter Wijngaards 9997255caa - Fix bug#338: print address when socket creation fails.
git-svn-id: file:///svn/unbound/trunk@2349 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-12-01 09:59:39 +00:00
Wouter Wijngaards 79f4ca6a28 Fix storage of noEDNS in the infra cache.
iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@2348 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-30 12:55:48 +00:00
Wouter Wijngaards 78cc3d8ae1 harden-below-nxdomain option taken from draft-vixie-dnsext-resimprove.
Default off (for now), as some older software that gives nxdomain for ENT
would be incompatible.  But that would only happen in the reverse tree, and
such software (nonDNSSEC) may go out of style, so in the future a default yes
could be possible.



git-svn-id: file:///svn/unbound/trunk@2347 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-18 08:49:15 +00:00
Wouter Wijngaards 5e62750fcd - make test output nicer.
git-svn-id: file:///svn/unbound/trunk@2346 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-17 15:50:52 +00:00
Wouter Wijngaards 289f13bc25 - implement draft-vixie-dnsext-resimprove-00, we stop on NXDOMAIN.
git-svn-id: file:///svn/unbound/trunk@2345 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-17 10:02:34 +00:00
Wouter Wijngaards 8c5b3d3c8f - so-sndbuf option for very busy servers, a bit like so-rcvbuf.
git-svn-id: file:///svn/unbound/trunk@2344 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 14:30:34 +00:00
Wouter Wijngaards e430e8cef8 errno filtering better: sendto and sendmsg filtered in the same way. Also
ENETDOWN and ENETUNREACH for tcp (already had EHOSTDOWN and EHOSTUNREACH).


git-svn-id: file:///svn/unbound/trunk@2343 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 14:00:20 +00:00
Wouter Wijngaards 95da05c4bc iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2342 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 13:16:09 +00:00
Wouter Wijngaards c9dbc9907a - silence 'tcp connect: broken pipe' at low verbosity.
git-svn-id: file:///svn/unbound/trunk@2341 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-15 13:15:23 +00:00
Wouter Wijngaards 6976832ffe unbound-anchor portable with openssl 0.9.7.
git-svn-id: file:///svn/unbound/trunk@2340 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-09 16:05:02 +00:00
Wouter Wijngaards 2fe65ab2b5 - Be lenient and accept imgw.pl malformed packet (like BIND).
git-svn-id: file:///svn/unbound/trunk@2339 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-08 18:32:55 +00:00
Wouter Wijngaards 4e8ae039fa move to version 1.4.8
git-svn-id: file:///svn/unbound/trunk@2338 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-08 13:22:54 +00:00
Wouter Wijngaards c140638659 Test DS and CNAME in cache.
git-svn-id: file:///svn/unbound/trunk@2336 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-05 15:45:53 +00:00
Wouter Wijngaards 0b30fca935 - do not synthesize a CNAME message from cache for qtype DS.
git-svn-id: file:///svn/unbound/trunk@2335 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-05 15:29:50 +00:00
Wouter Wijngaards f41a92daf5 detect nc version
git-svn-id: file:///svn/unbound/trunk@2334 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-04 15:20:11 +00:00
Wouter Wijngaards 93e8ff1bb0 Fix test to work on ubuntu.
git-svn-id: file:///svn/unbound/trunk@2333 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-04 15:16:13 +00:00
Wouter Wijngaards 04e45f98d6 nicer failure
git-svn-id: file:///svn/unbound/trunk@2332 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-04 12:35:39 +00:00
Wouter Wijngaards 08c580bb32 better fix
git-svn-id: file:///svn/unbound/trunk@2331 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-04 12:26:25 +00:00
Wouter Wijngaards d748bca7de use central entropy to seed threads.
git-svn-id: file:///svn/unbound/trunk@2330 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-04 11:38:23 +00:00
Wouter Wijngaards a3a1119f54 - Change the rtt used to probe EDNS-timeout hosts to 1000 msec.
git-svn-id: file:///svn/unbound/trunk@2329 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-03 09:06:49 +00:00
Wouter Wijngaards 74505ea3f2 Tested on win7.
git-svn-id: file:///svn/unbound/trunk@2328 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-02 12:38:15 +00:00
Wouter Wijngaards 98c4161631 code review.
git-svn-id: file:///svn/unbound/trunk@2327 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-02 10:03:18 +00:00
Wouter Wijngaards 4bc34509fa updated ldns tarball
git-svn-id: file:///svn/unbound/trunk@2325 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-01 15:00:35 +00:00
Wouter Wijngaards f625bfdd15 ldns tarball updated and build script for test updated.
git-svn-id: file:///svn/unbound/trunk@2324 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-01 12:37:30 +00:00
Wouter Wijngaards 93ffd44608 GOST code enabled by default (RFC 5933)
git-svn-id: file:///svn/unbound/trunk@2323 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-11-01 11:24:07 +00:00
Wouter Wijngaards fcf1157fa4 - Configure detects libev-4.00.
git-svn-id: file:///svn/unbound/trunk@2322 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-29 15:03:20 +00:00
Wouter Wijngaards 488aee467a - Fix validation failure for parent and child on same server with an
insecure childzone and a CNAME from parent to child.


git-svn-id: file:///svn/unbound/trunk@2321 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-29 13:10:26 +00:00
Wouter Wijngaards ba340cd07a - Fix uninit value in dump_infra print.
git-svn-id: file:///svn/unbound/trunk@2320 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-29 10:20:40 +00:00
Wouter Wijngaards 1eb0eea744 newer ldns for outofdir build
git-svn-id: file:///svn/unbound/trunk@2319 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 14:16:34 +00:00
Wouter Wijngaards 25ea68e730 allocfix
git-svn-id: file:///svn/unbound/trunk@2318 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 14:02:20 +00:00
Wouter Wijngaards 881245fa9d Fix compile in alloccheck case.
git-svn-id: file:///svn/unbound/trunk@2317 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 13:59:17 +00:00
Wouter Wijngaards d7a6b3f914 Fix.
git-svn-id: file:///svn/unbound/trunk@2316 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 12:23:23 +00:00
Wouter Wijngaards f794810a5f Remove warnings on NetBSD.
git-svn-id: file:///svn/unbound/trunk@2315 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 12:21:44 +00:00
Wouter Wijngaards 758a42643a nicer output from debug commands
git-svn-id: file:///svn/unbound/trunk@2314 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-27 08:09:22 +00:00
Wouter Wijngaards fdfa7b2793 subtract 1000 so it is more than the RTT_BAND
git-svn-id: file:///svn/unbound/trunk@2313 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 15:41:23 +00:00
Wouter Wijngaards a6b302f117 fix for top reuse
git-svn-id: file:///svn/unbound/trunk@2312 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 15:28:01 +00:00
Wouter Wijngaards 498cc8ab88 - Change of timeout code. No more lost and backoff in blockage.
At 12sec timeout (and at least 2x lost before) one probe per IP
  is allowed only.  At 120sec, the IP is blocked.  After 15min, a
  120sec entry has a single retry packet.


git-svn-id: file:///svn/unbound/trunk@2311 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 15:02:08 +00:00
Wouter Wijngaards a032ac2f61 neater API for unbound-control lookup.
git-svn-id: file:///svn/unbound/trunk@2310 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 13:43:28 +00:00
Wouter Wijngaards a72fe210ca remove lost and backoff values.
git-svn-id: file:///svn/unbound/trunk@2309 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 13:30:37 +00:00
Wouter Wijngaards 573ce5a4de - no timeout backoff if meanwhile a query succeeded.
git-svn-id: file:///svn/unbound/trunk@2308 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 12:15:00 +00:00
Wouter Wijngaards 4dca799fbf tarball contains ldns 1.6.7rc1
git-svn-id: file:///svn/unbound/trunk@2307 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 09:59:20 +00:00
Wouter Wijngaards f2ae3e8167 dump_infra and flush_infra commands for unbound-control.
git-svn-id: file:///svn/unbound/trunk@2306 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-26 09:08:33 +00:00
Wouter Wijngaards d0f2287d44 + - Configure errors if ldns is not found.
git-svn-id: file:///svn/unbound/trunk@2305 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-25 07:44:33 +00:00
Wouter Wijngaards 5533861c28 - Windows 7 fix for installer.
git-svn-id: file:///svn/unbound/trunk@2304 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-22 07:34:28 +00:00
Wouter Wijngaards 2bdb094f7b - Fix bug where fallback_tcp causes wrong roundtrip and edns
observation to be noted in cache.  Fix bug where EDNSprobe halted
  exponential backoff if EDNS status unknown.
- new unresponsive host method, exponentially increasing block backoff.
- iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@2303 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-21 15:11:39 +00:00
Wouter Wijngaards 25a2e1da5a lint
git-svn-id: file:///svn/unbound/trunk@2302 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-20 10:14:12 +00:00
Wouter Wijngaards ea85e23516 Jostle time used to estimate roundtrip.
git-svn-id: file:///svn/unbound/trunk@2301 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-20 08:19:05 +00:00
Wouter Wijngaards c5fe4a8bf3 Enable interface-automatic for people for whom it works.
git-svn-id: file:///svn/unbound/trunk@2300 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-20 05:36:00 +00:00
Wouter Wijngaards 2e9fa86c76 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2299 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-19 15:21:01 +00:00
Wouter Wijngaards e238b47b0a Fix for request list growth.
git-svn-id: file:///svn/unbound/trunk@2298 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-19 14:53:29 +00:00
Wouter Wijngaards 8cf752e577 Uses curl to check if the icann cert file has been updated on the website.
git-svn-id: file:///svn/unbound/trunk@2297 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-18 13:25:30 +00:00
Wouter Wijngaards 2645b3e634 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2296 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-18 08:45:46 +00:00
Wouter Wijngaards e5e0a1c857 Fix compile warning on mingw.
git-svn-id: file:///svn/unbound/trunk@2295 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-15 09:43:54 +00:00
Wouter Wijngaards b20f11c6a7 Root key option in the unbound windows installer works.
git-svn-id: file:///svn/unbound/trunk@2294 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-15 09:31:58 +00:00
Wouter Wijngaards 614cbb3e92 fixup install scripts with root option.
git-svn-id: file:///svn/unbound/trunk@2293 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 15:34:53 +00:00
Wouter Wijngaards a0b58301ca unbound-anchor works on vista.
git-svn-id: file:///svn/unbound/trunk@2292 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 14:55:38 +00:00
Wouter Wijngaards 9fb312ec32 Fix, unit test and testbound work on windows Vista.
git-svn-id: file:///svn/unbound/trunk@2291 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 13:20:10 +00:00
Wouter Wijngaards c60c5d188e less verbose on output.
git-svn-id: file:///svn/unbound/trunk@2290 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 09:18:20 +00:00
Wouter Wijngaards 39bbb1c9e9 fix
git-svn-id: file:///svn/unbound/trunk@2289 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 09:12:26 +00:00
Wouter Wijngaards abe1057c41 remove compile warning on Ubuntu
git-svn-id: file:///svn/unbound/trunk@2288 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 08:13:33 +00:00
Wouter Wijngaards 32a9e3a225 autconf-ed
git-svn-id: file:///svn/unbound/trunk@2287 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-14 07:07:02 +00:00
Wouter Wijngaards e922bf901a configure fix for WinXP ldns detection.
git-svn-id: file:///svn/unbound/trunk@2286 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 16:33:40 +00:00
Wouter Wijngaards 66b2b90f43 install script update
git-svn-id: file:///svn/unbound/trunk@2285 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 14:06:31 +00:00
Wouter Wijngaards a26f3d70dc rootkey file to windows port
git-svn-id: file:///svn/unbound/trunk@2284 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 13:32:55 +00:00
Wouter Wijngaards 2584075a94 windows crosscompile expat option for static expat library.
git-svn-id: file:///svn/unbound/trunk@2283 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 13:02:09 +00:00
Wouter Wijngaards 68103c0ffb windows crosscompile port
git-svn-id: file:///svn/unbound/trunk@2282 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 12:22:46 +00:00
Wouter Wijngaards 5d2ef1f925 - unbound-anchor handles ADDPEND keystate.
git-svn-id: file:///svn/unbound/trunk@2281 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 12:04:37 +00:00
Wouter Wijngaards 1b773f682f - Fix TCP so it uses a random outgoing-interface.
git-svn-id: file:///svn/unbound/trunk@2280 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 08:52:29 +00:00
Wouter Wijngaards bc54fa3e58 addr_is_any
git-svn-id: file:///svn/unbound/trunk@2279 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-13 07:59:55 +00:00
Wouter Wijngaards b3254d663b nicer usage for unbound-anchor
git-svn-id: file:///svn/unbound/trunk@2278 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-12 12:46:39 +00:00
Wouter Wijngaards cf72b1a55d ldns tarball updated.
git-svn-id: file:///svn/unbound/trunk@2277 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-11 13:07:44 +00:00
Wouter Wijngaards 64fba64826 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2276 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-11 12:30:57 +00:00
Wouter Wijngaards 46345c0809 - Fix bug when DLV below a trust-anchor that uses NSEC3 optout where
the zone has a secure delegation hosted on the same server did not
         verify as secure (it was insecure by mistake).


git-svn-id: file:///svn/unbound/trunk@2275 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-11 12:21:19 +00:00
Wouter Wijngaards 236d4cea25 Fix out-of-order XML element parse, zone name check and newline filter for unbound-anchor XML parse.
git-svn-id: file:///svn/unbound/trunk@2274 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 15:01:49 +00:00
Wouter Wijngaards cb978ff7be test update and nicer text output for unbound-anchor
git-svn-id: file:///svn/unbound/trunk@2273 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 13:55:16 +00:00
Wouter Wijngaards 00ae321bf4 fix test
git-svn-id: file:///svn/unbound/trunk@2272 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 12:26:20 +00:00
Wouter Wijngaards f3a4dad2c8 no override time, works on Minix and not needed for the tpkg.
git-svn-id: file:///svn/unbound/trunk@2271 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 12:14:05 +00:00
Wouter Wijngaards a2e4d07a4b - Fix alloc_reg_release for longer uptime in out of memory conditions.
git-svn-id: file:///svn/unbound/trunk@2270 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 12:04:12 +00:00
Wouter Wijngaards fb4a5492da list builtin.
git-svn-id: file:///svn/unbound/trunk@2269 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 11:47:53 +00:00
Wouter Wijngaards b3e4186cf2 Test for unbound-anchor.
git-svn-id: file:///svn/unbound/trunk@2268 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-10-01 11:31:35 +00:00
Wouter Wijngaards 45ef5b2ad6 print cert error on failure
git-svn-id: file:///svn/unbound/trunk@2267 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-30 12:31:22 +00:00
Wouter Wijngaards cbe4354928 Fix for zeroes in data.
git-svn-id: file:///svn/unbound/trunk@2266 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-29 16:11:14 +00:00
Wouter Wijngaards 57b3409e2a strptime check for OSX.
git-svn-id: file:///svn/unbound/trunk@2265 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-29 08:31:31 +00:00
Wouter Wijngaards 322b68dbf4 Parse error does not go to insecure.
git-svn-id: file:///svn/unbound/trunk@2264 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-29 08:24:30 +00:00
Wouter Wijngaards c9d34cdecf better explanation tekst
git-svn-id: file:///svn/unbound/trunk@2263 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-29 07:47:42 +00:00
Wouter Wijngaards 67897d9c0d strptime compat in configure (for Minix).
git-svn-id: file:///svn/unbound/trunk@2262 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 14:58:35 +00:00
Wouter Wijngaards 560e1d7e8a NSD strptime compat, BSD licensed, for unbound-anchor which uses it.
git-svn-id: file:///svn/unbound/trunk@2261 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 14:21:20 +00:00
Wouter Wijngaards 05c403f805 Updated net check.
git-svn-id: file:///svn/unbound/trunk@2260 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 12:51:05 +00:00
Wouter Wijngaards b7f7a772fb unbound-anchor work, -P option and test tpkg.
git-svn-id: file:///svn/unbound/trunk@2259 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 12:30:38 +00:00
Wouter Wijngaards e9d7301b0a unbound-anchor port to Solaris
git-svn-id: file:///svn/unbound/trunk@2258 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 12:29:47 +00:00
Wouter Wijngaards eb696dc385 configure options for unbound-anchor files
git-svn-id: file:///svn/unbound/trunk@2257 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 10:27:49 +00:00
Wouter Wijngaards f64d9d0e43 Build documentation in the file.
git-svn-id: file:///svn/unbound/trunk@2256 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 09:46:08 +00:00
Wouter Wijngaards 741e28309e nicer docs
git-svn-id: file:///svn/unbound/trunk@2255 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 09:39:36 +00:00
Wouter Wijngaards 7e315dafcf unbound-anchor: no pem updates, do not download .pem file (no stable url),
and date nicer to maintain in code.


git-svn-id: file:///svn/unbound/trunk@2254 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-28 09:22:22 +00:00
Wouter Wijngaards 61be6bc238 fix
git-svn-id: file:///svn/unbound/trunk@2253 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 17:40:49 +00:00
Wouter Wijngaards cf7ececb83 unbound-anchor checks dates
git-svn-id: file:///svn/unbound/trunk@2252 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 15:56:46 +00:00
Wouter Wijngaards c007b34cc1 unbound-anchor work
git-svn-id: file:///svn/unbound/trunk@2251 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 14:54:22 +00:00
Wouter Wijngaards 224d547178 Documentation doxygen warnings removed.
git-svn-id: file:///svn/unbound/trunk@2250 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 11:54:11 +00:00
Wouter Wijngaards a29d966678 Exit code can do manual check output.
git-svn-id: file:///svn/unbound/trunk@2249 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 09:50:10 +00:00
Wouter Wijngaards 023c2b7dd9 manual page
git-svn-id: file:///svn/unbound/trunk@2248 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-27 09:31:53 +00:00
Wouter Wijngaards dcb871a755 unbound-anchor work
git-svn-id: file:///svn/unbound/trunk@2247 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-24 17:33:49 +00:00
Wouter Wijngaards 6f0a64d3a2 fix typo in libexpat detect and echo
git-svn-id: file:///svn/unbound/trunk@2246 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-24 15:06:15 +00:00
Wouter Wijngaards eb3114596c unbound-anchor work
git-svn-id: file:///svn/unbound/trunk@2245 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-24 14:02:27 +00:00
Wouter Wijngaards 9f44640fa7 - bug#329: in example.conf show correct ipv4 link-local 169.254/16.
git-svn-id: file:///svn/unbound/trunk@2244 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-24 07:04:37 +00:00
Wouter Wijngaards 8ef0b0ff30 unbound-anchor work
git-svn-id: file:///svn/unbound/trunk@2243 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-23 15:28:08 +00:00
Wouter Wijngaards 1c2a8d977c unbound-anchor work
git-svn-id: file:///svn/unbound/trunk@2242 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-23 13:51:29 +00:00
Wouter Wijngaards 1797024a4e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2241 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-22 07:01:20 +00:00
Wouter Wijngaards d75bca38f9 - compliance with draft-ietf-dnsop-default-local-zones-14, removed
reverse ipv6 orchid prefix from builtin list.


git-svn-id: file:///svn/unbound/trunk@2240 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-22 06:53:32 +00:00
Wouter Wijngaards 18523f7620 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2239 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-17 12:43:49 +00:00
Wouter Wijngaards e399b79baa - DLV has downgrade protection again, because the RFC says so.
git-svn-id: file:///svn/unbound/trunk@2238 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-17 08:54:16 +00:00
Wouter Wijngaards aac3c03f72 - Fix reported validation error in out of memory condition.
git-svn-id: file:///svn/unbound/trunk@2237 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-16 13:57:22 +00:00
Wouter Wijngaards 3b8cc374e7 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2236 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-16 13:47:51 +00:00
Wouter Wijngaards 8b274b92aa - Algorithm rollover operational reality intrudes, for trust-anchor,
5011-store, and DLV-anchor if one key matches it's good enough.


git-svn-id: file:///svn/unbound/trunk@2235 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-16 13:40:26 +00:00
Wouter Wijngaards 6b69130f36 neater make test output
git-svn-id: file:///svn/unbound/trunk@2234 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-15 07:15:30 +00:00
Wouter Wijngaards c3f180eebb - Abide RFC5155 section 9.2: no AD flag for replies with NSEC3 optout.
git-svn-id: file:///svn/unbound/trunk@2233 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-15 07:08:09 +00:00
Wouter Wijngaards bf3c0e07d6 comment for iana portlist update
git-svn-id: file:///svn/unbound/trunk@2232 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-14 09:31:20 +00:00
Wouter Wijngaards 67eb2bbc32 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2231 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-14 09:20:48 +00:00
Wouter Wijngaards cf19a76bf6 Test that AD flags and NSEC3 optout does what we say.
git-svn-id: file:///svn/unbound/trunk@2230 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-14 09:11:19 +00:00
Wouter Wijngaards 2a6a51c465 - increased mesh-max-activation from 1000 to 3000 for crazy domains
like _tcp.slb.com with 262 servers.


git-svn-id: file:///svn/unbound/trunk@2229 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-14 08:27:23 +00:00
Wouter Wijngaards 95db04a64c - bug#327: Fix for cannot access stub zones until the root is primed.
git-svn-id: file:///svn/unbound/trunk@2228 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-13 09:25:52 +00:00
Wouter Wijngaards f26b55ea7e fixup yesterdays fix
git-svn-id: file:///svn/unbound/trunk@2227 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-10 11:16:12 +00:00
Wouter Wijngaards 01c1bd13db iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2226 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-09 15:07:47 +00:00
Wouter Wijngaards 8ec31ebbcc - unresponsive servers are not completely blacklisted (because of
firewalls), but also not probed all the time (because of the request
            list size it generates).  The probe rate is 1%.


git-svn-id: file:///svn/unbound/trunk@2225 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-09-09 14:56:51 +00:00
Wouter Wijngaards 723a54f948 more send_packet removal
git-svn-id: file:///svn/unbound/trunk@2224 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-20 13:56:44 +00:00
Wouter Wijngaards 599aec4a23 more send_packet defs removed
git-svn-id: file:///svn/unbound/trunk@2223 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-20 13:37:19 +00:00
Wouter Wijngaards 9d66b48885 - openbsd-lint fixes: acl_list_get_mem used if debug-alloc enabled.
iterator get_mem includes priv_get_mem.  delegpt nodup removed.
  listen_pushback, query_info_allocqname, write_socket, send_packet,
  comm_point_set_cb_arg and listen_resume removed.


git-svn-id: file:///svn/unbound/trunk@2222 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-20 13:30:41 +00:00
Wouter Wijngaards 38c435e0c2 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2221 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-19 19:34:43 +00:00
Wouter Wijngaards 7b406bc70a - example.conf notes how to do DNSSEC validation and track the root.
git-svn-id: file:///svn/unbound/trunk@2220 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-19 19:16:03 +00:00
Wouter Wijngaards 89845bca03 - Fix bug#321: resolution of rs.ripe.net artifacts with 0x20.
Delegpt structures checked for duplicates always.
         No more nameserver lookups generated when depth is full anyway.


git-svn-id: file:///svn/unbound/trunk@2219 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-19 13:00:21 +00:00
Wouter Wijngaards 78216e8d02 patch for Gunter bug321
git-svn-id: file:///svn/unbound/trunk@2218 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-18 16:53:56 +00:00
Wouter Wijngaards 118c2c60d8 better readme svn:NO TEST
git-svn-id: file:///svn/unbound/trunk@2217 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-18 10:46:28 +00:00
Wouter Wijngaards 179ec8ad20 Fix bug #322.
git-svn-id: file:///svn/unbound/trunk@2216 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-18 10:44:27 +00:00
Wouter Wijngaards 89f459c8a1 README for new test setup and testbound selftest.
git-svn-id: file:///svn/unbound/trunk@2215 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-16 13:30:37 +00:00
Wouter Wijngaards a34fe6ea8a - make test more portable (make longtest needs special support programs,
ldns, wdiff, dig, port-numbers).
  - moved not-always-portable testbound scripts to names .crpl.



git-svn-id: file:///svn/unbound/trunk@2214 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-16 12:59:37 +00:00
Wouter Wijngaards 6021182b64 - Fix acx_nlnetlabs.m4 configure output for autoconf-2.66 AS_TR_CPP
changes, uses m4_bpatsubst now.


git-svn-id: file:///svn/unbound/trunk@2213 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-16 08:59:14 +00:00
Wouter Wijngaards e0a0eafef0 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2212 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-13 09:12:02 +00:00
Wouter Wijngaards 40f8fe2815 add and fix doxygen comments for doxygen-1.7.1. (which reports lots of
spurious items as well, by the way).


git-svn-id: file:///svn/unbound/trunk@2211 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-13 08:41:49 +00:00
Wouter Wijngaards 71cab42c9b More pleasant remote control command name parsing.
git-svn-id: file:///svn/unbound/trunk@2210 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-13 08:14:14 +00:00
Wouter Wijngaards 2e149c4ced Fix name of rrset printed that fails validation.
git-svn-id: file:///svn/unbound/trunk@2209 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-09 11:58:57 +00:00
Wouter Wijngaards b701d70147 - Return NXDOMAIN after chain of CNAMEs ends at name-not-found.
git-svn-id: file:///svn/unbound/trunk@2208 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-05 14:31:52 +00:00
Wouter Wijngaards 7963430481 turn of valgrind debug
git-svn-id: file:///svn/unbound/trunk@2207 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-04 19:02:25 +00:00
Wouter Wijngaards ca36fd0110 please lint.
git-svn-id: file:///svn/unbound/trunk@2206 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-04 08:43:38 +00:00
Wouter Wijngaards 4c4671a63f - Fix validation in case a trust anchor enters into a zone with
unsupported algorithms.


git-svn-id: file:///svn/unbound/trunk@2205 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-04 08:36:27 +00:00
Wouter Wijngaards 0db4fd57a7 - release tag 1.4.6.
- trunk becomes 1.4.7 develop.
       - iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@2204 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-03 12:30:45 +00:00
Wouter Wijngaards f54f117885 ldns tarball updated.
git-svn-id: file:///svn/unbound/trunk@2202 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-08-03 11:11:45 +00:00
Wouter Wijngaards 21477ad68a more error details on failed remote control connection.
git-svn-id: file:///svn/unbound/trunk@2201 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-22 11:50:28 +00:00
Wouter Wijngaards dccbb4e518 fix rlimit adjustments.
git-svn-id: file:///svn/unbound/trunk@2199 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-15 13:08:45 +00:00
Wouter Wijngaards 45f74a1497 - Fix integer underflow in prefetch ttl creation from cache. This
fixes a potential negative prefetch ttl.
-This line, and those below, will be ignored--

M    trunk/services/cache/dns.c
M    trunk/doc/Changelog


git-svn-id: file:///svn/unbound/trunk@2198 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-14 11:13:30 +00:00
Wouter Wijngaards f10b2c0b33 New text
git-svn-id: file:///svn/unbound/trunk@2197 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-14 08:38:07 +00:00
Wouter Wijngaards 1aa6413b32 donation text.
git-svn-id: file:///svn/unbound/trunk@2196 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-14 07:41:39 +00:00
Wouter Wijngaards d437ccb141 putenv more portable
git-svn-id: file:///svn/unbound/trunk@2195 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-13 14:05:06 +00:00
Wouter Wijngaards 3070cf38f0 compat for shell code.
git-svn-id: file:///svn/unbound/trunk@2194 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-13 09:10:53 +00:00
Wouter Wijngaards d2f9be56a5 portability lint
git-svn-id: file:///svn/unbound/trunk@2193 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-13 08:02:02 +00:00
Wouter Wijngaards 317f97fe8e Not enough file descriptors is not fatal, it gets adjusted and warned.
git-svn-id: file:///svn/unbound/trunk@2192 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-13 07:29:01 +00:00
Wouter Wijngaards 67c16277ee - Changed the defaults for num-queries-per-thread/outgoing-range.
For builtin-select: 512/960, for libevent 1024/4096 and for
         windows 24/48 (because of win api).  This makes the ratio this way
         to improve resilience under heavy load.  For high performance, use
         libevent and possibly higher numbers.


git-svn-id: file:///svn/unbound/trunk@2191 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-12 13:59:39 +00:00
Wouter Wijngaards 0066333685 - GOST enabled if SSL is recent and ldns has GOST enabled too.
- ldns tarball updated.


git-svn-id: file:///svn/unbound/trunk@2190 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-10 08:13:19 +00:00
Wouter Wijngaards 6df29c32e4 - iana portlist updated.
- Fix validation of qtype DNSKEY when a key-cache entry exists but
  no rr-cache entry is used (it expired or prefetch), it then goes
  back up to the DS or trust-anchor to validate the DNSKEY.


git-svn-id: file:///svn/unbound/trunk@2189 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-09 15:00:35 +00:00
Wouter Wijngaards f042f0dd5d - Neat function prototypes, unshadowed local declarations.
git-svn-id: file:///svn/unbound/trunk@2188 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-07 13:13:36 +00:00
Wouter Wijngaards 391e1912de ldns tarball updated.
git-svn-id: file:///svn/unbound/trunk@2187 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 11:03:56 +00:00
Wouter Wijngaards 3c79358ff7 testbound uses UTC timezone.
git-svn-id: file:///svn/unbound/trunk@2186 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 10:44:03 +00:00
Wouter Wijngaards 7d9caee481 timezone fixed at UTC
git-svn-id: file:///svn/unbound/trunk@2185 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 10:18:24 +00:00
Wouter Wijngaards c188d259d6 testbound sets timezone for test
git-svn-id: file:///svn/unbound/trunk@2184 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 10:12:43 +00:00
Wouter Wijngaards d332a19aa0 easier tube fallback
git-svn-id: file:///svn/unbound/trunk@2183 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 09:20:12 +00:00
Wouter Wijngaards bfc0ddd0e0 Failure to chown pidfile is not fatal any more.
git-svn-id: file:///svn/unbound/trunk@2182 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-06 09:10:12 +00:00
Wouter Wijngaards 13a1ed01fd tube replacement socketpair
git-svn-id: file:///svn/unbound/trunk@2181 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 15:55:35 +00:00
Wouter Wijngaards 4e8095062b tube compat
git-svn-id: file:///svn/unbound/trunk@2180 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 15:49:49 +00:00
Wouter Wijngaards fe6b110393 detect socketpair
git-svn-id: file:///svn/unbound/trunk@2179 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 14:32:37 +00:00
Wouter Wijngaards 9633600fff and autoconf
git-svn-id: file:///svn/unbound/trunk@2178 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 14:29:45 +00:00
Wouter Wijngaards 2e24678204 * Check for setrlimit separate from getrlimit.
* include sys/time.h for struct timeval definition
* cast for printf, on Minix.


git-svn-id: file:///svn/unbound/trunk@2177 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 14:20:24 +00:00
Wouter Wijngaards a71d4eab36 - wdiff is not actually required by make test, updated requirements.
git-svn-id: file:///svn/unbound/trunk@2176 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 13:34:01 +00:00
Wouter Wijngaards 885cde085a - added feature to print configure date, target and options with -h.
- added feature to print event backend system details with -h.


git-svn-id: file:///svn/unbound/trunk@2175 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 13:10:49 +00:00
Wouter Wijngaards 654d66d6a7 - log if a server is skipped because it is on the donotquery list,
at verbosity 4, to enable diagnosis why no queries to 127.0.0.1.


git-svn-id: file:///svn/unbound/trunk@2174 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-05 07:45:20 +00:00
Wouter Wijngaards 56b100a692 newer acx_nlnetlabs m4
git-svn-id: file:///svn/unbound/trunk@2173 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-02 10:02:00 +00:00
Wouter Wijngaards 518504ff5c Fix 4035 compliance for algorithms from the DS rrset that MUST sign the DNSKEY.
git-svn-id: file:///svn/unbound/trunk@2172 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-01 12:08:48 +00:00
Wouter Wijngaards 6351307ab4 - Fix the max number of reply-address count
git-svn-id: file:///svn/unbound/trunk@2171 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-28 12:50:04 +00:00
Wouter Wijngaards 0a848d686c - Fix jostle list bug found by Vince (luoce@cnnic), it caused the qps
in overload situations to be about 5 qps for the class of shortly
  serviced queries.
  The capacity of the resolver is then about (numqueriesperthread / 2)
  / (average time for such long queries) qps for long queries.
  And about (numqueriesperthread / 2)/(jostletimeout in whole seconds)
  qps for short queries, per thread.


git-svn-id: file:///svn/unbound/trunk@2170 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-28 11:42:21 +00:00
Wouter Wijngaards 595eab57de - unbound.h has extern "C" statement for easier include in c++.
git-svn-id: file:///svn/unbound/trunk@2169 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-25 13:23:03 +00:00
Wouter Wijngaards 14f178e486 Fix for lame reply corner case.
git-svn-id: file:///svn/unbound/trunk@2168 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-25 08:32:51 +00:00
Wouter Wijngaards 60035e31a2 test to make sure unbound deals with capitals in signer name like bind does
git-svn-id: file:///svn/unbound/trunk@2167 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-24 07:06:17 +00:00
Wouter Wijngaards 3088075574 -wssl feature for makedist.
git-svn-id: file:///svn/unbound/trunk@2166 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-23 14:01:05 +00:00
Wouter Wijngaards e76cd88470 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2165 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-23 08:05:41 +00:00
Wouter Wijngaards 5c0fe2154f Fix for clean SSL exit.
git-svn-id: file:///svn/unbound/trunk@2164 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-23 07:46:46 +00:00
Wouter Wijngaards 76280e3b7e #if is the right thing
git-svn-id: file:///svn/unbound/trunk@2163 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-23 07:15:43 +00:00
Wouter Wijngaards 907ee56090 better ifdef
git-svn-id: file:///svn/unbound/trunk@2162 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-22 14:32:08 +00:00
Wouter Wijngaards 4ed18b1108 Fix to unload gost dynamic library module for leak test.
git-svn-id: file:///svn/unbound/trunk@2161 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-22 12:27:19 +00:00
Wouter Wijngaards afc09709ad libev vs libevent printout.
git-svn-id: file:///svn/unbound/trunk@2160 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-22 07:57:52 +00:00
Wouter Wijngaards c1128af87e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2159 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-18 07:29:36 +00:00
Wouter Wijngaards 6325974a0b root hints from ftp.internic.net.
git-svn-id: file:///svn/unbound/trunk@2158 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-18 07:18:22 +00:00
Wouter Wijngaards d1a68958a9 - Add AAAA to root hints for I.ROOT-SERVERS.NET.
git-svn-id: file:///svn/unbound/trunk@2157 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-17 19:17:09 +00:00
Wouter Wijngaards 9d406d199f updated ldns tarball
git-svn-id: file:///svn/unbound/trunk@2156 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-16 15:26:30 +00:00
Wouter Wijngaards ecbeaed66c - Fix assertion failure reported by Kai Storbeck from XS4ALL, the
assertion was wrong.


git-svn-id: file:///svn/unbound/trunk@2155 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-16 15:05:22 +00:00
Wouter Wijngaards 1601f2fd6f - Fix assertion failure reported by Kai Storbeck from XS4ALL, the
assertion was wrong.


git-svn-id: file:///svn/unbound/trunk@2154 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-16 15:05:11 +00:00
Wouter Wijngaards f98a1e2d32 Added documentation for the histogram printout to syslog.
git-svn-id: file:///svn/unbound/trunk@2153 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 11:35:27 +00:00
Wouter Wijngaards cb3b649707 - Max referral count from 30 to 130, because 128 one character domains
is valid DNS.


git-svn-id: file:///svn/unbound/trunk@2152 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 10:50:20 +00:00
Wouter Wijngaards 75c811cc35 - makedist crosscompile to windows uses builtin ldns not host ldns.
git-svn-id: file:///svn/unbound/trunk@2151 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 09:57:34 +00:00
Wouter Wijngaards d7fec82eaa - Fix to use one pointer less for iterator query state store_parent_NS.
git-svn-id: file:///svn/unbound/trunk@2150 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 09:47:11 +00:00
Wouter Wijngaards 6070d61076 - Fix TCPreply on systems with no writev, if just 1 byte could be sent.
git-svn-id: file:///svn/unbound/trunk@2149 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 09:40:36 +00:00
Wouter Wijngaards 96df860673 version 1.4.6 in trunk.
git-svn-id: file:///svn/unbound/trunk@2148 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 07:45:55 +00:00
Wouter Wijngaards 2eaed3573b tag 1.4.5 created
git-svn-id: file:///svn/unbound/trunk@2147 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-15 07:16:50 +00:00
Wouter Wijngaards b014aac438 fix
git-svn-id: file:///svn/unbound/trunk@2146 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-11 14:24:25 +00:00
Wouter Wijngaards 1f0f85b59a - When retry to parent the retrycount is not wiped, so failed
nameservers are not tried again.
       - iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@2145 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-11 14:09:56 +00:00
Wouter Wijngaards b9603c178a - Fix bug where a long loop could be entered, now cycle detection
has a loop-counter and maximum search amount.


git-svn-id: file:///svn/unbound/trunk@2144 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-10 14:10:17 +00:00
Wouter Wijngaards 780de8fd15 changelog entry. (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@2143 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-04 07:16:14 +00:00
Wouter Wijngaards 6575585b07 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2141 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-04 06:47:32 +00:00
Wouter Wijngaards 4df876c700 updated ldns tarball (with its review fixes).
git-svn-id: file:///svn/unbound/trunk@2140 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-04 06:35:27 +00:00
Wouter Wijngaards 1f9172697c more last resort lookup options.
git-svn-id: file:///svn/unbound/trunk@2139 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-03 15:06:50 +00:00
Wouter Wijngaards b65fa84ea5 review fixes.
git-svn-id: file:///svn/unbound/trunk@2138 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-03 13:38:09 +00:00
Wouter Wijngaards 4a38afe99b ldns tarball updated
git-svn-id: file:///svn/unbound/trunk@2137 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-03 12:51:16 +00:00
Wouter Wijngaards 66b70b945b more more testcases
git-svn-id: file:///svn/unbound/trunk@2136 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-03 10:07:58 +00:00
Matthijs Mekking dc84dc08c0 for better readability (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@2135 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-03 09:19:45 +00:00
Wouter Wijngaards 4987cb525c ctime_r not needed for unbound-host itself (in libunbound already)
git-svn-id: file:///svn/unbound/trunk@2134 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-02 08:59:11 +00:00
Wouter Wijngaards 165e6710e5 ctime_r not needed for unbound-host itself (in libunbound already)
git-svn-id: file:///svn/unbound/trunk@2133 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-02 08:52:56 +00:00
Wouter Wijngaards 1e8551e1ce windows thread library check
git-svn-id: file:///svn/unbound/trunk@2132 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-02 08:43:29 +00:00
Wouter Wijngaards dd89196f9b GOST disabled-by-default, also ldns tarball update with same change.
git-svn-id: file:///svn/unbound/trunk@2131 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-02 08:18:55 +00:00
Wouter Wijngaards 8d71f58837 - Fix compile warning if compiled without threads.
- updated ldns-tarball with current ldns svn (pre 1.6.5).


git-svn-id: file:///svn/unbound/trunk@2130 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-02 07:36:11 +00:00
Wouter Wijngaards 567e3933bc splint flags for linux and bsd.
git-svn-id: file:///svn/unbound/trunk@2129 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-01 13:55:22 +00:00
Wouter Wijngaards d57466c316 Autoconf 2.65
git-svn-id: file:///svn/unbound/trunk@2128 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-01 13:47:11 +00:00
Wouter Wijngaards ba4ff40d9d - Fix storage of negative parent glue if that last resort fails.
git-svn-id: file:///svn/unbound/trunk@2127 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-01 09:33:25 +00:00
Wouter Wijngaards 1bd8583d3f Force off bit Z.
git-svn-id: file:///svn/unbound/trunk@2126 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-06-01 06:48:15 +00:00
Wouter Wijngaards 8360afa15f - fix parentside from cache to be marked dispreferred for bad names.
git-svn-id: file:///svn/unbound/trunk@2125 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 14:39:45 +00:00
Wouter Wijngaards da9ddfe2d1 unbound-control-setup more secure on multiuser system.
git-svn-id: file:///svn/unbound/trunk@2124 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 14:11:51 +00:00
Wouter Wijngaards d9e6fd3bac - fix parentside and querytargets modulestate, for dump_requestlist.
git-svn-id: file:///svn/unbound/trunk@2123 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 14:01:32 +00:00
Wouter Wijngaards 153fd4a7f6 - parentside names are dispreferred but not said to be dnssec-lame.
- parentside check for cached newname glue.


git-svn-id: file:///svn/unbound/trunk@2122 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 13:03:58 +00:00
Wouter Wijngaards 66b24c3cb2 fix to run longer in out of memory conditions
git-svn-id: file:///svn/unbound/trunk@2121 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 12:46:24 +00:00
Wouter Wijngaards 6ef058f9b0 - Fix AD flag handling, it could in some cases mistakenly copy the AD
flag from upstream servers.


git-svn-id: file:///svn/unbound/trunk@2120 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-31 07:36:01 +00:00
Wouter Wijngaards 6d77834955 parent-child misconfigured data lookup.
git-svn-id: file:///svn/unbound/trunk@2119 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-28 14:15:29 +00:00
Wouter Wijngaards 233fb4466e iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2118 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-28 13:00:42 +00:00
Wouter Wijngaards e495a41bc1 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2117 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-28 13:00:19 +00:00
Wouter Wijngaards 1c49e9ac97 - Contribution from Migiel de Vos (Surfnet): nagios patch for
unbound-host, in contrib/ (in the source tarball).  Makes
        unbound-host suitable for monitoring dnssec(-chain) status.


git-svn-id: file:///svn/unbound/trunk@2116 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-26 09:17:18 +00:00
Wouter Wijngaards 75bce22b30 - EDNS timeout code will not fire if EDNS status already known.
- EDNS failure not stored if EDNS status known to work.


git-svn-id: file:///svn/unbound/trunk@2115 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-21 11:00:35 +00:00
Wouter Wijngaards 4cc482e222 - Fix resolution for domains like safesvc.com.cn. If the iterator
can not recurse further and it finds the delegation in a state
         where it would otherwise have rejected it outhand if so received
         from a cache lookup, then it can try to ask higherup (with loop
         protection).
       - Fix comments in iter_utils:dp_is_useless.


git-svn-id: file:///svn/unbound/trunk@2114 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-19 12:59:27 +00:00
Wouter Wijngaards 807a1c5b74 - Fix resolution for domains like safesvc.com.cn. If the iterator
can not recurse further and it finds the delegation in a state
         where it would otherwise have rejected it outhand if so received
         from a cache lookup, then it can try to ask higherup (with loop
         protection).


git-svn-id: file:///svn/unbound/trunk@2113 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-19 12:55:49 +00:00
Wouter Wijngaards d9b715bbd7 svn:NO TEST iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2112 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-18 12:37:38 +00:00
Wouter Wijngaards b4b641807b Fix various compiler warnings from the clang llvm compiler.
git-svn-id: file:///svn/unbound/trunk@2111 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-18 12:37:04 +00:00
Wouter Wijngaards 271445fa4d - Fix bug#308: spelling error in variable name in parser and lexer.
git-svn-id: file:///svn/unbound/trunk@2110 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-06 05:23:49 +00:00
Wouter Wijngaards 22a622f8f5 review
git-svn-id: file:///svn/unbound/trunk@2109 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-04 14:31:12 +00:00
Wouter Wijngaards 816c6a513b - Conforms to draft-ietf-dnsop-default-local-zones-13. Added default
reverse lookup blocks for IPv4 test nets 100.51.198.in-addr.arpa,
  113.0.203.in-addr.arpa and Orchid prefix 0.1.1.0.0.2.ip6.arpa.


git-svn-id: file:///svn/unbound/trunk@2108 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-04 10:50:27 +00:00
Wouter Wijngaards 7276cf7dd0 - Fix dnssec-missing detection that was turned off by server selection.
git-svn-id: file:///svn/unbound/trunk@2107 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-05-04 08:39:04 +00:00
Wouter Wijngaards 8f4957a0e0 - infra cache entries that are expired are wiped clean. Previously
it was possible to not expire host data (if accessed often).


git-svn-id: file:///svn/unbound/trunk@2106 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-29 14:12:54 +00:00
Wouter Wijngaards 5c4fbf10b1 fix for key cache lookup
git-svn-id: file:///svn/unbound/trunk@2105 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-29 12:52:44 +00:00
Wouter Wijngaards cccba6e2c7 dnssec lameness detection looks in key cache if dnssec is expected.
git-svn-id: file:///svn/unbound/trunk@2104 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-29 12:36:12 +00:00
Wouter Wijngaards 0a6ad89984 - Fix detection of gost support in ldns (reported by Chris Smith).
git-svn-id: file:///svn/unbound/trunk@2103 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-28 19:50:34 +00:00
Wouter Wijngaards 2adfe6bdba GOST detect and iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2102 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-28 12:52:03 +00:00
Wouter Wijngaards a29b2ad908 Fix harden-referral-path so it does not generate lookup failures.
git-svn-id: file:///svn/unbound/trunk@2101 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-27 14:15:19 +00:00
Wouter Wijngaards 12e20eb5f4 - autotrust anchor file can be initialized with a ZSK key as well.
git-svn-id: file:///svn/unbound/trunk@2100 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-27 13:00:48 +00:00
Wouter Wijngaards 339d94b643 - fix retry sequence if prime hints are recursion-lame.
git-svn-id: file:///svn/unbound/trunk@2099 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-27 11:10:35 +00:00
Wouter Wijngaards 52894339df unbound-control get_option domain-insecure works.
git-svn-id: file:///svn/unbound/trunk@2098 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-27 09:16:23 +00:00
Wouter Wijngaards 3a754ae461 Fix bug#307: 0x20 fallback outstanding query count, together with rec_lame,
and canonical rrset comparison.


git-svn-id: file:///svn/unbound/trunk@2097 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-26 14:59:44 +00:00
Wouter Wijngaards f12b7a8dd9 - More strict scrubber (Thanks to George Barwood for the idea):
NS set must be pertinent to the query (qname subdomain nsname).


git-svn-id: file:///svn/unbound/trunk@2096 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-26 13:40:37 +00:00
Wouter Wijngaards 12c9c68dce no double include in lexer
git-svn-id: file:///svn/unbound/trunk@2095 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-26 08:53:53 +00:00
Wouter Wijngaards 8ccc01a2f6 Detect libev installed.
git-svn-id: file:///svn/unbound/trunk@2094 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-26 08:41:24 +00:00
Wouter Wijngaards fa3f1a60ec Fix use CPPFLAGS.
git-svn-id: file:///svn/unbound/trunk@2093 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-26 08:06:01 +00:00
Wouter Wijngaards 910bad74ea - Fix local-zone type redirect that did not use the query name for
the answer rrset.


git-svn-id: file:///svn/unbound/trunk@2092 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 14:03:09 +00:00
Wouter Wijngaards ef10cae6eb Fix tests to have answers for the more tenacious lookups.
git-svn-id: file:///svn/unbound/trunk@2091 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 10:11:10 +00:00
Wouter Wijngaards eca8b049ac spelling
git-svn-id: file:///svn/unbound/trunk@2090 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 09:57:05 +00:00
Wouter Wijngaards 35f3d4ecb1 - Fix to fetch data as last resort more tenaciously. When cycle
targets cause the server selection to believe there are more options
	  when they really are not there, the server selection is reinitiated.
	- Fix fetch from blacklisted dnssec lame servers as last resort.  The
	  servers IP address is then given in validator errors as well.



git-svn-id: file:///svn/unbound/trunk@2089 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 09:07:05 +00:00
Wouter Wijngaards 109fbe2350 - Squelch log message: sendto failed permission denied for
255.255.255.255, it is visible in VERB_DETAIL (verbosity 2).


git-svn-id: file:///svn/unbound/trunk@2088 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-23 06:48:49 +00:00
Wouter Wijngaards 4c7edee5f3 - Fix validation failure for qtype ANY caused by a RRSIG parse failure.
The validator error message was 'no signatures from ...'.


git-svn-id: file:///svn/unbound/trunk@2087 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-22 15:01:02 +00:00
Wouter Wijngaards e24f653871 trunk has 1.4.5
git-svn-id: file:///svn/unbound/trunk@2086 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-22 09:02:30 +00:00
Wouter Wijngaards 3f598364c9 tag 1.4.4 release
git-svn-id: file:///svn/unbound/trunk@2085 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-22 08:14:43 +00:00
Wouter Wijngaards 8e772c37b2 tag 1.4.4rc1
git-svn-id: file:///svn/unbound/trunk@2084 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-16 11:21:06 +00:00
Wouter Wijngaards 0a8c4943f5 and include ldns for windows anchor update
git-svn-id: file:///svn/unbound/trunk@2083 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-16 09:33:41 +00:00
Wouter Wijngaards ac59d6d96a windows ioctlsocket detection fix
git-svn-id: file:///svn/unbound/trunk@2082 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-16 09:27:12 +00:00
Wouter Wijngaards 1085e72135 portability of CMSG_SPACE
git-svn-id: file:///svn/unbound/trunk@2081 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-16 08:41:08 +00:00
Wouter Wijngaards 8452c8cd5d Includes for BSD4.
git-svn-id: file:///svn/unbound/trunk@2080 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-15 14:53:55 +00:00
Wouter Wijngaards 3352f687cd GOST algorithm number 12.
git-svn-id: file:///svn/unbound/trunk@2079 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-15 11:29:43 +00:00
Wouter Wijngaards 4d10a37247 suggested todo items
git-svn-id: file:///svn/unbound/trunk@2078 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-15 07:12:43 +00:00
Wouter Wijngaards c79d732647 please doxygens parser
git-svn-id: file:///svn/unbound/trunk@2077 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 15:05:58 +00:00
Wouter Wijngaards 601355d9b0 please lint
git-svn-id: file:///svn/unbound/trunk@2076 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 14:46:09 +00:00
Wouter Wijngaards 0720e1a9a1 - Fix chain of trust with CNAME at an intermediate step, for the DS
processing proof.



git-svn-id: file:///svn/unbound/trunk@2075 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 14:28:32 +00:00
Wouter Wijngaards fa21f6e524 please lint
git-svn-id: file:///svn/unbound/trunk@2074 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 09:20:20 +00:00
Wouter Wijngaards df9db1a0ee Fix bug#305: pkt_dname_tolower could read beyond end of buffer or
get into an endless loop, if 0x20 was enabled, and buffers are small
  or particular broken packets are received.


git-svn-id: file:///svn/unbound/trunk@2073 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 09:04:20 +00:00
Wouter Wijngaards 36c46a8f71 Fix bug#305: pkt_dname_tolower could read beyond end of buffer or
get into an endless loop, if 0x20 was enabled, and buffers are small
  or particular broken packets are received.


git-svn-id: file:///svn/unbound/trunk@2072 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-09 09:04:07 +00:00
Wouter Wijngaards 560f4aab03 Fix validation of queries with wildcard names (*.example).
git-svn-id: file:///svn/unbound/trunk@2071 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-08 13:22:35 +00:00
Wouter Wijngaards bec7e7a552 Fix validation of queries with wildcard names (*.example).
git-svn-id: file:///svn/unbound/trunk@2070 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-08 13:22:29 +00:00
Wouter Wijngaards 553e2de09b nit2
git-svn-id: file:///svn/unbound/trunk@2069 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-08 08:05:41 +00:00
Wouter Wijngaards e36a4b1bc5 nit1
git-svn-id: file:///svn/unbound/trunk@2068 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-08 08:03:36 +00:00
Wouter Wijngaards 8c8667d9f7 and change the ldns tarball
git-svn-id: file:///svn/unbound/trunk@2067 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-07 19:27:53 +00:00
Wouter Wijngaards f13263d045 ECC-GOST may not be 11, moved to experimental again, and not default on
git-svn-id: file:///svn/unbound/trunk@2066 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-07 17:46:32 +00:00
Wouter Wijngaards 77f49a5510 GOST support.
git-svn-id: file:///svn/unbound/trunk@2065 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-06 12:15:19 +00:00
Wouter Wijngaards 8413dd946e - Fix EDNS probe for .de DNSSEC testbed failure, where the infra
cache timeout coincided with a server update, the current EDNS 
	  backoff is less sensitive, and does not cache the backoff unless 
	  the backoff actually works and the domain is not expecting DNSSEC.


git-svn-id: file:///svn/unbound/trunk@2064 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-06 08:35:50 +00:00
Wouter Wijngaards 18a7df3d5c - Fix EDNS probe for .de DNSSEC testbed failure, where the infra
cache timeout coincided with a server update, the current EDNS 
  backoff is less sensitive, and does not cache the backoff unless 
  the backoff actually works and the domain is not expecting DNSSEC.


git-svn-id: file:///svn/unbound/trunk@2063 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-06 08:35:37 +00:00
Wouter Wijngaards 9717ad2be8 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2062 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-04-01 14:53:25 +00:00
Wouter Wijngaards efb19fd26a unbound control removed items are not counted again.
git-svn-id: file:///svn/unbound/trunk@2061 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-24 14:44:35 +00:00
Wouter Wijngaards bc4770ea7d iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2060 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-23 15:29:06 +00:00
Wouter Wijngaards 01792e928e update version number in contrib/unbound.spec to more recent
git-svn-id: file:///svn/unbound/trunk@2059 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-23 15:21:13 +00:00
Wouter Wijngaards 11ecb5183b review of NSEC and NSEC3 zones results
git-svn-id: file:///svn/unbound/trunk@2058 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-22 14:40:45 +00:00
Wouter Wijngaards ad620622a5 Fix bug#301.
git-svn-id: file:///svn/unbound/trunk@2057 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-22 09:38:06 +00:00
Wouter Wijngaards 5e9b6092d0 Fixup unbound-host.
git-svn-id: file:///svn/unbound/trunk@2056 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-22 09:23:30 +00:00
Wouter Wijngaards 1e503c6430 comment
git-svn-id: file:///svn/unbound/trunk@2055 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-19 15:26:25 +00:00
Wouter Wijngaards 5e1e389a15 compat lint sparc64/FreeBSD
git-svn-id: file:///svn/unbound/trunk@2054 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-19 15:25:40 +00:00
Wouter Wijngaards 8a3ef34194 More compat lint.
git-svn-id: file:///svn/unbound/trunk@2053 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-19 14:47:54 +00:00
Wouter Wijngaards e7939029f8 lint more compatible
git-svn-id: file:///svn/unbound/trunk@2052 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-19 14:41:57 +00:00
Wouter Wijngaards ac4534f3e0 fix fwd_ancil for platforms that do not support the option.
git-svn-id: file:///svn/unbound/trunk@2051 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-19 13:44:02 +00:00
Wouter Wijngaards dd8dcfb317 Make extended statistics counter documentation easier to find.
git-svn-id: file:///svn/unbound/trunk@2050 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-18 14:53:28 +00:00
Wouter Wijngaards 75565262f7 Fixed random numbers for port, interface and server selection.
Removed very small bias.
Also some lint fixes.



git-svn-id: file:///svn/unbound/trunk@2049 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-18 14:42:22 +00:00
Wouter Wijngaards cd57530efd includes
git-svn-id: file:///svn/unbound/trunk@2048 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-17 09:50:12 +00:00
Wouter Wijngaards 091050add6 cache verify work for nsec and nsec3.
git-svn-id: file:///svn/unbound/trunk@2047 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-17 09:49:18 +00:00
Wouter Wijngaards 42599b7044 and store sec status
git-svn-id: file:///svn/unbound/trunk@2046 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-17 09:27:53 +00:00
Wouter Wijngaards ecd677ebbe compile fix for alloc-lite.
git-svn-id: file:///svn/unbound/trunk@2045 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 18:17:19 +00:00
Wouter Wijngaards 367c2abbf3 Faster nsec3.
git-svn-id: file:///svn/unbound/trunk@2044 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 16:52:56 +00:00
Wouter Wijngaards 6fb53c7c93 fix p_ancil
git-svn-id: file:///svn/unbound/trunk@2043 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 15:20:40 +00:00
Wouter Wijngaards 62228ae450 fix header
git-svn-id: file:///svn/unbound/trunk@2042 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 15:19:06 +00:00
Wouter Wijngaards 5dd34e6145 Check for SENDSRCADDR socket option.
git-svn-id: file:///svn/unbound/trunk@2041 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 15:11:58 +00:00
Wouter Wijngaards 776643e6d7 time.h include
git-svn-id: file:///svn/unbound/trunk@2040 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 10:32:47 +00:00
Wouter Wijngaards 50336bddbe Fix interface automatic to work for ipv6 on openbsd.
git-svn-id: file:///svn/unbound/trunk@2039 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-16 08:37:50 +00:00
Wouter Wijngaards e3d6aaf697 Various documentation fixes.
git-svn-id: file:///svn/unbound/trunk@2038 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-15 13:42:55 +00:00
Wouter Wijngaards 788cd9d6ee unit test for util/regional.c.
git-svn-id: file:///svn/unbound/trunk@2037 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-15 13:18:49 +00:00
Wouter Wijngaards 10880d861f cleaner allocs in unit test
git-svn-id: file:///svn/unbound/trunk@2036 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-15 09:50:56 +00:00
Wouter Wijngaards 147d47eee7 Move includes to code files.
git-svn-id: file:///svn/unbound/trunk@2035 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 15:17:48 +00:00
Wouter Wijngaards e56a5b72cb Fix solaris python compile.
git-svn-id: file:///svn/unbound/trunk@2034 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 13:21:20 +00:00
Wouter Wijngaards c6b987a816 Fixup pymod thread test to not call valgrind.
git-svn-id: file:///svn/unbound/trunk@2033 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 12:48:52 +00:00
Wouter Wijngaards e652a69a69 Fix python if threaded.
git-svn-id: file:///svn/unbound/trunk@2032 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 12:44:44 +00:00
Wouter Wijngaards 3668d64b47 ldns tarball updated (earlier -lnsl -lsocket checks), iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2031 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 09:36:19 +00:00
Wouter Wijngaards 6c7526f53b Reorder config checks.
git-svn-id: file:///svn/unbound/trunk@2030 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 09:20:40 +00:00
Wouter Wijngaards 8c7781fb24 spelling fix
git-svn-id: file:///svn/unbound/trunk@2029 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 16:17:45 +00:00
Wouter Wijngaards 590facc3d8 trunk is 1.4.4 development.
git-svn-id: file:///svn/unbound/trunk@2028 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 14:29:32 +00:00
Wouter Wijngaards 03e53f14b0 Tag 1.4.3 created.
git-svn-id: file:///svn/unbound/trunk@2027 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 14:26:20 +00:00
Wouter Wijngaards 4642bcb0bc Fix daemonize on Solaris 10.
git-svn-id: file:///svn/unbound/trunk@2026 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 13:28:53 +00:00
Wouter Wijngaards 698b9df9de MacPorts fix.
git-svn-id: file:///svn/unbound/trunk@2025 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 12:52:58 +00:00
Wouter Wijngaards ae83a2b706 - fix for memory alignment in struct sock_list allocation.
git-svn-id: file:///svn/unbound/trunk@2024 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 11:19:14 +00:00
Wouter Wijngaards 6cf3327d8d - fix for memory alignment in struct sock_list allocation.
git-svn-id: file:///svn/unbound/trunk@2023 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 11:18:40 +00:00
Wouter Wijngaards 62298b8bfc --enable-alloc-nonregional
git-svn-id: file:///svn/unbound/trunk@2022 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-11 09:35:08 +00:00
Wouter Wijngaards c12752d6fc more userfriendly make test
git-svn-id: file:///svn/unbound/trunk@2021 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 13:01:52 +00:00
Wouter Wijngaards 0f90647174 Add ipv6 stub test.
git-svn-id: file:///svn/unbound/trunk@2020 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 12:36:59 +00:00
Wouter Wijngaards d1df3df96a nicer printf format conversion.
git-svn-id: file:///svn/unbound/trunk@2019 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 12:11:54 +00:00
Wouter Wijngaards 6b5f246343 Portability of alloc-lite
git-svn-id: file:///svn/unbound/trunk@2018 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 12:05:14 +00:00
Wouter Wijngaards b1c920bc8a and mark realloc freed data
git-svn-id: file:///svn/unbound/trunk@2017 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 12:01:56 +00:00
Wouter Wijngaards 6f1c044381 fix for proto
git-svn-id: file:///svn/unbound/trunk@2016 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 11:39:07 +00:00
Wouter Wijngaards 46df44f321 alloc_lite works
git-svn-id: file:///svn/unbound/trunk@2015 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-10 11:01:33 +00:00
Wouter Wijngaards 0000843c32 --enable-alloc-lite
git-svn-id: file:///svn/unbound/trunk@2014 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-09 16:26:53 +00:00
Wouter Wijngaards 99eb762c24 trunk moves to 1.4.3
git-svn-id: file:///svn/unbound/trunk@2013 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-09 09:40:48 +00:00
Wouter Wijngaards 18b9d266d5 tag 1.4.2 release.
git-svn-id: file:///svn/unbound/trunk@2012 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-09 08:55:50 +00:00
Wouter Wijngaards 53e29fb8b4 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@2011 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-08 09:34:03 +00:00
Matthijs Mekking 4f325d281b typo svn:NO TEST
git-svn-id: file:///svn/unbound/trunk@2010 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-04 15:24:51 +00:00
Wouter Wijngaards 867dfc0563 remove unnecessary if statement
git-svn-id: file:///svn/unbound/trunk@2009 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-04 15:24:34 +00:00
Wouter Wijngaards e4ba18f3f2 please lint
git-svn-id: file:///svn/unbound/trunk@2008 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-04 13:00:57 +00:00
Wouter Wijngaards 27d8ffb0f3 Fix crash in control channel code.
git-svn-id: file:///svn/unbound/trunk@2007 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-04 10:07:54 +00:00
Wouter Wijngaards c73dc79252 - better casts in pipe code, brackets placed wrongly.
- iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@2006 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-03 15:39:00 +00:00
Wouter Wijngaards 9d5b202720 new specfile.
git-svn-id: file:///svn/unbound/trunk@2005 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 16:03:51 +00:00
Wouter Wijngaards 831864df59 changelog for rpath fix
git-svn-id: file:///svn/unbound/trunk@2004 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 15:49:19 +00:00
Wouter Wijngaards ecc77998fd rpath fix proper fix
git-svn-id: file:///svn/unbound/trunk@2003 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 15:48:31 +00:00
Wouter Wijngaards 130f5e4ad1 libunbound.so.2 now.
git-svn-id: file:///svn/unbound/trunk@2002 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 15:05:06 +00:00
Wouter Wijngaards 7a7487b094 Pyunbound doc update
git-svn-id: file:///svn/unbound/trunk@2001 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 14:59:38 +00:00
Wouter Wijngaards 0615e05e6d ldns tarball updated (compile portability fixes).
git-svn-id: file:///svn/unbound/trunk@2000 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 14:36:49 +00:00
Wouter Wijngaards 38fe29b9fd Nicer debug output.
git-svn-id: file:///svn/unbound/trunk@1999 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 13:00:00 +00:00
Wouter Wijngaards fcdfcbe82e enable-checking
git-svn-id: file:///svn/unbound/trunk@1998 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 12:53:02 +00:00
Wouter Wijngaards 67624a8ee0 Skip RRSIGs on 5011 init. Make install makes all.
git-svn-id: file:///svn/unbound/trunk@1997 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-01 10:26:42 +00:00
Wouter Wijngaards 3c2fe2fe5e list_local_zones and list_local_data.
git-svn-id: file:///svn/unbound/trunk@1996 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-26 16:14:00 +00:00
Wouter Wijngaards 51cc8aadd6 unbound-control list_stubs and list_forwards.
git-svn-id: file:///svn/unbound/trunk@1995 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-26 15:40:46 +00:00
Wouter Wijngaards 23f95e7cb7 Better prototype.
git-svn-id: file:///svn/unbound/trunk@1994 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-26 11:05:49 +00:00
Wouter Wijngaards 5dcbb54e63 - Fix scrubber bug that potentially let NS records through. Reported
by Amanda Constant.
        - Also delete potential poison references from additional.
        - Fix: no classification of a forwarder as lame, throwaway instead.


git-svn-id: file:///svn/unbound/trunk@1993 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-24 13:27:47 +00:00
Wouter Wijngaards 2bda842014 Lint.
git-svn-id: file:///svn/unbound/trunk@1992 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-23 16:23:12 +00:00
Wouter Wijngaards 6003dcc291 neater code
git-svn-id: file:///svn/unbound/trunk@1991 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-23 16:11:00 +00:00
Wouter Wijngaards 423b4d8893 get and set option more accessible.
git-svn-id: file:///svn/unbound/trunk@1990 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-23 13:53:10 +00:00
Wouter Wijngaards e8e24d3810 reopen and move of get_option to util.
git-svn-id: file:///svn/unbound/trunk@1989 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-18 16:40:22 +00:00
Wouter Wijngaards 366e8c4477 Pickup ldns fix #297.
git-svn-id: file:///svn/unbound/trunk@1988 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-18 13:34:03 +00:00
Wouter Wijngaards eeefe9ac45 Stops blacklisting because of strange firewalls.
git-svn-id: file:///svn/unbound/trunk@1987 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-18 11:21:11 +00:00
Wouter Wijngaards 38c6664caf A little more strict DS scrubbing.
git-svn-id: file:///svn/unbound/trunk@1986 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-18 09:47:08 +00:00
Wouter Wijngaards 36ccd87840 Scrub DNSKEY, DLV and DS much more stringently.
git-svn-id: file:///svn/unbound/trunk@1985 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-17 16:50:04 +00:00
Wouter Wijngaards 8adc2929e8 printout errors if trust anchor write fails.
git-svn-id: file:///svn/unbound/trunk@1984 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-16 08:52:44 +00:00
Wouter Wijngaards a4f769e214 Documentation on requery
git-svn-id: file:///svn/unbound/trunk@1983 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-15 15:41:38 +00:00
Wouter Wijngaards 6888c78e1e Fix for Roy.
git-svn-id: file:///svn/unbound/trunk@1982 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-15 10:49:03 +00:00
Wouter Wijngaards 67a4310b36 Retry in case of validation failure less, cached per-zone not per-query.
git-svn-id: file:///svn/unbound/trunk@1981 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-12 15:24:42 +00:00
Wouter Wijngaards 6f8d6c0df4 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1980 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-11 10:00:37 +00:00
Wouter Wijngaards 9de8eb6882 ldns tarball update.
git-svn-id: file:///svn/unbound/trunk@1979 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-11 09:41:50 +00:00
Wouter Wijngaards 23077d5a2b include math.h for prototypes
git-svn-id: file:///svn/unbound/trunk@1978 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-09 15:21:34 +00:00
Wouter Wijngaards 003aebc9fe snprintf portability
git-svn-id: file:///svn/unbound/trunk@1977 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-09 14:35:52 +00:00
Wouter Wijngaards 8e96826ca8 updated ldns tarball
git-svn-id: file:///svn/unbound/trunk@1976 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-04 17:47:28 +00:00
Wouter Wijngaards acfe235c37 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1975 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-03 19:24:16 +00:00
Wouter Wijngaards 9d4983eb00 updated url.
git-svn-id: file:///svn/unbound/trunk@1974 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-02 08:43:26 +00:00
Wouter Wijngaards c18b201463 earlier check
git-svn-id: file:///svn/unbound/trunk@1973 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 13:42:30 +00:00
Wouter Wijngaards 7f41877b41 memcmp portability.
git-svn-id: file:///svn/unbound/trunk@1972 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 13:27:23 +00:00
Wouter Wijngaards f07c72f8d7 portable unittest
git-svn-id: file:///svn/unbound/trunk@1971 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 10:55:20 +00:00
Wouter Wijngaards 27090c3ea7 please doxygen
git-svn-id: file:///svn/unbound/trunk@1970 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 09:38:50 +00:00
Wouter Wijngaards 48c0528720 please doxygen
git-svn-id: file:///svn/unbound/trunk@1969 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 09:27:52 +00:00
Wouter Wijngaards 1ec79bc23f iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1968 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 08:57:46 +00:00
Wouter Wijngaards b9c39a46b4 newer autoconf
git-svn-id: file:///svn/unbound/trunk@1967 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-01 08:26:57 +00:00
Wouter Wijngaards 6d62769b03 portable.
git-svn-id: file:///svn/unbound/trunk@1966 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-29 15:20:55 +00:00
Wouter Wijngaards e84f5ee7dc iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1965 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-27 21:06:00 +00:00
Wouter Wijngaards e7da8f089e remove warning on format string.
git-svn-id: file:///svn/unbound/trunk@1964 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-27 20:29:07 +00:00
Wouter Wijngaards f437de11a6 libtool finish the python unbound lib.
git-svn-id: file:///svn/unbound/trunk@1963 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-22 16:25:17 +00:00
Wouter Wijngaards be7105336a version 5 of acx_nlnetlabs.m4
git-svn-id: file:///svn/unbound/trunk@1962 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-21 15:42:44 +00:00
Wouter Wijngaards 28af5566b2 fixup lookup trouble for parent-child domains on the first query.
git-svn-id: file:///svn/unbound/trunk@1961 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-20 13:11:54 +00:00
Wouter Wijngaards 2bd83fd0cf fixup lookup trouble for parent-child domains on the first query.
git-svn-id: file:///svn/unbound/trunk@1960 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-20 13:11:11 +00:00
Wouter Wijngaards fc3f9a1b96 different structure alignment.
git-svn-id: file:///svn/unbound/trunk@1959 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-18 11:24:28 +00:00
Wouter Wijngaards 0b41b77549 autoconf 2.63 used.
git-svn-id: file:///svn/unbound/trunk@1958 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-14 14:33:53 +00:00
Wouter Wijngaards 7b9969f8e4 ldns detection also check header file.
git-svn-id: file:///svn/unbound/trunk@1957 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-14 14:32:39 +00:00
Wouter Wijngaards bcd1ac7599 prefetch-key feature.
git-svn-id: file:///svn/unbound/trunk@1956 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-13 13:33:18 +00:00
Wouter Wijngaards 36785a154b fix unbound-checkconf for auto-trust-anchor-file
git-svn-id: file:///svn/unbound/trunk@1955 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-12 15:49:30 +00:00
Wouter Wijngaards 5b0fd59e76 work on prefetch: store the updated results in the cache.
git-svn-id: file:///svn/unbound/trunk@1954 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-08 15:59:36 +00:00
Wouter Wijngaards 9a9df2478d Fix parent child disagreement handling and no-ipv6 present.
git-svn-id: file:///svn/unbound/trunk@1953 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-08 12:47:27 +00:00
Wouter Wijngaards 1314b95ce7 Stats for prefetch. unbound_munin_ plugin updated.
git-svn-id: file:///svn/unbound/trunk@1952 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-07 16:06:26 +00:00
Wouter Wijngaards 43d228c5bc Doc fix and work on prefetch feature.
git-svn-id: file:///svn/unbound/trunk@1951 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-07 14:38:18 +00:00
Wouter Wijngaards d11d56b0b3 Documentation nicer.
Stronger crypto by default for unbound-control.


git-svn-id: file:///svn/unbound/trunk@1950 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-06 14:48:44 +00:00
Wouter Wijngaards 8e447003fd more verbose output to describe lame addresses.
git-svn-id: file:///svn/unbound/trunk@1949 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-06 13:15:21 +00:00
Wouter Wijngaards a66bad688b Fix bug#291 and unit test spruced up.
git-svn-id: file:///svn/unbound/trunk@1948 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-06 10:55:14 +00:00
Wouter Wijngaards f555a5c6a0 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1947 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-06 10:16:52 +00:00
Wouter Wijngaards 8bda8efb99 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1946 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-01-04 15:43:33 +00:00
Wouter Wijngaards 1d7e299c27 Newer libtool for configure.
git-svn-id: file:///svn/unbound/trunk@1945 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-22 08:28:24 +00:00
Wouter Wijngaards 2480336ef3 1.4.2 version in configure.
git-svn-id: file:///svn/unbound/trunk@1944 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-17 09:37:29 +00:00
Wouter Wijngaards 9a9d6bdf0c Review comments, tag changelog entry.
git-svn-id: file:///svn/unbound/trunk@1942 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-17 08:58:51 +00:00
Wouter Wijngaards 0e248f9000 unit test for x64
git-svn-id: file:///svn/unbound/trunk@1941 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-15 10:31:13 +00:00
Wouter Wijngaards da50c48599 unit test for negative cache DS response
git-svn-id: file:///svn/unbound/trunk@1940 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-15 10:00:55 +00:00
Wouter Wijngaards 7094eab574 fixes and new ldns tarball.
git-svn-id: file:///svn/unbound/trunk@1939 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-15 09:31:39 +00:00
Wouter Wijngaards ab9bd76768 Answer qclass=ANY.
git-svn-id: file:///svn/unbound/trunk@1938 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-15 09:10:04 +00:00
Wouter Wijngaards 72926a9f8c on IPv4 UDP turn off DF flag.
git-svn-id: file:///svn/unbound/trunk@1937 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-11 16:02:49 +00:00
Wouter Wijngaards 47e7b5fb51 Check rrsig expiration last in verify_rrsig
git-svn-id: file:///svn/unbound/trunk@1936 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-10 16:03:31 +00:00
Wouter Wijngaards d3dc108dd9 Readup fixes.
git-svn-id: file:///svn/unbound/trunk@1935 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-10 15:41:52 +00:00
Wouter Wijngaards e43b2c9338 More design choice explanation.
git-svn-id: file:///svn/unbound/trunk@1934 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-10 10:23:51 +00:00
Wouter Wijngaards 1d2c4f70fa fix crash for hauke
git-svn-id: file:///svn/unbound/trunk@1933 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-09 16:27:13 +00:00
Wouter Wijngaards c68aebb3d7 - Fix SOA excluded from negative DS responses. Reported by Hauke
Lampe.  The negative cache did not include proper SOA records for
	  negative qtype DS responses which makes BIND barf on it, such
	  responses are now only used internally.
	- Fix negative cache lookup of closestencloser check of DS type bit.



git-svn-id: file:///svn/unbound/trunk@1932 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-09 14:55:19 +00:00
Wouter Wijngaards 90da0cc2e8 Fix bug#287
git-svn-id: file:///svn/unbound/trunk@1931 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-09 09:07:56 +00:00
Wouter Wijngaards c88952d4e0 Specify port number in interface lines.
git-svn-id: file:///svn/unbound/trunk@1930 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-08 16:31:56 +00:00
Wouter Wijngaards 59c529bada Fix lookup of domains with parent-child zonecut data differences.
git-svn-id: file:///svn/unbound/trunk@1929 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-08 13:37:59 +00:00
Wouter Wijngaards eeb6bf49d0 change to trigger update to test new commithook with builtin ldns tarball.
git-svn-id: file:///svn/unbound/trunk@1928 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-07 15:04:48 +00:00
Wouter Wijngaards fd9c8a700e test for bug#287
git-svn-id: file:///svn/unbound/trunk@1927 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-07 10:19:28 +00:00
Wouter Wijngaards 1ce514a384 Fix bug#287.
git-svn-id: file:///svn/unbound/trunk@1926 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-07 09:18:38 +00:00
Wouter Wijngaards 408079e49f Test for module-config "iterator"
git-svn-id: file:///svn/unbound/trunk@1925 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-01 08:12:12 +00:00
Wouter Wijngaards 4d1c4c8002 Fix crash reported on unbound-users with module-config "iterator"
git-svn-id: file:///svn/unbound/trunk@1924 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-12-01 08:12:00 +00:00
Wouter Wijngaards c253c24202 Fix bug #284.
git-svn-id: file:///svn/unbound/trunk@1923 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-30 13:07:39 +00:00
Wouter Wijngaards 15e5041086 1.4.1 and libtool version fix
git-svn-id: file:///svn/unbound/trunk@1922 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-26 14:28:40 +00:00
Wouter Wijngaards 836f0358ea updated ldns.
git-svn-id: file:///svn/unbound/trunk@1920 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-26 11:12:32 +00:00
Wouter Wijngaards 039f276b0c fixup spinning
git-svn-id: file:///svn/unbound/trunk@1919 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-23 12:12:59 +00:00
Wouter Wijngaards 44a28f4343 Patch applied from David Hubbard.
git-svn-id: file:///svn/unbound/trunk@1918 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-23 11:01:10 +00:00
Wouter Wijngaards cffd76e6e4 revert nonworking fixup
git-svn-id: file:///svn/unbound/trunk@1917 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-20 15:43:13 +00:00
Wouter Wijngaards 54046475e7 workaround
git-svn-id: file:///svn/unbound/trunk@1916 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-20 15:28:10 +00:00
Wouter Wijngaards caeebbf4fa review comments
git-svn-id: file:///svn/unbound/trunk@1915 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-20 12:06:00 +00:00
Wouter Wijngaards 521bd29041 Utility script to convert anchors.mf from the ITAR into individual files that are amenable to RFC5011 tracking.
git-svn-id: file:///svn/unbound/trunk@1914 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-20 10:37:06 +00:00
Wouter Wijngaards 9abe770f9e iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1913 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-19 10:22:48 +00:00
Wouter Wijngaards 41a5b9efca better argument help for unbound-control
git-svn-id: file:///svn/unbound/trunk@1912 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-19 10:01:42 +00:00
Wouter Wijngaards 980f3f10b7 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1911 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-17 16:02:59 +00:00
Wouter Wijngaards 83cf9d20c8 noted multiple autotrust lines needed in example.conf
git-svn-id: file:///svn/unbound/trunk@1910 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-17 09:43:09 +00:00
Wouter Wijngaards a4c7a739d9 svn tag changelog entry
git-svn-id: file:///svn/unbound/trunk@1908 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-16 14:32:04 +00:00
Wouter Wijngaards c0093acd97 CLOSEST trust anchors tested with CNAME and NSEC3 optout.
git-svn-id: file:///svn/unbound/trunk@1907 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-16 14:13:58 +00:00
Wouter Wijngaards 62ab524058 Fix#282 libunbound memleak on error condition by Eric Sesterhenn.
git-svn-id: file:///svn/unbound/trunk@1906 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-16 13:36:54 +00:00
Wouter Wijngaards c56fdce932 Fixup unsigned CNAME to signed CNAME detection of signatures.
git-svn-id: file:///svn/unbound/trunk@1905 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-16 13:34:03 +00:00
Wouter Wijngaards 502a542820 please lint
git-svn-id: file:///svn/unbound/trunk@1904 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-13 15:03:01 +00:00
Wouter Wijngaards 23af66982c - unbound-host does not fail on type ANY.
- Fixed wireparse failure to put RRSIGs together with data in some
	  long ANY mix cases, which fixes validation failures.


git-svn-id: file:///svn/unbound/trunk@1903 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-13 14:51:36 +00:00
Wouter Wijngaards a4a7894f79 Fix validation failure cnamenodata proof failed for hud.gov.
git-svn-id: file:///svn/unbound/trunk@1902 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-13 10:10:05 +00:00
Wouter Wijngaards 5423af1836 review fixes.
git-svn-id: file:///svn/unbound/trunk@1901 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-12 16:27:11 +00:00
Wouter Wijngaards e19f71ffa0 Fixup to clean errinf on restart so no extremely long printouts.
git-svn-id: file:///svn/unbound/trunk@1900 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-12 15:07:38 +00:00
Wouter Wijngaards 009b2d7c0b iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1899 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-12 09:12:06 +00:00
Wouter Wijngaards eb6253aa6c review comments. updated ldns tarball with 1.6.2.
git-svn-id: file:///svn/unbound/trunk@1898 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-11 16:18:38 +00:00
Wouter Wijngaards 5bc9a80e40 review fixes.
git-svn-id: file:///svn/unbound/trunk@1897 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-10 16:02:05 +00:00
Wouter Wijngaards 6e8e4e87b7 Fixed argument optionality in help output.
git-svn-id: file:///svn/unbound/trunk@1896 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-10 13:28:09 +00:00
Wouter Wijngaards ff33e077de Fix crash bug with DLV and dnssec-retry for the domain registered in it.
git-svn-id: file:///svn/unbound/trunk@1895 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-10 10:42:50 +00:00
Wouter Wijngaards 9890caff91 and error
git-svn-id: file:///svn/unbound/trunk@1894 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-10 08:15:08 +00:00
Wouter Wijngaards 45c07da4a0 debug code
git-svn-id: file:///svn/unbound/trunk@1893 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-09 16:26:24 +00:00
Wouter Wijngaards 7617c18be1 more error text
git-svn-id: file:///svn/unbound/trunk@1892 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-05 19:32:02 +00:00
Wouter Wijngaards 463d7e09c5 better error text.
git-svn-id: file:///svn/unbound/trunk@1891 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-05 19:22:50 +00:00
Wouter Wijngaards b3caa5ab37 pylib for python in different location test updated.
git-svn-id: file:///svn/unbound/trunk@1890 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-05 12:03:54 +00:00
Wouter Wijngaards 479bebfff4 please lint on FreeBSD6
git-svn-id: file:///svn/unbound/trunk@1889 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-05 11:12:06 +00:00
Wouter Wijngaards 586893d761 lint fixes on FreeBSD 7.
git-svn-id: file:///svn/unbound/trunk@1888 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-05 10:39:12 +00:00
Wouter Wijngaards 07f5b21b7b parameter documented
git-svn-id: file:///svn/unbound/trunk@1887 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-02 15:23:41 +00:00
Wouter Wijngaards 4f1a72bb75 GOST draft version -00 to -01 changes incorporated.
git-svn-id: file:///svn/unbound/trunk@1886 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-02 15:05:06 +00:00
Wouter Wijngaards aa8a6eeadf Unit test for fixed autotrust init with DS.
git-svn-id: file:///svn/unbound/trunk@1885 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-02 14:30:46 +00:00
Wouter Wijngaards bf8bc06860 Fix autotrust initialised with DS.
git-svn-id: file:///svn/unbound/trunk@1884 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-02 13:56:14 +00:00
Wouter Wijngaards 1727bfc34e please doxygen.
git-svn-id: file:///svn/unbound/trunk@1883 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-29 12:55:26 +00:00
Wouter Wijngaards 1d8013c67a do-udp: no fixed.
git-svn-id: file:///svn/unbound/trunk@1882 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-29 12:11:38 +00:00
Wouter Wijngaards 5b66f07e38 edns-buffer-size option.
git-svn-id: file:///svn/unbound/trunk@1881 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-29 10:37:44 +00:00
Wouter Wijngaards 81cfcd8053 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1880 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-29 07:48:36 +00:00
Wouter Wijngaards 8171793d2a ldns tarball updated.
git-svn-id: file:///svn/unbound/trunk@1879 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-28 21:59:45 +00:00
Wouter Wijngaards 9a08ad419e sha256 support enabled by default.
git-svn-id: file:///svn/unbound/trunk@1878 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-28 21:56:54 +00:00
Wouter Wijngaards 3b78d84a7e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1877 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-28 08:24:41 +00:00
Wouter Wijngaards d3bc6d6b5a Removed hard malloc failure reported by Greg Woods.
git-svn-id: file:///svn/unbound/trunk@1876 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-28 08:04:38 +00:00
Wouter Wijngaards 9bb3fdd547 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1875 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-27 07:27:01 +00:00
Wouter Wijngaards f42d27e1a2 - Made new validator error string available from libunbound for
applications.  It is in result->why_bogus, a zero-terminated string.
	  unbound-host prints it by default if a result is bogus.
	  Also the errinf is public in module_qstate (for other modules).
	Binary API different. bumped library ABI version.


git-svn-id: file:///svn/unbound/trunk@1874 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 17:05:53 +00:00
Wouter Wijngaards d7868e4077 Fix double time subtraction in negative cache.
git-svn-id: file:///svn/unbound/trunk@1873 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 09:18:40 +00:00
Wouter Wijngaards 2c33330994 neater errors for algo and key failure.
git-svn-id: file:///svn/unbound/trunk@1872 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 08:02:00 +00:00
Wouter Wijngaards 7782cf2b97 More detailed errors.
git-svn-id: file:///svn/unbound/trunk@1871 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 07:23:49 +00:00
Wouter Wijngaards a909fa9a3a neater explanation for unsigned or signatureless negative DS replies.
git-svn-id: file:///svn/unbound/trunk@1870 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 06:57:23 +00:00
Wouter Wijngaards e0b639accd More vallog reason. Doxygen.
git-svn-id: file:///svn/unbound/trunk@1869 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 06:35:14 +00:00
Wouter Wijngaards ce45cbda6d - moved version number to 1.4.0 because of 1.3.4 release with only
the NSEC3 patch.
	- val-log-level: 2 shows extended error information for validation
	  failures, but still one (longish) line per failure.  For example:
	  validation failure <example.com. DNSKEY IN>: signature expired from
	  192.0.2.4 for trust anchor example.com. while building chain of trust
	  validation failure <www.example.com. A IN>: no signatures from
	  192.0.2.6 for key example.com. while building chain of trust



git-svn-id: file:///svn/unbound/trunk@1868 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 16:45:47 +00:00
Wouter Wijngaards 6f37df3b92 Fix trunk.
git-svn-id: file:///svn/unbound/trunk@1866 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 14:00:56 +00:00
Wouter Wijngaards b07370a4c2 Fix check for NSEC3 signatures
git-svn-id: file:///svn/unbound/trunk@1865 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 12:57:12 +00:00
Wouter Wijngaards 1a02ab895b Fix check for signatures.
git-svn-id: file:///svn/unbound/trunk@1864 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 12:56:57 +00:00
Wouter Wijngaards 989a6f4f89 typo in changelog
git-svn-id: file:///svn/unbound/trunk@1863 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 09:32:00 +00:00
Wouter Wijngaards 5ff6b1c5fb retry mode: empty non terminal.
git-svn-id: file:///svn/unbound/trunk@1862 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 08:53:09 +00:00
Wouter Wijngaards 4d49d792c3 retry mode: DNSKEY.
git-svn-id: file:///svn/unbound/trunk@1861 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 08:22:27 +00:00
Wouter Wijngaards 5d2e8e8e97 Retry mode, DS and prime.
git-svn-id: file:///svn/unbound/trunk@1860 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-07 07:52:02 +00:00
Wouter Wijngaards 455c3d130d Data retry on validation failure.
git-svn-id: file:///svn/unbound/trunk@1859 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-06 08:31:47 +00:00
Wouter Wijngaards c43987e8e1 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1858 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-02 08:12:54 +00:00
Wouter Wijngaards 0679bf6502 Fix autotrust-5011 file used from libunbound (no probing by itself because
it may not have the processor whenever it likes).


git-svn-id: file:///svn/unbound/trunk@1857 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-02 08:08:44 +00:00
Wouter Wijngaards 35f077bc06 unbound-host -d and -C fix
git-svn-id: file:///svn/unbound/trunk@1856 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-02 07:51:36 +00:00
Wouter Wijngaards 71959c05df review fixes.
git-svn-id: file:///svn/unbound/trunk@1855 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-28 14:52:53 +00:00
Wouter Wijngaards 1c75281303 Read iana root multiline and prevent integer underflow.
git-svn-id: file:///svn/unbound/trunk@1854 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-28 13:14:01 +00:00
Wouter Wijngaards 5007a44e52 review fixes
git-svn-id: file:///svn/unbound/trunk@1853 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-25 15:20:29 +00:00
Wouter Wijngaards 2043463b6a review nits
git-svn-id: file:///svn/unbound/trunk@1852 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-25 11:16:43 +00:00
Wouter Wijngaards d59a8baec2 so-rcvbuf option.
git-svn-id: file:///svn/unbound/trunk@1851 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-25 08:54:50 +00:00
Wouter Wijngaards c467aabbf1 review comments
git-svn-id: file:///svn/unbound/trunk@1850 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-23 15:15:41 +00:00
Wouter Wijngaards 430a6bd697 Test of original autotrust formatted data.
git-svn-id: file:///svn/unbound/trunk@1849 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-23 12:50:42 +00:00
Wouter Wijngaards ee1c4c1cce Failure handling for 5011.
git-svn-id: file:///svn/unbound/trunk@1848 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-23 09:05:44 +00:00
Wouter Wijngaards 44e2f9b0d9 Can handle a number of keys for the trust point.
git-svn-id: file:///svn/unbound/trunk@1847 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-22 14:40:14 +00:00
Wouter Wijngaards 1f7304d146 revocation of trust anchors works.
git-svn-id: file:///svn/unbound/trunk@1846 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-22 14:04:43 +00:00
Wouter Wijngaards 9dc9f0a8e8 rfc5011 and algorithm rollover
git-svn-id: file:///svn/unbound/trunk@1845 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-22 12:20:21 +00:00
Wouter Wijngaards 19ab8e1429 remove memory leak from testbed
git-svn-id: file:///svn/unbound/trunk@1844 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-18 12:34:30 +00:00
Wouter Wijngaards aff6654685 Test TTLs and signatures.
git-svn-id: file:///svn/unbound/trunk@1843 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-18 11:23:50 +00:00
Wouter Wijngaards d0cef76cff Pick up revocations even if not normally validly signed.
git-svn-id: file:///svn/unbound/trunk@1842 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-18 10:13:06 +00:00
Wouter Wijngaards 82b8ddc9bb autotrust tests and fixes.
git-svn-id: file:///svn/unbound/trunk@1841 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-18 07:49:29 +00:00
Wouter Wijngaards 2588d76522 manual page fixes from Tony Finch
git-svn-id: file:///svn/unbound/trunk@1840 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-17 14:52:43 +00:00
Wouter Wijngaards 5d4249a6b0 spelling
git-svn-id: file:///svn/unbound/trunk@1839 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-17 14:38:20 +00:00
Wouter Wijngaards 2c134eb981 Changelog.
git-svn-id: file:///svn/unbound/trunk@1838 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-17 14:36:15 +00:00
Wouter Wijngaards c4cfcdab6b Fix problem with delegation where glue has expired.
git-svn-id: file:///svn/unbound/trunk@1837 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-17 14:36:06 +00:00
Wouter Wijngaards 75fbd42ca3 Fix unbound-host compile with --enable-alloc-checks.
git-svn-id: file:///svn/unbound/trunk@1836 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-17 10:50:44 +00:00
Wouter Wijngaards aae91da6d2 sharper match.
git-svn-id: file:///svn/unbound/trunk@1835 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-16 13:13:46 +00:00
Wouter Wijngaards 90b4b1dae9 Fixup memstats for pretty time print in log file.
git-svn-id: file:///svn/unbound/trunk@1834 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-16 13:01:51 +00:00
Wouter Wijngaards 795a25c117 Fixed memstats for log-ascii format.
git-svn-id: file:///svn/unbound/trunk@1833 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-16 12:56:00 +00:00
Wouter Wijngaards 45acda0535 Memory leak fix.
git-svn-id: file:///svn/unbound/trunk@1832 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-16 12:47:56 +00:00
Wouter Wijngaards 9c822ebc9e iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1831 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-15 14:15:24 +00:00
Wouter Wijngaards 165a235f4d debug prints for high verbosity
git-svn-id: file:///svn/unbound/trunk@1830 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-15 14:03:44 +00:00
Wouter Wijngaards 46d341b036 please lint
git-svn-id: file:///svn/unbound/trunk@1829 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 15:07:18 +00:00
Wouter Wijngaards 7923a28c13 line buffering
git-svn-id: file:///svn/unbound/trunk@1828 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 14:33:46 +00:00
Wouter Wijngaards 2e02003687 prettier compiling in optimize mode
git-svn-id: file:///svn/unbound/trunk@1827 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 14:16:19 +00:00
Wouter Wijngaards c611bbba3f ldns with parse fixes
git-svn-id: file:///svn/unbound/trunk@1826 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 13:54:03 +00:00
Wouter Wijngaards b322353d8b remove printf format warning
git-svn-id: file:///svn/unbound/trunk@1825 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 13:41:01 +00:00
Wouter Wijngaards 7ccf79d42d can print .bg key.
git-svn-id: file:///svn/unbound/trunk@1824 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 13:13:55 +00:00
Wouter Wijngaards d7dafa112b load_cache is meant for debugging.
git-svn-id: file:///svn/unbound/trunk@1823 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 10:09:24 +00:00
Wouter Wijngaards dcb11b2ee4 Fixup TTL too large bug for bogus responses.
git-svn-id: file:///svn/unbound/trunk@1822 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-10 10:01:36 +00:00
Wouter Wijngaards 30d0bf14eb lint fix
git-svn-id: file:///svn/unbound/trunk@1821 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-08 08:24:44 +00:00
Wouter Wijngaards 1f45bbbd63 Fixups.
git-svn-id: file:///svn/unbound/trunk@1820 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-08 07:20:47 +00:00
Wouter Wijngaards 3f68f01313 - autotrust testbound scenarios.
- autotrust fix that failure count is written to file.
        - autotrust fix that keys may become valid after add holddown time
          alone, before the probe returns.


git-svn-id: file:///svn/unbound/trunk@1819 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-07 14:34:29 +00:00
Wouter Wijngaards 18e9cbb39f fix python memory leak.
git-svn-id: file:///svn/unbound/trunk@1818 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 14:14:54 +00:00
Wouter Wijngaards ca9c1fa2a8 libevent-2.0 compatibility.
git-svn-id: file:///svn/unbound/trunk@1817 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 13:29:11 +00:00
Wouter Wijngaards 310cbbc372 Set path earlier.
git-svn-id: file:///svn/unbound/trunk@1816 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 12:22:46 +00:00
Wouter Wijngaards 3bca178111 Test the new doxygen pick up.
git-svn-id: file:///svn/unbound/trunk@1815 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 11:26:49 +00:00
Wouter Wijngaards 4774b8b129 Test new doxygen for automated tests.
git-svn-id: file:///svn/unbound/trunk@1814 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-04 10:35:17 +00:00
Wouter Wijngaards e46441787c source IP from python and doxygen fixes.
git-svn-id: file:///svn/unbound/trunk@1813 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 14:51:38 +00:00
Wouter Wijngaards cd3a1ff351 more enum fixes
git-svn-id: file:///svn/unbound/trunk@1812 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 12:28:17 +00:00
Wouter Wijngaards e80d0936f3 more enum fixes in ldns tarball
git-svn-id: file:///svn/unbound/trunk@1811 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 12:19:29 +00:00
Wouter Wijngaards 41a29b050b makefile fix ordering
git-svn-id: file:///svn/unbound/trunk@1810 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 12:19:18 +00:00
Wouter Wijngaards 37d8551a7a Makefile fix for parallel makes.
git-svn-id: file:///svn/unbound/trunk@1809 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 12:06:06 +00:00
Wouter Wijngaards 17ffb78b10 ldns-updated
git-svn-id: file:///svn/unbound/trunk@1808 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 12:04:39 +00:00
Wouter Wijngaards 51ba9a4856 check better for iphlpapi.h
git-svn-id: file:///svn/unbound/trunk@1807 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 10:19:06 +00:00
Wouter Wijngaards 0fc43d4a62 Luca Bruno's patch.
git-svn-id: file:///svn/unbound/trunk@1806 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 10:07:13 +00:00
Wouter Wijngaards e5cab7b264 document last change
git-svn-id: file:///svn/unbound/trunk@1805 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 09:29:54 +00:00
Wouter Wijngaards 8e2ef1caeb - TRAFFIC keyword for testbound. Simplifies test generation.
${range lower val upper} to check probe timeout values.
- test with 5011-prepublish rollover and revocation.
- fix revocation of RR for autotrust, stray exclamation mark.


git-svn-id: file:///svn/unbound/trunk@1804 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-02 13:11:52 +00:00
Wouter Wijngaards c7bea9d33a more keys for autotrust testing.
git-svn-id: file:///svn/unbound/trunk@1803 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-02 10:04:34 +00:00
Wouter Wijngaards 415236c002 active probe
git-svn-id: file:///svn/unbound/trunk@1802 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 14:47:57 +00:00
Wouter Wijngaards 0a35d358ee More lint.
git-svn-id: file:///svn/unbound/trunk@1801 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 13:15:51 +00:00
Wouter Wijngaards 544b3f8428 lint and doc
git-svn-id: file:///svn/unbound/trunk@1800 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 13:09:55 +00:00
Wouter Wijngaards 9f9edf9ce6 docs
git-svn-id: file:///svn/unbound/trunk@1799 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 13:07:38 +00:00
Wouter Wijngaards eb3eb4f250 randomise probe time.
git-svn-id: file:///svn/unbound/trunk@1798 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 12:45:10 +00:00
Wouter Wijngaards de7808f2e0 do not confuse lint
git-svn-id: file:///svn/unbound/trunk@1797 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 09:48:57 +00:00
Wouter Wijngaards 4f2461a124 macro arithmetic.
git-svn-id: file:///svn/unbound/trunk@1796 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-01 09:30:28 +00:00
Wouter Wijngaards a24f9ff9ea variable processing.
git-svn-id: file:///svn/unbound/trunk@1795 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-31 15:58:38 +00:00
Wouter Wijngaards dafe1ae21b try again
git-svn-id: file:///svn/unbound/trunk@1794 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-28 10:22:44 +00:00
Wouter Wijngaards b8c4d7088d please lint
git-svn-id: file:///svn/unbound/trunk@1793 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-28 09:49:11 +00:00
Wouter Wijngaards f974f7880b Fixup unbound-control for forwards and stubs.
git-svn-id: file:///svn/unbound/trunk@1792 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-28 09:43:05 +00:00
Wouter Wijngaards bad061a35a Empty callback.
git-svn-id: file:///svn/unbound/trunk@1791 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-27 15:22:48 +00:00
Wouter Wijngaards ba47856946 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1790 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-27 10:24:13 +00:00
Wouter Wijngaards a1a71348bf Test for DLV DS lookup fix.
git-svn-id: file:///svn/unbound/trunk@1789 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-27 10:13:55 +00:00
Wouter Wijngaards e3b8b9bcea Test for DS lookup fix.
git-svn-id: file:///svn/unbound/trunk@1788 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-27 10:07:58 +00:00
Wouter Wijngaards 902323da2f autotrust probing and testbound with fake timer support.
git-svn-id: file:///svn/unbound/trunk@1787 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-26 13:23:49 +00:00
Wouter Wijngaards b422db1c80 clean up on exit because otherwise re-lex may not be possible
git-svn-id: file:///svn/unbound/trunk@1786 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 15:37:02 +00:00
Wouter Wijngaards 568253e4ff Fixup DS query handling.
git-svn-id: file:///svn/unbound/trunk@1785 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 15:15:10 +00:00
Wouter Wijngaards 6b959f8043 remove debug print
git-svn-id: file:///svn/unbound/trunk@1784 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 14:59:48 +00:00
Wouter Wijngaards ea36edbc03 less slash
git-svn-id: file:///svn/unbound/trunk@1783 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 14:08:11 +00:00
Wouter Wijngaards 0e7ff77cd2 prefix
git-svn-id: file:///svn/unbound/trunk@1782 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 14:01:25 +00:00
Wouter Wijngaards 012d05073b mingw32 fix
git-svn-id: file:///svn/unbound/trunk@1781 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 13:54:36 +00:00
Wouter Wijngaards b93f679049 configure detect ssl get_compression_methods and ctime_r fix.
git-svn-id: file:///svn/unbound/trunk@1780 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 13:05:31 +00:00
Wouter Wijngaards 6770898042 yylex_destroy configure.
git-svn-id: file:///svn/unbound/trunk@1779 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 12:10:24 +00:00
Wouter Wijngaards e89cbd00fa ctime_r compat definition
git-svn-id: file:///svn/unbound/trunk@1778 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 10:29:25 +00:00
Wouter Wijngaards b8a2dfb2c9 revoke point handling
git-svn-id: file:///svn/unbound/trunk@1777 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 10:02:17 +00:00
Wouter Wijngaards 7d90b75ce8 autotrust options
git-svn-id: file:///svn/unbound/trunk@1776 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 08:46:33 +00:00
Wouter Wijngaards 0210f4ae41 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1775 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 08:07:47 +00:00
Wouter Wijngaards d8e6209a2e Fixup memleak in unsupported algorithm checks at startup.
git-svn-id: file:///svn/unbound/trunk@1774 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-25 06:51:00 +00:00
Wouter Wijngaards 4e176a0aa6 less memory leaks.
git-svn-id: file:///svn/unbound/trunk@1773 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-24 15:56:45 +00:00
Wouter Wijngaards 78ed2ec08a Cleaner memleak output.
git-svn-id: file:///svn/unbound/trunk@1772 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-24 15:30:05 +00:00
Wouter Wijngaards 6f1f6dafb5 autotrust test routines.
git-svn-id: file:///svn/unbound/trunk@1771 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-24 14:40:25 +00:00
Wouter Wijngaards 28be658942 debug routines and first brazilian prime has been done.
git-svn-id: file:///svn/unbound/trunk@1770 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-21 15:27:23 +00:00
Wouter Wijngaards ca94ca57b4 autotrust work
git-svn-id: file:///svn/unbound/trunk@1769 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-20 11:49:33 +00:00
Wouter Wijngaards 1e2111f593 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1768 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-19 15:53:45 +00:00
Wouter Wijngaards 0deef63323 autotrust state table updates.
git-svn-id: file:///svn/unbound/trunk@1767 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-19 15:30:20 +00:00
Wouter Wijngaards 701b4ccdd6 autotrust event_update routine.
git-svn-id: file:///svn/unbound/trunk@1766 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-18 15:36:46 +00:00
Wouter Wijngaards a8dccbdd40 autotrust
git-svn-id: file:///svn/unbound/trunk@1765 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-17 15:58:27 +00:00
Wouter Wijngaards c42056b9aa Blacklist when 16 queries fail in a row.
git-svn-id: file:///svn/unbound/trunk@1764 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-17 12:43:23 +00:00
Wouter Wijngaards 1cd84ce84e make better use of the cache.
git-svn-id: file:///svn/unbound/trunk@1763 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-14 14:15:08 +00:00
Wouter Wijngaards 948567bea8 Fix bug in DLV. Iana portlist.
git-svn-id: file:///svn/unbound/trunk@1762 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-14 13:58:54 +00:00
Wouter Wijngaards ed67590f74 report RTT
git-svn-id: file:///svn/unbound/trunk@1761 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-14 08:35:46 +00:00
Wouter Wijngaards 21e791248f autotrust work
git-svn-id: file:///svn/unbound/trunk@1760 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-13 15:32:04 +00:00
Wouter Wijngaards a85b563d37 fixup
git-svn-id: file:///svn/unbound/trunk@1759 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-13 14:00:06 +00:00
Wouter Wijngaards 3251765048 autotrust work
git-svn-id: file:///svn/unbound/trunk@1758 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-12 15:26:47 +00:00
Wouter Wijngaards 5ecf670277 lint
git-svn-id: file:///svn/unbound/trunk@1757 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-11 14:25:34 +00:00
Wouter Wijngaards df59a81a56 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1756 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-11 12:25:56 +00:00
Wouter Wijngaards f3579ce5f2 Nicer names for test files.
git-svn-id: file:///svn/unbound/trunk@1755 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-11 10:33:56 +00:00
Wouter Wijngaards f015b01072 updated unit tests.
git-svn-id: file:///svn/unbound/trunk@1754 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-11 10:24:45 +00:00
Wouter Wijngaards 01cd1823a4 GOST checked for. ldns-1.6.1 release candidate tarball.
git-svn-id: file:///svn/unbound/trunk@1753 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-11 10:02:53 +00:00
Wouter Wijngaards 0205e3ae29 Label as experimental, include ldns that does so.
git-svn-id: file:///svn/unbound/trunk@1752 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-10 09:09:29 +00:00
Wouter Wijngaards 48d786dcc8 nicer warning during GOST testing.
git-svn-id: file:///svn/unbound/trunk@1751 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-07 15:29:25 +00:00
Wouter Wijngaards 538ca28828 OpenSSL config() and small memory leak. No more ENGINE_load_gost().
git-svn-id: file:///svn/unbound/trunk@1750 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-07 15:23:35 +00:00
Wouter Wijngaards b6076e3b6d Tests for DS GOST.
git-svn-id: file:///svn/unbound/trunk@1749 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-06 14:45:40 +00:00
Wouter Wijngaards 783178c785 iana and ldns updated.
git-svn-id: file:///svn/unbound/trunk@1748 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-06 13:59:53 +00:00
Wouter Wijngaards 1f4222aa94 GOST support with --enable-gost.
git-svn-id: file:///svn/unbound/trunk@1747 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-06 13:38:55 +00:00
Wouter Wijngaards 74abf6ced0 trunk to 1.3.4
git-svn-id: file:///svn/unbound/trunk@1746 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-05 15:55:58 +00:00
Wouter Wijngaards 870b34a8ec noted.
git-svn-id: file:///svn/unbound/trunk@1745 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-04 14:28:17 +00:00
Wouter Wijngaards 75611ab90d iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1743 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-04 12:55:26 +00:00
Wouter Wijngaards 49d65b8ebf Test example signatures for rsasha256 and rsasha512.
git-svn-id: file:///svn/unbound/trunk@1742 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-04 12:45:51 +00:00
Wouter Wijngaards 6f4522a55c iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1741 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-03 09:04:06 +00:00
Wouter Wijngaards b97dbd3c8f Fix for Roland, tell why the error happens.
git-svn-id: file:///svn/unbound/trunk@1740 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-08-03 08:46:26 +00:00
Wouter Wijngaards 112df5ab6c iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1739 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-27 12:44:50 +00:00
Wouter Wijngaards a134925d91 Updated cacti files for request queue statistics counters.
git-svn-id: file:///svn/unbound/trunk@1738 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-27 12:35:48 +00:00
Wouter Wijngaards 38bc0800ee 1.3.3rc1 tag.
git-svn-id: file:///svn/unbound/trunk@1737 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-23 13:40:26 +00:00
Wouter Wijngaards dcea0777bf Fixup for root prime requests sent when not needed.
git-svn-id: file:///svn/unbound/trunk@1736 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-23 13:21:42 +00:00
Wouter Wijngaards 894ba681f0 Fixup lameness handling in server selection.
git-svn-id: file:///svn/unbound/trunk@1735 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-21 13:52:39 +00:00
Wouter Wijngaards 72aa0bad92 Log option for bogus only.
git-svn-id: file:///svn/unbound/trunk@1734 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-20 14:22:29 +00:00
Wouter Wijngaards f73ce55c6e nicer error message
git-svn-id: file:///svn/unbound/trunk@1733 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-20 13:31:45 +00:00
Wouter Wijngaards 658e84f7a0 root hints update-anchor.sh
git-svn-id: file:///svn/unbound/trunk@1732 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-20 09:43:40 +00:00
Wouter Wijngaards f1bd145b60 ignore transient sendto conditions.
git-svn-id: file:///svn/unbound/trunk@1731 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-20 08:35:13 +00:00
Wouter Wijngaards b5f7bf86ac makedist can setup.exe crosscompile
git-svn-id: file:///svn/unbound/trunk@1730 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-16 10:56:00 +00:00
Wouter Wijngaards 56d8c3d59d remove debug print
git-svn-id: file:///svn/unbound/trunk@1729 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-16 10:19:48 +00:00
Wouter Wijngaards 2b9e9b4111 fix replacement malloc
git-svn-id: file:///svn/unbound/trunk@1728 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-16 10:17:52 +00:00
Wouter Wijngaards d9a6ccfb52 Setup.exe making on crosscompile.
git-svn-id: file:///svn/unbound/trunk@1727 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-15 15:10:17 +00:00
Wouter Wijngaards cd5ac9634c with autoconf
git-svn-id: file:///svn/unbound/trunk@1726 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-15 14:24:45 +00:00
Wouter Wijngaards b5f2b7d36b fixup compile on XP.
git-svn-id: file:///svn/unbound/trunk@1725 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-15 13:47:58 +00:00
Wouter Wijngaards 91e49260a7 documented. Makefile slightly better at dependencies.
git-svn-id: file:///svn/unbound/trunk@1724 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-15 13:08:52 +00:00
Wouter Wijngaards a0d67a87f0 setup.exe can be created from crosscompile.
git-svn-id: file:///svn/unbound/trunk@1723 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-15 11:50:13 +00:00
Wouter Wijngaards 43d9c09372 crosscompile with mingw32 works.
git-svn-id: file:///svn/unbound/trunk@1722 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-14 14:44:53 +00:00
Wouter Wijngaards e33276b5c3 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1721 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-14 08:24:23 +00:00
Wouter Wijngaards 630e83f58b ldns update and RAND_MAX clean up
git-svn-id: file:///svn/unbound/trunk@1720 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-14 07:54:05 +00:00
Wouter Wijngaards ff77c81fd1 fixup unit test for portability
git-svn-id: file:///svn/unbound/trunk@1719 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 17:06:11 +00:00
Wouter Wijngaards 560e1c86b3 reported by Mees de Roo
git-svn-id: file:///svn/unbound/trunk@1718 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 16:00:20 +00:00
Wouter Wijngaards 73da11fe07 Fix mingw ID randomness from 8 to 16 bits.
git-svn-id: file:///svn/unbound/trunk@1717 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 15:47:42 +00:00
Wouter Wijngaards 7b03403efd examine dnskey on child side retry.
git-svn-id: file:///svn/unbound/trunk@1716 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 14:14:11 +00:00
Wouter Wijngaards 902cad61c6 trunk moves to 1.3.3.
git-svn-id: file:///svn/unbound/trunk@1715 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 13:28:12 +00:00
Wouter Wijngaards 82f83d8d06 Fix for windows crash at start (after install for example)
git-svn-id: file:///svn/unbound/trunk@1713 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-13 07:45:19 +00:00
Wouter Wijngaards fa842c30de Final version
git-svn-id: file:///svn/unbound/trunk@1712 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-10 12:27:16 +00:00
Wouter Wijngaards 506af05011 child retry
git-svn-id: file:///svn/unbound/trunk@1711 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-10 10:01:58 +00:00
Wouter Wijngaards f644c06516 updated plans
git-svn-id: file:///svn/unbound/trunk@1710 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-09 14:48:31 +00:00
Wouter Wijngaards 9755c94372 version 1.3.2 in trunk
git-svn-id: file:///svn/unbound/trunk@1709 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-09 09:08:08 +00:00
Wouter Wijngaards f0138c1cca Tag 1.3.1
git-svn-id: file:///svn/unbound/trunk@1708 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-09 09:00:24 +00:00
Wouter Wijngaards 374a7f45c2 it could be worse
git-svn-id: file:///svn/unbound/trunk@1707 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-08 12:07:03 +00:00
Wouter Wijngaards f3b66c177b Second precision.
git-svn-id: file:///svn/unbound/trunk@1706 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-08 11:37:50 +00:00
Wouter Wijngaards d535e6919e more thinking
git-svn-id: file:///svn/unbound/trunk@1705 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-07 15:00:18 +00:00
Wouter Wijngaards 0c7b289051 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1704 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-07 10:37:56 +00:00
Wouter Wijngaards 5decb468c2 rrset id for cache flush
git-svn-id: file:///svn/unbound/trunk@1703 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-07 10:16:34 +00:00
Wouter Wijngaards 5e90d568eb updated fedora spec file.
git-svn-id: file:///svn/unbound/trunk@1702 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 17:02:41 +00:00
Wouter Wijngaards 9e8a5100ad updated fedora spec file
git-svn-id: file:///svn/unbound/trunk@1701 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 17:02:17 +00:00
Wouter Wijngaards 1dc1ffabb4 Plans.
git-svn-id: file:///svn/unbound/trunk@1700 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 14:51:58 +00:00
Wouter Wijngaards c299e49384 uname fixup.
git-svn-id: file:///svn/unbound/trunk@1699 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 12:13:15 +00:00
Wouter Wijngaards 8595d94e0f Prettier, comments from Jelte.
git-svn-id: file:///svn/unbound/trunk@1698 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 09:34:47 +00:00
Wouter Wijngaards bfceac5b2e reviewcomments
git-svn-id: file:///svn/unbound/trunk@1697 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-06 08:34:54 +00:00
Wouter Wijngaards b794eb84ac changelog
git-svn-id: file:///svn/unbound/trunk@1696 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-03 19:41:31 +00:00
Wouter Wijngaards 1cf8bdae51 Fix for linking when ldns installed.
git-svn-id: file:///svn/unbound/trunk@1695 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-03 19:40:14 +00:00
Wouter Wijngaards 1bc4092127 fixup
git-svn-id: file:///svn/unbound/trunk@1694 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-07-01 11:48:34 +00:00
Wouter Wijngaards 1e97b85e45 Ldns 1.6.0 to be.
git-svn-id: file:///svn/unbound/trunk@1693 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-30 14:08:39 +00:00
Wouter Wijngaards edae0ad954 More lenient.
git-svn-id: file:///svn/unbound/trunk@1692 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-30 13:20:02 +00:00
Wouter Wijngaards d453b4a43b More lenient checks.
git-svn-id: file:///svn/unbound/trunk@1691 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-30 12:50:57 +00:00
Wouter Wijngaards 7bd415ffdd Removed debug prints.
git-svn-id: file:///svn/unbound/trunk@1690 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-30 08:24:19 +00:00
Wouter Wijngaards d232dbd4a5 Linux IPv6 large response support.
git-svn-id: file:///svn/unbound/trunk@1689 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-29 13:47:48 +00:00
Wouter Wijngaards 373758092f ldns tarball update.
git-svn-id: file:///svn/unbound/trunk@1688 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-29 10:36:52 +00:00
Wouter Wijngaards b6406cae1e Better wrongly truncated check. And debug statements.
git-svn-id: file:///svn/unbound/trunk@1687 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-29 10:15:27 +00:00
Wouter Wijngaards 298aff3ad2 ldns tarball update.
git-svn-id: file:///svn/unbound/trunk@1686 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-29 09:59:43 +00:00
Wouter Wijngaards efee0803d0 debugprint for wrongly_truncated
git-svn-id: file:///svn/unbound/trunk@1685 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-29 08:52:58 +00:00
Wouter Wijngaards ec30ae3ca6 Fixup for EDNS probe (neater than patch on mailing list).
git-svn-id: file:///svn/unbound/trunk@1684 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-26 13:15:06 +00:00
Wouter Wijngaards 4ead61eb63 Updated fedora spec file, with python support.
git-svn-id: file:///svn/unbound/trunk@1683 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-22 15:00:21 +00:00
Wouter Wijngaards 206a6bb539 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1682 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-22 08:04:01 +00:00
Wouter Wijngaards fb5fa2bdb1 and changelog separate.
git-svn-id: file:///svn/unbound/trunk@1681 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-22 07:56:27 +00:00
Wouter Wijngaards 8b2f5dcaf0 Fixup strict aliasing safer.
git-svn-id: file:///svn/unbound/trunk@1680 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-22 07:56:19 +00:00
Wouter Wijngaards 4d97a3a400 documentation
git-svn-id: file:///svn/unbound/trunk@1679 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 11:40:44 +00:00
Wouter Wijngaards 368dc659ea Handle referral path check cases where NS is in the answer section.
git-svn-id: file:///svn/unbound/trunk@1678 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 08:55:12 +00:00
Wouter Wijngaards e49e0539d8 newer bison.
git-svn-id: file:///svn/unbound/trunk@1677 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 07:47:46 +00:00
Wouter Wijngaards aec8f4644f strict aliasing warning in config_file code.
git-svn-id: file:///svn/unbound/trunk@1676 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 07:45:45 +00:00
Wouter Wijngaards 6f745bc49e iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1675 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 07:27:53 +00:00
Wouter Wijngaards ef564b5a29 Fixup strict aliasing warning on Fedora 11.
git-svn-id: file:///svn/unbound/trunk@1674 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-19 07:09:12 +00:00
Wouter Wijngaards c1b2364d1d please lint
git-svn-id: file:///svn/unbound/trunk@1673 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-18 14:39:50 +00:00
Wouter Wijngaards 790fe91662 python warning suppress.
git-svn-id: file:///svn/unbound/trunk@1672 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-18 14:28:28 +00:00
Wouter Wijngaards 819f9d817a autoconf 2.63 for configure
git-svn-id: file:///svn/unbound/trunk@1671 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-18 14:08:56 +00:00
Wouter Wijngaards e0bc4f2c97 extremely lenient for truncated positive replies
git-svn-id: file:///svn/unbound/trunk@1670 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-18 10:59:59 +00:00
Wouter Wijngaards efcb61fb22 Fixup parse problem reported by Hauke Lampe.
git-svn-id: file:///svn/unbound/trunk@1669 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-18 09:31:58 +00:00
Wouter Wijngaards d94c548dab non-TODO.
git-svn-id: file:///svn/unbound/trunk@1668 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-17 15:18:38 +00:00
Wouter Wijngaards a18c4eaebc Do later, notabug but a feature.
git-svn-id: file:///svn/unbound/trunk@1667 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-17 14:58:07 +00:00
Wouter Wijngaards e92fd4ff33 typo
git-svn-id: file:///svn/unbound/trunk@1666 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-17 11:55:48 +00:00
Wouter Wijngaards 7bd75483e1 credits entry for cz.nic
git-svn-id: file:///svn/unbound/trunk@1665 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-17 07:12:16 +00:00
Wouter Wijngaards 573fd6652b Extra test, but no dlv negative cache failures discovered.
git-svn-id: file:///svn/unbound/trunk@1664 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 14:57:19 +00:00
Wouter Wijngaards 13d2817b62 python testenv easier to use.
git-svn-id: file:///svn/unbound/trunk@1663 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 12:38:46 +00:00
Wouter Wijngaards f39e5fe3a8 check messages taken from cache, also in iterator.
git-svn-id: file:///svn/unbound/trunk@1662 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 12:03:41 +00:00
Wouter Wijngaards a569062627 touchup to munin memory report
git-svn-id: file:///svn/unbound/trunk@1661 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 09:34:18 +00:00
Wouter Wijngaards a40ec4b935 Fix max depth check.
git-svn-id: file:///svn/unbound/trunk@1660 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 09:06:52 +00:00
Wouter Wijngaards 427ddba6d7 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1659 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 08:31:07 +00:00
Wouter Wijngaards b757b29910 FAQ entry.
git-svn-id: file:///svn/unbound/trunk@1658 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-16 08:23:32 +00:00
Wouter Wijngaards 3898abde02 Fixup DLV lookups and pickup responses from cache.
git-svn-id: file:///svn/unbound/trunk@1657 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-15 13:27:53 +00:00
Wouter Wijngaards 8466ac7e7f bug #254, whitespace in example.conf
git-svn-id: file:///svn/unbound/trunk@1656 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-13 09:49:53 +00:00
Wouter Wijngaards 80f6ed2ff0 Check right value.
git-svn-id: file:///svn/unbound/trunk@1655 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-12 14:16:13 +00:00
Wouter Wijngaards 19d72a41cb todo
git-svn-id: file:///svn/unbound/trunk@1654 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-12 10:04:29 +00:00
Wouter Wijngaards 07411c16a9 Fixup stub below a forward, the stub is still honored and not trumped by the
forward zone.


git-svn-id: file:///svn/unbound/trunk@1653 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-12 09:01:42 +00:00
Wouter Wijngaards 5ca6d8c50b mesh callbacks review, call error if deleted unfulfilled, check fptr wlist.
git-svn-id: file:///svn/unbound/trunk@1652 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-12 07:53:36 +00:00
Wouter Wijngaards 16e920f416 Fixed potential wrong NSEC, but the bug could not be triggered. Unit test
added anyway.


git-svn-id: file:///svn/unbound/trunk@1651 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-12 07:23:04 +00:00
Wouter Wijngaards 89f0fd7252 forward-zone and DS fixup. Test.
git-svn-id: file:///svn/unbound/trunk@1650 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-11 18:54:07 +00:00
Wouter Wijngaards a40ec010be Got contributed script to turn etc hosts into unbound config.
git-svn-id: file:///svn/unbound/trunk@1649 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-11 18:30:53 +00:00
Wouter Wijngaards 1b8519e619 Fixup stub chain of trust from public to private servers.
git-svn-id: file:///svn/unbound/trunk@1648 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-11 14:02:37 +00:00
Wouter Wijngaards add0079981 And review fixup recommit.
git-svn-id: file:///svn/unbound/trunk@1647 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-11 10:52:28 +00:00
Wouter Wijngaards 2c56564e4e recommit 9 June 2009.
git-svn-id: file:///svn/unbound/trunk@1646 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-11 09:43:23 +00:00
Wouter Wijngaards baaaae857a munin show total memory if sbrk trick does not work (eg. FreeBSD).
git-svn-id: file:///svn/unbound/trunk@1645 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 15:43:15 +00:00
Wouter Wijngaards b6099d5f55 fail python if no swig
git-svn-id: file:///svn/unbound/trunk@1644 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 14:53:27 +00:00
Wouter Wijngaards 8c36960c29 lint, aliasing.
git-svn-id: file:///svn/unbound/trunk@1643 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 14:51:00 +00:00
Wouter Wijngaards 3c5c0b2727 iana post list updated.
git-svn-id: file:///svn/unbound/trunk@1642 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 13:55:58 +00:00
Wouter Wijngaards 6dd6542f04 TODO items.
git-svn-id: file:///svn/unbound/trunk@1641 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 13:47:06 +00:00
Wouter Wijngaards 6451748967 Remove REVOKE flag support.
git-svn-id: file:///svn/unbound/trunk@1639 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-08 08:29:17 +00:00
Wouter Wijngaards b2ff49e4c4 review comments Matthijs.
git-svn-id: file:///svn/unbound/trunk@1637 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-03 08:06:42 +00:00
Wouter Wijngaards 38ec4f4777 Fixup bad free.
git-svn-id: file:///svn/unbound/trunk@1635 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-03 07:57:19 +00:00
Wouter Wijngaards 413d579e58 1.3.0 tag remove
git-svn-id: file:///svn/unbound/trunk@1633 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-02 13:44:57 +00:00
Wouter Wijngaards 3494191250 ldns updated.
git-svn-id: file:///svn/unbound/trunk@1632 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-02 09:14:29 +00:00
Wouter Wijngaards 4b449309e5 rsasha256 and rsasha512 not enabled by default.
git-svn-id: file:///svn/unbound/trunk@1631 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-06-02 09:04:16 +00:00
Wouter Wijngaards 71b6537666 Fixup docbug reported by Matthew Dempsky.
git-svn-id: file:///svn/unbound/trunk@1630 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-29 08:48:44 +00:00
Jelte Jansen 886721c060 let's version this one
git-svn-id: file:///svn/unbound/trunk@1629 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-28 12:48:45 +00:00
Wouter Wijngaards cdb2726e68 iana and ldns updates.
git-svn-id: file:///svn/unbound/trunk@1628 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-28 08:45:04 +00:00
Wouter Wijngaards caaa90a200 Removed debug statement.
git-svn-id: file:///svn/unbound/trunk@1627 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-27 12:28:23 +00:00
Wouter Wijngaards 5e2189bb35 Fixup crash if root prime has a timeout and parent qstate has been deleted.
git-svn-id: file:///svn/unbound/trunk@1626 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-27 12:10:07 +00:00
Wouter Wijngaards 7758098250 change in debug statements.
git-svn-id: file:///svn/unbound/trunk@1625 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-27 11:27:41 +00:00
Wouter Wijngaards b86b9f7fdc Fix IPv6 detection on XP.
Fix loop to service on quit when there are messages waiting.

git-svn-id: file:///svn/unbound/trunk@1624 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-27 08:24:19 +00:00
Wouter Wijngaards daf63c7e89 Fixup assertion that no longer holds (since the new DoS prevention code jostles out old queries).
git-svn-id: file:///svn/unbound/trunk@1623 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-05-26 14:42:14 +00:00
Wouter Wijngaards 578c1632ce Windows handle leakage fixes: closesocket or else the networkstack leaks handles (for ever, even after closing the application), and use own mutex implementation (whee!).
git-svn-id: file:///svn/unbound/trunk@1622 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-29 15:23:08 +00:00
Wouter Wijngaards 37f403955b keeping ldns and unbound ldns-testpkts the same
git-svn-id: file:///svn/unbound/trunk@1620 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-28 09:06:45 +00:00
Wouter Wijngaards dd42c84b5e 1.3.0 svn tag.
git-svn-id: file:///svn/unbound/trunk@1619 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-28 08:28:45 +00:00
Wouter Wijngaards ffe442608c ifdef windows functions in testbound.
git-svn-id: file:///svn/unbound/trunk@1618 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-27 13:26:15 +00:00
Wouter Wijngaards 21389820a7 Optimisation.
git-svn-id: file:///svn/unbound/trunk@1617 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-27 12:40:22 +00:00
Wouter Wijngaards 1562a13332 libcrypto and python checks.
git-svn-id: file:///svn/unbound/trunk@1616 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-23 15:47:49 +00:00
Wouter Wijngaards ea0148caf8 python lock deadlock on MacOSX.
git-svn-id: file:///svn/unbound/trunk@1615 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-23 14:59:44 +00:00
Wouter Wijngaards 8cc8261947 Pylib for macOSX
git-svn-id: file:///svn/unbound/trunk@1614 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-23 14:34:32 +00:00
Wouter Wijngaards 7c2813eb82 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1613 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-23 13:00:01 +00:00
Wouter Wijngaards 81023e116d solaris thread safety of thread functions.
git-svn-id: file:///svn/unbound/trunk@1612 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-23 12:51:33 +00:00
Wouter Wijngaards 5cacd20a6e autoconf on linux.
git-svn-id: file:///svn/unbound/trunk@1611 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-21 14:33:10 +00:00
Wouter Wijngaards 1aedf47ebe Fix swig detection.
git-svn-id: file:///svn/unbound/trunk@1610 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-21 14:32:44 +00:00
Wouter Wijngaards d75777ec63 build fix.
git-svn-id: file:///svn/unbound/trunk@1609 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-21 08:36:39 +00:00
Wouter Wijngaards d1a27b6d34 python include and configlexer fwrite warning.
git-svn-id: file:///svn/unbound/trunk@1608 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 12:14:43 +00:00
Wouter Wijngaards dd7f5cc718 Line endings.
git-svn-id: file:///svn/unbound/trunk@1607 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 11:52:42 +00:00
Wouter Wijngaards 718e235a47 rsasha512 fixup and successful test of new winsock handler.
git-svn-id: file:///svn/unbound/trunk@1606 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 11:18:19 +00:00
Wouter Wijngaards 9f1ee24abb faster fix for winsock handler.
git-svn-id: file:///svn/unbound/trunk@1605 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 09:01:52 +00:00
Wouter Wijngaards 6a152952bf more capacity for winsock handler.
git-svn-id: file:///svn/unbound/trunk@1604 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 08:35:15 +00:00
Wouter Wijngaards f3d98d17f4 Fix unix version of windows bug found yesterday.
git-svn-id: file:///svn/unbound/trunk@1603 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-17 07:59:32 +00:00
Wouter Wijngaards 9ea5b16bae Windows winsock handler problem fixup.
git-svn-id: file:///svn/unbound/trunk@1602 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-16 14:54:58 +00:00
Wouter Wijngaards f32d07786a iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1601 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-16 13:31:41 +00:00
Wouter Wijngaards 7138a4cf42 winsock exit faster and more logging possible.
git-svn-id: file:///svn/unbound/trunk@1600 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-16 12:53:35 +00:00
Wouter Wijngaards 53a026eb4e handle NOTCONN.
git-svn-id: file:///svn/unbound/trunk@1599 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-14 13:35:10 +00:00
Wouter Wijngaards 768c4b2643 min-ttl option and tests for min-ttl and max-ttl.
git-svn-id: file:///svn/unbound/trunk@1598 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-14 10:10:11 +00:00
Wouter Wijngaards 3eda6e26ff better help text in makedist.sh
git-svn-id: file:///svn/unbound/trunk@1597 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-14 09:23:21 +00:00
Wouter Wijngaards 54bd0fff06 bug #245 fixed.
git-svn-id: file:///svn/unbound/trunk@1596 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-14 08:27:16 +00:00
Wouter Wijngaards 4ad2eb2549 detect gost.
git-svn-id: file:///svn/unbound/trunk@1595 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-09 15:23:14 +00:00
Wouter Wijngaards bfe96b89f0 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1594 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-09 15:00:08 +00:00
Wouter Wijngaards 3b386055c7 RSASHA256 implicitly means NSEC3 support.
git-svn-id: file:///svn/unbound/trunk@1593 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-09 14:51:17 +00:00
Wouter Wijngaards 5a9dcd323d remove empty line
git-svn-id: file:///svn/unbound/trunk@1592 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-07 15:02:57 +00:00
Wouter Wijngaards 3ee3492095 NXDOMAIN TTL considerations.
git-svn-id: file:///svn/unbound/trunk@1591 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 14:36:42 +00:00
Wouter Wijngaards 1e1ac9900a signature clock skew code.
git-svn-id: file:///svn/unbound/trunk@1590 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 14:09:33 +00:00
Wouter Wijngaards 397985b2c8 python mod invalidate routine fix.
git-svn-id: file:///svn/unbound/trunk@1589 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 12:35:02 +00:00
Wouter Wijngaards 93f6117ab2 install uninstall for python.
git-svn-id: file:///svn/unbound/trunk@1588 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 12:22:11 +00:00
Wouter Wijngaards f46febcc97 pyunbound test
git-svn-id: file:///svn/unbound/trunk@1587 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 11:04:54 +00:00
Wouter Wijngaards d745581dbd FreeBSD jail detect IPv6 not accessible.
git-svn-id: file:///svn/unbound/trunk@1586 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 10:20:08 +00:00
Wouter Wijngaards 62fca9e1fb and configure update
git-svn-id: file:///svn/unbound/trunk@1585 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 09:20:01 +00:00
Wouter Wijngaards ac9c3b84b1 windows compile fix.
git-svn-id: file:///svn/unbound/trunk@1584 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-06 08:10:14 +00:00
Wouter Wijngaards 49913a1c9e doc test fixup.
git-svn-id: file:///svn/unbound/trunk@1583 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-03 14:13:25 +00:00
Wouter Wijngaards 5445bf72ba - Fixed a bug that caused messages to be stored in the cache too
long.  Hard to trigger, but NXDOMAINs for nameservers or CNAME
	  targets have been more vulnerable to the TTL miscalculation bug. 


git-svn-id: file:///svn/unbound/trunk@1582 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-03 13:49:40 +00:00
Wouter Wijngaards 1fa1c9d1b1 unit test for python module.
git-svn-id: file:///svn/unbound/trunk@1581 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 14:44:57 +00:00
Wouter Wijngaards af102d24ce Fix for flush_zone
git-svn-id: file:///svn/unbound/trunk@1580 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 11:56:01 +00:00
Wouter Wijngaards a5c428bb8d please doxygen
git-svn-id: file:///svn/unbound/trunk@1579 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 10:21:37 +00:00
Wouter Wijngaards 445f8a4e22 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1578 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 10:21:20 +00:00
Wouter Wijngaards a5c76d0579 docs
git-svn-id: file:///svn/unbound/trunk@1577 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 10:14:27 +00:00
Wouter Wijngaards db94e389da Moved documentation for pythonmod.
git-svn-id: file:///svn/unbound/trunk@1576 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 09:51:51 +00:00
Wouter Wijngaards c3bf9f1bb3 Moved documentation.
git-svn-id: file:///svn/unbound/trunk@1575 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 09:50:45 +00:00
Wouter Wijngaards 3322c9e141 added
git-svn-id: file:///svn/unbound/trunk@1574 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 09:50:24 +00:00
Wouter Wijngaards 2e20c86309 moved files. Make _unbound python libunbound module.
git-svn-id: file:///svn/unbound/trunk@1573 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-02 09:47:35 +00:00
Wouter Wijngaards 0b4fe963d5 pyunbound work
git-svn-id: file:///svn/unbound/trunk@1572 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-01 14:34:13 +00:00
Wouter Wijngaards 7ad28caa41 new libunbound calls documented.
git-svn-id: file:///svn/unbound/trunk@1571 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-01 12:57:13 +00:00
Wouter Wijngaards c6da8de517 suppress ipv4mapped errors from logs.
git-svn-id: file:///svn/unbound/trunk@1570 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-04-01 10:01:43 +00:00
Wouter Wijngaards c1f4b92026 Fix pthread test.
git-svn-id: file:///svn/unbound/trunk@1569 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 14:42:43 +00:00
Wouter Wijngaards f9aeb8904d Python checks fix.
git-svn-id: file:///svn/unbound/trunk@1568 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 12:32:54 +00:00
Wouter Wijngaards 64e3db1f04 Read dev/random before chroot.
git-svn-id: file:///svn/unbound/trunk@1567 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 12:16:21 +00:00
Wouter Wijngaards a12dcdcdc4 retest
git-svn-id: file:///svn/unbound/trunk@1566 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 09:39:34 +00:00
Wouter Wijngaards d369a1ac48 RRSIG validation fixed after Stephane Bortzmeyer reported.
git-svn-id: file:///svn/unbound/trunk@1565 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 09:35:48 +00:00
Wouter Wijngaards 3a7f86982e configure fixes.
git-svn-id: file:///svn/unbound/trunk@1564 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-30 08:47:20 +00:00
Wouter Wijngaards 6803b9461f python compile fix for BSD 7.1-current.
git-svn-id: file:///svn/unbound/trunk@1563 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-27 14:59:04 +00:00
Wouter Wijngaards 868df9f584 nicer -h output
git-svn-id: file:///svn/unbound/trunk@1562 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-27 13:09:00 +00:00
Wouter Wijngaards 7dcca025f4 python work
git-svn-id: file:///svn/unbound/trunk@1561 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-26 15:47:45 +00:00
Wouter Wijngaards e0cd16b38c pyunbound works.
git-svn-id: file:///svn/unbound/trunk@1560 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-26 12:47:04 +00:00
Wouter Wijngaards ebd14d9f35 Python work.
git-svn-id: file:///svn/unbound/trunk@1559 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-26 09:31:28 +00:00
Wouter Wijngaards 31ec67fcce and for out of dir builds
git-svn-id: file:///svn/unbound/trunk@1558 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-25 16:22:02 +00:00
Wouter Wijngaards 11f11a5377 python module compiles.
git-svn-id: file:///svn/unbound/trunk@1557 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-25 16:20:34 +00:00
Wouter Wijngaards 0799d77798 python contribution from Zdenek Vasicek and Marek Vavrusa (BSD licensed).
git-svn-id: file:///svn/unbound/trunk@1556 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-25 14:47:47 +00:00
Wouter Wijngaards 910167b38c better libtool host detection
git-svn-id: file:///svn/unbound/trunk@1555 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 16:16:44 +00:00
Wouter Wijngaards 60f4826ff7 No longer underquoted.
git-svn-id: file:///svn/unbound/trunk@1554 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 15:31:11 +00:00
Wouter Wijngaards a87d222547 rpath for ldns if needed
git-svn-id: file:///svn/unbound/trunk@1553 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 14:55:34 +00:00
Wouter Wijngaards 25467d37e3 64bit types not handled well enough builtin.
git-svn-id: file:///svn/unbound/trunk@1552 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 14:08:58 +00:00
Wouter Wijngaards faf17d6e86 Nicer.
git-svn-id: file:///svn/unbound/trunk@1551 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 13:55:12 +00:00
Wouter Wijngaards 0f3e00e3a6 Neater compile command line, no -I/usr/include, no double spaces.
git-svn-id: file:///svn/unbound/trunk@1550 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 13:22:09 +00:00
Wouter Wijngaards eaff1bdeb5 fix postcommit errors.
git-svn-id: file:///svn/unbound/trunk@1549 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 12:58:42 +00:00
Wouter Wijngaards d8b8eabeac flex on linux
git-svn-id: file:///svn/unbound/trunk@1548 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 12:53:25 +00:00
Wouter Wijngaards e5c414355e solaris 11 fix
git-svn-id: file:///svn/unbound/trunk@1547 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 12:47:56 +00:00
Wouter Wijngaards dbf9f42142 iana updated. config.h.in neater.
git-svn-id: file:///svn/unbound/trunk@1546 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 11:53:31 +00:00
Wouter Wijngaards a30d1f9f20 Neater configure and no double config.h includes.
git-svn-id: file:///svn/unbound/trunk@1545 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-24 10:42:57 +00:00
Wouter Wijngaards ee8465d887 More common configure code.
git-svn-id: file:///svn/unbound/trunk@1544 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-23 18:09:19 +00:00
Wouter Wijngaards 00170dfa41 Nicer configure.
git-svn-id: file:///svn/unbound/trunk@1543 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-23 14:59:58 +00:00
Wouter Wijngaards 912db8d277 launchd plist file, and deprecation test for MacOSX use of daemon(3).
git-svn-id: file:///svn/unbound/trunk@1542 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-23 11:22:57 +00:00
Wouter Wijngaards d0c6177f44 build_test_fix
git-svn-id: file:///svn/unbound/trunk@1541 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-20 16:16:34 +00:00
Wouter Wijngaards 5069af975f autoconf 2.61
git-svn-id: file:///svn/unbound/trunk@1540 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-20 12:24:06 +00:00
Wouter Wijngaards b0ef703c1b bug 239
git-svn-id: file:///svn/unbound/trunk@1539 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-20 10:28:20 +00:00
Wouter Wijngaards c154c6b7b4 easier to compile on windows.
git-svn-id: file:///svn/unbound/trunk@1538 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-19 14:24:19 +00:00
Wouter Wijngaards 2978e72596 Use _beginthreadex if available.
git-svn-id: file:///svn/unbound/trunk@1537 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-19 13:04:28 +00:00
Wouter Wijngaards 6e9d768c6c iana_updated.
git-svn-id: file:///svn/unbound/trunk@1536 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-19 11:13:37 +00:00
Wouter Wijngaards d8392b01d3 windows README
git-svn-id: file:///svn/unbound/trunk@1535 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-19 11:04:50 +00:00
Wouter Wijngaards f861f19843 done.
git-svn-id: file:///svn/unbound/trunk@1534 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-18 15:56:57 +00:00
Wouter Wijngaards 97a73402fc inverse trust anchor.
git-svn-id: file:///svn/unbound/trunk@1533 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-18 14:02:46 +00:00
Wouter Wijngaards 41e589b08b Fixup trust anchor algorithm check.
git-svn-id: file:///svn/unbound/trunk@1532 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-18 13:07:48 +00:00
Wouter Wijngaards cfd739e2eb Tests for bug that we do not have.
git-svn-id: file:///svn/unbound/trunk@1531 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-18 08:11:23 +00:00
Wouter Wijngaards bcd6fee1f4 test and nicer error handling on target query failure.
git-svn-id: file:///svn/unbound/trunk@1530 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-17 14:45:31 +00:00
Wouter Wijngaards 6355d45e70 done.
git-svn-id: file:///svn/unbound/trunk@1529 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-16 15:40:25 +00:00
Wouter Wijngaards 76c0cb3913 unbound cacti contrib
git-svn-id: file:///svn/unbound/trunk@1528 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-16 13:31:44 +00:00
Wouter Wijngaards 116e9d9d8d fixup small buglet.
git-svn-id: file:///svn/unbound/trunk@1527 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-16 09:15:29 +00:00
Wouter Wijngaards 61135d1456 Fixups for windows.
git-svn-id: file:///svn/unbound/trunk@1526 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-13 15:29:31 +00:00
Wouter Wijngaards 5f27e00a19 doxygen, lex, yacc.
git-svn-id: file:///svn/unbound/trunk@1525 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-13 09:27:37 +00:00
Wouter Wijngaards 0d575036cb update anchors on win.
git-svn-id: file:///svn/unbound/trunk@1524 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-12 16:31:57 +00:00
Wouter Wijngaards afe9d4bb67 more consistency.
git-svn-id: file:///svn/unbound/trunk@1523 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-12 16:11:11 +00:00
Wouter Wijngaards 159d59a3dc Fix locking error.
git-svn-id: file:///svn/unbound/trunk@1522 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-12 13:14:40 +00:00
Wouter Wijngaards ac4535d4e5 log and tests fixups.
git-svn-id: file:///svn/unbound/trunk@1521 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-12 09:36:28 +00:00
Wouter Wijngaards 8c2d5d42d9 windows work.
git-svn-id: file:///svn/unbound/trunk@1520 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-11 16:32:07 +00:00
Wouter Wijngaards 363a4712b2 Parser allows syslog on windows.
git-svn-id: file:///svn/unbound/trunk@1519 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-11 11:53:47 +00:00
Wouter Wijngaards c02fd13138 iana update
git-svn-id: file:///svn/unbound/trunk@1518 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-11 11:41:47 +00:00
Wouter Wijngaards e4c5af61c6 XP tested. winsock event handler fixed for signal events. Neater code integration.
git-svn-id: file:///svn/unbound/trunk@1517 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-11 11:02:34 +00:00
Wouter Wijngaards 254e6ec34f Windows work.
git-svn-id: file:///svn/unbound/trunk@1516 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-10 16:14:09 +00:00
Wouter Wijngaards 47d7fd59ca makedist no double tags on version.
nicer setup, nicer exec, starts unbound after install.

git-svn-id: file:///svn/unbound/trunk@1515 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-10 12:35:09 +00:00
Wouter Wijngaards 6015524e34 iana portlist update
git-svn-id: file:///svn/unbound/trunk@1514 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-10 09:25:27 +00:00
Wouter Wijngaards 80ef8e2f7e Installer script to make setup.exe.
git-svn-id: file:///svn/unbound/trunk@1513 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-09 16:16:39 +00:00
Wouter Wijngaards 157c7cde0d Memory leak fixup.
git-svn-id: file:///svn/unbound/trunk@1512 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-05 08:19:52 +00:00
Wouter Wijngaards 1947f8cbb1 please doxygen
git-svn-id: file:///svn/unbound/trunk@1511 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-03 19:15:44 +00:00
Wouter Wijngaards 541ca65c9c fixup for unix compile.
git-svn-id: file:///svn/unbound/trunk@1510 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-03 19:02:59 +00:00
Wouter Wijngaards 53b51dbdef windows registry settings.
git-svn-id: file:///svn/unbound/trunk@1509 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-03 15:55:02 +00:00
Wouter Wijngaards 7de3900654 combined icon
git-svn-id: file:///svn/unbound/trunk@1508 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-03 10:34:56 +00:00
Wouter Wijngaards 208e698306 1.3.0 without snapshot extension from makedist -w.
git-svn-id: file:///svn/unbound/trunk@1507 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-03 09:15:52 +00:00
Wouter Wijngaards eafa979e0f mingw work.
git-svn-id: file:///svn/unbound/trunk@1506 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-02 16:43:10 +00:00
Wouter Wijngaards 97a3830515 fix test app.
git-svn-id: file:///svn/unbound/trunk@1505 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-02 10:14:36 +00:00
Wouter Wijngaards 2bf8d9b4b2 FAQ entry
git-svn-id: file:///svn/unbound/trunk@1504 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-02 09:35:56 +00:00
Wouter Wijngaards a9754e0727 iana portlist updated and doxygen comments.
git-svn-id: file:///svn/unbound/trunk@1503 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-02 08:32:27 +00:00
Wouter Wijngaards 1811270c68 Fix export symbols.
git-svn-id: file:///svn/unbound/trunk@1502 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-03-02 08:21:19 +00:00
Wouter Wijngaards f30fc9133c services api integration.
git-svn-id: file:///svn/unbound/trunk@1501 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-27 16:29:40 +00:00
Wouter Wijngaards 7a2c1c8d47 new configure and lexer fix.
git-svn-id: file:///svn/unbound/trunk@1500 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-27 09:38:11 +00:00
Wouter Wijngaards fef17eadb6 windows service configuration.
git-svn-id: file:///svn/unbound/trunk@1499 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-26 16:18:11 +00:00
Wouter Wijngaards 840d7fd34f makedist windows distro feature.
git-svn-id: file:///svn/unbound/trunk@1498 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-26 16:17:46 +00:00
Wouter Wijngaards ae866b00a9 PNG format icon.
git-svn-id: file:///svn/unbound/trunk@1497 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-26 11:01:44 +00:00
Wouter Wijngaards 0acf55404c windres usage for application resources.
git-svn-id: file:///svn/unbound/trunk@1496 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-25 15:54:35 +00:00
Wouter Wijngaards ffe0bd51d8 win makedist -w feature.
git-svn-id: file:///svn/unbound/trunk@1495 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-24 16:33:17 +00:00
Wouter Wijngaards c2261b63f1 fixup warnings on vista/mingw.
git-svn-id: file:///svn/unbound/trunk@1494 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-24 15:38:23 +00:00
Wouter Wijngaards 23ab46e3a5 new dlv key location
git-svn-id: file:///svn/unbound/trunk@1493 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-24 10:07:10 +00:00
Wouter Wijngaards 84edc1428b Fixup itar.sh
git-svn-id: file:///svn/unbound/trunk@1492 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-20 14:03:34 +00:00
Wouter Wijngaards e6fbf88b59 typo
git-svn-id: file:///svn/unbound/trunk@1491 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-19 13:41:04 +00:00
Wouter Wijngaards 4b2d6d20af use ftp.
git-svn-id: file:///svn/unbound/trunk@1490 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-19 13:33:39 +00:00
Wouter Wijngaards f6b2f66311 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1489 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-19 11:17:36 +00:00
Wouter Wijngaards b67ed83149 update-itar.sh update script from itar.iana.org
git-svn-id: file:///svn/unbound/trunk@1488 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-19 10:38:51 +00:00
Wouter Wijngaards ce71720093 warn for bad trust anchors.
git-svn-id: file:///svn/unbound/trunk@1487 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-19 09:01:39 +00:00
Wouter Wijngaards 8b31d0b2e0 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1486 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-18 13:33:53 +00:00
Wouter Wijngaards cf068986ff more cycle checks.
fix for reentrant problem.


git-svn-id: file:///svn/unbound/trunk@1485 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-18 13:23:17 +00:00
Wouter Wijngaards c699ba2c40 iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1484 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-13 15:36:45 +00:00
Wouter Wijngaards 340eb440da document unbound-host config file behaviour.
git-svn-id: file:///svn/unbound/trunk@1483 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-13 15:31:03 +00:00
Wouter Wijngaards a2dcd9c019 forward command for unbound-control.
git-svn-id: file:///svn/unbound/trunk@1482 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-13 15:26:37 +00:00
Wouter Wijngaards dfef08c21f show fwders in use.
git-svn-id: file:///svn/unbound/trunk@1481 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 16:11:53 +00:00
Wouter Wijngaards df8005ff3c libunbound API version is upped. A change in symbols reported by Ondrej and
small change in ub_cancel API.


git-svn-id: file:///svn/unbound/trunk@1480 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 13:34:00 +00:00
Wouter Wijngaards 8148211e53 flush_requestlist feature for unbound-control.
git-svn-id: file:///svn/unbound/trunk@1479 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 13:21:19 +00:00
Wouter Wijngaards ca09b7014b stats_noreset feature for unbound-control
git-svn-id: file:///svn/unbound/trunk@1478 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 11:41:51 +00:00
Wouter Wijngaards e5a5749603 flush_stats feature for unbound-control.
git-svn-id: file:///svn/unbound/trunk@1477 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 10:37:00 +00:00
Wouter Wijngaards 95f5b577d4 and include...
git-svn-id: file:///svn/unbound/trunk@1476 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 09:02:12 +00:00
Wouter Wijngaards 205f6d1afc also detect and use header and lib for setusercontext.
git-svn-id: file:///svn/unbound/trunk@1475 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 08:37:30 +00:00
Wouter Wijngaards cf64f7ae9e use setusercontext(3).
git-svn-id: file:///svn/unbound/trunk@1474 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-12 08:06:47 +00:00
Wouter Wijngaards 5f6eb6d58e dump_requestlist feature.
git-svn-id: file:///svn/unbound/trunk@1473 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-10 15:11:54 +00:00
Wouter Wijngaards 5c0e815e73 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1472 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-10 13:13:17 +00:00
Wouter Wijngaards b182b66e0e Do not validate with revoked keys.
git-svn-id: file:///svn/unbound/trunk@1471 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-10 13:01:38 +00:00
Wouter Wijngaards b58159d34b nicer text, TODO
git-svn-id: file:///svn/unbound/trunk@1470 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 15:16:13 +00:00
Wouter Wijngaards 36b3f6e254 bugzilla 231: print option from config file. Useful for scripting.
git-svn-id: file:///svn/unbound/trunk@1469 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 15:15:15 +00:00
Wouter Wijngaards e00e0ddd2f event_base_new() is used if available.
git-svn-id: file:///svn/unbound/trunk@1468 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 13:42:50 +00:00
Wouter Wijngaards e0a3873245 neater code
git-svn-id: file:///svn/unbound/trunk@1467 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 12:56:45 +00:00
Wouter Wijngaards 81d095149c nicer text, TODO removed
git-svn-id: file:///svn/unbound/trunk@1466 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 12:52:56 +00:00
Wouter Wijngaards 63d3cb7ff4 log-time-ascii option
git-svn-id: file:///svn/unbound/trunk@1465 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 12:51:45 +00:00
Wouter Wijngaards 0007337afe better desc.
git-svn-id: file:///svn/unbound/trunk@1464 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 11:23:43 +00:00
Wouter Wijngaards c53328dd07 fix cancel test more.
git-svn-id: file:///svn/unbound/trunk@1463 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 10:49:09 +00:00
Wouter Wijngaards cb925371ef fixup lexer.
git-svn-id: file:///svn/unbound/trunk@1462 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 10:45:40 +00:00
Wouter Wijngaards fb436db87a log querier on verbosity 5 or higher.
git-svn-id: file:///svn/unbound/trunk@1461 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 10:37:20 +00:00
Wouter Wijngaards 2b873f1b57 - config parser changed. Gives some syntax errors closer to where they
occurred. Does not enforce a space after keyword anymore.
  Does not allow literal newlines inside quoted strings anymore.



git-svn-id: file:///svn/unbound/trunk@1460 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 10:19:16 +00:00
Wouter Wijngaards 2705aaaad9 Nicer error for typo in include directive.
git-svn-id: file:///svn/unbound/trunk@1459 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 08:53:00 +00:00
Wouter Wijngaards 00fe7f1b87 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1458 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 06:56:08 +00:00
Wouter Wijngaards a63515ba51 new spec file from Paul.
git-svn-id: file:///svn/unbound/trunk@1457 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-06 06:46:57 +00:00
Wouter Wijngaards 46a9e9cba4 testbound test for older fix added.
git-svn-id: file:///svn/unbound/trunk@1456 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 14:31:16 +00:00
Wouter Wijngaards b22145d504 use daemon(3).
git-svn-id: file:///svn/unbound/trunk@1455 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 14:23:24 +00:00
Wouter Wijngaards 6e0d34659b option to force builtin ldns version.
git-svn-id: file:///svn/unbound/trunk@1454 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 14:01:37 +00:00
Wouter Wijngaards 80fa6c037a call initgroups.
git-svn-id: file:///svn/unbound/trunk@1453 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 11:12:01 +00:00
Wouter Wijngaards af9c45effc Cleaner output from configure on macOSX Leopard.
git-svn-id: file:///svn/unbound/trunk@1452 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 10:38:34 +00:00
Wouter Wijngaards 78600ddee1 Fixup race condition in ub_cancel. For 1.3.0.
git-svn-id: file:///svn/unbound/trunk@1451 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 09:48:02 +00:00
Wouter Wijngaards dfcbd8cb48 ldns 1.5.0 tarball (release candidate).
git-svn-id: file:///svn/unbound/trunk@1450 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-05 09:15:31 +00:00
Wouter Wijngaards b59ec4d4d3 trunk is 1.3.0 in development.
git-svn-id: file:///svn/unbound/trunk@1449 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-04 13:49:23 +00:00
Wouter Wijngaards eb408dcbc8 tag 1.2.1
git-svn-id: file:///svn/unbound/trunk@1448 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-04 13:34:34 +00:00
Wouter Wijngaards 87603429a1 fixup changelog
git-svn-id: file:///svn/unbound/trunk@1447 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-03 15:42:07 +00:00
Wouter Wijngaards cc6375e909 IANA portlist updated.
git-svn-id: file:///svn/unbound/trunk@1446 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-03 10:06:02 +00:00
Wouter Wijngaards d1e812a4af - noted feature requests in doc/TODO.
- printout more detailed errors on ssl certificate loading failures.



git-svn-id: file:///svn/unbound/trunk@1445 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-02-03 09:55:35 +00:00
Wouter Wijngaards 7ac31bc1d5 - unbound-host -4 and -6 options. Stops annoying ipv6 errors when
debugging with unbound -4 -d ... 
        - more cycle detection for NS-check, addr-check, root-prime and
          stub-prime queries in the iterator.  Avoids possible deadlock
          when priming fails.


git-svn-id: file:///svn/unbound/trunk@1444 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-16 10:38:19 +00:00
Wouter Wijngaards 37c3bef544 Squelch ipv6 network unreachable from verbosity default (1).
git-svn-id: file:///svn/unbound/trunk@1443 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-16 09:48:40 +00:00
Wouter Wijngaards 7ca106cc8c updated testset for recent changes
git-svn-id: file:///svn/unbound/trunk@1442 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 13:49:42 +00:00
Wouter Wijngaards 45abfa8720 fix libevent-1.3 and older bug
git-svn-id: file:///svn/unbound/trunk@1441 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 13:48:03 +00:00
Wouter Wijngaards ce2067ec6b spurious ;
git-svn-id: file:///svn/unbound/trunk@1440 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 10:49:19 +00:00
Wouter Wijngaards 0b04be414e sun cc warnings
git-svn-id: file:///svn/unbound/trunk@1439 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 10:34:18 +00:00
Wouter Wijngaards c90fd40a5e fixes for suncc warnings
git-svn-id: file:///svn/unbound/trunk@1438 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 10:29:17 +00:00
Wouter Wijngaards bea2b17277 solaris suncc compiler configure changes.
git-svn-id: file:///svn/unbound/trunk@1437 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-15 10:18:50 +00:00
Wouter Wijngaards dee84257a1 honor make QUIET=no
git-svn-id: file:///svn/unbound/trunk@1436 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-14 15:49:05 +00:00
Wouter Wijngaards b33f5f66ec remove debug prints
git-svn-id: file:///svn/unbound/trunk@1435 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-14 14:41:41 +00:00
Wouter Wijngaards a46c9197c4 EDNS fallback fixed for error cache.
git-svn-id: file:///svn/unbound/trunk@1434 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-14 09:56:41 +00:00
Wouter Wijngaards bfc64ade3c please lint.
git-svn-id: file:///svn/unbound/trunk@1433 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-14 09:47:00 +00:00
Wouter Wijngaards 900142fb79 - 1.2.1 feature: negative caching for failed queries.
Queries that failed are cached for 5 seconds (NORR_TTL).
	  If the failure is local, like out of memory, it is not cached.
	- the TTL comparison for the cache used different comparisons,
	  causing many cache responses that used the iterator and validator
	  state machines unnecessarily.



git-svn-id: file:///svn/unbound/trunk@1432 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-14 09:38:15 +00:00
Wouter Wijngaards 5aa65f431b 1.2.1 feature: stop AAAA queries that are not needed.
git-svn-id: file:///svn/unbound/trunk@1431 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-13 15:57:42 +00:00
Wouter Wijngaards f8655d2f5b note thanks
git-svn-id: file:///svn/unbound/trunk@1430 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-13 14:03:50 +00:00
Wouter Wijngaards a3ff369cfd Fixup for previous fixup.
git-svn-id: file:///svn/unbound/trunk@1429 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-13 12:53:18 +00:00
Wouter Wijngaards c76429ab57 Fixup for qtype NS.
git-svn-id: file:///svn/unbound/trunk@1428 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-13 12:45:02 +00:00
Wouter Wijngaards 0a9116f856 fix bug
git-svn-id: file:///svn/unbound/trunk@1426 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-13 10:44:04 +00:00
Wouter Wijngaards 9f4a9249c6 lameness debugging.
fix for lameness hashing.


git-svn-id: file:///svn/unbound/trunk@1425 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-12 09:22:39 +00:00
Wouter Wijngaards 8b860e8f12 removed debug print.
git-svn-id: file:///svn/unbound/trunk@1424 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-09 15:17:39 +00:00
Wouter Wijngaards c41e1a09ab iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1423 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-09 14:01:35 +00:00
Wouter Wijngaards 59c1ec5a95 1.2.1 version number in trunk.
git-svn-id: file:///svn/unbound/trunk@1422 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-09 10:49:47 +00:00
Wouter Wijngaards 0b39c4232f Tag for 1.2.0 release.
git-svn-id: file:///svn/unbound/trunk@1421 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-09 10:48:34 +00:00
Wouter Wijngaards bcb13a174b remove possible race condition
git-svn-id: file:///svn/unbound/trunk@1420 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-08 16:51:44 +00:00
Wouter Wijngaards d525f6ab69 slightly tighter timeouts.
git-svn-id: file:///svn/unbound/trunk@1419 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-08 15:58:35 +00:00
Wouter Wijngaards f89c4c4774 ldns updated - fixup
git-svn-id: file:///svn/unbound/trunk@1418 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-08 09:30:54 +00:00
Wouter Wijngaards 5326670faf ldns updated
git-svn-id: file:///svn/unbound/trunk@1417 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-08 09:21:57 +00:00
Wouter Wijngaards 244a09bfa3 type fixup
git-svn-id: file:///svn/unbound/trunk@1416 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-07 14:30:43 +00:00
Wouter Wijngaards 2b7969bc84 unused param fix
git-svn-id: file:///svn/unbound/trunk@1415 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-07 14:29:21 +00:00
Wouter Wijngaards f3d116387d typo fix and iana portlist updated
git-svn-id: file:///svn/unbound/trunk@1414 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-07 14:05:09 +00:00
Wouter Wijngaards e6c5255466 Wildcard support (from patch by Paul Wouters).
git-svn-id: file:///svn/unbound/trunk@1413 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-07 12:24:34 +00:00
Wouter Wijngaards 6e9d214816 fixup libunbound message buffer.
git-svn-id: file:///svn/unbound/trunk@1412 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 17:50:56 +00:00
Wouter Wijngaards c1ae463da5 chrooted include file fix
git-svn-id: file:///svn/unbound/trunk@1411 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 15:47:15 +00:00
Wouter Wijngaards 865852d3f7 HINFO not downcased any more
git-svn-id: file:///svn/unbound/trunk@1410 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 14:49:26 +00:00
Wouter Wijngaards 4eb2bdf2b1 fixup transparent zone answers.
git-svn-id: file:///svn/unbound/trunk@1409 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 13:51:12 +00:00
Wouter Wijngaards 062ad0eb69 test for HINFO.
git-svn-id: file:///svn/unbound/trunk@1408 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 11:31:21 +00:00
Wouter Wijngaards ca89f7290c Fixup assertion failure for certain malformed packets.
git-svn-id: file:///svn/unbound/trunk@1407 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-06 10:00:28 +00:00
Wouter Wijngaards 33ae9fd843 - added L.ROOT-SERVERS.NET. AAAA 2001:500:3::42 to builtin root hints.
- fixup so it works with libev-3.51 from http://dist.schmorp.de/libev/
- comm_timer_set performs base_set operation after event_add.



git-svn-id: file:///svn/unbound/trunk@1406 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-05 15:05:33 +00:00
Wouter Wijngaards 4c76f1c003 fixup getaddrinfo failure handling reported by Matthijs.
git-svn-id: file:///svn/unbound/trunk@1405 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-01-05 08:30:25 +00:00
Wouter Wijngaards ccdc0e3c53 fixup unit test for BSD changes to infra storage.
git-svn-id: file:///svn/unbound/trunk@1404 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 14:44:15 +00:00
Wouter Wijngaards 9cb69874f6 fixup reopen of syslog to avoid dev/log dependency and log missing after HUP.
git-svn-id: file:///svn/unbound/trunk@1403 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 14:36:58 +00:00
Wouter Wijngaards 12aae4fd6f makedist snapshot name fix.
git-svn-id: file:///svn/unbound/trunk@1402 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 14:20:11 +00:00
Wouter Wijngaards 1bdf2b2b6a Fixup BSD port.
git-svn-id: file:///svn/unbound/trunk@1401 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 14:11:34 +00:00
Wouter Wijngaards 159c7e4d6c more verbose about server selection.
git-svn-id: file:///svn/unbound/trunk@1400 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 11:27:57 +00:00
Wouter Wijngaards 38d57b0f80 DLV unit test ldns tarball update
rc underscore removed.


git-svn-id: file:///svn/unbound/trunk@1399 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 10:56:18 +00:00
Wouter Wijngaards 666b066bf6 fixup for DLV lookup higher NSEC examination bug.
git-svn-id: file:///svn/unbound/trunk@1398 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-18 10:14:30 +00:00
Wouter Wijngaards d714dfe8d8 ipv6 counter in extended statistics.
git-svn-id: file:///svn/unbound/trunk@1397 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 14:50:03 +00:00
Wouter Wijngaards 340a6185d2 done.
git-svn-id: file:///svn/unbound/trunk@1396 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 14:04:06 +00:00
Wouter Wijngaards d00c045084 unbound-control status command.
git-svn-id: file:///svn/unbound/trunk@1395 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 14:03:49 +00:00
Wouter Wijngaards d090698555 removed doubles
git-svn-id: file:///svn/unbound/trunk@1394 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 12:31:12 +00:00
Wouter Wijngaards 11f61b6b26 done.
git-svn-id: file:///svn/unbound/trunk@1393 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 12:29:10 +00:00
Wouter Wijngaards 4b00c5f76b key cache TTL is taken from RRset ttl which is already capped at max-ttl.
git-svn-id: file:///svn/unbound/trunk@1392 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 12:28:43 +00:00
Wouter Wijngaards 31ffc5a6a9 follows ldns makedist.sh changes for maintainer releases.
git-svn-id: file:///svn/unbound/trunk@1391 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-17 11:48:19 +00:00
Wouter Wijngaards aa1b565b41 underscore for version number postfix.
git-svn-id: file:///svn/unbound/trunk@1390 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-16 16:02:33 +00:00
Wouter Wijngaards 3d3b875a70 makedist prerelease feature.
git-svn-id: file:///svn/unbound/trunk@1389 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-16 15:30:47 +00:00
Wouter Wijngaards 3d42b1fffa TODO items.
git-svn-id: file:///svn/unbound/trunk@1388 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-16 14:27:24 +00:00
Wouter Wijngaards 3e8ccb027f please doxygen
git-svn-id: file:///svn/unbound/trunk@1387 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-11 08:59:45 +00:00
Wouter Wijngaards 05643589cf better #219 fix.
git-svn-id: file:///svn/unbound/trunk@1386 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-11 08:14:22 +00:00
Wouter Wijngaards b616c4f833 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@1385 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-09 09:37:43 +00:00
Wouter Wijngaards cb4985f527 fix bug 221.
git-svn-id: file:///svn/unbound/trunk@1384 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-09 09:28:39 +00:00
Wouter Wijngaards 098f932df8 todo
git-svn-id: file:///svn/unbound/trunk@1383 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-03 16:12:46 +00:00
Wouter Wijngaards 4ac7881829 fixup remote control so most commands work in nonthreaded environment.
git-svn-id: file:///svn/unbound/trunk@1382 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-03 15:20:56 +00:00
Wouter Wijngaards bcf49eaf96 Added test.
git-svn-id: file:///svn/unbound/trunk@1381 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-03 14:07:08 +00:00
Wouter Wijngaards 9e96c6e3aa Fix bug reported by Jaco with non-threaded unbound and statistics.
iana portlist updated.



git-svn-id: file:///svn/unbound/trunk@1380 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-03 13:52:00 +00:00
Wouter Wijngaards 9a9f012352 SElinux policy files.
git-svn-id: file:///svn/unbound/trunk@1379 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-12-01 08:20:03 +00:00
Wouter Wijngaards 386ff5debe Fixup when all servers for a zone are offline.
git-svn-id: file:///svn/unbound/trunk@1378 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-26 09:46:31 +00:00
Wouter Wijngaards d7ee842525 root hints checks dig.
git-svn-id: file:///svn/unbound/trunk@1377 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-25 15:18:54 +00:00
Wouter Wijngaards ea1f00ebad Skip unsupported tests. Fixup streamtcp for more portability.
git-svn-id: file:///svn/unbound/trunk@1376 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-25 14:17:14 +00:00
Wouter Wijngaards b1ed30d5f4 fix bug #220, complain without-ssl.
git-svn-id: file:///svn/unbound/trunk@1375 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-25 08:11:46 +00:00
Wouter Wijngaards aa0f26e3fa freebsd job control for test.
git-svn-id: file:///svn/unbound/trunk@1374 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-24 15:35:00 +00:00
Wouter Wijngaards 9e21fb7fac testset port to vista/mingw.
git-svn-id: file:///svn/unbound/trunk@1373 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-24 15:05:33 +00:00
Wouter Wijngaards 8b919a3780 Updated documentation for key user privileges.
git-svn-id: file:///svn/unbound/trunk@1372 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-24 10:55:14 +00:00
Wouter Wijngaards 32f6afbb48 remove permissions from others.
git-svn-id: file:///svn/unbound/trunk@1371 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-21 18:41:10 +00:00
Wouter Wijngaards 576fe7d4c8 accept errors not printed any more.
git-svn-id: file:///svn/unbound/trunk@1370 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-21 09:15:44 +00:00
Wouter Wijngaards 27f450e8fa trunk is 1.1.2
git-svn-id: file:///svn/unbound/trunk@1369 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 14:28:56 +00:00
Wouter Wijngaards ecad71c519 Tag 1.1.1
git-svn-id: file:///svn/unbound/trunk@1368 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 14:26:56 +00:00
Wouter Wijngaards 8726449421 changelog
git-svn-id: file:///svn/unbound/trunk@1367 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 09:49:35 +00:00
Wouter Wijngaards fcf7df71d6 nicer comments
git-svn-id: file:///svn/unbound/trunk@1366 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 09:48:36 +00:00
Wouter Wijngaards 4ea644f5a2 rlimit formula
git-svn-id: file:///svn/unbound/trunk@1365 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 09:20:10 +00:00
Wouter Wijngaards e25608d1be fixup tcp accept.
git-svn-id: file:///svn/unbound/trunk@1364 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-20 08:06:05 +00:00
Wouter Wijngaards d1b2324429 fix bug #219.
git-svn-id: file:///svn/unbound/trunk@1363 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-19 16:05:23 +00:00
Wouter Wijngaards be6bbb470a grammar
git-svn-id: file:///svn/unbound/trunk@1362 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 13:40:38 +00:00
Wouter Wijngaards 59e74885b7 make clean nicer
git-svn-id: file:///svn/unbound/trunk@1361 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 13:30:41 +00:00
Wouter Wijngaards 2b6c544f69 1.1.1
git-svn-id: file:///svn/unbound/trunk@1360 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 12:38:08 +00:00
Wouter Wijngaards 632234b5e4 1.1.0 number.
git-svn-id: file:///svn/unbound/trunk@1357 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 12:22:07 +00:00
Wouter Wijngaards 8bc54c4380 port to 64bit.
git-svn-id: file:///svn/unbound/trunk@1356 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 09:14:24 +00:00
Wouter Wijngaards bbbbb3c533 iana updated
git-svn-id: file:///svn/unbound/trunk@1355 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-18 09:01:24 +00:00
Wouter Wijngaards 75cf6d0f86 better comment svn:NO TEST
git-svn-id: file:///svn/unbound/trunk@1354 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-17 14:19:05 +00:00
Wouter Wijngaards c653b8424b Fixup for problems with do-ip6: no and only ipv6 addresses.
git-svn-id: file:///svn/unbound/trunk@1353 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-17 12:47:34 +00:00
Wouter Wijngaards 9548455690 1.1.1 in svn trunk.
git-svn-id: file:///svn/unbound/trunk@1352 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-14 06:30:34 +00:00
Wouter Wijngaards bbf446f1a1 Created 1.1.0 release tag.
git-svn-id: file:///svn/unbound/trunk@1351 be551aaa-1e26-0410-a405-d3ace91eadb9
2008-11-14 06:28:14 +00:00
668 changed files with 105373 additions and 36856 deletions
+1048 -198
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,9 +1,9 @@
Unbound README
* ./configure && make && make install
* on BSDs and Solaris use gmake (GNU make).
* You can use libevent if you want. libevent is useful when using
many (10000) outgoing ports. By default 16 ports are used and the
builtin alternative is equally capable and a little faster.
many (10000) outgoing ports. By default max 256 ports are opened at
the same time and the builtin alternative is equally capable and a
little faster.
* More detailed README, README.svn, README.tests in doc directory
* manual pages can be found in doc directory, and are installed, unbound(8).
* example configuration file doc/example.conf
+122
View File
@@ -0,0 +1,122 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_pkg_swig.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_PROG_SWIG([major.minor.micro])
#
# DESCRIPTION
#
# This macro searches for a SWIG installation on your system. If found you
# should call SWIG via $(SWIG). You can use the optional first argument to
# check if the version of the available SWIG is greater than or equal to
# the value of the argument. It should have the format: N[.N[.N]] (N is a
# number between 0 and 999. Only the first N is mandatory.)
#
# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that
# the swig package is this version number or higher.
#
# In configure.in, use as:
#
# AC_PROG_SWIG(1.3.17)
# SWIG_ENABLE_CXX
# SWIG_MULTI_MODULE_SUPPORT
# SWIG_PYTHON
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
# Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
# Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Macro Archive. When you make and
# distribute a modified version of the Autoconf Macro, you may extend this
# special exception to the GPL to apply to your modified version as well.
AC_DEFUN([AC_PROG_SWIG],[
AC_PATH_PROG([SWIG],[swig])
if test -z "$SWIG" ; then
AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
elif test -n "$1" ; then
AC_MSG_CHECKING([for SWIG version])
[swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
AC_MSG_RESULT([$swig_version])
if test -n "$swig_version" ; then
# Calculate the required version number components
[required=$1]
[required_major=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_major" ; then
[required_major=0]
fi
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
[required_minor=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_minor" ; then
[required_minor=0]
fi
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
[required_patch=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_patch" ; then
[required_patch=0]
fi
# Calculate the available version number components
[available=$swig_version]
[available_major=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_major" ; then
[available_major=0]
fi
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
[available_minor=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_minor" ; then
[available_minor=0]
fi
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
[available_patch=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_patch" ; then
[available_patch=0]
fi
if test $available_major -ne $required_major \
-o $available_minor -ne $required_minor \
-o $available_patch -lt $required_patch ; then
AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
else
AC_MSG_NOTICE([SWIG executable is '$SWIG'])
SWIG_LIB=`$SWIG -swiglib`
AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
fi
else
AC_MSG_WARN([cannot determine SWIG version])
SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
fi
fi
AC_SUBST([SWIG_LIB])
])
Vendored
+5913 -4050
View File
File diff suppressed because it is too large Load Diff
+1370
View File
File diff suppressed because it is too large Load Diff
+203
View File
@@ -0,0 +1,203 @@
AC_DEFUN([AC_PYTHON_DEVEL],[
#
# Allow the use of a (user set) custom python version
#
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
version to use, for example '2.3'. This string
will be appended to the Python interpreter
canonical name.])
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
PYTHON_VERSION=""
fi
if test -z "$PYTHON_VERSION"; then
PYTHON_VERSION=`$PYTHON -c "import sys, string; \
print string.split(sys.version)[[0]]"`
fi
#
# Check for a version of Python >= 2.1.0
#
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
ver = string.split(sys.version)[[0]]; \
print ver >= '2.1.0'"`
if test "$ac_supports_python_ver" != "True"; then
if test -z "$PYTHON_NOVERSIONCHECK"; then
AC_MSG_RESULT([no])
AC_MSG_FAILURE([
This version of the AC@&t@_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.
])
else
AC_MSG_RESULT([skip at user request])
fi
else
AC_MSG_RESULT([yes])
fi
#
# if the macro parameter ``version'' is set, honour it
#
if test -n "$1"; then
AC_MSG_CHECKING([for a version of Python $1])
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
ver = string.split(sys.version)[[0]]; \
print ver $1"`
if test "$ac_supports_python_ver" = "True"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([this package requires Python $1.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
])
PYTHON_VERSION=""
fi
fi
#
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "distutils".
Please check your Python installation. The error was:
$ac_distutils_result])
PYTHON_VERSION=""
fi
#
# Check for Python include path
#
AC_MSG_CHECKING([for Python include path])
if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_inc();"`
if test -n "${python_path}"; then
python_path="-I$python_path"
fi
PYTHON_CPPFLAGS=$python_path
fi
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
AC_SUBST([PYTHON_CPPFLAGS])
#
# Check for Python library path
#
AC_MSG_CHECKING([for Python library path])
if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print join(get_config_vars('VERSION'))"`
if test "$py_version" = "[None]"; then
if test -n "$PYTHON_VERSION"; then
py_version=$PYTHON_VERSION
else
py_version=`$PYTHON -c "import sys; \
print sys.version[[:3]]"`
fi
fi
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print '-L' + get_python_lib(0,1), \
'-L' + os.path.dirname(get_python_lib(0,1)), \
'-lpython';"`$py_version
fi
AC_MSG_RESULT([$PYTHON_LDFLAGS])
AC_SUBST([PYTHON_LDFLAGS])
#
# Check for site packages
#
AC_MSG_CHECKING([for Python site-packages path])
if test -z "$PYTHON_SITE_PKG"; then
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_lib(1,0);"`
fi
AC_MSG_RESULT([$PYTHON_SITE_PKG])
AC_SUBST([PYTHON_SITE_PKG])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LOCALMODLIBS'), conf('LIBS')"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
AC_SUBST(PYTHON_EXTRA_LIBS)
#
# linking flags needed when embedding
#
AC_MSG_CHECKING(python extra linking flags)
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LINKFORSHARED')"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
#
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development environment])
AC_LANG_PUSH([C])
# save current global flags
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
LIBS="$LIBS $PYTHON_LDFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_TRY_LINK([
#include <Python.h>
],[
Py_Initialize();
],[pythonexists=yes],[pythonexists=no])
AC_MSG_RESULT([$pythonexists])
if test ! "$pythonexists" = "yes"; then
AC_MSG_ERROR([
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
])
PYTHON_VERSION=""
fi
AC_LANG_POP
# turn back to default flags
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
#
# all done!
#
])
+42
View File
@@ -0,0 +1,42 @@
/* taken from ldns 1.6.1 */
#include "config.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include "util/locks.h"
/** the lock for ctime buffer */
static lock_basic_t ctime_lock;
/** has it been inited */
static int ctime_r_init = 0;
/** cleanup ctime_r on exit */
static void
ctime_r_cleanup(void)
{
if(ctime_r_init) {
ctime_r_init = 0;
lock_basic_destroy(&ctime_lock);
}
}
char *ctime_r(const time_t *timep, char *buf)
{
char* result;
if(!ctime_r_init) {
/* still small race where this init can be done twice,
* which is mostly harmless */
ctime_r_init = 1;
lock_basic_init(&ctime_lock);
atexit(&ctime_r_cleanup);
}
lock_basic_lock(&ctime_lock);
result = ctime(timep);
if(buf && result) {
if(strlen(result) > 10 && result[7]==' ' && result[8]=='0')
result[8]=' '; /* fix error in windows ctime */
strcpy(buf, result);
}
lock_basic_unlock(&ctime_lock);
return result;
}
+2
View File
@@ -135,7 +135,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
for (i = 0; i < IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
best.len = 0;
cur.base = -1;
cur.len = 0;
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
+2 -5
View File
@@ -1,11 +1,8 @@
/* Just a replacement, if the original malloc is not
GNU-compliant. See autoconf documentation. */
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include "config.h"
#undef malloc
#include <sys/types.h>
void *malloc ();
@@ -14,7 +11,7 @@ void *malloc ();
If N is zero, allocate a 1-byte block. */
void *
rpl_malloc (size_t n)
rpl_malloc_unbound (size_t n)
{
if (n == 0)
n = 1;
+25
View File
@@ -0,0 +1,25 @@
/*
* memcmp.c: memcmp compat implementation.
*
* Copyright (c) 2010, NLnet Labs. All rights reserved.
*
* See LICENSE for the license.
*/
#include <config.h>
int memcmp(const void *x, const void *y, size_t n);
int memcmp(const void *x, const void *y, size_t n)
{
const uint8_t* x8 = (const uint8_t*)x;
const uint8_t* y8 = (const uint8_t*)y;
size_t i;
for(i=0; i<n; i++) {
if(x8[i] < y8[i])
return -1;
else if(x8[i] > y8[i])
return 1;
}
return 0;
}
+16
View File
@@ -0,0 +1,16 @@
/*
* memcmp.h: undef memcmp for compat.
*
* Copyright (c) 2012, NLnet Labs. All rights reserved.
*
* See LICENSE for the license.
*/
#ifndef COMPAT_MEMCMP_H
#define COMPAT_MEMCMP_H
#ifdef memcmp
/* undef here otherwise autoheader messes it up in config.h */
# undef memcmp
#endif
#endif /* COMPAT_MEMCMP_H */
+34 -14
View File
@@ -40,6 +40,9 @@
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
* and run snprintf for results.
*
* Wouter Wijngaards(wouter@nlnetlabs.nl) 2/09/2010 for unbound.
* Limited support for %g. Does not do the exponents for the before-dot.
*
**************************************************************/
@@ -75,7 +78,7 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
long value, int base, int min, int max, int flags);
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
long double fvalue, int min, int max, int flags);
long double fvalue, int min, int max, int flags, int conv);
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
@@ -313,7 +316,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
else
fvalue = va_arg (args, double);
/* um, floating point? */
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags, 'f');
break;
case 'E':
flags |= DP_F_UP;
@@ -330,6 +333,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
fvalue = va_arg (args, long double);
else
fvalue = va_arg (args, double);
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags, 'g');
break;
case 'c':
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
@@ -554,7 +558,7 @@ static long compat_round (long double value)
}
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
long double fvalue, int min, int max, int flags)
long double fvalue, int min, int max, int flags, int conv)
{
int signvalue = 0;
long double ufvalue;
@@ -628,13 +632,26 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
fconvert[fplace++] =
(caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
fracpart = (fracpart / 10);
if(conv == 'g' && fplace == 1 && fconvert[0] == '0') {
fplace = 0; /* skip trailing zeroes for %g */
zpadlen ++;
}
} while(fracpart && (fplace < 20));
if (fplace == 20) fplace--;
fconvert[fplace] = 0;
/* -1 for decimal point, another -1 if we are printing a sign */
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
zpadlen = max - fplace;
if(conv == 'f') {
/* -1 for decimal point, another -1 if we are printing a sign */
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
zpadlen = max - fplace;
} else if(conv == 'g') {
/* zpadlen contains number of trailing zeroes removed */
padlen = min - iplace - (max-zpadlen) - 1 - ((signvalue) ? 1 : 0);
if(fplace == 0) {
padlen += 1; /* add the decimal dot suppressed */
zpadlen = 0;
} else zpadlen = (max-zpadlen) - fplace;
}
if (zpadlen < 0)
zpadlen = 0;
if (padlen < 0)
@@ -667,14 +684,14 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
while (iplace > 0)
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
/*
* Decimal point. This should probably use locale to find the correct
* char to print out.
*/
dopr_outch (buffer, currlen, maxlen, '.');
while (fplace > 0)
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
/* for %g do not output decimal point if no fraction is present */
if(conv == 'f' || (conv == 'g' && fplace > 0)) {
/*
* Decimal point. This should probably use locale to find the correct
* char to print out.
*/
dopr_outch (buffer, currlen, maxlen, '.');
}
while (zpadlen > 0)
{
@@ -682,6 +699,9 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
--zpadlen;
}
while (fplace > 0)
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
while (padlen < 0)
{
dopr_outch (buffer, currlen, maxlen, ' ');
+345
View File
@@ -0,0 +1,345 @@
/** strptime workaround (for oa macos leopard)
* This strptime follows the man strptime (2001-11-12)
* conforming to SUSv2, POSIX.1-2001
*
* This very simple version of strptime has no:
* - E alternatives
* - O alternatives
* - Glibc additions
* - Does not process week numbers
* - Does not properly processes year day
*
* LICENSE
* Copyright (c) 2008, NLnet Labs, Matthijs Mekking
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NLnetLabs nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
**/
#include "config.h"
#ifndef HAVE_CONFIG_H
#include <time.h>
#endif
#ifndef STRPTIME_WORKS
#define TM_YEAR_BASE 1900
#include <ctype.h>
#include <string.h>
static const char *abb_weekdays[] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL
};
static const char *full_weekdays[] = {
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", NULL
};
static const char *abb_months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL
};
static const char *full_months[] = {
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December", NULL
};
static const char *ampm[] = {
"am", "pm", NULL
};
static int
match_string(const char **buf, const char **strs)
{
int i = 0;
for (i = 0; strs[i] != NULL; i++) {
int len = strlen(strs[i]);
if (strncasecmp (*buf, strs[i], len) == 0) {
*buf += len;
return i;
}
}
return -1;
}
static int
str2int(const char **buf, int max)
{
int ret=0, count=0;
while (*buf[0] != '\0' && isdigit(*buf[0]) && count<max) {
ret = ret*10 + (*buf[0] - '0');
(*buf)++;
count++;
}
if (!count)
return -1;
return ret;
}
/** Converts the character string s to values which are stored in tm
* using the format specified by format
**/
char *
unbound_strptime(const char *s, const char *format, struct tm *tm)
{
int c, ret;
int split_year = 0;
while ((c = *format) != '\0') {
/* whitespace, literal or format */
if (isspace(c)) { /* whitespace */
/** whitespace matches zero or more whitespace characters in the
* input string.
**/
while (isspace(*s))
s++;
}
else if (c == '%') { /* format */
format++;
c = *format;
switch (c) {
case '%': /* %% is converted to % */
if (*s != c) {
return NULL;
}
s++;
break;
case 'a': /* weekday name, abbreviated or full */
case 'A':
ret = match_string(&s, full_weekdays);
if (ret < 0)
ret = match_string(&s, abb_weekdays);
if (ret < 0) {
return NULL;
}
tm->tm_wday = ret;
break;
case 'b': /* month name, abbreviated or full */
case 'B':
case 'h':
ret = match_string(&s, full_months);
if (ret < 0)
ret = match_string(&s, abb_months);
if (ret < 0) {
return NULL;
}
tm->tm_mon = ret;
break;
case 'c': /* date and time representation */
if (!(s = unbound_strptime(s, "%x %X", tm))) {
return NULL;
}
break;
case 'C': /* century number */
ret = str2int(&s, 2);
if (ret < 0 || ret > 99) { /* must be in [00,99] */
return NULL;
}
if (split_year) {
tm->tm_year = ret*100 + (tm->tm_year%100);
}
else {
tm->tm_year = ret*100 - TM_YEAR_BASE;
split_year = 1;
}
break;
case 'd': /* day of month */
case 'e':
ret = str2int(&s, 2);
if (ret < 1 || ret > 31) { /* must be in [01,31] */
return NULL;
}
tm->tm_mday = ret;
break;
case 'D': /* equivalent to %m/%d/%y */
if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
return NULL;
}
break;
case 'H': /* hour */
ret = str2int(&s, 2);
if (ret < 0 || ret > 23) { /* must be in [00,23] */
return NULL;
}
tm->tm_hour = ret;
break;
case 'I': /* 12hr clock hour */
ret = str2int(&s, 2);
if (ret < 1 || ret > 12) { /* must be in [01,12] */
return NULL;
}
if (ret == 12) /* actually [0,11] */
ret = 0;
tm->tm_hour = ret;
break;
case 'j': /* day of year */
ret = str2int(&s, 2);
if (ret < 1 || ret > 366) { /* must be in [001,366] */
return NULL;
}
tm->tm_yday = ret;
break;
case 'm': /* month */
ret = str2int(&s, 2);
if (ret < 1 || ret > 12) { /* must be in [01,12] */
return NULL;
}
/* months go from 0-11 */
tm->tm_mon = (ret-1);
break;
case 'M': /* minute */
ret = str2int(&s, 2);
if (ret < 0 || ret > 59) { /* must be in [00,59] */
return NULL;
}
tm->tm_min = ret;
break;
case 'n': /* arbitrary whitespace */
case 't':
while (isspace(*s))
s++;
break;
case 'p': /* am pm */
ret = match_string(&s, ampm);
if (ret < 0) {
return NULL;
}
if (tm->tm_hour < 0 || tm->tm_hour > 11) { /* %I */
return NULL;
}
if (ret == 1) /* pm */
tm->tm_hour += 12;
break;
case 'r': /* equivalent of %I:%M:%S %p */
if (!(s = unbound_strptime(s, "%I:%M:%S %p", tm))) {
return NULL;
}
break;
case 'R': /* equivalent of %H:%M */
if (!(s = unbound_strptime(s, "%H:%M", tm))) {
return NULL;
}
break;
case 'S': /* seconds */
ret = str2int(&s, 2);
/* 60 may occur for leap seconds */
/* earlier 61 was also allowed */
if (ret < 0 || ret > 60) { /* must be in [00,60] */
return NULL;
}
tm->tm_sec = ret;
break;
case 'T': /* equivalent of %H:%M:%S */
if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
return NULL;
}
break;
case 'U': /* week number, with the first Sun of Jan being w1 */
ret = str2int(&s, 2);
if (ret < 0 || ret > 53) { /* must be in [00,53] */
return NULL;
}
/** it is hard (and not necessary for nsd) to determine time
* data from week number.
**/
break;
case 'w': /* day of week */
ret = str2int(&s, 1);
if (ret < 0 || ret > 6) { /* must be in [0,6] */
return NULL;
}
tm->tm_wday = ret;
break;
case 'W': /* week number, with the first Mon of Jan being w1 */
ret = str2int(&s, 2);
if (ret < 0 || ret > 53) { /* must be in [00,53] */
return NULL;
}
/** it is hard (and not necessary for nsd) to determine time
* data from week number.
**/
break;
case 'x': /* date format */
if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
return NULL;
}
break;
case 'X': /* time format */
if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
return NULL;
}
break;
case 'y': /* last two digits of a year */
ret = str2int(&s, 2);
if (ret < 0 || ret > 99) { /* must be in [00,99] */
return NULL;
}
if (split_year) {
tm->tm_year = ((tm->tm_year/100) * 100) + ret;
}
else {
split_year = 1;
/** currently:
* if in [0,68] we are in 21th century,
* if in [69,99] we are in 20th century.
**/
if (ret < 69) /* 2000 */
ret += 100;
tm->tm_year = ret;
}
break;
case 'Y': /* year */
ret = str2int(&s, 4);
if (ret < 0 || ret > 9999) {
return NULL;
}
tm->tm_year = ret - TM_YEAR_BASE;
break;
case '\0':
default: /* unsupported, cannot match format */
return NULL;
break;
}
}
else { /* literal */
/* if input cannot match format, return NULL */
if (*s != c)
return NULL;
s++;
}
format++;
}
/* return pointer to remainder of s */
return (char*) s;
}
#endif /* STRPTIME_WORKS */
+128 -143
View File
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
timestamp='2007-05-17'
timestamp='2009-11-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2007-05-17'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -324,14 +324,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -532,7 +551,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -640,7 +659,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep __LP64__ >/dev/null
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -791,18 +810,24 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:[3456]*)
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -832,8 +857,29 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -847,6 +893,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -856,74 +913,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@@ -933,8 +949,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -954,72 +973,9 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1048,7 +1004,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1092,8 +1048,11 @@ EOF
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@@ -1131,6 +1090,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1143,7 +1112,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1206,6 +1175,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1233,6 +1205,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1314,6 +1296,9 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1474,9 +1459,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
+382 -84
View File
@@ -6,13 +6,30 @@
/* Pathname to the Unbound configuration file */
#undef CONFIGFILE
/* configure flags */
#undef CONFIGURE_BUILD_WITH
/* configure date */
#undef CONFIGURE_DATE
/* configure target system */
#undef CONFIGURE_TARGET
/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
*/
#undef DARWIN_BROKEN_SETREUID
/* Whether daemon is deprecated */
#undef DEPRECATED_DAEMON
/* Define if you want to use debug lock checking (slow). */
#undef ENABLE_LOCK_CHECKS
/* Define this if you enabled-allsymbols from libunbound to link binaries to
it for smaller install size, but the libunbound export table is polluted by
internal symbols */
#undef EXPORT_ALL_SYMBOLS
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
@@ -28,6 +45,28 @@
/* Define to 1 if you have the `chroot' function. */
#undef HAVE_CHROOT
/* Define to 1 if you have the `ctime_r' function. */
#undef HAVE_CTIME_R
/* Define to 1 if you have the `daemon' function. */
#undef HAVE_DAEMON
/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
don't. */
#undef HAVE_DECL_NID_SECP384R1
/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
if you don't. */
#undef HAVE_DECL_NID_X9_62_PRIME256V1
/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
if you don't. */
#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
/* Define to 1 if you have the declaration of
`SSL_COMP_get_compression_methods', and to 0 if you don't. */
#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -37,6 +76,9 @@
/* Define to 1 if you have the `event_base_get_method' function. */
#undef HAVE_EVENT_BASE_GET_METHOD
/* Define to 1 if you have the `event_base_new' function. */
#undef HAVE_EVENT_BASE_NEW
/* Define to 1 if you have the `event_base_once' function. */
#undef HAVE_EVENT_BASE_ONCE
@@ -52,9 +94,21 @@
/* Define to 1 if you have the `EVP_sha512' function. */
#undef HAVE_EVP_SHA512
/* Define to 1 if you have the `ev_default_loop' function. */
#undef HAVE_EV_DEFAULT_LOOP
/* Define to 1 if you have the `ev_loop' function. */
#undef HAVE_EV_LOOP
/* Define to 1 if you have the <expat.h> header file. */
#undef HAVE_EXPAT_H
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
/* Define to 1 if you have the `FIPS_mode' function. */
#undef HAVE_FIPS_MODE
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
@@ -73,9 +127,18 @@
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
/* Define to 1 if you have the `glob' function. */
#undef HAVE_GLOB
/* Define to 1 if you have the <glob.h> header file. */
#undef HAVE_GLOB_H
/* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R
/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* If you have HMAC_CTX_init */
#undef HAVE_HMAC_CTX_INIT
@@ -88,20 +151,37 @@
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* if the function 'ioctlsocket' is available */
#undef HAVE_IOCTLSOCKET
/* Define to 1 if you have the <iphlpapi.h> header file. */
#undef HAVE_IPHLPAPI_H
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
/* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */
#undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST
/* Define to 1 if you have the <ldns/ldns.h> header file. */
#undef HAVE_LDNS_LDNS_H
/* Define to 1 if you have the `ldns' library (-lldns). */
#undef HAVE_LIBLDNS
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* Define to 1 if you have the <login_cap.h> header file. */
#undef HAVE_LOGIN_CAP_H
/* If have GNU libc compatible malloc */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memmove' function. */
@@ -116,6 +196,18 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Use libnss for crypto */
#undef HAVE_NSS
/* Define to 1 if you have the `OPENSSL_config' function. */
#undef HAVE_OPENSSL_CONFIG
/* Define to 1 if you have the <openssl/conf.h> header file. */
#undef HAVE_OPENSSL_CONF_H
/* Define to 1 if you have the <openssl/engine.h> header file. */
#undef HAVE_OPENSSL_ENGINE_H
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
@@ -137,6 +229,9 @@
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define if you have Python libraries and header files. */
#undef HAVE_PYTHON
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
@@ -161,9 +256,15 @@
/* Define to 1 if you have the `setreuid' function. */
#undef HAVE_SETREUID
/* Define to 1 if you have the `setrlimit' function. */
#undef HAVE_SETRLIMIT
/* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID
/* Define to 1 if you have the `setusercontext' function. */
#undef HAVE_SETUSERCONTEXT
/* Define to 1 if you have the `sigprocmask' function. */
#undef HAVE_SIGPROCMASK
@@ -173,6 +274,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the `socketpair' function. */
#undef HAVE_SOCKETPAIR
/* Using Solaris threads */
#undef HAVE_SOLARIS_THREADS
@@ -194,6 +298,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -203,6 +310,15 @@
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strptime' function. */
#undef HAVE_STRPTIME
/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
/* Define if you have Swig libraries and header files. */
#undef HAVE_SWIG
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
@@ -266,9 +382,22 @@
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* Define to 1 if you have the `_beginthreadex' function. */
#undef HAVE__BEGINTHREADEX
/* if lex has yylex_destroy */
#undef LEX_HAS_YYLEX_DESTROY
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to the maximum message length to pass to syslog. */
#undef MAXSYSLOGMSGLEN
/* Define if memcmp() does not compare unsigned bytes */
#undef MEMCMP_IS_BROKEN
/* Define if mkdir has one argument. */
#undef MKDIR_HAS_ONE_ARG
@@ -276,6 +405,30 @@
lower performance). */
#undef NONBLOCKING_IS_BROKEN
/* Put -D_ALL_SOURCE define in config.h */
#undef OMITTED__D_ALL_SOURCE
/* Put -D_BSD_SOURCE define in config.h */
#undef OMITTED__D_BSD_SOURCE
/* Put -D_GNU_SOURCE define in config.h */
#undef OMITTED__D_GNU_SOURCE
/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
#undef OMITTED__D_LARGEFILE_SOURCE_1
/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
#undef OMITTED__D_POSIX_C_SOURCE_200112
/* Put -D_XOPEN_SOURCE=600 define in config.h */
#undef OMITTED__D_XOPEN_SOURCE_600
/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
/* Put -D__EXTENSIONS__ define in config.h */
#undef OMITTED__D__EXTENSIONS__
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@@ -288,6 +441,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -301,41 +457,98 @@
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* default rootkey location */
#undef ROOT_ANCHOR_FILE
/* default rootcert location */
#undef ROOT_CERT_FILE
/* version number for resource files */
#undef RSRC_PACKAGE_VERSION
/* Directory to chdir to */
#undef RUN_DIR
/* Shared data */
#undef SHARE_DIR
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* use default strptime. */
#undef STRPTIME_WORKS
/* Use win32 resources and API */
#undef UB_ON_WINDOWS
/* default username */
#undef UB_USERNAME
/* use to enable lightweight alloc assertions, for debug use */
#undef UNBOUND_ALLOC_LITE
/* use malloc not regions, for debug use */
#undef UNBOUND_ALLOC_NONREGIONAL
/* use statistics for allocs and frees, for debug use */
#undef UNBOUND_ALLOC_STATS
/* define this to enable debug checks. */
#undef UNBOUND_DEBUG
/* Define this to enable ECDSA support. */
#undef USE_ECDSA
/* Define this to enable an EVP workaround for older openssl */
#undef USE_ECDSA_EVP_WORKAROUND
/* Define this to enable GOST support. */
#undef USE_GOST
/* Define if you want to use internal select based events */
#undef USE_MINI_EVENT
/* Define this to enable SHA256 and SHA512 support. */
#undef USE_SHA2
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Whether the windows socket API is used */
#undef USE_WINSOCK
/* the version of the windows API enabled */
#undef WINVER
/* Define if you want Python module. */
#undef WITH_PYTHONMODULE
/* Define if you want PyUnbound. */
#undef WITH_PYUNBOUND
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#undef YYTEXT_POINTER
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -345,6 +558,16 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -372,10 +595,10 @@
/* Define to `long long' if <sys/types.h> does not define. */
#undef int64_t
/* Define to `char' if <sys/types.h> does not define. */
/* Define to `signed char' if <sys/types.h> does not define. */
#undef int8_t
/* Define to rpl_malloc if the replacement function should be used. */
/* Define if replacement function should be used. */
#undef malloc
/* Define to `long int' if <sys/types.h> does not define. */
@@ -396,7 +619,7 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
/* Define to `unsigned char' if <sys/types.h> does not define. */
/* Define to 'unsigned char if not defined */
#undef u_char
/* Define to `int' if <sys/types.h> doesn't define. */
@@ -417,6 +640,40 @@
/* Define as `fork' if `vfork' does not work. */
#undef vfork
#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE 1
#endif
#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
#define _BSD_SOURCE 1
#endif
#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
#define __EXTENSIONS__ 1
#endif
#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200112
#endif
#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE 600
#endif
#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
#define _XOPEN_SOURCE_EXTENDED 1
#endif
#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
#define _ALL_SOURCE 1
#endif
#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
#define _LARGEFILE_SOURCE 1
#endif
#ifndef UNBOUND_DEBUG
# define NDEBUG
@@ -466,24 +723,16 @@
#include <ws2tcpip.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_ATTR_FORMAT
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
__attribute__ ((format (archetype, string_index, first_to_check)))
#else /* !HAVE_ATTR_FORMAT */
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
#endif /* !HAVE_ATTR_FORMAT */
#if defined(DOXYGEN)
# define ATTR_UNUSED(x) x
#elif defined(__cplusplus)
@@ -493,27 +742,121 @@
#else /* !HAVE_ATTR_UNUSED */
# define ATTR_UNUSED(x) x
#endif /* !HAVE_ATTR_UNUSED */
#ifndef HAVE_FSEEKO
#define fseeko fseek
#define ftello ftell
#endif /* HAVE_FSEEKO */
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1
#endif
#ifndef RAND_MAX
#define RAND_MAX 2147483647
#endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
#ifndef HAVE_SNPRINTF
#define snprintf snprintf_unbound
#define vsnprintf vsnprintf_unbound
#include <stdarg.h>
int snprintf (char *str, size_t count, const char *fmt, ...);
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif /* HAVE_SNPRINTF */
#ifndef HAVE_INET_PTON
#define inet_pton inet_pton_unbound
int inet_pton(int af, const char* src, void* dst);
#endif /* HAVE_INET_PTON */
#ifndef HAVE_INET_NTOP
#define inet_ntop inet_ntop_unbound
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#ifndef HAVE_INET_ATON
#define inet_aton inet_aton_unbound
int inet_aton(const char *cp, struct in_addr *addr);
#endif
#ifndef HAVE_MEMMOVE
#define memmove memmove_unbound
void *memmove(void *dest, const void *src, size_t n);
#endif
#ifndef HAVE_STRLCPY
#define strlcpy strlcpy_unbound
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_GMTIME_R
#define gmtime_r gmtime_r_unbound
struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
#ifndef HAVE_SLEEP
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
#ifndef HAVE_USLEEP
#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
#endif /* HAVE_USLEEP */
#ifndef HAVE_RANDOM
#define random rand /* on win32, for tests only (bad random) */
#endif /* HAVE_RANDOM */
#ifndef HAVE_SRANDOM
#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
#endif /* HAVE_SRANDOM */
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
#ifdef HAVE_WINSOCK2_H
#define FD_SET_T (u_int)
#else
#define FD_SET_T
#endif
#ifndef IPV6_MIN_MTU
#define IPV6_MIN_MTU 1280
#endif /* IPV6_MIN_MTU */
#ifdef MEMCMP_IS_BROKEN
#include "compat/memcmp.h"
#define memcmp memcmp_unbound
int memcmp(const void *x, const void *y, size_t n);
#endif
#ifndef HAVE_CTIME_R
#define ctime_r unbound_ctime_r
char *ctime_r(const time_t *timep, char *buf);
#endif
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
#define strptime unbound_strptime
struct tm;
char *strptime(const char *s, const char *format, struct tm *tm);
#endif
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1
#endif
#ifndef CHECKED_INET6
# define CHECKED_INET6
# ifdef AF_INET6
@@ -525,63 +868,10 @@
/* maximum nesting of included files */
#define MAXINCLUDES 10
#ifndef HAVE_SNPRINTF
#define snprintf snprintf_unbound
#define vsnprintf vsnprintf_unbound
#include <stdarg.h>
int snprintf (char *str, size_t count, const char *fmt, ...);
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif /* HAVE_SNPRINTF */
#ifndef HAVE_INET_PTON
#define inet_pton inet_pton_unbound
int inet_pton(int af, const char* src, void* dst);
#endif /* HAVE_INET_PTON */
#ifndef HAVE_INET_NTOP
#define inet_ntop inet_ntop_unbound
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#ifndef HAVE_INET_ATON
#define inet_aton inet_aton_unbound
int inet_aton(const char *cp, struct in_addr *addr);
#endif
#ifndef HAVE_MEMMOVE
#define memmove memmove_unbound
void *memmove(void *dest, const void *src, size_t n);
#endif
#ifndef HAVE_STRLCPY
#define strlcpy strlcpy_unbound
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_GMTIME_R
#define gmtime_r gmtime_r_unbound
struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
#ifndef HAVE_GETADDRINFO
struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
#endif
#ifndef HAVE_SLEEP
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
#ifndef HAVE_USLEEP
#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
#endif /* HAVE_USLEEP */
#ifndef HAVE_RANDOM
#define random rand /* on win32, for tests only (bad random) */
#endif /* HAVE_RANDOM */
#ifndef HAVE_SRANDOM
#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
#endif /* HAVE_SRANDOM */
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
#ifdef HAVE_WINSOCK2_H
#define FD_SET_T (u_int)
#else
#define FD_SET_T
#endif
#include "ldns/ldns.h"
#ifdef UNBOUND_ALLOC_STATS
# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
@@ -600,8 +890,16 @@ void unbound_stat_free_log(void *ptr, const char* file, int line,
const char* func);
void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
int line, const char* func);
#endif /* UNBOUND_ALLOC_STATS */
#elif defined(UNBOUND_ALLOC_LITE)
# include "util/alloc.h"
#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
/** default port for DNS traffic. */
#define UNBOUND_DNS_PORT 53
/** default port for unbound control traffic, registered port with IANA,
ub-dns-control 8953/tcp unbound dns nameserver control */
#define UNBOUND_CONTROL_PORT 8953
/** the version of unbound-control that this software implements */
#define UNBOUND_CONTROL_VERSION 1
Vendored
+107 -28
View File
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
timestamp='2007-04-29'
timestamp='2009-11-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2007-04-29'
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -72,8 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -122,6 +125,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +152,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
-apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -249,13 +256,16 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@@ -268,6 +278,7 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nios | nios2 \
@@ -276,20 +287,22 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -329,14 +342,17 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@@ -357,21 +373,26 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -435,6 +456,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -443,10 +468,26 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -475,8 +516,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -514,6 +555,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@@ -668,6 +713,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -679,6 +732,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -813,6 +869,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@@ -1021,6 +1085,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1096,6 +1164,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@@ -1134,7 +1206,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1184,6 +1256,9 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1204,10 +1279,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1216,7 +1292,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1226,7 +1302,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1356,6 +1432,9 @@ case $os in
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-none)
;;
*)
@@ -1553,7 +1632,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-aix*)
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
Vendored
+13294 -20662
View File
File diff suppressed because it is too large Load Diff
+887 -860
View File
File diff suppressed because it is too large Load Diff
+7
View File
@@ -8,3 +8,10 @@ distribution but may be helpful.
* update-anchor.sh: shell script that uses unbound-host to update a set
of trust anchor files. Run from cron twice a month.
* unbound_munin_ : plugin for munin statistics report
* unbound_cacti.tar.gz : setup files for cacti statistics report
* selinux: the .fc and .te files for SElinux protection of the unbound daemon
* unbound.plist: launchd configuration file for MacOSX.
* build-unbound-localzone-from-hosts.pl: perl script to turn /etc/hosts into
a local-zone and local-data include file for unbound.conf.
* unbound-host.nagios.patch: makes unbound-host return status that fits right
in with the nagios monitoring framework. Contributed by Migiel de Vos.
@@ -0,0 +1,67 @@
#!/usr/bin/perl -WT
use strict;
use warnings;
my $hostsfile = '/etc/hosts';
my $localzonefile = '/etc/unbound/localzone.conf.new';
my $localzone = 'example.com';
open( HOSTS,"<${hostsfile}" ) or die( "Could not open ${hostsfile}: $!" );
open( ZONE,">${localzonefile}" ) or die( "Could not open ${localzonefile}: $!" );
print ZONE "server:\n\n";
print ZONE "local-zone: \"${localzone}\" transparent\n\n";
my %ptrhash;
while ( my $hostline = <HOSTS> ) {
# Skip comments
if ( $hostline !~ "^#" and $hostline !~ '^\s+$' ) {
my @entries = split( /\s+/, $hostline );
my $ip;
my $count = 0;
foreach my $entry ( @entries ) {
if ( $count == 0 ) {
$ip = $entry;
} else {
if ( $count == 1) {
# Only return localhost for 127.0.0.1 and ::1
if ( ($ip ne '127.0.0.1' and $ip ne '::1') or $entry =~ 'localhost' ) {
if ( ! defined $ptrhash{$ip} ) {
$ptrhash{$ip} = $entry;
print ZONE "local-data-ptr: \"$ip $entry\"\n";
}
}
}
# Use AAAA for IPv6 addresses
my $a = 'A';
if ( $ip =~ ':' ) {
$a = 'AAAA';
}
print ZONE "local-data: \"$entry ${a} $ip\"\n";
}
$count++;
}
print ZONE "\n";
}
}
__END__
+4
View File
@@ -0,0 +1,4 @@
/etc/unbound(/.*)? system_u:object_r:unbound_conf_t:s0
/etc/rc\.d/init\.d/unbound -- system_u:object_r:unbound_initrc_exec_t:s0
/usr/sbin/unbound -- system_u:object_r:unbound_exec_t:s0
/var/run/unbound(/.*)? system_u:object_r:unbound_var_run_t:s0
+42
View File
@@ -0,0 +1,42 @@
policy_module(unbound, 0.1.0)
type unbound_t;
type unbound_conf_t;
type unbound_exec_t;
type unbound_initrc_exec_t;
type unbound_var_run_t;
init_daemon_domain(unbound_t, unbound_exec_t)
init_script_file(unbound_initrc_exec_t)
role system_r types unbound_t;
# XXX
# unbound-{checkconf,control} are not protected. Do we need protect them?
# Unbound daemon
auth_use_nsswitch(unbound_t)
dev_read_urand(unbound_t)
corenet_all_recvfrom_unlabeled(unbound_t)
corenet_tcp_bind_all_nodes(unbound_t)
corenet_tcp_bind_dns_port(unbound_t)
corenet_tcp_bind_rndc_port(unbound_t)
corenet_udp_bind_all_nodes(unbound_t)
corenet_udp_bind_all_unreserved_ports(unbound_t)
corenet_udp_bind_dns_port(unbound_t)
files_read_etc_files(unbound_t)
files_pid_file(unbound_var_run_t)
files_type(unbound_conf_t)
libs_use_ld_so(unbound_t)
libs_use_shared_libs(unbound_t)
logging_send_syslog_msg(unbound_t)
manage_files_pattern(unbound_t, unbound_var_run_t, unbound_var_run_t)
miscfiles_read_localization(unbound_t)
read_files_pattern(unbound_t, unbound_conf_t, unbound_conf_t)
allow unbound_t self:capability { setuid chown net_bind_service setgid dac_override };
allow unbound_t self:tcp_socket create_stream_socket_perms;
allow unbound_t self:udp_socket create_socket_perms;
###################################################
+134
View File
@@ -0,0 +1,134 @@
Index: smallapp/unbound-host.c
===================================================================
--- smallapp/unbound-host.c (revision 2115)
+++ smallapp/unbound-host.c (working copy)
@@ -62,9 +62,18 @@
#include "libunbound/unbound.h"
#include <ldns/ldns.h>
+/** status variable ala nagios */
+#define FINAL_STATUS_OK 0
+#define FINAL_STATUS_WARNING 1
+#define FINAL_STATUS_CRITICAL 2
+#define FINAL_STATUS_UNKNOWN 3
+
/** verbosity for unbound-host app */
static int verb = 0;
+/** variable to determine final output */
+static int final_status = FINAL_STATUS_UNKNOWN;
+
/** Give unbound-host usage, and exit (1). */
static void
usage()
@@ -93,7 +102,7 @@
printf("Version %s\n", PACKAGE_VERSION);
printf("BSD licensed, see LICENSE in source package for details.\n");
printf("Report bugs to %s\n", PACKAGE_BUGREPORT);
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
/** determine if str is ip4 and put into reverse lookup format */
@@ -138,7 +147,7 @@
*res = strdup(buf);
if(!*res) {
fprintf(stderr, "error: out of memory\n");
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
return 1;
}
@@ -158,7 +167,7 @@
}
if(!res) {
fprintf(stderr, "error: out of memory\n");
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
return res;
}
@@ -172,7 +181,7 @@
if(r == 0 && strcasecmp(t, "TYPE0") != 0 &&
strcmp(t, "") != 0) {
fprintf(stderr, "error unknown type %s\n", t);
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
return r;
}
@@ -191,7 +200,7 @@
if(r == 0 && strcasecmp(c, "CLASS0") != 0 &&
strcmp(c, "") != 0) {
fprintf(stderr, "error unknown class %s\n", c);
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
return r;
}
@@ -207,6 +216,19 @@
return "(insecure)";
}
+/** update the final status for the exit code */
+void
+update_final_status(struct ub_result* result)
+{
+ if (final_status == FINAL_STATUS_UNKNOWN || final_status == FINAL_STATUS_OK) {
+ if (result->secure) final_status = FINAL_STATUS_OK;
+ else if (result->bogus) final_status = FINAL_STATUS_CRITICAL;
+ else final_status = FINAL_STATUS_WARNING;
+ }
+ else if (final_status == FINAL_STATUS_WARNING && result->bogus)
+ final_status = FINAL_STATUS_CRITICAL;
+}
+
/** nice string for type */
static void
pretty_type(char* s, size_t len, int t)
@@ -353,7 +375,7 @@
} else {
fprintf(stderr, "could not parse "
"reply packet to ANY query\n");
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
ldns_pkt_free(p);
@@ -388,9 +410,10 @@
ret = ub_resolve(ctx, q, t, c, &result);
if(ret != 0) {
fprintf(stderr, "resolve error: %s\n", ub_strerror(ret));
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
pretty_output(q, t, c, result, docname);
+ update_final_status(result);
ret = result->nxdomain;
ub_resolve_free(result);
return ret;
@@ -427,7 +450,7 @@
{
if(r != 0) {
fprintf(stderr, "error: %s\n", ub_strerror(r));
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
}
@@ -448,7 +471,7 @@
ctx = ub_ctx_create();
if(!ctx) {
fprintf(stderr, "error: out of memory\n");
- exit(1);
+ exit(FINAL_STATUS_UNKNOWN);
}
/* parse the options */
@@ -509,5 +532,5 @@
usage();
lookup(ctx, argv[0], qtype, qclass);
- return 0;
+ return final_status;
}
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<!--
Unbound plist file for use by MacOSX launchd(8) using launchctl(1).
Copy this file to /Library/LaunchDaemons. Launchd keeps unbound running.
Setup your unbound.conf with the following additional settings.
server:
do-daemonize: no
username: ""
chroot: ""
directory: ""
These actions are performed by launchd (for the option values, see below).
-->
<dict>
<key>Label</key>
<string>unbound</string>
<key>ProgramArguments</key>
<array>
<string>unbound</string>
</array>
<key>UserName</key>
<string>unbound</string>
<key>RootDirectory</key>
<string>/usr/local/etc/unbound</string>
<key>WorkingDirectory</key>
<string>/usr/local/etc/unbound</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
+15 -6
View File
@@ -1,14 +1,15 @@
Summary: Validating, recursive, and caching DNS resolver
Name: unbound
Version: 1.0.1
Version: 1.4.8
Release: 1%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/unbound/
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
#Source1: unbound.init
Group: System Environment/Daemons
Requires: ldns
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex, openssl-devel
BuildRequires: flex, openssl-devel, expat-devel, ldns-devel
%description
Unbound is a validating, recursive, and caching DNS resolver.
@@ -28,10 +29,6 @@ The source code is under a BSD License.
# configure with /var/unbound/unbound.conf so that all default chroot,
# pidfile and config file are in /var/unbound, ready for chroot jail set up.
#
# This is a build using libldns builtin version, the resulting binaries
# do not require libldns and this package does not have version dependencies.
# Could be smaller using a dependency on libldns (use --with-ldns=).
%configure --with-conf-file=%{_localstatedir}/%{name}/unbound.conf --disable-rpath
%build
@@ -92,6 +89,18 @@ if [ "$1" -ge "1" ]; then
fi
%changelog
* Thu Jul 13 2011 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.4.8
- ldns required and ldns-devel required for build, no more ldns-builtin.
* Thu Mar 17 2011 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.4.8
- removed --disable-gost, assume recent openssl on the destination platform.
* Wed Mar 16 2011 Harold Jones <hajones@verisign.com> - 1.4.8
- Bump version number to latest
- Add expat-devel to BuildRequires
- Added --disable-gost for building on CentOS 5.x
- Added --with-ldns-builtin for CentOS 5.x
* Thu May 22 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.0.0
- contrib changes from Patrick Vande Walle.
+301 -46
View File
@@ -1,23 +1,45 @@
# not ready yet
%{?!with_python: %global with_python 1}
%if %{with_python}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
Summary: Validating, recursive, and caching DNS(SEC) resolver
Name: unbound
Version: 1.1.0
Version: 1.4.13
Release: 1%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/unbound/
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
Source1: unbound.init
Source2: unbound.conf
Source3: unbound.munin
Source4: unbound_munin_
Source5: root.key
Source6: dlv.isc.org.key
Patch1: unbound-1.2-glob.patch
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex, openssl-devel, ldns-devel >= 1.3.0, libevent-devel
BuildRequires: flex, openssl-devel , ldns-devel >= 1.5.0,
BuildRequires: libevent-devel expat-devel
%if %{with_python}
BuildRequires: python-devel swig
%endif
# Required for SVN versions
# BuildRequires: bison
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
Requires: ldns >= 1.3.0
Requires: ldns >= 1.5.0
Requires(pre): shadow-utils
# Is this obsolete?
#Provides: caching-nameserver
Obsoletes: dnssec-conf < 1.27-2
Provides: dnssec-conf = 1.27-1
%description
Unbound is a validating, recursive, and caching DNS(SEC) resolver.
@@ -30,11 +52,19 @@ Unbound is designed as a set of modular components, so that also
DNSSEC (secure DNS) validation and stub-resolvers (that do not run
as a server, but are linked into an application) are easily possible.
%package munin
Summary: Plugin for the munin / munin-node monitoring package
Group: System Environment/Daemons
Requires: munin-node
Requires: %{name} = %{version}-%{release}, bc
%description munin
Plugin for the munin / munin-node monitoring package
%package devel
Summary: Development package that includes the unbound header files
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}, openssl-devel, ldns-devel
Requires: libevent-devel
%description devel
The devel package contains the unbound library and the include files
@@ -44,46 +74,60 @@ Summary: Libraries used by the unbound server and client applications
Group: Applications/System
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: openssl
%description libs
Contains libraries used by the unbound server and client applications
%if %{with_python}
%package python
Summary: Python modules and extensions for unbound
Group: Applications/System
Requires: %{name}-libs = %{version}-%{release}
%description python
Python modules and extensions for unbound
%endif
%prep
%setup -q
%patch1 -p1
%build
%configure --with-ldns= --with-libevent --with-pthreads --with-ssl \
--disable-rpath --enable-debug --disable-static \
--with-run-dir=%{_localstatedir}/lib/%{name}\
--with-conf-file=%{_localstatedir}/lib/%{name}/unbound.conf \
--with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid
%{__make} CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" QUIET=no %{?_smp_mflags}
--disable-rpath --disable-static \
--with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \
--with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid \
%if %{with_python}
--with-pythonmodule --with-pyunbound \
%endif
--enable-sha2 --disable-gost
%{__make} %{?_smp_mflags}
%install
rm -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
install -d 0755 %{buildroot}%{_localstatedir}/lib/%{name}
install -d 0755 %{buildroot}%{_initrddir}
#install -m 0755 contrib/unbound.init %{buildroot}%{_initrddir}/unbound
install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unbound
#overwrite stock unbound.conf with our own
install -m 0755 %{SOURCE2} %{buildroot}%{_localstatedir}/lib/%{name}
install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound
# Install munin plugin and its softlinks
install -d 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound
install -d 0755 %{buildroot}%{_datadir}/munin/plugins/
install -m 0755 %{SOURCE4} %{buildroot}%{_datadir}/munin/plugins/unbound
for plugin in unbound_munin_hits unbound_munin_queue unbound_munin_memory unbound_munin_by_type unbound_munin_by_class unbound_munin_by_opcode unbound_munin_by_rcode unbound_munin_by_flags unbound_munin_histogram; do
ln -s unbound %{buildroot}%{_datadir}/munin/plugins/$plugin
done
# add symbolic link from /etc/unbound.conf -> /var/unbound/unbound.conf
# install root and DLV key
install -m 0644 %{SOURCE5} %{SOURCE6} %{buildroot}%{_sysconfdir}/unbound/
( cd %{buildroot}%{_sysconfdir}/ ; ln -s ..%{_localstatedir}/lib/unbound/unbound.conf )
# remove static library from install (fedora packaging guidelines)
rm -rf %{buildroot}%{_libdir}/*.la
rm %{buildroot}%{_libdir}/*.la
%if %{with_python}
rm %{buildroot}%{python_sitearch}/*.la
%endif
# The chroot needs /dev/log, /dev/random, /etc/resolv.conf and /etc/localtime
# but the init script uses mount --bind, so just create empty files
mkdir -p %{buildroot}%{_localstatedir}/lib/unbound/etc \
%{buildroot}%{_localstatedir}/lib/unbound/dev
echo "Used for mount --bind in initscript" > %{buildroot}%{_localstatedir}/lib/unbound/etc/resolv.conf
echo "Used for mount --bind in initscript" > %{buildroot}%{_localstatedir}/lib/unbound/etc/localtime
echo "Used for mount --bind in initscript" > %{buildroot}%{_localstatedir}/lib/unbound/dev/log
echo "Used for mount --bind in initscript" > %{buildroot}%{_localstatedir}/lib/unbound/dev/random
mkdir -p %{buildroot}%{_localstatedir}/lib/unbound/var/run/unbound
mkdir -p %{buildroot}%{_localstatedir}/run/unbound
%clean
@@ -93,21 +137,27 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(-,root,root,-)
%doc doc/README doc/CREDITS doc/LICENSE doc/FEATURES
%attr(0755,root,root) %{_initrddir}/%{name}
# the chroot env
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}
%attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}/dev
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}/etc
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}/var
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}/var/run
%attr(0755,root,root) %dir %{_localstatedir}/lib/%{name}/var/run/unbound
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/unbound.conf
%attr(0644,root,root) %config(noreplace) %{_localstatedir}/lib/%{name}/unbound.conf
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/dev/*
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/etc/*
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
%ghost %attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/root.key
%{_sbindir}/*
%{_mandir}/*/*
%if %{with_python}
%files python
%defattr(-,root,root,-)
%{python_sitearch}/*
%doc libunbound/python/examples/*
%doc pythonmod/examples/*
%endif
%files munin
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound
%{_datadir}/munin/plugins/unbound*
%files devel
%defattr(-,root,root,-)
%{_libdir}/libunbound.so
@@ -122,18 +172,22 @@ rm -rf ${RPM_BUILD_ROOT}
%pre
getent group unbound >/dev/null || groupadd -r unbound
getent passwd unbound >/dev/null || \
useradd -r -g unbound -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
-c "Unbound DNS resolver" unbound
exit 0
%post
%post
/sbin/chkconfig --add %{name}
# dnssec-conf used to contain our DLV key, but now we include it via unbound
# If unbound had previously been configured with dnssec-configure, we need
# to migrate the location of the DLV key file (to keep DLV enabled, and because
# unbound won't start with a bad location for a DLV key file.
sed -i "s:/etc/pki/dnssec-keys[/]*dlv:/etc/unbound:" %{_sysconfdir}/unbound/unbound.conf
%post libs -p /sbin/ldconfig
%preun
if [ $1 -eq 0 ]; then
if [ "$1" -eq 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
@@ -146,6 +200,210 @@ fi
%postun libs -p /sbin/ldconfig
%changelog
* Tue Sep 06 2011 Paul Wouters <paul@xelerance.com> - 1.4.13-1
- Updated to 1.4.13
- Fix install location of pythonmod from sitelib to sitearch
- Removed patches merged in by upstream
- Removed versioned openssl dep, it differs per branch
* Mon Aug 08 2011 Paul Wouters <paul@xelerance.com> - 1.4.12-3
- Added pythonmod docs and examples
- Fix for python module load in the server (Tom Hendrikx)
- No longer enable --enable-debug as it causes degraded performance
under load.
* Mon Jul 18 2011 Paul Wouters <paul@xelerance.com> - 1.4.12-1
- Updated to 1.4.12
* Sun Jul 03 2011 Paul Wouters <paul@xelerance.com> - 1.4.11-1
- Updated to 1.4.11
- removed integrated CVE patch
- updated stock unbound.conf for new options introduced
* Mon Jun 06 2011 Paul Wouters <paul@xelerance.com> - 1.4.10-1
- Added ghost for /var/run/unbound (bz#656710)
* Mon Jun 06 2011 Paul Wouters <paul@xelerance.com> - 1.4.9-3
- rebuilt
* Wed May 25 2011 Paul Wouters <paul@xelerance.com> - 1.4.9-2
- Applied patch for CVE-2011-1922 DoS vulnerability
* Sun Mar 27 2011 Paul Wouters <paul@xelerance.com> - 1.4.9-1
- Updated to 1.4.9
* Sat Feb 12 2011 Paul Wouters <paul@xelerance.com> - 1.4.8-2
- rebuilt
* Tue Jan 25 2011 Paul Wouters <paul@xelerance.com> - 1.4.8-1
- Updated to 1.4.8
- Enable root key for DNSSEC
- Fix unbound-munin to use proper file (could cause excessive logging)
- Build unbound-python per default
- Disable gost as Fedora/EPEL does not allow ECC and has mangled openssl
* Tue Oct 26 2010 Paul Wouters <paul@xelerance.com> - 1.4.5-4
- Revert last build - it was on the wrong branch
* Tue Oct 26 2010 Paul Wouters <paul@xelerance.com> - 1.4.5-3
- Disable do-ipv6 per default - causes severe degradation on non-ipv6 machines
(see comments in inbound.conf)
* Tue Jun 15 2010 Paul Wouters <paul@xelerance.com> - 1.4.5-2
- Bump release - forgot to upload the new tar ball.
* Tue Jun 15 2010 Paul Wouters <paul@xelerance.com> - 1.4.5-1
- Upgraded to 1.4.5
* Mon May 31 2010 Paul Wouters <paul@xelerance.com> - 1.4.4-2
- Added accidentally omitted svn patches to cvs
* Mon May 31 2010 Paul Wouters <paul@xelerance.com> - 1.4.4-1
- Upgraded to 1.4.4 with svn patches
- Obsolete dnssec-conf to ensure it is de-installed
* Thu Mar 11 2010 Paul Wouters <paul@xelerance.com> - 1.4.3-1
- Update to 1.4.3 that fixes 64bit crasher
* Tue Mar 09 2010 Paul Wouters <paul@xelerance.com> - 1.4.2-1
- Updated to 1.4.2
- Updated unbound.conf with new options
- Enabled pre-fetching DNSKEY records (DNSSEC speedup)
- Enabled re-fetching popular records before they expire
- Enabled logging of DNSSEC validation errors
* Mon Mar 01 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-5
- Overriding -D_GNU_SOURCE is no longer needed. This fixes DSO issues
with pthreads
* Wed Feb 24 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-3
- Change make/configure lines to attempt to fix -lphtread linking issue
* Thu Feb 18 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-2
- Removed dependancy for dnssec-conf
- Added ISC DLV key (formerly in dnssec-conf)
- Fixup old DLV locations in unbound.conf file via %%post
- Fix parent child disagreement handling and no-ipv6 present [svn r1953]
* Tue Jan 05 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-1
- Updated to 1.4.1
- Changed %%define to %%global
* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-2
- Bump version
* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-1
- Upgraded to 1.3.4. Security fix with validating NSEC3 records
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.3.3-2
- rebuilt with new openssl
* Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 1.3.3-1
- Updated to 1.3.3
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-2
- Added missing glob patch to cvs
- Place python macros within the %%with_python check
* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-1
- Updated to 1.3.0
- Added unbound-python sub package. disabled for now
- Patch from svn to fix DLV lookups
- Patches from svn to detect wrong truncated response from BIND 9.6.1 with
minimal-responses)
- Added Default-Start and Default-Stop to unbound.init
- Re-enabled --enable-sha2
- Re-enabled glob.patch
* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-7
- unbound-iterator.patch was not commited
* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-6
- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=499793
* Tue Mar 17 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-5
- Use --nocheck to avoid giving an error on missing unbound-remote certs/keys
* Tue Mar 10 2009 Adam Tkac <atkac redhat com> - 1.2.1-4
- enable DNSSEC only if it is enabled in sysconfig/dnssec
* Mon Mar 09 2009 Adam Tkac <atkac redhat com> - 1.2.1-3
- add DNSSEC support to initscript and enabled it per default
- add requires dnssec-conf
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Feb 10 2009 Paul Wouters <paul@xelerance.com - 1.2.1-1
- updated to 1.2.1
* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.0-2
- rebuild with new openssl
* Wed Jan 14 2009 Paul Wouters <paul@xelerance.com - 1.2.0-1
- Updated to 1.2.0
- Added dependancy on minimum SSL for CVE-2008-5077
- Added dependancy on bc for unbound-munin
- Added minimum requirement of libevent 1.4.5. Crashes with older versions
(note: libevent is stale in EL-4 and not in EL-5, needs fixing there)
- Removed dependancy on selinux-policy (will get used when available)
- Enable options as per draft-wijngaards-dnsext-resolver-side-mitigation-00.txt
- Enable unwanted-reply-threshold to mitigate against a Kaminsky attack
- Enable val-clean-additional to drop addition unsigned data from signed
response.
- Removed patches (got merged into upstream)
* Mon Jan 5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-7
- Modified scandir patch to silently fail when wildcard matches nothing
- Patch to allow unbound-checkconf to find empty wildcard matches
* Mon Jan 5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-6
- Added scandir patch for trusted-keys-file: option, which
is used to load multiple dnssec keys in bind file format
* Mon Dec 8 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-4
- Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules.
* Mon Dec 1 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-3
- We did not own the /etc/unbound directory (#474020)
- Fixed cvs anomalies
* Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 1.1.1-2
- removed all obsolete chroot related stuff
- label control certs after generation correctly
* Thu Nov 20 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-1
- Updated to unbound 1.1.1 which fixes a crasher and
addresses nlnetlabs bug #219
* Wed Nov 19 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-3
- Remove the chroot, obsoleted by SElinux
- Add additional munin plugin links supported by unbound plugin
- Move configuration directory from /var/lib/unbound to /etc/unbound
- Modified unbound.init and unbound.conf to account for chroot changes
- Updated unbound.conf with new available options
- Enabled dns-0x20 protection per default
* Wed Nov 19 2008 Adam Tkac <atkac redhat com> - 1.1.0-2
- unbound-1.1.0-log_open.patch
- make sure log is opened before chroot call
- tracked as http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=219
- removed /dev/log and /var/run/unbound and /etc/resolv.conf from
chroot, not needed
- don't mount files in chroot, it causes problems during updates
- fixed typo in default config file
* Fri Nov 14 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-1
- Updated to version 1.1.0
- Updated unbound.conf's statistics options and remote-control
to work properly for munin
- Added unbound-munin package
- Generate unbound remote-control key/certs on first startup
- Required ldns is now 1.4.0
* Wed Oct 22 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-5
- Only call ldconfig in -libs package
- Move configure into build section
@@ -180,6 +438,3 @@ fi
* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
- Initial version.
Binary file not shown.
+39 -13
View File
@@ -1,6 +1,8 @@
#!/bin/sh
#
# plugin for munin to monitor usage of unbound servers.
# To install copy this to /usr/local/share/munin/plugins/unbound_munin_
# and use munin-node-configure (--suggest, --shell).
#
# (C) 2008 W.C.A. Wijngaards. BSD Licensed.
#
@@ -45,9 +47,9 @@
# unbound_munin_histogram - histogram of query resolving times
#
# Magic markers - optional - used by installation scripts and
# munin-config:
# munin-config: (originally contrib family but munin-node-configure ignores it)
#
#%# family=contrib
#%# family=auto
#%# capabilities=autoconf suggest
# POD documentation
@@ -123,8 +125,18 @@ get_value ( ) {
get_state ( ) {
# obtain lock for fetching the state
# because there is a race condition in fetching and writing to file
# see if the lock is stale, if so, take it
if test -f $lock ; then
pid="`cat $lock 2>&1`"
kill -0 "$pid" >/dev/null 2>&1
if test $? -ne 0 -a "$pid" != $$ ; then
echo $$ >$lock
fi
fi
i=0
while test ! -f $lock || test "`cat $lock`" != $$; do
while test ! -f $lock || test "`cat $lock 2>&1`" != $$; do
while test -f $lock; do
# wait
i=`expr $i + 1`
@@ -165,7 +177,7 @@ if test "$1" = "autoconf" ; then
exit 1
fi
if test ! -d `dirname $state`; then
echo no "($state directory does not exist)"
echo no "(`dirname $state` directory does not exist)"
exit 1
fi
echo yes
@@ -218,14 +230,15 @@ if test "$1" = "config" ; then
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_category DNS"
for x in thread0.num.queries thread1.num.queries \
thread2.num.queries thread3.num.queries thread4.num.queries \
thread5.num.queries thread6.num.queries thread7.num.queries; do
for x in `grep "^thread[0-9][0-9]*\.num\.queries=" $state |
sed -e 's/=.*//'`; do
exist_config $x "queries handled by `basename $x .num.queries`"
done
p_config "total.num.queries" "total queries from clients"
p_config "total.num.cachehits" "cache hits"
p_config "total.num.prefetch" "cache prefetch"
p_config "num.query.tcp" "TCP queries"
p_config "num.query.ipv6" "IPv6 queries"
p_config "unwanted.queries" "queries that failed acl"
p_config "unwanted.replies" "unwanted or unsolicited replies"
echo "u_replies.warning $warn"
@@ -409,11 +422,10 @@ print_value ( ) {
case $id in
hits)
for x in thread0.num.queries thread1.num.queries thread2.num.queries \
thread3.num.queries thread4.num.queries thread5.num.queries \
thread6.num.queries thread7.num.queries total.num.queries \
total.num.cachehits num.query.tcp unwanted.queries \
unwanted.replies; do
for x in `grep "^thread[0-9][0-9]*\.num\.queries=" $state |
sed -e 's/=.*//'` total.num.queries \
total.num.cachehits total.num.prefetch num.query.tcp \
num.query.ipv6 unwanted.queries unwanted.replies; do
if grep "^"$x"=" $state >/dev/null 2>&1; then
print_qps $x
fi
@@ -426,7 +438,21 @@ queue)
done
;;
memory)
for x in mem.total.sbrk mem.cache.rrset mem.cache.message \
mn=`echo mem.total.sbrk | sed $ABBREV | tr . _`
get_value 'mem.total.sbrk'
if test $value -eq 0; then
chk=`echo $ctrl | sed -e 's/-control$/-checkconf/'`
pidf=`$chk -o pidfile $conf 2>&1`
pid=`cat $pidf 2>&1`
value=`ps -p "$pid" -o rss= 2>&1`
if test "`expr $value + 1 - 1 2>&1`" -eq "$value" 2>&1; then
value=`expr $value \* 1024`
else
value=0
fi
fi
echo "$mn.value" $value
for x in mem.cache.rrset mem.cache.message \
mem.mod.iterator mem.mod.validator; do
print_value $x
done
+20 -7
View File
@@ -8,7 +8,7 @@ ubhost=unbound-host
usage ( )
{
echo "usage: update-anchor [-b] <zone name> <trust anchor file>"
echo "usage: update-anchor [-r hs] [-b] <zone name> <trust anchor file>"
echo " performs an update of trust anchor file"
echo " the trust anchor file is overwritten with the latest keys"
echo " the trust anchor file should contain only keys for one zone"
@@ -16,13 +16,15 @@ usage ( )
echo " without -b the file is made in unbound format."
echo " "
echo "alternate:"
echo " update-anchor [-b] -d directory"
echo " update-anchor [-r hints] [-b] -d directory"
echo " update all <zone>.anchor files in the directory."
echo " "
echo " name the files br.anchor se.anchor ..., and include them in"
echo " the validating resolver config file."
echo " put keys for the root in a file with the name root.anchor."
echo ""
echo "-r root.hints use different root hints. Strict option order."
echo ""
echo "Exit code 0 means anchors updated, 1 no changes, others are errors."
exit 2
}
@@ -32,6 +34,12 @@ if test $# -eq 0; then
fi
bindformat="no"
filearg='-f'
roothints=""
if test X"$1" = "X-r"; then
shift
roothints="$1"
shift
fi
if test X"$1" = "X-b"; then
shift
bindformat="yes"
@@ -46,10 +54,15 @@ do_update ( ) {
# arguments: <zonename> <keyfile>
zonename="$1"
keyfile="$2"
tmp2=$tmpfile.2
tmpfile="/tmp/update-anchor.$$"
$ubhost -v $filearg "$keyfile" -t DNSKEY "$zonename" >$tmpfile
tmp2=$tmpfile.2
tmp3=$tmpfile.3
rh=""
if test -n "$roothints"; then
echo "server: root-hints: '$roothints'" > $tmp3
rh="-C $tmp3"
fi
$ubhost -v $rh $filearg "$keyfile" -t DNSKEY "$zonename" >$tmpfile
if test $? -ne 0; then
rm -f $tmpfile
echo "Error: Could not update zone $zonename anchor file $keyfile"
@@ -65,7 +78,7 @@ do_update ( ) {
rm -f $tmpfile
echo "Error: Could not update zone $zonename anchor file $keyfile"
echo "Cause: result of lookup was not secure"
echo " (keys too far out of date? domain changed ownership?)"
echo " (keys too far out of date? domain changed ownership? need root hints?)"
return 3
fi
@@ -115,7 +128,7 @@ do_update ( ) {
echo "$zonename key file $keyfile unchanged."
fi
rm -f $tmpfile $tmp2
rm -f $tmpfile $tmp2 $tmp3
}
no_updated=1
+117
View File
@@ -0,0 +1,117 @@
#!/bin/sh
# validation reporter - reports validation failures to a collection server.
# Copyright NLnet Labs, 2010
# BSD license.
###
# Here is the configuration for the validation reporter
# it greps the failure lines out of the log and sends them to a server.
# The pidfile for the reporter daemon.
pidfile="/var/run/validation-reporter.pid"
# The logfile to watch for logged validation failures.
logfile="/var/log/unbound.log"
# how to notify the upstream
# nc is netcat, it sends tcp to given host port. It makes a tcp connection
# and writes one log-line to it (grepped from the logfile).
# the notify command can be: "nc the.server.name.org 1234"
# the listening daemon could be: nc -lk 127.0.0.1 1234 >> outputfile &
notify_cmd="nc localhost 1234"
###
# Below this line is the code for the validation reporter,
# first the daemon itself, then the controller for the daemon.
reporter_daemon() {
trap "rm -f \"$pidfile\"" EXIT
tail -F $logfile | grep --line-buffered "unbound.*info: validation failure" | \
while read x; do
echo "$x" | $notify_cmd
done
}
###
# controller for daemon.
start_daemon() {
echo "starting reporter"
nohup $0 rundaemon </dev/null >/dev/null 2>&1 &
echo $! > "$pidfile"
}
kill_daemon() {
echo "stopping reporter"
if test -s "$pidfile"; then
kill `cat "$pidfile"`
# check it is really dead
if kill -0 `cat "$pidfile"` >/dev/null 2>&1; then
sleep 1
while kill -0 `cat "$pidfile"` >/dev/null 2>&1; do
kill `cat "$pidfile"` >/dev/null 2>&1
echo "waiting for reporter to stop"
sleep 1
done
fi
fi
}
get_status_daemon() {
if test -s "$pidfile"; then
if kill -0 `cat "$pidfile"`; then
return 0;
fi
fi
return 1;
}
restart_daemon() {
kill_daemon
start_daemon
}
condrestart_daemon() {
if get_status_daemon; then
echo "reporter ("`cat "$pidfile"`") is running"
exit 0
fi
start_daemon
exit 0
}
status_daemon() {
if get_status_daemon; then
echo "reporter ("`cat "$pidfile"`") is running"
exit 0
fi
echo "reporter is not running"
exit 1
}
case "$1" in
rundaemon)
reporter_daemon
;;
start)
start_daemon
;;
stop)
kill_daemon
;;
restart)
restart_daemon
;;
condrestart)
condrestart_daemon
;;
status)
status_daemon
;;
*)
echo "Usage: $0 {start|stop|restart|condrestart|status}"
exit 2
;;
esac
exit $?
+1 -1
View File
@@ -47,7 +47,7 @@
#include "util/net_help.h"
struct acl_list*
acl_list_create()
acl_list_create(void)
{
struct acl_list* acl = (struct acl_list*)calloc(1,
sizeof(struct acl_list));
+1 -1
View File
@@ -89,7 +89,7 @@ struct acl_addr {
* Create acl structure
* @return new structure or NULL on error.
*/
struct acl_list* acl_list_create();
struct acl_list* acl_list_create(void);
/**
* Delete acl structure.
+180 -52
View File
@@ -40,17 +40,22 @@
* to text format.
*/
#include "config.h"
#include <ldns/ldns.h>
#include "daemon/cachedump.h"
#include "daemon/remote.h"
#include "daemon/worker.h"
#include "services/cache/rrset.h"
#include "services/cache/dns.h"
#include "services/cache/infra.h"
#include "util/data/msgreply.h"
#include "util/regional.h"
#include "util/net_help.h"
#include "util/data/dname.h"
#include "iterator/iterator.h"
#include "iterator/iter_delegpt.h"
#include "iterator/iter_utils.h"
#include "iterator/iter_fwd.h"
#include "iterator/iter_hints.h"
/** convert to ldns rr */
static ldns_rr*
@@ -394,17 +399,16 @@ load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
*go_on = 0;
return 1;
}
log_info("rd %s", (char*)ldns_buffer_begin(buf));
status = ldns_rr_new_frm_str(&rr, (char*)ldns_buffer_begin(buf),
LDNS_DEFAULT_TTL, NULL, NULL);
if(status != LDNS_STATUS_OK) {
(void)ssl_printf(ssl, "error cannot parse rr :%s: %s\n",
log_warn("error cannot parse rr: %s: %s",
ldns_get_errorstr_by_id(status),
(char*)ldns_buffer_begin(buf));
return 0;
}
if(is_rrsig && ldns_rr_get_type(rr) != LDNS_RR_TYPE_RRSIG) {
(void)ssl_printf(ssl, "error expected rrsig but got %s\n",
log_warn("error expected rrsig but got %s",
(char*)ldns_buffer_begin(buf));
return 0;
}
@@ -415,7 +419,7 @@ load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
ldns_buffer_skip(buf, 2);
status = ldns_rr_rdata2buffer_wire(buf, rr);
if(status != LDNS_STATUS_OK) {
(void)ssl_printf(ssl, "error cannot rr2wire :%s\n",
log_warn("error cannot rr2wire: %s",
ldns_get_errorstr_by_id(status));
ldns_rr_free(rr);
return 0;
@@ -428,7 +432,7 @@ load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
if(!d->rr_data[i]) {
ldns_rr_free(rr);
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return 0;
}
@@ -438,12 +442,18 @@ load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
rk->rk.rrset_class = htons(ldns_rr_get_class(rr));
ldns_buffer_clear(buf);
status = ldns_dname2buffer_wire(buf, ldns_rr_owner(rr));
if(status != LDNS_STATUS_OK) {
log_warn("error cannot dname2buffer: %s",
ldns_get_errorstr_by_id(status));
ldns_rr_free(rr);
return 0;
}
ldns_buffer_flip(buf);
rk->rk.dname_len = ldns_buffer_limit(buf);
rk->rk.dname = regional_alloc_init(region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
if(!rk->rk.dname) {
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
ldns_rr_free(rr);
return 0;
}
@@ -455,7 +465,7 @@ load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
/** move entry into cache */
static int
move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
move_into_cache(struct ub_packed_rrset_key* k,
struct packed_rrset_data* d, struct worker* worker)
{
struct ub_packed_rrset_key* ak;
@@ -466,7 +476,7 @@ move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
ak = alloc_special_obtain(&worker->alloc);
if(!ak) {
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return 0;
}
ak->entry.data = NULL;
@@ -474,7 +484,7 @@ move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
ak->entry.hash = rrset_key_hash(&k->rk);
ak->rk.dname = (uint8_t*)memdup(k->rk.dname, k->rk.dname_len);
if(!ak->rk.dname) {
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
ub_packed_rrset_parsedelete(ak, &worker->alloc);
return 0;
}
@@ -484,6 +494,7 @@ move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
s += d->rr_len[i];
ad = (struct packed_rrset_data*)malloc(s);
if(!ad) {
log_warn("error out of memory");
ub_packed_rrset_parsedelete(ak, &worker->alloc);
return 0;
}
@@ -528,13 +539,12 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
sizeof(*rk));
d = (struct packed_rrset_data*)regional_alloc_zero(region, sizeof(*d));
if(!rk || !d) {
(void) ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return 0;
}
if(strncmp(s, ";rrset", 6) != 0) {
(void)ssl_printf(ssl, "error expected ';rrset' but got %s\n",
s);
log_warn("error expected ';rrset' but got %s", s);
return 0;
}
s += 6;
@@ -544,11 +554,13 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
}
if(sscanf(s, " %u %u %u %u %u", &ttl, &rr_count, &rrsig_count,
&trust, &security) != 5) {
(void)ssl_printf(ssl, "error bad rrset spec %s\n", s);
log_warn("error bad rrset spec %s", s);
return 0;
}
if(rr_count == 0 && rrsig_count == 0)
if(rr_count == 0 && rrsig_count == 0) {
log_warn("bad rrset without contents");
return 0;
}
d->count = (size_t)rr_count;
d->rrsig_count = (size_t)rrsig_count;
d->security = (enum sec_status)security;
@@ -562,7 +574,7 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
d->rr_data = regional_alloc_zero(region,
sizeof(uint8_t*)*(d->count+d->rrsig_count));
if(!d->rr_len || !d->rr_ttl || !d->rr_data) {
(void) ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return 0;
}
@@ -570,12 +582,14 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
for(i=0; i<rr_count; i++) {
if(!load_rr(ssl, buf, region, rk, d, i, 0,
&go_on, *worker->env.now)) {
log_warn("could not read rr %u", i);
return 0;
}
}
for(i=0; i<rrsig_count; i++) {
if(!load_rr(ssl, buf, region, rk, d, i+rr_count, 1,
&go_on, *worker->env.now)) {
log_warn("could not read rrsig %u", i);
return 0;
}
}
@@ -584,7 +598,7 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
return 1;
}
return move_into_cache(ssl, rk, d, worker);
return move_into_cache(rk, d, worker);
}
/** load rrset cache */
@@ -604,7 +618,7 @@ load_rrset_cache(SSL* ssl, struct worker* worker)
/** read qinfo from next three words */
static char*
load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
struct regional* region, SSL* ssl)
struct regional* region)
{
/* s is part of the buf */
char* s = str;
@@ -616,7 +630,7 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
if(s) s = strchr(s+1, ' ');
if(s) s = strchr(s+1, ' ');
if(!s) {
(void)ssl_printf(ssl, "error line too short, %s\n", str);
log_warn("error line too short, %s", str);
return NULL;
}
s[0] = 0;
@@ -625,7 +639,7 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
/* parse them */
status = ldns_rr_new_question_frm_str(&rr, str, NULL, NULL);
if(status != LDNS_STATUS_OK) {
(void)ssl_printf(ssl, "error cannot parse: %s %s\n",
log_warn("error cannot parse: %s %s",
ldns_get_errorstr_by_id(status), str);
return NULL;
}
@@ -635,7 +649,7 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
status = ldns_dname2buffer_wire(buf, ldns_rr_owner(rr));
ldns_rr_free(rr);
if(status != LDNS_STATUS_OK) {
(void)ssl_printf(ssl, "error cannot dname2wire: %s\n",
log_warn("error cannot dname2wire: %s",
ldns_get_errorstr_by_id(status));
return NULL;
}
@@ -644,7 +658,7 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
qinfo->qname = (uint8_t*)regional_alloc_init(region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
if(!qinfo->qname) {
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return NULL;
}
@@ -670,12 +684,12 @@ load_ref(SSL* ssl, ldns_buffer* buf, struct worker* worker,
return 1;
}
s = load_qinfo(s, &qinfo, buf, region, ssl);
s = load_qinfo(s, &qinfo, buf, region);
if(!s) {
return 0;
}
if(sscanf(s, " %u", &flags) != 1) {
(void)ssl_printf(ssl, "error cannot parse flags: %s\n", s);
log_warn("error cannot parse flags: %s", s);
return 0;
}
@@ -711,11 +725,11 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
regional_free_all(region);
if(strncmp(s, "msg ", 4) != 0) {
(void)ssl_printf(ssl, "error expected msg but got %s\n", s);
log_warn("error expected msg but got %s", s);
return 0;
}
s += 4;
s = load_qinfo(s, &qinf, buf, region, ssl);
s = load_qinfo(s, &qinf, buf, region);
if(!s) {
return 0;
}
@@ -723,12 +737,13 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
/* read remainder of line */
if(sscanf(s, " %u %u %u %u %u %u %u", &flags, &qdcount, &ttl,
&security, &an, &ns, &ar) != 7) {
(void)ssl_printf(ssl, "error cannot parse numbers: %s\n", s);
log_warn("error cannot parse numbers: %s", s);
return 0;
}
rep.flags = (uint16_t)flags;
rep.qdcount = (uint16_t)qdcount;
rep.ttl = (uint32_t)ttl;
rep.prefetch_ttl = PREFETCH_TTL_CALC(rep.ttl);
rep.security = (enum sec_status)security;
rep.an_numrrsets = (size_t)an;
rep.ns_numrrsets = (size_t)ns;
@@ -748,8 +763,8 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
if(!go_on)
return 1; /* skip this one, not all references satisfied */
if(!dns_cache_store(&worker->env, &qinf, &rep, 0)) {
(void)ssl_printf(ssl, "error out of memory\n");
if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL)) {
log_warn("error out of memory");
return 0;
}
return 1;
@@ -779,6 +794,111 @@ load_cache(SSL* ssl, struct worker* worker)
return read_fixed(ssl, worker->env.scratch_buffer, "EOF");
}
/** print details on a delegation point */
static void
print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
{
char buf[257];
struct delegpt_addr* a;
int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl,
tA = 0, tAAAA = 0, tother = 0;
struct rtt_info ri;
uint8_t edns_lame_known;
for(a = dp->target_list; a; a = a->next_target) {
addr_to_str(&a->addr, a->addrlen, buf, sizeof(buf));
if(!ssl_printf(ssl, "%-16s\t", buf))
return;
if(a->bogus) {
if(!ssl_printf(ssl, "Address is BOGUS. "))
return;
}
/* lookup in infra cache */
delay=0;
entry_ttl = infra_get_host_rto(worker->env.infra_cache,
&a->addr, a->addrlen, dp->name, dp->namelen,
&ri, &delay, *worker->env.now, &tA, &tAAAA, &tother);
if(entry_ttl == -2 && ri.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
if(!ssl_printf(ssl, "expired, rto %d msec, tA %d "
"tAAAA %d tother %d.\n", ri.rto, tA, tAAAA,
tother))
return;
continue;
}
if(entry_ttl == -1 || entry_ttl == -2) {
if(!ssl_printf(ssl, "not in infra cache.\n"))
return;
continue; /* skip stuff not in infra cache */
}
/* uses type_A because most often looked up, but other
* lameness won't be reported then */
if(!infra_get_lame_rtt(worker->env.infra_cache,
&a->addr, a->addrlen, dp->name, dp->namelen,
LDNS_RR_TYPE_A, &lame, &dlame, &rlame, &rto,
*worker->env.now)) {
if(!ssl_printf(ssl, "not in infra cache.\n"))
return;
continue; /* skip stuff not in infra cache */
}
if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %d, ping %d "
"var %d rtt %d, tA %d, tAAAA %d, tother %d",
lame?"LAME ":"", dlame?"NoDNSSEC ":"",
a->lame?"AddrWasParentSide ":"",
rlame?"NoAuthButRecursive ":"", rto, entry_ttl,
ri.srtt, ri.rttvar, rtt_notimeout(&ri),
tA, tAAAA, tother))
return;
if(delay)
if(!ssl_printf(ssl, ", probedelay %d", delay))
return;
if(infra_host(worker->env.infra_cache, &a->addr, a->addrlen,
dp->name, dp->namelen, *worker->env.now, &edns_vs,
&edns_lame_known, &to)) {
if(edns_vs == -1) {
if(!ssl_printf(ssl, ", noEDNS%s.",
edns_lame_known?" probed":" assumed"))
return;
} else {
if(!ssl_printf(ssl, ", EDNS %d%s.", edns_vs,
edns_lame_known?" probed":" assumed"))
return;
}
}
if(!ssl_printf(ssl, "\n"))
return;
}
}
/** print main dp info */
static void
print_dp_main(SSL* ssl, struct delegpt* dp, struct dns_msg* msg)
{
size_t i, n_ns, n_miss, n_addr, n_res, n_avail;
/* print the dp */
if(msg)
for(i=0; i<msg->rep->rrset_count; i++) {
struct ub_packed_rrset_key* k = msg->rep->rrsets[i];
struct packed_rrset_data* d =
(struct packed_rrset_data*)k->entry.data;
if(d->security == sec_status_bogus) {
if(!ssl_printf(ssl, "Address is BOGUS:\n"))
return;
}
if(!dump_rrset(ssl, k, d, 0))
return;
}
delegpt_count_ns(dp, &n_ns, &n_miss);
delegpt_count_addr(dp, &n_addr, &n_res, &n_avail);
/* since dp has not been used by iterator, all are available*/
if(!ssl_printf(ssl, "Delegation with %d names, of which %d "
"can be examined to query further addresses.\n"
"%sIt provides %d IP addresses.\n",
(int)n_ns, (int)n_miss, (dp->bogus?"It is BOGUS. ":""),
(int)n_addr))
return;
}
int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
size_t nmlen, int ATTR_UNUSED(nmlabs))
{
@@ -788,7 +908,7 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
struct regional* region = worker->scratchpad;
char b[260];
struct query_info qinfo;
size_t i, n_ns, n_miss, n_addr, n_res, n_avail;
struct iter_hints_stub* stub;
regional_free_all(region);
qinfo.qname = nm;
qinfo.qname_len = nmlen;
@@ -800,6 +920,15 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
"of %s\n", b))
return 0;
dp = forwards_lookup(worker->env.fwds, nm, qinfo.qclass);
if(dp) {
if(!ssl_printf(ssl, "forwarding request:\n"))
return 0;
print_dp_main(ssl, dp, NULL);
print_dp_details(ssl, worker, dp);
return 1;
}
while(1) {
dp = dns_cache_find_delegation(&worker->env, nm, nmlen,
qinfo.qtype, qinfo.qclass, region, &msg,
@@ -808,29 +937,10 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
return ssl_printf(ssl, "no delegation from "
"cache; goes to configured roots\n");
}
/* print the dp */
for(i=0; i<msg->rep->rrset_count; i++) {
struct ub_packed_rrset_key* k = msg->rep->rrsets[i];
struct packed_rrset_data* d =
(struct packed_rrset_data*)k->entry.data;
if(d->security == sec_status_bogus) {
if(!ssl_printf(ssl, "Address is BOGUS:\n"))
return 0;
}
if(!dump_rrset(ssl, k, d, 0))
return 0;
}
delegpt_count_ns(dp, &n_ns, &n_miss);
delegpt_count_addr(dp, &n_addr, &n_res, &n_avail);
/* since dp has not been used by iterator, all are available*/
if(!ssl_printf(ssl, "Delegation with %d names, of which %d "
"have no addresses in cache.\n"
"It provides %d IP addresses. %s\n",
(int)n_ns, (int)n_miss, (int)n_addr,
(dp->bogus?"It is BOGUS":"") ))
return 0;
/* go up? */
if(iter_dp_is_useless(&qinfo, BIT_RD, dp)) {
print_dp_main(ssl, dp, msg);
print_dp_details(ssl, worker, dp);
if(!ssl_printf(ssl, "cache delegation was "
"useless (no IP addresses)\n"))
return 0;
@@ -848,8 +958,26 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
return 0;
continue;
}
} else
break;
}
stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
dp);
if(stub) {
if(stub->noprime) {
if(!ssl_printf(ssl, "The noprime stub servers "
"are used:\n"))
return 0;
} else {
if(!ssl_printf(ssl, "The stub is primed "
"with servers:\n"))
return 0;
}
print_dp_main(ssl, stub->dp, NULL);
print_dp_details(ssl, worker, stub->dp);
} else {
print_dp_main(ssl, dp, msg);
print_dp_details(ssl, worker, dp);
}
break;
}
return 1;
+125 -10
View File
@@ -40,6 +40,27 @@
*/
#include "config.h"
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
#ifdef HAVE_NSS
#include <nss3/nss.h>
#endif
#include <ldns/ldns.h>
#include "daemon/daemon.h"
#include "daemon/worker.h"
#include "daemon/remote.h"
@@ -47,6 +68,7 @@
#include "util/log.h"
#include "util/config_file.h"
#include "util/data/msgreply.h"
#include "util/storage/lookup3.h"
#include "util/storage/slabhash.h"
#include "services/listen_dnsport.h"
#include "services/cache/rrset.h"
@@ -63,6 +85,15 @@ static int sig_record_quit = 0;
/** How many reload requests happened. */
static int sig_record_reload = 0;
#if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
/** cleaner ssl memory freeup */
static void* comp_meth = NULL;
#endif
#ifdef LEX_HAS_YYLEX_DESTROY
/** remove buffers for parsing and init */
int ub_c_lex_destroy(void);
#endif
/** used when no other sighandling happens, so we don't die
* when multiple signals in quick succession are sent to us.
* @param sig: signal number.
@@ -106,7 +137,7 @@ static RETSIGTYPE record_sigh(int sig)
* Stores signals to replay later.
*/
static void
signal_handling_record()
signal_handling_record(void)
{
if( signal(SIGTERM, record_sigh) == SIG_ERR ||
#ifdef SIGQUIT
@@ -144,7 +175,7 @@ signal_handling_playback(struct worker* wrk)
}
struct daemon*
daemon_init()
daemon_init(void)
{
struct daemon* daemon = (struct daemon*)calloc(1,
sizeof(struct daemon));
@@ -163,14 +194,31 @@ daemon_init()
#endif /* USE_WINSOCK */
signal_handling_record();
checklock_start();
#ifdef HAVE_SSL
ERR_load_crypto_strings();
ERR_load_SSL_strings();
# ifdef HAVE_OPENSSL_CONFIG
OPENSSL_config("unbound");
# endif
# ifdef USE_GOST
(void)ldns_key_EVP_load_gost_id();
# endif
OpenSSL_add_all_algorithms();
# if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
/* grab the COMP method ptr because openssl leaks it */
comp_meth = (void*)SSL_COMP_get_compression_methods();
# endif
(void)SSL_library_init();
#elif defined(HAVE_NSS)
if(NSS_NoDB_Init(NULL) != SECSuccess)
fatal_exit("could not init NSS");
#endif /* HAVE_SSL or HAVE_NSS */
#ifdef HAVE_TZSET
/* init timezone info while we are not chrooted yet */
tzset();
#endif
/* open /dev/random if needed */
ub_systemseed((unsigned)time(NULL)^(unsigned)getpid()^0xe67);
daemon->need_to_exit = 0;
modstack_init(&daemon->mods);
if(!(daemon->env = (struct module_env*)calloc(1,
@@ -239,7 +287,7 @@ static void daemon_setup_modules(struct daemon* daemon)
* @param shufport: the portlist output.
* @return number of ports available.
*/
int daemon_get_shufport(struct daemon* daemon, int* shufport)
static int daemon_get_shufport(struct daemon* daemon, int* shufport)
{
int i, n, k, temp;
int avail = 0;
@@ -255,7 +303,7 @@ int daemon_get_shufport(struct daemon* daemon, int* shufport)
/* Knuth shuffle */
n = avail;
while(--n > 0) {
k = ub_random(daemon->rand) % (n+1); /* 0<= k<= n */
k = ub_random_max(daemon->rand, n+1); /* 0<= k<= n */
temp = shufport[k];
shufport[k] = shufport[n];
shufport[n] = temp;
@@ -283,13 +331,14 @@ daemon_create_workers(struct daemon* daemon)
if(!daemon->rand)
fatal_exit("could not init random generator");
}
hash_set_raninit((uint32_t)ub_random(daemon->rand));
shufport = (int*)calloc(65536, sizeof(int));
if(!shufport)
fatal_exit("out of memory during daemon init");
numport = daemon_get_shufport(daemon, shufport);
verbose(VERB_ALGO, "total of %d outgoing ports available", numport);
daemon->num = daemon->cfg->num_threads;
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
sizeof(struct worker*));
for(i=0; i<daemon->num; i++) {
@@ -302,20 +351,28 @@ daemon_create_workers(struct daemon* daemon)
free(shufport);
}
#ifdef THREADS_DISABLED
/**
* Close all pipes except for the numbered thread.
* @param daemon: daemon to close pipes in.
* @param thr: thread number 0..num-1 of thread to skip.
*/
void close_other_pipes(struct daemon* daemon, int thr)
static void close_other_pipes(struct daemon* daemon, int thr)
{
int i;
for(i=0; i<daemon->num; i++)
if(i!=thr) {
tube_delete(daemon->workers[i]->cmd);
daemon->workers[i]->cmd = NULL;
if(i==0) {
/* only close read part, need to write stats */
tube_close_read(daemon->workers[i]->cmd);
} else {
/* complete close channel to others */
tube_delete(daemon->workers[i]->cmd);
daemon->workers[i]->cmd = NULL;
}
}
}
#endif /* THREADS_DISABLED */
/**
* Function to start one thread.
@@ -403,6 +460,12 @@ daemon_fork(struct daemon* daemon)
* them to the newly created threads.
*/
daemon_create_workers(daemon);
#if defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)
/* in libev the first inited base gets signals */
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports, 1))
fatal_exit("Could not initialize main thread");
#endif
/* Now create the threads and init the workers.
* By the way, this is thread #0 (the main thread).
@@ -412,8 +475,11 @@ daemon_fork(struct daemon* daemon)
/* Special handling for the main thread. This is the thread
* that handles signals and remote control.
*/
#if !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP))
/* libevent has the last inited base get signals (or any base) */
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports, 1))
fatal_exit("Could not initialize main thread");
#endif
signal_handling_playback(daemon->workers[0]);
/* Start resolver service on main thread. */
@@ -445,6 +511,7 @@ daemon_cleanup(struct daemon* daemon)
local_zones_delete(daemon->local_zones);
daemon->local_zones = NULL;
/* key cache is cleared by module desetup during next daemon_init() */
daemon_remote_clear(daemon->rc);
for(i=0; i<daemon->num; i++)
worker_delete(daemon->workers[i]);
free(daemon->workers);
@@ -459,6 +526,7 @@ daemon_delete(struct daemon* daemon)
if(!daemon)
return;
modstack_desetup(&daemon->mods, daemon->env);
daemon_remote_delete(daemon->rc);
listening_ports_free(daemon->ports);
listening_ports_free(daemon->rc_ports);
if(daemon->env) {
@@ -469,17 +537,40 @@ daemon_delete(struct daemon* daemon)
ub_randfree(daemon->rand);
alloc_clear(&daemon->superalloc);
acl_list_delete(daemon->acl);
free(daemon->chroot);
free(daemon->pidfile);
free(daemon->env);
#ifdef HAVE_SSL
SSL_CTX_free((SSL_CTX*)daemon->listen_sslctx);
SSL_CTX_free((SSL_CTX*)daemon->connect_sslctx);
#endif
free(daemon);
#ifdef LEX_HAS_YYLEX_DESTROY
/* lex cleanup */
ub_c_lex_destroy();
#endif
/* libcrypto cleanup */
/* CONF_modules_unload(1); */
#ifdef HAVE_SSL
# if defined(USE_GOST) && defined(HAVE_LDNS_KEY_EVP_UNLOAD_GOST)
ldns_key_EVP_unload_gost();
# endif
# if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS && HAVE_DECL_SK_SSL_COMP_POP_FREE
# ifndef S_SPLINT_S
sk_SSL_COMP_pop_free(comp_meth, (void(*)())CRYPTO_free);
# endif
# endif
# ifdef HAVE_OPENSSL_CONFIG
EVP_cleanup();
/* ENGINE_cleanup(); */
ENGINE_cleanup();
CONF_modules_free();
# endif
CRYPTO_cleanup_all_ex_data(); /* safe, no more threads right now */
ERR_remove_state(0);
ERR_free_strings();
RAND_cleanup();
#elif defined(HAVE_NSS)
NSS_Shutdown();
#endif /* HAVE_SSL or HAVE_NSS */
checklock_stop();
#ifdef USE_WINSOCK
if(WSACleanup() != 0) {
@@ -488,3 +579,27 @@ daemon_delete(struct daemon* daemon)
}
#endif
}
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg)
{
daemon->cfg = cfg;
config_apply(cfg);
if(!daemon->env->msg_cache ||
cfg->msg_cache_size != slabhash_get_size(daemon->env->msg_cache) ||
cfg->msg_cache_slabs != daemon->env->msg_cache->size) {
slabhash_delete(daemon->env->msg_cache);
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
HASH_DEFAULT_STARTARRAY, cfg->msg_cache_size,
msgreply_sizefunc, query_info_compare,
query_entry_delete, reply_info_delete, NULL);
if(!daemon->env->msg_cache) {
fatal_exit("malloc failure updating config settings");
}
}
if((daemon->env->rrset_cache = rrset_cache_adjust(
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
fatal_exit("malloc failure updating config settings");
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
cfg))==0)
fatal_exit("malloc failure updating config settings");
}
+19 -2
View File
@@ -45,6 +45,9 @@
#include "util/locks.h"
#include "util/alloc.h"
#include "services/modstack.h"
#ifdef UB_ON_WINDOWS
# include "util/winsock_event.h"
#endif
struct config_file;
struct worker;
struct listen_port;
@@ -54,6 +57,7 @@ struct rrset_cache;
struct acl_list;
struct local_zones;
struct ub_randstate;
struct daemon_remote;
/**
* Structure holding worker list.
@@ -62,16 +66,22 @@ struct ub_randstate;
struct daemon {
/** The config settings */
struct config_file* cfg;
/** the chroot dir in use, NULL if none */
char* chroot;
/** pidfile that is used */
char* pidfile;
/** port number that has ports opened. */
int listening_port;
/** listening ports, opened, to be shared by threads */
struct listen_port* ports;
/** port number fore remote that has ports opened. */
/** port number for remote that has ports opened. */
int rc_port;
/** listening ports for remote control */
struct listen_port* rc_ports;
/** remote control connections management (for first worker) */
struct daemon_remote* rc;
/** ssl context for listening to dnstcp over ssl, and connecting ssl */
void* listen_sslctx, *connect_sslctx;
/** num threads allocated */
int num;
/** the worker entries */
@@ -100,7 +110,7 @@ struct daemon {
* Initialize daemon structure.
* @return: The daemon structure, or NULL on error.
*/
struct daemon* daemon_init();
struct daemon* daemon_init(void);
/**
* Open shared listening ports (if needed).
@@ -130,4 +140,11 @@ void daemon_cleanup(struct daemon* daemon);
*/
void daemon_delete(struct daemon* daemon);
/**
* Apply config settings.
* @param daemon: the daemon.
* @param cfg: new config settings.
*/
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg);
#endif /* DAEMON_H */
+1076 -156
View File
File diff suppressed because it is too large Load Diff
+41 -3
View File
@@ -45,6 +45,9 @@
#ifndef DAEMON_REMOTE_H
#define DAEMON_REMOTE_H
#ifdef HAVE_OPENSSL_SSL_H
#include "openssl/ssl.h"
#endif
struct config_file;
struct listen_list;
struct listen_port;
@@ -66,8 +69,10 @@ struct rc_state {
struct comm_point* c;
/** in the handshake part */
enum { rc_none, rc_hs_read, rc_hs_write } shake_state;
#ifdef HAVE_SSL
/** the ssl state */
SSL* ssl;
#endif
/** the rc this is part of */
struct daemon_remote* rc;
};
@@ -90,16 +95,18 @@ struct daemon_remote {
int max_active;
/** current commpoints busy; should be a short list, malloced */
struct rc_state* busy_list;
#ifdef HAVE_SSL
/** the SSL context for creating new SSL streams */
SSL_CTX* ctx;
#endif
};
/**
* Create new remote control state for the daemon.
* @param worker: worker with communication base. and links to command channels.
* @param cfg: config file with key file settings.
* @return new state, or NULL on failure.
*/
struct daemon_remote* daemon_remote_create(struct worker* worker);
struct daemon_remote* daemon_remote_create(struct config_file* cfg);
/**
* remote control state to delete.
@@ -107,6 +114,13 @@ struct daemon_remote* daemon_remote_create(struct worker* worker);
*/
void daemon_remote_delete(struct daemon_remote* rc);
/**
* remote control state to clear up. Busy and accept points are closed.
* Does not delete the rc itself, or the ssl context (with its keys).
* @param rc: state to clear.
*/
void daemon_remote_clear(struct daemon_remote* rc);
/**
* Open and create listening ports for remote control.
* @param cfg: config options.
@@ -119,10 +133,29 @@ struct listen_port* daemon_remote_open_ports(struct config_file* cfg);
* Setup comm points for accepting remote control connections.
* @param rc: state
* @param ports: already opened ports.
* @param worker: worker with communication base. and links to command channels.
* @return false on error.
*/
int daemon_remote_open_accept(struct daemon_remote* rc,
struct listen_port* ports);
struct listen_port* ports, struct worker* worker);
/**
* Stop accept handlers for TCP (until enabled again)
* @param rc: state
*/
void daemon_remote_stop_accept(struct daemon_remote* rc);
/**
* Stop accept handlers for TCP (until enabled again)
* @param rc: state
*/
void daemon_remote_start_accept(struct daemon_remote* rc);
/**
* Handle nonthreaded remote cmd execution.
* @param worker: this worker (the remote worker).
*/
void daemon_remote_exec(struct worker* worker);
/** handle remote control accept callbacks */
int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*);
@@ -130,6 +163,7 @@ int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*);
/** handle remote control data callbacks */
int remote_control_callback(struct comm_point*, void*, int, struct comm_reply*);
#ifdef HAVE_SSL
/**
* Print fixed line of text over ssl connection in blocking mode
* @param ssl: print to
@@ -156,5 +190,9 @@ int ssl_printf(SSL* ssl, const char* format, ...)
* @return false on connection failure.
*/
int ssl_read_line(SSL* ssl, char* buf, size_t max);
#endif /* HAVE_SSL */
/** routine to printout option values over SSL */
void remote_get_opt_ssl(char* line, void* arg);
#endif /* DAEMON_REMOTE_H */
+37 -18
View File
@@ -40,6 +40,7 @@
* numbers. These 'statistics' may be of interest to the operator.
*/
#include "config.h"
#include <ldns/wire2host.h>
#include "daemon/stats.h"
#include "daemon/worker.h"
#include "daemon/daemon.h"
@@ -58,7 +59,7 @@ timeval_add(struct timeval* d, const struct timeval* add)
#ifndef S_SPLINT_S
d->tv_sec += add->tv_sec;
d->tv_usec += add->tv_usec;
while(d->tv_usec > 1000000 ) {
if(d->tv_usec > 1000000) {
d->tv_usec -= 1000000;
d->tv_sec++;
}
@@ -79,21 +80,34 @@ void server_stats_querymiss(struct server_stats* stats, struct worker* worker)
stats->max_query_list_size = worker->env.mesh->all.count;
}
void server_stats_prefetch(struct server_stats* stats, struct worker* worker)
{
stats->num_queries_prefetch++;
/* changes the query list size so account that, like a querymiss */
stats->sum_query_list_size += worker->env.mesh->all.count;
if(worker->env.mesh->all.count > stats->max_query_list_size)
stats->max_query_list_size = worker->env.mesh->all.count;
}
void server_stats_log(struct server_stats* stats, struct worker* worker,
int threadnum)
{
log_info("server stats for thread %d: %u queries, "
"%u answers from cache, %u recursions",
"%u answers from cache, %u recursions, %u prefetch",
threadnum, (unsigned)stats->num_queries,
(unsigned)(stats->num_queries -
stats->num_queries_missed_cache),
(unsigned)stats->num_queries_missed_cache);
(unsigned)stats->num_queries_missed_cache,
(unsigned)stats->num_queries_prefetch);
log_info("server stats for thread %d: requestlist max %u avg %g "
"exceeded %u", threadnum, (unsigned)stats->max_query_list_size,
stats->num_queries_missed_cache?
"exceeded %u jostled %u", threadnum,
(unsigned)stats->max_query_list_size,
(stats->num_queries_missed_cache+stats->num_queries_prefetch)?
(double)stats->sum_query_list_size/
stats->num_queries_missed_cache : 0.0,
(unsigned)worker->env.mesh->stats_dropped);
(stats->num_queries_missed_cache+
stats->num_queries_prefetch) : 0.0,
(unsigned)worker->env.mesh->stats_dropped,
(unsigned)worker->env.mesh->stats_jostled);
}
/** get rrsets bogus number from validator */
@@ -115,7 +129,7 @@ get_rrset_bogus(struct worker* worker)
}
void
server_stats_compile(struct worker* worker, struct stats_info* s)
server_stats_compile(struct worker* worker, struct stats_info* s, int reset)
{
int i;
@@ -143,26 +157,26 @@ server_stats_compile(struct worker* worker, struct stats_info* s)
/* get and reset validator rrset bogus number */
s->svr.rrset_bogus = get_rrset_bogus(worker);
if(!worker->env.cfg->stat_cumulative) {
server_stats_init(&worker->stats, worker->env.cfg);
mesh_stats_clear(worker->env.mesh);
worker->back->unwanted_replies = 0;
if(reset && !worker->env.cfg->stat_cumulative) {
worker_stats_clear(worker);
}
}
void server_stats_obtain(struct worker* worker, struct worker* who,
struct stats_info* s)
struct stats_info* s, int reset)
{
uint8_t *reply = NULL;
uint32_t len = 0;
if(worker == who) {
/* just fill it in */
server_stats_compile(worker, s);
server_stats_compile(worker, s, reset);
return;
}
/* communicate over tube */
verbose(VERB_ALGO, "write stats cmd");
worker_send_cmd(who, worker_cmd_stats);
if(reset)
worker_send_cmd(who, worker_cmd_stats);
else worker_send_cmd(who, worker_cmd_stats_noreset);
verbose(VERB_ALGO, "wait for stats reply");
if(!tube_read_msg(worker->cmd, &reply, &len, 0))
fatal_exit("failed to read stats over cmd channel");
@@ -173,10 +187,10 @@ void server_stats_obtain(struct worker* worker, struct worker* who,
free(reply);
}
void server_stats_reply(struct worker* worker)
void server_stats_reply(struct worker* worker, int reset)
{
struct stats_info s;
server_stats_compile(worker, &s);
server_stats_compile(worker, &s, reset);
verbose(VERB_ALGO, "write stats replymsg");
if(!tube_write_msg(worker->daemon->workers[0]->cmd,
(uint8_t*)&s, sizeof(s), 0))
@@ -187,6 +201,7 @@ void server_stats_add(struct stats_info* total, struct stats_info* a)
{
total->svr.num_queries += a->svr.num_queries;
total->svr.num_queries_missed_cache += a->svr.num_queries_missed_cache;
total->svr.num_queries_prefetch += a->svr.num_queries_prefetch;
total->svr.sum_query_list_size += a->svr.sum_query_list_size;
/* the max size reached is upped to higher of both */
if(a->svr.max_query_list_size > total->svr.max_query_list_size)
@@ -197,6 +212,7 @@ void server_stats_add(struct stats_info* total, struct stats_info* a)
total->svr.qtype_big += a->svr.qtype_big;
total->svr.qclass_big += a->svr.qclass_big;
total->svr.qtcp += a->svr.qtcp;
total->svr.qipv6 += a->svr.qipv6;
total->svr.qbit_QR += a->svr.qbit_QR;
total->svr.qbit_AA += a->svr.qbit_AA;
total->svr.qbit_TC += a->svr.qbit_TC;
@@ -238,7 +254,8 @@ void server_stats_add(struct stats_info* total, struct stats_info* a)
}
void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
uint16_t qtype, uint16_t qclass, struct edns_data* edns)
uint16_t qtype, uint16_t qclass, struct edns_data* edns,
struct comm_reply* repinfo)
{
uint16_t flags = ldns_buffer_read_u16_at(c->buffer, 2);
if(qtype < STATS_QTYPE_NUM)
@@ -250,6 +267,8 @@ void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
stats->qopcode[ LDNS_OPCODE_WIRE(ldns_buffer_begin(c->buffer)) ]++;
if(c->type != comm_udp)
stats->qtcp++;
if(repinfo && addr_is_ip6(&repinfo->addr, repinfo->addrlen))
stats->qipv6++;
if( (flags&BIT_QR) )
stats->qbit_QR++;
if( (flags&BIT_AA) )
+22 -5
View File
@@ -43,9 +43,11 @@
#ifndef DAEMON_STATS_H
#define DAEMON_STATS_H
#include "util/timehist.h"
#include <ldns/buffer.h>
struct worker;
struct config_file;
struct comm_point;
struct comm_reply;
struct edns_data;
/** number of qtype that is stored for in array */
@@ -63,6 +65,8 @@ struct server_stats {
size_t num_queries;
/** number of queries that had a cache-miss. */
size_t num_queries_missed_cache;
/** number of prefetch queries - cachehits with prefetch */
size_t num_queries_prefetch;
/**
* Sum of the querylistsize of the worker for
@@ -87,6 +91,8 @@ struct server_stats {
size_t qopcode[STATS_OPCODE_NUM];
/** number of queries over TCP */
size_t qtcp;
/** number of queries over IPv6 */
size_t qipv6;
/** number of queries with QR bit */
size_t qbit_QR;
/** number of queries with AA bit */
@@ -113,7 +119,7 @@ struct server_stats {
size_t ans_rcode_nodata;
/** answers that were secure (AD) */
size_t ans_secure;
/** answers with bogus content */
/** answers that were bogus (withheld as SERVFAIL) */
size_t ans_bogus;
/** rrsets marked bogus by validator */
size_t rrset_bogus;
@@ -163,6 +169,9 @@ void server_stats_init(struct server_stats* stats, struct config_file* cfg);
/** add query if it missed the cache */
void server_stats_querymiss(struct server_stats* stats, struct worker* worker);
/** add query if was cached and also resulted in a prefetch */
void server_stats_prefetch(struct server_stats* stats, struct worker* worker);
/** display the stats to the log */
void server_stats_log(struct server_stats* stats, struct worker* worker,
int threadnum);
@@ -172,23 +181,29 @@ void server_stats_log(struct server_stats* stats, struct worker* worker,
* @param worker: the worker that is executing (the first worker).
* @param who: on who to get the statistics info.
* @param s: the stats block to fill in.
* @param reset: if stats can be reset.
*/
void server_stats_obtain(struct worker* worker, struct worker* who,
struct stats_info* s);
struct stats_info* s, int reset);
/**
* Compile stats into structure for this thread worker.
* Also clears the statistics counters (if that is set by config file).
* @param worker: the worker to compile stats for, also the executing worker.
* @param s: stats block.
* @param reset: if true, depending on config stats are reset.
* if false, statistics are not reset.
*/
void server_stats_compile(struct worker* worker, struct stats_info* s);
void server_stats_compile(struct worker* worker, struct stats_info* s,
int reset);
/**
* Send stats over comm tube in reply to query cmd
* @param worker: this worker.
* @param reset: if true, depending on config stats are reset.
* if false, statistics are not reset.
*/
void server_stats_reply(struct worker* worker);
void server_stats_reply(struct worker* worker, int reset);
/**
* Addup stat blocks.
@@ -204,9 +219,11 @@ void server_stats_add(struct stats_info* total, struct stats_info* a);
* @param qtype: query type
* @param qclass: query class
* @param edns: edns record
* @param repinfo: reply info with remote address
*/
void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
uint16_t qtype, uint16_t qclass, struct edns_data* edns);
uint16_t qtype, uint16_t qclass, struct edns_data* edns,
struct comm_reply* repinfo);
/**
* Add rcode for this query.
+225 -56
View File
@@ -41,8 +41,13 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include <sys/time.h>
#include "util/log.h"
#include "daemon/daemon.h"
#include "daemon/remote.h"
#include "util/config_file.h"
#include "util/storage/slabhash.h"
#include "services/listen_dnsport.h"
@@ -50,16 +55,23 @@
#include "services/cache/infra.h"
#include "util/data/msgreply.h"
#include "util/module.h"
#include "util/net_help.h"
#include <signal.h>
#include <fcntl.h>
#include <openssl/crypto.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef HAVE_GRP_H
#include <grp.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_LOGIN_CAP_H
#include <login_cap.h>
#endif
#ifdef USE_MINI_EVENT
# ifdef USE_WINSOCK
@@ -71,12 +83,70 @@
# include <event.h>
#endif
#ifdef UB_ON_WINDOWS
# include "winrc/win_svc.h"
#endif
#ifdef HAVE_NSS
# include <nss3/nss.h>
#endif
/** global debug value to keep track of heap memory allocation */
void* unbound_start_brk = 0;
#if !defined(HAVE_EVENT_BASE_GET_METHOD) && (defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP))
static const char* ev_backend2str(int b)
{
switch(b) {
case EVBACKEND_SELECT: return "select";
case EVBACKEND_POLL: return "poll";
case EVBACKEND_EPOLL: return "epoll";
case EVBACKEND_KQUEUE: return "kqueue";
case EVBACKEND_DEVPOLL: return "devpoll";
case EVBACKEND_PORT: return "evport";
}
return "unknown";
}
#endif
/** get the event system in use */
static void get_event_sys(const char** n, const char** s, const char** m)
{
#ifdef USE_WINSOCK
*n = "event";
*s = "winsock";
*m = "WSAWaitForMultipleEvents";
#elif defined(USE_MINI_EVENT)
*n = "mini-event";
*s = "internal";
*m = "select";
#else
struct event_base* b;
*s = event_get_version();
# ifdef HAVE_EVENT_BASE_GET_METHOD
*n = "libevent";
b = event_base_new();
*m = event_base_get_method(b);
# elif defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)
*n = "libev";
b = (struct event_base*)ev_default_loop(EVFLAG_AUTO);
*m = ev_backend2str(ev_backend((struct ev_loop*)b));
# else
*n = "unknown";
*m = "not obtainable";
b = NULL;
# endif
# ifdef HAVE_EVENT_BASE_FREE
event_base_free(b);
# endif
#endif
}
/** print usage. */
static void usage()
{
const char** m;
const char *evnm="event", *evsys="", *evmethod="";
printf("usage: unbound [options]\n");
printf(" start unbound daemon DNS resolver.\n");
printf("-h this help\n");
@@ -84,24 +154,51 @@ static void usage()
printf(" file format is described in unbound.conf(5).\n");
printf("-d do not fork into the background.\n");
printf("-v verbose (more times to increase verbosity)\n");
#ifdef UB_ON_WINDOWS
printf("-w opt windows option: \n");
printf(" install, remove - manage the services entry\n");
printf(" service - used to start from services control panel\n");
#endif
printf("Version %s\n", PACKAGE_VERSION);
printf("libevent %s, libldns %s, %s\n",
event_get_version(), ldns_version(),
SSLeay_version(SSLEAY_VERSION));
get_event_sys(&evnm, &evsys, &evmethod);
printf("linked libs: %s %s (it uses %s), ldns %s, %s\n",
evnm, evsys, evmethod, ldns_version(),
#ifdef HAVE_SSL
SSLeay_version(SSLEAY_VERSION)
#elif defined(HAVE_NSS)
NSS_GetVersion()
#endif
);
printf("linked modules:");
for(m = module_list_avail(); *m; m++)
printf(" %s", *m);
printf("\n");
printf("configured for %s on %s with options:%s\n",
CONFIGURE_TARGET, CONFIGURE_DATE, CONFIGURE_BUILD_WITH);
printf("BSD licensed, see LICENSE in source package for details.\n");
printf("Report bugs to %s\n", PACKAGE_BUGREPORT);
}
#ifndef unbound_testbound
int replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
{
log_assert(0);
return 0;
}
#endif
/** check file descriptor count */
static void
checkrlimits(struct config_file* cfg)
{
#ifdef HAVE_GETRLIMIT
int list = ((cfg->do_ip4?1:0) + (cfg->do_ip6?1:0)) *
((cfg->do_udp?1:0) + (cfg->do_tcp?1 +
/* list has number of ports to listen to, ifs number addresses */
int list = ((cfg->do_udp?1:0) + (cfg->do_tcp?1 +
(int)cfg->incoming_num_tcp:0));
size_t ifs = (size_t)(cfg->num_ifs==0?1:cfg->num_ifs);
size_t listen_num = list*ifs;
size_t listen_ifs = (size_t)(cfg->num_ifs==0?
((cfg->do_ip4 && !cfg->if_automatic?1:0) +
(cfg->do_ip6?1:0)):cfg->num_ifs);
size_t listen_num = list*listen_ifs;
size_t outudpnum = (size_t)cfg->outgoing_num_ports;
size_t outtcpnum = cfg->outgoing_num_tcp;
size_t misc = 4; /* logfile, pidfile, stdout... */
@@ -112,12 +209,41 @@ checkrlimits(struct config_file* cfg)
#if !defined(HAVE_PTHREAD) && !defined(HAVE_SOLARIS_THREADS)
int numthread = 1; /* it forks */
#else
int numthread = cfg->num_threads;
int numthread = (cfg->num_threads?cfg->num_threads:1);
#endif
size_t total = numthread * perthread + misc;
size_t avail;
struct rlimit rlim;
if(total > 1024 &&
strncmp(event_get_version(), "mini-event", 10) == 0) {
log_warn("too many file descriptors requested. The builtin"
"mini-event cannot handle more than 1024. Config "
"for less fds or compile with libevent");
if(numthread*perthread_noudp+15 > 1024)
fatal_exit("too much tcp. not enough fds.");
cfg->outgoing_num_ports = (int)((1024
- numthread*perthread_noudp
- 10 /* safety margin */) /numthread);
log_warn("continuing with less udp ports: %u",
cfg->outgoing_num_ports);
total = 1024;
}
if(perthread > 64 &&
strncmp(event_get_version(), "winsock-event", 13) == 0) {
log_err("too many file descriptors requested. The winsock"
" event handler cannot handle more than 64 per "
" thread. Config for less fds");
if(perthread_noudp+2 > 64)
fatal_exit("too much tcp. not enough fds.");
cfg->outgoing_num_ports = (int)((64
- perthread_noudp
- 2/* safety margin */));
log_warn("continuing with less udp ports: %u",
cfg->outgoing_num_ports);
total = numthread*(perthread_noudp+
(size_t)cfg->outgoing_num_ports)+misc;
}
if(getrlimit(RLIMIT_NOFILE, &rlim) < 0) {
log_warn("getrlimit: %s", strerror(errno));
return;
@@ -128,36 +254,30 @@ checkrlimits(struct config_file* cfg)
avail = (size_t)rlim.rlim_cur;
rlim.rlim_cur = (rlim_t)(total + 10);
rlim.rlim_max = (rlim_t)(total + 10);
#ifdef HAVE_SETRLIMIT
if(setrlimit(RLIMIT_NOFILE, &rlim) < 0) {
log_warn("setrlimit: %s", strerror(errno));
#else
if(1) {
#endif
log_warn("cannot increase max open fds from %u to %u",
(unsigned)avail, (unsigned)total+10);
/* check that calculation below does not underflow,
* with 15 as margin */
if(numthread*perthread_noudp+15 > avail)
fatal_exit("too much tcp. not enough fds.");
cfg->outgoing_num_ports = (int)((avail
- numthread*perthread_noudp
- 10 /* safety margin */) /numthread);
log_warn("continuing with less udp ports: %u",
cfg->outgoing_num_ports);
log_warn("increase ulimit or decrease threads, ports in config to remove this warning");
log_warn("increase ulimit or decrease threads, "
"ports in config to remove this warning");
return;
}
log_warn("increased limit(open files) from %u to %u",
(unsigned)avail, (unsigned)total+10);
}
if(total > 1024 &&
strncmp(event_get_version(), "mini-event", 10) == 0) {
log_err("too many file descriptors requested. The builtin"
"mini-event cannot handle more than 1024. Config "
"for less fds or compile with libevent");
fatal_exit("configuration needs too many file descriptors");
}
if(perthread > 64 &&
strncmp(event_get_version(), "winsock-event", 13) == 0) {
log_err("too many file descriptors requested. The winsock"
" event handler cannot handle more than 64 per "
" thread. Config for less fds or compile with "
" libevent");
fatal_exit("configuration needs too many file descriptors");
}
#else
(void)cfg;
#endif /* HAVE_GETRLIMIT */
@@ -169,27 +289,8 @@ apply_settings(struct daemon* daemon, struct config_file* cfg,
int cmdline_verbose)
{
/* apply if they have changed */
daemon->cfg = cfg;
verbosity = cmdline_verbose + cfg->verbosity;
config_apply(cfg);
if(!daemon->env->msg_cache ||
cfg->msg_cache_size != slabhash_get_size(daemon->env->msg_cache) ||
cfg->msg_cache_slabs != daemon->env->msg_cache->size) {
slabhash_delete(daemon->env->msg_cache);
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
HASH_DEFAULT_STARTARRAY, cfg->msg_cache_size,
msgreply_sizefunc, query_info_compare,
query_entry_delete, reply_info_delete, NULL);
if(!daemon->env->msg_cache) {
fatal_exit("malloc failure updating config settings");
}
}
if((daemon->env->rrset_cache = rrset_cache_adjust(
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
fatal_exit("malloc failure updating config settings");
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
cfg))==0)
fatal_exit("malloc failure updating config settings");
daemon_apply_cfg(daemon, cfg);
checkrlimits(cfg);
}
@@ -285,7 +386,12 @@ checkoldpid(char* pidfile, int inchroot)
static void
detach(void)
{
#ifdef HAVE_WORKING_FORK
#if defined(HAVE_DAEMON) && !defined(DEPRECATED_DAEMON)
/* use POSIX daemon(3) function */
if(daemon(1, 0) != 0)
fatal_exit("daemon failed: %s", strerror(errno));
#else /* no HAVE_DAEMON */
#ifdef HAVE_FORK
int fd;
/* Take off... */
switch (fork()) {
@@ -309,7 +415,8 @@ detach(void)
if (fd > 2)
(void)close(fd);
}
#endif /* HAVE_WORKING_FORK */
#endif /* HAVE_FORK */
#endif /* HAVE_DAEMON */
}
/** daemonize, drop user priviliges and chroot if needed */
@@ -318,6 +425,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
const char** cfgfile)
{
#ifdef HAVE_GETPWNAM
struct passwd *pwd = NULL;
uid_t uid;
gid_t gid;
/* initialize, but not to 0 (root) */
@@ -326,25 +434,38 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
log_assert(cfg);
if(cfg->username && cfg->username[0]) {
struct passwd *pwd;
if((pwd = getpwnam(cfg->username)) == NULL)
fatal_exit("user '%s' does not exist.", cfg->username);
uid = pwd->pw_uid;
gid = pwd->pw_gid;
endpwent();
/* endpwent below, in case we need pwd for setusercontext */
}
#endif
/* init syslog (as root) if needed, before daemonize, otherwise
* a fork error could not be printed since daemonize closed stderr.*/
if(cfg->use_syslog)
if(cfg->use_syslog) {
log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
}
/* if using a logfile, we cannot open it because the logfile would
* be created with the wrong permissions, we cannot chown it because
* we cannot chown system logfiles, so we do not open at all.
* So, using a logfile, the user does not see errors unless -d is
* given to unbound on the commandline. */
/* read ssl keys while superuser and outside chroot */
#ifdef HAVE_SSL
if(!(daemon->rc = daemon_remote_create(cfg)))
fatal_exit("could not set up remote-control");
if(cfg->ssl_service_key && cfg->ssl_service_key[0]) {
if(!(daemon->listen_sslctx = listen_sslctx_create(
cfg->ssl_service_key, cfg->ssl_service_pem, NULL)))
fatal_exit("could not set up listen SSL_CTX");
}
if(!(daemon->connect_sslctx = connect_sslctx_create(NULL, NULL, NULL)))
fatal_exit("could not set up connect SSL_CTX");
#endif
#ifdef HAVE_KILL
/* check old pid file before forking */
if(cfg->pidfile && cfg->pidfile[0]) {
@@ -380,11 +501,11 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
/* delete of pidfile could potentially work,
* chown to get permissions */
if(cfg->username && cfg->username[0]) {
if(chown(daemon->pidfile, uid, gid) == -1) {
fatal_exit("cannot chown %u.%u %s: %s",
if(chown(daemon->pidfile, uid, gid) == -1) {
log_err("cannot chown %u.%u %s: %s",
(unsigned)uid, (unsigned)gid,
daemon->pidfile, strerror(errno));
}
}
}
}
}
@@ -392,6 +513,21 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
(void)daemon;
#endif
/* Set user context */
#ifdef HAVE_GETPWNAM
if(cfg->username && cfg->username[0]) {
#ifdef HAVE_SETUSERCONTEXT
/* setusercontext does initgroups, setuid, setgid, and
* also resource limits from login config, but we
* still call setresuid, setresgid to be sure to set all uid*/
if(setusercontext(NULL, pwd, uid,
LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
log_warn("unable to setusercontext %s: %s",
cfg->username, strerror(errno));
#endif /* HAVE_SETUSERCONTEXT */
}
#endif /* HAVE_GETPWNAM */
/* box into the chroot */
#ifdef HAVE_CHROOT
if(cfg->chrootdir && cfg->chrootdir[0]) {
@@ -418,6 +554,9 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
if(!daemon->pidfile)
log_err("out of memory in pidfile adjust");
}
daemon->chroot = strdup(cfg->chrootdir);
if(!daemon->chroot)
log_err("out of memory in daemon chroot dir storage");
}
#else
(void)cfgfile;
@@ -441,6 +580,13 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
/* drop permissions after chroot, getpwnam, pidfile, syslog done*/
#ifdef HAVE_GETPWNAM
if(cfg->username && cfg->username[0]) {
# ifdef HAVE_INITGROUPS
if(initgroups(cfg->username, gid) != 0)
log_warn("unable to initgroups %s: %s",
cfg->username, strerror(errno));
# endif /* HAVE_INITGROUPS */
endpwent();
#ifdef HAVE_SETRESGID
if(setresgid(gid,gid,gid) != 0)
#elif defined(HAVE_SETREGID) && !defined(DARWIN_BROKEN_SETREUID)
@@ -462,7 +608,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
verbose(VERB_QUERY, "drop user privileges, run as %s",
cfg->username);
}
#endif
#endif /* HAVE_GETPWNAM */
/* file logging inited after chroot,chdir,setuid is done so that
* it would succeed on SIGHUP as well */
if(!cfg->use_syslog)
@@ -493,7 +639,7 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode)
/* config stuff */
if(!(cfg = config_create()))
fatal_exit("Could not alloc config defaults");
if(!config_read(cfg, cfgfile)) {
if(!config_read(cfg, cfgfile, daemon->chroot)) {
if(errno != ENOENT)
fatal_exit("Could not read config file: %s",
cfgfile);
@@ -507,7 +653,11 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode)
if(!done_setup) {
perform_setup(daemon, cfg, debug_mode, &cfgfile);
done_setup = 1;
} else log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
} else {
/* reopen log after HUP to facilitate log rotation */
if(!cfg->use_syslog)
log_init(cfg->logfile, 0, cfg->chrootdir);
}
/* work */
daemon_fork(daemon);
@@ -547,8 +697,12 @@ main(int argc, char* argv[])
{
int c;
const char* cfgfile = CONFIGFILE;
const char* winopt = NULL;
int cmdline_verbose = 0;
int debug_mode = 0;
#ifdef UB_ON_WINDOWS
int cmdline_cfg = 0;
#endif
#ifdef HAVE_SBRK
/* take debug snapshot of heap */
@@ -557,10 +711,13 @@ main(int argc, char* argv[])
log_init(NULL, 0, NULL);
/* parse the options */
while( (c=getopt(argc, argv, "c:dhv")) != -1) {
while( (c=getopt(argc, argv, "c:dhvw:")) != -1) {
switch(c) {
case 'c':
cfgfile = optarg;
#ifdef UB_ON_WINDOWS
cmdline_cfg = 1;
#endif
break;
case 'v':
cmdline_verbose ++;
@@ -569,6 +726,9 @@ main(int argc, char* argv[])
case 'd':
debug_mode = 1;
break;
case 'w':
winopt = optarg;
break;
case '?':
case 'h':
default:
@@ -579,6 +739,15 @@ main(int argc, char* argv[])
argc -= optind;
argv += optind;
if(winopt) {
#ifdef UB_ON_WINDOWS
wsvc_command_option(winopt, cfgfile, cmdline_verbose,
cmdline_cfg);
#else
fatal_exit("option not supported");
#endif
}
if(argc != 0) {
usage();
return 1;
+236 -119
View File
@@ -40,6 +40,7 @@
* pending requests.
*/
#include "config.h"
#include <ldns/wire2host.h>
#include "util/log.h"
#include "util/net_help.h"
#include "util/random.h"
@@ -65,6 +66,10 @@
#include "util/data/dname.h"
#include "util/fptr_wlist.h"
#include "util/tube.h"
#include "iterator/iter_fwd.h"
#include "iterator/iter_hints.h"
#include "validator/autotrust.h"
#include "validator/val_anchor.h"
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -73,10 +78,25 @@
#include <netdb.h>
#endif
#include <signal.h>
#ifdef UB_ON_WINDOWS
#include "winrc/win_svc.h"
#endif
/** Size of an UDP datagram */
#define NORMAL_UDP_SIZE 512 /* bytes */
/**
* seconds to add to prefetch leeway. This is a TTL that expires old rrsets
* earlier than they should in order to put the new update into the cache.
* This additional value is to make sure that if not all TTLs are equal in
* the message to be updated(and replaced), that rrsets with up to this much
* extra TTL are also replaced. This means that the resulting new message
* will have (most likely) this TTL at least, avoiding very small 'split
* second' TTLs due to operators choosing relative primes for TTLs (or so).
* Also has to be at least one to break ties (and overwrite cached entry).
*/
#define PREFETCH_EXPIRY_ADD 60
#ifdef UNBOUND_ALLOC_STATS
/** measure memory leakage */
static void
@@ -123,14 +143,14 @@ debug_total_mem(size_t calctotal)
#endif /* UNBOUND_ALLOC_STATS */
/** Report on memory usage by this thread and global */
void
static void
worker_mem_report(struct worker* ATTR_UNUSED(worker),
struct serviced_query* ATTR_UNUSED(cur_serv))
{
#ifdef UNBOUND_ALLOC_STATS
/* debug func in validator module */
size_t total, front, back, mesh, msg, rrset, infra, ac, superac;
size_t me, iter, val;
size_t me, iter, val, anch;
int i;
if(verbosity < VERB_ALGO)
return;
@@ -142,6 +162,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
mesh = mesh_get_mem(worker->env.mesh);
ac = alloc_get_mem(&worker->alloc);
superac = alloc_get_mem(&worker->daemon->superalloc);
anch = anchors_get_mem(worker->env.anchors);
iter = 0;
val = 0;
for(i=0; i<worker->env.mesh->mods.num; i++) {
@@ -158,18 +179,22 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
+ sizeof(worker->rndstate)
+ regional_get_mem(worker->scratchpad)
+ sizeof(*worker->env.scratch_buffer)
+ ldns_buffer_capacity(worker->env.scratch_buffer);
+ ldns_buffer_capacity(worker->env.scratch_buffer)
+ forwards_get_mem(worker->env.fwds)
+ hints_get_mem(worker->env.hints);
if(worker->thread_num == 0)
me += acl_list_get_mem(worker->daemon->acl);
if(cur_serv) {
me += serviced_get_mem(cur_serv);
}
total = front+back+mesh+msg+rrset+infra+iter+val+ac+superac+me;
log_info("Memory conditions: %u front=%u back=%u mesh=%u msg=%u "
"rrset=%u infra=%u iter=%u val=%u "
"rrset=%u infra=%u iter=%u val=%u anchors=%u "
"alloccache=%u globalalloccache=%u me=%u",
(unsigned)total, (unsigned)front, (unsigned)back,
(unsigned)mesh, (unsigned)msg, (unsigned)rrset,
(unsigned)infra, (unsigned)iter, (unsigned)val, (unsigned)ac,
(unsigned)superac, (unsigned)me);
(unsigned)infra, (unsigned)iter, (unsigned)val, (unsigned)anch,
(unsigned)ac, (unsigned)superac, (unsigned)me);
debug_total_mem(total);
#else /* no UNBOUND_ALLOC_STATS */
size_t val = 0;
@@ -264,9 +289,10 @@ worker_handle_service_reply(struct comm_point* c, void* arg, int error,
return 0;
}
/** check request sanity. Returns error code, 0 OK, or -1 discard.
/** check request sanity.
* @param pkt: the wire packet to examine for sanity.
* @param worker: parameters for checking.
* @return error code, 0 OK, or -1 discard.
*/
static int
worker_check_request(ldns_buffer* pkt, struct worker* worker)
@@ -342,7 +368,15 @@ worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube), uint8_t* msg,
break;
case worker_cmd_stats:
verbose(VERB_ALGO, "got control cmd stats");
server_stats_reply(worker);
server_stats_reply(worker, 1);
break;
case worker_cmd_stats_noreset:
verbose(VERB_ALGO, "got control cmd stats_noreset");
server_stats_reply(worker, 0);
break;
case worker_cmd_remote:
verbose(VERB_ALGO, "got control cmd remote");
daemon_remote_exec(worker);
break;
default:
log_err("bad command %d", (int)cmd);
@@ -416,7 +450,8 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
uint16_t udpsize = edns->udp_size;
int secure = 0;
uint32_t timenow = *worker->env.now;
int must_validate = !(flags&BIT_CD) && worker->env.need_to_validate;
int must_validate = (!(flags&BIT_CD) || worker->env.cfg->ignore_cd)
&& worker->env.need_to_validate;
struct dns_msg *msg = NULL;
struct delegpt *dp;
@@ -483,43 +518,6 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
return 1;
}
/** check cname chain in cache reply */
static int
check_cache_chain(struct reply_info* rep) {
/* check only answer section rrs for matching cname chain.
* the cache may return changed rdata, but owner names are untouched.*/
size_t i;
uint8_t* sname = rep->rrsets[0]->rk.dname;
size_t snamelen = rep->rrsets[0]->rk.dname_len;
for(i=0; i<rep->an_numrrsets; i++) {
uint16_t t = ntohs(rep->rrsets[i]->rk.type);
if(t == LDNS_RR_TYPE_DNAME)
continue; /* skip dnames; note TTL 0 not cached */
/* verify that owner matches current sname */
if(query_dname_compare(sname, rep->rrsets[i]->rk.dname) != 0){
/* cname chain broken */
return 0;
}
/* if this is a cname; move on */
if(t == LDNS_RR_TYPE_CNAME) {
get_cname_target(rep->rrsets[i], &sname, &snamelen);
}
}
return 1;
}
/** check security status in cache reply */
static int
all_rrsets_secure(struct reply_info* rep) {
size_t i;
for(i=0; i<rep->rrset_count; i++) {
if( ((struct packed_rrset_data*)rep->rrsets[i]->entry.data)
->security != sec_status_secure )
return 0;
}
return 1;
}
/** answer query from the cache */
static int
answer_from_cache(struct worker* worker, struct query_info* qinfo,
@@ -529,9 +527,10 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
uint32_t timenow = *worker->env.now;
uint16_t udpsize = edns->udp_size;
int secure;
int must_validate = !(flags&BIT_CD) && worker->env.need_to_validate;
int must_validate = (!(flags&BIT_CD) || worker->env.cfg->ignore_cd)
&& worker->env.need_to_validate;
/* see if it is possible */
if(rep->ttl <= timenow) {
if(rep->ttl < timenow) {
/* the rrsets may have been updated in the meantime.
* we will refetch the message format from the
* authoritative server
@@ -545,7 +544,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
if(rep->an_numrrsets > 0 && (rep->rrsets[0]->rk.type ==
htons(LDNS_RR_TYPE_CNAME) || rep->rrsets[0]->rk.type ==
htons(LDNS_RR_TYPE_DNAME))) {
if(!check_cache_chain(rep)) {
if(!reply_check_cname_chain(rep)) {
/* cname chain invalid, redo iterator steps */
verbose(VERB_ALGO, "Cache reply: cname chain broken");
bail_out:
@@ -577,7 +576,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
"validation");
goto bail_out; /* need to validate cache entry first */
} else if(rep->security == sec_status_secure) {
if(all_rrsets_secure(rep))
if(reply_all_rrsets_secure(rep))
secure = 1;
else {
if(must_validate) {
@@ -612,6 +611,24 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
return 1;
}
/** Reply to client and perform prefetch to keep cache up to date */
static void
reply_and_prefetch(struct worker* worker, struct query_info* qinfo,
uint16_t flags, struct comm_reply* repinfo, uint32_t leeway)
{
/* first send answer to client to keep its latency
* as small as a cachereply */
comm_point_send_reply(repinfo);
server_stats_prefetch(&worker->stats, worker);
/* create the prefetch in the mesh as a normal lookup without
* client addrs waiting, which has the cache blacklisted (to bypass
* the cache and go to the network for the data). */
/* this (potentially) runs the mesh for the new query */
mesh_new_prefetch(worker->env.mesh, qinfo, flags, leeway +
PREFETCH_EXPIRY_ADD);
}
/**
* Fill CH class answer into buffer. Keeps query.
* @param pkt: buffer
@@ -726,21 +743,26 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
worker->stats.unwanted_queries++;
return 0;
} else if(acl == acl_refuse) {
log_addr(VERB_ALGO, "refused query from",
&repinfo->addr, repinfo->addrlen);
log_buf(VERB_ALGO, "refuse", c->buffer);
if(worker->stats.extended)
worker->stats.unwanted_queries++;
if(worker_check_request(c->buffer, worker) == -1) {
comm_point_drop_reply(repinfo);
return 0; /* discard this */
}
ldns_buffer_set_limit(c->buffer, LDNS_HEADER_SIZE);
ldns_buffer_write_at(c->buffer, 4,
(uint8_t*)"\0\0\0\0\0\0\0\0", 8);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer),
LDNS_RCODE_REFUSED);
log_addr(VERB_ALGO, "refused query from",
&repinfo->addr, repinfo->addrlen);
log_buf(VERB_ALGO, "refuse", c->buffer);
if(worker->stats.extended)
worker->stats.unwanted_queries++;
return 1;
}
if((ret=worker_check_request(c->buffer, worker)) != 0) {
verbose(VERB_ALGO, "worker check request: bad query.");
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
if(ret != -1) {
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer), ret);
@@ -753,15 +775,24 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
/* see if query is in the cache */
if(!query_info_parse(&qinfo, c->buffer)) {
verbose(VERB_ALGO, "worker parse request: formerror.");
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
ldns_buffer_rewind(c->buffer);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer),
LDNS_RCODE_FORMERR);
server_stats_insrcode(&worker->stats, c->buffer);
return 1;
}
if(worker->env.cfg->log_queries) {
char ip[128];
addr_to_str(&repinfo->addr, repinfo->addrlen, ip, sizeof(ip));
log_nametypeclass(0, ip, qinfo.qname, qinfo.qtype, qinfo.qclass);
}
if(qinfo.qtype == LDNS_RR_TYPE_AXFR ||
qinfo.qtype == LDNS_RR_TYPE_IXFR) {
verbose(VERB_ALGO, "worker request: refused zone transfer.");
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
ldns_buffer_rewind(c->buffer);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer),
LDNS_RCODE_REFUSED);
@@ -773,6 +804,8 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
}
if((ret=parse_edns_from_pkt(c->buffer, &edns)) != 0) {
verbose(VERB_ALGO, "worker parse edns: formerror.");
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
ldns_buffer_rewind(c->buffer);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer), ret);
server_stats_insrcode(&worker->stats, c->buffer);
@@ -784,6 +817,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
edns.udp_size = EDNS_ADVERTISED_SIZE;
edns.bits &= EDNS_DO;
verbose(VERB_ALGO, "query with bad edns version.");
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
error_encode(c->buffer, EDNS_RCODE_BADVERS&0xf, &qinfo,
*(uint16_t*)ldns_buffer_begin(c->buffer),
ldns_buffer_read_u16_at(c->buffer, 2), NULL);
@@ -794,10 +828,12 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
worker->daemon->cfg->harden_short_bufsize) {
verbose(VERB_QUERY, "worker request: EDNS bufsize %d ignored",
(int)edns.udp_size);
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
edns.udp_size = NORMAL_UDP_SIZE;
}
if(edns.edns_present && edns.udp_size < LDNS_HEADER_SIZE) {
verbose(VERB_ALGO, "worker request: edns is too small.");
log_addr(VERB_CLIENT, "from", &repinfo->addr, repinfo->addrlen);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
LDNS_TC_SET(ldns_buffer_begin(c->buffer));
LDNS_RCODE_SET(ldns_buffer_begin(c->buffer),
@@ -810,7 +846,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
}
if(worker->stats.extended)
server_stats_insquery(&worker->stats, c, qinfo.qtype,
qinfo.qclass, &edns);
qinfo.qclass, &edns, repinfo);
if(c->type != comm_udp)
edns.udp_size = 65535; /* max size for TCP replies */
if(qinfo.qclass == LDNS_RR_CLASS_CH && answer_chaos(worker, &qinfo,
@@ -820,6 +856,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
}
if(local_zones_answer(worker->daemon->local_zones, &qinfo, &edns,
c->buffer, worker->scratchpad)) {
regional_free_all(worker->scratchpad);
if(ldns_buffer_limit(c->buffer) == 0) {
comm_point_drop_reply(repinfo);
return 0;
@@ -849,6 +886,17 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
*(uint16_t*)ldns_buffer_begin(c->buffer),
ldns_buffer_read_u16_at(c->buffer, 2), repinfo,
&edns)) {
/* prefetch it if the prefetch TTL expired */
if(worker->env.cfg->prefetch && *worker->env.now >=
((struct reply_info*)e->data)->prefetch_ttl) {
uint32_t leeway = ((struct reply_info*)e->
data)->ttl - *worker->env.now;
lock_rw_unlock(&e->lock);
reply_and_prefetch(worker, &qinfo,
ldns_buffer_read_u16_at(c->buffer, 2),
repinfo, leeway);
return 0;
}
lock_rw_unlock(&e->lock);
return 1;
}
@@ -868,15 +916,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
ldns_buffer_rewind(c->buffer);
server_stats_querymiss(&worker->stats, worker);
/* grab a work request structure for this new request */
if(worker->env.mesh->num_reply_addrs>worker->request_size*16) {
/* protect our memory usage from storing reply addresses */
verbose(VERB_ALGO, "Too many requests queued. "
"dropping incoming query.");
worker->env.mesh->stats_dropped++;
comm_point_drop_reply(repinfo);
return 0;
if(verbosity >= VERB_CLIENT) {
if(c->type == comm_udp)
log_addr(VERB_CLIENT, "udp request from",
&repinfo->addr, repinfo->addrlen);
else log_addr(VERB_CLIENT, "tcp request from",
&repinfo->addr, repinfo->addrlen);
}
/* grab a work request structure for this new request */
mesh_new_client(worker->env.mesh, &qinfo,
ldns_buffer_read_u16_at(c->buffer, 2),
&edns, repinfo, *(uint16_t*)ldns_buffer_begin(c->buffer));
@@ -928,8 +976,10 @@ worker_restart_timer(struct worker* worker)
{
if(worker->env.cfg->stat_interval > 0) {
struct timeval tv;
#ifndef S_SPLINT_S
tv.tv_sec = worker->env.cfg->stat_interval;
tv.tv_usec = 0;
#endif
comm_timer_set(worker->stat_timer, &tv);
}
}
@@ -941,17 +991,28 @@ void worker_stat_timer_cb(void* arg)
mesh_stats(worker->env.mesh, "mesh has");
worker_mem_report(worker, NULL);
if(!worker->daemon->cfg->stat_cumulative) {
server_stats_init(&worker->stats, worker->env.cfg);
mesh_stats_clear(worker->env.mesh);
worker->back->unwanted_replies = 0;
worker_stats_clear(worker);
}
/* start next timer */
worker_restart_timer(worker);
}
void worker_probe_timer_cb(void* arg)
{
struct worker* worker = (struct worker*)arg;
struct timeval tv;
#ifndef S_SPLINT_S
tv.tv_sec = (time_t)autr_probe_timer(&worker->env);
tv.tv_usec = 0;
#endif
if(tv.tv_sec != 0)
comm_timer_set(worker->env.probe_timer, &tv);
}
struct worker*
worker_create(struct daemon* daemon, int id, int* ports, int n)
{
unsigned int seed;
struct worker* worker = (struct worker*)calloc(1,
sizeof(struct worker));
if(!worker)
@@ -969,6 +1030,19 @@ worker_create(struct daemon* daemon, int id, int* ports, int n)
free(worker);
return NULL;
}
/* create random state here to avoid locking trouble in RAND_bytes */
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
(((unsigned int)worker->thread_num)<<17);
/* shift thread_num so it does not match out pid bits */
if(!(worker->rndstate = ub_initstate(seed, daemon->rand))) {
seed = 0;
log_err("could not init random numbers.");
tube_delete(worker->cmd);
free(worker->ports);
free(worker);
return NULL;
}
seed = 0;
return worker;
}
@@ -976,14 +1050,15 @@ int
worker_init(struct worker* worker, struct config_file *cfg,
struct listen_port* ports, int do_sigs)
{
unsigned int seed;
worker->need_to_exit = 0;
worker->base = comm_base_create();
worker->base = comm_base_create(do_sigs);
if(!worker->base) {
log_err("could not create event handling base");
worker_delete(worker);
return 0;
}
comm_base_set_slow_accept_handlers(worker->base, &worker_stop_accept,
&worker_start_accept, worker);
if(do_sigs) {
#ifdef SIGHUP
ub_thread_sig_unblock(SIGHUP);
@@ -1010,32 +1085,20 @@ worker_init(struct worker* worker, struct config_file *cfg,
return 0;
}
#endif /* LIBEVENT_SIGNAL_PROBLEM */
if(!(worker->rc = daemon_remote_create(worker))) {
worker_delete(worker);
return 0;
}
if(!daemon_remote_open_accept(worker->rc,
worker->daemon->rc_ports)) {
if(!daemon_remote_open_accept(worker->daemon->rc,
worker->daemon->rc_ports, worker)) {
worker_delete(worker);
return 0;
}
#ifdef UB_ON_WINDOWS
wsvc_setup_worker(worker);
#endif /* UB_ON_WINDOWS */
} else { /* !do_sigs */
worker->comsig = NULL;
worker->rc = NULL;
}
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
(((unsigned int)worker->thread_num)<<17);
/* shift thread_num so it does not match out pid bits */
if(!(worker->rndstate = ub_initstate(seed, NULL))) {
seed = 0;
log_err("could not init random numbers.");
worker_delete(worker);
return 0;
}
seed = 0;
worker->front = listen_create(worker->base, ports,
cfg->msg_buffer_size, (int)cfg->incoming_num_tcp,
worker_handle_request, worker);
worker->daemon->listen_sslctx, worker_handle_request, worker);
if(!worker->front) {
log_err("could not create listening sockets");
worker_delete(worker);
@@ -1047,7 +1110,8 @@ worker_init(struct worker* worker, struct config_file *cfg,
cfg->do_tcp?cfg->outgoing_num_tcp:0,
worker->daemon->env->infra_cache, worker->rndstate,
cfg->use_caps_bits_for_id, worker->ports, worker->numports,
cfg->unwanted_threshold, &worker_alloc_cleanup, worker);
cfg->unwanted_threshold, &worker_alloc_cleanup, worker,
cfg->do_udp, worker->daemon->connect_sslctx);
if(!worker->back) {
log_err("could not create outgoing sockets");
worker_delete(worker);
@@ -1074,7 +1138,6 @@ worker_init(struct worker* worker, struct config_file *cfg,
worker_delete(worker);
return 0;
}
worker->request_size = cfg->num_queries_per_thread;
server_stats_init(&worker->stats, cfg);
alloc_init(&worker->alloc, &worker->daemon->superalloc,
@@ -1085,7 +1148,6 @@ worker_init(struct worker* worker, struct config_file *cfg,
if(worker->thread_num == 0)
log_set_time(worker->env.now);
worker->env.worker = worker;
worker->env.send_packet = &worker_send_packet;
worker->env.send_query = &worker_send_query;
worker->env.alloc = &worker->alloc;
worker->env.rnd = worker->rndstate;
@@ -1096,6 +1158,36 @@ worker_init(struct worker* worker, struct config_file *cfg,
worker->env.kill_sub = &mesh_state_delete;
worker->env.detect_cycle = &mesh_detect_cycle;
worker->env.scratch_buffer = ldns_buffer_new(cfg->msg_buffer_size);
if(!(worker->env.fwds = forwards_create()) ||
!forwards_apply_cfg(worker->env.fwds, cfg)) {
log_err("Could not set forward zones");
worker_delete(worker);
return 0;
}
if(!(worker->env.hints = hints_create()) ||
!hints_apply_cfg(worker->env.hints, cfg)) {
log_err("Could not set root or stub hints");
worker_delete(worker);
return 0;
}
/* one probe timer per process -- if we have 5011 anchors */
if(autr_get_num_anchors(worker->env.anchors) > 0
#ifndef THREADS_DISABLED
&& worker->thread_num == 0
#endif
) {
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 0;
worker->env.probe_timer = comm_timer_create(worker->base,
worker_probe_timer_cb, worker);
if(!worker->env.probe_timer) {
log_err("could not create 5011-probe timer");
} else {
/* let timer fire, then it can reset itself */
comm_timer_set(worker->env.probe_timer, &tv);
}
}
if(!worker->env.mesh || !worker->env.scratch_buffer) {
worker_delete(worker);
return 0;
@@ -1126,17 +1218,24 @@ worker_delete(struct worker* worker)
mesh_stats(worker->env.mesh, "mesh has");
worker_mem_report(worker, NULL);
}
outside_network_quit_prepare(worker->back);
mesh_delete(worker->env.mesh);
ldns_buffer_free(worker->env.scratch_buffer);
forwards_delete(worker->env.fwds);
hints_delete(worker->env.hints);
listen_delete(worker->front);
outside_network_delete(worker->back);
comm_signal_delete(worker->comsig);
tube_delete(worker->cmd);
comm_timer_delete(worker->stat_timer);
daemon_remote_delete(worker->rc);
comm_timer_delete(worker->env.probe_timer);
free(worker->ports);
if(worker->thread_num == 0)
if(worker->thread_num == 0) {
log_set_time(NULL);
#ifdef UB_ON_WINDOWS
wsvc_desetup_worker(worker);
#endif /* UB_ON_WINDOWS */
}
comm_base_delete(worker->base);
ub_randfree(worker->rndstate);
alloc_clear(&worker->alloc);
@@ -1144,19 +1243,6 @@ worker_delete(struct worker* worker)
free(worker);
}
int
worker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
socklen_t addrlen, int timeout, struct module_qstate* q, int use_tcp)
{
struct worker* worker = q->env->worker;
if(use_tcp) {
return pending_tcp_query(worker->back, pkt, addr, addrlen,
timeout, worker_handle_reply, q) != 0;
}
return pending_udp_query(worker->back, pkt, addr, addrlen,
timeout*1000, worker_handle_reply, q) != 0;
}
/** compare outbound entry qstates */
static int
outbound_entry_compare(void* a, void* b)
@@ -1170,9 +1256,9 @@ outbound_entry_compare(void* a, void* b)
struct outbound_entry*
worker_send_query(uint8_t* qname, size_t qnamelen, uint16_t qtype,
uint16_t qclass, uint16_t flags, int dnssec,
struct sockaddr_storage* addr, socklen_t addrlen,
struct module_qstate* q)
uint16_t qclass, uint16_t flags, int dnssec, int want_dnssec,
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
size_t zonelen, struct module_qstate* q)
{
struct worker* worker = q->env->worker;
struct outbound_entry* e = (struct outbound_entry*)regional_alloc(
@@ -1181,9 +1267,10 @@ worker_send_query(uint8_t* qname, size_t qnamelen, uint16_t qtype,
return NULL;
e->qstate = q;
e->qsent = outnet_serviced_query(worker->back, qname,
qnamelen, qtype, qclass, flags, dnssec, addr, addrlen,
worker_handle_service_reply, e, worker->back->udp_buff,
&outbound_entry_compare);
qnamelen, qtype, qclass, flags, dnssec, want_dnssec,
q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, addr,
addrlen, zone, zonelen, worker_handle_service_reply, e,
worker->back->udp_buff, &outbound_entry_compare);
if(!e->qsent) {
return NULL;
}
@@ -1198,20 +1285,35 @@ worker_alloc_cleanup(void* arg)
slabhash_clear(worker->env.msg_cache);
}
/* --- fake callbacks for fptr_wlist to work --- */
int libworker_send_packet(ldns_buffer* ATTR_UNUSED(pkt),
struct sockaddr_storage* ATTR_UNUSED(addr),
socklen_t ATTR_UNUSED(addrlen), int ATTR_UNUSED(timeout),
struct module_qstate* ATTR_UNUSED(q), int ATTR_UNUSED(use_tcp))
void worker_stats_clear(struct worker* worker)
{
log_assert(0);
return 0;
server_stats_init(&worker->stats, worker->env.cfg);
mesh_stats_clear(worker->env.mesh);
worker->back->unwanted_replies = 0;
}
void worker_start_accept(void* arg)
{
struct worker* worker = (struct worker*)arg;
listen_start_accept(worker->front);
if(worker->thread_num == 0)
daemon_remote_start_accept(worker->daemon->rc);
}
void worker_stop_accept(void* arg)
{
struct worker* worker = (struct worker*)arg;
listen_stop_accept(worker->front);
if(worker->thread_num == 0)
daemon_remote_stop_accept(worker->daemon->rc);
}
/* --- fake callbacks for fptr_wlist to work --- */
struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname),
size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
int ATTR_UNUSED(dnssec), struct sockaddr_storage* ATTR_UNUSED(addr),
int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
struct sockaddr_storage* ATTR_UNUSED(addr),
socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q))
{
log_assert(0);
@@ -1241,6 +1343,20 @@ void libworker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
log_assert(0);
}
void libworker_fg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
ldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
char* ATTR_UNUSED(why_bogus))
{
log_assert(0);
}
void libworker_bg_done_cb(void* ATTR_UNUSED(arg), int ATTR_UNUSED(rcode),
ldns_buffer* ATTR_UNUSED(buf), enum sec_status ATTR_UNUSED(s),
char* ATTR_UNUSED(why_bogus))
{
log_assert(0);
}
int context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
{
log_assert(0);
@@ -1258,3 +1374,4 @@ int codeline_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
log_assert(0);
return 0;
}
+25 -23
View File
@@ -43,7 +43,6 @@
#ifndef DAEMON_WORKER_H
#define DAEMON_WORKER_H
#include "config.h"
#include "util/netevent.h"
#include "util/locks.h"
#include "util/alloc.h"
@@ -66,7 +65,11 @@ enum worker_commands {
/** make the worker quit */
worker_cmd_quit,
/** obtain statistics */
worker_cmd_stats
worker_cmd_stats,
/** obtain statistics without statsclear */
worker_cmd_stats_noreset,
/** execute remote control command */
worker_cmd_remote
};
/**
@@ -98,11 +101,6 @@ struct worker {
struct comm_point* cmd_com;
/** timer for statistics */
struct comm_timer* stat_timer;
/** remote control state (for first thread only) */
struct daemon_remote* rc;
/** number of requests that can be handled by this worker */
size_t request_size;
/** random() table for this worker. */
struct ub_randstate* rndstate;
@@ -166,20 +164,6 @@ void worker_send_cmd(struct worker* worker, enum worker_commands cmd);
*/
void worker_sighandler(int sig, void* arg);
/**
* Worker service routine to send udp messages for modules.
* @param pkt: packet to send.
* @param addr: where to.
* @param addrlen: length of addr.
* @param timeout: seconds to wait until timeout.
* @param q: wich query state to reactivate upon return.
* @param use_tcp: true to use TCP, false for UDP.
* @return: false on failure (memory or socket related). no query was
* sent.
*/
int worker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
socklen_t addrlen, int timeout, struct module_qstate* q, int use_tcp);
/**
* Worker service routine to send serviced queries to authoritative servers.
* @param qname: query name. (host order)
@@ -188,16 +172,19 @@ int worker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
* @param qclass: query class. (host order)
* @param flags: host order flags word, with opcode and CD bit.
* @param dnssec: if set, EDNS record will have DO bit set.
* @param want_dnssec: signatures needed.
* @param addr: where to.
* @param addrlen: length of addr.
* @param zone: wireformat dname of the zone.
* @param zonelen: length of zone name.
* @param q: wich query state to reactivate upon return.
* @return: false on failure (memory or socket related). no query was
* sent.
*/
struct outbound_entry* worker_send_query(uint8_t* qname, size_t qnamelen,
uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
struct sockaddr_storage* addr, socklen_t addrlen,
struct module_qstate* q);
int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* zone, size_t zonelen, struct module_qstate* q);
/**
* process control messages from the main thread. Frees the control
@@ -226,7 +213,22 @@ int worker_handle_service_reply(struct comm_point* c, void* arg, int error,
/** cleanup the cache to remove all rrset IDs from it, arg is worker */
void worker_alloc_cleanup(void* arg);
/**
* Init worker stats - includes server_stats_init, outside network and mesh.
* @param worker: the worker to init
*/
void worker_stats_clear(struct worker* worker);
/** statistics timer callback handler */
void worker_stat_timer_cb(void* arg);
/** probe timer callback handler */
void worker_probe_timer_cb(void* arg);
/** start accept callback handler */
void worker_start_accept(void* arg);
/** stop accept callback handler */
void worker_stop_accept(void* arg);
#endif /* DAEMON_WORKER_H */
+6 -1
View File
@@ -11,6 +11,11 @@ At NLnet Labs, Jelte Jansen, Mark Santcroos and Matthijs Mekking
reviewed the unbound C sources.
Jakob Schlyter - for advice on secure settings, random numbers and blacklists.
Ondřej Surý - running coverity analysis tool on 0.9 dev version.
Alexander Gall - multihomed, anycast testing of unbound resolver server.
Zdenek Vasicek and Marek Vavrusa - python module.
cz.nic - sponsoring 'summer of code' development by Zdenek and Marek.
Brett Carr - windows beta testing.
Luca Bruno - patch for windows support in libunbound hosts and resolvconf().
Tom Hendrikx - contributed split-itar.sh a useful script to 5011-track ITAR.
Daisuke HIGASHI - patch for rrset-roundrobin and minimal-responses.
+2394
View File
File diff suppressed because it is too large Load Diff
+32 -23
View File
@@ -12,31 +12,44 @@ Big Features
Recursive service.
Caching service.
Forwarding and stub zones.
No authoritative service.
Very limited authoritative service.
DNSSEC Validation options.
EDNS0, NSEC3, Unknown-RR-types.
EDNS0, NSEC3, IPv6, DNAME, Unknown-RR-types.
RSASHA256, GOST, ECDSA, SHA384 DNSSEC algorithms.
Details
-------
Processing support
RFC 1034-1035: as a recursive, caching server. Not authoritative.
including CNAMEs, referrals, wildcards, classes, ...
AAAA type, and IP6 dual stack support.
type ANY queries are supported, class ANY queries are supported.
RFC 4033-4035: as a validating caching server (unbound daemon).
as a validating stub (libunbound).
RFC 1918.
RFC 2181: completely, including the trust model, keeping rrsets together.
RFC 2672: DNAME support.
RFC 3597: Unknown RR type support.
RFC 2671: EDNS0 support, default advertisement 4Kb size.
RFC 5155: NSEC3, NSEC3PARAM types
AAAA type. and IP6 dual stack support.
type ANY queries are supported.
RFC 2308: TTL directive, and the rest of the RFC too.
RFC 4592: wildcards.
RFC 1995, 1996, 2136: not authoritative, so no AXFR, IXFR, NOTIFY or
dynamic update services are appropriate.
RFC 2181: completely, including the trust model, keeping rrsets together.
RFC 2308: TTL directive, and the rest of the RFC too.
RFC 2671: EDNS0 support, default advertisement 4Kb size.
RFC 2672: DNAME support.
RFC 3597: Unknown RR type support.
RFC 4343: case insensitive handling of domain names.
RFC 4509: SHA256 DS hash.
RFC 4592: wildcards.
RFC 4697: No DNS Resolution Misbehavior.
RFC 5011: update of trust anchors with timers.
RFC 5155: NSEC3, NSEC3PARAM types
RFC 5358: reflectors-are-evil: access control list for recursive
service. In fact for all DNS service so cache snooping is halted.
RFC 5452: forgery resilience. all recommendations followed.
RFC 5702: RSASHA256 signature algorithm.
RFC 5933: GOST signature algorithm.
RFC 6303: default local zones.
It is possible to block zones or return an address for localhost.
This is a very limited authoritative service. Defaults as in draft.
RFC 6604: xNAME RCODE and status bits.
RFC 6605: ECDSA signature algorithm, SHA384 DS hash.
chroot and drop-root-privileges support, default enabled in config file.
@@ -44,27 +57,23 @@ AD bit in query can be used to request AD bit in response (w/o using DO bit).
CD bit in query can be used to request bogus data.
UDP and TCP service is provided downstream.
UDP and TCP are used to request from upstream servers.
SSL wrapped TCP service can be used upstream and provided downstream.
Multiple queries can be made over a TCP stream.
No TSIG support at this time.
No SIG0 support at this time.
No dTLS support at this time.
This is not a DNS statistics package, but some operationally useful
values are provided.
TXT RRs from the Chaos class (id.server, hostname.bind, ...) supported.
values are provided via unbound-control stats.
TXT RRs from the Chaos class (id.server, hostname.bind, ...) are supported.
draft-forgery-resilience: all recommendations followed.
draft-0x20: experimental implementation (incomplete).
implements bitwise echo of the query to support downstream 0x20.
draft-ietf-dnsop-default-local-zones is fully supported (-04).
It is possible to block zones or return an address for localhost.
This is a very limited authoritative service. Defaults as in draft.
draft-0x20: implemented, use caps-for-id option to enable use.
Also implements bitwise echo of the query to support downstream 0x20.
draft-ietf-dnsop-resolver-priming(-00): can prime and can fallback to
a safety belt list.
draft-ietf-dnsop-dnssec-trust-anchor(-01): DS records can be configured
as trust anchors. Also DNSKEYs are allowed, by the way.
draft-ietf-dnsop-reflectors-are-evil: access control list for recursive
service. In fact for all DNS service so cache snooping is halted.
draft-ietf-dnsext-dnssec-bis-updates: supported.
Record type syntax support, extensive, from lib ldns.
For these types only syntax and parsing support is needed.
+64 -15
View File
@@ -11,16 +11,13 @@ This software is under BSD license, see LICENSE for details.
* Uses the following libraries;
* ldns http://www.nlnetlabs.nl/ldns/ (BSD license)
(required) can use tarball from source directory.
(required) can use ldns build directory directly with --with-ldns=path.
* libevent http://www.monkey.org/~provos/libevent/ (BSD license)
(optional) can use builtin alternative instead.
* Make and install: ./configure; make; make install
* Use GNU make; default on linux, often called 'gmake' on BSD and Solaris.
* --with-ldns=/path/to/ldns
If ldns is not detected on the system, a prepackaged tarball
of the ldns library is used to compile and statically link against.
If detected on the system, it will dynamically link against it.
It will dynamically link against it.
* --with-libevent=/path/to/libevent
Can be set to either the system install or the build directory.
--with-libevent=no (default) gives a builtin alternative
@@ -28,10 +25,16 @@ This software is under BSD license, see LICENSE for details.
of outgoing ports. This improves randomization and spoof
resistance. For the default of 16 ports the builtin alternative
works well and is a little faster.
* --with-libexpat=/path/to/libexpat
Can be set to the install directory of libexpat.
* --without-pthreads
This disables pthreads. Without this option the pthreads library
is detected automatically. Use this option to disable threading
altogether, or, on Solaris, also use --with(out)-solaris-threads.
* --enable-checking
This enables assertions in the code that guard against a variety of
programming errors, among which buffer overflows. The program exits
with an error if an assertion fails (but the buffer did not overflow).
* --enable-static-exe
This enables a debug option to statically link, against ldns and
libevent libraries.
@@ -55,27 +58,39 @@ This software is under BSD license, see LICENSE for details.
* --with-chroot-dir=path
Set default chroot directory,
the default is /usr/local/etc/unbound.
* --with-rootkey-file=path
Set the default root.key path. This file is read and written.
the default is /usr/local/etc/unbound/root.key
* --with-rootcert-file=path
Set the default root update certificate path. A builtin certificate
is used if this file is empty or does not exist.
the default is /usr/local/etc/unbound/icannbundle.pem
* --with-username=user
Set default user name to change to,
the default is the "unbound" user.
* --with-pyunbound
Create libunbound wrapper usable from python.
Needs python-devel and swig development tools.
* --with-pythonmodule
Compile the python module that processes responses in the server.
* --disable-sha2
Disable support for RSASHA256 and RSASHA512 crypto.
* --disable-gost
Disable support for GOST crypto, RFC 5933.
* 'make test' attempts to run a series of tests, depending on the support
programs that are installed.
* 'make test' runs a series of self checks.
Known issues
------------
o If there are no replies for a forward or stub zone, for a reverse zone,
you may need to add a local-zone: name transparent or nodefault to the
server: section of the config file to unblock the reverse zone.
Only happens for (sub)zones that are blocked by default; e.g. 10.in-addr.arpa
o If libevent is older (before 1.3c), unbound will exit instead of reload
on sighup. On a restart 'did not exit gracefully last time' warning is
printed. Perform ./configure --with-libevent=no or update libevent, rerun
configure and recompile unbound to make sighup work correctly.
It is strongly suggested to use the latest version of libevent (1.4 or more)
on Solaris, because of fixes in the solaris event port code in libevent.
o If you receive no answers deploying unbound on a private network.
Check that the zone you configure as a stub zone is correct, listing working
ip-addresses. Check that the NS data in the zone, those hostnames, are
in fact those same, working, ip-addresses. Unbound will fetch the NS data
from the zone and use that information in preference to the config
information.
It is strongly suggested to use a recent version of libevent.
o If you are not receiving the correct source IP address on replies (e.g.
you are running a multihomed, anycast server), the interface-automatic
option can be enabled to set socket options to achieve the correct
@@ -87,6 +102,14 @@ o The warning 'openssl has no entropy, seeding with time', with chroot
o On Solaris 5.10 some libtool packages from repositories do not work with
gcc, showing errors gcc: unrecognized option `-KPIC'
To solve this do ./configure libtool=./libtool [your options...].
On Solaris you may pass CFLAGS="-xO4 -xtarget=generic" if you use sun-cc.
o If unbound-control (or munin graphs) do not work, this can often be because
the unbound-control-setup script creates the keys with restricted
permissions, and the files need to be made readable or ownered by both the
unbound daemon and unbound-control.
o Crosscompile seems to hang. You tried to install unbound under wine.
wine regedit and remove all the unbound entries from the registry or
delete .wine/drive_c.
Acknowledgements
----------------
@@ -98,4 +121,30 @@ o Other code origins are from the NSD (NLnet Labs) and LDNS (NLnet Labs)
projects. Such as buffer, region-allocator and red-black tree code.
o See Credits file for contributors.
Your Support
------------
NLnet Labs offers all of its software products as open source, most are
published under a BSD license. You can download them, not only from the
NLnet Labs website but also through the various OS distributions for
which NSD, ldns, and Unbound are packaged. We therefore have little idea
who uses our software in production environments and have no direct ties
with 'our customers'.
Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us
whether you use one of our products in your production environment,
what that environment looks like, and maybe even share some praise.
We would like to refer to the fact that your organization is using our
products. We will only do that if you explicitly allow us. In all other
cases we will keep the information you share with us to ourselves.
In addition to the moral support you can also support us
financially. NLnet Labs is a recognized not-for-profit charity foundation
that is chartered to develop open-source software and open-standards
for the Internet. If you use our software to satisfaction please express
that by giving us a donation. For small donations PayPal can be used. For
larger and regular donations please contact us at users@NLnetLabs.nl. Also
see http://www.nlnetlabs.nl/labs/contributors/.
* mailto:unbound-bugs@nlnetlabs.nl
+6 -7
View File
@@ -1,21 +1,20 @@
README unbound tests
There is a test setup for unbound. Use
For a quick test that runs unit tests and state machine tests, use
make test
To make and run the tests. The results are summarized at the end.
There is a long test setup for unbound that needs tools installed. Use
make longtest
To make and run the long tests. The results are summarized at the end.
You need to have the following programs installed and in your PATH.
* dig - from the bind-tools package. Used to send DNS queries.
* splint (optional) - for lint test
* doxygen (optional) - for doc completeness test
* ldns-testns (optional) - from ldns examples. Used as DNS auth server.
* ldns-testns - from ldns examples. Used as DNS auth server.
* xxd and nc (optional) - for (malformed) packet transmission.
The optional programs are detected and can be omitted.
Without any support programs, unittest and testbound can still be used.
(cd testdata; ../testcode/mini_tpkg.sh exe 02-unittest.tpkg)
(cd testdata; ../testcode/mini_tpkg.sh exe 03-testbound.tpkg)
testdata/ contains the data for tests.
testcode/ contains scripts and c code for the tests.
+21 -8
View File
@@ -35,29 +35,42 @@ o overhaul outside-network servicedquery to merge with udpwait and tcpwait,
o check into rebinding ports for efficiency, configure time test.
o EVP hardware crypto support.
o option to ignore all inception and expiration dates for rrsigs.
o option to use builtin ldns explicitly. Or stop shipping builtin tarball.
o cleaner code; return and func statements on newline.
o memcached module that sits before validator module; checks for memcached
data (on local lan), stores recursion lookup. Provides one cache for
multiple resolver machines, coherent reply content in anycast setup.
data (on local lan), stores recursion lookup. Provides one cache for multiple resolver machines, coherent reply content in anycast setup.
o no openssl_add_all_algorithms, but only the ones necessary, less space.
o listen to NOTIFY messages for zones and flush the cache for that zone
if received. Useful when also having a stub to that auth server.
Needs proper protection, TSIG, in place.
o winevent - do not go more than 64 fds (by polling with select one by
one), win95/98 have 100fd limit in the kernel, so this ruins w9x portability.
*** Features features, for later
* dTLS, TLS, look to need special port numbers, cert storage, recent libssl.
* aggressive negative caching for NSEC, NSEC3.
* multiple queries per question, server exploration, server selection.
* NSID support.
* support TSIG on queries, for validating resolver deployment.
* private TTL
* retry-mode, where a bogus result triggers a retry-mode query, where a list
of responses over a time interval is collected, and each is validated.
or try in TCP mode. Do not 'try all servers several times', since we must
not create packet storms with operator errors.
* draft-timers
* Windows port features
o on windows version, implement that OS ancillary data capabilities for
interface-automatic. IPPKTINFO, IP6PKTINFO for WSARecvMsg, WSASendMsg.
o local-zone directive with authority service, full authority server
is a non-goal.
o configure option to force use of builtin ldns tarball.
o infra and lame cache: easier size config (in Mb), show usage in graphs.
- store time of dump in cachedumps, so that on a load the ttls can be
compared to the absolute time, and now-expired items can be dealt with.
later
- selective verbosity; ubcontrol trace example.com
- cache fork-dump, pre-load
- for fwds, send queries to N servers in fwd-list, use first reply.
document high scalable, high available unbound setup onepager.
- prefetch DNSKEY when DS in delegation seen (nonCD, underTA).
- use libevent if available on system by default(?), default outgoing 256to1024
[1] BIND-like query logging to see who's looking up what and when
[2] more logging about stuff like SERVFAIL and REFUSED responses
[3] a Makefile that works without gnumake
+10 -6
View File
@@ -1,16 +1,21 @@
Specification for the unbound-control protocol.
Server listens on 953 TCP (localhost by default). Client connects,
Server listens on 8953 TCP (localhost by default). Client connects,
SSLv3 or TLSv1 connection setup (server selfsigned certificate,
client has cert signed by server certificate).
Port 8953 is registered with IANA as:
ub-dns-control 8953/tcp unbound dns nameserver control
# Wouter Wijngaards <wouter&nlnetlabs.nl> 10 May 2011
On may 11 2011, ticket [IANA #442315].
Query and Response
------------------
Client sends
UBCT [commandline] \n
fixed string UBCT, then an ascii text line, with a command,
some whitespace allowed. Line ends with '\n'.
UBCT[version] [commandline] \n
fixed string UBCT1 (for version 1), then an ascii text line,
with a command, some whitespace allowed. Line ends with '\n'.
Server executes command. And sends reply in ascii text over channel,
closes the channel when done.
@@ -62,5 +67,4 @@ local_data <resource record string>
local_data_add www.example.com. IN A 192.0.2.2
if no local_zone exists for it; a transparent zone with the same
name as the data is created.
Other commands in the unbound-control manual page.
+148 -45
View File
@@ -1,7 +1,7 @@
#
# Example configuration file.
#
# See unbound.conf(5) man page.
# See unbound.conf(5) man page, version @version@.
#
# this is a comment.
@@ -18,7 +18,7 @@ server:
# print statistics to the log (for every thread) every N seconds.
# Set to "" or 0 to disable. Default is disabled.
# statistics-interval: 0
# enable cumulative statistics, without clearing them after printing.
# statistics-cumulative: no
@@ -32,12 +32,13 @@ server:
# specify the interfaces to answer queries from by ip-address.
# The default is to listen to localhost (127.0.0.1 and ::1).
# specify 0.0.0.0 and ::0 to bind to all available interfaces.
# specify every interface on a new 'interface:' labelled line.
# specify every interface[@port] on a new 'interface:' labelled line.
# The listen interfaces are not changed on reload, only on restart.
# interface: 192.0.2.153
# interface: 192.0.2.154
# interface: 192.0.2.154@5003
# interface: 2001:DB8::5
# enable this feature to copy the source address of queries to reply.
# Socket options are not supported on all platforms. experimental.
# interface-automatic: no
@@ -53,9 +54,10 @@ server:
# outgoing-interface: 2001:DB8::6
# number of ports to allocate per thread, determines the size of the
# port range that can be open simultaneously.
# outgoing-range: 256
# port range that can be open simultaneously. About double the
# num-queries-per-thread, or, use as many as the OS will allow you.
# outgoing-range: 4096
# permit unbound to use this port number or port range for
# making outgoing queries, using an outgoing interface.
# outgoing-port-permit: 32768
@@ -72,7 +74,19 @@ server:
# number of incoming simultaneous tcp buffers to hold per thread.
# incoming-num-tcp: 10
# buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
# 0 is system default. Use 4m to catch query spikes for busy servers.
# so-rcvbuf: 0
# buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
# 0 is system default. Use 4m to handle spikes on very busy servers.
# so-sndbuf: 0
# EDNS reassembly buffer to advertise to UDP peers (the actual buffer
# is set with msg-buffer-size). 1480 can solve fragmentation (timeouts).
# edns-buffer-size: 4096
# buffer size for handling DNS data. No messages larger than this
# size can be sent or received, by UDP or TCP. In bytes.
# msg-buffer-size: 65552
@@ -100,29 +114,27 @@ server:
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
# rrset-cache-slabs: 4
# the time to live (TTL) value lower bound, in seconds. Default 0.
# If more than an hour could easily give trouble due to stale data.
# cache-min-ttl: 0
# the time to live (TTL) value cap for RRsets and messages in the
# cache. Items are not cached for longer. In seconds.
# cache-max-ttl: 86400
# the time to live (TTL) value for cached roundtrip times and
# the time to live (TTL) value for cached roundtrip times, lameness and
# EDNS version information for hosts. In seconds.
# infra-host-ttl: 900
# the time to live (TTL) value for cached lame delegations. In sec.
# infra-lame-ttl: 900
# the number of slabs to use for the Infrastructure cache.
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
# infra-cache-slabs: 4
# the maximum number of hosts that are cached (roundtrip times, EDNS).
# the maximum number of hosts that are cached (roundtrip, EDNS, lame).
# infra-cache-numhosts: 10000
# the maximum size of the lame zones cached per host. in bytes.
# infra-cache-lame-size: 10k
# Enable IPv4, "yes" or "no".
# do-ip4: yes
@@ -135,6 +147,10 @@ server:
# Enable TCP, "yes" or "no".
# do-tcp: yes
# upstream connections use TCP only (and no UDP), "yes" or "no"
# useful for tunneling scenarios, default no.
# tcp-upstream: no
# Detach from the terminal, run in background, "yes" or "no".
# do-daemonize: yes
@@ -187,30 +203,36 @@ server:
# the log file, "" means log to stderr.
# Use of this option sets use-syslog to "no".
# logfile: ""
# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
# log to, with identity "unbound". If yes, it overrides the logfile.
# use-syslog: yes
# print UTC timestamp in ascii to logfile, default is epoch in seconds.
# log-time-ascii: no
# print one line with time, IP, name, type, class for every query.
# log-queries: no
# the pid file. Can be an absolute path outside of chroot/work dir.
# pidfile: "@UNBOUND_PIDFILE@"
# file to read root hints from.
# get one from ftp://FTP.INTERNIC.NET/domain/named.cache
# root-hints: ""
# enable to not answer id.server and hostname.bind queries.
# hide-identity: no
# enable to not answer version.server and version.bind queries.
# hide-version: no
# the identity to report. Leave "" or default to return hostname.
# identity: ""
# the version to report. Leave "" or default to return package version.
# version: ""
# the target fetch policy.
# series of integers describing the policy per dependency depth.
# The number of values in the list determines the maximum dependency
@@ -220,22 +242,25 @@ server:
# positive value: fetch that many targets opportunistically.
# Enclose the list of numbers between quotes ("").
# target-fetch-policy: "3 2 1 0 0"
# Harden against very small EDNS buffer sizes.
# harden-short-bufsize: no
# Harden against unseemly large queries.
# harden-large-queries: no
# Harden against out of zone rrsets, to avoid spoofing attempts.
# harden-glue: yes
# Harden against receiving dnssec-stripped data. If you turn it
# off, failing to validate dnskey data for a trustanchor will
# trigger insecure mode for that zone (like without a trustanchor).
# Default on, which insists on dnssec data for trust-anchored zones.
# harden-dnssec-stripped: yes
# Harden against queries that fall under dnssec-signed nxdomain names.
# harden-below-nxdomain: no
# Harden the referral path by performing additional queries for
# infrastructure data. Validates the replies (if possible).
# Default off, because the lookups burden the server. Experimental
@@ -245,7 +270,7 @@ server:
# Use 0x20-encoded random bits in the query to foil spoof attempts.
# This feature is an experimental implementation of draft dns-0x20.
# use-caps-for-id: no
# Enforce privacy of these addresses. Strips them away from answers.
# It may cause DNSSEC validation to additionally mark it as bogus.
# Protects against 'DNS Rebinding' (uses browser as network proxy).
@@ -254,14 +279,14 @@ server:
# private-address: 10.0.0.0/8
# private-address: 172.16.0.0/12
# private-address: 192.168.0.0/16
# private-address: 192.254.0.0/16
# private-address: 169.254.0.0/16
# private-address: fd00::/8
# private-address: fe80::/10
# Allow the domain (and its subdomains) to contain private addresses.
# local-data statements are allowed to contain private addresses too.
# private-domain: "example.com"
# If nonzero, unwanted replies are not only reported in statistics,
# but also a running total is kept per thread. If it reaches the
# threshold, a warning is printed and a defensive action is taken,
@@ -273,27 +298,52 @@ server:
# List one address per entry. List classless netblocks with /size,
# do-not-query-address: 127.0.0.1/8
# do-not-query-address: ::1
# if yes, the above default do-not-query-address entries are present.
# if no, localhost can be queried (for testing and debugging).
# do-not-query-localhost: yes
# if yes, perform prefetching of almost expired message cache entries.
# prefetch: no
# if yes, perform key lookups adjacent to normal lookups.
# prefetch-key: no
# if yes, Unbound rotates RRSet order in response.
# rrset-roundrobin: no
# if yes, Unbound doesn't insert authority/additional sections
# into response messages when those sections are not required.
# minimal-responses: no
# module configuration of the server. A string with identifiers
# separated by spaces. "iterator" or "validator iterator"
# module-config: "validator iterator"
# File with trusted keys, kept uptodate using RFC5011 probes,
# initial file like trust-anchor-file, then it stores metadata.
# Use several entries, one per domain name, to track multiple zones.
#
# If you want to perform DNSSEC validation, run unbound-anchor before
# you start unbound (i.e. in the system boot scripts). And enable:
# Please note usage of unbound-anchor root anchor is at your own risk
# and under the terms of our LICENSE (see that file in the source).
# auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
# File with DLV trusted keys. Same format as trust-anchor-file.
# There can be only one DLV configured, it is trusted from root down.
# Download https://secure.isc.org/ops/dlv/dlv.isc.org.key
# Download http://ftp.isc.org/www/dlv/dlv.isc.org.key
# dlv-anchor-file: "dlv.isc.org.key"
# File with trusted keys for validation. Specify more than one file
# with several entries, one file per entry.
# Zone file format, with DS and DNSKEY entries.
# Note this gets out of date, use auto-trust-anchor-file please.
# trust-anchor-file: ""
# Trusted key for validation. DS or DNSKEY. specify the RR on a
# single line, surrounded by "". TTL is ignored. class is IN default.
# Note this gets out of date, use auto-trust-anchor-file please.
# (These examples are from August 2007 and may not be valid anymore).
# trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
# trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
@@ -302,35 +352,64 @@ server:
# with several entries, one file per entry. Like trust-anchor-file
# but has a different file format. Format is BIND-9 style format,
# the trusted-keys { name flag proto algo "key"; }; clauses are read.
# you need external update procedures to track changes in keys.
# trusted-keys-file: ""
# Ignore chain of trust. Domain is treated as insecure.
# domain-insecure: "example.com"
# Override the date for validation with a specific fixed date.
# Do not set this unless you are debugging signature inception
# and expiration. "" or "0" turns the feature off.
# and expiration. "" or "0" turns the feature off. -1 ignores date.
# val-override-date: ""
# The time to live for bogus data, rrsets and messages. This avoids
# some of the revalidation, until the time interval expires. in secs.
# val-bogus-ttl: 60
# The signature inception and expiration dates are allowed to be off
# by 10% of the signature lifetime (expir-incep) from our local clock.
# This leeway is capped with a minimum and a maximum. In seconds.
# val-sig-skew-min: 3600
# val-sig-skew-max: 86400
# Should additional section of secure message also be kept clean of
# unsecure data. Useful to shield the users of this validator from
# potential bogus data in the additional section. All unsigned data
# in the additional section is removed from secure messages.
# val-clean-additional: yes
# Turn permissive mode on to permit bogus messages. Thus, messages
# for which security checks failed will be returned to clients,
# instead of SERVFAIL. It still performs the security checks, which
# result in interesting log files and possibly the AD bit in
# replies if the message is found secure. The default is off.
# val-permissive-mode: no
# Ignore the CD flag in incoming queries and refuse them bogus data.
# Enable it if the only clients of unbound are legacy servers (w2008)
# that set CD but cannot validate themselves.
# ignore-cd-flag: no
# Have the validator log failed validations for your diagnosis.
# 0: off. 1: A line per failed user query. 2: With reason and bad IP.
# val-log-level: 0
# It is possible to configure NSEC3 maximum iteration counts per
# keysize. Keep this table very short, as linear search is done.
# A message with an NSEC3 with larger count is marked insecure.
# List in ascending order the keysize and count values.
# val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
# instruct the auto-trust-anchor-file probing to add anchors after ttl.
# add-holddown: 2592000 # 30 days
# instruct the auto-trust-anchor-file probing to del anchors after ttl.
# del-holddown: 2592000 # 30 days
# auto-trust-anchor-file probing removes missing anchors after ttl.
# If the value 0 is given, missing anchors are not removed.
# keep-missing: 31622400 # 366 days
# the amount of memory to use for the key cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
@@ -340,7 +419,7 @@ server:
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
# key-cache-slabs: 4
# the amount of memory to use for the negative cache (used for DLV).
# plain value in bytes or you can append k, m or G. default is "1Mb".
# neg-cache-size: 1m
@@ -351,9 +430,10 @@ server:
# o deny serves local data (if any), else, drops queries.
# o refuse serves local data (if any), else, replies with error.
# o static serves local data, else, nxdomain or nodata answer.
# o transparent serves local data, else, resolves normally .
# o transparent gives local data, but resolves normally for other names
# o redirect serves the zone data for any subdomain in the zone.
# o nodefault can be used to normally resolve AS112 zones.
# o typetransparent resolves normally for other types and other names
#
# defaults are localhost address, reverse for 127.0.0.1 and ::1
# and nxdomain for AS112 zones. If you configure one of these zones
@@ -380,6 +460,25 @@ server:
# you need to do the reverse notation yourself.
# local-data-ptr: "192.0.2.3 www.example.com"
# service clients over SSL (on the TCP sockets), with plain DNS inside
# the SSL stream. Give the certificate to use and private key.
# default is "" (disabled). requires restart to take effect.
# ssl-service-key: "path/to/privatekeyfile.key"
# ssl-service-pem: "path/to/publiccertfile.pem"
# ssl-port: 443
# request upstream over SSL (with plain DNS inside the SSL stream).
# Default is no. Can be turned on and off with unbound-control.
# ssl-upstream: no
# Python config section. To enable:
# o use --with-pythonmodule to configure before compiling.
# o list python in the module-config string (above) to enable.
# o and give a python-script to run.
python:
# Script file to load
# python-script: "@UNBOUND_SHARE_DIR@/ubmodule-tst.py"
# Remote control config section.
remote-control:
# Enable remote control with unbound-control(8) here.
@@ -392,7 +491,7 @@ remote-control:
# control-interface: ::1
# port number for remote control operations.
# control-port: 953
# control-port: 8953
# unbound server key file.
# server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key"
@@ -411,10 +510,12 @@ remote-control:
# 'example.org' go to the given list of nameservers. list zero or more
# nameservers by hostname or by ipaddress. If you set stub-prime to yes,
# the list is treated as priming hints (default is no).
# With stub-first yes, it attempts without the stub if it fails.
# stub-zone:
# name: "example.com"
# stub-addr: 192.0.2.68
# stub-prime: "no"
# stub-prime: no
# stub-first: no
# stub-zone:
# name: "example.org"
# stub-host: ns.example.com.
@@ -424,10 +525,12 @@ remote-control:
# 'example.org' go to the given list of servers. These servers have to handle
# recursion to other nameservers. List zero or more nameservers by hostname
# or by ipaddress. Use an entry with name "." to forward all queries.
# If you enable forward-first, it attempts without the forward if it fails.
# forward-zone:
# name: "example.com"
# forward-addr: 192.0.2.68
# forward-addr: 192.0.2.73@5355 # forward to port 5355.
# forward-first: no
# forward-zone:
# name: "example.org"
# forward-host: fwd.example.com
+62 -14
View File
@@ -17,6 +17,7 @@
.B ub_ctx_create,
.B ub_ctx_delete,
.B ub_ctx_set_option,
.B ub_ctx_get_option,
.B ub_ctx_config,
.B ub_ctx_set_fwd,
.B ub_ctx_resolvconf,
@@ -35,7 +36,12 @@
.B ub_resolve_async,
.B ub_cancel,
.B ub_resolve_free,
.B ub_strerror
.B ub_strerror,
.B ub_ctx_print_local_zones,
.B ub_ctx_zone_add,
.B ub_ctx_zone_remove,
.B ub_ctx_data_add,
.B ub_ctx_data_remove
\- Unbound DNS validating resolver @version@ functions.
.SH "SYNOPSIS"
.LP
@@ -51,6 +57,9 @@
\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val);
.LP
\fIint\fR
\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val);
.LP
\fIint\fR
\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname);
.LP
\fIint\fR
@@ -95,9 +104,7 @@
\fIint\fR
\fBub_resolve\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name,
.br
\fIint\fR rrtype, \fIint\fR rrclass, \fIint*\fR secure,
.br
\fIint*\fR data, \fIstruct ub_result**\fR result);
\fIint\fR rrtype, \fIint\fR rrclass, \fIstruct ub_result**\fR result);
.LP
\fIint\fR
\fBub_resolve_async\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name,
@@ -114,6 +121,21 @@
.LP
\fIconst char *\fR
\fBub_strerror\fR(\fIint\fR err);
.LP
\fIint\fR
\fBub_ctx_print_local_zones\fR(\fIstruct ub_ctx*\fR ctx);
.LP
\fIint\fR
\fBub_ctx_zone_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name, \fIchar*\fR zone_type);
.LP
\fIint\fR
\fBub_ctx_zone_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name);
.LP
\fIint\fR
\fBub_ctx_data_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data);
.LP
\fIint\fR
\fBub_ctx_data_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data);
.SH "DESCRIPTION"
.LP
.B Unbound
@@ -160,6 +182,11 @@ config file format, see \fIunbound.conf\fR(5). Not all options are
relevant. For some specific options, such as adding trust anchors, special
routines exist. Pass the option name with the trailing ':'.
.TP
.B ub_ctx_get_option
A power\-user interface that gets an option value. Some options cannot be
gotten, and others return a newline separated list. Pass the option name
without trailing ':'. The returned value must be free(2)d by the caller.
.TP
.B ub_ctx_config
A power\-user interface that lets you specify an unbound config file, see
\fIunbound.conf\fR(5), which is read for configuration. Not all options are
@@ -181,14 +208,16 @@ Usually "/etc/resolv.conf". Uses those nameservers as caching proxies.
If they do not support DNSSEC, validation may fail.
Only nameservers are picked up, the searchdomain, ndots and other
settings from \fIresolv.conf\fR(5) are ignored.
If fname NULL is passed, "/etc/resolv.conf" is used.
If fname NULL is passed, "/etc/resolv.conf" is used (if on Windows,
the system\-wide configured nameserver is picked instead).
At this time it is only possible to set configuration before the
first resolve is done.
.TP
.B ub_ctx_hosts
Read list of hosts from the filename given.
Usually "/etc/hosts". When queried for, these addresses are not marked
DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used.
DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used
(if on Windows, etc/hosts from WINDIR is picked instead).
At this time it is only possible to set configuration before the
first resolve is done.
.TP
@@ -197,7 +226,7 @@ ub_ctx_add_ta
Add a trust anchor to the given context.
At this time it is only possible to add trusted keys before the
first resolve is done.
The format is a string, similar to the zone-file format,
The format is a string, similar to the zone\-file format,
[domainname] [type] [rdata contents]. Both DS and DNSKEY records are accepted.
.TP
.B ub_ctx_add_ta_file
@@ -208,13 +237,13 @@ first resolve is done.
.TP
.B ub_ctx_trustedkeys
Add trust anchors to the given context.
Pass the name of a bind-style config file with trusted-keys{}.
Pass the name of a bind\-style config file with trusted\-keys{}.
At this time it is only possible to add trusted keys before the
first resolve is done.
.TP
.B ub_ctx_debugout
Set debug and error log output to the given stream. Pass NULL to disable
output. Default is stderr. File-names or using syslog can be enabled
output. Default is stderr. File\-names or using syslog can be enabled
using config options, this routine is for using your own stream.
.TP
.B ub_ctx_debuglevel
@@ -261,8 +290,6 @@ Will perform necessary callbacks.
Perform resolution and validation of the target name.
The name is a domain name in a zero terminated text string.
The rrtype and rrclass are DNS type and class codes.
The value secure returns true if the answer validated securely.
The value data returns true if there was data.
The result structure is newly allocated with the resulting data.
.TP
.B ub_resolve_async
@@ -278,10 +305,13 @@ void my_callback_function(void* my_arg, int err,
struct ub_result* result);
.IP
The async_id is returned so you can (at your option) decide to track it
and cancel the request if needed.
and cancel the request if needed. If you pass a NULL pointer the async_id
is not returned.
.TP
.B ub_cancel
Cancel an async query in progress.
Cancel an async query in progress. This may return an error if the query
does not exist, or the query is already being delivered, in that case you
may still get a callback for the query.
.TP
.B ub_resolve_free
Free struct ub_result contents after use.
@@ -289,6 +319,23 @@ Free struct ub_result contents after use.
.B ub_strerror
Convert error value from one of the unbound library functions
to a human readable string.
.TP
.B ub_ctx_print_local_zones
Debug printout the local authority information to debug output.
.TP
.B ub_ctx_zone_add
Add new zone to local authority info, like local\-zone \fIunbound.conf\fR(5)
statement.
.TP
.B ub_ctx_zone_remove
Delete zone from local authority info.
.TP
.B ub_ctx_data_add
Add resource record data to local authority info, like local\-data
\fIunbound.conf\fR(5) statement.
.TP
.B ub_ctx_data_remove
Delete local authority data from the name given.
.SH "RESULT DATA STRUCTURE"
.LP
The result of the DNS resolution and validation is returned as
@@ -309,6 +356,7 @@ The result of the DNS resolution and validation is returned as
int nxdomain; /* true if nodata because name does not exist */
int secure; /* true if result is secure */
int bogus; /* true if a security failure happened */
char* why_bogus; /* string with error if bogus */
};
.fi
.P
@@ -326,7 +374,7 @@ returns NULL on an error (a malloc failure).
.B ub_poll
returns true if some information may be available, false otherwise.
.B ub_fd
returns a file descriptor or -1 on error.
returns a file descriptor or \-1 on error.
.SH "SEE ALSO"
\fIunbound.conf\fR(5),
\fIunbound\fR(8).
+49
View File
@@ -235,6 +235,9 @@ o EDNS fallback. Is done according to the EDNS RFC (and update draft-00).
It minimizes the chances of a dropped query making a (DNSSEC) EDNS server
falsely EDNS-nonsupporting, and thus DNSSEC-bogus, works well with
middleboxes, and can detect the occasional authority that drops EDNS.
For some boxes it is necessary to probe for every failing query, a
reassurance that the DNS server does EDNS does not mean that path can
take large DNS answers.
o 0x20 backoff.
The draft describes to back off to the next server, and go through all
@@ -243,3 +246,49 @@ o 0x20 backoff.
They are sent to a random server, but no one address more than 4 times.
It succeeds if one has 0x20 intact, or else all are equal.
Otherwise, servfail is returned to the client.
o NXDOMAIN and SOA serial numbers.
Unbound keeps TTL values for message formats, and thus rcodes, such
as NXDOMAIN. Also it keeps the latest rrsets in the rrset cache.
So it will faithfully negative cache for the exact TTL as originally
specified for an NXDOMAIN message, but send a newer SOA record if
this has been found in the mean time. In point, this could lead to a
negative cached NXDOMAIN reply with a SOA RR where the serial number
indicates a zone version where this domain is not any longer NXDOMAIN.
These situations become consistent once the original TTL expires.
If the domain is DNSSEC signed, by the way, then NSEC records are
updated more carefully. If one of the NSEC records in an NXDOMAIN is
updated from another query, the NXDOMAIN is dropped from the cache,
and queried for again, so that its proof can be checked again.
o SOA records in negative cached answers for DS queries.
The current unbound code uses a negative cache for queries for type DS.
This speeds up building chains of trust, and uses NSEC and NSEC3
(optout) information to speed up lookups. When used internally,
the bare NSEC(3) information is sufficient, probably picked up from
a referral. When answering to clients, a SOA record is needed for
the correct message format, a SOA record is picked from the cache
(and may not actually match the serial number of the SOA for which the
NSEC and NSEC3 records were obtained) if available otherwise network
queries are performed to get the data.
o Parent and child with different nameserver information.
A misconfiguration that sometimes happens is where the parent and child
have different NS, glue information. The child is authoritative, and
unbound will not trust information from the parent nameservers as the
final answer. To help lookups, unbound will however use the parent-side
version of the glue as a last resort lookup. This resolves lookups for
those misconfigured domains where the servers reported by the parent
are the only ones working, and servers reported by the child do not.
o Failure of validation and probing.
Retries on a validation failure are now 5x to a different nameserver IP
(if possible), and then it gives up, for one name, type, class entry in
the message cache. If a DNSKEY or DS fails in the chain of trust in the
key cache additionally, after the probing, a bad key entry is created that
makes the entire zone bogus for 900 seconds. This is a fixed value at
this time and is conservative in sending probes. It makes the compound
effect of many resolvers less and easier to handle, but penalizes
individual resolvers by having less probes and a longer time before fixes
are picked up.
+174
View File
@@ -0,0 +1,174 @@
.TH "unbound-anchor" "8" "@date@" "NLnet Labs" "unbound @version@"
.\"
.\" unbound-anchor.8 -- unbound anchor maintenance utility manual
.\"
.\" Copyright (c) 2008, NLnet Labs. All rights reserved.
.\"
.\" See LICENSE for the license.
.\"
.\"
.SH "NAME"
.LP
.B unbound\-anchor
\- Unbound anchor utility.
.SH "SYNOPSIS"
.B unbound\-anchor
.RB [ opts ]
.SH "DESCRIPTION"
.B Unbound\-anchor
performs setup or update of the root trust anchor for DNSSEC validation.
It can be run (as root) from the commandline, or run as part of startup
scripts. Before you start the \fIunbound\fR(8) DNS server.
.P
Suggested usage:
.P
.nf
# in the init scripts.
# provide or update the root anchor (if necessary)
unbound-anchor -a "@UNBOUND_ROOTKEY_FILE@"
# Please note usage of this root anchor is at your own risk
# and under the terms of our LICENSE (see source).
#
# start validating resolver
# the unbound.conf contains:
# auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@"
unbound -c unbound.conf
.fi
.P
This tool provides builtin default contents for the root anchor and root
update certificate files.
.P
It tests if the root anchor file works, and if not, and an update is possible,
attempts to update the root anchor using the root update certificate.
It performs a https fetch of root-anchors.xml and checks the results, if
all checks are successful, it updates the root anchor file. Otherwise
the root anchor file is unchanged. It performs RFC5011 tracking if the
DNSSEC information available via the DNS makes that possible.
.P
If does not perform an update if the certificate is expired, if the network
is down or other errors occur.
.P
The available options are:
.TP
.B \-a \fIfile
The root anchor key file, that is read in and written out.
Default is @UNBOUND_ROOTKEY_FILE@.
If the file does not exist, or is empty, a builtin root key is written to it.
.TP
.B \-c \fIfile
The root update certificate file, that is read in.
Default is @UNBOUND_ROOTCERT_FILE@.
If the file does not exist, or is empty, a builtin certificate is used.
.TP
.B \-l
List the builtin root key and builtin root update certificate on stdout.
.TP
.B \-u \fIname
The server name, it connects to https://name. Specify without https:// prefix.
The default is "data.iana.org". It connects to the port specified with \-P.
You can pass an IPv4 addres or IPv6 address (no brackets) if you want.
.TP
.B \-x \fIpath
The pathname to the root\-anchors.xml file on the server. (forms URL with \-u).
The default is /root\-anchors/root\-anchors.xml.
.TP
.B \-s \fIpath
The pathname to the root\-anchors.p7s file on the server. (forms URL with \-u).
The default is /root\-anchors/root\-anchors.p7s. This file has to be a PKCS7
signature over the xml file, using the pem file (\-c) as trust anchor.
.TP
.B \-4
Use IPv4 for domain resolution and contacting the server on https. Default is
to use IPv4 and IPv6 where appropriate.
.TP
.B \-6
Use IPv6 for domain resolution and contacting the server on https. Default is
to use IPv4 and IPv6 where appropriate.
.TP
.B \-f \fIresolv.conf
Use the given resolv.conf file. Not enabled by default, but you could try to
pass /etc/resolv.conf on some systems. It contains the IP addresses of the
recursive nameservers to use. However, since this tool could be used to
bootstrap that very recursive nameserver, it would not be useful (since
that server is not up yet, since we are bootstrapping it). It could be
useful in a situation where you know an upstream cache is deployed (and
running) and in captive portal situations.
.TP
.B \-r \fIroot.hints
Use the given root.hints file (same syntax as the BIND and Unbound root hints
file) to bootstrap domain resolution. By default a list of builtin root
hints is used. Unbound\-anchor goes to the network itself for these roots,
to resolve the server (\-u option) and to check the root DNSKEY records.
It does so, because the tool when used for bootstrapping the recursive
resolver, cannot use that recursive resolver itself because it is bootstrapping
that server.
.TP
.B \-v
More verbose. Once prints informational messages, multiple times may enable
large debug amounts (such as full certificates or byte\-dumps of downloaded
files). By default it prints almost nothing. It also prints nothing on
errors by default; in that case the original root anchor file is simply
left undisturbed, so that a recursive server can start right after it.
.TP
.B \-C \fIunbound.conf
Debug option to read unbound.conf into the resolver process used.
.TP
.B \-P \fIport
Set the port number to use for the https connection. The default is 443.
.TP
.B \-F
Debug option to force update of the root anchor through downloading the xml
file and verifying it with the certificate. By default it first tries to
update by contacting the DNS, which uses much less bandwidth, is much
faster (200 msec not 2 sec), and is nicer to the deployed infrastructure.
With this option, it still attempts to do so (and may verbosely tell you),
but then ignores the result and goes on to use the xml fallback method.
.TP
.B \-h
Show the version and commandline option help.
.TP
.B \-v
More verbose. Prints output detailing what happens.
.SH "EXIT CODE"
This tool exits with value 1 if the root anchor was updated using the
certificate or if the builtin root-anchor was used. It exits with code
0 if no update was necessary, if the update was possible with RFC5011
tracking, or if an error occurred.
.P
You can check the exit value in this manner:
.nf
unbound-anchor -a "root.key" || logger "Please check root.key"
.fi
Or something more suitable for your operational environment.
.SH "TRUST"
The root keys and update certificate included in this tool
are provided for convenience and under the terms of our
license (see the LICENSE file in the source distribution or
http://unbound.nlnetlabs.nl/svn/trunk/LICENSE) and might be stale or
not suitable to your purpose.
.P
By running "unbound\-anchor \-l" the keys and certificate that are
configured in the code are printed for your convenience.
.P
The build\-in configuration can be overridden by providing a root\-cert
file and a rootkey file.
.SH "FILES"
.TP
.I @UNBOUND_ROOTKEY_FILE@
The root anchor file, updated with 5011 tracking, and read and written to.
The file is created if it does not exist.
.TP
.I @UNBOUND_ROOTCERT_FILE@
The trusted self\-signed certificate that is used to verify the downloaded
DNSSEC root trust anchor. You can update it by fetching it from
https://data.iana.org/root\-anchors/icannbundle.pem (and validate it).
If the file does not exist or is empty, a builtin version is used.
.TP
.I https://data.iana.org/root\-anchors/root\-anchors.xml
Source for the root key information.
.TP
.I https://data.iana.org/root\-anchors/root\-anchors.p7s
Signature on the root key information.
.SH "SEE ALSO"
\fIunbound.conf\fR(5),
\fIunbound\fR(8).
+11 -5
View File
@@ -9,14 +9,16 @@
.\"
.SH "NAME"
.LP
unbound-checkconf
unbound\-checkconf
\- Check unbound configuration file for errors.
.SH "SYNOPSIS"
.B unbound-checkconf
.B unbound\-checkconf
.RB [ \-h ]
.IR cfgfile
.RB [ \-o
.IR option ]
.RI [ cfgfile ]
.SH "DESCRIPTION"
.B Unbound-checkconf
.B Unbound\-checkconf
checks the configuration file for the
\fIunbound\fR(8)
DNS resolver for syntax and other errors.
@@ -28,11 +30,15 @@ The available options are:
.B \-h
Show the version and commandline option help.
.TP
.B \-o\fI option
If given, after checking the config file the value of this option is
printed to stdout. For "" (disabled) options an empty line is printed.
.TP
.I cfgfile
The config file to read with settings for unbound. It is checked.
If omitted, the config file at the default location is checked.
.SH "EXIT CODE"
The unbound-checkconf program exits with status code 1 on error,
The unbound\-checkconf program exits with status code 1 on error,
0 for a correct config file.
.SH "FILES"
.TP
+156 -10
View File
@@ -9,10 +9,11 @@
.\"
.SH "NAME"
.LP
unbound-control
.B unbound\-control,
.B unbound\-control\-setup
\- Unbound remote server control utility.
.SH "SYNOPSIS"
.B unbound-control
.B unbound\-control
.RB [ \-h ]
.RB [ \-c
.IR cfgfile ]
@@ -20,8 +21,8 @@ unbound-control
.IR server ]
.IR command
.SH "DESCRIPTION"
.B Unbound-control
Performs remote administration on the \fIunbound\fR(8) DNS server.
.B Unbound\-control
performs remote administration on the \fIunbound\fR(8) DNS server.
It reads the configuration file, contacts the unbound server over SSL
sends the command and displays the result.
.P
@@ -56,11 +57,24 @@ Change verbosity value for logging. Same values as \fBverbosity\fR keyword in
\fIunbound.conf\fR(5). This new setting lasts until the server is issued
a reload (taken from config file again), or the next verbosity control command.
.TP
.B log_reopen
Reopen the logfile, close and open it. Useful for logrotation to make the
daemon release the file it is logging to. If you are using syslog it will
attempt to close and open the syslog (which may not work if chrooted).
.TP
.B stats
Print statistics. Resets the internal counters to zero, this can be
controlled using the \fBstatistics\-cumulative\fR config statement.
Statistics are printed with one [name]: [value] per line.
.TP
.B stats_noreset
Peek at statistics. Prints them like the \fBstats\fR command does, but does not
reset the internal counters to zero.
.TP
.B status
Display server status. Exit code 3 if not running (the connection to the
port is refused), 1 on error, 0 if running.
.TP
.B local_zone \fIname\fR \fItype
Add new local zone with name and type. Like \fBlocal\-zone\fR config statement.
If the zone already exists, the type is changed to the given argument.
@@ -90,7 +104,8 @@ redirect it to a file to store the cache in a file.
.B load_cache
The contents of the cache is loaded from stdin. Uses the same format as
dump_cache uses. Loading the cache with old, or wrong data can result
in old or wrong data returned to clients.
in old or wrong data returned to clients. Loading data into the cache
in this way is supported in order to aid with debugging.
.TP
.B lookup \fIname
Print to stdout the name servers that would be used to look up the
@@ -111,14 +126,132 @@ Remove the name, type information from the cache.
Remove all information at or below the name from the cache.
The rrsets and key entries are removed so that new lookups will be performed.
This needs to walk and inspect the entire cache, and is a slow operation.
.TP
.B flush_bogus
Remove all bogus data from the cache.
.TP
.B flush_stats
Reset statistics to zero.
.TP
.B flush_requestlist
Drop the queries that are worked on. Stops working on the queries that the
server is working on now. The cache is unaffected. No reply is sent for
those queries, probably making those users request again later.
Useful to make the server restart working on queries with new settings,
such as a higher verbosity level.
.TP
.B dump_requestlist
Show what is worked on. Prints all queries that the server is currently
working on. Prints the time that users have been waiting. For internal
requests, no time is printed. And then prints out the module status.
.TP
.B flush_infra \fIall|IP
If all then entire infra cache is emptied. If a specific IP address, the
entry for that address is removed from the cache. It contains EDNS, ping
and lameness data.
.TP
.B dump_infra
Show the contents of the infra cache.
.TP
.B set_option \fIopt: val
Set the option to the given value without a reload. The cache is
therefore not flushed. The option must end with a ':' and whitespace
must be between the option and the value. Some values may not have an
effect if set this way, the new values are not written to the config file,
not all options are supported. This is different from the set_option call
in libunbound, where all values work because unbound has not been inited.
.IP
The values that work are: statistics\-interval, statistics\-cumulative,
do\-not\-query\-localhost, harden\-short\-bufsize, harden\-large\-queries,
harden\-glue, harden\-dnssec\-stripped, harden\-below\-nxdomain,
harden\-referral\-path, prefetch, prefetch\-key, log\-queries,
hide\-identity, hide\-version, identity, version, val\-log\-level,
val\-log\-squelch, ignore\-cd\-flag, add\-holddown, del\-holddown,
keep\-missing, tcp\-upstream, ssl\-upstream.
.TP
.B get_option \fIopt
Get the value of the option. Give the option name without a trailing ':'.
The value is printed. If the value is "", nothing is printed
and the connection closes. On error 'error ...' is printed (it gives
a syntax error on unknown option). For some options a list of values,
one on each line, is printed. The options are shown from the config file
as modified with set_option. For some options an override may have been
taken that does not show up with this command, not results from e.g. the
verbosity and forward control commands. Not all options work, see list_stubs,
list_forwards, list_local_zones and list_local_data for those.
.TP
.B list_stubs
List the stub zones in use. These are printed one by one to the output.
This includes the root hints in use.
.TP
.B list_forwards
List the forward zones in use. These are printed zone by zone to the output.
.TP
.B list_local_zones
List the local zones in use. These are printed one per line with zone type.
.TP
.B list_local_data
List the local data RRs in use. The resource records are printed.
.TP
.B forward_add \fR[\fI+i\fR] \fIzone addr ...
Add a new forward zone to running unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone (so it can resolve insecurely if you have
a DNSSEC root trust anchor configured for other names).
The addr can be IP4, IP6 or nameserver names, like \fIforward-zone\fR config
in unbound.conf.
.TP
.B forward_remove \fR[\fI+i\fR] \fIzone
Remove a forward zone from running unbound. The +i also removes a
\fIdomain\-insecure\fR for the zone.
.TP
.B stub_add \fR[\fI+ip\fR] \fIzone addr ...
Add a new stub zone to running unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone. With +p the stub zone is set to prime,
without it it is set to notprime. The addr can be IP4, IP6 or nameserver
names, like the \fIstub-zone\fR config in unbound.conf.
.TP
.B stub_remove \fR[\fI+i\fR] \fIzone
Remove a stub zone from running unbound. The +i also removes a
\fIdomain\-insecure\fR for the zone.
.TP
.B forward \fR[\fIoff\fR | \fIaddr ...\fR ]
Setup forwarding mode. Configures if the server should ask other upstream
nameservers, should go to the internet root nameservers itself, or show
the current config. You could pass the nameservers after a DHCP update.
.IP
Without arguments the current list of addresses used to forward all queries
to is printed. On startup this is from the forward\-zone "." configuration.
Afterwards it shows the status. It prints off when no forwarding is used.
.IP
If \fIoff\fR is passed, forwarding is disabled and the root nameservers
are used. This can be used to avoid to avoid buggy or non\-DNSSEC supporting
nameservers returned from DHCP. But may not work in hotels or hotspots.
.IP
If one or more IPv4 or IPv6 addresses are given, those are then used to forward
queries to. The addresses must be separated with spaces. With '@port' the
port number can be set explicitly (default port is 53 (DNS)).
.IP
By default the forwarder information from the config file for the root "." is
used. The config file is not changed, so after a reload these changes are
gone. Other forward zones from the config file are not affected by this command.
.SH "EXIT CODE"
The unbound-control program exits with status code 1 on error, 0 on success.
The unbound\-control program exits with status code 1 on error, 0 on success.
.SH "SET UP"
The setup requires a self\-signed certificate and private keys for both
the server and client. The script \fIunbound\-control\-setup\fR generates
these in the default run directory, or with \-d in another directory.
If you change the access control permissions on the key files you can decide
who can use unbound\-control, by default owner and group but not all users.
Run the script under the same username as you have configured in unbound.conf
or as root, so that the daemon is permitted to read the files, for example with:
.nf
sudo \-u unbound unbound\-control\-setup
.fi
If you have not configured
a username in unbound.conf, the keys need read permission for the user
credentials under which the daemon is started.
The script preserves private keys present in the directory.
After running the script as root, turn on \fBcontrol-enable\fR in
After running the script as root, turn on \fBcontrol\-enable\fR in
\fIunbound.conf\fR.
.SH "STATISTIC COUNTERS"
The \fIstats\fR command shows a number of statistic counters.
@@ -132,6 +265,13 @@ number of queries that were successfully answered using a cache lookup
.I threadX.num.cachemiss
number of queries that needed recursive processing
.TP
.I threadX.num.prefetch
number of cache prefetches performed. This number is included in
cachehits, as the original query had the unprefetched answer from cache,
and resulted in recursive processing, taking a slot in the requestlist.
Not part of the recursivereplies (or the histogram thereof) or cachemiss,
as a cache response was sent.
.TP
.I threadX.num.recursivereplies
The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries.
.TP
@@ -173,6 +313,9 @@ summed over threads.
.I total.num.cachemiss
summed over threads.
.TP
.I total.num.prefetch
summed over threads.
.TP
.I total.num.recursivereplies
summed over threads.
.TP
@@ -232,13 +375,13 @@ Printed for the other query types as well, but only for the types for which
queries were received, thus =0 entries are omitted for brevity.
.TP
.I num.query.type.other
Number of queries with query types 256-65535.
Number of queries with query types 256\-65535.
.TP
.I num.query.class.IN
The total number of queries over all threads with query class IN (internet).
Also printed for other classes (such as CH (CHAOS) sometimes used for
debugging), or NONE, ANY, used by dynamic update.
num.query.class.other is printed for classes 256-65535.
num.query.class.other is printed for classes 256\-65535.
.TP
.I num.query.opcode.QUERY
The total number of queries over all threads with query opcode QUERY.
@@ -247,6 +390,9 @@ Also printed for other opcodes, UPDATE, ...
.I num.query.tcp
Number of queries that were made using TCP towards the unbound server.
.TP
.I num.query.ipv6
Number of queries that were made using IPv6 towards the unbound server.
.TP
.I num.query.flags.RD
The number of queries that had the RD flag set in the header.
Also printed for flags QR, AA, TC, RA, Z, AD, CD.
@@ -301,7 +447,7 @@ unbound configuration file.
.TP
.I @UNBOUND_RUN_DIR@
directory with private keys (unbound_server.key and unbound_control.key) and
self-signed certificates (unbound_server.pem and unbound_control.pem).
self\-signed certificates (unbound_server.pem and unbound_control.pem).
.SH "SEE ALSO"
\fIunbound.conf\fR(5),
\fIunbound\fR(8).
+11 -1
View File
@@ -14,7 +14,7 @@
.SH "SYNOPSIS"
.LP
.B unbound\-host
.RB [ \-vdhr ]
.RB [ \-vdhr46 ]
.RB [ \-c
.IR class ]
.RB [ \-t
@@ -35,6 +35,10 @@ uses the unbound validating resolver to query for the hostname and display
results. With the \fB\-v\fR option it displays validation
status: secure, insecure, bogus (security failure).
.P
By default it reads no configuration file whatsoever. It attempts to reach
the internet root servers. With \fB\-C\fR an unbound config file and with
\fB\-r\fR resolv.conf can be read.
.P
The available options are:
.TP
.I hostname
@@ -87,6 +91,12 @@ Read /etc/resolv.conf, and use the forward DNS servers from there (those could
have been set by DHCP). More info in
.IR resolv.conf (5).
Breaks validation if those servers do not support DNSSEC.
.TP
.B \-4
Use solely the IPv4 network for sending packets.
.TP
.B \-6
Use solely the IPv6 network for sending packets.
.SH "EXAMPLES"
.LP
Some examples of use. The keys shown below are fakes, thus a security failure
+292 -56
View File
@@ -52,8 +52,8 @@ server:
username: unbound
# make sure unbound can access entropy from inside the chroot.
# e.g. on linux the use these commands (on BSD, devfs(8) is used):
# mount --bind -n /dev/random /etc/unbound/dev/random
# and mount --bind -n /dev/log /etc/unbound/dev/log
# mount \-\-bind \-n /dev/random /etc/unbound/dev/random
# and mount \-\-bind \-n /dev/log /etc/unbound/dev/log
chroot: "/etc/unbound"
# logfile: "/etc/unbound/unbound.log" #uncomment to use logfile.
pidfile: "/etc/unbound/unbound.pid"
@@ -73,7 +73,10 @@ Files can be included using the
.B include:
directive. It can appear anywhere, and takes a single filename as an argument.
Processing continues as if the text from the included file was copied into
the config file at that point.
the config file at that point. If also using chroot, using full path names
for the included files works, relative pathnames for the included names work
if the directory where the daemon is started equals its chroot/working
directory.
.SS "Server Options"
These options are part of the
.B server:
@@ -83,14 +86,16 @@ clause.
The verbosity number, level 0 means no verbosity, only errors. Level 1
gives operational information. Level 2 gives detailed operational
information. Level 3 gives query level information, output per query.
Level 4 gives algorithm level information.
Default is level 1. The verbosity can also be increased from the commandline,
see
\fIunbound\fR(8).
Level 4 gives algorithm level information. Level 5 logs client
identification for cache misses. Default is level 1.
The verbosity can also be increased from the commandline, see \fIunbound\fR(8).
.TP
.B statistics\-interval: \fI<seconds>
The number of seconds between printing statistics to the log for every thread.
Disable with value 0 or "". Default is disabled.
Disable with value 0 or "". Default is disabled. The histogram statistics
are only printed if replies were sent during the statistics interval,
requestlist statistics are printed for every interval (but can be 0).
This is because the median calculation requires data to be present.
.TP
.B statistics\-cumulative: \fI<yes or no>
If enabled, statistics are cumulative since starting unbound, without clearing
@@ -98,7 +103,8 @@ the statistics counters after logging the statistics. Default is no.
.TP
.B extended\-statistics: \fI<yes or no>
If enabled, extended statistics are printed from \fIunbound\-control\fR(8).
Default is off, because keeping track of more statistics takes time.
Default is off, because keeping track of more statistics takes time. The
counters are listed in \fIunbound\-control\fR(8).
.TP
.B num\-threads: \fI<number>
The number of threads to create to serve clients. Use 1 for no threading.
@@ -106,18 +112,20 @@ The number of threads to create to serve clients. Use 1 for no threading.
.B port: \fI<port number>
The port number, default 53, on which the server responds to queries.
.TP
.B interface: \fI<ip address>
.B interface: \fI<ip address[@port]>
Interface to use to connect to the network. This interface is listened to
for queries from clients, and answers to clients are given from it.
Can be given multiple times to work on several interfaces. If none are
given the default is to listen to localhost.
The interfaces are not changed on a reload (kill \-HUP) but only on restart.
A port number can be specified with @port (without spaces between
interface and port number), if not specified the default port (from
\fBport\fR) is used.
.TP
.B interface-automatic: \fI<yes or no>
.B interface\-automatic: \fI<yes or no>
Detect source interface on UDP queries and copy them to replies. This
feature is experimental, and needs support in your OS for IPv6
(and its socket options) and IPv4 (and have source-interface socket options).
Default value is no.
feature is experimental, and needs support in your OS for particular socket
options. Default value is no.
.TP
.B outgoing\-interface: \fI<ip address>
Interface to use to connect to the network. This interface is used to send
@@ -132,15 +140,16 @@ sent via a random outgoing interface to counter spoofing.
.TP
.B outgoing\-range: \fI<number>
Number of ports to open. This number of file descriptors can be opened per
thread. Must be at least 1. Default is 256. Larger numbers need extra
resources from the operating system.
thread. Must be at least 1. Default depends on compile options. Larger
numbers need extra resources from the operating system. For performance a
a very large value is best, use libevent to make this possible.
.TP
.B outgoing\-port\-permit: \fI<port number or range>
Permit unbound to open this port or range of ports for use to send queries.
A larger number of permitted outgoing ports increases resilience against
spoofing attempts. Make sure these ports are not needed by other daemons.
By default only ports above 1024 that have not been assigned by IANA are used.
Give a port number or a range of the form "low-high", without spaces.
Give a port number or a range of the form "low\-high", without spaces.
.IP
The \fBoutgoing\-port\-permit\fR and \fBoutgoing\-port\-avoid\fR statements
are processed in the line order of the config file, adding the permitted ports
@@ -153,7 +162,7 @@ Do not permit unbound to open this port or range of ports for use to send
queries. Use this to make sure unbound does not grab a port that another
daemon needs. The port is avoided on all outgoing interfaces, both IP4 and IP6.
By default only ports above 1024 that have not been assigned by IANA are used.
Give a port number or a range of the form "low-high", without spaces.
Give a port number or a range of the form "low\-high", without spaces.
.TP
.B outgoing\-num\-tcp: \fI<number>
Number of outgoing TCP buffers to allocate per thread. Default is 10. If set
@@ -163,6 +172,17 @@ to 0, or if do_tcp is "no", no TCP queries to authoritative servers are done.
Number of incoming TCP buffers to allocate per thread. Default is 10. If set
to 0, or if do_tcp is "no", no TCP queries from clients are accepted.
.TP
.B edns\-buffer\-size: \fI<number>
Number of bytes size to advertise as the EDNS reassembly buffer size.
This is the value put into datagrams over UDP towards peers. The actual
buffer size is determined by msg\-buffer\-size (both for TCP and UDP). Do
not set higher than that value. Default is 4096 which is RFC recommended.
If you have fragmentation reassembly problems, usually seen as timeouts,
then a value of 1480 can fix it. Setting to 512 bypasses even the most
stringent path MTU problems, but is seen as extreme, since the amount
of TCP fallback generated is excessive (probably also for this resolver,
consider tuning the outgoing tcp number).
.TP
.B msg\-buffer\-size: \fI<number>
Number of bytes size of the message buffers. Default is 65552 bytes, enough
for 64 Kb packets, the maximum DNS message size. No message larger than this
@@ -185,7 +205,7 @@ The number of queries that every thread will service simultaneously.
If more queries arrive that need servicing, and no queries can be jostled out
(see \fIjostle\-timeout\fR), then the queries are dropped. This forces
the client to resend after a timeout; allowing the server time to work on
the existing queries. Default 1024.
the existing queries. Default depends on compile options, 512 or 1024.
.TP
.B jostle\-timeout: \fI<msec>
Timeout used when the server is very busy. Set to a value that usually
@@ -194,6 +214,33 @@ arrive, then 50% of the queries are allowed to run to completion, and
the other 50% are replaced with the new incoming query if they have already
spent more than their allowed time. This protects against denial of
service by slow queries or high query rates. Default 200 milliseconds.
The effect is that the qps for long-lasting queries is about
(numqueriesperthread / 2) / (average time for such long queries) qps.
The qps for short queries can be about (numqueriesperthread / 2)
/ (jostletimeout in whole seconds) qps per thread, about (1024/2)*5 = 2560
qps by default.
.TP
.B so\-rcvbuf: \fI<number>
If not 0, then set the SO_RCVBUF socket option to get more buffer
space on UDP port 53 incoming queries. So that short spikes on busy
servers do not drop packets (see counter in netstat \-su). Default is
0 (use system value). Otherwise, the number of bytes to ask for, try
"4m" on a busy server. The OS caps it at a maximum, on linux unbound
needs root permission to bypass the limit, or the admin can use sysctl
net.core.rmem_max. On BSD change kern.ipc.maxsockbuf in /etc/sysctl.conf.
On OpenBSD change header and recompile kernel. On Solaris ndd \-set
/dev/udp udp_max_buf 8388608.
.TP
.B so\-sndbuf: \fI<number>
If not 0, then set the SO_SNDBUF socket option to get more buffer space on
UDP port 53 outgoing queries. This for very busy servers handles spikes
in answer traffic, otherwise 'send: resource temporarily unavailable'
can get logged, the buffer overrun is also visible by netstat \-su.
Default is 0 (use system value). Specify the number of bytes to ask
for, try "4m" on a very busy server. The OS caps it at a maximum, on
linux unbound needs root permission to bypass the limit, or the admin
can use sysctl net.core.wmem_max. On BSD, Solaris changes are similar
to so\-rcvbuf.
.TP
.B rrset\-cache\-size: \fI<number>
Number of bytes size of the RRset cache. Default is 4 megabytes.
@@ -212,12 +259,17 @@ When the internal TTL expires, the cache item has expired.
Can be set lower to force the resolver to query for data often, and not
trust (very large) TTL values.
.TP
.B cache\-min\-ttl: \fI<seconds>
Time to live minimum for RRsets and messages in the cache. Default is 0.
If the the minimum kicks in, the data is cached for longer than the domain
owner intended, and thus less queries are made to look up the data.
Zero makes sure the data in the cache is as the domain owner intended,
higher values, especially more than an hour or so, can lead to trouble as
the data in the cache does not match up with the actual data any more.
.TP
.B infra\-host\-ttl: \fI<seconds>
Time to live for entries in the host cache. The host cache contains
roundtrip timing and EDNS support information. Default is 900.
.TP
.B infra\-lame\-ttl: \fI<seconds>
The time to live when a delegation is discovered to be lame. Default is 900.
roundtrip timing, lameness and EDNS support information. Default is 900.
.TP
.B infra\-cache\-slabs: \fI<number>
Number of slabs in the infrastructure cache. Slabs reduce lock contention
@@ -226,11 +278,6 @@ by threads. Must be set to a power of 2.
.B infra\-cache\-numhosts: \fI<number>
Number of hosts for which information is cached. Default is 10000.
.TP
.B infra\-cache\-lame\-size: \fI<number>
Number of bytes that the lameness cache per host is allowed to use. Default
is 10 kb, which gives maximum storage for a couple score zones, depending on
the lame zone name lengths.
.TP
.B do\-ip4: \fI<yes or no>
Enable or disable whether ip4 queries are answered or issued. Default is yes.
.TP
@@ -245,6 +292,33 @@ Enable or disable whether UDP queries are answered or issued. Default is yes.
.B do\-tcp: \fI<yes or no>
Enable or disable whether TCP queries are answered or issued. Default is yes.
.TP
.B tcp\-upstream: \fI<yes or no>
Enable or disable whether the upstream queries use TCP only for transport.
Default is no. Useful in tunneling scenarios.
.TP
.B ssl\-upstream: \fI<yes or no>
Enabled or disable whether the upstream queries use SSL only for transport.
Default is no. Useful in tunneling scenarios. The SSL contains plain DNS in
TCP wireformat. The other server must support this (see \fBssl\-service\-key\fR).
.TP
.B ssl\-service-key: \fI<file>
If enabled, the server provider SSL service on its TCP sockets. The clients
have to use ssl\-upstream: yes. The file is the private key for the TLS
session. The public certificate is in the ssl\-service\-pem file. Default
is "", turned off. Requires a restart (a reload is not enough) if changed,
because the private key is read while root permissions are held and before
chroot (if any). Normal DNS TCP service is not provided and gives errors,
this service is best run with a different \fBport:\fR config or \fI@port\fR
suffixes in the \fBinterface\fR config.
.TP
.B ssl\-service\-pem: \fI<file>
The public key certificate pem file for the ssl service. Default is "",
turned off.
.TP
.B ssl\-port: \fI<number>
The port number on which to provide TCP SSL service, default 443, only
interfaces configured with that port number as @number get the SSL service.
.TP
.B do\-daemonize: \fI<yes or no>
Enable or disable whether the unbound server forks into the background as
a daemon. Default is yes.
@@ -335,6 +409,17 @@ The log facility LOG_DAEMON is used, with identity "unbound".
The logfile setting is overridden when use\-syslog is turned on.
The default is to log to syslog.
.TP
.B log\-time\-ascii: \fI<yes or no>
Sets logfile lines to use a timestamp in UTC ascii. Default is no, which
prints the seconds since 1970 in brackets. No effect if using syslog, in
that case syslog formats the timestamp printed into the log files.
.TP
.B log\-queries: \fI<yes or no>
Prints one line per query to the log, with the log timestamp and IP address,
name, type and class. Default is no. Note that it takes time to print these
lines which makes the server (significantly) slower. Odd (nonprintable)
characters in names are printed as '?'.
.TP
.B pidfile: \fI<filename>
The process id is written to the file. Default is "@UNBOUND_PIDFILE@".
So,
@@ -406,6 +491,15 @@ removes DNSSEC data from packets, or a zone changes from signed to
unsigned to badly signed often. If turned off you run the risk of a
downgrade attack that disables security for a zone. Default is on.
.TP
.B harden\-below\-nxdomain: \fI<yes or no>
From draft-vixie-dnsext-resimprove, returns nxdomain to queries for a name
below another name that is already known to be nxdomain. DNSSEC mandates
noerror for empty nonterminals, hence this is possible. Very old software
might return nxdomain for empty nonterminals (that usually happen for reverse
IP address lookups), and thus may be incompatible with this. To try to avoid
this only DNSSEC-secure nxdomains are used, because the old software does not
have DNSSEC. Default is off.
.TP
.B harden\-referral\-path: \fI<yes or no>
Harden the referral path by performing additional queries for
infrastructure data. Validates the replies if trust anchors are configured
@@ -415,9 +509,11 @@ path to the answer.
Default off, because it burdens the authority servers, and it is
not RFC standard, and could lead to performance problems because of the
extra query load that is generated. Experimental option.
If you enable it consider adding more numbers after the target\-fetch\-policy
to increase the max depth that is checked to.
.TP
.B use\-caps\-for\-id: \fI<yes or no>
Use 0x20-encoded random bits in the query to foil spoof attempts.
Use 0x20\-encoded random bits in the query to foil spoof attempts.
This perturbs the lowercase and uppercase of query names sent to
authority servers and checks if the reply still has the correct casing.
Disabled by default.
@@ -428,7 +524,7 @@ Give IPv4 of IPv6 addresses or classless subnets. These are addresses
on your private network, and are not allowed to be returned for public
internet names. Any occurence of such addresses are removed from
DNS answers. Additionally, the DNSSEC validator may mark the answers
bogus. This protects against so-called DNS Rebinding, where a user browser
bogus. This protects against so\-called DNS Rebinding, where a user browser
is turned into a network proxy, allowing remote access through the browser
to other parts of your private network. Some names can be allowed to
contain your private addresses, by default all the \fBlocal\-data\fR
@@ -436,7 +532,7 @@ that you configured is allowed to, and you can specify additional
names using \fBprivate\-domain\fR. No private addresses are enabled
by default. We consider to enable this for the RFC1918 private IP
address space by default in later releases. That would enable private
addresses for 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 192.254.0.0/16
addresses for 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 169.254.0.0/16
fd00::/8 and fe80::/10, since the RFC standards say these addresses
should not be visible on the public internet. Turning on 127.0.0.0/8
would hinder many spamblocklists as they use that.
@@ -463,11 +559,35 @@ If yes, localhost is added to the do\-not\-query\-address entries, both
IP6 ::1 and IP4 127.0.0.1/8. If no, then localhost can be used to send
queries to. Default is yes.
.TP
.B prefetch: \fI<yes or no>
If yes, message cache elements are prefetched before they expire to
keep the cache up to date. Default is no. Turning it on gives about
10 percent more traffic and load on the machine, but popular items do
not expire from the cache.
.TP
.B prefetch-key: \fI<yes or no>
If yes, fetch the DNSKEYs earlier in the validation process, when a DS
record is encountered. This lowers the latency of requests. It does use
a little more CPU. Also if the cache is set to 0, it is no use. Default is no.
.TP
.B rrset-roundrobin: \fI<yes or no>
If yes, Unbound rotates RRSet order in response (the random number is taken
from the query ID, for speed and thread safety). Default is no.
.TP
.B minimal-responses: \fI<yes or no>
If yes, Unbound doesn't insert authority/additional sections into response
messages when those sections are not required. This reduces response
size significantly, and may avoid TCP fallback for some responses.
This may cause a slight speedup. The default is no, because the DNS
protocol RFCs mandate these sections, and the additional content could
be of use and save roundtrips for clients.
.TP
.B module\-config: \fI<"module names">
Module configuration, a list of module names separated by spaces, surround
the string with quotes (""). The modules can be validator, iterator.
Setting this to "iterator" will result in a non\-validating server.
Setting this to "validator iterator" will turn on DNSSEC validation.
The ordering of the modules is important.
You must also set trust\-anchors for validation to be useful.
.TP
.B trust\-anchor\-file: \fI<filename>
@@ -475,6 +595,13 @@ File with trusted keys for validation. Both DS and DNSKEY entries can appear
in the file. The format of the file is the standard DNS Zone file format.
Default is "", or no trust anchor file.
.TP
.B auto\-trust\-anchor\-file: \fI<filename>
File with trust anchor for one zone, which is tracked with RFC5011 probes.
The probes are several times per month, thus the machine must be online
frequently. The initial file can be one with contents as described in
\fBtrust\-anchor\-file\fR. The file is written to when the anchor is updated,
so the unbound user must have write permission.
.TP
.B trust\-anchor: \fI<"Resource Record">
A DS or DNSKEY RR for a key to use for validation. Multiple entries can be
given to specify multiple trusted keys, in addition to the trust\-anchor\-files.
@@ -488,6 +615,8 @@ File with trusted keys for validation. Specify more than one file
with several entries, one file per entry. Like \fBtrust\-anchor\-file\fR
but has a different file format. Format is BIND\-9 style format,
the trusted\-keys { name flag proto algo "key"; }; clauses are read.
It is possible to use wildcards with this statement, the wildcard is
expanded on start and on reload.
.TP
.B dlv\-anchor\-file: \fI<filename>
File with trusted keys for DLV (DNSSEC Lookaside Validation). Both DS and
@@ -499,11 +628,41 @@ means that it is a lookaside for the root. Default is "", or no dlv anchor file.
.B dlv\-anchor: \fI<"Resource Record">
Much like trust\-anchor, this is a DLV anchor with the DS or DNSKEY inline.
.TP
.B domain\-insecure: \fI<domain name>
Sets domain name to be insecure, DNSSEC chain of trust is ignored towards
the domain name. So a trust anchor above the domain name can not make the
domain secure with a DS record, such a DS record is then ignored.
Also keys from DLV are ignored for the domain. Can be given multiple times
to specify multiple domains that are treated as if unsigned. If you set
trust anchors for the domain they override this setting (and the domain
is secured).
.IP
This can be useful if you want to make sure a trust anchor for external
lookups does not affect an (unsigned) internal domain. A DS record
externally can create validation failures for that internal domain.
.TP
.B val\-override\-date: \fI<rrsig\-style date spec>
Default is "" or "0", which disables this debugging feature. If enabled by
giving a RRSIG style date, that date is used for verifying RRSIG inception
and expiration dates, instead of the current date. Do not set this unless
you are debugging signature inception and expiration.
you are debugging signature inception and expiration. The value \-1 ignores
the date altogether, useful for some special applications.
.TP
.B val\-sig\-skew\-min: \fI<seconds>
Minimum number of seconds of clock skew to apply to validated signatures.
A value of 10% of the signature lifetime (expiration \- inception) is
used, capped by this setting. Default is 3600 (1 hour) which allows for
daylight savings differences. Lower this value for more strict checking
of short lived signatures.
.TP
.B val\-sig\-skew\-max: \fI<seconds>
Maximum number of seconds of clock skew to apply to validated signatures.
A value of 10% of the signature lifetime (expiration \- inception)
is used, capped by this setting. Default is 86400 (24 hours) which
allows for timezone setting problems in stable domains. Setting both
min and max very low disables the clock skew allowances. Setting both
min and max very high makes the validator check the signature timestamps
less strictly.
.TP
.B val\-bogus\-ttl: \fI<number>
The time to live for bogus data. This is data that has failed validation;
@@ -518,6 +677,15 @@ indeterminate or unchecked are not affected. Default is yes. Use this setting
to protect the users that rely on this validator for authentication from
protentially bad data in the additional section.
.TP
.B val\-log\-level: \fI<number>
Have the validator print validation failures to the log. Regardless of
the verbosity setting. Default is 0, off. At 1, for every user query
that fails a line is printed to the logs. This way you can monitor what
happens with validation. Use a diagnosis tool, such as dig or drill,
to find out why validation is failing for these queries. At 2, not only
the query that failed is printed but also the reason why unbound thought
it was wrong and which server sent the faulty data.
.TP
.B val\-permissive\-mode: \fI<yes or no>
Instruct the validator to mark bogus messages as indeterminate. The security
checks are performed, but if the result is bogus (failed security), the
@@ -526,6 +694,14 @@ receives the bogus data. For messages that are found to be secure the AD bit
is set in replies. Also logging is performed as for full validation.
The default value is "no".
.TP
.B ignore\-cd\-flag: \fI<yes or no>
Instruct unbound to ignore the CD flag from clients and refuse to
return bogus answers to them. Thus, the CD (Checking Disabled) flag
does not disable checking any more. This is useful if legacy (w2008)
servers that set the CD flag but cannot validate DNSSEC themselves are
the clients, and then unbound provides them with DNSSEC protection.
The default value is "no".
.TP
.B val\-nsec3\-keysize\-iterations: \fI<"list of values">
List of keysize and iteration count values, separated by spaces, surrounded
by quotes. Default is "1024 150 2048 500 4096 2500". This determines the
@@ -535,6 +711,26 @@ be in ascending order and have at least one entry. If you set it to
"1024 65535" there is no restriction to NSEC3 iteration values.
This table must be kept short; a very long list could cause slower operation.
.TP
.B add\-holddown: \fI<seconds>
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
autotrust updates to add new trust anchors only after they have been
visible for this time. Default is 30 days as per the RFC.
.TP
.B del\-holddown: \fI<seconds>
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
autotrust updates to remove revoked trust anchors after they have been
kept in the revoked list for this long. Default is 30 days as per
the RFC.
.TP
.B keep\-missing: \fI<seconds>
Instruct the \fBauto\-trust\-anchor\-file\fR probe mechanism for RFC5011
autotrust updates to remove missing trust anchors after they have been
unseen for this long. This cleans up the state file if the target zone
does not perform trust anchor revocation, so this makes the auto probe
mechanism work with zones that perform regular (non\-5011) rollovers.
The default is 366 days. The value 0 does not remove missing anchors,
as per the RFC.
.TP
.B key\-cache\-size: \fI<number>
Number of bytes size of the key cache. Default is 4 megabytes.
A plain number is in bytes, append 'k', 'm' or 'g' for kilobytes, megabytes
@@ -551,11 +747,12 @@ A plain number is in bytes, append 'k', 'm' or 'g' for kilobytes, megabytes
or gigabytes (1024*1024 bytes in a megabyte).
.TP
.B local\-zone: \fI<zone> <type>
Configure a local zone. The type determines the answer to give if there is
no match from local\-data. The types are deny, refuse, static, transparent,
redirect, nodefault, and are explained below. After that the default settings
are listed. Use local\-data: to enter data into the local zone. Answers for
local zones are authoritative DNS answers. By default the zones are class IN.
Configure a local zone. The type determines the answer to give if
there is no match from local\-data. The types are deny, refuse, static,
transparent, redirect, nodefault, typetransparent, and are explained
below. After that the default settings are listed. Use local\-data: to
enter data into the local zone. Answers for local zones are authoritative
DNS answers. By default the zones are class IN.
.IP
If you need more complicated authoritative data, with referrals, wildcards,
CNAME/DNAME support, or DNSSEC authoritative service, setup a stub\-zone for
@@ -577,19 +774,30 @@ as local\-data for the zone apex domain.
.TP 10
\h'5'\fItransparent\fR
If there is a match from local data, the query is answered.
Otherwise, the query is resolved normally.
Otherwise if the query has a different name, the query is resolved normally.
If the query is for a name given in localdata but no such type of data is
given in localdata, then a noerror nodata answer is returned.
If no local\-zone is given local\-data causes a transparent zone
to be created by default.
.TP 10
\h'5'\fItypetransparent\fR
If there is a match from local data, the query is answered. If the query
is for a different name, or for the same name but for a different type,
the query is resolved normally. So, similar to transparent but types
that are not listed in local data are resolved normally, so if an A record
is in the local data that does not cause a nodata reply for AAAA queries.
.TP 10
\h'5'\fIredirect\fR
The query is answered from the local data for the zone name.
The query is answered from the local data for the zone name.
There may be no local data beneath the zone name.
This answers queries for the zone, and all subdomains of the zone
with the local data for the zone.
It can be used to redirect a domain to a different address, with
It can be used to redirect a domain to return a different address record
to the end user, with
local\-zone: "example.com." redirect and
local\-data: "example.com. A 127.0.0.1"
queries for www.example.com and www.foo.example.com are redirected.
queries for www.example.com and www.foo.example.com are redirected, so
that users with web browsers cannot access sites with suffix example.com.
.TP 10
\h'5'\fInodefault\fR
Used to turn off default contents for AS112 zones. The other types
@@ -652,7 +860,8 @@ records are provided.
.TP 10
\h'5'\fIreverse RFC3330 IP4 this, link\-local, testnet and broadcast\fR
Reverse data for zones 0.in\-addr.arpa, 254.169.in\-addr.arpa,
2.0.192.in\-addr.arpa, 255.255.255.255.in\-addr.arpa.
2.0.192.in\-addr.arpa (TEST NET 1), 100.51.198.in\-addr.arpa (TEST NET 2),
113.0.203.in\-addr.arpa (TEST NET 3), 255.255.255.255.in\-addr.arpa.
.TP 10
\h'5'\fIreverse RFC4291 IP6 unspecified\fR
Reverse data for zone
@@ -671,8 +880,10 @@ Reverse data for zones 8.E.F.ip6.arpa to B.E.F.ip6.arpa.
Reverse data for zone 8.B.D.0.1.0.0.2.ip6.arpa. This zone is used for
tutorials and examples. You can remove the block on this zone with:
.nf
local-zone: 8.B.D.0.1.0.0.2.ip6.arpa. nodefault
local\-zone: 8.B.D.0.1.0.0.2.ip6.arpa. nodefault
.fi
You can also selectively unblock a part of the zone by making that part
transparent with a local\-zone statement.
This also works with the other default zones.
.\" End of local-zone listing.
.TP 5
@@ -701,7 +912,7 @@ enabled, the \fIunbound\-control\fR(8) utility can be used to send
commands to the running unbound server. The server uses these clauses
to setup SSLv3 / TLSv1 security for the connection. The
\fIunbound\-control\fR(8) utility also reads the \fBremote\-control\fR
section for options. To setup the correct self-signed certificates use the
section for options. To setup the correct self\-signed certificates use the
\fIunbound\-control\-setup\fR(8) utility.
.TP 5
.B control\-enable: \fI<yes or no>
@@ -714,10 +925,9 @@ By default localhost (127.0.0.1 and ::1) is listened to.
Use 0.0.0.0 and ::0 to listen to all interfaces.
.TP 5
.B control\-port: <port number>
The port number to listen on for control commands, default is 953
(that is the same port number named uses to listen to rndc).
If you change this port number, and permissions have been dropped, a
reload is not sufficient to open the port again, you must then restart.
The port number to listen on for control commands, default is 8953.
If you change this port number, and permissions have been dropped,
a reload is not sufficient to open the port again, you must then restart.
.TP 5
.B server\-key\-file: "<private key file>"
Path to the server private key, by default unbound_server.key.
@@ -745,6 +955,8 @@ There may be multiple
.B stub\-zone:
clauses. Each with a name: and zero or more hostnames or IP addresses.
For the stub zone this list of nameservers is used. Class IN is assumed.
The servers should be authority servers, not recursors; unbound performs
the recursive processing itself for stub zones.
.P
The stub zone can be used to configure authoritative data to be used
by the resolver that cannot be accessed using the public internet servers.
@@ -779,15 +991,24 @@ This option is by default off. If enabled it performs NS set priming,
which is similar to root hints, where it starts using the list of nameservers
currently published by the zone. Thus, if the hint list is slightly outdated,
the resolver picks up a correct list online.
.TP
.B stub\-first: \fI<yes or no>
If enabled, a query is attempted without the stub clause if it fails.
The default is no.
.SS "Forward Zone Options"
.LP
There may be multiple
.B forward\-zone:
clauses. Each with a name: and zero or more hostnames or IP addresses.
For the forward zone this list of nameservers is used to forward the queries
to. The servers have to handle further recursion for the query. Class IN is
assumed. A forward\-zone entry with name "." and a forward\-addr target will
forward all queries to that other server (unless it can answer from the cache).
clauses. Each with a \fBname:\fR and zero or more hostnames or IP
addresses. For the forward zone this list of nameservers is used to
forward the queries to. The servers listed as \fBforward\-host:\fR and
\fBforward\-addr:\fR have to handle further recursion for the query. Thus,
those servers are not authority servers, but are (just like unbound is)
recursive servers too; unbound does not perform recursion itself for the
forward zone, it lets the remote server do it. Class IN is assumed.
A forward\-zone entry with name "." and a forward\-addr target will
forward all queries to that other server (unless it can answer from
the cache).
.TP
.B name: \fI<domain name>
Name of the forward zone.
@@ -798,6 +1019,22 @@ Name of server to forward to. Is itself resolved before it is used.
.B forward\-addr: \fI<IP address>
IP address of server to forward to. Can be IP 4 or IP 6.
To use a nondefault port for DNS communication append '@' with the port number.
.TP
.B forward\-first: \fI<yes or no>
If enabled, a query is attempted without the forward clause if it fails.
The default is no.
.SS "Python Module Options"
.LP
The
.B python:
clause gives the settings for the \fIpython\fR(1) script module. This module
acts like the iterator and validator modules do, on queries and answers.
To enable the script module it has to be compiled into the daemon,
and the word "python" has to be put in the \fBmodule\-config:\fR option
(usually first, or between the validator and iterator).
.TP
.B python\-script: \fI<python file>\fR
The script file to load.
.SH "MEMORY CONTROL EXAMPLE"
In the example config settings below memory usage is reduced. Some service
levels are lower, notable very large data and a high TCP load are no longer
@@ -805,7 +1042,7 @@ supported. Very large data and high TCP loads are exceptional for the DNS.
DNSSEC validation is enabled, just add trust anchors.
If you do not have to worry about programs using more than 3 Mb of memory,
the below example is not for you. Use the defaults to receive full service,
which on BSD-32bit tops out at 30-40 Mb after heavy usage.
which on BSD\-32bit tops out at 30\-40 Mb after heavy usage.
.P
.nf
# example settings that reduce memory usage
@@ -813,7 +1050,7 @@ server:
num\-threads: 1
outgoing\-num\-tcp: 1 # this limits TCP service, uses less buffers.
incoming\-num\-tcp: 1
outgoing\-range: 16 # uses less memory, but less performance.
outgoing\-range: 60 # uses less memory, but less performance.
msg\-buffer\-size: 8192 # note this limits service, 'no huge stuff'.
msg\-cache\-size: 100k
msg\-cache\-slabs: 1
@@ -821,7 +1058,6 @@ server:
rrset\-cache\-slabs: 1
infra\-cache\-numhosts: 200
infra\-cache\-slabs: 1
infra\-cache\-lame\-size: 1k
key\-cache\-size: 100k
key\-cache\-slabs: 1
neg\-cache\-size: 10k
+930 -545
View File
File diff suppressed because it is too large Load Diff
+469 -200
View File
@@ -1,251 +1,520 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright 1991 by the Massachusetts Institute of Technology
# Copyright (C) 1994 X Consortium
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
true
doit_exec=$doit
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
posix_mkdir=
pathcomp=''
# Desired mode of installed file.
mode=0755
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
src=
dst=
dir_arg=
dst_arg=
pathcomp="${pathcomp}/"
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# If we're going to rename the final executable, determine the name now.
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
mkdir_mode=
fi
# don't allow the sed command to completely eliminate the filename
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
true
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
# Make a temp file name in the proper directory.
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
dsttmp=$dstdir/#inst.$$#
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Move or copy the file name to the temp name
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
$doit $instcmd $src $dsttmp &&
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap "rm -f ${dsttmp}" 0 &&
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
# Now rename the file to the real destination.
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
fi &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
+277 -30
View File
@@ -68,14 +68,20 @@ struct delegpt* delegpt_copy(struct delegpt* dp, struct regional* region)
return NULL;
if(!delegpt_set_name(copy, region, dp->name))
return NULL;
copy->bogus = dp->bogus;
copy->has_parent_side_NS = dp->has_parent_side_NS;
for(ns = dp->nslist; ns; ns = ns->next) {
if(!delegpt_add_ns(copy, region, ns->name))
if(!delegpt_add_ns(copy, region, ns->name, (int)ns->lame))
return NULL;
copy->nslist->resolved = ns->resolved;
copy->nslist->got4 = ns->got4;
copy->nslist->got6 = ns->got6;
copy->nslist->done_pside4 = ns->done_pside4;
copy->nslist->done_pside6 = ns->done_pside6;
}
for(a = dp->target_list; a; a = a->next_target) {
if(!delegpt_add_addr(copy, region, &a->addr, a->addrlen,
a->bogus))
a->bogus, a->lame))
return NULL;
}
return copy;
@@ -84,17 +90,20 @@ struct delegpt* delegpt_copy(struct delegpt* dp, struct regional* region)
int
delegpt_set_name(struct delegpt* dp, struct regional* region, uint8_t* name)
{
log_assert(!dp->dp_type_mlc);
dp->namelabs = dname_count_size_labels(name, &dp->namelen);
dp->name = regional_alloc_init(region, name, dp->namelen);
return dp->name != 0;
}
int
delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name)
delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name,
int lame)
{
struct delegpt_ns* ns;
size_t len;
(void)dname_count_size_labels(name, &len);
log_assert(!dp->dp_type_mlc);
/* slow check for duplicates to avoid counting failures when
* adding the same server as a dependency twice */
if(delegpt_find_ns(dp, name, len))
@@ -108,7 +117,12 @@ delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name)
dp->nslist = ns;
ns->name = regional_alloc_init(region, name, ns->namelen);
ns->resolved = 0;
return 1;
ns->got4 = 0;
ns->got6 = 0;
ns->lame = (uint8_t)lame;
ns->done_pside4 = 0;
ns->done_pside6 = 0;
return ns->name != 0;
}
struct delegpt_ns*
@@ -125,25 +139,58 @@ delegpt_find_ns(struct delegpt* dp, uint8_t* name, size_t namelen)
return NULL;
}
struct delegpt_addr*
delegpt_find_addr(struct delegpt* dp, struct sockaddr_storage* addr,
socklen_t addrlen)
{
struct delegpt_addr* p = dp->target_list;
while(p) {
if(sockaddr_cmp_addr(addr, addrlen, &p->addr, p->addrlen)==0) {
return p;
}
p = p->next_target;
}
return NULL;
}
int
delegpt_add_target(struct delegpt* dp, struct regional* region,
uint8_t* name, size_t namelen, struct sockaddr_storage* addr,
socklen_t addrlen, int bogus)
socklen_t addrlen, int bogus, int lame)
{
struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen);
log_assert(!dp->dp_type_mlc);
if(!ns) {
/* ignore it */
return 1;
}
ns->resolved = 1;
return delegpt_add_addr(dp, region, addr, addrlen, bogus);
if(!lame) {
if(addr_is_ip6(addr, addrlen))
ns->got6 = 1;
else ns->got4 = 1;
if(ns->got4 && ns->got6)
ns->resolved = 1;
}
return delegpt_add_addr(dp, region, addr, addrlen, bogus, lame);
}
int
delegpt_add_addr(struct delegpt* dp, struct regional* region,
struct sockaddr_storage* addr, socklen_t addrlen, int bogus)
struct sockaddr_storage* addr, socklen_t addrlen, int bogus,
int lame)
{
struct delegpt_addr* a = (struct delegpt_addr*)regional_alloc(region,
struct delegpt_addr* a;
log_assert(!dp->dp_type_mlc);
/* check for duplicates */
if((a = delegpt_find_addr(dp, addr, addrlen))) {
if(bogus)
a->bogus = bogus;
if(!lame)
a->lame = 0;
return 1;
}
a = (struct delegpt_addr*)regional_alloc(region,
sizeof(struct delegpt_addr));
if(!a)
return 0;
@@ -156,6 +203,7 @@ delegpt_add_addr(struct delegpt* dp, struct regional* region,
a->addrlen = addrlen;
a->attempts = 0;
a->bogus = bogus;
a->lame = lame;
return 1;
}
@@ -207,20 +255,26 @@ void delegpt_log(enum verbosity_value v, struct delegpt* dp)
delegpt_count_ns(dp, &numns, &missing);
delegpt_count_addr(dp, &numaddr, &numres, &numavail);
log_info("DelegationPoint<%s>: %u names (%u missing), "
"%u addrs (%u result, %u avail)",
"%u addrs (%u result, %u avail)%s",
buf, (unsigned)numns, (unsigned)missing,
(unsigned)numaddr, (unsigned)numres, (unsigned)numavail);
(unsigned)numaddr, (unsigned)numres, (unsigned)numavail,
(dp->has_parent_side_NS?" parentNS":" cacheNS"));
if(verbosity >= VERB_ALGO) {
for(ns = dp->nslist; ns; ns = ns->next) {
dname_str(ns->name, buf);
log_info(" %s%s%s", buf, (ns->resolved?"*":""),
(dp->bogus?" BOGUS":"") );
log_info(" %s %s%s%s%s%s%s%s", buf,
(ns->resolved?"*":""),
(ns->got4?" A":""), (ns->got6?" AAAA":""),
(dp->bogus?" BOGUS":""), (ns->lame?" PARENTSIDE":""),
(ns->done_pside4?" PSIDE_A":""),
(ns->done_pside6?" PSIDE_AAAA":""));
}
for(a = dp->target_list; a; a = a->next_target) {
if(a->bogus)
log_addr(VERB_ALGO, " BOGUS ",
&a->addr, a->addrlen);
else log_addr(VERB_ALGO, " ", &a->addr, a->addrlen);
const char* str = " ";
if(a->bogus && a->lame) str = " BOGUS ADDR_LAME ";
else if(a->bogus) str = " BOGUS ";
else if(a->lame) str = " ADDR_LAME ";
log_addr(VERB_ALGO, str, &a->addr, a->addrlen);
}
}
}
@@ -237,6 +291,16 @@ delegpt_add_unused_targets(struct delegpt* dp)
}
}
size_t
delegpt_count_targets(struct delegpt* dp)
{
struct delegpt_addr* a;
size_t n = 0;
for(a = dp->target_list; a; a = a->next_target)
n++;
return n;
}
size_t
delegpt_count_missing_targets(struct delegpt* dp)
{
@@ -285,9 +349,10 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region)
dp = delegpt_create(region);
if(!dp)
return NULL;
dp->has_parent_side_NS = 1; /* created from message */
if(!delegpt_set_name(dp, region, ns_rrset->rk.dname))
return NULL;
if(!delegpt_rrset_add_ns(dp, region, ns_rrset))
if(!delegpt_rrset_add_ns(dp, region, ns_rrset, 0))
return NULL;
/* add glue, A and AAAA in answer and additional section */
@@ -299,10 +364,10 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region)
continue;
if(ntohs(s->rk.type) == LDNS_RR_TYPE_A) {
if(!delegpt_add_rrset_A(dp, region, s))
if(!delegpt_add_rrset_A(dp, region, s, 0))
return NULL;
} else if(ntohs(s->rk.type) == LDNS_RR_TYPE_AAAA) {
if(!delegpt_add_rrset_AAAA(dp, region, s))
if(!delegpt_add_rrset_AAAA(dp, region, s, 0))
return NULL;
}
}
@@ -311,11 +376,12 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region)
int
delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region,
struct ub_packed_rrset_key* ns_rrset)
struct ub_packed_rrset_key* ns_rrset, int lame)
{
struct packed_rrset_data* nsdata = (struct packed_rrset_data*)
ns_rrset->entry.data;
size_t i;
log_assert(!dp->dp_type_mlc);
if(nsdata->security == sec_status_bogus)
dp->bogus = 1;
for(i=0; i<nsdata->count; i++) {
@@ -324,7 +390,7 @@ delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region,
(size_t)ldns_read_uint16(nsdata->rr_data[i]))
continue; /* bad format */
/* add rdata of NS (= wirefmt dname), skip rdatalen bytes */
if(!delegpt_add_ns(dp, region, nsdata->rr_data[i]+2))
if(!delegpt_add_ns(dp, region, nsdata->rr_data[i]+2, lame))
return 0;
}
return 1;
@@ -332,12 +398,13 @@ delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region,
int
delegpt_add_rrset_A(struct delegpt* dp, struct regional* region,
struct ub_packed_rrset_key* ak)
struct ub_packed_rrset_key* ak, int lame)
{
struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data;
size_t i;
struct sockaddr_in sa;
socklen_t len = (socklen_t)sizeof(sa);
log_assert(!dp->dp_type_mlc);
memset(&sa, 0, len);
sa.sin_family = AF_INET;
sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
@@ -347,7 +414,7 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region,
memmove(&sa.sin_addr, d->rr_data[i]+2, INET_SIZE);
if(!delegpt_add_target(dp, region, ak->rk.dname,
ak->rk.dname_len, (struct sockaddr_storage*)&sa,
len, (d->security==sec_status_bogus) ))
len, (d->security==sec_status_bogus), lame))
return 0;
}
return 1;
@@ -355,12 +422,13 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region,
int
delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region,
struct ub_packed_rrset_key* ak)
struct ub_packed_rrset_key* ak, int lame)
{
struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data;
size_t i;
struct sockaddr_in6 sa;
socklen_t len = (socklen_t)sizeof(sa);
log_assert(!dp->dp_type_mlc);
memset(&sa, 0, len);
sa.sin6_family = AF_INET6;
sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
@@ -370,7 +438,7 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region,
memmove(&sa.sin6_addr, d->rr_data[i]+2, INET6_SIZE);
if(!delegpt_add_target(dp, region, ak->rk.dname,
ak->rk.dname_len, (struct sockaddr_storage*)&sa,
len, (d->security==sec_status_bogus) ))
len, (d->security==sec_status_bogus), lame))
return 0;
}
return 1;
@@ -378,16 +446,195 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region,
int
delegpt_add_rrset(struct delegpt* dp, struct regional* region,
struct ub_packed_rrset_key* rrset)
struct ub_packed_rrset_key* rrset, int lame)
{
if(!rrset)
return 1;
if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_NS)
return delegpt_rrset_add_ns(dp, region, rrset);
return delegpt_rrset_add_ns(dp, region, rrset, lame);
else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_A)
return delegpt_add_rrset_A(dp, region, rrset);
return delegpt_add_rrset_A(dp, region, rrset, lame);
else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_AAAA)
return delegpt_add_rrset_AAAA(dp, region, rrset);
return delegpt_add_rrset_AAAA(dp, region, rrset, lame);
log_warn("Unknown rrset type added to delegpt");
return 1;
}
void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg)
{
struct reply_info* rep = (struct reply_info*)msg->entry.data;
if(!rep) return;
/* if error or no answers */
if(FLAGS_GET_RCODE(rep->flags) != 0 || rep->an_numrrsets == 0) {
struct delegpt_ns* ns = delegpt_find_ns(dp, msg->key.qname,
msg->key.qname_len);
if(ns) {
if(msg->key.qtype == LDNS_RR_TYPE_A)
ns->got4 = 1;
else if(msg->key.qtype == LDNS_RR_TYPE_AAAA)
ns->got6 = 1;
if(ns->got4 && ns->got6)
ns->resolved = 1;
}
}
}
void delegpt_no_ipv6(struct delegpt* dp)
{
struct delegpt_ns* ns;
for(ns = dp->nslist; ns; ns = ns->next) {
/* no ipv6, so only ipv4 is enough to resolve a nameserver */
if(ns->got4)
ns->resolved = 1;
}
}
void delegpt_no_ipv4(struct delegpt* dp)
{
struct delegpt_ns* ns;
for(ns = dp->nslist; ns; ns = ns->next) {
/* no ipv4, so only ipv6 is enough to resolve a nameserver */
if(ns->got6)
ns->resolved = 1;
}
}
struct delegpt* delegpt_create_mlc(uint8_t* name)
{
struct delegpt* dp=(struct delegpt*)calloc(1, sizeof(*dp));
if(!dp)
return NULL;
dp->dp_type_mlc = 1;
if(name) {
dp->namelabs = dname_count_size_labels(name, &dp->namelen);
dp->name = memdup(name, dp->namelen);
if(!dp->name) {
free(dp);
return NULL;
}
}
return dp;
}
void delegpt_free_mlc(struct delegpt* dp)
{
struct delegpt_ns* n, *nn;
struct delegpt_addr* a, *na;
if(!dp) return;
log_assert(dp->dp_type_mlc);
n = dp->nslist;
while(n) {
nn = n->next;
free(n->name);
free(n);
n = nn;
}
a = dp->target_list;
while(a) {
na = a->next_target;
free(a);
a = na;
}
free(dp->name);
free(dp);
}
int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name)
{
log_assert(dp->dp_type_mlc);
dp->namelabs = dname_count_size_labels(name, &dp->namelen);
dp->name = memdup(name, dp->namelen);
return (dp->name != NULL);
}
int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame)
{
struct delegpt_ns* ns;
size_t len;
(void)dname_count_size_labels(name, &len);
log_assert(dp->dp_type_mlc);
/* slow check for duplicates to avoid counting failures when
* adding the same server as a dependency twice */
if(delegpt_find_ns(dp, name, len))
return 1;
ns = (struct delegpt_ns*)malloc(sizeof(struct delegpt_ns));
if(!ns)
return 0;
ns->namelen = len;
ns->name = memdup(name, ns->namelen);
if(!ns->name) {
free(ns);
return 0;
}
ns->next = dp->nslist;
dp->nslist = ns;
ns->resolved = 0;
ns->got4 = 0;
ns->got6 = 0;
ns->lame = (uint8_t)lame;
ns->done_pside4 = 0;
ns->done_pside6 = 0;
return 1;
}
int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
socklen_t addrlen, int bogus, int lame)
{
struct delegpt_addr* a;
log_assert(dp->dp_type_mlc);
/* check for duplicates */
if((a = delegpt_find_addr(dp, addr, addrlen))) {
if(bogus)
a->bogus = bogus;
if(!lame)
a->lame = 0;
return 1;
}
a = (struct delegpt_addr*)malloc(sizeof(struct delegpt_addr));
if(!a)
return 0;
a->next_target = dp->target_list;
dp->target_list = a;
a->next_result = 0;
a->next_usable = dp->usable_list;
dp->usable_list = a;
memcpy(&a->addr, addr, addrlen);
a->addrlen = addrlen;
a->attempts = 0;
a->bogus = bogus;
a->lame = lame;
return 1;
}
int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame)
{
struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen);
log_assert(dp->dp_type_mlc);
if(!ns) {
/* ignore it */
return 1;
}
if(!lame) {
if(addr_is_ip6(addr, addrlen))
ns->got6 = 1;
else ns->got4 = 1;
if(ns->got4 && ns->got6)
ns->resolved = 1;
}
return delegpt_add_addr_mlc(dp, addr, addrlen, bogus, lame);
}
size_t delegpt_get_mem(struct delegpt* dp)
{
struct delegpt_ns* ns;
size_t s;
if(!dp) return 0;
s = sizeof(*dp) + dp->namelen +
delegpt_count_targets(dp)*sizeof(struct delegpt_addr);
for(ns=dp->nslist; ns; ns=ns->next)
s += sizeof(*ns)+ns->namelen;
return s;
}
+140 -9
View File
@@ -48,6 +48,7 @@ struct delegpt_ns;
struct delegpt_addr;
struct dns_msg;
struct ub_packed_rrset_key;
struct msgreply_entry;
/**
* Delegation Point.
@@ -73,6 +74,13 @@ struct delegpt {
/** if true, the NS RRset was bogus. All info is bad. */
int bogus;
/** if true, the parent-side NS record has been applied:
* its names have been added and their addresses can follow later.
* Also true if the delegationpoint was created from a delegation
* message and thus contains the parent-side-info already. */
uint8_t has_parent_side_NS;
/** for assertions on type of delegpt */
uint8_t dp_type_mlc;
};
/**
@@ -87,9 +95,28 @@ struct delegpt_ns {
size_t namelen;
/**
* If the name has been resolved. false if not queried for yet.
* true if the address is known, or marked true if failed.
* true if the A, AAAA queries have been generated.
* marked true if those queries fail.
* and marked true if got4 and got6 are both true.
*/
int resolved;
/** if the ipv4 address is in the delegpt */
uint8_t got4;
/** if the ipv6 address is in the delegpt */
uint8_t got6;
/**
* If the name is parent-side only and thus dispreferred.
* Its addresses become dispreferred as well
*/
uint8_t lame;
/** if the parent-side ipv4 address has been looked up (last resort).
* Also enabled if a parent-side cache entry exists, or a parent-side
* negative-cache entry exists. */
uint8_t done_pside4;
/** if the parent-side ipv6 address has been looked up (last resort).
* Also enabled if a parent-side cache entry exists, or a parent-side
* negative-cache entry exists. */
uint8_t done_pside6;
};
/**
@@ -114,6 +141,8 @@ struct delegpt_addr {
/** if true, the A or AAAA RR was bogus, so this address is bad.
* Also check the dp->bogus to see if everything is bogus. */
int bogus;
/** if true, this address is dispreferred: it is a lame IP address */
int lame;
};
/**
@@ -146,20 +175,22 @@ int delegpt_set_name(struct delegpt* dp, struct regional* regional,
* @param dp: delegation point.
* @param regional: where to allocate the info.
* @param name: domain name in wire format.
* @param lame: name is lame, disprefer it.
* @return false on error.
*/
int delegpt_add_ns(struct delegpt* dp, struct regional* regional,
uint8_t* name);
uint8_t* name, int lame);
/**
* Add NS rrset; calls add_ns repeatedly.
* @param dp: delegation point.
* @param regional: where to allocate the info.
* @param ns_rrset: NS rrset.
* return 0 on alloc error.
* @param lame: rrset is lame, disprefer it.
* @return 0 on alloc error.
*/
int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional,
struct ub_packed_rrset_key* ns_rrset);
struct ub_packed_rrset_key* ns_rrset, int lame);
/**
* Add target address to the delegation point.
@@ -171,41 +202,46 @@ int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional,
* @param addr: the address.
* @param addrlen: the length of addr.
* @param bogus: security status for the address, pass true if bogus.
* @param lame: address is lame.
* @return false on error.
*/
int delegpt_add_target(struct delegpt* dp, struct regional* regional,
uint8_t* name, size_t namelen, struct sockaddr_storage* addr,
socklen_t addrlen, int bogus);
socklen_t addrlen, int bogus, int lame);
/**
* Add A RRset to delegpt.
* @param dp: delegation point.
* @param regional: where to allocate the info.
* @param rrset: RRset A to add.
* @param lame: rrset is lame, disprefer it.
* @return 0 on alloc error.
*/
int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional,
struct ub_packed_rrset_key* rrset);
struct ub_packed_rrset_key* rrset, int lame);
/**
* Add AAAA RRset to delegpt.
* @param dp: delegation point.
* @param regional: where to allocate the info.
* @param rrset: RRset AAAA to add.
* @param lame: rrset is lame, disprefer it.
* @return 0 on alloc error.
*/
int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional,
struct ub_packed_rrset_key* rrset);
struct ub_packed_rrset_key* rrset, int lame);
/**
* Add any RRset to delegpt.
* Does not check for duplicates added.
* @param dp: delegation point.
* @param regional: where to allocate the info.
* @param rrset: RRset to add, NS, A, AAAA.
* @param lame: rrset is lame, disprefer it.
* @return 0 on alloc error.
*/
int delegpt_add_rrset(struct delegpt* dp, struct regional* regional,
struct ub_packed_rrset_key* rrset);
struct ub_packed_rrset_key* rrset, int lame);
/**
* Add address to the delegation point. No servername is associated or checked.
@@ -214,10 +250,11 @@ int delegpt_add_rrset(struct delegpt* dp, struct regional* regional,
* @param addr: the address.
* @param addrlen: the length of addr.
* @param bogus: if address is bogus.
* @param lame: if address is lame.
* @return false on error.
*/
int delegpt_add_addr(struct delegpt* dp, struct regional* regional,
struct sockaddr_storage* addr, socklen_t addrlen, int bogus);
struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame);
/**
* Find NS record in name list of delegation point.
@@ -229,6 +266,16 @@ int delegpt_add_addr(struct delegpt* dp, struct regional* regional,
struct delegpt_ns* delegpt_find_ns(struct delegpt* dp, uint8_t* name,
size_t namelen);
/**
* Find address record in total list of delegation point.
* @param dp: delegation point.
* @param addr: address
* @param addrlen: length of addr
* @return the addr structure or NULL if not found.
*/
struct delegpt_addr* delegpt_find_addr(struct delegpt* dp,
struct sockaddr_storage* addr, socklen_t addrlen);
/**
* Print the delegation point to the log. For debugging.
* @param v: verbosity value that is needed to emit to log.
@@ -256,6 +303,9 @@ void delegpt_add_unused_targets(struct delegpt* dp);
*/
size_t delegpt_count_missing_targets(struct delegpt* dp);
/** count total number of targets in dp */
size_t delegpt_count_targets(struct delegpt* dp);
/**
* Create new delegation point from a dns message
*
@@ -277,4 +327,85 @@ size_t delegpt_count_missing_targets(struct delegpt* dp);
struct delegpt* delegpt_from_message(struct dns_msg* msg,
struct regional* regional);
/**
* Add negative message to delegation point.
* @param dp: delegation point.
* @param msg: the message added, marks off A or AAAA from an NS entry.
*/
void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg);
/**
* Register the fact that there is no ipv6 and thus AAAAs are not going
* to be queried for or be useful.
* @param dp: the delegation point. Updated to reflect no ipv6.
*/
void delegpt_no_ipv6(struct delegpt* dp);
/**
* Register the fact that there is no ipv4 and thus As are not going
* to be queried for or be useful.
* @param dp: the delegation point. Updated to reflect no ipv4.
*/
void delegpt_no_ipv4(struct delegpt* dp);
/**
* create malloced delegation point, with the given name
* @param name: uncompressed wireformat of degegpt name.
* @return NULL on alloc failure
*/
struct delegpt* delegpt_create_mlc(uint8_t* name);
/**
* free malloced delegation point.
* @param dp: must have been created with delegpt_create_mlc, free'd.
*/
void delegpt_free_mlc(struct delegpt* dp);
/**
* Set name of delegation point.
* @param dp: delegation point. malloced.
* @param name: name to use.
* @return false on error.
*/
int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name);
/**
* add a name to malloced delegation point.
* @param dp: must have been created with delegpt_create_mlc.
* @param name: the name to add.
* @param lame: the name is lame, disprefer.
* @return false on error.
*/
int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame);
/**
* add an address to a malloced delegation point.
* @param dp: must have been created with delegpt_create_mlc.
* @param addr: the address.
* @param addrlen: the length of addr.
* @param bogus: if address is bogus.
* @param lame: if address is lame.
* @return false on error.
*/
int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
socklen_t addrlen, int bogus, int lame);
/**
* Add target address to the delegation point.
* @param dp: must have been created with delegpt_create_mlc.
* @param name: name for which target was found (must be in nslist).
* This name is marked resolved.
* @param namelen: length of name.
* @param addr: the address.
* @param addrlen: the length of addr.
* @param bogus: security status for the address, pass true if bogus.
* @param lame: address is lame.
* @return false on error.
*/
int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame);
/** get memory in use by dp */
size_t delegpt_get_mem(struct delegpt* dp);
#endif /* ITERATOR_ITER_DELEGPT_H */
+1 -1
View File
@@ -49,7 +49,7 @@
#include "util/net_help.h"
struct iter_donotq*
donotq_create()
donotq_create(void)
{
struct iter_donotq* dq = (struct iter_donotq*)calloc(1,
sizeof(struct iter_donotq));
+1 -1
View File
@@ -65,7 +65,7 @@ struct iter_donotq {
* Create donotqueryaddresses structure
* @return new structure or NULL on error.
*/
struct iter_donotq* donotq_create();
struct iter_donotq* donotq_create(void);
/**
* Delete donotqueryaddresses structure.
+261 -43
View File
@@ -40,9 +40,11 @@
* Keep track of forward zones and config settings.
*/
#include "config.h"
#include <ldns/rdata.h>
#include <ldns/dname.h>
#include <ldns/rr.h>
#include "iterator/iter_fwd.h"
#include "iterator/iter_delegpt.h"
#include "util/regional.h"
#include "util/log.h"
#include "util/config_file.h"
#include "util/net_help.h"
@@ -64,52 +66,84 @@ fwd_cmp(const void* k1, const void* k2)
}
struct iter_forwards*
forwards_create()
forwards_create(void)
{
struct iter_forwards* fwd = (struct iter_forwards*)calloc(1,
sizeof(struct iter_forwards));
if(!fwd)
return NULL;
fwd->region = regional_create();
if(!fwd->region) {
forwards_delete(fwd);
return NULL;
}
return fwd;
}
static void fwd_zone_free(struct iter_forward_zone* n)
{
if(!n) return;
delegpt_free_mlc(n->dp);
free(n->name);
free(n);
}
static void delfwdnode(rbnode_t* n, void* ATTR_UNUSED(arg))
{
struct iter_forward_zone* node = (struct iter_forward_zone*)n;
fwd_zone_free(node);
}
static void fwd_del_tree(struct iter_forwards* fwd)
{
if(fwd->tree)
traverse_postorder(fwd->tree, &delfwdnode, NULL);
free(fwd->tree);
}
void
forwards_delete(struct iter_forwards* fwd)
{
if(!fwd)
return;
regional_destroy(fwd->region);
free(fwd->tree);
fwd_del_tree(fwd);
free(fwd);
}
/** insert new info into forward structure */
/** insert info into forward structure */
static int
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
size_t nmlen, int nmlabs, struct delegpt* dp)
{
struct iter_forward_zone* node = regional_alloc(fwd->region,
struct iter_forward_zone* node = (struct iter_forward_zone*)malloc(
sizeof(struct iter_forward_zone));
if(!node)
if(!node) {
delegpt_free_mlc(dp);
return 0;
}
node->node.key = node;
node->dclass = c;
node->name = regional_alloc_init(fwd->region, dp->name, dp->namelen);
if(!node->name)
node->name = memdup(nm, nmlen);
if(!node->name) {
delegpt_free_mlc(dp);
free(node);
return 0;
node->namelen = dp->namelen;
node->namelabs = dp->namelabs;
}
node->namelen = nmlen;
node->namelabs = nmlabs;
node->dp = dp;
if(!rbtree_insert(fwd->tree, &node->node)) {
log_err("duplicate forward zone ignored.");
delegpt_free_mlc(dp);
free(node->name);
free(node);
}
return 1;
}
/** insert new info into forward structure given dp */
static int
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
{
return forwards_insert_data(fwd, c, dp->name, dp->namelen,
dp->namelabs, dp);
}
/** initialise parent pointers in the tree */
static void
fwd_init_parents(struct iter_forwards* fwd)
@@ -140,33 +174,32 @@ fwd_init_parents(struct iter_forwards* fwd)
}
/** set zone name */
static int
read_fwds_name(struct iter_forwards* fwd, struct config_stub* s,
struct delegpt* dp)
static struct delegpt*
read_fwds_name(struct config_stub* s)
{
struct delegpt* dp;
ldns_rdf* rdf;
if(!s->name) {
log_err("forward zone without a name (use name \".\" to forward everything)");
return 0;
return NULL;
}
rdf = ldns_dname_new_frm_str(s->name);
if(!rdf) {
log_err("cannot parse forward zone name %s", s->name);
return 0;
return NULL;
}
if(!delegpt_set_name(dp, fwd->region, ldns_rdf_data(rdf))) {
if(!(dp=delegpt_create_mlc(ldns_rdf_data(rdf)))) {
ldns_rdf_deep_free(rdf);
log_err("out of memory");
return 0;
return NULL;
}
ldns_rdf_deep_free(rdf);
return 1;
return dp;
}
/** set fwd host names */
static int
read_fwds_host(struct iter_forwards* fwd, struct config_stub* s,
struct delegpt* dp)
read_fwds_host(struct config_stub* s, struct delegpt* dp)
{
struct config_strlist* p;
ldns_rdf* rdf;
@@ -178,7 +211,7 @@ read_fwds_host(struct iter_forwards* fwd, struct config_stub* s,
s->name, p->str);
return 0;
}
if(!delegpt_add_ns(dp, fwd->region, ldns_rdf_data(rdf))) {
if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0)) {
ldns_rdf_deep_free(rdf);
log_err("out of memory");
return 0;
@@ -190,8 +223,7 @@ read_fwds_host(struct iter_forwards* fwd, struct config_stub* s,
/** set fwd server addresses */
static int
read_fwds_addr(struct iter_forwards* fwd, struct config_stub* s,
struct delegpt* dp)
read_fwds_addr(struct config_stub* s, struct delegpt* dp)
{
struct config_strlist* p;
struct sockaddr_storage addr;
@@ -203,7 +235,7 @@ read_fwds_addr(struct iter_forwards* fwd, struct config_stub* s,
s->name, p->str);
return 0;
}
if(!delegpt_add_addr(dp, fwd->region, &addr, addrlen, 0)) {
if(!delegpt_add_addr_mlc(dp, &addr, addrlen, 0, 0)) {
log_err("out of memory");
return 0;
}
@@ -217,19 +249,80 @@ read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
{
struct config_stub* s;
for(s = cfg->forwards; s; s = s->next) {
struct delegpt* dp = delegpt_create(fwd->region);
if(!dp) {
struct delegpt* dp;
if(!(dp=read_fwds_name(s)))
return 0;
if(!read_fwds_host(s, dp) || !read_fwds_addr(s, dp)) {
delegpt_free_mlc(dp);
return 0;
}
/* set flag that parent side NS information is included.
* Asking a (higher up) server on the internet is not useful */
/* the flag is turned off for 'forward-first' so that the
* last resort will ask for parent-side NS record and thus
* fallback to the internet name servers on a failure */
dp->has_parent_side_NS = (uint8_t)!s->isfirst;
verbose(VERB_QUERY, "Forward zone server list:");
delegpt_log(VERB_QUERY, dp);
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
return 0;
}
return 1;
}
/** see if zone needs to have a hole inserted */
static int
need_hole_insert(rbtree_t* tree, struct iter_forward_zone* zone)
{
struct iter_forward_zone k;
if(rbtree_search(tree, zone))
return 0; /* exact match exists */
k = *zone;
k.node.key = &k;
/* search up the tree */
do {
dname_remove_label(&k.name, &k.namelen);
k.namelabs --;
if(rbtree_search(tree, &k))
return 1; /* found an upper forward zone, need hole */
} while(k.namelabs > 1);
return 0; /* no forwards above, no holes needed */
}
/** insert a stub hole (if necessary) for stub name */
static int
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
{
struct iter_forward_zone key;
key.node.key = &key;
key.dclass = c;
key.name = nm;
key.namelabs = dname_count_size_labels(key.name, &key.namelen);
if(need_hole_insert(fwd->tree, &key)) {
return forwards_insert_data(fwd, key.dclass, key.name,
key.namelen, key.namelabs, NULL);
}
return 1;
}
/** make NULL entries for stubs */
static int
make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
{
struct config_stub* s;
for(s = cfg->stubs; s; s = s->next) {
ldns_rdf* rdf = ldns_dname_new_frm_str(s->name);
if(!rdf) {
log_err("cannot parse stub name '%s'", s->name);
return 0;
}
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN,
ldns_rdf_data(rdf))) {
ldns_rdf_deep_free(rdf);
log_err("out of memory");
return 0;
}
if(!read_fwds_name(fwd, s, dp) ||
!read_fwds_host(fwd, s, dp) ||
!read_fwds_addr(fwd, s, dp))
return 0;
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
return 0;
verbose(VERB_QUERY, "Forward zone server list:");
delegpt_log(VERB_QUERY, dp);
ldns_rdf_deep_free(rdf);
}
return 1;
}
@@ -237,7 +330,7 @@ read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
int
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
{
free(fwd->tree);
fwd_del_tree(fwd);
fwd->tree = rbtree_create(fwd_cmp);
if(!fwd->tree)
return 0;
@@ -245,6 +338,8 @@ forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
/* read forward zones */
if(!read_forwards(fwd, cfg))
return 0;
if(!make_stub_holes(fwd, cfg))
return 0;
fwd_init_parents(fwd);
return 1;
}
@@ -283,10 +378,133 @@ forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
return NULL;
}
struct delegpt*
forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass)
{
uint8_t root = 0;
return forwards_lookup(fwd, &root, qclass);
}
int
forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass)
{
struct iter_forward_zone key;
rbnode_t* n;
struct iter_forward_zone* p;
if(*dclass == 0) {
/* first root item is first item in tree */
n = rbtree_first(fwd->tree);
if(n == RBTREE_NULL)
return 0;
p = (struct iter_forward_zone*)n;
if(dname_is_root(p->name)) {
*dclass = p->dclass;
return 1;
}
/* root not first item? search for higher items */
*dclass = p->dclass + 1;
return forwards_next_root(fwd, dclass);
}
/* find class n in tree, we may get a direct hit, or if we don't
* this is the last item of the previous class so rbtree_next() takes
* us to the next root (if any) */
key.node.key = &key;
key.name = (uint8_t*)"\000";
key.namelen = 1;
key.namelabs = 0;
key.dclass = *dclass;
n = NULL;
if(rbtree_find_less_equal(fwd->tree, &key, &n)) {
/* exact */
return 1;
} else {
/* smaller element */
if(!n || n == RBTREE_NULL)
return 0; /* nothing found */
n = rbtree_next(n);
if(n == RBTREE_NULL)
return 0; /* no higher */
p = (struct iter_forward_zone*)n;
if(dname_is_root(p->name)) {
*dclass = p->dclass;
return 1;
}
/* not a root node, return next higher item */
*dclass = p->dclass+1;
return forwards_next_root(fwd, dclass);
}
}
size_t
forwards_get_mem(struct iter_forwards* fwd)
{
struct iter_forward_zone* p;
size_t s;
if(!fwd)
return 0;
return sizeof(*fwd) + regional_get_mem(fwd->region);
s = sizeof(*fwd) + sizeof(*fwd->tree);
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
s += sizeof(*p) + p->namelen + delegpt_get_mem(p->dp);
}
return s;
}
static struct iter_forward_zone*
fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
{
struct iter_forward_zone key;
key.node.key = &key;
key.dclass = c;
key.name = nm;
key.namelabs = dname_count_size_labels(nm, &key.namelen);
return (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
}
int
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
{
struct iter_forward_zone *z;
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
}
if(!forwards_insert(fwd, c, dp))
return 0;
fwd_init_parents(fwd);
return 1;
}
void
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
{
struct iter_forward_zone *z;
if(!(z=fwd_zone_find(fwd, c, nm)))
return; /* nothing to do */
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
fwd_init_parents(fwd);
}
int
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
{
if(!fwd_add_stub_hole(fwd, c, nm)) {
return 0;
}
fwd_init_parents(fwd);
return 1;
}
void
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
{
struct iter_forward_zone *z;
if(!(z=fwd_zone_find(fwd, c, nm)))
return; /* nothing to do */
if(z->dp != NULL)
return; /* not a stub hole */
(void)rbtree_delete(fwd->tree, &z->node);
fwd_zone_free(z);
fwd_init_parents(fwd);
}
+65 -7
View File
@@ -43,20 +43,16 @@
#ifndef ITERATOR_ITER_FWD_H
#define ITERATOR_ITER_FWD_H
#include "util/rbtree.h"
struct iter_env;
struct config_file;
struct delegpt;
struct regional;
/**
* Iterator forward zones structure
*/
struct iter_forwards {
/** regional where forward zone server addresses are allocated */
struct regional* region;
/**
* Zones are stored in this tree. Sort order is specially chosen.
* first sorted on qtype. Then on dname in nsec-like order, so that
* first sorted on qclass. Then on dname in nsec-like order, so that
* a lookup on class, name will return an exact match or the closest
* match which gives the ancestor needed.
* contents of type iter_forward_zone.
@@ -76,7 +72,11 @@ struct iter_forward_zone {
size_t namelen;
/** number of labels in name */
int namelabs;
/** delegation point with forward server information for this zone. */
/** delegation point with forward server information for this zone.
* If NULL then this forward entry is used to indicate that a
* stub-zone with the same name exists, and should be used.
* This delegation point is malloced.
*/
struct delegpt* dp;
/** pointer to parent in tree (or NULL if none) */
struct iter_forward_zone* parent;
@@ -88,7 +88,7 @@ struct iter_forward_zone {
* Create forwards
* @return new forwards or NULL on error.
*/
struct iter_forwards* forwards_create();
struct iter_forwards* forwards_create(void);
/**
* Delete forwards.
@@ -118,6 +118,23 @@ int forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg);
struct delegpt* forwards_lookup(struct iter_forwards* fwd,
uint8_t* qname, uint16_t qclass);
/**
* Same as forwards_lookup, but for the root only
* @param fwd: forward storage.
* @param qclass: The qclass of the query.
* @return: A delegation point if root forward exists, otherwise null.
*/
struct delegpt* forwards_lookup_root(struct iter_forwards* fwd,
uint16_t qclass);
/**
* Find next root item in forwards lookup tree.
* @param fwd: the forward storage
* @param qclass: class to look at next, or higher.
* @return false if none found, or if true stored in qclass.
*/
int forwards_next_root(struct iter_forwards* fwd, uint16_t* qclass);
/**
* Get memory in use by forward storage
* @param fwd: forward storage.
@@ -128,4 +145,45 @@ size_t forwards_get_mem(struct iter_forwards* fwd);
/** compare two fwd entries */
int fwd_cmp(const void* k1, const void* k2);
/**
* Add zone to forward structure. For external use since it recalcs
* the tree parents.
* @param fwd: the forward data structure
* @param c: class of zone
* @param dp: delegation point with name and target nameservers for new
* forward zone. malloced.
* @return false on failure (out of memory);
*/
int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
struct delegpt* dp);
/**
* Remove zone from forward structure. For external use since it
* recalcs the tree parents.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
*/
void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
/**
* Add stub hole (empty entry in forward table, that makes resolution skip
* a forward-zone because the stub zone should override the forward zone).
* Does not add one if not necessary.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
* @return false on failure (out of memory);
*/
int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
/**
* Remove stub hole, if one exists.
* @param fwd: the forward data structure
* @param c: class of zone
* @param nm: name of zone (in uncompressed wireformat).
*/
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
uint8_t* nm);
#endif /* ITERATOR_ITER_FWD_H */
+148 -77
View File
@@ -40,41 +40,55 @@
* Keep track of stub and root hints, and read those from config.
*/
#include "config.h"
#include <ldns/dname.h>
#include <ldns/rr.h>
#include "iterator/iter_hints.h"
#include "iterator/iter_delegpt.h"
#include "util/regional.h"
#include "util/log.h"
#include "util/config_file.h"
#include "util/net_help.h"
#include "util/data/dname.h"
struct iter_hints*
hints_create()
hints_create(void)
{
struct iter_hints* hints = (struct iter_hints*)calloc(1,
sizeof(struct iter_hints));
if(!hints)
return NULL;
hints->region = regional_create();
if(!hints->region) {
hints_delete(hints);
return NULL;
}
return hints;
}
static void hints_stub_free(struct iter_hints_stub* s)
{
if(!s) return;
delegpt_free_mlc(s->dp);
free(s);
}
static void delhintnode(rbnode_t* n, void* ATTR_UNUSED(arg))
{
struct iter_hints_stub* node = (struct iter_hints_stub*)n;
hints_stub_free(node);
}
static void hints_del_tree(struct iter_hints* hints)
{
traverse_postorder(&hints->tree, &delhintnode, NULL);
}
void
hints_delete(struct iter_hints* hints)
{
if(!hints)
return;
regional_destroy(hints->region);
hints_del_tree(hints);
free(hints);
}
/** add hint to delegation hints */
static int
ah(struct delegpt* dp, struct regional* r, const char* sv, const char* ip)
ah(struct delegpt* dp, const char* sv, const char* ip)
{
struct sockaddr_storage addr;
socklen_t addrlen;
@@ -83,10 +97,10 @@ ah(struct delegpt* dp, struct regional* r, const char* sv, const char* ip)
log_err("could not parse %s", sv);
return 0;
}
if(!delegpt_add_ns(dp, r, ldns_rdf_data(rdf)) ||
if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0) ||
!extstrtoaddr(ip, &addr, &addrlen) ||
!delegpt_add_target(dp, r, ldns_rdf_data(rdf), ldns_rdf_size(rdf),
&addr, addrlen, 0)) {
!delegpt_add_target_mlc(dp, ldns_rdf_data(rdf), ldns_rdf_size(rdf),
&addr, addrlen, 0, 0)) {
ldns_rdf_deep_free(rdf);
return 0;
}
@@ -96,7 +110,7 @@ ah(struct delegpt* dp, struct regional* r, const char* sv, const char* ip)
/** obtain compiletime provided root hints */
static struct delegpt*
compile_time_root_prime(struct regional* r, int do_ip4, int do_ip6)
compile_time_root_prime(int do_ip4, int do_ip6)
{
/* from:
; This file is made available by InterNIC
@@ -105,37 +119,42 @@ compile_time_root_prime(struct regional* r, int do_ip4, int do_ip6)
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; related version of root zone: 2008051300
; related version of root zone: 2010061700
*/
struct delegpt* dp = delegpt_create(r);
struct delegpt* dp = delegpt_create_mlc((uint8_t*)"\000");
if(!dp)
return NULL;
if(!delegpt_set_name(dp, r, (uint8_t*)"\000"))
return NULL;
dp->has_parent_side_NS = 1;
if(do_ip4) {
if(!ah(dp, r, "A.ROOT-SERVERS.NET.", "198.41.0.4")) return 0;
if(!ah(dp, r, "B.ROOT-SERVERS.NET.", "192.228.79.201")) return 0;
if(!ah(dp, r, "C.ROOT-SERVERS.NET.", "192.33.4.12")) return 0;
if(!ah(dp, r, "D.ROOT-SERVERS.NET.", "128.8.10.90")) return 0;
if(!ah(dp, r, "E.ROOT-SERVERS.NET.", "192.203.230.10")) return 0;
if(!ah(dp, r, "F.ROOT-SERVERS.NET.", "192.5.5.241")) return 0;
if(!ah(dp, r, "G.ROOT-SERVERS.NET.", "192.112.36.4")) return 0;
if(!ah(dp, r, "H.ROOT-SERVERS.NET.", "128.63.2.53")) return 0;
if(!ah(dp, r, "I.ROOT-SERVERS.NET.", "192.36.148.17")) return 0;
if(!ah(dp, r, "J.ROOT-SERVERS.NET.", "192.58.128.30")) return 0;
if(!ah(dp, r, "K.ROOT-SERVERS.NET.", "193.0.14.129")) return 0;
if(!ah(dp, r, "L.ROOT-SERVERS.NET.", "199.7.83.42")) return 0;
if(!ah(dp, r, "M.ROOT-SERVERS.NET.", "202.12.27.33")) return 0;
if(!ah(dp, "A.ROOT-SERVERS.NET.", "198.41.0.4")) goto failed;
if(!ah(dp, "B.ROOT-SERVERS.NET.", "192.228.79.201")) goto failed;
if(!ah(dp, "C.ROOT-SERVERS.NET.", "192.33.4.12")) goto failed;
if(!ah(dp, "D.ROOT-SERVERS.NET.", "128.8.10.90")) goto failed;
if(!ah(dp, "E.ROOT-SERVERS.NET.", "192.203.230.10")) goto failed;
if(!ah(dp, "F.ROOT-SERVERS.NET.", "192.5.5.241")) goto failed;
if(!ah(dp, "G.ROOT-SERVERS.NET.", "192.112.36.4")) goto failed;
if(!ah(dp, "H.ROOT-SERVERS.NET.", "128.63.2.53")) goto failed;
if(!ah(dp, "I.ROOT-SERVERS.NET.", "192.36.148.17")) goto failed;
if(!ah(dp, "J.ROOT-SERVERS.NET.", "192.58.128.30")) goto failed;
if(!ah(dp, "K.ROOT-SERVERS.NET.", "193.0.14.129")) goto failed;
if(!ah(dp, "L.ROOT-SERVERS.NET.", "199.7.83.42")) goto failed;
if(!ah(dp, "M.ROOT-SERVERS.NET.", "202.12.27.33")) goto failed;
}
if(do_ip6) {
if(!ah(dp, r, "A.ROOT-SERVERS.NET.", "2001:503:ba3e::2:30")) return 0;
if(!ah(dp, r, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) return 0;
if(!ah(dp, r, "H.ROOT-SERVERS.NET.", "2001:500:1::803f:235")) return 0;
if(!ah(dp, r, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) return 0;
if(!ah(dp, r, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) return 0;
if(!ah(dp, r, "M.ROOT-SERVERS.NET.", "2001:dc3::35")) return 0;
if(!ah(dp, "A.ROOT-SERVERS.NET.", "2001:503:ba3e::2:30")) goto failed;
if(!ah(dp, "D.ROOT-SERVERS.NET.", "2001:500:2d::d")) goto failed;
if(!ah(dp, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) goto failed;
if(!ah(dp, "H.ROOT-SERVERS.NET.", "2001:500:1::803f:235")) goto failed;
if(!ah(dp, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) goto failed;
if(!ah(dp, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) goto failed;
if(!ah(dp, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) goto failed;
if(!ah(dp, "L.ROOT-SERVERS.NET.", "2001:500:3::42")) goto failed;
if(!ah(dp, "M.ROOT-SERVERS.NET.", "2001:dc3::35")) goto failed;
}
return dp;
failed:
delegpt_free_mlc(dp);
return 0;
}
/** insert new hint info into hint structure */
@@ -143,51 +162,50 @@ static int
hints_insert(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
int noprime)
{
struct iter_hints_stub* node = regional_alloc(hints->region,
struct iter_hints_stub* node = (struct iter_hints_stub*)malloc(
sizeof(struct iter_hints_stub));
uint8_t* nm;
if(!node)
return 0;
nm = regional_alloc_init(hints->region, dp->name, dp->namelen);
if(!nm)
if(!node) {
delegpt_free_mlc(dp);
return 0;
}
node->dp = dp;
node->noprime = (uint8_t)noprime;
if(!name_tree_insert(&hints->tree, &node->node, nm, dp->namelen,
if(!name_tree_insert(&hints->tree, &node->node, dp->name, dp->namelen,
dp->namelabs, c)) {
log_err("second hints ignored.");
delegpt_free_mlc(dp);
free(node);
}
return 1;
}
/** set stub name */
static int
read_stubs_name(struct iter_hints* hints, struct config_stub* s,
struct delegpt* dp)
static struct delegpt*
read_stubs_name(struct config_stub* s)
{
struct delegpt* dp;
ldns_rdf* rdf;
if(!s->name) {
log_err("stub zone without a name");
return 0;
return NULL;
}
rdf = ldns_dname_new_frm_str(s->name);
if(!rdf) {
log_err("cannot parse stub zone name %s", s->name);
return 0;
return NULL;
}
if(!delegpt_set_name(dp, hints->region, ldns_rdf_data(rdf))) {
if(!(dp=delegpt_create_mlc(ldns_rdf_data(rdf)))) {
ldns_rdf_deep_free(rdf);
log_err("out of memory");
return 0;
return NULL;
}
ldns_rdf_deep_free(rdf);
return 1;
return dp;
}
/** set stub host names */
static int
read_stubs_host(struct iter_hints* hints, struct config_stub* s,
struct delegpt* dp)
read_stubs_host(struct config_stub* s, struct delegpt* dp)
{
struct config_strlist* p;
ldns_rdf* rdf;
@@ -199,7 +217,7 @@ read_stubs_host(struct iter_hints* hints, struct config_stub* s,
s->name, p->str);
return 0;
}
if(!delegpt_add_ns(dp, hints->region, ldns_rdf_data(rdf))) {
if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0)) {
ldns_rdf_deep_free(rdf);
log_err("out of memory");
return 0;
@@ -211,8 +229,7 @@ read_stubs_host(struct iter_hints* hints, struct config_stub* s,
/** set stub server addresses */
static int
read_stubs_addr(struct iter_hints* hints, struct config_stub* s,
struct delegpt* dp)
read_stubs_addr(struct config_stub* s, struct delegpt* dp)
{
struct config_strlist* p;
struct sockaddr_storage addr;
@@ -224,7 +241,7 @@ read_stubs_addr(struct iter_hints* hints, struct config_stub* s,
s->name, p->str);
return 0;
}
if(!delegpt_add_addr(dp, hints->region, &addr, addrlen, 0)) {
if(!delegpt_add_addr_mlc(dp, &addr, addrlen, 0, 0)) {
log_err("out of memory");
return 0;
}
@@ -237,19 +254,21 @@ static int
read_stubs(struct iter_hints* hints, struct config_file* cfg)
{
struct config_stub* s;
struct delegpt* dp;
for(s = cfg->stubs; s; s = s->next) {
struct delegpt* dp = delegpt_create(hints->region);
if(!dp) {
log_err("out of memory");
if(!(dp=read_stubs_name(s)))
return 0;
if(!read_stubs_host(s, dp) || !read_stubs_addr(s, dp)) {
delegpt_free_mlc(dp);
return 0;
}
if(!read_stubs_name(hints, s, dp) ||
!read_stubs_host(hints, s, dp) ||
!read_stubs_addr(hints, s, dp))
return 0;
/* the flag is turned off for 'stub-first' so that the
* last resort will ask for parent-side NS record and thus
* fallback to the internet name servers on a failure */
dp->has_parent_side_NS = (uint8_t)!s->isfirst;
delegpt_log(VERB_QUERY, dp);
if(!hints_insert(hints, LDNS_RR_CLASS_IN, dp, !s->isprime))
return 0;
delegpt_log(VERB_QUERY, dp);
}
return 1;
}
@@ -272,13 +291,14 @@ read_root_hints(struct iter_hints* hints, char* fname)
fname, strerror(errno));
return 0;
}
dp = delegpt_create(hints->region);
dp = delegpt_create_mlc(NULL);
if(!dp) {
log_err("out of memory reading root hints");
fclose(f);
return 0;
}
verbose(VERB_QUERY, "Reading root hints from %s", fname);
dp->has_parent_side_NS = 1;
while(!feof(f)) {
status = ldns_rr_new_frm_fp_l(&rr, f,
&default_ttl, &origin, &prev_rr, &lineno);
@@ -292,14 +312,14 @@ read_root_hints(struct iter_hints* hints, char* fname)
goto stop_read;
}
if(ldns_rr_get_type(rr) == LDNS_RR_TYPE_NS) {
if(!delegpt_add_ns(dp, hints->region,
ldns_rdf_data(ldns_rr_rdf(rr, 0)))) {
if(!delegpt_add_ns_mlc(dp,
ldns_rdf_data(ldns_rr_rdf(rr, 0)), 0)) {
log_err("out of memory reading root hints");
goto stop_read;
}
c = ldns_rr_get_class(rr);
if(!dp->name) {
if(!delegpt_set_name(dp, hints->region,
if(!delegpt_set_name_mlc(dp,
ldns_rdf_data(ldns_rr_owner(rr)))){
log_err("out of memory.");
goto stop_read;
@@ -313,11 +333,11 @@ read_root_hints(struct iter_hints* hints, char* fname)
sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
memmove(&sa.sin_addr,
ldns_rdf_data(ldns_rr_rdf(rr, 0)), INET_SIZE);
if(!delegpt_add_target(dp, hints->region,
if(!delegpt_add_target_mlc(dp,
ldns_rdf_data(ldns_rr_owner(rr)),
ldns_rdf_size(ldns_rr_owner(rr)),
(struct sockaddr_storage*)&sa, len,
0)) {
0, 0)) {
log_err("out of memory reading root hints");
goto stop_read;
}
@@ -329,11 +349,11 @@ read_root_hints(struct iter_hints* hints, char* fname)
sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
memmove(&sa.sin6_addr,
ldns_rdf_data(ldns_rr_rdf(rr, 0)), INET6_SIZE);
if(!delegpt_add_target(dp, hints->region,
if(!delegpt_add_target_mlc(dp,
ldns_rdf_data(ldns_rr_owner(rr)),
ldns_rdf_size(ldns_rr_owner(rr)),
(struct sockaddr_storage*)&sa, len,
0)) {
0, 0)) {
log_err("out of memory reading root hints");
goto stop_read;
}
@@ -352,6 +372,7 @@ read_root_hints(struct iter_hints* hints, char* fname)
fclose(f);
if(!dp->name) {
log_warn("root hints %s: no NS content", fname);
delegpt_free_mlc(dp);
return 1;
}
if(!hints_insert(hints, c, dp, 0)) {
@@ -365,6 +386,7 @@ stop_read:
ldns_rdf_deep_free(origin);
if (prev_rr)
ldns_rdf_deep_free(prev_rr);
delegpt_free_mlc(dp);
fclose(f);
return 0;
}
@@ -392,7 +414,7 @@ read_root_hints_list(struct iter_hints* hints, struct config_file* cfg)
int
hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg)
{
regional_free_all(hints->region);
hints_del_tree(hints);
name_tree_init(&hints->tree);
/* read root hints */
@@ -405,8 +427,8 @@ hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg)
/* use fallback compiletime root hints */
if(!hints_lookup_root(hints, LDNS_RR_CLASS_IN)) {
struct delegpt* dp = compile_time_root_prime(hints->region,
cfg->do_ip4, cfg->do_ip6);
struct delegpt* dp = compile_time_root_prime(cfg->do_ip4,
cfg->do_ip6);
verbose(VERB_ALGO, "no config, using builtin root hints.");
if(!dp)
return 0;
@@ -444,6 +466,13 @@ hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
len, labs, qclass);
if(!r) return NULL;
/* If there is no cache (root prime situation) */
if(cache_dp == NULL) {
if(r->dp->namelabs != 1)
return r; /* no cache dp, use any non-root stub */
return NULL;
}
/*
* If the stub is same as the delegation we got
* And has noprime set, we need to 'prime' to use this stub instead.
@@ -460,9 +489,51 @@ hints_lookup_stub(struct iter_hints* hints, uint8_t* qname,
return NULL;
}
int hints_next_root(struct iter_hints* hints, uint16_t* qclass)
{
return name_tree_next_root(&hints->tree, qclass);
}
size_t
hints_get_mem(struct iter_hints* hints)
{
size_t s;
struct iter_hints_stub* p;
if(!hints) return 0;
return sizeof(*hints) + regional_get_mem(hints->region);
s = sizeof(*hints);
RBTREE_FOR(p, struct iter_hints_stub*, &hints->tree) {
s += sizeof(*p) + delegpt_get_mem(p->dp);
}
return s;
}
int
hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
int noprime)
{
struct iter_hints_stub *z;
if((z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
dp->name, dp->namelen, dp->namelabs, c)) != NULL) {
(void)rbtree_delete(&hints->tree, &z->node);
hints_stub_free(z);
}
if(!hints_insert(hints, c, dp, noprime))
return 0;
name_tree_init_parents(&hints->tree);
return 1;
}
void
hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm)
{
struct iter_hints_stub *z;
size_t len;
int labs = dname_count_size_labels(nm, &len);
if(!(z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
nm, len, labs, c)))
return; /* nothing to do */
(void)rbtree_delete(&hints->tree, &z->node);
hints_stub_free(z);
name_tree_init_parents(&hints->tree);
}
+37 -6
View File
@@ -46,17 +46,14 @@
struct iter_env;
struct config_file;
struct delegpt;
struct regional;
/**
* Iterator hints structure
*/
struct iter_hints {
/** regional where hints are allocated */
struct regional* region;
/**
* Hints are stored in this tree. Sort order is specially chosen.
* first sorted on qtype. Then on dname in nsec-like order, so that
* first sorted on qclass. Then on dname in nsec-like order, so that
* a lookup on class, name will return an exact match or the closest
* match which gives the ancestor needed.
* contents of type iter_hints_stub. The class IN root is in here.
@@ -71,7 +68,7 @@ struct iter_hints {
struct iter_hints_stub {
/** tree sorted by name, class */
struct name_tree_node node;
/** delegation point with hint information for this stub. */
/** delegation point with hint information for this stub. malloced. */
struct delegpt* dp;
/** does the stub need to forego priming (like on other ports) */
uint8_t noprime;
@@ -81,7 +78,7 @@ struct iter_hints_stub {
* Create hints
* @return new hints or NULL on error.
*/
struct iter_hints* hints_create();
struct iter_hints* hints_create(void);
/**
* Delete hints.
@@ -105,6 +102,18 @@ int hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg);
*/
struct delegpt* hints_lookup_root(struct iter_hints* hints, uint16_t qclass);
/**
* Find next root hints (to cycle through all root hints).
* @param hints: hint storage
* @param qclass: class for which root hints are sought.
* 0 means give the first available root hints class.
* x means, give class x or a higher class if any.
* returns the found class in this variable.
* @return true if a root hint class is found.
* false if not root hint class is found (qclass may have been changed).
*/
int hints_next_root(struct iter_hints* hints, uint16_t* qclass);
/**
* Given a qname/qclass combination, and the delegation point from the cache
* for this qname/qclass, determine if this combination indicates that a
@@ -127,4 +136,26 @@ struct iter_hints_stub* hints_lookup_stub(struct iter_hints* hints,
*/
size_t hints_get_mem(struct iter_hints* hints);
/**
* Add stub to hints structure. For external use since it recalcs
* the tree parents.
* @param hints: the hints data structure
* @param c: class of zone
* @param dp: delegation point with name and target nameservers for new
* hints stub. malloced.
* @param noprime: set noprime option to true or false on new hint stub.
* @return false on failure (out of memory);
*/
int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
int noprime);
/**
* Remove stub from hints structure. For external use since it
* recalcs the tree parents.
* @param hints: the hints data structure
* @param c: class of stub zone
* @param nm: name of stub zone (in uncompressed wireformat).
*/
void hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm);
#endif /* ITERATOR_ITER_HINTS_H */
+23 -15
View File
@@ -41,6 +41,7 @@
*/
#include "config.h"
#include <ldns/dname.h>
#include "iterator/iter_priv.h"
#include "util/regional.h"
#include "util/log.h"
@@ -50,7 +51,7 @@
#include "util/net_help.h"
#include "util/storage/dnstree.h"
struct iter_priv* priv_create()
struct iter_priv* priv_create(void)
{
struct iter_priv* priv = (struct iter_priv*)calloc(1, sizeof(*priv));
if(!priv)
@@ -210,43 +211,50 @@ size_t priv_get_mem(struct iter_priv* priv)
int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt,
struct rrset_parse* rrset)
{
if(priv->a.count == 0)
return 0; /* there are no blocked addresses */
/* see if it is a private name, that is allowed to have any */
if(priv_lookup_name(priv, pkt, rrset->dname, rrset->dname_len,
ntohs(rrset->rrset_class))) {
return 0;
} else {
/* so its a public name, check the address */
struct sockaddr_storage addr;
socklen_t len;
struct rr_parse* rr;
if(rrset->type == LDNS_RR_TYPE_A) {
struct sockaddr_in* sa = (struct sockaddr_in*)&addr;
len = (socklen_t)sizeof(*sa);
memset(sa, 0, len);
sa->sin_family = AF_INET;
sa->sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
struct sockaddr_storage addr;
struct sockaddr_in sa;
len = (socklen_t)sizeof(sa);
memset(&sa, 0, len);
sa.sin_family = AF_INET;
sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
for(rr = rrset->rr_first; rr; rr = rr->next) {
if(ldns_read_uint16(rr->ttl_data+4)
!= INET_SIZE)
continue;
memmove(&sa->sin_addr, rr->ttl_data+4+2,
memmove(&sa.sin_addr, rr->ttl_data+4+2,
INET_SIZE);
memmove(&addr, &sa, len);
if(priv_lookup_addr(priv, &addr, len))
return 1;
}
} else if(rrset->type == LDNS_RR_TYPE_AAAA) {
struct sockaddr_in6* sa = (struct sockaddr_in6*)&addr;
len = (socklen_t)sizeof(*sa);
memset(sa, 0, len);
sa->sin6_family = AF_INET6;
sa->sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
struct sockaddr_storage addr;
struct sockaddr_in6 sa;
len = (socklen_t)sizeof(sa);
memset(&sa, 0, len);
sa.sin6_family = AF_INET6;
sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
for(rr = rrset->rr_first; rr; rr = rr->next) {
if(ldns_read_uint16(rr->ttl_data+4)
!= INET6_SIZE)
continue;
memmove(&sa->sin6_addr, rr->ttl_data+4+2,
memmove(&sa.sin6_addr, rr->ttl_data+4+2,
INET6_SIZE);
if(priv_lookup_addr(priv, &addr, len))
memmove(&addr, &sa, len);
if(priv_lookup_addr(priv, &addr, len))
return 1;
}
}
+2 -1
View File
@@ -43,6 +43,7 @@
#ifndef ITERATOR_ITER_PRIV_H
#define ITERATOR_ITER_PRIV_H
#include "util/rbtree.h"
#include <ldns/buffer.h>
struct iter_env;
struct config_file;
struct regional;
@@ -73,7 +74,7 @@ struct iter_priv {
* Create priv structure
* @return new structure or NULL on error.
*/
struct iter_priv* priv_create();
struct iter_priv* priv_create(void);
/**
* Delete priv structure.
+26 -4
View File
@@ -40,6 +40,7 @@
* one of the response types.
*/
#include "config.h"
#include <ldns/packet.h>
#include "iterator/iter_resptype.h"
#include "iterator/iter_delegpt.h"
#include "services/cache/dns.h"
@@ -53,6 +54,8 @@ response_type_from_cache(struct dns_msg* msg,
/* If the message is NXDOMAIN, then it is an ANSWER. */
if(FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NXDOMAIN)
return RESPONSE_TYPE_ANSWER;
if(request->qtype == LDNS_RR_TYPE_ANY)
return RESPONSE_TYPE_ANSWER;
/* First we look at the answer section. This can tell us if this is
* CNAME or positive ANSWER. */
@@ -105,7 +108,6 @@ response_type_from_server(int rdset,
{
uint8_t* origzone = (uint8_t*)"\000"; /* the default */
struct ub_packed_rrset_key* s;
size_t origzonelen = 1;
size_t i;
if(!msg || !request)
@@ -117,6 +119,15 @@ response_type_from_server(int rdset,
if( (msg->rep->flags&BIT_RA) &&
!(msg->rep->flags&BIT_AA) && !rdset)
return RESPONSE_TYPE_REC_LAME;
/* it could be a CNAME with NXDOMAIN rcode */
for(i=0; i<msg->rep->an_numrrsets; i++) {
s = msg->rep->rrsets[i];
if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME &&
query_dname_compare(request->qname,
s->rk.dname) == 0) {
return RESPONSE_TYPE_CNAME;
}
}
return RESPONSE_TYPE_ANSWER;
}
@@ -129,7 +140,6 @@ response_type_from_server(int rdset,
if(dp) {
origzone = dp->name;
origzonelen = dp->namelen;
}
/* First we look at the answer section. This can tell us if this is a
@@ -142,7 +152,7 @@ response_type_from_server(int rdset,
* answer is there directly, our answer is there after
* a cname, or there is just a cname. */
for(i=0; i<msg->rep->an_numrrsets; i++) {
struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
s = msg->rep->rrsets[i];
/* if the answer section has NS rrset, and qtype ANY
* and the delegation is lower, and no CNAMEs followed,
@@ -153,6 +163,8 @@ response_type_from_server(int rdset,
ntohs(s->rk.rrset_class) == request->qclass &&
dname_strict_subdomain_c(s->rk.dname,
origzone)) {
if((msg->rep->flags&BIT_AA))
return RESPONSE_TYPE_ANSWER;
return RESPONSE_TYPE_REFERRAL;
}
@@ -180,6 +192,9 @@ response_type_from_server(int rdset,
get_cname_target(s, &mname, &mname_len);
}
}
/* not a referral, and qtype any, thus an answer */
if(request->qtype == LDNS_RR_TYPE_ANY)
return RESPONSE_TYPE_ANSWER;
/* if we encountered a CNAME (or a bunch of CNAMEs), and
* still got to here, then it is a CNAME response.
* (This is regardless of the AA bit at this point) */
@@ -226,14 +241,21 @@ response_type_from_server(int rdset,
/* Or if a lame server is deployed,
* which gives ns==zone delegation from cache
* without AA bit as well, with nodata nosoa*/
/* real answer must be +AA and SOA RFC(2308),
* so this is wrong, and we SERVFAIL it if
* this is the only possible reply, if it
* is misdeployed the THROWAWAY makes us pick
* the next server from the selection */
if(msg->rep->an_numrrsets==0 &&
!(msg->rep->flags&BIT_AA) && !rdset)
return RESPONSE_TYPE_REC_LAME;
return RESPONSE_TYPE_THROWAWAY;
return RESPONSE_TYPE_ANSWER;
}
/* If we are getting a referral upwards (or to
* the same zone), then the server is 'lame'. */
if(dname_subdomain_c(origzone, s->rk.dname)) {
if(rdset) /* forward or reclame not LAME */
return RESPONSE_TYPE_THROWAWAY;
return RESPONSE_TYPE_LAME;
}
/* If the NS set is below the delegation point we
+62 -17
View File
@@ -101,8 +101,6 @@ has_additional(uint16_t t)
case LDNS_RR_TYPE_NAPTR:
/* TODO: NAPTR not supported, glue stripped off */
return 0;
default:
return 0;
}
return 0;
}
@@ -189,11 +187,14 @@ parse_get_cname_target(struct rrset_parse* rrset, uint8_t** sname,
size_t* snamelen)
{
if(rrset->rr_count != 1) {
struct rr_parse* sig;
verbose(VERB_ALGO, "Found CNAME rrset with "
"size > 1: %u", (unsigned)rrset->rr_count);
/* use the first CNAME! */
rrset->rr_count = 1;
rrset->size = rrset->rr_first->size;
for(sig=rrset->rrsig_first; sig; sig=sig->next)
rrset->size += sig->size;
rrset->rr_last = rrset->rr_first;
rrset->rr_first->next = NULL;
}
@@ -305,6 +306,15 @@ pkt_sub(ldns_buffer* pkt, uint8_t* comprname, uint8_t* zone)
return dname_subdomain_c(buf, zone);
}
/** check subdomain with decompression, compressed is parent */
static int
sub_of_pkt(ldns_buffer* pkt, uint8_t* zone, uint8_t* comprname)
{
uint8_t buf[LDNS_MAX_DOMAINLEN+1];
dname_pkt_copy(pkt, buf, comprname);
return dname_subdomain_c(zone, buf);
}
/**
* This routine normalizes a response. This includes removing "irrelevant"
* records from the answer and additional sections and (re)synthesizing
@@ -356,10 +366,6 @@ scrub_normalize(ldns_buffer* pkt, struct msg_parse* msg,
"too long");
return 0;
}
/* internally we have CNAME'd/DNAME'd chains ending
* in nxdomain with NOERROR rcode, change rcode
* to reflect this (if needed) */
FLAGS_SET_RCODE(msg->flags, LDNS_RCODE_NOERROR);
if(nx && nx->type == LDNS_RR_TYPE_CNAME &&
dname_pkt_compare(pkt, sname, nx->dname) == 0) {
/* check next cname */
@@ -398,14 +404,21 @@ scrub_normalize(ldns_buffer* pkt, struct msg_parse* msg,
/* Follow the CNAME chain. */
if(rrset->type == LDNS_RR_TYPE_CNAME) {
uint8_t* oldsname = sname;
if(!parse_get_cname_target(rrset, &sname, &snamelen))
return 0;
prev = rrset;
rrset = rrset->rrset_all_next;
/* internally we have CNAME'd/DNAME'd chains ending
* in nxdomain with NOERROR rcode, change rcode
* to reflect this (if needed) */
FLAGS_SET_RCODE(msg->flags, LDNS_RCODE_NOERROR);
/* in CNAME ANY response, can have data after CNAME */
if(qinfo->qtype == LDNS_RR_TYPE_ANY) {
while(rrset && rrset->section ==
LDNS_SECTION_ANSWER &&
dname_pkt_compare(pkt, oldsname,
rrset->dname) == 0) {
prev = rrset;
rrset = rrset->rrset_all_next;
}
}
continue;
}
@@ -439,6 +452,12 @@ scrub_normalize(ldns_buffer* pkt, struct msg_parse* msg,
}
/* only one NS set allowed in authority section */
if(rrset->type==LDNS_RR_TYPE_NS) {
/* NS set must be pertinent to the query */
if(!sub_of_pkt(pkt, qinfo->qname, rrset->dname)) {
remove_rrset("normalize: removing irrelevant "
"RRset:", pkt, msg, prev, &rrset);
continue;
}
if(nsset == NULL) {
nsset = rrset;
} else {
@@ -516,10 +535,21 @@ store_rrset(ldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
ref.key = k;
ref.id = k->id;
/*ignore ret: it was in the cache, ref updated */
(void)rrset_cache_update(env->rrset_cache, &ref,
env->alloc, now);
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, now);
}
/** Check if there are SOA records in the authority section (negative) */
static int
soa_in_auth(struct msg_parse* msg)
{
struct rrset_parse* rrset;
for(rrset = msg->rrset_first; rrset; rrset = rrset->rrset_all_next)
if(rrset->type == LDNS_RR_TYPE_SOA &&
rrset->section == LDNS_SECTION_AUTHORITY)
return 1;
return 0;
}
/**
* Check if right hand name in NSEC is within zone
* @param rrset: the NSEC rrset
@@ -536,7 +566,7 @@ static int sanitize_nsec_is_overreach(struct rrset_parse* rrset,
for(rr = rrset->rr_first; rr; rr = rr->next) {
rhs = rr->ttl_data+4+2;
len = ldns_read_uint16(rr->ttl_data+4);
if(!(len=dname_valid(rhs, len))) {
if(!dname_valid(rhs, len)) {
/* malformed domain name in rdata */
return 1;
}
@@ -568,6 +598,8 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
struct iter_env* ie)
{
int del_addi = 0; /* if additional-holding rrsets are deleted, we
do not trust the normalized additional-A-AAAA any more */
struct rrset_parse* rrset, *prev;
prev = NULL;
rrset = msg->rrset_first;
@@ -592,6 +624,7 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
* Remainders of CNAME chains are cut off and resolved by iterator. */
while(rrset && rrset->section == LDNS_SECTION_ANSWER) {
if(dname_pkt_compare(pkt, qinfo->qname, rrset->dname) != 0) {
if(has_additional(rrset->type)) del_addi = 1;
remove_rrset("sanitize: removing extraneous answer "
"RRset:", pkt, msg, prev, &rrset);
continue;
@@ -615,9 +648,9 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
if( (rrset->type == LDNS_RR_TYPE_A ||
rrset->type == LDNS_RR_TYPE_AAAA) &&
priv_rrset_bad(ie->priv, pkt, rrset)) {
/* set servfail, so the classification becomes
* THROWAWAY, instead of LAME or other unwanted */
FLAGS_SET_RCODE(msg->flags, LDNS_RCODE_SERVFAIL);
/* do not set servfail since this leads to too
* many drops of other people using rfc1918 space */
remove_rrset("sanitize: removing public name with "
"private address", pkt, msg, prev, &rrset);
continue;
@@ -635,10 +668,15 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
rrset->type == LDNS_RR_TYPE_NS &&
rrset->section == LDNS_SECTION_AUTHORITY &&
FLAGS_GET_RCODE(msg->flags) ==
LDNS_RCODE_NOERROR) {
LDNS_RCODE_NOERROR && !soa_in_auth(msg) &&
sub_of_pkt(pkt, zonename, rrset->dname)) {
/* noerror, nodata and this NS rrset is above
* the zone. This is LAME!
* Leave in the NS for lame classification. */
/* remove everything from the additional
* (we dont want its glue that was approved
* during the normalize action) */
del_addi = 1;
} else if(!env->cfg->harden_glue) {
/* store in cache! Since it is relevant
* (from normalize) it will be picked up
@@ -648,11 +686,17 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
"poison RRset:", pkt, msg, prev, &rrset);
continue;
} else {
if(has_additional(rrset->type)) del_addi = 1;
remove_rrset("sanitize: removing potential "
"poison RRset:", pkt, msg, prev, &rrset);
continue;
}
}
if(del_addi && rrset->section == LDNS_SECTION_ADDITIONAL) {
remove_rrset("sanitize: removing potential "
"poison reference RRset:", pkt, msg, prev, &rrset);
continue;
}
/* check if right hand side of NSEC is within zone */
if(rrset->type == LDNS_RR_TYPE_NSEC &&
sanitize_nsec_is_overreach(rrset, zonename)) {
@@ -678,6 +722,7 @@ scrub_message(ldns_buffer* pkt, struct msg_parse* msg,
return 0;
if( !(msg->flags&BIT_QR) )
return 0;
msg->flags &= ~(BIT_AD|BIT_Z); /* force off bit AD and Z */
/* make sure that a query is echoed back when NOERROR or NXDOMAIN */
/* this is not required for basic operation but is a forgery
+1
View File
@@ -42,6 +42,7 @@
#ifndef ITERATOR_ITER_SCRUB_H
#define ITERATOR_ITER_SCRUB_H
#include <ldns/buffer.h>
struct msg_parse;
struct query_info;
struct regional;
+522 -44
View File
@@ -60,6 +60,14 @@
#include "util/random.h"
#include "util/fptr_wlist.h"
#include "validator/val_anchor.h"
#include "validator/val_kcache.h"
#include "validator/val_kentry.h"
#include "validator/val_utils.h"
/** time when nameserver glue is said to be 'recent' */
#define SUSPICION_RECENT_EXPIRY 86400
/** penalty to validation failed blacklisted IPs */
#define BLACKLIST_PENALTY (USEFUL_SERVER_TOP_TIMEOUT*4)
/** fillup fetch policy array */
static void
@@ -106,18 +114,6 @@ iter_apply_cfg(struct iter_env* iter_env, struct config_file* cfg)
verbose(VERB_QUERY, "target fetch policy for level %d is %d",
i, iter_env->target_fetch_policy[i]);
if(!iter_env->hints)
iter_env->hints = hints_create();
if(!iter_env->hints || !hints_apply_cfg(iter_env->hints, cfg)) {
log_err("Could not set root or stub hints");
return 0;
}
if(!iter_env->fwds)
iter_env->fwds = forwards_create();
if(!iter_env->fwds || !forwards_apply_cfg(iter_env->fwds, cfg)) {
log_err("Could not set forward zones");
return 0;
}
if(!iter_env->donotq)
iter_env->donotq = donotq_create();
if(!iter_env->donotq || !donotq_apply_cfg(iter_env->donotq, cfg)) {
@@ -131,10 +127,54 @@ iter_apply_cfg(struct iter_env* iter_env, struct config_file* cfg)
return 0;
}
iter_env->supports_ipv6 = cfg->do_ip6;
iter_env->supports_ipv4 = cfg->do_ip4;
return 1;
}
/** filter out unsuitable targets, return rtt or -1 */
/** filter out unsuitable targets
* @param iter_env: iterator environment with ipv6-support flag.
* @param env: module environment with infra cache.
* @param name: zone name
* @param namelen: length of name
* @param qtype: query type (host order).
* @param now: current time
* @param a: address in delegation point we are examining.
* @return an integer that signals the target suitability.
* as follows:
* -1: The address should be omitted from the list.
* Because:
* o The address is bogus (DNSSEC validation failure).
* o Listed as donotquery
* o is ipv6 but no ipv6 support (in operating system).
* o is ipv4 but no ipv4 support (in operating system).
* o is lame
* Otherwise, an rtt in milliseconds.
* 0 .. USEFUL_SERVER_TOP_TIMEOUT-1
* The roundtrip time timeout estimate. less than 2 minutes.
* Note that util/rtt.c has a MIN_TIMEOUT of 50 msec, thus
* values 0 .. 49 are not used, unless that is changed.
* USEFUL_SERVER_TOP_TIMEOUT
* This value exactly is given for unresponsive blacklisted.
* USEFUL_SERVER_TOP_TIMEOUT+1
* For non-blacklisted servers: huge timeout, but has traffic.
* USEFUL_SERVER_TOP_TIMEOUT*1 ..
* parent-side lame servers get this penalty. A dispreferential
* server. (lame in delegpt).
* USEFUL_SERVER_TOP_TIMEOUT*2 ..
* dnsseclame servers get penalty
* USEFUL_SERVER_TOP_TIMEOUT*3 ..
* recursion lame servers get penalty
* UNKNOWN_SERVER_NICENESS
* If no information is known about the server, this is
* returned. 376 msec or so.
* +BLACKLIST_PENALTY (of USEFUL_TOP_TIMEOUT*4) for dnssec failed IPs.
*
* When a final value is chosen that is dnsseclame ; dnsseclameness checking
* is turned off (so we do not discard the reply).
* When a final value is chosen that is recursionlame; RD bit is set on query.
* Because of the numbers this means recursionlame also have dnssec lameness
* checking turned off.
*/
static int
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
@@ -144,26 +184,48 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
if(a->bogus)
return -1; /* address of server is bogus */
if(donotq_lookup(iter_env->donotq, &a->addr, a->addrlen)) {
log_addr(VERB_ALGO, "skip addr on the donotquery list",
&a->addr, a->addrlen);
return -1; /* server is on the donotquery list */
}
if(!iter_env->supports_ipv6 && addr_is_ip6(&a->addr, a->addrlen)) {
return -1; /* there is no ip6 available */
}
if(!iter_env->supports_ipv4 && !addr_is_ip6(&a->addr, a->addrlen)) {
return -1; /* there is no ip4 available */
}
/* check lameness - need zone , class info */
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
name, namelen, qtype, &lame, &dnsseclame, &reclame,
&rtt, now)) {
log_addr(VERB_ALGO, "servselect", &a->addr, a->addrlen);
verbose(VERB_ALGO, " rtt=%d%s%s%s%s", rtt,
lame?" LAME":"",
dnsseclame?" DNSSEC_LAME":"",
reclame?" REC_LAME":"",
a->lame?" ADDR_LAME":"");
if(lame)
return -1; /* server is lame */
else if(rtt >= USEFUL_SERVER_TOP_TIMEOUT)
return -1; /* server is unresponsive */
/* server is unresponsive,
* we used to return TOP_TIMOUT, but fairly useless,
* because if == TOP_TIMEOUT is dropped because
* blacklisted later, instead, remove it here, so
* other choices (that are not blacklisted) can be
* tried */
return -1;
/* select remainder from worst to best */
else if(reclame)
return rtt+USEFUL_SERVER_TOP_TIMEOUT*2; /* nonpref */
return rtt+USEFUL_SERVER_TOP_TIMEOUT*3; /* nonpref */
else if(dnsseclame )
return rtt+USEFUL_SERVER_TOP_TIMEOUT; /* nonpref */
return rtt+USEFUL_SERVER_TOP_TIMEOUT*2; /* nonpref */
else if(a->lame)
return rtt+USEFUL_SERVER_TOP_TIMEOUT+1; /* nonpref */
else return rtt;
}
/* no server information present */
if(a->lame)
return USEFUL_SERVER_TOP_TIMEOUT+1+UNKNOWN_SERVER_NICENESS; /* nonpref */
return UNKNOWN_SERVER_NICENESS;
}
@@ -171,7 +233,7 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
static int
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
struct delegpt* dp, int* best_rtt)
struct delegpt* dp, int* best_rtt, struct sock_list* blacklist)
{
int got_it = 0;
struct delegpt_addr* a;
@@ -181,6 +243,9 @@ iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
a->sel_rtt = iter_filter_unsuitable(iter_env, env,
name, namelen, qtype, now, a);
if(a->sel_rtt != -1) {
if(sock_list_find(blacklist, &a->addr, a->addrlen))
a->sel_rtt += BLACKLIST_PENALTY;
if(!got_it) {
*best_rtt = a->sel_rtt;
got_it = 1;
@@ -197,20 +262,23 @@ iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
static int
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
struct delegpt* dp, int* selected_rtt)
struct delegpt* dp, int* selected_rtt, int open_target,
struct sock_list* blacklist)
{
int got_num = 0, low_rtt = 0, swap_to_front;
struct delegpt_addr* a, *n, *prev=NULL;
/* fillup sel_rtt and find best rtt in the bunch */
got_num = iter_fill_rtt(iter_env, env, name, namelen, qtype, now, dp,
&low_rtt);
&low_rtt, blacklist);
if(got_num == 0)
return 0;
if(low_rtt >= USEFUL_SERVER_TOP_TIMEOUT &&
delegpt_count_missing_targets(dp) > 0)
(delegpt_count_missing_targets(dp) > 0 || open_target > 0)) {
verbose(VERB_ALGO, "Bad choices, trying to get more choice");
return 0; /* we want more choice. The best choice is a bad one.
return 0 to force the caller to fetch more */
}
got_num = 0;
a = dp->result_list;
@@ -249,23 +317,44 @@ iter_filter_order(struct iter_env* iter_env, struct module_env* env,
struct delegpt_addr*
iter_server_selection(struct iter_env* iter_env,
struct module_env* env, struct delegpt* dp,
uint8_t* name, size_t namelen, uint16_t qtype, int* dnssec_expected,
int* chase_to_rd)
uint8_t* name, size_t namelen, uint16_t qtype, int* dnssec_lame,
int* chase_to_rd, int open_target, struct sock_list* blacklist)
{
int sel;
int selrtt;
struct delegpt_addr* a, *prev;
int num = iter_filter_order(iter_env, env, name, namelen, qtype,
*env->now, dp, &selrtt);
*env->now, dp, &selrtt, open_target, blacklist);
if(num == 0)
return NULL;
if(selrtt >= USEFUL_SERVER_TOP_TIMEOUT*2) {
*chase_to_rd = 1;
}
if(selrtt >= USEFUL_SERVER_TOP_TIMEOUT) {
*dnssec_expected = 0;
verbose(VERB_ALGO, "selrtt %d", selrtt);
if(selrtt > BLACKLIST_PENALTY) {
if(selrtt-BLACKLIST_PENALTY > USEFUL_SERVER_TOP_TIMEOUT*3) {
verbose(VERB_ALGO, "chase to "
"blacklisted recursion lame server");
*chase_to_rd = 1;
}
if(selrtt-BLACKLIST_PENALTY > USEFUL_SERVER_TOP_TIMEOUT*2) {
verbose(VERB_ALGO, "chase to "
"blacklisted dnssec lame server");
*dnssec_lame = 1;
}
} else {
if(selrtt > USEFUL_SERVER_TOP_TIMEOUT*3) {
verbose(VERB_ALGO, "chase to recursion lame server");
*chase_to_rd = 1;
}
if(selrtt > USEFUL_SERVER_TOP_TIMEOUT*2) {
verbose(VERB_ALGO, "chase to dnssec lame server");
*dnssec_lame = 1;
}
if(selrtt == USEFUL_SERVER_TOP_TIMEOUT) {
verbose(VERB_ALGO, "chase to blacklisted lame server");
return NULL;
}
}
if(num == 1) {
a = dp->result_list;
if(++a->attempts < OUTBOUND_MSG_RETRY)
@@ -273,11 +362,12 @@ iter_server_selection(struct iter_env* iter_env,
dp->result_list = a->next_result;
return a;
}
/* randomly select a target from the list */
log_assert(num > 1);
/* we do not need secure random numbers here, but
* we do need it to be threadsafe, so we use this */
sel = ub_random(env->rnd) % num;
/* grab secure random number, to pick unexpected server.
* also we need it to be threadsafe. */
sel = ub_random_max(env->rnd, num);
a = dp->result_list;
prev = NULL;
while(sel > 0 && a) {
@@ -328,11 +418,14 @@ dns_copy_msg(struct dns_msg* from, struct regional* region)
return m;
}
int
void
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
struct reply_info* msgrep, int is_referral)
struct reply_info* msgrep, int is_referral, uint32_t leeway, int pside,
struct regional* region)
{
return dns_cache_store(env, msgqinf, msgrep, is_referral);
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
pside, region))
log_err("out of memory: cannot store data in cache");
}
int
@@ -343,7 +436,7 @@ iter_ns_probability(struct ub_randstate* rnd, int n, int m)
return 1;
/* we do not need secure random numbers here, but
* we do need it to be threadsafe, so we use this */
sel = ub_random(rnd) % m;
sel = ub_random_max(rnd, m);
return (sel < n);
}
@@ -385,25 +478,50 @@ iter_mark_cycle_targets(struct module_qstate* qstate, struct delegpt* dp)
}
}
void
iter_mark_pside_cycle_targets(struct module_qstate* qstate, struct delegpt* dp)
{
struct delegpt_ns* ns;
for(ns = dp->nslist; ns; ns = ns->next) {
if(ns->done_pside4 && ns->done_pside6)
continue;
/* see if this ns as target causes dependency cycle */
if(causes_cycle(qstate, ns->name, ns->namelen,
LDNS_RR_TYPE_A, qstate->qinfo.qclass)) {
log_nametypeclass(VERB_QUERY, "skipping target due "
"to dependency cycle", ns->name,
LDNS_RR_TYPE_A, qstate->qinfo.qclass);
ns->done_pside4 = 1;
}
if(causes_cycle(qstate, ns->name, ns->namelen,
LDNS_RR_TYPE_AAAA, qstate->qinfo.qclass)) {
log_nametypeclass(VERB_QUERY, "skipping target due "
"to dependency cycle", ns->name,
LDNS_RR_TYPE_AAAA, qstate->qinfo.qclass);
ns->done_pside6 = 1;
}
}
}
int
iter_dp_is_useless(struct query_info* qinfo, uint16_t qflags,
struct delegpt* dp)
{
struct delegpt_ns* ns;
/* check:
* o RD qflag is on.
* o no addresses are provided.
* o all NS items are required glue.
* o no addresses are provided.
* o RD qflag is on.
* OR
* o no addresses are provided.
* o RD qflag is on.
* o no addresses are provided.
* o the query is for one of the nameservers in dp,
* and that nameserver is a glue-name for this dp.
*/
if(!(qflags&BIT_RD))
return 0;
/* either available or unused targets */
if(dp->usable_list || dp->result_list)
if(dp->usable_list || dp->result_list)
return 0;
/* see if query is for one of the nameservers, which is glue */
@@ -426,18 +544,38 @@ int
iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
struct dns_msg* msg, uint16_t dclass)
{
struct trust_anchor* a;
/* information not available, !env->anchors can be common */
if(!env || !env->anchors || !dp || !dp->name)
return 0;
/* a trust anchor exists with this name, RRSIGs expected */
if(anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
dclass))
if((a=anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
dclass))) {
lock_basic_unlock(&a->lock);
return 1;
}
/* see if DS rrset was given, in AUTH section */
if(msg && msg->rep &&
reply_find_rrset_section_ns(msg->rep, dp->name, dp->namelen,
LDNS_RR_TYPE_DS, dclass))
return 1;
/* look in key cache */
if(env->key_cache) {
struct key_entry_key* kk = key_cache_obtain(env->key_cache,
dp->name, dp->namelen, dclass, env->scratch, *env->now);
if(kk) {
if(query_dname_compare(kk->name, dp->name) == 0) {
if(key_entry_isgood(kk) || key_entry_isbad(kk)) {
regional_free_all(env->scratch);
return 1;
} else if(key_entry_isnull(kk)) {
regional_free_all(env->scratch);
return 0;
}
}
regional_free_all(env->scratch);
}
}
return 0;
}
@@ -496,6 +634,11 @@ int iter_msg_from_zone(struct dns_msg* msg, struct delegpt* dp,
reply_find_rrset_section_ns(msg->rep, dp->name, dp->namelen,
LDNS_RR_TYPE_NS, dclass))
return 1;
/* a DNSKEY set is expected at the zone apex as well */
/* this is for 'minimal responses' for DNSKEYs */
if(reply_find_rrset_section_an(msg->rep, dp->name, dp->namelen,
LDNS_RR_TYPE_DNSKEY, dclass))
return 1;
return 0;
}
@@ -537,12 +680,13 @@ rrset_equal(struct ub_packed_rrset_key* k1, struct ub_packed_rrset_key* k2)
}
int
reply_equal(struct reply_info* p, struct reply_info* q)
reply_equal(struct reply_info* p, struct reply_info* q, ldns_buffer* scratch)
{
size_t i;
if(p->flags != q->flags ||
p->qdcount != q->qdcount ||
p->ttl != q->ttl ||
p->prefetch_ttl != q->prefetch_ttl ||
p->security != q->security ||
p->an_numrrsets != q->an_numrrsets ||
p->ns_numrrsets != q->ns_numrrsets ||
@@ -550,8 +694,342 @@ reply_equal(struct reply_info* p, struct reply_info* q)
p->rrset_count != q->rrset_count)
return 0;
for(i=0; i<p->rrset_count; i++) {
if(!rrset_equal(p->rrsets[i], q->rrsets[i]))
return 0;
if(!rrset_equal(p->rrsets[i], q->rrsets[i])) {
/* fallback procedure: try to sort and canonicalize */
ldns_rr_list* pl, *ql;
pl = packed_rrset_to_rr_list(p->rrsets[i], scratch);
ql = packed_rrset_to_rr_list(q->rrsets[i], scratch);
if(!pl || !ql) {
ldns_rr_list_deep_free(pl);
ldns_rr_list_deep_free(ql);
return 0;
}
ldns_rr_list2canonical(pl);
ldns_rr_list2canonical(ql);
ldns_rr_list_sort(pl);
ldns_rr_list_sort(ql);
if(ldns_rr_list_compare(pl, ql) != 0) {
ldns_rr_list_deep_free(pl);
ldns_rr_list_deep_free(ql);
return 0;
}
ldns_rr_list_deep_free(pl);
ldns_rr_list_deep_free(ql);
continue;
}
}
return 1;
}
void
iter_store_parentside_rrset(struct module_env* env,
struct ub_packed_rrset_key* rrset)
{
struct rrset_ref ref;
rrset = packed_rrset_copy_alloc(rrset, env->alloc, *env->now);
if(!rrset) {
log_err("malloc failure in store_parentside_rrset");
return;
}
rrset->rk.flags |= PACKED_RRSET_PARENT_SIDE;
rrset->entry.hash = rrset_key_hash(&rrset->rk);
ref.key = rrset;
ref.id = rrset->id;
/* ignore ret: if it was in the cache, ref updated */
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, *env->now);
}
/** fetch NS record from reply, if any */
static struct ub_packed_rrset_key*
reply_get_NS_rrset(struct reply_info* rep)
{
size_t i;
for(i=0; i<rep->rrset_count; i++) {
if(rep->rrsets[i]->rk.type == htons(LDNS_RR_TYPE_NS)) {
return rep->rrsets[i];
}
}
return NULL;
}
void
iter_store_parentside_NS(struct module_env* env, struct reply_info* rep)
{
struct ub_packed_rrset_key* rrset = reply_get_NS_rrset(rep);
if(rrset) {
log_rrset_key(VERB_ALGO, "store parent-side NS", rrset);
iter_store_parentside_rrset(env, rrset);
}
}
void iter_store_parentside_neg(struct module_env* env,
struct query_info* qinfo, struct reply_info* rep)
{
/* TTL: NS from referral in iq->deleg_msg,
* or first RR from iq->response,
* or servfail5secs if !iq->response */
uint32_t ttl = NORR_TTL;
struct ub_packed_rrset_key* neg;
struct packed_rrset_data* newd;
if(rep) {
struct ub_packed_rrset_key* rrset = reply_get_NS_rrset(rep);
if(!rrset && rep->rrset_count != 0) rrset = rep->rrsets[0];
if(rrset) ttl = ub_packed_rrset_ttl(rrset);
}
/* create empty rrset to store */
neg = (struct ub_packed_rrset_key*)regional_alloc(env->scratch,
sizeof(struct ub_packed_rrset_key));
if(!neg) {
log_err("out of memory in store_parentside_neg");
return;
}
memset(&neg->entry, 0, sizeof(neg->entry));
neg->entry.key = neg;
neg->rk.type = htons(qinfo->qtype);
neg->rk.rrset_class = htons(qinfo->qclass);
neg->rk.flags = 0;
neg->rk.dname = regional_alloc_init(env->scratch, qinfo->qname,
qinfo->qname_len);
if(!neg->rk.dname) {
log_err("out of memory in store_parentside_neg");
return;
}
neg->rk.dname_len = qinfo->qname_len;
neg->entry.hash = rrset_key_hash(&neg->rk);
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
sizeof(struct packed_rrset_data) + sizeof(size_t) +
sizeof(uint8_t*) + sizeof(uint32_t) + sizeof(uint16_t));
if(!newd) {
log_err("out of memory in store_parentside_neg");
return;
}
neg->entry.data = newd;
newd->ttl = ttl;
/* entry must have one RR, otherwise not valid in cache.
* put in one RR with empty rdata: those are ignored as nameserver */
newd->count = 1;
newd->rrsig_count = 0;
newd->trust = rrset_trust_ans_noAA;
newd->rr_len = (size_t*)((uint8_t*)newd +
sizeof(struct packed_rrset_data));
newd->rr_len[0] = 0 /* zero len rdata */ + sizeof(uint16_t);
packed_rrset_ptr_fixup(newd);
newd->rr_ttl[0] = newd->ttl;
ldns_write_uint16(newd->rr_data[0], 0 /* zero len rdata */);
/* store it */
log_rrset_key(VERB_ALGO, "store parent-side negative", neg);
iter_store_parentside_rrset(env, neg);
}
int
iter_lookup_parent_NS_from_cache(struct module_env* env, struct delegpt* dp,
struct regional* region, struct query_info* qinfo)
{
struct ub_packed_rrset_key* akey;
akey = rrset_cache_lookup(env->rrset_cache, dp->name,
dp->namelen, LDNS_RR_TYPE_NS, qinfo->qclass,
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
if(akey) {
log_rrset_key(VERB_ALGO, "found parent-side NS in cache", akey);
dp->has_parent_side_NS = 1;
/* and mark the new names as lame */
if(!delegpt_rrset_add_ns(dp, region, akey, 1)) {
lock_rw_unlock(&akey->entry.lock);
return 0;
}
lock_rw_unlock(&akey->entry.lock);
}
return 1;
}
int iter_lookup_parent_glue_from_cache(struct module_env* env,
struct delegpt* dp, struct regional* region, struct query_info* qinfo)
{
struct ub_packed_rrset_key* akey;
struct delegpt_ns* ns;
size_t num = delegpt_count_targets(dp);
for(ns = dp->nslist; ns; ns = ns->next) {
/* get cached parentside A */
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
ns->namelen, LDNS_RR_TYPE_A, qinfo->qclass,
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
if(akey) {
log_rrset_key(VERB_ALGO, "found parent-side", akey);
ns->done_pside4 = 1;
/* a negative-cache-element has no addresses it adds */
if(!delegpt_add_rrset_A(dp, region, akey, 1))
log_err("malloc failure in lookup_parent_glue");
lock_rw_unlock(&akey->entry.lock);
}
/* get cached parentside AAAA */
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
ns->namelen, LDNS_RR_TYPE_AAAA, qinfo->qclass,
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
if(akey) {
log_rrset_key(VERB_ALGO, "found parent-side", akey);
ns->done_pside6 = 1;
/* a negative-cache-element has no addresses it adds */
if(!delegpt_add_rrset_AAAA(dp, region, akey, 1))
log_err("malloc failure in lookup_parent_glue");
lock_rw_unlock(&akey->entry.lock);
}
}
/* see if new (but lame) addresses have become available */
return delegpt_count_targets(dp) != num;
}
int
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
uint16_t* c)
{
uint16_t c1 = *c, c2 = *c;
int r1 = hints_next_root(hints, &c1);
int r2 = forwards_next_root(fwd, &c2);
if(!r1 && !r2) /* got none, end of list */
return 0;
else if(!r1) /* got one, return that */
*c = c2;
else if(!r2)
*c = c1;
else if(c1 < c2) /* got both take smallest */
*c = c1;
else *c = c2;
return 1;
}
void
iter_scrub_ds(struct dns_msg* msg, struct ub_packed_rrset_key* ns, uint8_t* z)
{
/* Only the DS record for the delegation itself is expected.
* We allow DS for everything between the bailiwick and the
* zonecut, thus DS records must be at or above the zonecut.
* And the DS records must be below the server authority zone.
* The answer section is already scrubbed. */
size_t i = msg->rep->an_numrrsets;
while(i < (msg->rep->an_numrrsets + msg->rep->ns_numrrsets)) {
struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
if(ntohs(s->rk.type) == LDNS_RR_TYPE_DS &&
(!ns || !dname_subdomain_c(ns->rk.dname, s->rk.dname)
|| query_dname_compare(z, s->rk.dname) == 0)) {
log_nametypeclass(VERB_ALGO, "removing irrelevant DS",
s->rk.dname, ntohs(s->rk.type),
ntohs(s->rk.rrset_class));
memmove(msg->rep->rrsets+i, msg->rep->rrsets+i+1,
sizeof(struct ub_packed_rrset_key*) *
(msg->rep->rrset_count-i-1));
msg->rep->ns_numrrsets--;
msg->rep->rrset_count--;
/* stay at same i, but new record */
continue;
}
i++;
}
}
void iter_dec_attempts(struct delegpt* dp, int d)
{
struct delegpt_addr* a;
for(a=dp->target_list; a; a = a->next_target) {
if(a->attempts >= OUTBOUND_MSG_RETRY) {
/* add back to result list */
a->next_result = dp->result_list;
dp->result_list = a;
}
if(a->attempts > d)
a->attempts -= d;
else a->attempts = 0;
}
}
void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old)
{
struct delegpt_addr* a, *o, *prev;
for(a=dp->target_list; a; a = a->next_target) {
o = delegpt_find_addr(old, &a->addr, a->addrlen);
if(o) {
log_addr(VERB_ALGO, "copy attempt count previous dp",
&a->addr, a->addrlen);
a->attempts = o->attempts;
}
}
prev = NULL;
a = dp->usable_list;
while(a) {
if(a->attempts >= OUTBOUND_MSG_RETRY) {
log_addr(VERB_ALGO, "remove from usable list dp",
&a->addr, a->addrlen);
/* remove from result list */
if(prev)
prev->next_usable = a->next_usable;
else dp->usable_list = a->next_usable;
/* prev stays the same */
a = a->next_usable;
continue;
}
prev = a;
a = a->next_usable;
}
}
int
iter_ds_toolow(struct dns_msg* msg, struct delegpt* dp)
{
/* if for query example.com, there is example.com SOA or a subdomain
* of example.com, then we are too low and need to fetch NS. */
size_t i;
/* if we have a DNAME or CNAME we are probably wrong */
/* if we have a qtype DS in the answer section, its fine */
for(i=0; i < msg->rep->an_numrrsets; i++) {
struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
if(ntohs(s->rk.type) == LDNS_RR_TYPE_DNAME ||
ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME) {
/* not the right answer, maybe too low, check the
* RRSIG signer name (if there is any) for a hint
* that it is from the dp zone anyway */
uint8_t* sname;
size_t slen;
val_find_rrset_signer(s, &sname, &slen);
if(sname && query_dname_compare(dp->name, sname)==0)
return 0; /* it is fine, from the right dp */
return 1;
}
if(ntohs(s->rk.type) == LDNS_RR_TYPE_DS)
return 0; /* fine, we have a DS record */
}
for(i=msg->rep->an_numrrsets;
i < msg->rep->an_numrrsets + msg->rep->ns_numrrsets; i++) {
struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
if(ntohs(s->rk.type) == LDNS_RR_TYPE_SOA) {
if(dname_subdomain_c(s->rk.dname, msg->qinfo.qname))
return 1; /* point is too low */
if(query_dname_compare(s->rk.dname, dp->name)==0)
return 0; /* right dp */
}
if(ntohs(s->rk.type) == LDNS_RR_TYPE_NSEC ||
ntohs(s->rk.type) == LDNS_RR_TYPE_NSEC3) {
uint8_t* sname;
size_t slen;
val_find_rrset_signer(s, &sname, &slen);
if(sname && query_dname_compare(dp->name, sname)==0)
return 0; /* it is fine, from the right dp */
return 1;
}
}
/* we do not know */
return 1;
}
int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp)
{
/* no delegation point, do not see how we can go down,
* robust check, it should really exist */
if(!dp) return 0;
/* see if dp equals the qname, then we cannot go down further */
if(query_dname_compare(qinfo->qname, dp->name) == 0)
return 0;
/* if dp is one label above the name we also cannot go down further */
if(dname_count_labels(qinfo->qname) == dp->namelabs+1)
return 0;
return 1;
}
+149 -7
View File
@@ -43,7 +43,10 @@
#ifndef ITERATOR_ITER_UTILS_H
#define ITERATOR_ITER_UTILS_H
#include "iterator/iter_resptype.h"
#include <ldns/buffer.h>
struct iter_env;
struct iter_hints;
struct iter_forwards;
struct config_file;
struct module_env;
struct delegpt_addr;
@@ -54,6 +57,8 @@ struct ub_randstate;
struct query_info;
struct reply_info;
struct module_qstate;
struct sock_list;
struct ub_packed_rrset_key;
/**
* Process config options and set iterator module state.
@@ -75,17 +80,20 @@ int iter_apply_cfg(struct iter_env* iter_env, struct config_file* cfg);
* @param name: zone name (for lameness check).
* @param namelen: length of name.
* @param qtype: query type that we want to send.
* @param dnssec_expected: set to 0, if a known dnssec-lame server is selected
* @param dnssec_lame: set to 1, if a known dnssec-lame server is selected
* these are not preferred, but are used as a last resort.
* @param chase_to_rd: set to 1 if a known recursion lame server is selected
* these are not preferred, but are used as a last resort.
* @param open_target: number of currently outstanding target queries.
* If we wait for these, perhaps more server addresses become available.
* @param blacklist: the IP blacklist to use.
* @return best target or NULL if no target.
* if not null, that target is removed from the result list in the dp.
*/
struct delegpt_addr* iter_server_selection(struct iter_env* iter_env,
struct module_env* env, struct delegpt* dp, uint8_t* name,
size_t namelen, uint16_t qtype, int* dnssec_expected,
int* chase_to_rd);
size_t namelen, uint16_t qtype, int* dnssec_lame,
int* chase_to_rd, int open_target, struct sock_list* blacklist);
/**
* Allocate dns_msg from parsed msg, in regional.
@@ -112,10 +120,19 @@ struct dns_msg* dns_copy_msg(struct dns_msg* from, struct regional* regional);
* @param rep: reply in dns_msg from dns_alloc_msg for example.
* @param is_referral: If true, then the given message to be stored is a
* referral. The cache implementation may use this as a hint.
* @return 0 on alloc error (out of memory).
* @param leeway: prefetch TTL leeway to expire old rrsets quicker.
* @param pside: true if dp is parentside, thus message is 'fresh' and NS
* can be prefetch-updates.
* @param region: to copy modified (cache is better) rrs back to.
* @return void, because we are not interested in alloc errors,
* the iterator and validator can operate on the results in their
* scratch space (the qstate.region) and are not dependent on the cache.
* It is useful to log the alloc failure (for the server operator),
* but the query resolution can continue without cache storage.
*/
int iter_dns_store(struct module_env* env, struct query_info* qinf,
struct reply_info* rep, int is_referral);
void iter_dns_store(struct module_env* env, struct query_info* qinf,
struct reply_info* rep, int is_referral, uint32_t leeway, int pside,
struct regional* region);
/**
* Select randomly with n/m probability.
@@ -135,12 +152,22 @@ int iter_ns_probability(struct ub_randstate* rnd, int n, int m);
*/
void iter_mark_cycle_targets(struct module_qstate* qstate, struct delegpt* dp);
/**
* Mark targets that result in a dependency cycle as done, so they
* will not get selected as targets. For the parent-side lookups.
* @param qstate: query state.
* @param dp: delegpt to mark ns in.
*/
void iter_mark_pside_cycle_targets(struct module_qstate* qstate,
struct delegpt* dp);
/**
* See if delegation is useful or offers immediately no targets for
* further recursion.
* @param qinfo: query name and type
* @param qflags: query flags with RD flag
* @param dp: delegpt to check.
* @return true if dp is useless.
*/
int iter_dp_is_useless(struct query_info* qinfo, uint16_t qflags,
struct delegpt* dp);
@@ -189,8 +216,123 @@ int iter_msg_from_zone(struct dns_msg* msg, struct delegpt* dp,
* @param p: reply one. The reply has rrset data pointers in region.
* Does not check rrset-IDs
* @param q: reply two
* @param buf: scratch buffer.
* @return if one and two are equal.
*/
int reply_equal(struct reply_info* p, struct reply_info* q);
int reply_equal(struct reply_info* p, struct reply_info* q, ldns_buffer* buf);
/**
* Store parent-side rrset in seperate rrset cache entries for later
* last-resort * lookups in case the child-side versions of this information
* fails.
* @param env: environment with cache, time, ...
* @param rrset: the rrset to store (copied).
* Failure to store is logged, but otherwise ignored.
*/
void iter_store_parentside_rrset(struct module_env* env,
struct ub_packed_rrset_key* rrset);
/**
* Store parent-side NS records from a referral message
* @param env: environment with cache, time, ...
* @param rep: response with NS rrset.
* Failure to store is logged, but otherwise ignored.
*/
void iter_store_parentside_NS(struct module_env* env, struct reply_info* rep);
/**
* Store parent-side negative element, the parentside rrset does not exist,
* creates an rrset with empty rdata in the rrset cache with PARENTSIDE flag.
* @param env: environment with cache, time, ...
* @param qinfo: the identity of the rrset that is missing.
* @param rep: delegation response or answer response, to glean TTL from.
* (malloc) failure is logged but otherwise ignored.
*/
void iter_store_parentside_neg(struct module_env* env,
struct query_info* qinfo, struct reply_info* rep);
/**
* Add parent NS record if that exists in the cache. This is both new
* information and acts like a timeout throttle on retries.
* @param env: query env with rrset cache and time.
* @param dp: delegation point to store result in. Also this dp is used to
* see which NS name is needed.
* @param region: region to alloc result in.
* @param qinfo: pertinent information, the qclass.
* @return false on malloc failure.
* if true, the routine worked and if such cached information
* existed dp->has_parent_side_NS is set true.
*/
int iter_lookup_parent_NS_from_cache(struct module_env* env,
struct delegpt* dp, struct regional* region, struct query_info* qinfo);
/**
* Add parent-side glue if that exists in the cache. This is both new
* information and acts like a timeout throttle on retries to fetch them.
* @param env: query env with rrset cache and time.
* @param dp: delegation point to store result in. Also this dp is used to
* see which NS name is needed.
* @param region: region to alloc result in.
* @param qinfo: pertinent information, the qclass.
* @return: true, it worked, no malloc failures, and new addresses (lame)
* have been added, giving extra options as query targets.
*/
int iter_lookup_parent_glue_from_cache(struct module_env* env,
struct delegpt* dp, struct regional* region, struct query_info* qinfo);
/**
* Lookup next root-hint or root-forward entry.
* @param hints: the hints.
* @param fwd: the forwards.
* @param c: the class to start searching at. 0 means find first one.
* @return false if no classes found, true if found and returned in c.
*/
int iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
uint16_t* c);
/**
* Remove DS records that are inappropriate before they are cached.
* @param msg: the response to scrub.
* @param ns: RRSET that is the NS record for the referral.
* if NULL, then all DS records are removed from the authority section.
* @param z: zone name that the response is from.
*/
void iter_scrub_ds(struct dns_msg* msg, struct ub_packed_rrset_key* ns,
uint8_t* z);
/**
* Remove query attempts from all available ips. For 0x20.
* @param dp: delegpt.
* @param d: decrease.
*/
void iter_dec_attempts(struct delegpt* dp, int d);
/**
* Add retry counts from older delegpt to newer delegpt.
* Does not waste time on timeout'd (or other failing) addresses.
* @param dp: new delegationpoint.
* @param old: old delegationpoint.
*/
void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old);
/**
* See if a DS response (type ANSWER) is too low: a nodata answer with
* a SOA record in the authority section at-or-below the qchase.qname.
* Also returns true if we are not sure (i.e. empty message, CNAME nosig).
* @param msg: the response.
* @param dp: the dp name is used to check if the RRSIG gives a clue that
* it was originated from the correct nameserver.
* @return true if too low.
*/
int iter_ds_toolow(struct dns_msg* msg, struct delegpt* dp);
/**
* See if delegpt can go down a step to the qname or not
* @param qinfo: the query name looked up.
* @param dp: checked if the name can go lower to the qname
* @return true if can go down, false if that would not be possible.
* the current response seems to be the one and only, best possible, response.
*/
int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp);
#endif /* ITERATOR_ITER_UTILS_H */
+962 -154
View File
File diff suppressed because it is too large Load Diff
+57 -13
View File
@@ -55,7 +55,11 @@ struct iter_priv;
/** max number of query restarts. Determines max number of CNAME chain. */
#define MAX_RESTART_COUNT 8
/** max number of referrals. Makes sure resolver does not run away */
#define MAX_REFERRAL_COUNT 30
#define MAX_REFERRAL_COUNT 130
/** max number of queries-sent-out. Make sure large NS set does not loop */
#define MAX_SENT_COUNT 16
/** at what query-sent-count to stop target fetch policy */
#define TARGET_FETCH_STOP 3
/** how nice is a server without further information, in msec
* Equals rtt initial timeout value.
*/
@@ -65,30 +69,28 @@ struct iter_priv;
* Equals RTT_MAX_TIMEOUT
*/
#define USEFUL_SERVER_TOP_TIMEOUT 120000
/** Number of lost messages in a row that get a host blacklisted.
* With 16, a couple different queries have to time out and no working
* queries are happening */
#define USEFUL_SERVER_MAX_LOST 16
/** number of retries on outgoing queries */
#define OUTBOUND_MSG_RETRY 4
#define OUTBOUND_MSG_RETRY 5
/** RTT band, within this amount from the best, servers are chosen randomly.
* Chosen so that the UNKNOWN_SERVER_NICENESS falls within the band of a
* fast server, this causes server exploration as a side benefit. msec. */
#define RTT_BAND 400
/** Start value for blacklisting a host, 2*USEFUL_SERVER_TOP_TIMEOUT in sec */
#define INFRA_BACKOFF_INITIAL 240
/**
* Global state for the iterator.
*/
struct iter_env {
/**
* The hints -- these aren't stored in the cache because they don't
* expire. The hints are always used to "prime" the cache. Note
* that both root hints and stub zone "hints" are stored in this
* data structure.
*/
struct iter_hints* hints;
/** A flag to indicate whether or not we have an IPv6 route */
int supports_ipv6;
/** Mapping of forwarding zones to targets. */
struct iter_forwards* fwds;
/** A flag to indicate whether or not we have an IPv4 route */
int supports_ipv4;
/** A set of inetaddrs that should never be queried. */
struct iter_donotq* donotq;
@@ -149,6 +151,14 @@ enum iter_state {
/** Responses to priming queries finish at this state. */
PRIME_RESP_STATE,
/** Collecting query class information, for qclass=ANY, when
* it spawns off queries for every class, it returns here. */
COLLECT_CLASS_STATE,
/** Find NS record to resolve DS record from, walking to the right
* NS spot until we find it */
DSNS_FIND_STATE,
/** Responses that are to be returned upstream end at this state.
* As well as responses to target queries. */
FINISHED_STATE
@@ -242,6 +252,34 @@ struct iter_qstate {
/** the number of times this query as followed a referral. */
int referral_count;
/** number of queries fired off */
int sent_count;
/**
* The query must store NS records from referrals as parentside RRs
* Enabled once it hits resolution problems, to throttle retries.
* If enabled it is the pointer to the old delegation point with
* the old retry counts for bad-nameserver-addresses.
*/
struct delegpt* store_parent_NS;
/**
* The query is for parent-side glue(A or AAAA) for a nameserver.
* If the item is seen as glue in a referral, and pside_glue is NULL,
* then it is stored in pside_glue for later.
* If it was never seen, at the end, then a negative caching element
* must be created.
* The (data or negative) RR cache element then throttles retries.
*/
int query_for_pside_glue;
/** the parent-side-glue element (NULL if none, its first match) */
struct ub_packed_rrset_key* pside_glue;
/** If nonNULL we are walking upwards from DS query to find NS */
uint8_t* dsns_point;
/** length of the dname in dsns_point */
size_t dsns_point_len;
/**
* expected dnssec information for this iteration step.
* If dnssec rrsigs are expected and not given, the server is marked
@@ -249,6 +287,12 @@ struct iter_qstate {
*/
int dnssec_expected;
/**
* We are expecting dnssec information, but we also know the server
* is DNSSEC lame. The response need not be marked dnssec-lame again.
*/
int dnssec_lame_query;
/**
* This is flag that, if true, means that this event is
* waiting for a stub priming query.
@@ -283,7 +327,7 @@ struct iter_prep_list {
* Get the iterator function block.
* @return: function block with function pointers to iterator methods.
*/
struct module_func_block* iter_get_funcblock();
struct module_func_block* iter_get_funcblock(void);
/**
* Get iterator state as a string
BIN
View File
Binary file not shown.
+28 -6
View File
@@ -288,20 +288,27 @@ context_serialize_answer(struct ctx_query* q, int err, ldns_buffer* pkt,
* o uint32 id
* o uint32 error_code
* o uint32 msg_security
* o uint32 length of why_bogus string (+1 for eos); 0 absent.
* o why_bogus_string
* o the remainder is the answer msg from resolver lookup.
* remainder can be length 0.
*/
size_t pkt_len = pkt?ldns_buffer_remaining(pkt):0;
size_t wlen = (pkt&&q->res->why_bogus)?strlen(q->res->why_bogus)+1:0;
uint8_t* p;
*len = sizeof(uint32_t)*4 + pkt_len;
*len = sizeof(uint32_t)*5 + pkt_len + wlen;
p = (uint8_t*)malloc(*len);
if(!p) return NULL;
ldns_write_uint32(p, UB_LIBCMD_ANSWER);
ldns_write_uint32(p+sizeof(uint32_t), (uint32_t)q->querynum);
ldns_write_uint32(p+2*sizeof(uint32_t), (uint32_t)err);
ldns_write_uint32(p+3*sizeof(uint32_t), (uint32_t)q->msg_security);
ldns_write_uint32(p+4*sizeof(uint32_t), (uint32_t)wlen);
if(wlen > 0)
memmove(p+5*sizeof(uint32_t), q->res->why_bogus, wlen);
if(pkt_len > 0)
memmove(p+4*sizeof(uint32_t), ldns_buffer_begin(pkt), pkt_len);
memmove(p+5*sizeof(uint32_t)+wlen,
ldns_buffer_begin(pkt), pkt_len);
return p;
}
@@ -311,16 +318,31 @@ context_deserialize_answer(struct ub_ctx* ctx,
{
struct ctx_query* q = NULL ;
int id;
if(len < 4*sizeof(uint32_t)) return NULL;
size_t wlen;
if(len < 5*sizeof(uint32_t)) return NULL;
log_assert( ldns_read_uint32(p) == UB_LIBCMD_ANSWER);
id = (int)ldns_read_uint32(p+sizeof(uint32_t));
q = (struct ctx_query*)rbtree_search(&ctx->queries, &id);
if(!q) return NULL;
*err = (int)ldns_read_uint32(p+2*sizeof(uint32_t));
q->msg_security = ldns_read_uint32(p+3*sizeof(uint32_t));
if(len > 4*sizeof(uint32_t)) {
q->msg_len = len - 4*sizeof(uint32_t);
q->msg = (uint8_t*)memdup(p+4*sizeof(uint32_t), q->msg_len);
wlen = (size_t)ldns_read_uint32(p+4*sizeof(uint32_t));
if(len > 5*sizeof(uint32_t) && wlen > 0) {
if(len >= 5*sizeof(uint32_t)+wlen)
q->res->why_bogus = (char*)memdup(
p+5*sizeof(uint32_t), wlen);
if(!q->res->why_bogus) {
/* pass malloc failure to the user callback */
q->msg_len = 0;
*err = UB_NOMEM;
return q;
}
q->res->why_bogus[wlen-1] = 0; /* zero terminated for sure */
}
if(len > 5*sizeof(uint32_t)+wlen) {
q->msg_len = len - 5*sizeof(uint32_t) - wlen;
q->msg = (uint8_t*)memdup(p+5*sizeof(uint32_t)+wlen,
q->msg_len);
if(!q->msg) {
/* pass malloc failure to the user callback */
q->msg_len = 0;
+3 -1
View File
@@ -184,7 +184,9 @@ enum ub_ctx_err {
/** error in pipe communication with async bg worker */
UB_PIPE = -8,
/** error reading from file (resolv.conf) */
UB_READFILE = -9
UB_READFILE = -9,
/** error async_id does not exist or result already been delivered */
UB_NOID = -10
};
/**
+223 -6
View File
@@ -44,6 +44,7 @@
/* include the public api first, it should be able to stand alone */
#include "libunbound/unbound.h"
#include "config.h"
#include <ctype.h>
#include "libunbound/context.h"
#include "libunbound/libworker.h"
#include "util/locks.h"
@@ -60,8 +61,13 @@
#include "services/cache/infra.h"
#include "services/cache/rrset.h"
#if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H)
#include <windows.h>
#include <iphlpapi.h>
#endif /* UB_ON_WINDOWS */
struct ub_ctx*
ub_ctx_create()
ub_ctx_create(void)
{
struct ub_ctx* ctx;
unsigned int seed;
@@ -238,6 +244,19 @@ ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val)
return UB_NOERROR;
}
int
ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str)
{
int r;
lock_basic_lock(&ctx->cfglock);
r = config_get_option_collate(ctx->env->cfg, opt, str);
lock_basic_unlock(&ctx->cfglock);
if(r == 0) r = UB_NOERROR;
else if(r == 1) r = UB_SYNTAX;
else if(r == 2) r = UB_NOMEM;
return r;
}
int
ub_ctx_config(struct ub_ctx* ctx, char* fname)
{
@@ -246,7 +265,7 @@ ub_ctx_config(struct ub_ctx* ctx, char* fname)
lock_basic_unlock(&ctx->cfglock);
return UB_AFTERFINAL;
}
if(!config_read(ctx->env->cfg, fname)) {
if(!config_read(ctx->env->cfg, fname, NULL)) {
lock_basic_unlock(&ctx->cfglock);
return UB_SYNTAX;
}
@@ -262,6 +281,7 @@ ub_ctx_add_ta(struct ub_ctx* ctx, char* ta)
lock_basic_lock(&ctx->cfglock);
if(ctx->finalized) {
lock_basic_unlock(&ctx->cfglock);
free(dup);
return UB_AFTERFINAL;
}
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
@@ -281,6 +301,7 @@ ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname)
lock_basic_lock(&ctx->cfglock);
if(ctx->finalized) {
lock_basic_unlock(&ctx->cfglock);
free(dup);
return UB_AFTERFINAL;
}
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
@@ -300,6 +321,7 @@ ub_ctx_trustedkeys(struct ub_ctx* ctx, char* fname)
lock_basic_lock(&ctx->cfglock);
if(ctx->finalized) {
lock_basic_unlock(&ctx->cfglock);
free(dup);
return UB_AFTERFINAL;
}
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
@@ -460,7 +482,7 @@ ub_process(struct ub_ctx* ctx)
if(r == 0)
return UB_PIPE;
else if(r == -1)
return UB_NOERROR;
break;
if(!process_answer(ctx, msg, len)) {
free(msg);
return UB_PIPE;
@@ -642,7 +664,7 @@ ub_cancel(struct ub_ctx* ctx, int async_id)
if(!q || !q->async) {
/* it is not there, so nothing to do */
lock_basic_unlock(&ctx->cfglock);
return UB_NOERROR;
return UB_NOID;
}
log_assert(q->async);
q->cancelled = 1;
@@ -686,6 +708,7 @@ ub_resolve_free(struct ub_result* result)
free(result->data);
free(result->len);
free(result->answer_packet);
free(result->why_bogus);
free(result);
}
@@ -703,6 +726,7 @@ ub_strerror(int err)
case UB_AFTERFINAL: return "setting change after finalize";
case UB_PIPE: return "error in pipe communication with async";
case UB_READFILE: return "error reading file";
case UB_NOID: return "error async_id does not exist";
default: return "unknown error";
}
}
@@ -787,8 +811,47 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname)
char buf[1024];
char* parse, *addr;
int r;
if(fname == NULL)
if(fname == NULL) {
#if !defined(UB_ON_WINDOWS) || !defined(HAVE_WINDOWS_H)
fname = "/etc/resolv.conf";
#else
FIXED_INFO *info;
ULONG buflen = sizeof(*info);
IP_ADDR_STRING *ptr;
info = (FIXED_INFO *) malloc(sizeof (FIXED_INFO));
if (info == NULL)
return UB_READFILE;
if (GetNetworkParams(info, &buflen) == ERROR_BUFFER_OVERFLOW) {
free(info);
info = (FIXED_INFO *) malloc(buflen);
if (info == NULL)
return UB_READFILE;
}
if (GetNetworkParams(info, &buflen) == NO_ERROR) {
int retval=0;
ptr = &(info->DnsServerList);
while (ptr) {
numserv++;
if((retval=ub_ctx_set_fwd(ctx,
ptr->IpAddress.String)!=0)) {
free(info);
return retval;
}
ptr = ptr->Next;
}
free(info);
if (numserv==0)
return UB_READFILE;
return UB_NOERROR;
}
free(info);
return UB_READFILE;
#endif /* WINDOWS */
}
in = fopen(fname, "r");
if(!in) {
/* error in errno! perror(fname) */
@@ -839,8 +902,31 @@ ub_ctx_hosts(struct ub_ctx* ctx, char* fname)
return UB_AFTERFINAL;
}
lock_basic_unlock(&ctx->cfglock);
if(fname == NULL)
if(fname == NULL) {
#if defined(UB_ON_WINDOWS) && defined(HAVE_WINDOWS_H)
/*
* If this is Windows NT/XP/2K it's in
* %WINDIR%\system32\drivers\etc\hosts.
* If this is Windows 95/98/Me it's in %WINDIR%\hosts.
*/
name = getenv("WINDIR");
if (name != NULL) {
int retval=0;
snprintf(buf, sizeof(buf), "%s%s", name,
"\\system32\\drivers\\etc\\hosts");
if((retval=ub_ctx_hosts(ctx, buf)) !=0 ) {
snprintf(buf, sizeof(buf), "%s%s", name,
"\\hosts");
retval=ub_ctx_hosts(ctx, buf);
}
free(name);
return retval;
}
return UB_READFILE;
#else
fname = "/etc/hosts";
#endif /* WIN32 */
}
in = fopen(fname, "r");
if(!in) {
/* error in errno! perror(fname) */
@@ -905,3 +991,134 @@ ub_ctx_hosts(struct ub_ctx* ctx, char* fname)
fclose(in);
return UB_NOERROR;
}
/** finalize the context, if not already finalized */
static int ub_ctx_finalize(struct ub_ctx* ctx)
{
int res = 0;
lock_basic_lock(&ctx->cfglock);
if (!ctx->finalized) {
res = context_finalize(ctx);
}
lock_basic_unlock(&ctx->cfglock);
return res;
}
/* Print local zones and RR data */
int ub_ctx_print_local_zones(struct ub_ctx* ctx)
{
int res = ub_ctx_finalize(ctx);
if (res) return res;
local_zones_print(ctx->local_zones);
return UB_NOERROR;
}
/* Add a new zone */
int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type)
{
enum localzone_type t;
struct local_zone* z;
uint8_t* nm;
int nmlabs;
size_t nmlen;
int res = ub_ctx_finalize(ctx);
if (res) return res;
if(!local_zone_str2type(zone_type, &t)) {
return UB_SYNTAX;
}
if(!parse_dname(zone_name, &nm, &nmlen, &nmlabs)) {
return UB_SYNTAX;
}
lock_quick_lock(&ctx->local_zones->lock);
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
LDNS_RR_CLASS_IN))) {
/* already present in tree */
lock_rw_wrlock(&z->lock);
z->type = t; /* update type anyway */
lock_rw_unlock(&z->lock);
lock_quick_unlock(&ctx->local_zones->lock);
free(nm);
return UB_NOERROR;
}
if(!local_zones_add_zone(ctx->local_zones, nm, nmlen, nmlabs,
LDNS_RR_CLASS_IN, t)) {
lock_quick_unlock(&ctx->local_zones->lock);
return UB_NOMEM;
}
lock_quick_unlock(&ctx->local_zones->lock);
return UB_NOERROR;
}
/* Remove zone */
int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name)
{
struct local_zone* z;
uint8_t* nm;
int nmlabs;
size_t nmlen;
int res = ub_ctx_finalize(ctx);
if (res) return res;
if(!parse_dname(zone_name, &nm, &nmlen, &nmlabs)) {
return UB_SYNTAX;
}
lock_quick_lock(&ctx->local_zones->lock);
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
LDNS_RR_CLASS_IN))) {
/* present in tree */
local_zones_del_zone(ctx->local_zones, z);
}
lock_quick_unlock(&ctx->local_zones->lock);
free(nm);
return UB_NOERROR;
}
/* Add new RR data */
int ub_ctx_data_add(struct ub_ctx* ctx, char *data)
{
ldns_buffer* buf;
int res = ub_ctx_finalize(ctx);
if (res) return res;
lock_basic_lock(&ctx->cfglock);
buf = ldns_buffer_new(ctx->env->cfg->msg_buffer_size);
lock_basic_unlock(&ctx->cfglock);
if(!buf) return UB_NOMEM;
res = local_zones_add_RR(ctx->local_zones, data, buf);
ldns_buffer_free(buf);
return (!res) ? UB_NOMEM : UB_NOERROR;
}
/* Remove RR data */
int ub_ctx_data_remove(struct ub_ctx* ctx, char *data)
{
uint8_t* nm;
int nmlabs;
size_t nmlen;
int res = ub_ctx_finalize(ctx);
if (res) return res;
if(!parse_dname(data, &nm, &nmlen, &nmlabs))
return UB_SYNTAX;
local_zones_del_data(ctx->local_zones, nm, nmlen, nmlabs,
LDNS_RR_CLASS_IN);
free(nm);
return UB_NOERROR;
}
const char* ub_version(void)
{
return PACKAGE_VERSION;
}
+140 -56
View File
@@ -42,6 +42,9 @@
* returns from the procedure when done.
*/
#include "config.h"
#include <ldns/dname.h>
#include <ldns/wire2host.h>
#include <openssl/ssl.h>
#include "libunbound/libworker.h"
#include "libunbound/context.h"
#include "libunbound/unbound.h"
@@ -55,12 +58,15 @@
#include "util/random.h"
#include "util/config_file.h"
#include "util/netevent.h"
#include "util/storage/lookup3.h"
#include "util/storage/slabhash.h"
#include "util/net_help.h"
#include "util/data/dname.h"
#include "util/data/msgreply.h"
#include "util/data/msgencode.h"
#include "util/tube.h"
#include "iterator/iter_fwd.h"
#include "iterator/iter_hints.h"
/** handle new query command for bg worker */
static void handle_newq(struct libworker* w, uint8_t* buf, uint32_t len);
@@ -71,14 +77,18 @@ libworker_delete(struct libworker* w)
{
if(!w) return;
if(w->env) {
outside_network_quit_prepare(w->back);
mesh_delete(w->env->mesh);
context_release_alloc(w->ctx, w->env->alloc,
!w->is_bg || w->is_bg_thread);
ldns_buffer_free(w->env->scratch_buffer);
regional_destroy(w->env->scratch);
forwards_delete(w->env->fwds);
hints_delete(w->env->hints);
ub_randfree(w->env->rnd);
free(w->env);
}
SSL_CTX_free(w->sslctx);
outside_network_delete(w->back);
comm_base_delete(w->base);
free(w);
@@ -114,14 +124,34 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
}
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
w->env->scratch_buffer = ldns_buffer_new(cfg->msg_buffer_size);
w->env->fwds = forwards_create();
if(w->env->fwds && !forwards_apply_cfg(w->env->fwds, cfg)) {
forwards_delete(w->env->fwds);
w->env->fwds = NULL;
}
w->env->hints = hints_create();
if(w->env->hints && !hints_apply_cfg(w->env->hints, cfg)) {
hints_delete(w->env->hints);
w->env->hints = NULL;
}
if(cfg->ssl_upstream) {
w->sslctx = connect_sslctx_create(NULL, NULL, NULL);
if(!w->sslctx) {
/* to make the setup fail after unlock */
hints_delete(w->env->hints);
w->env->hints = NULL;
}
}
if(!w->is_bg || w->is_bg_thread) {
lock_basic_unlock(&ctx->cfglock);
}
if(!w->env->scratch || !w->env->scratch_buffer) {
if(!w->env->scratch || !w->env->scratch_buffer || !w->env->fwds ||
!w->env->hints) {
libworker_delete(w);
return NULL;
}
w->env->worker = (struct worker*)w;
w->env->probe_timer = NULL;
seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^
(((unsigned int)w->thread_num)<<17);
seed ^= (unsigned int)w->env->alloc->next_id;
@@ -139,9 +169,22 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
if(!w->is_bg || w->is_bg_thread) {
lock_basic_unlock(&ctx->cfglock);
}
if(1) {
/* primitive lockout for threading: if it overwrites another
* thread it is like wiping the cache (which is likely empty
* at the start) */
/* note we are holding the ctx lock in normal threaded
* cases so that is solved properly, it is only for many ctx
* in different threads that this may clash */
static int done_raninit = 0;
if(!done_raninit) {
done_raninit = 1;
hash_set_raninit((uint32_t)ub_random(w->env->rnd));
}
}
seed = 0;
w->base = comm_base_create();
w->base = comm_base_create(0);
if(!w->base) {
libworker_delete(w);
return NULL;
@@ -160,7 +203,7 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
cfg->do_tcp?cfg->outgoing_num_tcp:0,
w->env->infra_cache, w->env->rnd, cfg->use_caps_bits_for_id,
ports, numports, cfg->unwanted_threshold,
&libworker_alloc_cleanup, w);
&libworker_alloc_cleanup, w, cfg->do_udp, w->sslctx);
if(!w->is_bg || w->is_bg_thread) {
lock_basic_unlock(&ctx->cfglock);
}
@@ -174,7 +217,6 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
libworker_delete(w);
return NULL;
}
w->env->send_packet = &libworker_send_packet;
w->env->send_query = &libworker_send_query;
w->env->detach_subs = &mesh_detach_subs;
w->env->attach_sub = &mesh_attach_sub;
@@ -251,7 +293,12 @@ libworker_dobg(void* arg)
/* setup */
uint32_t m;
struct libworker* w = (struct libworker*)arg;
struct ub_ctx* ctx = w->ctx;
struct ub_ctx* ctx;
if(!w) {
log_err("libunbound bg worker init failed, nomem");
return NULL;
}
ctx = w->ctx;
log_thread_set(&w->thread_num);
#ifdef THREADS_DISABLED
/* we are forked */
@@ -260,10 +307,6 @@ libworker_dobg(void* arg)
tube_close_write(ctx->qq_pipe);
tube_close_read(ctx->rr_pipe);
#endif
if(!w) {
log_err("libunbound bg worker init failed, nomem");
return NULL;
}
if(!tube_setup_bg_listen(ctx->qq_pipe, w->base,
libworker_handle_control_cmd, w)) {
log_err("libunbound bg worker init failed, no bglisten");
@@ -300,11 +343,11 @@ int libworker_bg(struct ub_ctx* ctx)
if(ctx->dothread) {
lock_basic_unlock(&ctx->cfglock);
w = libworker_setup(ctx, 1);
if(!w) return UB_NOMEM;
w->is_bg_thread = 1;
#ifdef ENABLE_LOCK_CHECKS
w->thread_num = 1; /* for nicer DEBUG checklocks */
#endif
if(!w) return UB_NOMEM;
ub_thread_create(&ctx->bg_tid, libworker_dobg, w);
} else {
lock_basic_unlock(&ctx->cfglock);
@@ -429,8 +472,10 @@ libworker_enter_result(struct ub_result* res, ldns_buffer* buf,
/** fillup fg results */
static void
libworker_fillup_fg(struct ctx_query* q, int rcode, ldns_buffer* buf,
enum sec_status s)
enum sec_status s, char* why_bogus)
{
if(why_bogus)
q->res->why_bogus = strdup(why_bogus);
if(rcode != 0) {
q->res->rcode = rcode;
q->msg_security = s;
@@ -450,15 +495,15 @@ libworker_fillup_fg(struct ctx_query* q, int rcode, ldns_buffer* buf,
libworker_enter_result(q->res, buf, q->w->env->scratch, s);
}
/** callback with fg results */
static void
libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s)
void
libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s,
char* why_bogus)
{
struct ctx_query* q = (struct ctx_query*)arg;
/* fg query is done; exit comm base */
comm_base_exit(q->w->base);
libworker_fillup_fg(q, rcode, buf, s);
libworker_fillup_fg(q, rcode, buf, s, why_bogus);
}
/** setup qinfo and edns */
@@ -473,8 +518,15 @@ setup_qinfo_edns(struct libworker* w, struct ctx_query* q,
if(!rdf) {
return 0;
}
#ifdef UNBOUND_ALLOC_LITE
qinfo->qname = memdup(ldns_rdf_data(rdf), ldns_rdf_size(rdf));
qinfo->qname_len = ldns_rdf_size(rdf);
ldns_rdf_deep_free(rdf);
rdf = 0;
#else
qinfo->qname = ldns_rdf_data(rdf);
qinfo->qname_len = ldns_rdf_size(rdf);
#endif
edns->edns_present = 1;
edns->ext_rcode = 0;
edns->edns_version = 0;
@@ -507,8 +559,9 @@ int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q)
ldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
if(local_zones_answer(ctx->local_zones, &qinfo, &edns,
w->back->udp_buff, w->env->scratch)) {
regional_free_all(w->env->scratch);
libworker_fillup_fg(q, LDNS_RCODE_NOERROR,
w->back->udp_buff, sec_status_insecure);
w->back->udp_buff, sec_status_insecure, NULL);
libworker_delete(w);
free(qinfo.qname);
return UB_NOERROR;
@@ -531,7 +584,7 @@ int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q)
/** add result to the bg worker result queue */
static void
add_bg_result(struct libworker* w, struct ctx_query* q, ldns_buffer* pkt,
int err)
int err, char* reason)
{
uint8_t* msg = NULL;
uint32_t len = 0;
@@ -539,13 +592,21 @@ add_bg_result(struct libworker* w, struct ctx_query* q, ldns_buffer* pkt,
/* serialize and delete unneeded q */
if(w->is_bg_thread) {
lock_basic_lock(&w->ctx->cfglock);
q->msg_len = ldns_buffer_remaining(pkt);
q->msg = memdup(ldns_buffer_begin(pkt), q->msg_len);
if(!q->msg)
msg = context_serialize_answer(q, UB_NOMEM, NULL, &len);
else msg = context_serialize_answer(q, err, NULL, &len);
if(reason)
q->res->why_bogus = strdup(reason);
if(pkt) {
q->msg_len = ldns_buffer_remaining(pkt);
q->msg = memdup(ldns_buffer_begin(pkt), q->msg_len);
if(!q->msg)
msg = context_serialize_answer(q, UB_NOMEM,
NULL, &len);
else msg = context_serialize_answer(q, err,
NULL, &len);
} else msg = context_serialize_answer(q, err, NULL, &len);
lock_basic_unlock(&w->ctx->cfglock);
} else {
if(reason)
q->res->why_bogus = strdup(reason);
msg = context_serialize_answer(q, err, pkt, &len);
(void)rbtree_delete(&w->ctx->queries, q->node.key);
w->ctx->num_async--;
@@ -562,9 +623,9 @@ add_bg_result(struct libworker* w, struct ctx_query* q, ldns_buffer* pkt,
}
}
/** callback with bg results */
static void
libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s)
void
libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s,
char* why_bogus)
{
struct ctx_query* q = (struct ctx_query*)arg;
@@ -582,10 +643,12 @@ libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf, enum sec_status s)
return;
}
q->msg_security = s;
if(!buf)
buf = q->w->env->scratch_buffer;
if(rcode != 0) {
error_encode(buf, rcode, NULL, 0, BIT_RD, NULL);
}
add_bg_result(q->w, q, buf, UB_NOERROR);
add_bg_result(q->w, q, buf, UB_NOERROR, why_bogus);
}
@@ -610,7 +673,7 @@ handle_newq(struct libworker* w, uint8_t* buf, uint32_t len)
return;
}
if(!setup_qinfo_edns(w, q, &qinfo, &edns)) {
add_bg_result(w, q, NULL, UB_SYNTAX);
add_bg_result(w, q, NULL, UB_SYNTAX, NULL);
return;
}
qid = 0;
@@ -620,8 +683,9 @@ handle_newq(struct libworker* w, uint8_t* buf, uint32_t len)
ldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
if(local_zones_answer(w->ctx->local_zones, &qinfo, &edns,
w->back->udp_buff, w->env->scratch)) {
regional_free_all(w->env->scratch);
q->msg_security = sec_status_insecure;
add_bg_result(w, q, w->back->udp_buff, UB_NOERROR);
add_bg_result(w, q, w->back->udp_buff, UB_NOERROR, NULL);
free(qinfo.qname);
return;
}
@@ -629,7 +693,7 @@ handle_newq(struct libworker* w, uint8_t* buf, uint32_t len)
/* process new query */
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
w->back->udp_buff, qid, libworker_bg_done_cb, q)) {
add_bg_result(w, q, NULL, UB_NOMEM);
add_bg_result(w, q, NULL, UB_NOMEM, NULL);
}
free(qinfo.qname);
}
@@ -641,18 +705,6 @@ void libworker_alloc_cleanup(void* arg)
slabhash_clear(w->env->msg_cache);
}
int libworker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
socklen_t addrlen, int timeout, struct module_qstate* q, int use_tcp)
{
struct libworker* w = (struct libworker*)q->env->worker;
if(use_tcp) {
return pending_tcp_query(w->back, pkt, addr, addrlen,
timeout, libworker_handle_reply, q) != 0;
}
return pending_udp_query(w->back, pkt, addr, addrlen,
timeout*1000, libworker_handle_reply, q) != 0;
}
/** compare outbound entry qstates */
static int
outbound_entry_compare(void* a, void* b)
@@ -666,8 +718,8 @@ outbound_entry_compare(void* a, void* b)
struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen,
uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
struct sockaddr_storage* addr, socklen_t addrlen,
struct module_qstate* q)
int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* zone, size_t zonelen, struct module_qstate* q)
{
struct libworker* w = (struct libworker*)q->env->worker;
struct outbound_entry* e = (struct outbound_entry*)regional_alloc(
@@ -676,9 +728,10 @@ struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen,
return NULL;
e->qstate = q;
e->qsent = outnet_serviced_query(w->back, qname,
qnamelen, qtype, qclass, flags, dnssec, addr, addrlen,
libworker_handle_service_reply, e, w->back->udp_buff,
&outbound_entry_compare);
qnamelen, qtype, qclass, flags, dnssec, want_dnssec,
q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, addr,
addrlen, zone, zonelen, libworker_handle_service_reply, e,
w->back->udp_buff, &outbound_entry_compare);
if(!e->qsent) {
return NULL;
}
@@ -793,19 +846,11 @@ void worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg))
log_assert(0);
}
int worker_send_packet(ldns_buffer* ATTR_UNUSED(pkt),
struct sockaddr_storage* ATTR_UNUSED(addr),
socklen_t ATTR_UNUSED(addrlen), int ATTR_UNUSED(timeout),
struct module_qstate* ATTR_UNUSED(q), int ATTR_UNUSED(use_tcp))
{
log_assert(0);
return 0;
}
struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname),
size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
int ATTR_UNUSED(dnssec), struct sockaddr_storage* ATTR_UNUSED(addr),
int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
struct sockaddr_storage* ATTR_UNUSED(addr),
socklen_t ATTR_UNUSED(addrlen), struct module_qstate* ATTR_UNUSED(q))
{
log_assert(0);
@@ -823,6 +868,21 @@ void worker_stat_timer_cb(void* ATTR_UNUSED(arg))
log_assert(0);
}
void worker_probe_timer_cb(void* ATTR_UNUSED(arg))
{
log_assert(0);
}
void worker_start_accept(void* ATTR_UNUSED(arg))
{
log_assert(0);
}
void worker_stop_accept(void* ATTR_UNUSED(arg))
{
log_assert(0);
}
int order_lock_cmp(const void* ATTR_UNUSED(e1), const void* ATTR_UNUSED(e2))
{
log_assert(0);
@@ -836,3 +896,27 @@ codeline_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
return 0;
}
int replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
{
log_assert(0);
return 0;
}
void remote_get_opt_ssl(char* ATTR_UNUSED(str), void* ATTR_UNUSED(arg))
{
log_assert(0);
}
#ifdef UB_ON_WINDOWS
void
worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void*
ATTR_UNUSED(arg)) {
log_assert(0);
}
void
wsvc_cron_cb(void* ATTR_UNUSED(arg))
{
log_assert(0);
}
#endif /* UB_ON_WINDOWS */
+15 -16
View File
@@ -81,6 +81,8 @@ struct libworker {
struct outside_network* back;
/** random() table for this worker. */
struct ub_randstate* rndstate;
/** sslcontext for SSL wrapped DNS over TCP queries */
void* sslctx;
};
/**
@@ -107,20 +109,6 @@ int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q);
/** cleanup the cache to remove all rrset IDs from it, arg is libworker */
void libworker_alloc_cleanup(void* arg);
/**
* Worker service routine to send udp messages for modules.
* @param pkt: packet to send.
* @param addr: where to.
* @param addrlen: length of addr.
* @param timeout: seconds to wait until timeout.
* @param q: wich query state to reactivate upon return.
* @param use_tcp: true to use TCP, false for UDP.
* @return: false on failure (memory or socket related). no query was
* sent.
*/
int libworker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
socklen_t addrlen, int timeout, struct module_qstate* q, int use_tcp);
/**
* Worker service routine to send serviced queries to authoritative servers.
* @param qname: query name. (host order)
@@ -129,16 +117,19 @@ int libworker_send_packet(ldns_buffer* pkt, struct sockaddr_storage* addr,
* @param qclass: query class. (host order)
* @param flags: host order flags word, with opcode and CD bit.
* @param dnssec: if set, EDNS record will have DO bit set.
* @param want_dnssec: signatures needed.
* @param addr: where to.
* @param addrlen: length of addr.
* @param zone: delegation point name.
* @param zonelen: length of zone name wireformat dname.
* @param q: wich query state to reactivate upon return.
* @return: false on failure (memory or socket related). no query was
* sent.
*/
struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen,
uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
struct sockaddr_storage* addr, socklen_t addrlen,
struct module_qstate* q);
int want_dnssec, struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* zone, size_t zonelen, struct module_qstate* q);
/** process incoming replies from the network */
int libworker_handle_reply(struct comm_point* c, void* arg, int error,
@@ -156,6 +147,14 @@ void libworker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len,
void libworker_handle_result_write(struct tube* tube, uint8_t* msg, size_t len,
int err, void* arg);
/** mesh callback with fg results */
void libworker_fg_done_cb(void* arg, int rcode, ldns_buffer* buf,
enum sec_status s, char* why_bogus);
/** mesh callback with bg results */
void libworker_bg_done_cb(void* arg, int rcode, ldns_buffer* buf,
enum sec_status s, char* why_bogus);
/**
* fill result from parsed message, on error fills servfail
* @param res: is clear at start, filled in at end.
+28
View File
@@ -0,0 +1,28 @@
Copyright (c) 2009, Zdenek Vasicek (vasicek AT fit.vutbr.cz)
Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organization nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
+75
View File
@@ -0,0 +1,75 @@
#
# Makefile: compilation of pyUnbound and documentation, testing
#
# Copyright (c) 2009, Zdenek Vasicek (vasicek AT fit.vutbr.cz)
# Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
#
# This software is open source.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the organization nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " testenv to make test environment and run bash "
@echo " usefull in case you don't want to install unbound but want to test examples"
@echo " doc to make documentation"
@echo " clean clean all"
.PHONY: testenv clean doc swig
#_unbound.so: ../../Makefile
#$(MAKE) -C ../..
#../../.libs/libunbound.so.0: ../../Makefile
#$(MAKE) -C ../..
#../../ldns-src/lib/libldns.so: ../../ldns-src/Makefile
#$(MAKE) -C ../../ldns-src
clean:
rm -rdf examples/unbound
rm -f _unbound.so libunbound_wrap.o
$(MAKE) -C ../.. clean
testenv: ../../.libs/libunbound.so.2 ../../ldns-src/lib/libldns.so ../../.libs/_unbound.so
rm -rdf examples/unbound
cd examples && mkdir unbound && ln -s ../../unbound.py unbound/__init__.py && ln -s ../../_unbound.so unbound/_unbound.so && ln -s ../../../../.libs/libunbound.so.2 unbound/libunbound.so.2 && ln -s ../../../../ldns-src/lib/libldns.so.1 unbound/libldns.so.1 && ls -la
cd examples && if test -f ../../../.libs/_unbound.so; then cp ../../../.libs/_unbound.so . ; fi
@echo "Run a script by typing ./script_name.py"
cd examples && LD_LIBRARY_PATH=unbound bash
rm -rdf examples/unbound examples/_unbound.so
doc: ../../.libs/libunbound.so.0 _unbound.so
$(MAKE) -C docs html
#for development only
swig: libunbound.i
swig -python -o libunbound_wrap.c -I../.. libunbound.i
gcc -c libunbound_wrap.c -O9 -fPIC -I../.. -I/usr/include/python2.5 -I. -o libunbound_wrap.o
gcc -shared libunbound_wrap.o -L../../.libs -lunbound -o _unbound.so
+1
View File
@@ -0,0 +1 @@
this directory exists to pacify sphinx-build.
+181
View File
@@ -0,0 +1,181 @@
# -*- coding: utf-8 -*-
#
# Unbound documentation build configuration file
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
import sys, os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../../../')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../../../.libs/')))
#print sys.path
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General substitutions.
project = 'pyUnbound'
copyright = '2009, Zdenek Vasicek, Marek Vavrusa'
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directories, that shouldn't be searched
# for source files.
#exclude_dirs = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# Options for HTML output
# -----------------------
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = 'default.css'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (within the static path) to place at the top of
# the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
html_use_modindex = False
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, the reST sources are included in the HTML build as _sources/<name>.
html_copy_source = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'Unbounddoc'
# Options for LaTeX output
# ------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('index', 'Unbound.tex', 'Unbound Documentation',
'Zdenek Vasicek, Marek Vavrusa', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_use_modindex = True
@@ -0,0 +1,26 @@
.. _example_resolve_name:
==============================
Resolve a name
==============================
This basic example shows how to create a context and resolve a host address (DNS record of A type).
::
#!/usr/bin/python
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve("www.google.com")
if status == 0 and result.havedata:
print "Result.data:", result.data.address_list
elif status != 0:
print "Resolve error:", unbound.ub_strerror(status)
In contrast with C API, the source code is more compact while the performance of C implementation is preserved.
The main advantage is that you need not take care about the deallocation and allocation of context and result structures; pyUnbound module do it automatically for you.
If only domain name is given, the :meth:`unbound.ub_ctx.resolve` looks for A records in IN class.
@@ -0,0 +1,33 @@
.. _example_reverse_lookup:
==============================
Reverse DNS lookup
==============================
Reverse DNS lookup involves determining the hostname associated with a given IP address.
This example shows how reverse lookup can be done using unbound module.
For the reverse DNS records, the special domain in-addr.arpa is reserved.
For example, a host name for the IP address 74.125.43.147 can be obtained by issuing a DNS query for the PTR record for address 147.43.125.74.in-addr.arpa.
::
#!/usr/bin/python
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result.data:", result.data.domain_list
elif status != 0:
print "Resolve error:", unbound.ub_strerror(status)
In order to simplify the python code, unbound module contains function which reverses the hostname components.
This function is defined as follows::
def reverse(domain):
return '.'.join([a for a in domain.split(".")][::-1])
@@ -0,0 +1,41 @@
.. _example_setup_ctx:
==============================
Lookup from threads
==============================
This example shows how to use unbound module from a threaded program.
In this example, three lookup threads are created which work in background.
Each thread resolves different DNS record.
::
#!/usr/bin/python
from unbound import ub_ctx, RR_TYPE_A, RR_CLASS_IN
from threading import Thread
ctx = ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
class LookupThread(Thread):
def __init__(self,ctx, name):
Thread.__init__(self)
self.ctx = ctx
self.name = name
def run(self):
print "Thread lookup started:",self.name
status, result = self.ctx.resolve(self.name, RR_TYPE_A, RR_CLASS_IN)
if status == 0 and result.havedata:
print " Result:",self.name,":", result.data.address_list
threads = []
for name in ["www.fit.vutbr.cz","www.vutbr.cz","www.google.com"]:
thread = LookupThread(ctx, name)
thread.start()
threads.append(thread)
for thread in threads:
thread.join()
@@ -0,0 +1,36 @@
.. _example_asynch:
==============================
Asynchronous lookup
==============================
This example performs the name lookup in the background.
The main program keeps running while the name is resolved.
::
#!/usr/bin/python
import time
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
def call_back(my_data,status,result):
print "Call_back:", my_data
if status == 0 and result.havedata:
print "Result:", result.data.address_list
my_data['done_flag'] = True
my_data = {'done_flag':False,'arbitrary':"object"}
status, async_id = ctx.resolve_async("www.seznam.cz", my_data, call_back, unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
while (status == 0) and (not my_data['done_flag']):
status = ctx.process()
time.sleep(0.1)
if (status != 0):
print "Resolve error:", unbound.ub_strerror(status)
The :meth:`unbound.ub_ctx.resolve_async` method is able to pass on any Python object. In this example, we used a dictionary object `my_data`.
@@ -0,0 +1,34 @@
.. _example_examine:
==============================
DNSSEC validator
==============================
This example program performs DNSSEC validation of a DNS lookup.
::
#!/usr/bin/python
import os
from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN
ctx = ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
if (os.path.isfile("keys")):
ctx.add_ta_file("keys") #read public keys for DNSSEC verification
status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:", result.data.address_list
if result.secure:
print "Result is secure"
elif result.bogus:
print "Result is bogus"
else:
print "Result is insecure"
More detailed informations can be seen in libUnbound DNSSEC tutorial `here`_.
.. _here: http://www.unbound.net/documentation/libunbound-tutorial-6.html
@@ -0,0 +1,29 @@
.. _example_resolver_only:
==============================
Resolver only
==============================
This example program shows how to perform DNS resolution only.
Unbound contains two basic modules: resolver and validator.
In case, the validator is not necessary, the validator module can be turned off using "module-config" option.
This option contains a list of module names separated by the space char. This list determined which modules should be employed and in what order.
::
#!/usr/bin/python
import os
from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN
ctx = ub_ctx()
ctx.set_option("module-config:","iterator")
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve("www.google.com", RR_TYPE_A, RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:", result.data.address_list
.. note::
The :meth:`unbound.ub_ctx.set_option` method must be used before the first resolution (i.e. before :meth:`unbound.ub_ctx.resolve` or :meth:`unbound.ub_ctx.resolve_async` call).
@@ -0,0 +1,27 @@
#!/usr/bin/python
from unbound import ub_ctx,ub_strerror,RR_TYPE_A,RR_CLASS_IN
ctx = ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve("test.record.xxx", RR_TYPE_A, RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:", result.data.address_list
else:
print "No record found"
#define new local zone
status = ctx.zone_add("xxx.","static")
if (status != 0): print "Error zone_add:",status, ub_strerror(status)
#add RR to the zone
status = ctx.data_add("test.record.xxx. IN A 1.2.3.4")
if (status != 0): print "Error data_add:",status, ub_strerror(status)
#lookup for an A record
status, result = ctx.resolve("test.record.xxx", RR_TYPE_A, RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:", result.data.as_address_list()
else:
print "No record found"
@@ -0,0 +1,11 @@
.. _example_localzone:
==============================
Local zone manipulation
==============================
This example program shows how to define local zone containing custom DNS records.
.. literalinclude:: example6-1.py
:language: python
@@ -0,0 +1,17 @@
#!/usr/bin/python
# vim:fileencoding=utf-8
#
# IDN (Internationalized Domain Name) lookup support
#
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve(u"www.háčkyčárky.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", result.data
for k in result.data.address_list:
print " address:%s" % k
@@ -0,0 +1,16 @@
#!/usr/bin/python
# vim:fileencoding=utf-8
#
# IDN (Internationalized Domain Name) lookup support (lookup for MX)
#
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve(u"háčkyčárky.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", result.data
for k in result.data.mx_list_idn:
print " priority:%d address:%s" % k
@@ -0,0 +1,18 @@
.. _example_idna:
=================================================
Internationalized domain name support
=================================================
Unlike the libUnbound, pyUnbound is able to handle IDN queries.
.. literalinclude:: example7-1.py
:language: python
If we use unicode string in :meth:`unbound.ub_ctx.resolve` method, the IDN DNAME conversion (if it is necessary) is performed on background.
.. literalinclude:: example7-2.py
:language: python
The :class:`unbound.ub_data` class contains attributes suffix which converts the dname to UTF string. These attributes have the '_idn' suffix.
Apart from this aproach, two conversion functions exist (:func:`unbound.idn2dname` and :func:`unbound.dname2idn`).
@@ -0,0 +1,31 @@
#!/usr/bin/python
# vim:fileencoding=utf-8
#
# Lookup for MX and NS records
#
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", result.data
for k in result.data.mx_list:
print " priority:%d address:%s" % k
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", result.data
for k in result.data.address_list:
print " address:%s" % k
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", result.data
for k in result.data.domain_list:
print " host: %s" % k
@@ -0,0 +1,28 @@
.. _example_mxlookup:
=================================================
Lookup for MX and NS records
=================================================
The pyUnbound extension provides functions which are able to encode RAW RDATA produces by unbound resolver (see :class:`unbound.ub_data`).
.. literalinclude:: example8-1.py
:language: python
Previous example produces following output::
Result:
raw data: 00 0F 05 6D 61 69 6C 34 03 6E 69 63 02 63 7A 00;00 14 02 6D 78 05 63 7A 6E 69 63 03 6F 72 67 00;00 0A 04 6D 61 69 6C 03 6E 69 63 02 63 7A 00
priority:15 address: mail4.nic.cz.
priority:20 address: mx.cznic.org.
priority:10 address: mail.nic.cz.
Result:
raw data: D9 1F CD 32
address: 217.31.205.50
Result:
raw data: 01 61 02 6E 73 03 6E 69 63 02 63 7A 00;01 65 02 6E 73 03 6E 69 63 02 63 7A 00;01 63 02 6E 73 03 6E 69 63 02 63 7A 00
host: a.ns.nic.cz.
host: e.ns.nic.cz.
host: c.ns.nic.cz.
+14
View File
@@ -0,0 +1,14 @@
Examples
==============================
Here you can find several examples which utilizes the unbound library in Python environment.
Unbound is a caching validator and resolver and can be linked into an application, as a library where can answer DNS queries for the application.
This set of examples shows how to use the functions from Python environment.
`Tutorials`
.. toctree::
:maxdepth: 1
:glob:
example*

Some files were not shown because too many files have changed in this diff Show More