Compare commits

...
Author SHA1 Message Date
Wouter Wijngaards b0a1e50452 1.6.0rc1 tag
git-svn-id: file:///svn/unbound/tags/release-1.6.0rc1@3958 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-08 09:39:25 +00:00
Wouter Wijngaards 07bbd6c95a - Fix downcast warnings from visual studio in sldns code.
git-svn-id: file:///svn/unbound/trunk@3957 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-08 08:49:12 +00:00
Ralph Dolmans f761bc3cdd - Fix remote control without certificate for LibreSSL
git-svn-id: file:///svn/unbound/trunk@3956 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-07 14:13:01 +00:00
Wouter Wijngaards e28903cb6d autoconf
git-svn-id: file:///svn/unbound/trunk@3955 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-07 13:04:46 +00:00
Ralph Dolmans 4f487cf746 Add DSA support for OpenSSL 1.1
git-svn-id: file:///svn/unbound/trunk@3954 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-07 12:58:47 +00:00
George Thessalonikefs 87fd7da6d7 make depend
git-svn-id: file:///svn/unbound/trunk@3953 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 15:29:35 +00:00
Wouter Wijngaards f15350b776 Unused variable warnings.
git-svn-id: file:///svn/unbound/trunk@3952 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 14:42:20 +00:00
George Thessalonikefs 3ac8cf0380 please lint again.
git-svn-id: file:///svn/unbound/trunk@3951 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 14:41:14 +00:00
George Thessalonikefs 9323fa7688 please lint again.
git-svn-id: file:///svn/unbound/trunk@3950 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 14:33:08 +00:00
George Thessalonikefs c879fa1e79 please lint.
git-svn-id: file:///svn/unbound/trunk@3949 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 14:15:49 +00:00
George Thessalonikefs ba448fbd54 - Minor Python doc fix for testing commit post-hooks.
git-svn-id: file:///svn/unbound/trunk@3948 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 14:04:42 +00:00
George Thessalonikefs 7b948b0647 - Added generic EDNS code for registering known EDNS option codes,
bypassing the cache response stage and uniquifying mesh states. Four EDNS
  option lists were added to module_qstate (module_qstate.edns_opts_*) to
  store EDNS options from/to front/back side.
- Added two flags to module_qstate (no_cache_lookup, no_cache_store) that
  control the modules' cache interactions.
- Added code for registering inplace callback functions. The registered
  functions can be called just before replying with local data or Chaos,
  replying from cache, replying with SERVFAIL, replying with a resolved
  query, sending a query to a nameserver. The functions can inspect the
  available data and maybe change response/query related data (i.e. append
  EDNS options).
- Updated Python module for the above.
- Updated Python documentation.



git-svn-id: file:///svn/unbound/trunk@3947 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 13:42:51 +00:00
Ralph Dolmans 3e1ff464f1 add unset type to localzone_type enum, used for unset tag_action elements
git-svn-id: file:///svn/unbound/trunk@3946 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-05 15:52:47 +00:00
Ralph Dolmans 3b96c4c9cd - Fix #1173: differ local-zone type deny from unset tag_actions element.
git-svn-id: file:///svn/unbound/trunk@3945 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-05 14:48:49 +00:00
Wouter Wijngaards b7a314a7dc - Fix #1170: document that 'inform' local-zone uses local-data.
git-svn-id: file:///svn/unbound/trunk@3944 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-05 12:59:08 +00:00
Ralph Dolmans 3044b805b3 Remove bugzila reference
git-svn-id: file:///svn/unbound/trunk@3943 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-01 14:49:54 +00:00
Ralph Dolmans e500340621 - hyphen as minus fix, by Andreas Schulze
git-svn-id: file:///svn/unbound/trunk@3942 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-01 09:34:02 +00:00
Ralph Dolmans 61b23e3811 - Added local-zones and local-data bulk addition and removal functionality in
unbound-control (local_zones, local_zones_remove, local_datas and
  local_datas_remove).                                   
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3941 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-30 11:22:29 +00:00
Wouter Wijngaards c604b9c6a9 Fixup for windows compile.
git-svn-id: file:///svn/unbound/trunk@3940 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-29 15:49:37 +00:00
Wouter Wijngaards 6450a5b191 - braces in view.c around lock statements.
git-svn-id: file:///svn/unbound/trunk@3939 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-29 15:28:25 +00:00
Wouter Wijngaards e502757963 - version 1.6.0 is in the development branch.
git-svn-id: file:///svn/unbound/trunk@3938 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-29 13:33:09 +00:00
Wouter Wijngaards 3815009cf1 - new install-sh.
git-svn-id: file:///svn/unbound/trunk@3937 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-28 09:52:02 +00:00
Wouter Wijngaards 92bff79d3d - Fix that with openssl 1.1 control-use-cert: no uses less cpu, by
using no encryption over the unix socket.


git-svn-id: file:///svn/unbound/trunk@3936 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-25 16:14:14 +00:00
Ralph Dolmans 2dce3856cd Check and free data allocated by fname_after_chroot
git-svn-id: file:///svn/unbound/trunk@3935 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-23 11:21:10 +00:00
Wouter Wijngaards a6e3ed1025 - patch from Dag-Erling Smorgrav that removes code that relies
on sbrk().


git-svn-id: file:///svn/unbound/trunk@3934 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 15:50:07 +00:00
Ralph Dolmans d3b85ed7d8 - Added unit test for QNAME minimisation + harden below nxdomain
synergy.


git-svn-id: file:///svn/unbound/trunk@3933 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 13:53:51 +00:00
Ralph Dolmans 9581c39dcc - QNAME minimisation uses QTYPE=A, therefore always check cache for
this type in harden-below-nxdomain functionality.


git-svn-id: file:///svn/unbound/trunk@3932 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 10:50:53 +00:00
Wouter Wijngaards 88e8fb1029 remove unused variables.
git-svn-id: file:///svn/unbound/trunk@3931 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 10:18:33 +00:00
Ralph Dolmans 3e5cf4da0b - Make access-control-tag-data RDATA absolute. This makes the RDATA origin
consistent between local-data and access-control-tag-data.
- Fix NSEC ENT wildcard check. Matching wildcard does not have to be a subdomain
  of the NSEC owner.



git-svn-id: file:///svn/unbound/trunk@3930 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 10:10:48 +00:00
Wouter Wijngaards 632e60eccd - Fix unit tests for DS hash processing for fake-dsa test option.
git-svn-id: file:///svn/unbound/trunk@3929 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 08:23:24 +00:00
Wouter Wijngaards f4673d87ce - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3928 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 08:22:49 +00:00
Wouter Wijngaards 3132937112 - Fix #1158: reference RFC 8020 "NXDOMAIN: There Really Is Nothing
Underneath" for the harden-below-nxdomain option.



git-svn-id: file:///svn/unbound/trunk@3927 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-21 09:53:43 +00:00
Ralph Dolmans e6678abba6 - Fix #1155: test status code of unbound-control in 04-checkconf, not the status
code from the tee command.


git-svn-id: file:///svn/unbound/trunk@3926 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-10 11:20:27 +00:00
Wouter Wijngaards ba274dd312 - Note that for harden-below-nxdomain the nxdomain must be secure,
this means nsec3 with optout is insufficient.


git-svn-id: file:///svn/unbound/trunk@3925 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 14:49:43 +00:00
Ralph Dolmans 11031a7d36 pass ssl_upstream as int to (lib)worker_send_query
git-svn-id: file:///svn/unbound/trunk@3924 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 14:02:22 +00:00
Ralph Dolmans efe248c46a - Added stub-ssl-upstream and forward-ssl-upstream options.
git-svn-id: file:///svn/unbound/trunk@3923 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 12:07:52 +00:00
Wouter Wijngaards 68e4ef21db - Fix #1154: segfault when reading config with duplicate zones.
git-svn-id: file:///svn/unbound/trunk@3922 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 08:16:55 +00:00
Wouter Wijngaards fa81710d16 - configure detects ssl security level API function in the autoconf
manner.  Every function on its own, so that other libraries (eg.
  LibreSSL) can develop their API without hindrance.


git-svn-id: file:///svn/unbound/trunk@3921 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 08:05:42 +00:00
Wouter Wijngaards 3b4cbcf631 Fixup #if at start of line, for portability.
git-svn-id: file:///svn/unbound/trunk@3920 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-04 07:58:57 +00:00
Ralph Dolmans 589eabc0cb Set openssl security level to 0 when using aNULL ciphers
git-svn-id: file:///svn/unbound/trunk@3919 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-03 16:59:00 +00:00
Wouter Wijngaards c22f958152 Free log_identity config string.
git-svn-id: file:///svn/unbound/trunk@3918 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-03 13:19:12 +00:00
Wouter Wijngaards 680e14cb65 - log-identity: config option to set sys log identity, patch from
"Robin H. Johnson" <robbat2@gentoo.org>


git-svn-id: file:///svn/unbound/trunk@3917 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-03 08:51:40 +00:00
Wouter Wijngaards b8cd36af89 - .gitattributes line for githubs code language display.
git-svn-id: file:///svn/unbound/trunk@3916 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-03 08:29:29 +00:00
Wouter Wijngaards 680a504652 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3915 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-02 08:43:14 +00:00
Wouter Wijngaards 0e79c3ddc0 change to test cronjob-2.
git-svn-id: file:///svn/unbound/trunk@3914 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-02 08:38:03 +00:00
Wouter Wijngaards 20888cfa59 Change to test commit cronjob.
git-svn-id: file:///svn/unbound/trunk@3913 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-02 07:22:20 +00:00
Wouter Wijngaards d2548b25f2 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3912 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-31 08:18:17 +00:00
Wouter Wijngaards 705e3e8d1c - Fix failure to build on arm64 with no sbrk.
git-svn-id: file:///svn/unbound/trunk@3911 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-31 08:05:41 +00:00
Wouter Wijngaards 96961081b0 - Patch for server.num.zero_ttl stats for count of expired replies,
from Pavel Odintsov.


git-svn-id: file:///svn/unbound/trunk@3910 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-28 15:08:32 +00:00
Wouter Wijngaards 27182d614b - Fix unit tests for openssl 1.1, with no DSA, by faking DSA, enabled
with the undocumented switch 'fake-dsa'.  It logs a warning.


git-svn-id: file:///svn/unbound/trunk@3909 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-26 07:38:00 +00:00
Wouter Wijngaards b76d5dfc5b - Fix #1134: unbound-control set_option -- val-override-date: -1 works
immediately to ignore datetime, or back to 0 to enable it again.
  The -- is to ignore the '-1' as an option flag.


git-svn-id: file:///svn/unbound/trunk@3908 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-25 11:49:08 +00:00
Wouter Wijngaards 147a6c8548 - Fix #1134: unbound-control set_option val-date-override: -1 works
immediately to ignore datetime, or back to 0 to enable it again.


git-svn-id: file:///svn/unbound/trunk@3907 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-25 11:44:03 +00:00
Wouter Wijngaards 6e2e8c047f g.root-servers.net has AAAA address.
git-svn-id: file:///svn/unbound/trunk@3906 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-24 13:11:39 +00:00
Wouter Wijngaards 58cb15c52a Fixup cachedb for root prime module return.
git-svn-id: file:///svn/unbound/trunk@3905 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-24 13:01:19 +00:00
Wouter Wijngaards a4fae019de Fixup prefetch only when needed
git-svn-id: file:///svn/unbound/trunk@3904 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-24 12:53:13 +00:00
Wouter Wijngaards a9a65800b8 - serve-expired config option: serve expired responses with TTL 0.
git-svn-id: file:///svn/unbound/trunk@3903 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-24 12:43:20 +00:00
Wouter Wijngaards f8ba15e8dd - Ported tests for local_cname unit test to testbound framework.
git-svn-id: file:///svn/unbound/trunk@3902 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-21 08:59:56 +00:00
Wouter Wijngaards 2785225a43 - Fixup query_info local_alias init.
git-svn-id: file:///svn/unbound/trunk@3901 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 15:05:30 +00:00
Wouter Wijngaards f22a9f2762 Fixup chachedb printout.
git-svn-id: file:///svn/unbound/trunk@3900 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 14:56:08 +00:00
Wouter Wijngaards 4cd296a3f3 - Fixup query_info local_alias init.
git-svn-id: file:///svn/unbound/trunk@3899 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 14:55:57 +00:00
Wouter Wijngaards cfef4ba047 - Fix DNSSEC validation of query type ANY with DNAME answers.
git-svn-id: file:///svn/unbound/trunk@3898 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 14:27:13 +00:00
Wouter Wijngaards 304f1bb457 - fix --enable-dsa to work, instead of copying ecdsa enable.
git-svn-id: file:///svn/unbound/trunk@3897 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 09:22:04 +00:00
Wouter Wijngaards 44ab21485d - init lzt variable, for older gcc compiler warnings.
git-svn-id: file:///svn/unbound/trunk@3896 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 07:57:12 +00:00
Wouter Wijngaards 3d62b46073 - suppress compile warning in lex files.
git-svn-id: file:///svn/unbound/trunk@3895 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 07:46:35 +00:00
Wouter Wijngaards 4621d209ca - Fix #1130: whitespace in example.conf.in more consistent.
git-svn-id: file:///svn/unbound/trunk@3894 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-19 07:15:41 +00:00
Wouter Wijngaards 8c1ecf875e Template entry for unit test.
git-svn-id: file:///svn/unbound/trunk@3893 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 14:27:08 +00:00
Wouter Wijngaards 9b43579c03 - Please doxygen by modifying mesh.h
git-svn-id: file:///svn/unbound/trunk@3892 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:59:17 +00:00
Wouter Wijngaards ae2263d165 Fixup changelog bug number to 1118.
git-svn-id: file:///svn/unbound/trunk@3891 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:58:09 +00:00
Wouter Wijngaards db72f77581 - Added Requires line to libunbound.pc
git-svn-id: file:///svn/unbound/trunk@3890 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:57:39 +00:00
Wouter Wijngaards 63d4bcde56 - Fix #1117: libunbound.pc sets strange Libs, Libs.private values.
git-svn-id: file:///svn/unbound/trunk@3889 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:56:42 +00:00
Wouter Wijngaards 365a5666f3 - Fix #1125: unbound could reuse an answer packet incorrectly for
clients with different EDNS parameters, from Jinmei Tatuya.


git-svn-id: file:///svn/unbound/trunk@3888 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:42:08 +00:00
Wouter Wijngaards 5935cf1c41 - Added documentation doc/CNAME-basedRedirectionDesignNotes.pdf,
from Jinmei Tatuya (Infoblox).


git-svn-id: file:///svn/unbound/trunk@3887 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:21:35 +00:00
Wouter Wijngaards 9d2b5ca345 - Removed patch comments from acllist.c and msgencode.c
git-svn-id: file:///svn/unbound/trunk@3886 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:20:42 +00:00
Wouter Wijngaards 503df095b2 - Patch that resolves CNAMEs entered in local-data conf statements that
point to data on the internet, from Jinmei Tatuya (Infoblox).


git-svn-id: file:///svn/unbound/trunk@3885 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:18:20 +00:00
Wouter Wijngaards 70dbd1c382 - Fixup const void cast warning.
git-svn-id: file:///svn/unbound/trunk@3884 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-17 15:17:15 +00:00
Wouter Wijngaards 223c7c0080 - Fixup const void cast warning.
git-svn-id: file:///svn/unbound/trunk@3883 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-17 15:05:20 +00:00
Wouter Wijngaards dd2711d78c - Re-fix #839 from view commit overwrite.
git-svn-id: file:///svn/unbound/trunk@3882 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-17 14:37:59 +00:00
Ralph Dolmans 840142397d - Free view config elements.
git-svn-id: file:///svn/unbound/trunk@3881 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-12 10:09:42 +00:00
Ralph Dolmans de7bc9f96e - fix memoryleak logfile when in debug mode.
git-svn-id: file:///svn/unbound/trunk@3880 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-11 13:43:18 +00:00
Ralph Dolmans 750ead5be2 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3879 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-11 11:44:41 +00:00
Ralph Dolmans 9c0944ec1e - Added qname-minimisation-strict config option.
git-svn-id: file:///svn/unbound/trunk@3878 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-11 11:32:50 +00:00
Ralph Dolmans 0b3138e1bf - Fix #1117: spelling errors, from Robert Edmonds
git-svn-id: file:///svn/unbound/trunk@3877 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-05 09:56:05 +00:00
Ralph Dolmans b587c7f72d Added views functionality.
git-svn-id: file:///svn/unbound/trunk@3876 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-05 09:36:25 +00:00
Wouter Wijngaards 145bdd7466 - Fix Nits for 1.5.10 reported by Dag-Erling Smorgrav.
git-svn-id: file:///svn/unbound/trunk@3875 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-30 09:37:20 +00:00
Wouter Wijngaards 51652cf8d5 - Fix #841: big local-zone's make it consume large amounts of memory.
git-svn-id: file:///svn/unbound/trunk@3874 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-29 13:11:26 +00:00
Wouter Wijngaards db82fbadc1 - Fix #840: infinite loop in unbound_munin_ plugin on unowned lockfile.
git-svn-id: file:///svn/unbound/trunk@3873 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-29 11:51:14 +00:00
Wouter Wijngaards 3334ab389c - Fix #839: Memory grows unexpectedly with large RPZ files.
git-svn-id: file:///svn/unbound/trunk@3872 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-29 08:08:51 +00:00
Wouter Wijngaards 52dbaa4ac1 - Fix #838: 1.5.10 cannot be built on Solaris, undefined PATH_MAX.
git-svn-id: file:///svn/unbound/trunk@3871 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-29 07:00:31 +00:00
Wouter Wijngaards 8a19ff3baf - Fix #836: unbound could echo back EDNS options in an error response.
git-svn-id: file:///svn/unbound/trunk@3870 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-27 12:22:56 +00:00
Wouter Wijngaards 2127c65561 - Fix dnstap relaying "random" messages instead of resolver/forwarder
responses, from Nikolay Edigaryev.


git-svn-id: file:///svn/unbound/trunk@3869 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-27 11:56:55 +00:00
Wouter Wijngaards b3a7ec4f56 1.5.11 in development.
git-svn-id: file:///svn/unbound/trunk@3868 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-27 11:44:35 +00:00
Wouter Wijngaards 23545a077c - tag for 1.5.10rc1 release.
git-svn-id: file:///svn/unbound/trunk@3865 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-20 12:23:16 +00:00
Wouter Wijngaards cd842fafb9 - Fix #835: fix --disable-dsa with nettle verify.
git-svn-id: file:///svn/unbound/trunk@3864 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-20 12:22:07 +00:00
Wouter Wijngaards 9996021d34 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3863 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-20 11:26:42 +00:00
Ralph Dolmans 5a56d54086 Check for LibreSSL usage when OpenSSL version number >= 1.1
git-svn-id: file:///svn/unbound/trunk@3862 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 14:40:42 +00:00
Wouter Wijngaards e5a6403b81 Check for init_ssl correctly.
git-svn-id: file:///svn/unbound/trunk@3861 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 13:45:35 +00:00
Wouter Wijngaards 42d2190343 - Test for openssl init_crypto and init_ssl functions.
git-svn-id: file:///svn/unbound/trunk@3860 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 12:03:10 +00:00
Wouter Wijngaards ac5ba1b8ec Fixup unlock.
git-svn-id: file:///svn/unbound/trunk@3859 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 11:48:37 +00:00
Wouter Wijngaards 10e6b1ed99 - Fix 883: error for duplicate local zone entry.
git-svn-id: file:///svn/unbound/trunk@3858 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 10:59:26 +00:00
Ralph Dolmans c879d6824b iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3857 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 08:49:52 +00:00
Ralph Dolmans e2e34ad273 fix potential memory leak in daemon/remote.c and nullpointer dereference in
validator/autotrust.


git-svn-id: file:///svn/unbound/trunk@3856 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 08:39:59 +00:00
Wouter Wijngaards 1fe24566ad please lint but also allow larger structure
git-svn-id: file:///svn/unbound/trunk@3855 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-13 11:38:16 +00:00
Wouter Wijngaards 9d4eb4cac5 - Fix for new splint on FreeBSD. Fix cast for sockaddr_un.sun_len.
git-svn-id: file:///svn/unbound/trunk@3854 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-13 11:35:33 +00:00
Wouter Wijngaards d77901e8ed attempt to fix freebsd splint output.
git-svn-id: file:///svn/unbound/trunk@3853 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-13 10:51:04 +00:00
Wouter Wijngaards 0c954d99c3 - Silenced flex-generated sign-unsigned warning print with gcc
diagnostic pragma.


git-svn-id: file:///svn/unbound/trunk@3852 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-13 10:44:24 +00:00
Wouter Wijngaards 2db3851430 - Fix #831: workaround for spurious fread_chk warning against petal.c
git-svn-id: file:///svn/unbound/trunk@3851 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-09 05:55:16 +00:00
Wouter Wijngaards 843300dec5 - Fix #828: missing type in access-control-tag-action redirect results
in NXDOMAIN.


git-svn-id: file:///svn/unbound/trunk@3850 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 14:30:24 +00:00
Ralph Dolmans 19ebdbf6a6 Take configured minimum TTL into consideration when reducing TTL to original
TTL from RRSIG.


git-svn-id: file:///svn/unbound/trunk@3849 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 12:30:46 +00:00
Wouter Wijngaards 1508a5bb2c - Fix incomplete prototypes reported by Dag-Erling Smørgrav.
git-svn-id: file:///svn/unbound/trunk@3848 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 07:23:23 +00:00
Wouter Wijngaards f4bf45d809 - Fix #829: doc of sldns_wire2str_rdata_buf() return value has an
off-by-one typo, from Jinmei Tatuya (Infoblox).


git-svn-id: file:///svn/unbound/trunk@3847 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 07:14:56 +00:00
Wouter Wijngaards db4645fc65 autoconf
git-svn-id: file:///svn/unbound/trunk@3846 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-02 11:20:45 +00:00
Wouter Wijngaards 7ef6c46aaf Fixup for defines not funcs
git-svn-id: file:///svn/unbound/trunk@3845 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-02 11:20:21 +00:00
Wouter Wijngaards 3514843818 - Fix compile with openssl 1.1.0 with api=1.1.0.
git-svn-id: file:///svn/unbound/trunk@3844 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-02 09:59:09 +00:00
Wouter Wijngaards 5a80c71607 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3843 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-01 14:52:33 +00:00
Wouter Wijngaards 35e1120341 Fixup position before flip.
git-svn-id: file:///svn/unbound/trunk@3842 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-01 14:51:46 +00:00
Wouter Wijngaards 0143885a41 - Fix #826: Fix refuse_non_local could result in a broken response.
git-svn-id: file:///svn/unbound/trunk@3841 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-01 14:34:45 +00:00
Wouter Wijngaards d57f06e3d8 - Fix for compile without warnings with openssl 1.1.0.
git-svn-id: file:///svn/unbound/trunk@3840 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-01 12:23:59 +00:00
Wouter Wijngaards a03a3d1d55 - RFC 7958 is now out, updated docs for unbound-anchor.
git-svn-id: file:///svn/unbound/trunk@3839 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-01 07:08:22 +00:00
Wouter Wijngaards 56928896b8 - Add default root hints for IPv6 E.ROOT-SERVERS.NET, 2001:500:a8::e.
git-svn-id: file:///svn/unbound/trunk@3838 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-29 07:11:35 +00:00
Wouter Wijngaards ca5eca9567 - Fix #777: OpenSSL 1.1.0 compatibility, patch from Sebastian A. Siewior.
git-svn-id: file:///svn/unbound/trunk@3837 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-29 07:05:19 +00:00
Ralph Dolmans 536cf2364d Clarify local-zone-override entry in unbound.conf.5
git-svn-id: file:///svn/unbound/trunk@3836 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-25 08:40:42 +00:00
Wouter Wijngaards 189ad71ac0 fixup unused $strip variable
git-svn-id: file:///svn/unbound/trunk@3835 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-25 07:53:48 +00:00
Wouter Wijngaards bc8435c736 -w64 option for makedist
git-svn-id: file:///svn/unbound/trunk@3834 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-25 07:41:30 +00:00
Ralph Dolmans 658dde3b9f unbound.conf.5 entries for define-tag, access-control-tag,
access-control-tag-action, access-control-tag-data, local-zone-tag,
and local-zone-override.


git-svn-id: file:///svn/unbound/trunk@3833 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-24 13:43:14 +00:00
Ralph Dolmans 3bf062aa2d Fix #820: set sldns_str2wire_rr_buf() dual meaning len parameter
in each iteration in find_tag_datas().



git-svn-id: file:///svn/unbound/trunk@3832 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-24 09:18:38 +00:00
Wouter Wijngaards 9bc918fa7b - Fix #804: lower num_target_queries for iterator also for failed
lookups.


git-svn-id: file:///svn/unbound/trunk@3831 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-23 08:49:01 +00:00
Wouter Wijngaards d2dee3d5a4 - Fix #804: unbound stops responding after outage. Fixes queries
that attempt to wait for an empty list of subqueries.


git-svn-id: file:///svn/unbound/trunk@3830 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-23 08:30:12 +00:00
Wouter Wijngaards c389329878 - Note that OPENPGPKEY type is RFC 7929.
git-svn-id: file:///svn/unbound/trunk@3829 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-08 07:36:20 +00:00
Wouter Wijngaards 9c88c4a164 - Fix #807: workaround for possible some "unused" function parameters
in test code, from Jinmei Tatuya.


git-svn-id: file:///svn/unbound/trunk@3828 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-04 07:17:53 +00:00
Wouter Wijngaards bf46530c5a - use sendmsg instead of sendto for TFO.
git-svn-id: file:///svn/unbound/trunk@3827 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-03 06:20:26 +00:00
Wouter Wijngaards df4b4e6902 - Fix #806: wrong comment removed.
git-svn-id: file:///svn/unbound/trunk@3826 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-28 07:13:48 +00:00
Wouter Wijngaards ab4be7357f - nicer ratelimit-below-domain explanation.
git-svn-id: file:///svn/unbound/trunk@3825 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-26 13:37:30 +00:00
Wouter Wijngaards 29ada8b41a - Fix #803: confusing (and incorrect) code comment in daemon_cleanup().
git-svn-id: file:///svn/unbound/trunk@3824 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-22 07:08:42 +00:00
Wouter Wijngaards 42f14e7c4d - Fix #802: workaround for function parameters that are "unused"
without log_assert.


git-svn-id: file:///svn/unbound/trunk@3823 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-22 07:05:52 +00:00
Wouter Wijngaards 6b7e0676b9 - Fix #801: missing error condition handling in
daemon_create_workers().


git-svn-id: file:///svn/unbound/trunk@3822 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-22 07:02:03 +00:00
Wouter Wijngaards 36f1332181 - Fix typo in unbound.conf.
git-svn-id: file:///svn/unbound/trunk@3821 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-20 07:22:26 +00:00
Wouter Wijngaards ef38c58e5f remove statement before declaration warning.
git-svn-id: file:///svn/unbound/trunk@3820 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-19 10:30:53 +00:00
Wouter Wijngaards e71f0b2f34 - Fix #798: Client-side TCP fast open fails (Linux).
git-svn-id: file:///svn/unbound/trunk@3819 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-18 13:54:32 +00:00
Wouter Wijngaards 3cbc01e51f caps-whitelist entry.
git-svn-id: file:///svn/unbound/trunk@3818 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-18 07:53:49 +00:00
Wouter Wijngaards 596f8701ab - Fixed unbound.doxygen for 1.8.11.
git-svn-id: file:///svn/unbound/trunk@3817 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 11:26:30 +00:00
Wouter Wijngaards 5a03642d50 Fixup declaration after statement warning
git-svn-id: file:///svn/unbound/trunk@3816 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 11:17:38 +00:00
Wouter Wijngaards 7169b484b1 autoconf and autoheader.
git-svn-id: file:///svn/unbound/trunk@3815 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 07:06:53 +00:00
Wouter Wijngaards 95e9dff362 - TCP Fast open patch from Sara Dickinson.
git-svn-id: file:///svn/unbound/trunk@3814 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-14 07:06:34 +00:00
Wouter Wijngaards 48ca4dc880 lint.
git-svn-id: file:///svn/unbound/trunk@3813 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-07 10:31:50 +00:00
Wouter Wijngaards 1e77fb2630 lint.
git-svn-id: file:///svn/unbound/trunk@3812 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-07 10:27:16 +00:00
Wouter Wijngaards 17023457a9 - access-control-tag-data implemented. verbose(4) prints tag debug.
git-svn-id: file:///svn/unbound/trunk@3811 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-07 10:20:05 +00:00
Wouter Wijngaards eaa6e239f7 - Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and
--with-libunbound-only --with-nettle.


git-svn-id: file:///svn/unbound/trunk@3810 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 14:00:33 +00:00
Wouter Wijngaards 2a39f48deb Fixup _get_osfhandle calls
git-svn-id: file:///svn/unbound/trunk@3809 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:46:16 +00:00
Wouter Wijngaards 941b31f90b - Fixes for 64bit windows compile.
git-svn-id: file:///svn/unbound/trunk@3808 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:40:13 +00:00
Wouter Wijngaards a758f2370a - Fix detect of mingw for MXE package build.
git-svn-id: file:///svn/unbound/trunk@3807 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:17:39 +00:00
Wouter Wijngaards 72f2fe3399 - Fix dynamic link of anchor-update.exe on windows.
git-svn-id: file:///svn/unbound/trunk@3806 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:11:59 +00:00
Wouter Wijngaards fe80669639 More docs for enabling the netblock option.
git-svn-id: file:///svn/unbound/trunk@3805 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-04 15:00:30 +00:00
Wouter Wijngaards 1394dcba69 - Fix #787: outgoing-interface netblock/64 ipv6 option to use linux
freebind to use 64bits of entropy for every query with random local
  part.


git-svn-id: file:///svn/unbound/trunk@3804 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-04 14:51:30 +00:00
Wouter Wijngaards b6b3e2b914 - For #787: prefer-ip6 option for unbound.conf prefers to send
upstream queries to ipv6 servers.


git-svn-id: file:///svn/unbound/trunk@3803 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-04 14:49:49 +00:00
Wouter Wijngaards 3e54a83820 - Document always_transparent, always_refuse, always_nxdomain types.
git-svn-id: file:///svn/unbound/trunk@3802 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-30 07:36:36 +00:00
Wouter Wijngaards b9282f12b1 - Fix static compile on windows missing gdi32.
git-svn-id: file:///svn/unbound/trunk@3801 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-29 11:22:57 +00:00
Wouter Wijngaards ed4aefc59e - Create a pkg-config file for libunbound in contrib.
git-svn-id: file:///svn/unbound/trunk@3800 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-28 12:04:09 +00:00
Wouter Wijngaards c697604224 - Fix #784: Build configure assumess that having getpwnam means there
is endpwent function available.
- Updated repository with newer flex and bison output.


git-svn-id: file:///svn/unbound/trunk@3799 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-27 08:00:55 +00:00
Ralph Dolmans 13c1c11623 typo fix (thanks lint)
git-svn-id: file:///svn/unbound/trunk@3798 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-24 19:20:13 +00:00
Ralph Dolmans 54b820773c - Possibility to specify local-zone types for an acl/tag pair
- Possibility to specify (override) local-zone types for a source address block


git-svn-id: file:///svn/unbound/trunk@3797 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-24 19:08:58 +00:00
Ralph Dolmans dfe52a0de5 - Decrease dp attempts at each QNAME minimisation iteration
git-svn-id: file:///svn/unbound/trunk@3796 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-16 11:57:20 +00:00
Wouter Wijngaards 61b9ea24a8 - Fix tcp timeouts in tv.usec.
git-svn-id: file:///svn/unbound/trunk@3795 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-16 07:21:07 +00:00
Wouter Wijngaards c9495c33a7 - If more than half of tcp connections are in use, a shorter timeout
is used (200 msec, vs 2 minutes) to pressure tcp for new connects.


git-svn-id: file:///svn/unbound/trunk@3794 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-15 14:41:23 +00:00
Wouter Wijngaards 2121961929 - TCP_TIMEOUT is specified in milliseconds.
git-svn-id: file:///svn/unbound/trunk@3793 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-15 14:23:43 +00:00
Ralph Dolmans 568dc57186 - QNAME minimisation unit test for dropped QTYPE=A queries.
git-svn-id: file:///svn/unbound/trunk@3792 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 12:36:22 +00:00
Wouter Wijngaards 43e975b10d - Fix 781: prealloc() is an HP-UX system library call.
git-svn-id: file:///svn/unbound/trunk@3791 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 10:31:47 +00:00
Wouter Wijngaards e7030b6b87 - Fix 780: MAP_ANON not defined in HP-UX 11.31.
git-svn-id: file:///svn/unbound/trunk@3790 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 10:27:34 +00:00
Wouter Wijngaards 5a478514ee - Fix 779: Union casting is non-portable.
git-svn-id: file:///svn/unbound/trunk@3789 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 10:23:56 +00:00
Wouter Wijngaards 68d0253d64 fixup
git-svn-id: file:///svn/unbound/trunk@3788 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 10:08:43 +00:00
Wouter Wijngaards 86aa83e46f - Fix windows link of ssl with crypt32.
git-svn-id: file:///svn/unbound/trunk@3787 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 10:04:15 +00:00
Wouter Wijngaards 96f8d17f4f Fixup attribution
git-svn-id: file:///svn/unbound/trunk@3786 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 08:07:31 +00:00
Wouter Wijngaards e47f0ca8f4 - Fix spelling in freebind option man page text.
git-svn-id: file:///svn/unbound/trunk@3785 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 08:07:15 +00:00
Wouter Wijngaards 034febc8e3 - Fix 775: unbound-host and unbound-anchor crash on windows, ignore
null delete for wsaevent.


git-svn-id: file:///svn/unbound/trunk@3784 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-14 07:23:08 +00:00
Wouter Wijngaards 2fffe65332 - Fix directory: fix for unbound-checkconf, it restores cwd.
git-svn-id: file:///svn/unbound/trunk@3783 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-13 13:33:51 +00:00
Ralph Dolmans 5b63c08c72 - Use QTYPE=A for QNAME minimisation.
- Keep track of number of time-outs when performing QNAME minimisation.
  Stop minimising when number of time-outs for a QNAME/QTYPE pair is
  more than three.



git-svn-id: file:///svn/unbound/trunk@3782 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-13 13:06:35 +00:00
Wouter Wijngaards 48acd0bf4d - Fix #778: unbound 1.5.9: -h segfault (null deref).
git-svn-id: file:///svn/unbound/trunk@3781 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-13 07:06:23 +00:00
Wouter Wijngaards 68f6a22d75 Newer flex lexed it.
git-svn-id: file:///svn/unbound/trunk@3780 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-13 06:57:28 +00:00
Wouter Wijngaards 5d2dc481ef - document directory immediate fix and allow EXECUTABLE syntax in it
on windows.


git-svn-id: file:///svn/unbound/trunk@3779 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-10 13:37:14 +00:00
Wouter Wijngaards 2b14eb5b4a - do not delete service.conf on windows uninstall.
git-svn-id: file:///svn/unbound/trunk@3778 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-10 09:33:27 +00:00
Wouter Wijngaards b5b5d7bf84 - keep debug symbols in windows build.
git-svn-id: file:///svn/unbound/trunk@3777 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-10 08:19:29 +00:00
Wouter Wijngaards 6ff2a2e407 Fixup for chroot
git-svn-id: file:///svn/unbound/trunk@3776 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 23:16:45 +00:00
Wouter Wijngaards 12f96dc321 - In unbound.conf directory: dir immediately changes to that directory,
so that include: file below that is relative to that directory.
  With chroot, make the directory an absolute path inside chroot.


git-svn-id: file:///svn/unbound/trunk@3775 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 22:59:07 +00:00
Wouter Wijngaards 2cd83d1b58 - And delete service.conf.shipped on uninstall.
git-svn-id: file:///svn/unbound/trunk@3774 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 22:54:35 +00:00
Wouter Wijngaards c2c82f60f8 fixup nsi syntax.
git-svn-id: file:///svn/unbound/trunk@3773 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 14:58:33 +00:00
Wouter Wijngaards af75a61f69 - Fix that windows install will not overwrite existing service.conf
file (and ignore gui config choices if it exists).


git-svn-id: file:///svn/unbound/trunk@3772 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 14:51:42 +00:00
Wouter Wijngaards 81c9d10596 - Revert fix for NetworkService account on windows due to breakage
it causes.



git-svn-id: file:///svn/unbound/trunk@3771 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 14:30:37 +00:00
Wouter Wijngaards db98d1a664 - Trunk is called 1.5.10 (with previous fixes already in there to 2
june).


git-svn-id: file:///svn/unbound/trunk@3770 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-09 12:18:43 +00:00
Wouter Wijngaards 68d797e322 fixup lookup to find for tag and override.
git-svn-id: file:///svn/unbound/trunk@3768 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 15:05:54 +00:00
Ralph Dolmans 2d69c5d879 - Possibility to lookup local_zone regardless the taglist.
- Added local_zone/taglist/acl unit test.



git-svn-id: file:///svn/unbound/trunk@3767 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 14:31:30 +00:00
Wouter Wijngaards 230ef2110b - Improve threadsafety for openssl 0.9.8 ecdsa dnssec signatures.
git-svn-id: file:///svn/unbound/trunk@3766 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 13:02:02 +00:00
Ralph Dolmans 2fc81904c6 - Lint fix
git-svn-id: file:///svn/unbound/trunk@3765 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 08:43:30 +00:00
Ralph Dolmans ff091efe7b - Lookup localzones by taglist from acl.
git-svn-id: file:///svn/unbound/trunk@3764 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 08:36:19 +00:00
Wouter Wijngaards 7ea03d9ee2 - Fix #773: Non-standard Python location build failure with pyunbound.
git-svn-id: file:///svn/unbound/trunk@3763 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 08:18:20 +00:00
Wouter Wijngaards a2555b39d7 and fixup delete rest of list on parse failure.
git-svn-id: file:///svn/unbound/trunk@3762 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 15:01:48 +00:00
Wouter Wijngaards 2cc017981b - free acl-tags, acltag-action and acltag-data config lists during
initialisation to free up memory for more entries.


git-svn-id: file:///svn/unbound/trunk@3761 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 14:57:24 +00:00
Wouter Wijngaards 886a4fb7f1 please lint.
git-svn-id: file:///svn/unbound/trunk@3760 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 13:52:56 +00:00
Wouter Wijngaards 0e97374466 - access-control-tag-action and access-control-tag-data config
directives.
- make depend


git-svn-id: file:///svn/unbound/trunk@3759 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 13:47:24 +00:00
Wouter Wijngaards 65bcb9b0ca - local-zone-override config directive.
git-svn-id: file:///svn/unbound/trunk@3758 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 10:00:25 +00:00
Wouter Wijngaards 44889af074 move define-tags before access-control-tag in example config
git-svn-id: file:///svn/unbound/trunk@3757 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 08:53:18 +00:00
Wouter Wijngaards f7ed002f66 remove spurious newline
git-svn-id: file:///svn/unbound/trunk@3756 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 08:44:10 +00:00
Wouter Wijngaards c6e54c4b1f better example config
git-svn-id: file:///svn/unbound/trunk@3755 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 08:41:23 +00:00
Wouter Wijngaards 415fc52b08 - access-control-tag config directive.
git-svn-id: file:///svn/unbound/trunk@3754 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 08:33:59 +00:00
Wouter Wijngaards 17302c0e23 - Better help text from -h (from Ray Griffith).
git-svn-id: file:///svn/unbound/trunk@3753 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-06 07:38:34 +00:00
Wouter Wijngaards 73704e9ed5 - Fix to not ignore return value of chown() in daemon startup.
git-svn-id: file:///svn/unbound/trunk@3752 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-03 07:38:53 +00:00
Wouter Wijngaards 1618b3c040 - re-documented localzone tags in example.conf.
git-svn-id: file:///svn/unbound/trunk@3751 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 15:07:10 +00:00
Wouter Wijngaards 08899f2224 - Fix (for 1.5.10): Fix unbound-anchor.exe file location defaults to
Program Files with (x86) appended.


git-svn-id: file:///svn/unbound/trunk@3750 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 15:03:44 +00:00
Wouter Wijngaards a0ac8fd214 - tag for release 1.5.9rc1.
git-svn-id: file:///svn/unbound/trunk@3749 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 13:00:20 +00:00
Wouter Wijngaards d98cd61ec9 - un-document localzone tags.
git-svn-id: file:///svn/unbound/trunk@3747 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 12:13:30 +00:00
Wouter Wijngaards 6b506545cd - Fix #752: retry resource temporarily unavailable on control pipe.
git-svn-id: file:///svn/unbound/trunk@3746 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 09:34:43 +00:00
Wouter Wijngaards 8336eab1e1 - Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc.
git-svn-id: file:///svn/unbound/trunk@3745 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 08:31:17 +00:00
Wouter Wijngaards 83396d9644 - Fix libubound for edns optlist feature.
git-svn-id: file:///svn/unbound/trunk@3744 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 07:17:38 +00:00
Wouter Wijngaards 6137af9c86 please dox.
git-svn-id: file:///svn/unbound/trunk@3743 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 16:56:27 +00:00
Wouter Wijngaards 031caba9c0 - and also generic edns options for upstream messages (and replies).
after parse use edns_opt_find(edns.opt_list, LDNS_EDNS_NSID),
  to insert use edns_opt_append(edns, region, code, len, bindata) on
  the opt_list passed to send_query, or in edns_opt_inplace_reply.


git-svn-id: file:///svn/unbound/trunk@3742 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 16:55:22 +00:00
Wouter Wijngaards 3904c2be9a fixup upstream edns opts.
git-svn-id: file:///svn/unbound/trunk@3741 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 15:52:33 +00:00
Wouter Wijngaards 40dd2acfd9 - generic edns option parse and store code.
git-svn-id: file:///svn/unbound/trunk@3740 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 15:08:05 +00:00
Wouter Wijngaards 41b78b263d fixup strsep and windows event assignment.
git-svn-id: file:///svn/unbound/trunk@3739 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 12:37:42 +00:00
Wouter Wijngaards 8072ea6930 - compat strsep implementation.
git-svn-id: file:///svn/unbound/trunk@3738 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 12:27:41 +00:00
Wouter Wijngaards 0b193d9c88 Fixup cast more.
git-svn-id: file:///svn/unbound/trunk@3737 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 12:03:45 +00:00
Wouter Wijngaards 7463335255 fixup cast to _T
git-svn-id: file:///svn/unbound/trunk@3736 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 11:57:33 +00:00
Wouter Wijngaards 6387299f94 Fixup previous commit, remove NULL line.
git-svn-id: file:///svn/unbound/trunk@3735 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 11:47:44 +00:00
Wouter Wijngaards 0f197e85cc - Fix windows service to be created run with limited rights, as a
network service account, from Mario Turschmann.


git-svn-id: file:///svn/unbound/trunk@3734 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 11:41:49 +00:00
Wouter Wijngaards 688fa185b0 - Attempted fix for #765: _unboundmodule missing for python3.
git-svn-id: file:///svn/unbound/trunk@3733 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-30 14:26:45 +00:00
Wouter Wijngaards 29cd24bbc6 - Fix time in case answer comes from cache in ub_resolve_event().
git-svn-id: file:///svn/unbound/trunk@3732 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-30 12:48:11 +00:00
Wouter Wijngaards 9d14e3c281 - Fix #768: Unbound Service Sometimes Can Not Shutdown
Completely, WER Report Shown Up.  Close handle before closing WSA.


git-svn-id: file:///svn/unbound/trunk@3731 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-27 13:49:54 +00:00
Wouter Wijngaards 709d450bd7 - Document write permission to directory of trust anchor needed.
git-svn-id: file:///svn/unbound/trunk@3730 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-27 07:51:35 +00:00
Wouter Wijngaards cffec5e0fe - Fix #770: Small subgroup attack on DH used in unix pipe on localhost
if unbound control uses a unix local named pipe.


git-svn-id: file:///svn/unbound/trunk@3729 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-27 06:50:49 +00:00
Wouter Wijngaards 74603017b6 - Updated patch from Charles Walker.
git-svn-id: file:///svn/unbound/trunk@3728 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-26 06:49:44 +00:00
Wouter Wijngaards 84d6b865dd - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3727 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-24 13:10:29 +00:00
Wouter Wijngaards 58a1b9928c - remove memory leak from lame-check patch.
git-svn-id: file:///svn/unbound/trunk@3726 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-24 13:07:13 +00:00
Wouter Wijngaards 7fcec8102f - disable-dnssec-lame-check config option from Charles Walker.
git-svn-id: file:///svn/unbound/trunk@3725 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-24 12:17:42 +00:00
Wouter Wijngaards e583c42b81 - Fix #767: Reference to an expired Internet-Draft in
harden-below-nxdomain documentation.


git-svn-id: file:///svn/unbound/trunk@3724 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-23 12:51:55 +00:00
Ralph Dolmans 2e43f7ac2b - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3723 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-20 14:13:04 +00:00
Ralph Dolmans f39692acc7 - No QNAME minimisation fall-back for NXDOMAIN answers from DNSSEC signed zones.
git-svn-id: file:///svn/unbound/trunk@3722 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-20 14:04:27 +00:00
Wouter Wijngaards 36dc04734e - Fix #766: dns64 should synthesize results on timeout/errors.
git-svn-id: file:///svn/unbound/trunk@3721 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-20 06:35:49 +00:00
Wouter Wijngaards 3d60a6f446 - Fix #761: DNSSEC LAME false positive resolving nic.club.
git-svn-id: file:///svn/unbound/trunk@3720 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-18 14:09:12 +00:00
Wouter Wijngaards feb1b86d1c - trunk updated with output of flex 2.6.0.
git-svn-id: file:///svn/unbound/trunk@3719 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-17 15:01:24 +00:00
Wouter Wijngaards 01f90611b1 debug printout for edns padding option (printed at high verbosity in log for incoming packets)
git-svn-id: file:///svn/unbound/trunk@3718 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-12 12:17:50 +00:00
Wouter Wijngaards 455a681204 - Fix memory leak in out-of-memory conditions of local zone add.
git-svn-id: file:///svn/unbound/trunk@3717 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-06 06:56:51 +00:00
Wouter Wijngaards ac506c5a20 - Fix sldns with static checking fixes copied from getdns.
git-svn-id: file:///svn/unbound/trunk@3716 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-29 15:02:00 +00:00
Wouter Wijngaards 3e41fd11fc - Fix #759: 0x20 capsforid no longer checks type PTR, for
compatibility with cisco dns guard.  This lowers false positives.


git-svn-id: file:///svn/unbound/trunk@3715 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-28 07:24:50 +00:00
Wouter Wijngaards 22804de061 trying to debug.
git-svn-id: file:///svn/unbound/trunk@3714 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-25 14:53:53 +00:00
Wouter Wijngaards b41c4da040 Trying to debug #756.
git-svn-id: file:///svn/unbound/trunk@3713 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-22 14:29:21 +00:00
Wouter Wijngaards ab2435a1b9 code improvement.
git-svn-id: file:///svn/unbound/trunk@3712 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-21 15:02:00 +00:00
Wouter Wijngaards 83041d2695 Fix input length.
git-svn-id: file:///svn/unbound/trunk@3711 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-21 12:29:27 +00:00
Wouter Wijngaards dc6cd053da more please lint.
git-svn-id: file:///svn/unbound/trunk@3710 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-21 10:07:45 +00:00
Wouter Wijngaards 6e185cb944 please lint.
git-svn-id: file:///svn/unbound/trunk@3709 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-21 09:57:44 +00:00
Wouter Wijngaards 46d476b0c2 define-tag and local-zone-tag configuration.
git-svn-id: file:///svn/unbound/trunk@3708 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-21 09:49:02 +00:00
Wouter Wijngaards dcc41cc8e1 comment notes.
git-svn-id: file:///svn/unbound/trunk@3707 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-19 15:10:20 +00:00
Wouter Wijngaards 5f8a0836bd make depend
git-svn-id: file:///svn/unbound/trunk@3706 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 15:00:11 +00:00
Wouter Wijngaards 990c3eef48 More cachedb work.
git-svn-id: file:///svn/unbound/trunk@3705 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 14:59:31 +00:00
Wouter Wijngaards 636e2ef520 please lint.
git-svn-id: file:///svn/unbound/trunk@3704 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 12:39:16 +00:00
Wouter Wijngaards f64c2d8d08 Slightly more general (i.e. for TYPE0 too).
git-svn-id: file:///svn/unbound/trunk@3703 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 12:23:21 +00:00
Wouter Wijngaards 0d5d685514 Explain what we do.
git-svn-id: file:///svn/unbound/trunk@3702 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 12:00:57 +00:00
Wouter Wijngaards e77a3a9941 - Fix some malformed reponses to edns queries get fallback to nonedns.
git-svn-id: file:///svn/unbound/trunk@3701 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-18 11:56:55 +00:00
Wouter Wijngaards 7fdde81b8f - cachedb module event handling design.
git-svn-id: file:///svn/unbound/trunk@3700 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-15 14:19:00 +00:00
Wouter Wijngaards 9dfe6c85e9 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3699 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-14 14:55:29 +00:00
Wouter Wijngaards f103787644 - cachedb module framework (empty).
git-svn-id: file:///svn/unbound/trunk@3698 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-14 14:50:18 +00:00
Wouter Wijngaards f1d01113d2 - Fix #753: document dump_requestlist is for first thread.
git-svn-id: file:///svn/unbound/trunk@3697 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-12 15:10:31 +00:00
Wouter Wijngaards f101785ea1 - Fix #749: unbound-checkconf gets SIGSEGV when use against a
malformatted conf file.


git-svn-id: file:///svn/unbound/trunk@3696 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-24 12:30:47 +00:00
Wouter Wijngaards a7e6f630d7 - Document permit-small-holddown for 5011 debug.
git-svn-id: file:///svn/unbound/trunk@3695 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-24 08:10:40 +00:00
Wouter Wijngaards fd07245a0a Stop memory leak on error condition.
git-svn-id: file:///svn/unbound/trunk@3694 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 09:18:29 +00:00
Wouter Wijngaards fe4760787e please lint.
git-svn-id: file:///svn/unbound/trunk@3693 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:42:18 +00:00
Wouter Wijngaards b8df3634cc please lint.
git-svn-id: file:///svn/unbound/trunk@3692 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:37:27 +00:00
Wouter Wijngaards 6062e896b9 note RFC number.
git-svn-id: file:///svn/unbound/trunk@3691 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:35:58 +00:00
Wouter Wijngaards 038f4ca8b5 please lint.
git-svn-id: file:///svn/unbound/trunk@3690 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:32:17 +00:00
Wouter Wijngaards fbae76885a - OpenSSL 1.1.0 portability, --disable-dsa configure option.
git-svn-id: file:///svn/unbound/trunk@3689 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:19:49 +00:00
Wouter Wijngaards 59fd18e8ce - OPENSSL_config is deprecated, removing.
git-svn-id: file:///svn/unbound/trunk@3688 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 11:44:03 +00:00
Wouter Wijngaards edf80f5e3d - ERR_remove_state deprecated since openssl 1.0.0.
git-svn-id: file:///svn/unbound/trunk@3687 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 11:38:50 +00:00
Wouter Wijngaards a3ed29156a - acx_nlnetlabs.m4 to v34, with -ldl -pthread test for libcrypto.
git-svn-id: file:///svn/unbound/trunk@3686 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 10:22:40 +00:00
Wouter Wijngaards 728fce7494 - Fix test for openssl to use HMAC_Update for 1.1.0.
- acx_nlnetlabs.m4 to v33, with HMAC_Update.


git-svn-id: file:///svn/unbound/trunk@3685 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 10:10:10 +00:00
Wouter Wijngaards 2958b53293 - Fix dnstap-log-resolver-response-messages, from Nikolay Edigaryev.
git-svn-id: file:///svn/unbound/trunk@3684 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 09:04:21 +00:00
Wouter Wijngaards e562403e1c - Fix compile of getentropy_linux for SLES11 servicepack 4.
git-svn-id: file:///svn/unbound/trunk@3683 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-21 08:25:03 +00:00
Ralph Dolmans 5d061f13f9 - Validate QNAME minimised NXDOMAIN responses.
- If QNAME minimisation is enabled, do cache lookup for QTYPE NS in
   harden-below-nxdomain.



git-svn-id: file:///svn/unbound/trunk@3682 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-18 15:44:41 +00:00
Ralph Dolmans 6362a12bd7 - Limit number of QNAME minimisation iterations.
git-svn-id: file:///svn/unbound/trunk@3681 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-17 14:44:41 +00:00
Wouter Wijngaards df53793680 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3680 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-17 14:07:33 +00:00
Wouter Wijngaards 47e2026ca6 - Fix #746: Fix unbound sets CD bit on all forwards.
If no trust anchors, it'll not set CD bit when forwarding to another
  server.  If a trust anchor, no CD bit on the first attempt to a
  forwarder, but CD bit thereafter on repeated attempts to get DNSSEC.


git-svn-id: file:///svn/unbound/trunk@3679 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-17 14:01:59 +00:00
Wouter Wijngaards 1cf82595a7 - Fix ip-transparent for ipv6 on FreeBSD, thanks to Nick Hibma.
Attribute fix.


git-svn-id: file:///svn/unbound/trunk@3678 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-16 08:33:30 +00:00
Wouter Wijngaards 98a2afd40b Fix.
git-svn-id: file:///svn/unbound/trunk@3677 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-16 08:15:27 +00:00
Wouter Wijngaards 1ce7fded61 - Fix ip-transparent for tcp on freebsd.
git-svn-id: file:///svn/unbound/trunk@3676 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-16 08:13:25 +00:00
Wouter Wijngaards 2e55b493c6 - Fix ip-transparent for ipv6 on FreeBSD.
git-svn-id: file:///svn/unbound/trunk@3675 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-16 07:20:35 +00:00
Wouter Wijngaards 575fe62425 And documentation.
git-svn-id: file:///svn/unbound/trunk@3674 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-15 09:42:56 +00:00
Wouter Wijngaards 9f8b2bb468 - ip_freebind: yesno option in unbound.conf sets IP_FREEBIND for
binding to an IP address while the interface or address is down.


git-svn-id: file:///svn/unbound/trunk@3673 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-15 09:35:48 +00:00
Wouter Wijngaards 197a50ea96 Fix compile for ub_event code with older libev.
git-svn-id: file:///svn/unbound/trunk@3672 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-14 13:45:51 +00:00
Wouter Wijngaards c9a5913cf8 - Fix warnings in ifdef corner case, older or unknown libevent.
git-svn-id: file:///svn/unbound/trunk@3671 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-14 11:30:44 +00:00
Wouter Wijngaards c16592282a - For test put free in pluggable api in parenthesis.
git-svn-id: file:///svn/unbound/trunk@3670 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 13:54:08 +00:00
Wouter Wijngaards eaa3428d58 - No side effects in tolower() call, in case it is a macro.
git-svn-id: file:///svn/unbound/trunk@3669 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 13:46:46 +00:00
Wouter Wijngaards 3bcb955a07 - Fix libev usage of dispatch return value.
git-svn-id: file:///svn/unbound/trunk@3668 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 12:57:09 +00:00
Willem Toorop a36136f82c Correct operator precedence in ev bits conversions
git-svn-id: file:///svn/unbound/trunk@3667 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 11:56:34 +00:00
Wouter Wijngaards 11a6ce0f3c Remove statement before declaration warning.
git-svn-id: file:///svn/unbound/trunk@3666 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 11:33:03 +00:00
Willem Toorop 426507adeb Fix libev with pluggable event API
By converting native libev bits to ub_event bits in the callbacks


git-svn-id: file:///svn/unbound/trunk@3665 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 10:30:23 +00:00
Wouter Wijngaards 198ea7fa1e Fix base member.
git-svn-id: file:///svn/unbound/trunk@3664 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 09:06:26 +00:00
Wouter Wijngaards 3e936c2eb6 - Remove warning about unused parameter in event_pluggable.c.
git-svn-id: file:///svn/unbound/trunk@3663 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-11 08:09:18 +00:00
Wouter Wijngaards 465e834113 Fix pluggable backend2str.
git-svn-id: file:///svn/unbound/trunk@3662 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 14:51:54 +00:00
Wouter Wijngaards ecb9007bb0 unpretty fix for backend2str.
git-svn-id: file:///svn/unbound/trunk@3661 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 14:49:16 +00:00
Wouter Wijngaards 6a6cf23179 - Fixup backend2str for libev.
git-svn-id: file:///svn/unbound/trunk@3660 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 14:39:48 +00:00
Wouter Wijngaards 856c37012b - Fixup of compile fix for pluggable event API from P.Y. Adi Prasaja.
git-svn-id: file:///svn/unbound/trunk@3659 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 12:54:35 +00:00
Wouter Wijngaards 29218ce28a Reverted wrong fix.
git-svn-id: file:///svn/unbound/trunk@3658 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 12:53:56 +00:00
Willem Toorop 029ac847ad Forgot to rename some variables
git-svn-id: file:///svn/unbound/trunk@3657 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 12:49:19 +00:00
Willem Toorop f524a3d990 Fixes for libev
git-svn-id: file:///svn/unbound/trunk@3656 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 12:12:29 +00:00
Willem Toorop 45fe94db52 Compile fixes for pluggable event API from P.Y. Adi Prasaja.
git-svn-id: file:///svn/unbound/trunk@3655 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 11:33:04 +00:00
Wouter Wijngaards deee3c8b6a - Compile fix for pluggable event API from P.Y. Adi Prasaja.
git-svn-id: file:///svn/unbound/trunk@3654 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 11:04:52 +00:00
Wouter Wijngaards e6bbdc611a And aclocal too (you need matching libtool versions for configure to work).
git-svn-id: file:///svn/unbound/trunk@3653 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 08:30:07 +00:00
Wouter Wijngaards 7d76a151b3 - Updated L root IPv6 address.
git-svn-id: file:///svn/unbound/trunk@3652 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 08:23:46 +00:00
Wouter Wijngaards d7581d0ac6 - Updated configure and ltmain.sh.
git-svn-id: file:///svn/unbound/trunk@3651 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-10 08:20:52 +00:00
Willem Toorop 9df6ae099b User defined pluggable event API for libunbound
git-svn-id: file:///svn/unbound/trunk@3650 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-09 15:34:21 +00:00
Wouter Wijngaards 5ce528e0d7 - iana ports fetched via https.
- iana portlist updated.


git-svn-id: file:///svn/unbound/trunk@3649 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-08 08:00:42 +00:00
Willem Toorop e82aa87a2b One review comment and something I forgot :-(
git-svn-id: file:///svn/unbound/branches/ub_event@3648 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 16:01:09 +00:00
Willem Toorop bcfbe0d9c4 User defined pluggable event mechanism (for review)
git-svn-id: file:///svn/unbound/branches/ub_event@3647 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 14:10:06 +00:00
Wouter Wijngaards 4f1625afb7 - Fix #747: assert in outnet_serviced_query_stop.
git-svn-id: file:///svn/unbound/trunk@3646 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 10:00:08 +00:00
Wouter Wijngaards 73b5cc9a26 - configure tests for the weak attribute support by the compiler.
git-svn-id: file:///svn/unbound/trunk@3645 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-03 15:59:25 +00:00
Wouter Wijngaards 5dd79ce27a - Fix #745: unbound.py - idn2dname throws UnicodeError when idnname
contains trailing dot. (Fix from Ralph)


git-svn-id: file:///svn/unbound/trunk@3644 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-02 08:18:38 +00:00
Wouter Wijngaards 01f2ebcf46 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3643 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-02 08:16:35 +00:00
Wouter Wijngaards 1072e47639 - 1.5.8 release tag
- trunk contains 1.5.9 in development.


git-svn-id: file:///svn/unbound/trunk@3642 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-02 08:15:05 +00:00
Wouter Wijngaards 718e98b1cd - Fix that NSEC3 negative cache is used when there is no salt.
git-svn-id: file:///svn/unbound/trunk@3639 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-24 15:02:35 +00:00
Wouter Wijngaards fc66af5eea - Fix OpenBSD asynclook lock free that gets used later (fix test code).
git-svn-id: file:///svn/unbound/trunk@3638 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-24 14:52:28 +00:00
Wouter Wijngaards d858886499 prettier, now for the zone syntax check.
git-svn-id: file:///svn/unbound/trunk@3637 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:29:35 +00:00
Wouter Wijngaards 4c8230d2ce Prettier code.
git-svn-id: file:///svn/unbound/trunk@3636 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:21:13 +00:00
Wouter Wijngaards cbdb8d3999 Documentation for the ub_ctx_set_stub function.
git-svn-id: file:///svn/unbound/trunk@3635 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:12:08 +00:00
Wouter Wijngaards 18b8d15ee5 - sorted ubsyms.def file with exported libunbound functions.
git-svn-id: file:///svn/unbound/trunk@3634 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:05:34 +00:00
Wouter Wijngaards 1c75bba559 And export the symbol.
git-svn-id: file:///svn/unbound/trunk@3633 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 11:36:21 +00:00
Wouter Wijngaards 36d3966e60 - ub_ctx_set_stub() function for libunbound to config stub zones.
git-svn-id: file:///svn/unbound/trunk@3632 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 10:43:10 +00:00
Wouter Wijngaards bd030fddc4 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3631 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 14:38:48 +00:00
Wouter Wijngaards e9f954b828 - load gost algorithm if digest is seen before key algorithm.
git-svn-id: file:///svn/unbound/trunk@3630 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 12:17:03 +00:00
Wouter Wijngaards 134924c4da Remove lint warning.
git-svn-id: file:///svn/unbound/trunk@3629 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 12:16:27 +00:00
Wouter Wijngaards 03d43b3c2e - load gost algorithm into unbound-host.
git-svn-id: file:///svn/unbound/trunk@3628 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 12:11:36 +00:00
Wouter Wijngaards 2c94a5b312 - Print understandable debug log when unusable DS record is seen.
git-svn-id: file:///svn/unbound/trunk@3627 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 10:48:23 +00:00
Wouter Wijngaards 315ea575a8 - Fix that "make install" fails due to "text file busy" error.
git-svn-id: file:///svn/unbound/trunk@3626 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-17 15:51:57 +00:00
Wouter Wijngaards df8ff4f745 - Set IPPROTO_IP6 for ipv6 sockets otherwise invalid argument error.
git-svn-id: file:///svn/unbound/trunk@3625 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-17 08:02:32 +00:00
Wouter Wijngaards 9eeb489243 - wait for sendto to drain socket buffers when they are full.
git-svn-id: file:///svn/unbound/trunk@3624 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-15 09:54:52 +00:00
Wouter Wijngaards 85de673b6b - ip-transparent option for FreeBSD with IP_BINDANY socket option.
git-svn-id: file:///svn/unbound/trunk@3623 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-15 08:17:54 +00:00
Wouter Wijngaards 6f1272bcdc And document the files.
git-svn-id: file:///svn/unbound/trunk@3621 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-09 13:51:35 +00:00
Wouter Wijngaards ac8c4f978a Document that array.
git-svn-id: file:///svn/unbound/trunk@3620 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-09 13:40:56 +00:00
Wouter Wijngaards 785697de82 - insecure-lan-zones: yesno config option, patch from Dag-Erling
Smørgrav.


git-svn-id: file:///svn/unbound/trunk@3619 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-09 13:25:59 +00:00
Wouter Wijngaards de86531822 - Test for type OPENPGPKEY.
git-svn-id: file:///svn/unbound/trunk@3618 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-09 08:45:09 +00:00
Wouter Wijngaards f2bf8e1ba0 - RR Type OPENPGPKEY support (draft-ietf-dane-openpgpkey-07).
git-svn-id: file:///svn/unbound/trunk@3617 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-08 16:13:03 +00:00
Wouter Wijngaards 10f951d835 Unit test for CSYNC
git-svn-id: file:///svn/unbound/trunk@3616 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-08 15:48:26 +00:00
Wouter Wijngaards feb4008e0e - RR Type CSYNC support RFC 7477, in debug printout and config input.
git-svn-id: file:///svn/unbound/trunk@3615 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-08 15:37:17 +00:00
Wouter Wijngaards 7d070c9305 - Fix patch typo in prevuous commit for 734 from Adi Prasaja.
git-svn-id: file:///svn/unbound/trunk@3614 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-08 08:17:00 +00:00
Wouter Wijngaards 733d9f2e3c - Neater cmdline_verbose increment patch from Edgar Pettijohn.
git-svn-id: file:///svn/unbound/trunk@3613 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-29 08:06:51 +00:00
Wouter Wijngaards 8c2a28adbc - Fix #741: log message for dnstap socket connection is more clear.
git-svn-id: file:///svn/unbound/trunk@3612 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-27 17:12:26 +00:00
Wouter Wijngaards 7ca8dbf51f Fix test to cleanup executable and wait for error printout
git-svn-id: file:///svn/unbound/trunk@3611 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-27 07:55:18 +00:00
Wouter Wijngaards 01d063c38b - Made netbsd sendmsg test nonfatal, in case of false positives.
git-svn-id: file:///svn/unbound/trunk@3610 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-27 07:44:47 +00:00
Wouter Wijngaards 5032f79224 - fix netbsd interface_automatic complain about unimplemented.
git-svn-id: file:///svn/unbound/trunk@3609 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 16:14:28 +00:00
Wouter Wijngaards 303fbcdc47 - Fix cmsg alignment for argument to sendmsg on NetBSD.
git-svn-id: file:///svn/unbound/trunk@3608 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 14:11:39 +00:00
Wouter Wijngaards 8ddad6fd67 - Use arc4random instead of random in tests (because it is
available, possibly as compat, anyway).


git-svn-id: file:///svn/unbound/trunk@3607 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 09:15:22 +00:00
Wouter Wijngaards cee936b715 Fixup declaration after statement.
git-svn-id: file:///svn/unbound/trunk@3606 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 09:00:06 +00:00
Wouter Wijngaards b3b87e1f4f Fixup ;.
git-svn-id: file:///svn/unbound/trunk@3605 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 08:27:40 +00:00
Wouter Wijngaards fe0663405e - Fix #734: chown the pidfile if it resides inside the chroot.
git-svn-id: file:///svn/unbound/trunk@3604 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-26 08:05:04 +00:00
Wouter Wijngaards 1e55b2ede1 - Fix #738: Swig should not be invoked with CPPFLAGS.
git-svn-id: file:///svn/unbound/trunk@3603 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-25 08:07:50 +00:00
Wouter Wijngaards 6484f6b9b8 - Squelch 'cannot assign requested address' log messages unless
verbosity is high, it was spammed after network down.


git-svn-id: file:///svn/unbound/trunk@3602 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-19 15:37:54 +00:00
Wouter Wijngaards 3c8627a28b - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3601 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-14 08:33:54 +00:00
Wouter Wijngaards c53222e101 - Fix to simplify empty string checking from Michael McConville.
git-svn-id: file:///svn/unbound/trunk@3600 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-14 08:28:46 +00:00
Wouter Wijngaards 9bb637e7a4 - Fix #734: Do not log an error when the PID file cannot be chown'ed.
Patch from Simon Deziel.


git-svn-id: file:///svn/unbound/trunk@3599 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-12 08:04:42 +00:00
Wouter Wijngaards 7bd941dcd6 - Fix test if -pthreads unused to use better grep for portability.
git-svn-id: file:///svn/unbound/trunk@3598 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-11 13:44:02 +00:00
Wouter Wijngaards 1a2f45f418 Use better grep for -e -flag test.
git-svn-id: file:///svn/unbound/trunk@3597 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-11 13:41:33 +00:00
Wouter Wijngaards f25ee488a9 - Update aclocal, autoconf output with new versions (1.15, 2.4.6).
git-svn-id: file:///svn/unbound/trunk@3596 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-07 10:34:46 +00:00
Wouter Wijngaards 304bcf65f2 - Fix mingw crosscompile for recent mingw.
git-svn-id: file:///svn/unbound/trunk@3595 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-07 10:29:13 +00:00
Wouter Wijngaards c1fb10d1d3 - Fix mingw crosscompile for recent mingw.
git-svn-id: file:///svn/unbound/trunk@3594 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-07 10:16:22 +00:00
Wouter Wijngaards 5cb0a1d8ed - Support RFC7686: handle ".onion" Special-Use Domain. It is blocked
by default, and can be unblocked with "nodefault" localzone config.


git-svn-id: file:///svn/unbound/trunk@3593 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-05 14:02:45 +00:00
Wouter Wijngaards dd8b5729f2 Fix signed-unsigned lint warnings in tcp-mss.
git-svn-id: file:///svn/unbound/trunk@3592 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-05 10:08:37 +00:00
Wouter Wijngaards 5d0ad681a2 - #731: tcp-mss, outgoing-tcp-mss options for unbound.conf, patch
from Daisuke Higashi.


git-svn-id: file:///svn/unbound/trunk@3591 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-05 10:03:59 +00:00
Wouter Wijngaards 4f6dcce9e2 Fixup that patch does not try to patch itself.
git-svn-id: file:///svn/unbound/trunk@3590 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-04 12:50:23 +00:00
Wouter Wijngaards b7343c0dce - Fixup contrib/aaaa-filter-iterator.patch for moved contents in the
source code, so it applies cleanly again.  Removed unused variable
  warnings.


git-svn-id: file:///svn/unbound/trunk@3589 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-04 10:47:29 +00:00
Wouter Wijngaards 82c7df3487 - Define DEFAULT_SOURCE together with BSD_SOURCE when that is defined,
for Linux glibc 2.20.


git-svn-id: file:///svn/unbound/trunk@3588 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-01-04 09:52:48 +00:00
Ralph Dolmans 1efbd605b4 Fix #729: omit use of escape sequences in echo since they are not portable (unbound-control-setup)
git-svn-id: file:///svn/unbound/trunk@3587 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-15 11:00:59 +00:00
Wouter Wijngaards 620b0d876c - OSX clang new flto check.
git-svn-id: file:///svn/unbound/trunk@3586 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 13:35:09 +00:00
Wouter Wijngaards 7489a2c31e test flto for clang (test #2)
git-svn-id: file:///svn/unbound/trunk@3585 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 13:28:33 +00:00
Wouter Wijngaards 72f13cb3df Check for flto for OSX
git-svn-id: file:///svn/unbound/trunk@3584 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 13:23:34 +00:00
Wouter Wijngaards 8afef037fc - OSX clang, stop -pthread unused during link stage warnings.
git-svn-id: file:///svn/unbound/trunk@3583 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 13:15:40 +00:00
Wouter Wijngaards 46ca8274b8 - OSX portability, detect if sbrk is deprecated.
git-svn-id: file:///svn/unbound/trunk@3582 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 12:44:44 +00:00
Wouter Wijngaards db64a96d79 - updated ax_pthread.m4 to version 21 with clang support, this
removes a warning from compilation.


git-svn-id: file:///svn/unbound/trunk@3581 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 12:19:12 +00:00
Wouter Wijngaards 72a5931a68 - remove NULL-checks before free, patch from Michael McConville.
git-svn-id: file:///svn/unbound/trunk@3580 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-11 10:26:15 +00:00
Wouter Wijngaards 2859b22f88 - trunk has 1.5.8 in development.
git-svn-id: file:///svn/unbound/trunk@3579 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-10 08:38:20 +00:00
Wouter Wijngaards 69a3cf575d Fixup name.
git-svn-id: file:///svn/unbound/trunk@3577 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-08 08:25:42 +00:00
Wouter Wijngaards 9b26f1c37a - Fixup 724 for unbound-control.
git-svn-id: file:///svn/unbound/trunk@3576 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-08 08:15:55 +00:00
Ralph Dolmans d853b0841b Don't minimise forwarded requests.
git-svn-id: file:///svn/unbound/trunk@3575 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-07 15:56:47 +00:00
Wouter Wijngaards 3b0a763367 - Removed unneeded whitespace from example.conf.
git-svn-id: file:///svn/unbound/trunk@3574 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-04 08:01:37 +00:00
Ralph Dolmans 3328dc4d68 Stop minimising after receiving rcode!=NOERROR
git-svn-id: file:///svn/unbound/trunk@3573 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-03 15:45:52 +00:00
Wouter Wijngaards da4c0c4ecd Note changelog after rc1.
3 December 2015: Ralph
  - (after rc1 tag)
  - Committed fix to qname minimisation and unit test case for it.


git-svn-id: file:///svn/unbound/trunk@3572 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-03 13:40:16 +00:00
Wouter Wijngaards 824409af68 1.5.7rc1 tag
git-svn-id: file:///svn/unbound/trunk@3569 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-03 13:35:17 +00:00
Ralph Dolmans e47e31a69f Keep incrementing QNAME after receiving throwaway answer.
git-svn-id: file:///svn/unbound/trunk@3568 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-03 12:09:45 +00:00
Wouter Wijngaards 1c218ffa5b iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3567 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-03 08:10:33 +00:00
Wouter Wijngaards c1037cece1 - For 724: Add Changelog to windows binary dist.
git-svn-id: file:///svn/unbound/trunk@3566 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-02 17:55:03 +00:00
Wouter Wijngaards f40f555988 - Fixup 724: Fix PCA prompt for unbound-service-install.exe.
re-enable stdout printout.


git-svn-id: file:///svn/unbound/trunk@3565 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-02 09:40:05 +00:00
Wouter Wijngaards 3aaf81b37b undo pointless change.
git-svn-id: file:///svn/unbound/trunk@3564 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 15:18:51 +00:00
Wouter Wijngaards a69bbd818e pointless change for test.
git-svn-id: file:///svn/unbound/trunk@3563 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 14:55:27 +00:00
Wouter Wijngaards bde9703823 - .gitignore for git users.
git-svn-id: file:///svn/unbound/trunk@3562 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 14:36:21 +00:00
Ralph Dolmans 014142d7bf Qname minimisation review fixes
git-svn-id: file:///svn/unbound/trunk@3561 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 13:14:00 +00:00
Wouter Wijngaards 05b0136f76 - Remove stdout printout for unbound-service-install.exe
git-svn-id: file:///svn/unbound/trunk@3560 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 13:00:57 +00:00
Wouter Wijngaards b085b4d31a and also #724 for unbound.exe commandline.
git-svn-id: file:///svn/unbound/trunk@3559 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 09:26:02 +00:00
Wouter Wijngaards bb7b4db353 Fixup #724 in unbound-checkconf and fname_after_chroot calls.
git-svn-id: file:///svn/unbound/trunk@3558 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 09:12:30 +00:00
Wouter Wijngaards 128370ac14 - Fixup 724 fix for fname_after_chroot() calls.
git-svn-id: file:///svn/unbound/trunk@3557 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 08:54:53 +00:00
Wouter Wijngaards 63d58c7613 add unit test.
git-svn-id: file:///svn/unbound/trunk@3556 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 08:36:26 +00:00
Wouter Wijngaards 3ee1dc25d5 yacced,lexed, include for undeclared function and make depend.
git-svn-id: file:///svn/unbound/trunk@3555 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-12-01 08:11:48 +00:00
Ralph Dolmans a05bf09811 Implemented qname minimisation
git-svn-id: file:///svn/unbound/trunk@3554 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-30 16:10:26 +00:00
Wouter Wijngaards ae7c49cb0b Fixup %EXECUTABLE% code.
git-svn-id: file:///svn/unbound/trunk@3553 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-30 15:13:09 +00:00
Wouter Wijngaards 453ff48e89 Fixup %EXECUTABLE% code.
git-svn-id: file:///svn/unbound/trunk@3552 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-30 15:07:11 +00:00
Wouter Wijngaards 12b29439f5 - Fix for #724: conf syntax to read files from run dir (on Windows).
git-svn-id: file:///svn/unbound/trunk@3551 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-30 15:05:26 +00:00
Wouter Wijngaards 2c36a9a8bf - Fix for #720, fix unbound-control-setup windows batch file.
git-svn-id: file:///svn/unbound/trunk@3550 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-25 07:22:05 +00:00
Wouter Wijngaards 84cf2c8afd - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3549 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-24 11:01:26 +00:00
Wouter Wijngaards fcd476c81f - Fix #720: add windows scripts to zip bundle.
git-svn-id: file:///svn/unbound/trunk@3548 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-24 10:55:18 +00:00
Wouter Wijngaards 55f5a55f5f But RFC wants empty EDNS in formerr.
git-svn-id: file:///svn/unbound/trunk@3547 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-20 10:32:18 +00:00
Wouter Wijngaards 2262975cab - Fix that malformed EDNS query gets a response without malformed EDNS.
git-svn-id: file:///svn/unbound/trunk@3546 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-20 09:09:55 +00:00
Wouter Wijngaards 2ceed35ca8 - Added assert on rrset cache correctness.
git-svn-id: file:///svn/unbound/trunk@3545 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-20 08:08:11 +00:00
Wouter Wijngaards 152458c40b - spelling fixes from Igor Sobrado Delgado.
git-svn-id: file:///svn/unbound/trunk@3544 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-18 14:11:46 +00:00
Wouter Wijngaards 87a7408250 - newer acx_nlnetlabs.m4.
git-svn-id: file:///svn/unbound/trunk@3543 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-18 07:45:41 +00:00
Wouter Wijngaards ffb5a2d9eb Document ASN contents.
git-svn-id: file:///svn/unbound/trunk@3542 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 14:36:10 +00:00
Wouter Wijngaards 4e3ae5505e cast to please lint.
git-svn-id: file:///svn/unbound/trunk@3541 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 14:27:49 +00:00
Wouter Wijngaards 39dc5be222 - Fixup DER encoded DSA signatures for libnettle.
git-svn-id: file:///svn/unbound/trunk@3540 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 13:31:22 +00:00
Wouter Wijngaards 2756b0f873 Repair // style comments for portability.
git-svn-id: file:///svn/unbound/trunk@3539 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 12:46:47 +00:00
Wouter Wijngaards 79b087b423 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3538 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:41:05 +00:00
Wouter Wijngaards fa57a6c6e8 use digest_nettle function for nsec3_hash calls.
git-svn-id: file:///svn/unbound/trunk@3537 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:39:58 +00:00
Wouter Wijngaards 3433a30878 please lint.
git-svn-id: file:///svn/unbound/trunk@3536 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:32:04 +00:00
Wouter Wijngaards 2a73ccd5b4 - refactor nsec3 hash implementation to be more library-portable.
git-svn-id: file:///svn/unbound/trunk@3535 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:30:04 +00:00
Wouter Wijngaards 3bdaebf966 Nicer unbound.c for nettle.
git-svn-id: file:///svn/unbound/trunk@3534 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 10:02:17 +00:00
Wouter Wijngaards 2bdea62a9e - Fix #594. libunbound: optionally use libnettle for crypto.
Contributed by Luca Bruno.  Added --with-nettle for use with
  --with-libunbound-only.


git-svn-id: file:///svn/unbound/trunk@3533 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 09:43:07 +00:00
Wouter Wijngaards 2d8d820e07 Remove debug print.
git-svn-id: file:///svn/unbound/trunk@3532 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-16 10:01:47 +00:00
Wouter Wijngaards 147ba02e17 remove unused comment.
git-svn-id: file:///svn/unbound/trunk@3531 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-16 09:56:53 +00:00
Wouter Wijngaards 7c1131625c - Fix for lenient accept of reverse order DNAME and CNAME.
git-svn-id: file:///svn/unbound/trunk@3530 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-16 09:48:51 +00:00
Wouter Wijngaards ac32f19928 - Change example.conf: ftp.internic.net to https://www.internic.net
git-svn-id: file:///svn/unbound/trunk@3529 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-06 09:00:01 +00:00
Wouter Wijngaards 7ff9ded4bf - ACX_SSL_CHECKS no longer adds -ldl needlessly.
git-svn-id: file:///svn/unbound/trunk@3528 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-04 23:16:36 +00:00
Wouter Wijngaards 92a31c1653 - Fix #718: Fix unbound-control-setup with support for env
without HEREDOC bash support.


git-svn-id: file:///svn/unbound/trunk@3527 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-03 08:13:05 +00:00
Wouter Wijngaards bdb24c91b2 - Fix #716: nodata proof with empty non-terminals and wildcards.
git-svn-id: file:///svn/unbound/trunk@3526 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-29 13:08:15 +00:00
Wouter Wijngaards 1ebcdeac38 - patch from Doug Hogan for SSL_OP_NO_SSLvx options.
git-svn-id: file:///svn/unbound/trunk@3525 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-29 08:32:58 +00:00
Wouter Wijngaards 2f8f3cca82 Fixup nothread compile on Linux.
git-svn-id: file:///svn/unbound/trunk@3524 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-28 10:37:53 +00:00
Wouter Wijngaards 57ce6f11de remove warning in checklocks on 64bit system.
git-svn-id: file:///svn/unbound/trunk@3523 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-28 10:33:33 +00:00
Wouter Wijngaards c585cbc2d9 - Fix checklock testcode for linux threads on exit.
git-svn-id: file:///svn/unbound/trunk@3522 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-28 10:28:26 +00:00
Wouter Wijngaards dd174820dc windows portability.
git-svn-id: file:///svn/unbound/trunk@3521 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 15:35:08 +00:00
Wouter Wijngaards 1af1e720d5 Fixup snprintf warning for 32bit systems.
git-svn-id: file:///svn/unbound/trunk@3520 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 14:51:57 +00:00
Wouter Wijngaards e3c8adc297 Fixup test.
git-svn-id: file:///svn/unbound/trunk@3519 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 14:11:51 +00:00
Wouter Wijngaards ec9cee7fc2 - portability, replace snprintf if return value broken.
git-svn-id: file:///svn/unbound/trunk@3518 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 13:47:50 +00:00
Wouter Wijngaards eb21aa7ee9 changelog entry.
git-svn-id: file:///svn/unbound/trunk@3517 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 12:06:03 +00:00
Wouter Wijngaards aebee7b95c portability fixes.
git-svn-id: file:///svn/unbound/trunk@3516 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 10:39:18 +00:00
Wouter Wijngaards 374ee84b27 - detect libexpat without xml_StopParser function.
git-svn-id: file:///svn/unbound/trunk@3515 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 10:22:05 +00:00
Wouter Wijngaards 995c8a6be6 - isblank() compat implementation.
git-svn-id: file:///svn/unbound/trunk@3514 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 09:52:16 +00:00
Wouter Wijngaards f24c3229ea - Fix #714: Document config to block private-address for IPv4
mapped IPv6 addresses.


git-svn-id: file:///svn/unbound/trunk@3513 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-23 07:13:45 +00:00
Wouter Wijngaards 40c139cd8f - Fix #712: unbound-anchor appears to not fsync root.key.
git-svn-id: file:///svn/unbound/trunk@3512 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-22 07:06:31 +00:00
Wouter Wijngaards 14bad4293a - trunk tracks development of 1.5.7.
git-svn-id: file:///svn/unbound/trunk@3511 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-20 14:01:54 +00:00
Wouter Wijngaards a9b560a207 1.5.6rc1 release tag has been created
git-svn-id: file:///svn/unbound/trunk@3509 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-15 11:44:24 +00:00
Wouter Wijngaards 1d4330b1ff - Fix ldns_wire2str_rdata_scan for malformed RRs.
his line, and those below, will be ignored--

M    trunk/doc/Changelog
M    trunk/sldns/wire2str.c


git-svn-id: file:///svn/unbound/trunk@3507 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-15 09:51:30 +00:00
Wouter Wijngaards b4a7e9ad8d - Fix segfault in the dns64 module in the formaterror error path.
git-svn-id: file:///svn/unbound/trunk@3506 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-15 09:02:01 +00:00
Wouter Wijngaards b383dd40fa - Fix manpage to suggest using SIGTERM to terminate the server.
git-svn-id: file:///svn/unbound/trunk@3505 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-14 12:22:49 +00:00
Wouter Wijngaards b8d7976f57 - ANY responses include DNAME records if present, as per Evan Hunt's
remark in dnsop.


git-svn-id: file:///svn/unbound/trunk@3504 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-14 08:02:14 +00:00
Wouter Wijngaards 71f891fae8 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3503 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-09 08:08:31 +00:00
Wouter Wijngaards c3a45dde15 - Default for ssl-port is port 853, the temporary port assignment
for secure domain name system traffic.
  If you used to rely on the older default of port 443, you have
  to put a clause in unbound.conf for that.  The new value is likely
  going to be the standardised port number for this traffic.


git-svn-id: file:///svn/unbound/trunk@3502 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-09 07:55:21 +00:00
Wouter Wijngaards 2b46074c60 fixup.
git-svn-id: file:///svn/unbound/trunk@3501 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-06 10:29:20 +00:00
Wouter Wijngaards 3703df0aa4 - trunk tracks the development of 1.5.6.
git-svn-id: file:///svn/unbound/trunk@3500 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-06 09:57:08 +00:00
Wouter Wijngaards 8e31526874 denote URI as type LONG_STR user
git-svn-id: file:///svn/unbound/trunk@3498 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-01 11:58:55 +00:00
Wouter Wijngaards 53f3c2b248 - makedist.sh: pgp sig echo commands.
git-svn-id: file:///svn/unbound/trunk@3497 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-28 14:46:38 +00:00
Wouter Wijngaards bb06879b1e prepare 1.5.5rc1 release.
git-svn-id: file:///svn/unbound/trunk@3495 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-28 13:50:36 +00:00
Wouter Wijngaards 0735cf0e53 - MAX_TARGET_COUNT increased to 64, to fix up sporadic resolution
failures.


git-svn-id: file:///svn/unbound/trunk@3494 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-28 07:21:48 +00:00
Wouter Wijngaards 725f11e349 - Fix unbound-control flush that does not succeed in removing data.
git-svn-id: file:///svn/unbound/trunk@3493 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-25 12:39:10 +00:00
Wouter Wijngaards 275a97e65f - Fix unbound.conf(5) access-control description for precedence
and default.


git-svn-id: file:///svn/unbound/trunk@3492 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 13:04:53 +00:00
Wouter Wijngaards baedbe8ccd - Fix minor error in unbound.conf.5.in
git-svn-id: file:///svn/unbound/trunk@3491 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 12:59:32 +00:00
Wouter Wijngaards 66b21d16be - testbound selftest also works in non-debug mode.
git-svn-id: file:///svn/unbound/trunk@3490 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 09:52:17 +00:00
Wouter Wijngaards f2426b7796 - Fix #705: ub_ctx_set_fwd() return value mishandled on windows.
git-svn-id: file:///svn/unbound/trunk@3489 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:59:10 +00:00
Wouter Wijngaards e3351c3606 - Remove confusion comment from canonical_compare() function.
git-svn-id: file:///svn/unbound/trunk@3488 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:43:56 +00:00
Wouter Wijngaards 44644a7e7c - Fix #702: New IPs for for h.root-servers.net.
git-svn-id: file:///svn/unbound/trunk@3487 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:35:03 +00:00
Wouter Wijngaards 032027dc56 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3486 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:04:45 +00:00
Wouter Wijngaards 897ee33df1 - Fix config globbed include chroot treatment, this fixes reload of
globs (patch from Dag-Erling Smørgrav).


git-svn-id: file:///svn/unbound/trunk@3485 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:04:19 +00:00
Wouter Wijngaards 905297bdd3 - changed windows setup compression to be more transparent.
git-svn-id: file:///svn/unbound/trunk@3484 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-31 07:44:36 +00:00
Wouter Wijngaards 62146024c3 - Feature #699: --enable-pie option to that builds PIE binary.
- Feature #700: --enable-relro-now option that enables full read-only
  relocation.


git-svn-id: file:///svn/unbound/trunk@3483 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-28 14:27:03 +00:00
Wouter Wijngaards 5dd7c7bb4b - Fix #697: Get PY_MAJOR_VERSION failure at configure for python
2.4 to 2.6.


git-svn-id: file:///svn/unbound/trunk@3480 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-28 06:56:27 +00:00
Wouter Wijngaards 14b1de6166 fix test for new default.
git-svn-id: file:///svn/unbound/trunk@3479 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-24 15:07:42 +00:00
Wouter Wijngaards e65fdc31aa - Change default of harden-algo-downgrade to off. This is lenient
for algorithm rollover.


git-svn-id: file:///svn/unbound/trunk@3478 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-24 15:05:10 +00:00
Wouter Wijngaards 06838a2bad - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3477 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-24 12:52:40 +00:00
Wouter Wijngaards 9d9984a187 - Fix deadlock for local data add and zone add when unbound-control
list_local_data printout is interrupted.


git-svn-id: file:///svn/unbound/trunk@3476 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-24 10:49:28 +00:00
Wouter Wijngaards 954b212895 fixup libressl detection on solaris.
git-svn-id: file:///svn/unbound/trunk@3475 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-14 09:08:44 +00:00
Wouter Wijngaards b68fcc28c4 fix windows portability
git-svn-id: file:///svn/unbound/trunk@3474 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 15:06:01 +00:00
Wouter Wijngaards 6da360d3bb - Reap the child process that libunbound spawns.
git-svn-id: file:///svn/unbound/trunk@3473 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 14:17:44 +00:00
Wouter Wijngaards 934954375e configuration option affects autotrust.
git-svn-id: file:///svn/unbound/trunk@3472 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 12:52:51 +00:00
Wouter Wijngaards 08e6883578 - 5011 implementation does not insist on all algorithms, when
harden-algo-downgrade is turned off.


git-svn-id: file:///svn/unbound/trunk@3471 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 12:03:53 +00:00
Wouter Wijngaards 2335e2b040 - Fix #694: configure script does not detect LibreSSL 2.2.2
git-svn-id: file:///svn/unbound/trunk@3470 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-11 07:32:35 +00:00
Wouter Wijngaards a014ca4081 make depend.
git-svn-id: file:///svn/unbound/trunk@3469 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-06 11:54:53 +00:00
Wouter Wijngaards 59d4acf6e5 - Document that local-zone nodefault matches exactly and transparent
can be used to release a subzone.


git-svn-id: file:///svn/unbound/trunk@3468 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-04 07:10:26 +00:00
Wouter Wijngaards 0d38ea6b3a - Fix mktime in unbound-anchor not using UTC.
git-svn-id: file:///svn/unbound/trunk@3467 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-03 15:00:56 +00:00
Wouter Wijngaards 771e7295ac - Fix 5011 anchor update timer after reload.
git-svn-id: file:///svn/unbound/trunk@3466 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-03 11:56:37 +00:00
Wouter Wijngaards bc58e8cb15 - Document in the manual more text about configuring locally served
zones.


git-svn-id: file:///svn/unbound/trunk@3465 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-03 10:34:29 +00:00
Wouter Wijngaards 7166c1ad36 no zero waiting times.
git-svn-id: file:///svn/unbound/trunk@3464 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 14:01:04 +00:00
Wouter Wijngaards 814ddc5d48 fixup.
git-svn-id: file:///svn/unbound/trunk@3463 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 12:02:18 +00:00
Wouter Wijngaards ee263cf6c5 - Added permit-small-holddown config to debug fast 5011 rollover.
git-svn-id: file:///svn/unbound/trunk@3462 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 11:52:12 +00:00
Wouter Wijngaards 8a6817d1c9 - please afl-gcc (llvm) for uninitialised variable warning.
git-svn-id: file:///svn/unbound/trunk@3461 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 08:51:51 +00:00
Wouter Wijngaards 9eb54a9a89 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3459 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-24 11:54:08 +00:00
Wouter Wijngaards a7dcbc4d19 Fix lint.
git-svn-id: file:///svn/unbound/trunk@3458 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-24 11:49:35 +00:00
Wouter Wijngaards cd223885eb And fix reponse generation when reducing the number of threads.
git-svn-id: file:///svn/unbound/trunk@3457 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-24 11:44:58 +00:00
Wouter Wijngaards d889832892 - Fix #690: Reload fails when so-reuseport is yes after changing
git-svn-id: file:///svn/unbound/trunk@3456 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-24 07:02:14 +00:00
Wouter Wijngaards eed106b5e0 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3455 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-21 14:52:53 +00:00
Wouter Wijngaards 1d7d43f9b5 Fixup #if
git-svn-id: file:///svn/unbound/trunk@3454 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-21 14:37:15 +00:00
Wouter Wijngaards 583b376217 - Fix configure to detect SSL_CTX_set_ecdh_auto.
git-svn-id: file:///svn/unbound/trunk@3453 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-21 14:30:49 +00:00
Wouter Wijngaards 78c8224655 - Enable ECDHE for servers. Where available, use
SSL_CTX_set_ecdh_auto() for TLS-wrapped server configurations to
  enable ECDHE.  Otherwise, manually offer curve p256.
  Client connections should automatically use ECDHE when available.
  (thanks Daniel Kahn Gillmor)


git-svn-id: file:///svn/unbound/trunk@3452 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-20 06:56:01 +00:00
Willem Toorop fa20564699 SSL_CTX_use_certificate_chain_file() should be used instead of the
SSL_CTX_use_certificate_file() function in order to allow the use of
complete certificate chains even when no trusted CA storage is used or
when the CA issuing the certificate shall not be added to the trusted
CA storage.

Thanks Daniel Kahn Gillmore


git-svn-id: file:///svn/unbound/trunk@3451 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-18 12:34:37 +00:00
Wouter Wijngaards 54ad544e69 cleaner.
git-svn-id: file:///svn/unbound/trunk@3449 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-13 08:20:29 +00:00
Wouter Wijngaards da83146bce - makedist produces sha1 and sha256 files for created binaries too.
git-svn-id: file:///svn/unbound/trunk@3448 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-13 07:53:53 +00:00
Wouter Wijngaards f66a15d894 - Fix #681: Setting forwarders with unbound-control forward
implicitly turns on forward-first.


git-svn-id: file:///svn/unbound/trunk@3447 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-09 09:45:08 +00:00
Wouter Wijngaards 240c882954 trunk has 1.5.5 in development.
git-svn-id: file:///svn/unbound/trunk@3446 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-09 09:40:12 +00:00
Wouter Wijngaards 1252634423 nicer code for int_max.
git-svn-id: file:///svn/unbound/trunk@3443 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-29 13:37:34 +00:00
Wouter Wijngaards a6bc6b5137 - Fix alloc with log for allocation size checks.
git-svn-id: file:///svn/unbound/trunk@3442 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-29 10:19:42 +00:00
Wouter Wijngaards 0c43c020b1 Fixup
git-svn-id: file:///svn/unbound/trunk@3441 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-29 10:19:14 +00:00
Wouter Wijngaards 41507d016c - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3440 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-29 07:09:04 +00:00
Wouter Wijngaards dbb27a0072 Fix fwd_compress_c00c for FreeBSD xxd.
git-svn-id: file:///svn/unbound/trunk@3439 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-26 09:55:00 +00:00
Wouter Wijngaards 91468c9fcf Test diff of hex.
git-svn-id: file:///svn/unbound/trunk@3438 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-26 07:47:47 +00:00
Wouter Wijngaards fe485c7240 and check ttls of CNAME and DNAME in cache response in unit test.
git-svn-id: file:///svn/unbound/trunk@3437 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-26 07:43:42 +00:00
Wouter Wijngaards c29276ba71 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3436 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-26 07:33:03 +00:00
Wouter Wijngaards cb90782087 - Fix #677 Fix DNAME responses from cache that failed internal chain
test.


git-svn-id: file:///svn/unbound/trunk@3435 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-26 07:27:32 +00:00
Wouter Wijngaards 0884d263ef - Fix #677 Fix CNAME corresponding to a DNAME was checked incorrectly
and was therefore always synthesized (thanks to Valentin Dietrich).


git-svn-id: file:///svn/unbound/trunk@3434 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-22 09:23:43 +00:00
Wouter Wijngaards 6e65f728cc - RFC 7553 RR type URI support, is now enabled by default.
git-svn-id: file:///svn/unbound/trunk@3433 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-04 12:30:29 +00:00
Wouter Wijngaards 4dae17108b - Fix #674: Do not free pointers given by getenv.
git-svn-id: file:///svn/unbound/trunk@3432 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-02 07:31:43 +00:00
Wouter Wijngaards 94a6478e05 - SOA negative TTL is capped at minimumttl in its rdata section.
- cache-max-negative-ttl config option, default 3600.


git-svn-id: file:///svn/unbound/trunk@3431 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-29 14:51:36 +00:00
Wouter Wijngaards 66b8f636cf fix doxygen comment.
git-svn-id: file:///svn/unbound/trunk@3430 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-29 09:32:14 +00:00
Wouter Wijngaards 4b0c7880e4 - Fix that unparseable error responses are ratelimited.
git-svn-id: file:///svn/unbound/trunk@3429 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-29 09:27:42 +00:00
Wouter Wijngaards 5f9d2314a1 - Document that ratelimit works with unbound-control set_option.
git-svn-id: file:///svn/unbound/trunk@3428 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-26 09:18:21 +00:00
Wouter Wijngaards bd89f4e7d5 - documentation proposes ratelimit of 1000 (closer to what upstream
servers expect from us).


git-svn-id: file:///svn/unbound/trunk@3427 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-21 12:06:41 +00:00
Wouter Wijngaards bf25a42b67 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3426 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-21 07:29:42 +00:00
Wouter Wijngaards b5f391d845 - DLV is going to be decommissioned. Advice to stop using it, and
put text in the example configuration and man page to that effect.


git-svn-id: file:///svn/unbound/trunk@3424 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-20 06:24:06 +00:00
Wouter Wijngaards bfd78a8c23 - Change syntax of particular validator error to be easier for
machine parse, swap rrset and ip adres info so it looks like:
  validation failure <www.example.nl. TXT IN>: signature crypto
  failed from 2001:DB8:7:bba4::53 for <*.example.nl. NSEC IN>


git-svn-id: file:///svn/unbound/trunk@3422 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-10 12:04:22 +00:00
Wouter Wijngaards 2910eec34c Check for out of memory.
git-svn-id: file:///svn/unbound/trunk@3421 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-01 13:35:02 +00:00
Wouter Wijngaards f03d3b870e - caps-whitelist in unbound.conf allows whitelist of loadbalancers
that cannot work with caps-for-id or its fallback.


git-svn-id: file:///svn/unbound/trunk@3420 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-01 12:36:16 +00:00
Wouter Wijngaards b8eb1713e0 - Unit test for type ANY synthesis.
git-svn-id: file:///svn/unbound/trunk@3419 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-30 10:27:27 +00:00
Wouter Wijngaards ddda275d7b please lint.
git-svn-id: file:///svn/unbound/trunk@3411 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-23 14:04:46 +00:00
Wouter Wijngaards ddff09a710 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3408 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-22 08:19:12 +00:00
Wouter Wijngaards 7efd7aba85 - Removed contrib/unbound_unixsock.diff, because it has been
integrated, use control-interface: /path in unbound.conf.


git-svn-id: file:///svn/unbound/trunk@3407 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-22 08:03:34 +00:00
Wouter Wijngaards ff898bfdd6 - Synthesize ANY responses from cache. Does not search exhaustively,
but MX,A,AAAA,SOA,NS also CNAME.
- Fix leaked dns64prefix configuration string.


git-svn-id: file:///svn/unbound/trunk@3405 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-17 14:58:07 +00:00
Wouter Wijngaards 5556c4fb3c and rerun autoconf.
git-svn-id: file:///svn/unbound/trunk@3404 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:41:55 +00:00
Wouter Wijngaards 863b12ffd4 #664: Fix issue with Python 3 mapping of FILE* using file_py3.i from ldns.
git-svn-id: file:///svn/unbound/trunk@3403 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:41:14 +00:00
Wouter Wijngaards da612901d7 #664: libunbound-Python: libldns is not used anymore.
git-svn-id: file:///svn/unbound/trunk@3402 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:38:38 +00:00
Wouter Wijngaards f5442e9c5b #664: libunbound examples: produce sorted output.
git-svn-id: file:///svn/unbound/trunk@3401 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:37:12 +00:00
Wouter Wijngaards 9e6fa9f687 - Fix bug#664: libunbound python3 related fixes (from Tomas Hozza)
Use print_function also for Python2.


git-svn-id: file:///svn/unbound/trunk@3400 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:35:55 +00:00
Wouter Wijngaards 628ff05285 - Ratelimit does not apply to prefetched queries, and ratelimit-factor
is default 10.  Repeated normal queries get resolved and with
  prefetch stay in the cache.


git-svn-id: file:///svn/unbound/trunk@3399 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 14:18:50 +00:00
Wouter Wijngaards e25ac1c2eb - Add local-zone type inform_deny, that logs query and drops answer.
git-svn-id: file:///svn/unbound/trunk@3398 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-16 08:23:06 +00:00
Wouter Wijngaards 13b482c418 manpage for ratelimit_list
git-svn-id: file:///svn/unbound/trunk@3397 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 14:07:25 +00:00
Wouter Wijngaards 69d2fd7818 - Fix#663: ssl handshake fails when using unix socket because dh size
is too small.


git-svn-id: file:///svn/unbound/trunk@3396 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 13:56:12 +00:00
Wouter Wijngaards 55412b2645 - Fix that get_option for cache-sizes does not print double newline.
git-svn-id: file:///svn/unbound/trunk@3395 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 13:43:44 +00:00
Wouter Wijngaards c03ff186ec fixes for undeclared function.
git-svn-id: file:///svn/unbound/trunk@3394 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 12:19:30 +00:00
Wouter Wijngaards 85192d4569 - unbound-control ratelimit_list lists high rate domains.
git-svn-id: file:///svn/unbound/trunk@3393 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 12:13:59 +00:00
Wouter Wijngaards bc658e0361 Fixes.
git-svn-id: file:///svn/unbound/trunk@3392 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 10:57:25 +00:00
Wouter Wijngaards e30a90febc - ratelimit feature, ratelimit: 100, or some sensible qps, can be
used to turn it on.  It ratelimits recursion effort per zone.
  For particular names you can configure exceptions in unbound.conf.


git-svn-id: file:///svn/unbound/trunk@3391 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-10 09:59:57 +00:00
Wouter Wijngaards e0631733a6 - Fix crash in dnstap: Do not try to log TCP responses after timeout.
git-svn-id: file:///svn/unbound/trunk@3390 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-08 19:58:06 +00:00
Wouter Wijngaards 53008d7969 - unbound-control list_insecure command shows the negative trust
anchors currently configured, patch from Jelte Jansen.


git-svn-id: file:///svn/unbound/trunk@3389 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 13:50:09 +00:00
Wouter Wijngaards 08b8c34940 typo fix.
(svn:NO TEST)


git-svn-id: file:///svn/unbound/trunk@3388 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 12:10:37 +00:00
Wouter Wijngaards 32f808fcfa - Unbound exits with a fatal error when the auto-trust-anchor-file
fails to be writable.  This is seconds after startup.  You can
  load a readonly auto-trust-anchor-file with trust-anchor-file.
  The file has to be writable to notice the trust anchor change,
  without it, a trust anchor change will be unnoticed and the system
  will then become unoperable.


git-svn-id: file:///svn/unbound/trunk@3387 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 12:03:05 +00:00
Wouter Wijngaards d95b378fad Fixup test; icann root cert has not changed.
git-svn-id: file:///svn/unbound/trunk@3386 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 08:01:22 +00:00
Wouter Wijngaards cdeb81f219 And skip dos-newlines for only addrs on line.
git-svn-id: file:///svn/unbound/trunk@3385 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 07:54:30 +00:00
Wouter Wijngaards 11b13d5928 - Libunbound skips dos-line-endings from etc/hosts.
git-svn-id: file:///svn/unbound/trunk@3384 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 07:51:43 +00:00
Wouter Wijngaards 40c0bbf371 - Fix #660: Fix interface-automatic broken in the presence of
asymmetric routing.


git-svn-id: file:///svn/unbound/trunk@3383 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-02 10:02:01 +00:00
Wouter Wijngaards 6bc89b3ccd Fix pythonmod.
git-svn-id: file:///svn/unbound/trunk@3382 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-01 08:40:52 +00:00
Wouter Wijngaards 06fa21b0da Fixup rrset unlock in case of allocation failure.
git-svn-id: file:///svn/unbound/trunk@3381 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 13:15:55 +00:00
Wouter Wijngaards b2bdce46be - rename ldns subdirectory to sldns to avoid name collision.
git-svn-id: file:///svn/unbound/trunk@3380 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 10:21:38 +00:00
Wouter Wijngaards de61a65867 - remote.c probedelay line is easier to read.
git-svn-id: file:///svn/unbound/trunk@3379 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 09:46:06 +00:00
Wouter Wijngaards 7a9ccf858c - If unknown trust anchor algorithm, and libressl is used, error
message encourages upgrade of the libressl package.


git-svn-id: file:///svn/unbound/trunk@3378 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-25 16:04:05 +00:00
Wouter Wijngaards ebbe43098a - Fix #657: libunbound(3) recommends deprecated
CRYPTO_set_id_callback.


git-svn-id: file:///svn/unbound/trunk@3377 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-25 08:06:35 +00:00
Wouter Wijngaards e3994c1273 Fixed like Maciej did.
git-svn-id: file:///svn/unbound/trunk@3376 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-23 20:42:47 +00:00
Wouter Wijngaards bd404f5fd3 - Fix segfault on user not found at startup (from Maciej Soltysiak).
git-svn-id: file:///svn/unbound/trunk@3375 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-23 20:20:15 +00:00
Wouter Wijngaards cd2e99dafd Do not divide by zero.
git-svn-id: file:///svn/unbound/trunk@3374 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-20 16:03:14 +00:00
Wouter Wijngaards 383e32f02f Check before storing value.
git-svn-id: file:///svn/unbound/trunk@3373 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-20 15:58:55 +00:00
Wouter Wijngaards 6feb8fb6a5 - Fixes to add integer overflow checks on allocation (defense in depth).
git-svn-id: file:///svn/unbound/trunk@3372 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-20 15:36:25 +00:00
Wouter Wijngaards 0a0b37be65 fixup compiler warning on OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3371 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-19 14:47:42 +00:00
Wouter Wijngaards a1d006bc77 comment spelling improvement.
git-svn-id: file:///svn/unbound/trunk@3370 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-19 09:58:49 +00:00
Wouter Wijngaards 77088b12ff - Add ip-transparent config option for bind to non-local addresses.
git-svn-id: file:///svn/unbound/trunk@3369 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-19 09:50:35 +00:00
Wouter Wijngaards e9e1b464a6 extra sanity check for integer overflow.
git-svn-id: file:///svn/unbound/trunk@3368 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 16:22:04 +00:00
Wouter Wijngaards 6c6ef98b38 please lint.
git-svn-id: file:///svn/unbound/trunk@3367 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 09:44:57 +00:00
Wouter Wijngaards 0f9fda81e6 please lint.
git-svn-id: file:///svn/unbound/trunk@3366 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 09:38:47 +00:00
Wouter Wijngaards 63b5d109f8 - Use reallocarray for integer overflow protection, patch submitted
by Loganaden Velvindron.


git-svn-id: file:///svn/unbound/trunk@3365 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 08:24:24 +00:00
Wouter Wijngaards b629cdac02 Reallocarray compat source from OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3364 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 08:20:25 +00:00
Wouter Wijngaards 887fa791f2 please lint.
git-svn-id: file:///svn/unbound/trunk@3363 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-16 11:51:30 +00:00
Wouter Wijngaards 29f18d8f86 - Fixup compile on cygwin, more portable openssl thread id.
git-svn-id: file:///svn/unbound/trunk@3362 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-16 10:51:32 +00:00
Wouter Wijngaards 3568ea8bb5 - Updated default keylength in unbound-control-setup to 3k.
git-svn-id: file:///svn/unbound/trunk@3361 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-12 15:34:03 +00:00
Wouter Wijngaards bac2305fa6 - Fix warning on sign compare in getentropy_linux.
git-svn-id: file:///svn/unbound/trunk@3360 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-10 10:29:55 +00:00
Wouter Wijngaards 4bb7d2b3b1 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3359 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-10 10:17:45 +00:00
Wouter Wijngaards ed7b7bef11 print svnroot for windows makedist. 1.5.4 in configure.ac
git-svn-id: file:///svn/unbound/trunk@3358 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-10 10:03:45 +00:00
Wouter Wijngaards 23b58890e5 - Fix lintian warning in unbound-checkconf man page (from Andreas
Schulze).


git-svn-id: file:///svn/unbound/trunk@3356 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-10 08:00:40 +00:00
Wouter Wijngaards 56aefe656b - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3355 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-09 13:39:27 +00:00
Wouter Wijngaards 49250ef291 - Fix #644: harden-algo-downgrade option, if turned off, fixes the
reported excessive validation failure when multiple algorithms
  are present.  It allows the weakest algorithm to validate the zone.


git-svn-id: file:///svn/unbound/trunk@3354 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-09 13:30:37 +00:00
Wouter Wijngaards b87e7c90be - stats reports tcp usage, of incoming-num-tcp buffers.
git-svn-id: file:///svn/unbound/trunk@3353 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-05 15:23:14 +00:00
Wouter Wijngaards ab539746ff - Document that incoming-num-tcp increase is good for large servers.
git-svn-id: file:///svn/unbound/trunk@3352 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-05 11:41:29 +00:00
Wouter Wijngaards a197bcaa0c - contrib/unbound_smf22.tar.gz: Solaris SMF installation/removal
scripts.  Contributed by Yuri Voinov.


git-svn-id: file:///svn/unbound/trunk@3351 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-05 08:18:59 +00:00
Wouter Wijngaards 67c6df20aa - Document windows 8 tests.
git-svn-id: file:///svn/unbound/trunk@3350 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 13:24:27 +00:00
Wouter Wijngaards 7861314db3 And use best response in case 0x20 fallback done.
git-svn-id: file:///svn/unbound/trunk@3349 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 09:35:06 +00:00
Wouter Wijngaards 7e50976476 - store caps_response with best response in case downgrade response
happens to be the last one.


git-svn-id: file:///svn/unbound/trunk@3348 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 09:31:26 +00:00
Wouter Wijngaards 54771e5b3d - many nameservers does not try to compare more than max-sent-count,
parse failures start 0x20 fallback procedure.


git-svn-id: file:///svn/unbound/trunk@3347 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 09:06:05 +00:00
Wouter Wijngaards ab62061196 - 0x20 fallback improved, better handling of servfail responses,
they do not count as missing comparisons (except if all are failed),
  and better handling of inability to find nameservers, no more
  nameservers can be found results in fallback acceptance.


git-svn-id: file:///svn/unbound/trunk@3346 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 08:30:17 +00:00
Wouter Wijngaards 34283df859 - Patch from Brad Smith that syncs compat/getentropy_linux with
OpenBSD's version (2015-03-04).


git-svn-id: file:///svn/unbound/trunk@3345 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-04 07:18:09 +00:00
Wouter Wijngaards bd05a6de8c - tag 1.5.3rc1
git-svn-id: file:///svn/unbound/trunk@3344 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-03 13:37:53 +00:00
Wouter Wijngaards 929b5c08ee iana portlist update
git-svn-id: file:///svn/unbound/trunk@3342 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-02 11:03:14 +00:00
Wouter Wijngaards a226533c8b - Fix #647 crash in 1.5.2 because pwd.db no longer accessible after
reload.


git-svn-id: file:///svn/unbound/trunk@3341 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-20 14:48:04 +00:00
Wouter Wijngaards 34402f8455 - Fix #646 Portability to Solaris, -lrt for getentropy_solaris.
git-svn-id: file:///svn/unbound/trunk@3340 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-20 14:03:41 +00:00
Wouter Wijngaards 679f545d08 - Portability to Solaris 10, use AF_LOCAL.
git-svn-id: file:///svn/unbound/trunk@3339 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-20 13:55:09 +00:00
Wouter Wijngaards 160dd56c4a - Use the getrandom syscall introduced in Linux 3.17 (from Heiner Kallweit).
git-svn-id: file:///svn/unbound/trunk@3338 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-20 09:19:32 +00:00
Wouter Wijngaards a6eb4fd0a8 - 1.5.2 release tag.
- svn trunk contains 1.5.3 under development.


git-svn-id: file:///svn/unbound/trunk@3337 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-19 15:16:40 +00:00
Wouter Wijngaards 29db65b4a8 - Fix #643: doc/example.conf.in: unnecessary whitespace.
git-svn-id: file:///svn/unbound/trunk@3335 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-13 11:02:46 +00:00
Wouter Wijngaards a7e433d0b1 - tag 1.5.2rc1
git-svn-id: file:///svn/unbound/trunk@3334 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-12 15:33:20 +00:00
Wouter Wijngaards 5377d8ece6 Fixup makefile dependencies for outdir compile without dnstap
git-svn-id: file:///svn/unbound/trunk@3332 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-11 14:57:19 +00:00
Wouter Wijngaards d979a5bafe - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3331 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-11 07:24:57 +00:00
Wouter Wijngaards 025f36b169 - Fix scrubber with harden-glue turned off to reject NS (and other
not-address) records.


git-svn-id: file:///svn/unbound/trunk@3330 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-10 14:01:45 +00:00
Wouter Wijngaards e08aa7c5e1 - Fix validation failure in case upstream forwarder (ISC BIND) does
not have the same trust anchors and decides to insert unsigned NS
  record in authority section.


git-svn-id: file:///svn/unbound/trunk@3329 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-09 11:44:46 +00:00
Wouter Wijngaards 3ef33154e5 - infra-cache-min-rtt patch from Florian Riehm, for expected long
uplink roundtrip times.


git-svn-id: file:///svn/unbound/trunk@3328 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-02 08:46:22 +00:00
Wouter Wijngaards 397cb6ff55 Solaris portability fix.
git-svn-id: file:///svn/unbound/trunk@3327 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-30 15:34:27 +00:00
Wouter Wijngaards 83ba5ffcf4 - Portability fix for Solaris ('sun' is not usable for a variable).
git-svn-id: file:///svn/unbound/trunk@3326 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-30 15:32:59 +00:00
Wouter Wijngaards 74cac624bd Fixup unit test.
git-svn-id: file:///svn/unbound/trunk@3325 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-30 09:57:32 +00:00
Wouter Wijngaards be5ac109c3 And a unit test for the strip operation.
git-svn-id: file:///svn/unbound/trunk@3324 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-30 09:47:03 +00:00
Wouter Wijngaards 3d66ef2b92 - Fix 0x20 capsforid fallback to omit gratuitous NS and additional
section changes.


git-svn-id: file:///svn/unbound/trunk@3323 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-30 09:35:38 +00:00
Wouter Wijngaards d17b312471 - Fix pyunbound byte string representation for python3.
git-svn-id: file:///svn/unbound/trunk@3322 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-29 16:10:51 +00:00
Wouter Wijngaards 15d16580a8 - Fix unintended use of gcc extension for incomplete enum types,
compile with pedantic c99 compliance (from Daniel Dickman).


git-svn-id: file:///svn/unbound/trunk@3321 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-26 08:46:40 +00:00
Wouter Wijngaards c9a20c4a33 Fixup control socket test for OSX.
git-svn-id: file:///svn/unbound/trunk@3320 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-23 16:00:33 +00:00
Wouter Wijngaards 79044dc6cf - windows port fixes, no AF_LOCAL, no chown, no chmod(grp).
git-svn-id: file:///svn/unbound/trunk@3319 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-23 15:23:58 +00:00
Wouter Wijngaards b1d79cb0ab remove unused files from testcode
git-svn-id: file:///svn/unbound/trunk@3318 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-22 15:53:31 +00:00
Wouter Wijngaards 648c37da3f comment fixup.
svn:NO TEST


git-svn-id: file:///svn/unbound/trunk@3317 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-22 15:10:17 +00:00
Wouter Wijngaards 4de0734ec8 - unbound-checkconf -f prints chroot with pidfile path.
git-svn-id: file:///svn/unbound/trunk@3316 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-16 14:31:02 +00:00
Wouter Wijngaards 92e26a89ad - unit test for local unix connection. Documentation and log_addr
does not inspect port for AF_LOCAL.


git-svn-id: file:///svn/unbound/trunk@3315 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-16 13:11:07 +00:00
Wouter Wijngaards 8e09fa7a29 iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3314 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-13 13:46:48 +00:00
Wouter Wijngaards 03d1afc32a - Fix pyunbound ord call, portable for python 2 and 3.
git-svn-id: file:///svn/unbound/trunk@3313 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-12 15:20:20 +00:00
Wouter Wijngaards f890257321 - Cast sun_len sizeof to socklen_t.
git-svn-id: file:///svn/unbound/trunk@3312 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-12 08:20:43 +00:00
Wouter Wijngaards d978957ad9 - Fix warnings in pythonmod changes.
git-svn-id: file:///svn/unbound/trunk@3311 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-07 09:29:59 +00:00
Wouter Wijngaards e4889366fb fix attribution.
git-svn-id: file:///svn/unbound/trunk@3310 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-07 07:49:46 +00:00
Wouter Wijngaards 047de3e1ee - coded the default of control-use-cert, to yes.
git-svn-id: file:///svn/unbound/trunk@3309 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:54:38 +00:00
Wouter Wijngaards d6ba537156 please lint on FreeBSD
git-svn-id: file:///svn/unbound/trunk@3308 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:49:34 +00:00
Wouter Wijngaards cd7d15aee9 Fix doc.
git-svn-id: file:///svn/unbound/trunk@3307 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:41:04 +00:00
Wouter Wijngaards a3f0a34efb - Fixup that patch and uid lookup (only for daemon).
git-svn-id: file:///svn/unbound/trunk@3306 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:37:45 +00:00
Wouter Wijngaards f46bcc5b6f please lint.
git-svn-id: file:///svn/unbound/trunk@3305 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:18:03 +00:00
Wouter Wijngaards df73be98bd - patch for remote control over local sockets, from Dag-Erling
Smorgrav, Ilya Bakulin.  Use control-interface: /path/sock and
  control-use-cert: no.


git-svn-id: file:///svn/unbound/trunk@3304 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 14:12:59 +00:00
Wouter Wijngaards 0dea293963 iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3303 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-06 08:02:41 +00:00
Wouter Wijngaards 3ff24984a4 remove debug print
git-svn-id: file:///svn/unbound/trunk@3302 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 14:48:10 +00:00
Wouter Wijngaards 2290acb422 - Patch from Philip Paeps to contrib/unbound_munin_ that uses
type ABSOLUTE.  Allows munin.conf: [idleserver.example.net]
  unbound_munin_hits.graph_period minute


git-svn-id: file:///svn/unbound/trunk@3301 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 14:47:52 +00:00
Wouter Wijngaards f053fa009c - Updated contrib warmup.cmd/sh to support two modes - load
from pre-defined list of domains or (with filename as argument)
  load from user-specified list of domains, and updated contrib
  unbound_cache.sh/cmd to support loading/save/reload cache to/from
  default path or (with secondary argument) arbitrary path/filename,
  from Yuri Voinov.


git-svn-id: file:///svn/unbound/trunk@3300 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 13:58:51 +00:00
Wouter Wijngaards 7319df2e32 attribution.
git-svn-id: file:///svn/unbound/trunk@3299 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 13:53:52 +00:00
Wouter Wijngaards ac5ccb6db6 - Fix #634: fix fail to start on Linux LTS 3.14.X, ignores missing
IP_MTU_DISCOVER OMIT option.


git-svn-id: file:///svn/unbound/trunk@3298 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 13:51:22 +00:00
Wouter Wijngaards 724a4f3ae0 - patch from Brad Smith that fixes DESTDIR in unbound-control-setup
for installs where config is not in the prefix location.


git-svn-id: file:///svn/unbound/trunk@3297 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 13:20:04 +00:00
Wouter Wijngaards 42cf616fae - print query name when max target count is exceeded.
git-svn-id: file:///svn/unbound/trunk@3296 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 13:12:42 +00:00
Wouter Wijngaards bcec3cc4f1 - patch from Stephane Lapie that adds to the python API, that
exposes struct delegpt, and adds the find_delegation function.


git-svn-id: file:///svn/unbound/trunk@3295 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 10:16:36 +00:00
Wouter Wijngaards 3c0273186e - make strip works for unbound-host and unbound-anchor.
git-svn-id: file:///svn/unbound/trunk@3294 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 09:33:31 +00:00
Wouter Wijngaards 95eda05cfe - getauxval test for ppc64 linux compatibility.
git-svn-id: file:///svn/unbound/trunk@3293 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-05 09:13:32 +00:00
Wouter Wijngaards 1b44c9393e - local-zone: example.com inform makes unbound log a message with
client IP for queries in that zone.  Eg. for finding infected hosts.


git-svn-id: file:///svn/unbound/trunk@3292 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-12-09 11:29:17 +00:00
Wouter Wijngaards fbcf7dcd06 - svn trunk has 1.5.2 in development.
- config.guess and config.sub update from libtoolize.


git-svn-id: file:///svn/unbound/trunk@3291 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-12-09 08:24:27 +00:00
Wouter Wijngaards f7039d8a59 - Fix CVE-2014-8602: denial of service by making resolver chase
endless series of delegations.


git-svn-id: file:///svn/unbound/trunk@3289 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-12-08 15:09:18 +00:00
Wouter Wijngaards 3280937577 - Fix bug#632: unbound fails to build on AArch64, protects
getentropy compat code from calling sysctl if it is has been removed.


git-svn-id: file:///svn/unbound/trunk@3287 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-12-02 00:19:42 +00:00
Wouter Wijngaards 988dad4dda - Add include to getentropy_linux.c, hopefully fixing debian build.
git-svn-id: file:///svn/unbound/trunk@3286 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-30 02:00:29 +00:00
Wouter Wijngaards b88fefa1c3 - Fix makefile for build from noexec source tree.
git-svn-id: file:///svn/unbound/trunk@3285 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-28 20:28:38 +00:00
Wouter Wijngaards 9e0f17a943 nicer.
git-svn-id: file:///svn/unbound/trunk@3284 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-27 11:04:45 +00:00
Wouter Wijngaards 6342eba273 Give credits for the aaaa-filter patch.
Patch from Stephane Lapie for ASAHI Net (no restrictions on use).


git-svn-id: file:///svn/unbound/trunk@3283 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-27 10:59:47 +00:00
Wouter Wijngaards cd154abe61 Fix attribution and mention company (no restriction on use).
git-svn-id: file:///svn/unbound/trunk@3282 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-27 10:54:05 +00:00
Wouter Wijngaards 581ef79213 - Fix libunbound undefined symbol errors for main.
Referencing main does not seem to be possible for libunbound.


git-svn-id: file:///svn/unbound/trunk@3280 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-26 16:18:53 +00:00
Wouter Wijngaards 9141273883 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3279 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-24 08:46:24 +00:00
Wouter Wijngaards 24236a6d28 - Fix log at high verbosity and memory allocation failure.
git-svn-id: file:///svn/unbound/trunk@3278 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-24 08:17:45 +00:00
Wouter Wijngaards 58542119a2 - Fix crash on multiple thread random usage on systems without
arc4random.


git-svn-id: file:///svn/unbound/trunk@3277 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-21 08:22:18 +00:00
Wouter Wijngaards 02b6373a7e - fix compat/getentropy_win.c check if CryptGenRandom works and no
immediate exit on windows.


git-svn-id: file:///svn/unbound/trunk@3276 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-20 12:44:00 +00:00
Wouter Wijngaards 67a3c4933c - Fix cdflag dns64 processing.
git-svn-id: file:///svn/unbound/trunk@3275 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-19 08:43:08 +00:00
Wouter Wijngaards f6975a2c75 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3274 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-18 15:16:25 +00:00
Wouter Wijngaards b781f2d48d - Fix that CD flag disables DNS64 processing, returning the DNSSEC
signed AAAA denial.


git-svn-id: file:///svn/unbound/trunk@3273 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-18 15:15:57 +00:00
Wouter Wijngaards fcfbfe4030 - Fix #627: SSL_CTX_load_verify_locations return code not properly
checked.


git-svn-id: file:///svn/unbound/trunk@3271 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-17 08:10:49 +00:00
Wouter Wijngaards e8fa4a9aff - parser with bison 2.7
git-svn-id: file:///svn/unbound/trunk@3270 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-14 15:59:30 +00:00
Wouter Wijngaards 72b0df1659 - Patch from Stephanie Lapie that implements aaaa-filter, added
to contrib/aaaa-filter-iterator.patch.


git-svn-id: file:///svn/unbound/trunk@3269 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-13 09:03:47 +00:00
Wouter Wijngaards 08f84c8e32 - trunk has 1.5.1 in development.
git-svn-id: file:///svn/unbound/trunk@3268 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-12 21:17:12 +00:00
Wouter Wijngaards 90592bdded - Patch from James Raftery, always print stats for rcodes 0..5.
git-svn-id: file:///svn/unbound/trunk@3267 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-12 17:25:59 +00:00
Wouter Wijngaards 6eb7ebb34d - Removed 'increased limit open files' log message that is written
to console.  It is only written on verbosity 4 and higher.
  This keeps system bootup console cleaner.


git-svn-id: file:///svn/unbound/trunk@3266 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-12 11:04:43 +00:00
Wouter Wijngaards f114fd5326 - Patch from Robert Edmonds fixes hyphens in unbound-anchor man page.
git-svn-id: file:///svn/unbound/trunk@3265 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-12 11:00:31 +00:00
Wouter Wijngaards fef143ba53 - Patch from Robert Edmonds to build pyunbound python module
differently.  No versioninfo, with -shared and without $(LIBS).


git-svn-id: file:///svn/unbound/trunk@3264 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-12 10:58:33 +00:00
Wouter Wijngaards e86a9fdecd - review fix from Ralph.
git-svn-id: file:///svn/unbound/trunk@3263 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 14:42:56 +00:00
Wouter Wijngaards be954379f0 - review fix from Ralph.
git-svn-id: file:///svn/unbound/trunk@3262 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 14:27:35 +00:00
Wouter Wijngaards 7d913b6ac8 tag 1.5.0rc1
git-svn-id: file:///svn/unbound/trunk@3260 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 14:18:32 +00:00
Wouter Wijngaards 30687f343f - version number in svn trunk is 1.5.0
git-svn-id: file:///svn/unbound/trunk@3259 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 13:23:50 +00:00
Wouter Wijngaards 612a4e152f - Fix bug where forward or stub addresses with same address but
different port number were not tried.


git-svn-id: file:///svn/unbound/trunk@3258 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 13:10:44 +00:00
Wouter Wijngaards cd56ca05c3 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3257 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-11 09:32:30 +00:00
Wouter Wijngaards c991f3d9e6 Fixup free in case of buffer short.
git-svn-id: file:///svn/unbound/trunk@3256 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-10 13:26:16 +00:00
Wouter Wijngaards e3843bd0b6 remove unused variable
git-svn-id: file:///svn/unbound/trunk@3255 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-07 09:09:37 +00:00
Wouter Wijngaards 818650efae - dnstap fixes by Robert Edmonds:
dnstap/dnstap.m4: cosmetic fixes
	dnstap/: Remove compiled protoc-c output files
	dnstap/dnstap.m4: Error out if required libraries are not found
	dnstap: Fix ProtobufCBufferSimple usage that is incorrect as of
		protobuf-c 1.0.0
	dnstap/: Adapt to API changes in latest libfstrm (>= 0.2.0)


git-svn-id: file:///svn/unbound/trunk@3254 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-07 09:09:04 +00:00
Wouter Wijngaards d3811488ee Fix from ldns.
git-svn-id: file:///svn/unbound/trunk@3253 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-05 14:42:57 +00:00
Wouter Wijngaards 5b7de6d753 - Redefine internal minievent symbols to unique symbols that helps
linking on platforms where the linker leaks names across modules.


git-svn-id: file:///svn/unbound/trunk@3252 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-04 14:04:37 +00:00
Wouter Wijngaards 973f7a2225 - Add ub_ctx_add_ta_autr function to add a RFC5011 automatically
tracked trust anchor to libunbound.


git-svn-id: file:///svn/unbound/trunk@3251 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-04 09:11:59 +00:00
Wouter Wijngaards 96db52fd8e spelling. (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@3250 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-28 16:03:08 +00:00
Wouter Wijngaards 8a6384d0ac - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3249 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-27 09:54:44 +00:00
Wouter Wijngaards 7084c20f88 - Disabled use of SSLv3 in remote-control and ssl-upstream.
git-svn-id: file:///svn/unbound/trunk@3248 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-27 09:26:48 +00:00
Wouter Wijngaards e26cce4ae7 Layout improvement of the nroff source.
git-svn-id: file:///svn/unbound/trunk@3247 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-16 09:45:11 +00:00
Wouter Wijngaards 4570801bc4 - Documented dns64 configuration in unbound.conf man page.
git-svn-id: file:///svn/unbound/trunk@3246 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-16 09:37:56 +00:00
Wouter Wijngaards 588532af80 whitespace nicer.
git-svn-id: file:///svn/unbound/trunk@3245 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 12:14:43 +00:00
Wouter Wijngaards f1bcc1032f More casts.
git-svn-id: file:///svn/unbound/trunk@3244 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 09:23:12 +00:00
Wouter Wijngaards 722d446905 And more casts.
git-svn-id: file:///svn/unbound/trunk@3243 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 08:46:08 +00:00
Wouter Wijngaards 339a6be27d More unsigned chasts for toupper/tolower/ctype
git-svn-id: file:///svn/unbound/trunk@3242 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 08:35:00 +00:00
Wouter Wijngaards f607500a2c - Fix ctype invocation casts.
git-svn-id: file:///svn/unbound/trunk@3241 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 08:22:34 +00:00
Wouter Wijngaards 71eab23c63 - Fix #617: in ldns in unbound, lowercase WKS services.
git-svn-id: file:///svn/unbound/trunk@3240 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 07:11:16 +00:00
Wouter Wijngaards 83f9f236d7 - Fix unbound capsforid fallback, it ignores TTLs in comparison.
git-svn-id: file:///svn/unbound/trunk@3239 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-10 14:12:17 +00:00
Wouter Wijngaards 1c42e5f3f9 - Fix unbound-checkconf check for module config with dns64 module.
git-svn-id: file:///svn/unbound/trunk@3238 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-10 07:07:58 +00:00
Wouter Wijngaards 50d73a0a32 and name, of course
(svn:NO TEST)


git-svn-id: file:///svn/unbound/trunk@3237 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-06 12:49:08 +00:00
Wouter Wijngaards d647e80d14 changelog update.
git-svn-id: file:///svn/unbound/trunk@3236 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-06 12:35:02 +00:00
Willem Toorop 457d01b8c5 - Whitespaces after $ORIGIN are not part of the origin dname
- $TTL's value starts at position 5


git-svn-id: file:///svn/unbound/trunk@3235 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-06 12:19:06 +00:00
Wouter Wijngaards ebcf244e9f - Fix #614: man page variable substitution bug.
git-svn-id: file:///svn/unbound/trunk@3234 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-06 07:42:42 +00:00
Wouter Wijngaards 96c1039705 - fix #613: Allow tab ws in var length last rdfs (in ldns str2wire).
git-svn-id: file:///svn/unbound/trunk@3233 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-01 08:11:42 +00:00
Wouter Wijngaards 00d9ede510 - Fix #612: create service with service.conf in present directory and
auto load it.


git-svn-id: file:///svn/unbound/trunk@3232 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-29 09:27:22 +00:00
Wouter Wijngaards 829a93b01c Fix ar for mingw openssl compile.
git-svn-id: file:///svn/unbound/trunk@3231 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-29 08:29:04 +00:00
Wouter Wijngaards b206977465 - Fix for mingw compile openssl ranlib.
git-svn-id: file:///svn/unbound/trunk@3230 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-29 08:18:32 +00:00
Wouter Wijngaards a14f0ffb79 - updated configure and aclocal with newer autoconf 1.13.
git-svn-id: file:///svn/unbound/trunk@3229 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-25 11:45:32 +00:00
Wouter Wijngaards d56d11ff55 - Fix for mingw compile with openssl-1.0.1i.
git-svn-id: file:///svn/unbound/trunk@3228 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-22 12:20:20 +00:00
Wouter Wijngaards 4cab831abc - Fix swig and python examples for Python 3.x.
git-svn-id: file:///svn/unbound/trunk@3227 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-22 11:39:00 +00:00
Wouter Wijngaards bc404518cf - improve python configuration detection to build on Fedora 22.
from Pavel Simerda.


git-svn-id: file:///svn/unbound/trunk@3226 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-19 09:57:20 +00:00
Wouter Wijngaards ebfd1f3c4c - patches to also build with Python 3.x (from Pavel Simerda).
git-svn-id: file:///svn/unbound/trunk@3225 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-18 13:28:21 +00:00
Wouter Wijngaards f1294a93cd - Updated the TCP_BACLOG from 5 to 256, so that the tcp accept queue
is longer and more tcp connections can be handled.


git-svn-id: file:///svn/unbound/trunk@3224 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-16 13:49:21 +00:00
Wouter Wijngaards b9e1d08ce2 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3223 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-16 13:08:38 +00:00
Wouter Wijngaards 6a7193a016 - Fix tcp timer waiting list removal code.
git-svn-id: file:///svn/unbound/trunk@3222 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-16 13:08:27 +00:00
Wouter Wijngaards eca9b37353 - Fix unit test for CDS typecode.
git-svn-id: file:///svn/unbound/trunk@3221 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-15 12:49:37 +00:00
Wouter Wijngaards 3e510bedee - type CDS and CDNSKEY types in sldns.
git-svn-id: file:///svn/unbound/trunk@3220 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-09-05 09:25:31 +00:00
Wouter Wijngaards a2bcf1d2ec spelling fix.
git-svn-id: file:///svn/unbound/trunk@3219 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 13:53:30 +00:00
Wouter Wijngaards 3390cc15c7 If we find protobuf in /usr/local then also set -L to there.
git-svn-id: file:///svn/unbound/trunk@3218 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 13:17:53 +00:00
Wouter Wijngaards aa5b248dd2 Neater, remove unused lines.
git-svn-id: file:///svn/unbound/trunk@3217 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 13:11:26 +00:00
Wouter Wijngaards 595d40aad5 - Removed necessity for pkg-config from the dnstap.m4, new are
the --with-libfstrm and --with-protobuf-c configure options.


git-svn-id: file:///svn/unbound/trunk@3216 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 13:04:32 +00:00
Wouter Wijngaards 5775a459e6 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3215 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 12:05:52 +00:00
Wouter Wijngaards 912b10a789 - Fixup checklock code for log lock and its mutual initialization
dependency.


git-svn-id: file:///svn/unbound/trunk@3214 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-25 12:00:30 +00:00
Wouter Wijngaards 4153f386d1 remove warning.
git-svn-id: file:///svn/unbound/trunk@3213 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-22 13:38:30 +00:00
Wouter Wijngaards 3bb7e92fc3 - Update unbound manpage with more explanation (from Florian Obser).
- Removed .LP after .SH.


git-svn-id: file:///svn/unbound/trunk@3212 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-19 10:32:17 +00:00
Wouter Wijngaards caaa9c7afc Fixup fwd_ancil for running in the freebsd jail without ::1.
git-svn-id: file:///svn/unbound/trunk@3211 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-18 14:54:33 +00:00
Wouter Wijngaards cbbc4db4b3 - Fixup doc/unbound.doxygen to remove obsolete 1.8.7 settings.
git-svn-id: file:///svn/unbound/trunk@3210 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-18 14:50:59 +00:00
Wouter Wijngaards aa9a1721cc Fixup for dnstap.
git-svn-id: file:///svn/unbound/trunk@3209 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-18 14:42:26 +00:00
Wouter Wijngaards 700ad4e832 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3208 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-18 07:46:48 +00:00
Wouter Wijngaards 0c7d24f655 - Fix #603: unbound-checkconf -o <option> should skip verification
checks.


git-svn-id: file:///svn/unbound/trunk@3207 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-18 07:21:01 +00:00
Wouter Wijngaards 8ccba42b1f - dnstap support, with a patch from Farsight Security, written by
Robert Edmonds. The --enable-dnstap needs libfstrm and protobuf-c.
  It is BSD licensed (see dnstap/dnstap.c).
  Building with --enable-dnstap needs pkg-config with this patch.
- Noted dnstap in doc/README and doc/CREDITS.


git-svn-id: file:///svn/unbound/trunk@3206 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-05 07:57:52 +00:00
Wouter Wijngaards efe66a977e whitespace neater.
git-svn-id: file:///svn/unbound/trunk@3205 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-01 13:33:45 +00:00
Wouter Wijngaards 8fb0bbe9d8 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3204 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-01 13:30:39 +00:00
Wouter Wijngaards 5a9c377104 - Patch add msg, rrset, infra and key cache sizes to stats command
from Maciej Soltysiak.


git-svn-id: file:///svn/unbound/trunk@3203 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-08-01 13:24:46 +00:00
Wouter Wijngaards e752c94cf6 please doxygen.
git-svn-id: file:///svn/unbound/trunk@3202 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:48:31 +00:00
Wouter Wijngaards a03340dc52 please lint for dns64.
git-svn-id: file:///svn/unbound/trunk@3201 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:21:09 +00:00
Wouter Wijngaards 1db64fa265 - testdata/dns64_lookup.rpl for unit test for dns64 functionality.
git-svn-id: file:///svn/unbound/trunk@3200 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:16:18 +00:00
Wouter Wijngaards 04bacd679b - Changes from DNS64:
strcpy changed to memmove.
  arraybound check fixed from prefix_net/8/4 to prefix_net/8+4.
  allocation of result consistently in the correct region.
  time_t is now used for ttl in unbound (since the patch's version).


git-svn-id: file:///svn/unbound/trunk@3199 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:00:38 +00:00
Wouter Wijngaards 45022b6add - DNS64 from Viagenie (BSD Licensed), written by Simon Perrault.
Initial commit of the patch from the FreeBSD base (with its fixes).
  This adds a module (for module-config in unbound.conf) dns64 that
  performs DNS64 processing, see README.DNS64.


git-svn-id: file:///svn/unbound/trunk@3198 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 07:15:33 +00:00
Wouter Wijngaards dad3e92df7 - Patch from Dag-Erling Smorgrav that implements feature, unbound -dd
does not fork in the background and also logs to stderr.


git-svn-id: file:///svn/unbound/trunk@3197 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-29 11:48:43 +00:00
Wouter Wijngaards ec3b6d8bf7 - Fix endian.h include for OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3196 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-21 00:06:54 +00:00
Wouter Wijngaards d0bf841680 - And Fix#596: Bail out of unbound-control dump_infra when ssl
write fails.


git-svn-id: file:///svn/unbound/trunk@3195 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-16 10:07:26 +00:00
Wouter Wijngaards 11dbeb0675 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@3194 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-15 14:48:16 +00:00
Wouter Wijngaards ae7049063c - Fix #596: Bail out of unbound-control list_local_zones when ssl
write fails.


git-svn-id: file:///svn/unbound/trunk@3193 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-15 14:42:57 +00:00
Wouter Wijngaards 1145890998 autoconf on newer system.
git-svn-id: file:///svn/unbound/trunk@3192 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-13 08:19:29 +00:00
Wouter Wijngaards 8d392a3cfb Configure tests if main can be linked to from getentropy compat.
git-svn-id: file:///svn/unbound/trunk@3191 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-13 08:18:57 +00:00
Wouter Wijngaards 19aaa6c9e5 Includes from windows.
git-svn-id: file:///svn/unbound/trunk@3190 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 20:45:46 +00:00
Wouter Wijngaards 10e378f13b getentropy from Theo de Raadt
git-svn-id: file:///svn/unbound/trunk@3189 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 20:19:14 +00:00
Wouter Wijngaards b32a248a42 sync with OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3188 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 20:07:41 +00:00
Wouter Wijngaards eca7c51ea6 Link and test main.
git-svn-id: file:///svn/unbound/trunk@3187 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 19:31:09 +00:00
Wouter Wijngaards 2c4d6323ef Fixup and link in main for some systems.
git-svn-id: file:///svn/unbound/trunk@3186 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 19:30:32 +00:00
Wouter Wijngaards 3a29c07839 Making getentropy the same across platforms.
git-svn-id: file:///svn/unbound/trunk@3185 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 18:58:11 +00:00
Wouter Wijngaards 3263e5f238 - update compat/getentropy and arc4random to the most recent ones from OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3184 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 18:23:49 +00:00
Wouter Wijngaards 3e8feb6e84 - update compat/getentropy to the most recent ones from OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3183 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 18:03:27 +00:00
Wouter Wijngaards 06bfd7bd22 - Fix bug in fix for log locks that caused deadlock in signal handler.
git-svn-id: file:///svn/unbound/trunk@3182 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 17:34:37 +00:00
Wouter Wijngaards 0688d6443f Fixup LibreSSL code to be futurecompatible if LibreSSL stops
providing the compat functions.


git-svn-id: file:///svn/unbound/trunk@3181 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 17:13:38 +00:00
Wouter Wijngaards fc4b6e1708 - LibreSSL provides compat items, check for that in configure.
git-svn-id: file:///svn/unbound/trunk@3180 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 14:13:45 +00:00
Wouter Wijngaards 5b1b660e94 - Fix to check openssl version number only for OpenSSL.
git-svn-id: file:///svn/unbound/trunk@3179 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 12:54:50 +00:00
Wouter Wijngaards 6712f6c511 - Fix getentropy compat code, function refs were not portable.
git-svn-id: file:///svn/unbound/trunk@3178 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 11:33:38 +00:00
Wouter Wijngaards f756509e27 arc4random_uniform does not need the support functions, and comments.
git-svn-id: file:///svn/unbound/trunk@3177 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-12 09:46:15 +00:00
Wouter Wijngaards 695f4ce1e9 remove ;
git-svn-id: file:///svn/unbound/trunk@3176 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 16:45:47 +00:00
Wouter Wijngaards eeb39524f2 Fixup SHA512 definitions from compat not appearing when not needed.
git-svn-id: file:///svn/unbound/trunk@3175 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 16:44:26 +00:00
Wouter Wijngaards ed2f8b1057 compat for arc4random with openssl 0.9.7 and openssl 0.9.8
git-svn-id: file:///svn/unbound/trunk@3174 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 16:35:05 +00:00
Matthijs Mekking 2669be8beb malloc calloc patch
git-svn-id: file:///svn/unbound/trunk@3173 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 15:38:07 +00:00
Wouter Wijngaards 12137fe970 - arc4random, getentropy and explicit_bzero compat for Windows.
git-svn-id: file:///svn/unbound/trunk@3172 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 14:46:46 +00:00
Wouter Wijngaards 8786ae15b4 - fix strptime implicit declaration error on OpenBSD.
git-svn-id: file:///svn/unbound/trunk@3171 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 14:27:14 +00:00
Wouter Wijngaards 0c31e816f5 And doc.
(svn:NO TEST)


git-svn-id: file:///svn/unbound/trunk@3170 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 13:26:31 +00:00
Wouter Wijngaards f4bd1a5ad7 Fixup locks to be more portable in compat.
git-svn-id: file:///svn/unbound/trunk@3169 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 13:25:37 +00:00
Wouter Wijngaards e33d9da5ea Fix dependency on -lrt and please lint.
git-svn-id: file:///svn/unbound/trunk@3168 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 12:27:20 +00:00
Wouter Wijngaards 88c37503d6 Use log_info on OSX for getentropy pointer.
git-svn-id: file:///svn/unbound/trunk@3167 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 12:09:37 +00:00
Wouter Wijngaards 3a9dee2e22 Fix for sun compiler.
git-svn-id: file:///svn/unbound/trunk@3166 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 11:49:27 +00:00
Wouter Wijngaards dd8a6188af Make getentropy work on OSX with libunbound.
git-svn-id: file:///svn/unbound/trunk@3165 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 11:37:53 +00:00
Wouter Wijngaards d5d87b3b13 No getentropy needed if arc4random available.
git-svn-id: file:///svn/unbound/trunk@3164 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 10:44:00 +00:00
Wouter Wijngaards b9af2fa48d Fixup signed/unsigned comparison warnings on OSX in getentropy_osx.c
git-svn-id: file:///svn/unbound/trunk@3163 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 10:12:15 +00:00
Wouter Wijngaards 89b915b4e1 Fix getentropy_solaris compile.
git-svn-id: file:///svn/unbound/trunk@3162 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 09:59:15 +00:00
Wouter Wijngaards 41a972ef9a Fixup solaris linkage.
git-svn-id: file:///svn/unbound/trunk@3161 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 09:50:15 +00:00
Wouter Wijngaards 9f9ed82c5b autoconf and autoheader
git-svn-id: file:///svn/unbound/trunk@3160 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 09:44:08 +00:00
Wouter Wijngaards 9f0a53e79b Fix compile and test on Linux.
git-svn-id: file:///svn/unbound/trunk@3159 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 09:39:13 +00:00
Wouter Wijngaards e445cc74af - arc4random in compat/ and getentropy, explicit_bzero, chacha for
dependencies, from OpenBSD.  arc4_lock and sha512 in compat.
  This makes arc4random available on all platforms, except when
  compiled with LIBNSS (it uses libNSS crypto random).


git-svn-id: file:///svn/unbound/trunk@3158 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-11 09:27:24 +00:00
Wouter Wijngaards 436d057765 cleaner compile without locks enabled.
git-svn-id: file:///svn/unbound/trunk@3157 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-04 07:43:20 +00:00
Wouter Wijngaards c5bf2cf802 - Fix #593: segfault or crash upon rotating logfile.
git-svn-id: file:///svn/unbound/trunk@3156 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-04 07:34:58 +00:00
Wouter Wijngaards 3cbdd45d09 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3155 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-03 09:18:17 +00:00
Wouter Wijngaards 2d2aa3483f - DLV tests added.
- signit tool fixup for compile with libldns library.


git-svn-id: file:///svn/unbound/trunk@3154 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-03 09:07:38 +00:00
Wouter Wijngaards 6fcdb08164 - so-reuseport is available on BSDs(such as FreeBSD 10) and OS/X.
git-svn-id: file:///svn/unbound/trunk@3153 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-27 14:11:57 +00:00
Wouter Wijngaards 0aff3e3fca Fix va_list define for FreeBSD, Linux and OpenBSD compat for splint.
git-svn-id: file:///svn/unbound/trunk@3152 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-26 09:27:25 +00:00
Wouter Wijngaards 95cd396b25 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3151 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-26 09:17:13 +00:00
Wouter Wijngaards eaa926940c - unbound-control status reports if so-reuseport was successful.
git-svn-id: file:///svn/unbound/trunk@3150 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-26 08:48:51 +00:00
Wouter Wijngaards af127a0fed Fix lint for FreeBSD jail.
git-svn-id: file:///svn/unbound/trunk@3149 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-24 11:33:27 +00:00
Wouter Wijngaards 0acc22a002 Test commit hooks.
git-svn-id: file:///svn/unbound/trunk@3148 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-24 10:34:48 +00:00
Wouter Wijngaards 43f3b0623f Fixup testsetup for VM tests (testcode/run_vm.sh).
git-svn-id: file:///svn/unbound/trunk@3147 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-24 10:26:02 +00:00
Wouter Wijngaards bc7f906590 - Fix caps-for-id fallback, and added fallback attempt when servers
drop 0x20 perturbed queries.


git-svn-id: file:///svn/unbound/trunk@3146 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-24 08:24:28 +00:00
Wouter Wijngaards efe2a74af9 change to test post commit hooks.
git-svn-id: file:///svn/unbound/trunk@3145 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-23 08:48:22 +00:00
Wouter Wijngaards ea7c8fb6d9 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3144 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-17 11:57:32 +00:00
Wouter Wijngaards b4e45145cd - Add AAAA for B root server to default root hints.
git-svn-id: file:///svn/unbound/trunk@3143 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-03 07:29:41 +00:00
Wouter Wijngaards 1a6515778d Remove unused define from iterator.h
git-svn-id: file:///svn/unbound/trunk@3142 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-06-02 10:03:21 +00:00
Wouter Wijngaards c3153f964e - Fixup sldns_enum_edns_option typedef definition.
git-svn-id: file:///svn/unbound/trunk@3141 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-30 07:20:11 +00:00
Wouter Wijngaards 0121c7ad9f From Dag-Erling Smorgrav: The prototype for libworker_event_done_cb()
needs to be moved from libunbound/libworker.h to libunbound/worker.h.


git-svn-id: file:///svn/unbound/trunk@3140 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-28 08:20:44 +00:00
Wouter Wijngaards 12cffd6263 - make depend.
git-svn-id: file:///svn/unbound/trunk@3139 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-28 08:19:06 +00:00
Wouter Wijngaards dac217b621 - Fixup out-of-directory compile with unbound-control-setup.sh.in.
git-svn-id: file:///svn/unbound/trunk@3138 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-28 08:15:20 +00:00
Wouter Wijngaards 3468dce5c2 - Code cleanup patch from Dag-Erling Smorgrav, with compiler issue
fixes from FreeBSD's copy of Unbound, he notes:
  Generate unbound-control-setup.sh at build time so it respects
  prefix and sysconfdir from the configure script.  Also fix the
  umask to match the comment, and the comment to match the umask.
  Add const and static where needed.  Use unions instead of
  playing pointer poker.  Move declarations that are needed in
  multiple source files into a shared header.  Move sldns_bgetc()
  from parse.c to buffer.c where it belongs.  Introduce a new
  header file, worker.h, which declares the callbacks that
  all workers must define.  Remove those declarations from
  libworker.h.	Include the correct headers in the correct places.
  Fix a few dummy callbacks that don't match their prototype.
  Fix some casts.  Hide the sbrk madness behind #ifdef HAVE_SBRK.
  Remove a useless printf which breaks reproducible builds.
  Get rid of CONFIGURE_{TARGET,DATE,BUILD_WITH} now that they're
  no longer used.  Add unbound-control-setup.sh to the list of
  generated files.



git-svn-id: file:///svn/unbound/trunk@3137 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-28 08:07:12 +00:00
Wouter Wijngaards 684fd0aa15 - unbound-host -D enabled dnssec and reads root trust anchor from
the default root key file that was compiled in.


git-svn-id: file:///svn/unbound/trunk@3136 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-23 07:30:02 +00:00
Wouter Wijngaards 1773696a7e review fixes.
git-svn-id: file:///svn/unbound/trunk@3134 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-20 11:39:41 +00:00
Wouter Wijngaards bdc57e5be5 - Feature, unblock-lan-zones: yesno that you can use to make unbound
perform 10.0.0.0/8 and other reverse lookups normally, for use if
  unbound is running service for localhost on localhost.


git-svn-id: file:///svn/unbound/trunk@3133 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-20 10:38:32 +00:00
Wouter Wijngaards 9c12ca9c0a - Updated create_unbound_ad_servers and unbound_cache scripts from
Yuri Voinov in the source/contrib directory. Added
  warmup.cmd (and .sh): warm up the DNS cache with your MRU domains.


git-svn-id: file:///svn/unbound/trunk@3131 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-16 14:40:38 +00:00
Wouter Wijngaards 80b6bfb871 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3130 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-09 14:42:02 +00:00
Wouter Wijngaards eab2ccf0a8 - Implement draft-ietf-dnsop-rfc6598-rfc6303-01.
git-svn-id: file:///svn/unbound/trunk@3129 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-09 14:33:10 +00:00
Wouter Wijngaards c6e236cdfe - Contrib windows scripts from Yuri Voinov added to src/contrib:
create_unbound_ad_servers.cmd: enters anti-ad server lists.
  unbound_cache.cmd: saves and loads the cache.
- Added unbound-control-setup.cmd from Yuri Voinov to the windows
  unbound distribution set.  It requires openssl installed in %PATH%.


git-svn-id: file:///svn/unbound/trunk@3128 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-08 13:39:03 +00:00
Wouter Wijngaards cddec24dd2 - Change MAX_SENT_COUNT from 16 to 32 to resolve some cases easier.
git-svn-id: file:///svn/unbound/trunk@3127 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-06 12:37:37 +00:00
Wouter Wijngaards 5a1ce3450f - More #567: remove : from output of stub and forward lists, this is
easier to parse.


git-svn-id: file:///svn/unbound/trunk@3126 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-05-05 14:47:08 +00:00
Wouter Wijngaards 0bc3fab7a4 - Add unbound-control flush_negative that flushed nxdomains, nodata,
and errors from the cache.  For dnssec-trigger and NetworkManager,
  fixes cases where network changes have localdata that was already
  negatively cached from the previous network.


git-svn-id: file:///svn/unbound/trunk@3125 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-29 08:47:33 +00:00
Wouter Wijngaards 8f8bea2e87 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3124 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-29 07:25:46 +00:00
Wouter Wijngaards 763721f626 Fix elifs
git-svn-id: file:///svn/unbound/trunk@3123 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-23 13:10:25 +00:00
Wouter Wijngaards 34b7918f2f And changelog.
(svn:NO TEST)


git-svn-id: file:///svn/unbound/trunk@3122 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-23 13:04:10 +00:00
Wouter Wijngaards 8522d6c51f The autoconf changes for the patch.
git-svn-id: file:///svn/unbound/trunk@3121 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-23 13:03:18 +00:00
Wouter Wijngaards c598e85253 Patch from Jeremie Courreges-Anglas to use arc4random_uniform
git-svn-id: file:///svn/unbound/trunk@3120 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-23 13:00:35 +00:00
Wouter Wijngaards b03122d04c Different fix.
git-svn-id: file:///svn/unbound/trunk@3119 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-15 11:25:36 +00:00
Wouter Wijngaards c5061b2573 Fix for event2 compile on FreeBSD.
git-svn-id: file:///svn/unbound/trunk@3118 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-15 11:25:08 +00:00
Wouter Wijngaards 0bf47ded61 Not needed.
git-svn-id: file:///svn/unbound/trunk@3117 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-15 11:23:02 +00:00
Wouter Wijngaards ed95c1bc72 Fixup -L to -I for event2 includes..
git-svn-id: file:///svn/unbound/trunk@3116 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-15 11:17:40 +00:00
Wouter Wijngaards 29d77903c5 - If event2 is installed, include dir/include/event2 in compilation.
git-svn-id: file:///svn/unbound/trunk@3115 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-15 11:14:50 +00:00
Wouter Wijngaards aa9c089946 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3114 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-11 09:02:01 +00:00
Wouter Wijngaards 3ff8c72549 - Fix #502: explain that do-ip6 disable does not stop AAAA lookups,
but it stops the use of the ipv6 transport layer for DNS traffic.


git-svn-id: file:///svn/unbound/trunk@3113 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-11 07:15:53 +00:00
Wouter Wijngaards c19f818c52 - Fix #545: improved logging, the ip address of the error is printed
on the same log-line as the error.


git-svn-id: file:///svn/unbound/trunk@3112 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 14:40:20 +00:00
Wouter Wijngaards eb5e9a89c4 - Fix #558: failed prefetch lookup does not remove cached response
but delays next prefetch (in lieu of caching a SERVFAIL).


git-svn-id: file:///svn/unbound/trunk@3111 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 13:56:16 +00:00
Wouter Wijngaards 3aad234854 - Fix #554: use unsigned long to print 64bit statistics counters on
64bit systems.


git-svn-id: file:///svn/unbound/trunk@3110 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 11:20:41 +00:00
Wouter Wijngaards 921c869f28 - Fix #567: unbound lists if forward zone is secure or insecure with
+i annotation in output of list_forwards, also for list_stubs
  (for NetworkManager integration.)


git-svn-id: file:///svn/unbound/trunk@3109 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 10:54:21 +00:00
Wouter Wijngaards 330b3219a0 - unbound-control stats prints num.query.tcpout with number of TCP
outgoing queries made in the previous statistics interval.


git-svn-id: file:///svn/unbound/trunk@3108 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 09:13:58 +00:00
Wouter Wijngaards 470b7bda87 - Patch from Hannes Frederic Sowa for Linux 3.15 fragmentation
option for DNS fragmentation defense.


git-svn-id: file:///svn/unbound/trunk@3107 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 08:35:45 +00:00
Wouter Wijngaards cff5dbb7bb - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3106 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-10 08:20:50 +00:00
Wouter Wijngaards 7d34007906 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3105 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-08 07:46:09 +00:00
Wouter Wijngaards c7d1e6ccf9 - Fix #574: make test fails on Ubuntu 14.04. Disabled remote-control
in testbound scripts.


git-svn-id: file:///svn/unbound/trunk@3104 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-08 07:13:49 +00:00
Wouter Wijngaards a8c4de09ba - Fix #572: Fix unit test failure for systems with different
/etc/services.


git-svn-id: file:///svn/unbound/trunk@3103 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-07 09:18:29 +00:00
Wouter Wijngaards b6c714c979 - C.ROOT-SERVERS.NET has an IPv6 address, and we updated the root
hints (patch from Anand Buddhdev).


git-svn-id: file:///svn/unbound/trunk@3102 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-04-07 08:18:39 +00:00
Wouter Wijngaards e64a86e5e0 - Fix #569: do_tcp is do-tcp in unbound.conf man page.
git-svn-id: file:///svn/unbound/trunk@3101 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-28 08:19:21 +00:00
Wouter Wijngaards 8fabf2a8ab - Patch from Stuart Henderson to build unbound-host man from .1.in.
git-svn-id: file:///svn/unbound/trunk@3100 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-25 08:09:33 +00:00
Wouter Wijngaards 18feb613ae - Fix print filename of encompassing config file on read failure.
git-svn-id: file:///svn/unbound/trunk@3099 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-24 13:13:42 +00:00
Wouter Wijngaards 64ada805e2 trunk has 1.4.23 in development.
git-svn-id: file:///svn/unbound/trunk@3098 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-12 14:25:21 +00:00
Wouter Wijngaards 23318c4f2a tag 1.4.22
git-svn-id: file:///svn/unbound/trunk@3096 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-12 12:30:23 +00:00
Wouter Wijngaards dbcad3b7f5 - Fix bug#561: contrib/cacti plugin did not report SERVFAIL rcodes
because of spelling.  Patch from Chris Coates.


git-svn-id: file:///svn/unbound/trunk@3095 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-03-10 10:42:49 +00:00
Wouter Wijngaards 1b4dc58404 1.4.22rc1 tag created
git-svn-id: file:///svn/unbound/trunk@3094 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-27 08:02:24 +00:00
Wouter Wijngaards 3e6a9b2cb3 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3092 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-21 09:38:02 +00:00
Wouter Wijngaards fede6aa4b7 - Be lenient when a NSEC NameError response with RCODE=NXDOMAIN is
received. This is okay according 4035, but not after revising
  existence in 4592.  NSEC empty non-terminals exist and thus the
  RCODE should have been NOERROR. If this occurs, and the RRsets
  are secure, we set the RCODE to NOERROR and the security status
  of the reponse is also considered secure.


git-svn-id: file:///svn/unbound/trunk@3091 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-20 12:36:05 +00:00
Matthijs Mekking f54f748dd0 add test for being lenient with NSEC empty non-terminal Name Error responses with rcode=NXDOMAIN while it should be rcode=NOERROR
git-svn-id: file:///svn/unbound/trunk@3090 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-20 09:48:08 +00:00
Matthijs Mekking dab0af8d87 Be lenient when a NSEC NameError response with RCODE=NXDOMAIN is received.
This is okay according 4035, but not after revising existence in 4592. 
NSEC empty non-terminals exist and thus the RCODE should have been NOERROR.

If this occurs, and the RRsets are secure, we set the RCODE to NOERROR and
the security status of the reponse is also considered secure.



git-svn-id: file:///svn/unbound/trunk@3089 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-20 09:46:50 +00:00
Matthijs Mekking 492a5ca681 only whitespace changes
git-svn-id: file:///svn/unbound/trunk@3088 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 13:54:19 +00:00
Wouter Wijngaards 18d5ace481 review commit.
git-svn-id: file:///svn/unbound/trunk@3087 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 09:58:51 +00:00
Matthijs Mekking f415c6f409 - test for too lenient LOC record
- remove temporary review comments



git-svn-id: file:///svn/unbound/trunk@3086 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 09:46:16 +00:00
Matthijs Mekking 25a6550d2c name static function better
git-svn-id: file:///svn/unbound/trunk@3085 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 09:28:16 +00:00
Wouter Wijngaards c5f1cfa863 And starts service on Minix.
git-svn-id: file:///svn/unbound/trunk@3084 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-14 09:50:25 +00:00
Wouter Wijngaards 9472d554e1 Fix ldns_fgetc bug similar to ldns_bgetc.
git-svn-id: file:///svn/unbound/trunk@3083 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-14 09:25:00 +00:00
Wouter Wijngaards 93009bd9f2 configure generated.
git-svn-id: file:///svn/unbound/trunk@3082 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-14 09:24:39 +00:00
Wouter Wijngaards a2bf135003 Port to Minix 3.2.1.
git-svn-id: file:///svn/unbound/trunk@3081 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-14 09:23:32 +00:00
Wouter Wijngaards 108d3b5c3c Fix parse of #553(NSD) string in sldns, quotes without spaces.
git-svn-id: file:///svn/unbound/trunk@3080 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-11 08:29:42 +00:00
Wouter Wijngaards 2b90f38a70 And fix #551 REGENT to COPYRIGHT HOLDER in license in file headings.
git-svn-id: file:///svn/unbound/trunk@3079 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 13:28:39 +00:00
Wouter Wijngaards 037e2f33bc - Fix #551: License change "Regents" to "Copyright holder", matching
the BSD license on opensource.org.


git-svn-id: file:///svn/unbound/trunk@3078 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 12:43:43 +00:00
Wouter Wijngaards 676faa606a - add body to ifstatement if locks disabled.
- add TXT string"string" test case to unit test.


git-svn-id: file:///svn/unbound/trunk@3077 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 12:14:09 +00:00
Wouter Wijngaards 319c2ba5fc add body to ifstatement if locks disabled.
git-svn-id: file:///svn/unbound/trunk@3076 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 12:10:06 +00:00
Wouter Wijngaards 1702a8ebea iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3075 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 09:51:54 +00:00
Wouter Wijngaards 5865ec4067 - code documentation on the module interface.
git-svn-id: file:///svn/unbound/trunk@3074 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-06 13:18:32 +00:00
Wouter Wijngaards 3997b79936 prettier parse code.
git-svn-id: file:///svn/unbound/trunk@3073 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-06 11:19:28 +00:00
Wouter Wijngaards 7fe2a3924f prettier code disable.
git-svn-id: file:///svn/unbound/trunk@3072 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-06 11:01:50 +00:00
Wouter Wijngaards 51be201ada - sldns has type HIP.
git-svn-id: file:///svn/unbound/trunk@3071 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-06 10:57:42 +00:00
Wouter Wijngaards 4095ee4622 fix sldns parse tests on osx.
git-svn-id: file:///svn/unbound/trunk@3070 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-05 13:40:55 +00:00
Wouter Wijngaards 65fe94c9ba more loc tests (and print 2.3 precision like in the RFC).
git-svn-id: file:///svn/unbound/trunk@3069 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 15:46:50 +00:00
Wouter Wijngaards 2ff1f81280 better goto.
git-svn-id: file:///svn/unbound/trunk@3068 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 15:10:48 +00:00
Wouter Wijngaards 4511c62d1e slightly nicer loc conversion.
git-svn-id: file:///svn/unbound/trunk@3067 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 15:07:42 +00:00
Wouter Wijngaards d2b03defce - Fix parse in sldns of quoted parenthesized text strings.
git-svn-id: file:///svn/unbound/trunk@3066 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 14:28:57 +00:00
Wouter Wijngaards acc7548b07 - Fixup link with lib/event2 subdir.
git-svn-id: file:///svn/unbound/trunk@3065 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 11:41:19 +00:00
Wouter Wijngaards 9dd5ee6a26 - Detect libevent2 install automatically by configure.
git-svn-id: file:///svn/unbound/trunk@3064 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-03 11:02:17 +00:00
Wouter Wijngaards decb716939 - fixup type EUI48 and EUI64, type APL and type IPSECKEY in string
parse sldns.


git-svn-id: file:///svn/unbound/trunk@3063 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-31 13:50:57 +00:00
Wouter Wijngaards 4b60521611 and commitlog
git-svn-id: file:///svn/unbound/trunk@3062 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-31 11:33:22 +00:00
Wouter Wijngaards 6479785360 fixup nss compile (no ldns in it).
fixup warning in unitldns
fixup WKS and rdata type service to print unsigned because strings are not portable.


git-svn-id: file:///svn/unbound/trunk@3061 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-31 11:25:36 +00:00
Wouter Wijngaards 61095a0cfd - unit test for ldns wire to str and back with zones, root, nlnetlabs
and types.sidnlabs.
- Fix for hex to string in unknown, atma and nsap.


git-svn-id: file:///svn/unbound/trunk@3060 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-31 10:19:01 +00:00
Wouter Wijngaards 0fbe678e68 - delay-close does not act if there are udp-wait queries, so that
it does not make a socketdrain DoS easier.


git-svn-id: file:///svn/unbound/trunk@3059 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-30 09:27:00 +00:00
Wouter Wijngaards d8e5a83392 - delay-close: msec option that delays closing ports for which
the UDP reply has timed out.  Keeps the port open, only accepts
  the correct reply.  This correct reply is not used, but the port
  is open so that no port-denied ICMPs are generated.


git-svn-id: file:///svn/unbound/trunk@3058 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-28 14:35:55 +00:00
Wouter Wijngaards 4adaadab61 - iana portlist test updated so it does not touch the source
if there are no changes.


git-svn-id: file:///svn/unbound/trunk@3057 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-28 10:12:13 +00:00
Wouter Wijngaards 3c05adeca3 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3056 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-28 10:00:01 +00:00
Wouter Wijngaards a0430378d5 please lint.
git-svn-id: file:///svn/unbound/trunk@3055 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-27 10:41:16 +00:00
Wouter Wijngaards 958b2bcf96 - reuseport is attempted, then fallback to without on failure.
git-svn-id: file:///svn/unbound/trunk@3054 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-27 10:27:19 +00:00
Wouter Wijngaards 79dd0f33e0 Remove warnings on BSD systems.
git-svn-id: file:///svn/unbound/trunk@3053 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 15:15:37 +00:00
Wouter Wijngaards 8da91e09ea And fixup for FreeBSD.
git-svn-id: file:///svn/unbound/trunk@3052 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 13:35:35 +00:00
Wouter Wijngaards 76c6113134 and the formatcode disabled (gcc reports it better).
git-svn-id: file:///svn/unbound/trunk@3051 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 13:24:33 +00:00
Wouter Wijngaards 361cc1f511 - made lint clean.
git-svn-id: file:///svn/unbound/trunk@3050 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 13:23:45 +00:00
Wouter Wijngaards 60511959ab - so-reuseport: yesno option to distribute queries evenly over
threads on Linux (Thanks Robert Edmonds).


git-svn-id: file:///svn/unbound/trunk@3049 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 11:43:38 +00:00
Wouter Wijngaards 1a24208658 - speed up unbound (reports say it could be up to 10%), by reducing
lock contention on localzones.lock.  It is changed to an rwlock.


git-svn-id: file:///svn/unbound/trunk@3048 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 11:21:15 +00:00
Wouter Wijngaards 9a1e15776f - unbound-event.h is installed if you configure --enable-event-api.
git-svn-id: file:///svn/unbound/trunk@3047 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 10:55:28 +00:00
Wouter Wijngaards 5c1b1c0fc9 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3046 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 10:42:42 +00:00
Wouter Wijngaards 1369da1a34 - Change unbound-event.h to use void* buffer, length idiom.
git-svn-id: file:///svn/unbound/trunk@3045 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 08:16:56 +00:00
Wouter Wijngaards 2bb8f893cc - Fix #547: no trustanchor written if filesystem full, fclose checked.
git-svn-id: file:///svn/unbound/trunk@3044 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-21 10:14:55 +00:00
Wouter Wijngaards ef06e9062e - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3043 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-17 15:29:04 +00:00
Wouter Wijngaards d4f5ca1523 - Fix isprint() portability in sldns, uses unsigned int.
git-svn-id: file:///svn/unbound/trunk@3042 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-17 14:45:14 +00:00
Wouter Wijngaards add11387d4 nicer time include for winsock_event, less warning.
git-svn-id: file:///svn/unbound/trunk@3041 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 16:12:15 +00:00
Wouter Wijngaards 3ce7b4a6fa - Windows port, adjust %lld to %I64d, and warning in win_event.c.
git-svn-id: file:///svn/unbound/trunk@3040 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 16:01:37 +00:00
Wouter Wijngaards 5ff6ae3f51 and unit test.
git-svn-id: file:///svn/unbound/trunk@3039 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 13:14:54 +00:00
Wouter Wijngaards 67f5157e45 - fix #544: Fixed +i causes segfault when running with module conf "iterator".
git-svn-id: file:///svn/unbound/trunk@3038 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 13:04:34 +00:00
Wouter Wijngaards e91632e294 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@3037 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-14 08:26:29 +00:00
Wouter Wijngaards 159cc301c5 pylib test referred to ldns which is not a dependency any more.
git-svn-id: file:///svn/unbound/trunk@3036 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-05 16:49:37 +00:00
Wouter Wijngaards eed60983ac - update pythonmod for ldns_ to sldns_ name change.
git-svn-id: file:///svn/unbound/trunk@3035 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-05 16:27:52 +00:00
Wouter Wijngaards 6dafaff733 include for NetBSD
git-svn-id: file:///svn/unbound/trunk@3034 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-05 16:24:48 +00:00
Wouter Wijngaards 2b07b655ce Fix bug in cachedump format after sldns changes.
git-svn-id: file:///svn/unbound/trunk@3033 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-05 15:57:16 +00:00
Wouter Wijngaards c7c9693418 add semicolon (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@3032 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:29:19 +00:00
Wouter Wijngaards 2bd37248b1 include pkthdr.h (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@3031 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:23:51 +00:00
Wouter Wijngaards 9146dd90b3 snprintf on windows can do %lld, just spurious compiler warnings.
git-svn-id: file:///svn/unbound/trunk@3030 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:17:44 +00:00
Wouter Wijngaards e5059e7406 windows compile without ldns.
git-svn-id: file:///svn/unbound/trunk@3029 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:14:27 +00:00
Wouter Wijngaards 419a074315 use our own snprintf on windows for %lld.
git-svn-id: file:///svn/unbound/trunk@3028 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:07:56 +00:00
Wouter Wijngaards 523c06906f ldns includes.
git-svn-id: file:///svn/unbound/trunk@3027 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:05:01 +00:00
Wouter Wijngaards 591b78f00a include sys.time.h
git-svn-id: file:///svn/unbound/trunk@3026 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 14:03:34 +00:00
Wouter Wijngaards 79ced4b48e include time.h
git-svn-id: file:///svn/unbound/trunk@3025 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 13:57:49 +00:00
Wouter Wijngaards cdaa9995e8 - Fix windows compile to compile with sldns.
git-svn-id: file:///svn/unbound/trunk@3024 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 13:51:11 +00:00
Wouter Wijngaards ce71d4dedf Update configure.ac, SLDNS##buffer_new() notation does not work.
git-svn-id: file:///svn/unbound/trunk@3023 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 09:12:18 +00:00
Wouter Wijngaards d3cbd76546 - Fix sldns to use sldns_ prefix for all ldns_ variables.
git-svn-id: file:///svn/unbound/trunk@3022 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 09:11:16 +00:00
Wouter Wijngaards 3de090dadb Fix linking of sldns and ldns, unique identifiers for global variables.
git-svn-id: file:///svn/unbound/trunk@3021 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-30 11:03:55 +00:00
Wouter Wijngaards 17935c9144 nicer return value.
git-svn-id: file:///svn/unbound/trunk@3020 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-27 10:07:33 +00:00
Wouter Wijngaards 5421d424ac Fixup str2wire_rr for dname_len NULL.
git-svn-id: file:///svn/unbound/trunk@3017 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-13 09:56:58 +00:00
Wouter Wijngaards 3102a66ece - Fix bug#537: compile python plugin without ldns library.
git-svn-id: file:///svn/unbound/trunk@3016 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-13 08:53:53 +00:00
Wouter Wijngaards b9efb261da - Fix bug#536: acl_deny_non_local and refuse_non_local added.
git-svn-id: file:///svn/unbound/trunk@3015 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-12 10:08:54 +00:00
Wouter Wijngaards e704e27be6 interface: and ip-address:
also includes for newer ldns in pythonmod. 


git-svn-id: file:///svn/unbound/trunk@3014 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-06 02:48:59 +00:00
Wouter Wijngaards 789ccae281 - Patch from Neel Goyal to fix async id assignment if callback
is called by libunbound in the mesh attach.


git-svn-id: file:///svn/unbound/trunk@3013 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-05 21:16:02 +00:00
Wouter Wijngaards dba75dc035 - Patch from Neel Goyal to fix callback in libunbound.
git-svn-id: file:///svn/unbound/trunk@3012 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-04 18:53:21 +00:00
Wouter Wijngaards 3f6d7f30c7 autoconf
git-svn-id: file:///svn/unbound/trunk@3011 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-03 23:13:49 +00:00
Wouter Wijngaards 8acb4f8bd3 - if configured --with-libunbound-only fix make install.
git-svn-id: file:///svn/unbound/trunk@3010 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-03 23:12:55 +00:00
Wouter Wijngaards 38b8754bae portability with new ldns core (time includes).
git-svn-id: file:///svn/unbound/trunk@3009 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-02 04:38:57 +00:00
Wouter Wijngaards b3c941503c portability fixes for new USE_SLDNS ldns subdir codebase.
git-svn-id: file:///svn/unbound/trunk@3008 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 16:27:15 +00:00
Wouter Wijngaards 84ed5973b6 more time includes.
git-svn-id: file:///svn/unbound/trunk@3007 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 16:26:45 +00:00
Wouter Wijngaards e23542a68d include time.h
git-svn-id: file:///svn/unbound/trunk@3006 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 16:05:21 +00:00
Wouter Wijngaards b5b6c7ecd3 not string literal.
git-svn-id: file:///svn/unbound/trunk@3005 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 16:02:22 +00:00
Wouter Wijngaards 26ffa3068d fixup nonliteral format string
git-svn-id: file:///svn/unbound/trunk@3004 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 16:01:01 +00:00
Wouter Wijngaards caba9daada remove unused statement.
git-svn-id: file:///svn/unbound/trunk@3003 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:51:08 +00:00
Wouter Wijngaards 8ed224986e Fix uninit var warning.
git-svn-id: file:///svn/unbound/trunk@3002 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:47:02 +00:00
Wouter Wijngaards 96938e1d0d note bugzilla number.
git-svn-id: file:///svn/unbound/trunk@3001 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:32:56 +00:00
Wouter Wijngaards a50f200119 Fix portability of UINT_MAX and incomplete type of enum in header file.
git-svn-id: file:///svn/unbound/trunk@3000 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:28:13 +00:00
Wouter Wijngaards 5de712175a Fixup stdarg include, ldns reference in help.
git-svn-id: file:///svn/unbound/trunk@2999 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:17:53 +00:00
Wouter Wijngaards 29e96e86c9 - separate ldns into core ldns inside ldns/ subdirectory. No more
--with-ldns is needed and unbound does not rely on libldns.


git-svn-id: file:///svn/unbound/trunk@2998 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:09:26 +00:00
Wouter Wijngaards 1a9e620f8c - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2997 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:06:24 +00:00
Wouter Wijngaards d6e6354f36 - Set SO_REUSEADDR so that the wildcard interface and a more specific
interface port 53 can be used at the same time, and one of the
  daemons is unbound.


git-svn-id: file:///svn/unbound/trunk@2996 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:06:11 +00:00
Wouter Wijngaards c1ce3e10d8 - Fix #528: if very high logging (4 or more) segfault on allow_snoop.
git-svn-id: file:///svn/unbound/trunk@2994 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-22 12:01:51 +00:00
Wouter Wijngaards 5e6ac36076 - Patch from Neel Goyal: Add an API call to set an event base on an
existing ub_ctx.  This basically just destroys the current worker and
  sets the event base to the current.  And fix a deadlock in
  ub_resolve_event – the cfglock is held when libworker_create is
  called.  This ends up trying to acquire the lock again in
  context_obtain_alloc in the call chain.


git-svn-id: file:///svn/unbound/trunk@2992 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-22 09:32:10 +00:00
Wouter Wijngaards 5af60910c9 make depend and doc.
git-svn-id: file:///svn/unbound/trunk@2971 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-26 08:54:27 +00:00
Wouter Wijngaards 253d425ca8 - unbound-event.h is installed if configured --with-libevent. It
contains low-level library calls, that use libevent's event_base
  and an ldns_buffer for the wire return packet to perform async
  resolution in the client's eventloop.


git-svn-id: file:///svn/unbound/trunk@2970 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-26 08:34:14 +00:00
Wouter Wijngaards cc7dbe6d9a - acx_nlnetlabs.m4 to 26; improve FLTO help text.
git-svn-id: file:///svn/unbound/trunk@2964 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-19 13:08:58 +00:00
Wouter Wijngaards 9aa9863ea7 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2963 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-19 12:03:44 +00:00
Wouter Wijngaards 217f5cd57d - trunk has 1.4.22 number inside it.
git-svn-id: file:///svn/unbound/trunk@2962 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-19 10:53:38 +00:00
Wouter Wijngaards 68e58ee194 - Fix#524: max-udp-size not effective to non-EDNS0 queries, from
Daisuke HIGASHI.


git-svn-id: file:///svn/unbound/trunk@2955 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-16 09:07:08 +00:00
Wouter Wijngaards 427d0d75bf - tag 1.4.21rc1 made again.
git-svn-id: file:///svn/unbound/trunk@2953 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-10 14:04:35 +00:00
Wouter Wijngaards 8e00233b74 another time_t.
git-svn-id: file:///svn/unbound/trunk@2952 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-10 08:52:40 +00:00
Wouter Wijngaards 50934d4ce7 more time_t.
git-svn-id: file:///svn/unbound/trunk@2951 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-10 08:46:33 +00:00
Wouter Wijngaards c9438d938e fix lint, more time_t
git-svn-id: file:///svn/unbound/trunk@2950 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 14:45:33 +00:00
Wouter Wijngaards 3e41dedfc5 remove bool.
git-svn-id: file:///svn/unbound/trunk@2949 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 13:47:23 +00:00
Wouter Wijngaards bf67dc2a0d remove bool.
git-svn-id: file:///svn/unbound/trunk@2948 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 13:46:41 +00:00
Wouter Wijngaards 50e68cbcda more time_t
git-svn-id: file:///svn/unbound/trunk@2947 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 11:44:33 +00:00
Wouter Wijngaards 05a9730e53 - More fixes for bug#519: for the threaded case test if the bg
thread has been killed, on ub_ctx_delete, to avoid hangs.


git-svn-id: file:///svn/unbound/trunk@2946 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-26 12:24:27 +00:00
Wouter Wijngaards 5db366f99f - review fixes from Willem.
git-svn-id: file:///svn/unbound/trunk@2945 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-22 14:10:29 +00:00
Wouter Wijngaards c845aceee4 - more fixes that I overlooked.
git-svn-id: file:///svn/unbound/trunk@2944 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-22 07:33:51 +00:00
Wouter Wijngaards 3a5766d35e y2038 for remote tv_sec printout.
git-svn-id: file:///svn/unbound/trunk@2943 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-22 07:09:57 +00:00
Wouter Wijngaards 8ba21bd7e7 - Fix#520: Errors found by static analysis from Tomas Hozza(redhat).
git-svn-id: file:///svn/unbound/trunk@2942 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-21 13:31:09 +00:00
Wouter Wijngaards d86d7c050c and lex.
git-svn-id: file:///svn/unbound/trunk@2941 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-20 14:14:32 +00:00
Wouter Wijngaards de07375a9c review fixes.
git-svn-id: file:///svn/unbound/trunk@2940 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-20 14:14:08 +00:00
Wouter Wijngaards f1fd2b53eb - Fix for 2038, with time_t instead of uint32_t.
git-svn-id: file:///svn/unbound/trunk@2939 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-20 12:23:42 +00:00
Wouter Wijngaards 92ec7822f5 fixup nss compile, ldns git.
git-svn-id: file:///svn/unbound/trunk@2938 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-19 12:14:48 +00:00
Wouter Wijngaards 64e8486a6d - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound).
git-svn-id: file:///svn/unbound/trunk@2937 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-19 12:02:17 +00:00
Wouter Wijngaards b37f9c0d4a fixup uninit variable in unit test (compiler does not understand assertion).
git-svn-id: file:///svn/unbound/trunk@2935 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-14 07:56:22 +00:00
Wouter Wijngaards 5dbb2ce669 Fix uninit variable in fix#516.
git-svn-id: file:///svn/unbound/trunk@2934 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-14 07:53:33 +00:00
Wouter Wijngaards c8d22543f3 - Fix#516 dnssec lameness detection for answers that are improper.
git-svn-id: file:///svn/unbound/trunk@2933 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-08 09:29:33 +00:00
Wouter Wijngaards 1563327dc4 tag 1.4.21rc1
git-svn-id: file:///svn/unbound/trunk@2932 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-30 14:42:20 +00:00
Wouter Wijngaards 65e3e0bac9 note down the bugzilla reference number.
git-svn-id: file:///svn/unbound/trunk@2931 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-30 08:29:15 +00:00
Wouter Wijngaards 021f32ebf9 - Fix memleak in testcode for testbound (if it fails).
- Fix NSS returned arrays out of setup function to be statics.


git-svn-id: file:///svn/unbound/trunk@2930 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-29 07:32:35 +00:00
Wouter Wijngaards e01a5ea199 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2929 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-26 13:26:51 +00:00
Wouter Wijngaards b2274bedd9 - max include of 100.000 files (depth and globbed at one time).
This is to preserve system memory in bug cases, or endless cases.


git-svn-id: file:///svn/unbound/trunk@2928 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-26 13:11:53 +00:00
Wouter Wijngaards a140d4a6aa review fixup.
git-svn-id: file:///svn/unbound/trunk@2927 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-26 09:05:06 +00:00
Wouter Wijngaards ceb1f6354a - libunbound documentation on how to avoid openssl race conditions.
git-svn-id: file:///svn/unbound/trunk@2926 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-19 11:48:22 +00:00
Wouter Wijngaards a1647cf4c8 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2925 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-19 10:51:11 +00:00
Wouter Wijngaards 5ebf7d3a52 - streamtcp man page, contributed by Tomas Hozza.
git-svn-id: file:///svn/unbound/trunk@2924 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-19 10:46:16 +00:00
Wouter Wijngaards 1eba5e858f remake configure with new acx_nlnetlabs.m4
git-svn-id: file:///svn/unbound/trunk@2923 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-19 06:53:42 +00:00
Willem Toorop 5e7840b445 Sync acx_nlnetlabs.m4
git-svn-id: file:///svn/unbound/trunk@2922 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-07-18 14:52:17 +00:00
Wouter Wijngaards 13f2131a97 - configure --disable-flto option (from Robert Edmonds).
git-svn-id: file:///svn/unbound/trunk@2916 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-25 07:25:31 +00:00
Wouter Wijngaards 18e488ec5d - Squelch sendto-permission denied errors when the network is
not connected, to avoid spamming syslog.


git-svn-id: file:///svn/unbound/trunk@2915 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-25 07:03:03 +00:00
Wouter Wijngaards 8c54aab745 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2914 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-18 07:34:00 +00:00
Wouter Wijngaards a7baa0f3b0 - Fix for const string literals in C++ for libunbound, from Karel
Slany.


git-svn-id: file:///svn/unbound/trunk@2913 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-18 07:33:44 +00:00
Wouter Wijngaards 4fcbe0652d - Fixup manpage syntax.
git-svn-id: file:///svn/unbound/trunk@2912 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-17 11:20:42 +00:00
Wouter Wijngaards b709a9a449 - get_option and set_option support for log-time-ascii, python-script
val-sig-skew-min and val-sig-skew-max.  log-time-ascii takes effect
  immediately.  The others are mostly useful for libunbound users.


git-svn-id: file:///svn/unbound/trunk@2911 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-14 08:03:52 +00:00
Wouter Wijngaards 4af730847c - get_option, set_option, unbound-checkconf -o and libunbound
getoption and setoption support cache-min-ttl and cache-max-ttl.


git-svn-id: file:///svn/unbound/trunk@2910 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-13 08:26:41 +00:00
Wouter Wijngaards f7bf35b23a - Max include depth is unlimited.
git-svn-id: file:///svn/unbound/trunk@2909 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-10 13:37:14 +00:00
Wouter Wijngaards eaf464e591 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2908 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-10 12:25:34 +00:00
Wouter Wijngaards bcf5b23273 - Fix#501: forward-first does not recurse, when forward name is ".".
git-svn-id: file:///svn/unbound/trunk@2907 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-10 12:25:10 +00:00
Wouter Wijngaards 7a6dc58f20 - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2905 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-27 13:11:11 +00:00
Wouter Wijngaards 49425d75da - Update acx_pthreads.m4 to ax_pthreads.4 (2013-03-29), and apply
patch to it to not fail when -Werror is also specified, from the
  autoconf-archives.


git-svn-id: file:///svn/unbound/trunk@2904 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-27 08:22:40 +00:00
Wouter Wijngaards 860241b3c2 - Explain bogus and secure flags in libunbound more.
git-svn-id: file:///svn/unbound/trunk@2903 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-21 09:06:21 +00:00
Wouter Wijngaards d68e0595b4 please lint.
git-svn-id: file:///svn/unbound/trunk@2902 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-16 08:25:50 +00:00
Wouter Wijngaards bee14bb0e2 - Fix#500 use of non-initialised values on socket bind failures.
git-svn-id: file:///svn/unbound/trunk@2901 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-16 08:14:03 +00:00
Wouter Wijngaards 416df19f6d - Fix use-after-free in out-of-memory handling code (thanks Jake
Montgomery).


git-svn-id: file:///svn/unbound/trunk@2900 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-16 07:36:37 +00:00
Wouter Wijngaards 4a3efd5ea9 - Fix round-robin doesn't work with some Windows clients (from Ilya Bakulin).
git-svn-id: file:///svn/unbound/trunk@2899 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-15 11:56:22 +00:00
Wouter Wijngaards 956a4b8a14 - update acx_nlnetlabs.m4 to v23, sleep w32 fix.
git-svn-id: file:///svn/unbound/trunk@2898 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-03 09:35:55 +00:00
Wouter Wijngaards fec50b0245 Iana portlist update
git-svn-id: file:///svn/unbound/trunk@2897 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-01 14:02:52 +00:00
Wouter Wijngaards a0ec8eae5d we comply with RFC 6944: DNSKEY algorithm status
git-svn-id: file:///svn/unbound/trunk@2896 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-05-01 12:18:48 +00:00
Wouter Wijngaards 5dca6deca9 - add unbound-control insecure_add and insecure_remove for the
administration of negative trust anchors.


git-svn-id: file:///svn/unbound/trunk@2895 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-26 14:14:07 +00:00
Wouter Wijngaards 262a048975 - updated iana portlist.
git-svn-id: file:///svn/unbound/trunk@2894 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-25 11:59:05 +00:00
Wouter Wijngaards ff1dbe4fcc - Implement max-udp-size config option, default 4096 (thanks
Daisuke Higashi).


git-svn-id: file:///svn/unbound/trunk@2893 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-25 11:55:46 +00:00
Wouter Wijngaards fbedfb7429 - Robust checks on dname validity from rdata for dname compare.
git-svn-id: file:///svn/unbound/trunk@2892 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-25 10:28:25 +00:00
Wouter Wijngaards 946a6e3646 nicer compile on 32bit.
git-svn-id: file:///svn/unbound/trunk@2891 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-22 14:04:03 +00:00
Wouter Wijngaards b4690313c6 more portable snprintf implementation.
git-svn-id: file:///svn/unbound/trunk@2890 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-22 13:56:12 +00:00
Wouter Wijngaards a644a8a417 Fix for Solaris.
git-svn-id: file:///svn/unbound/trunk@2889 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-19 14:49:05 +00:00
Wouter Wijngaards 06a5fdb3f6 - Fix snprintf return value usage, fixed libunbound_get_option.
git-svn-id: file:///svn/unbound/trunk@2888 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-19 11:34:36 +00:00
Wouter Wijngaards ec2d4ed2b9 - own implementation of compat/snprintf.c.
git-svn-id: file:///svn/unbound/trunk@2887 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-18 14:28:21 +00:00
Wouter Wijngaards cab8a3e14e del snprintf.c file.
git-svn-id: file:///svn/unbound/trunk@2886 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-18 14:17:08 +00:00
Wouter Wijngaards f556664960 - fix bug #491: pick program name (0th argument) as syslog identity.
git-svn-id: file:///svn/unbound/trunk@2885 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-18 12:14:40 +00:00
Wouter Wijngaards ce0d35d6ae - unbound-anchor review: BIO_write can return 0 successfully if it
has successfully appended a zero length string.


git-svn-id: file:///svn/unbound/trunk@2884 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-15 15:08:24 +00:00
Wouter Wijngaards 2be3e34658 - Fix so that for a configuration line of include: "*.conf" it is not
an error if there are no files matching the glob pattern.


git-svn-id: file:///svn/unbound/trunk@2883 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-15 07:57:08 +00:00
Wouter Wijngaards d88911eed5 - Fix queries leaking up for stubs and forwards, if the configured
nameservers all fail to answer.


git-svn-id: file:///svn/unbound/trunk@2882 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-11 10:08:34 +00:00
Wouter Wijngaards 855434b761 - code improve for minimal responses, small speed increase.
git-svn-id: file:///svn/unbound/trunk@2881 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-10 14:29:35 +00:00
Wouter Wijngaards f9137645fb - Fix crash in previous private address fixup of 22 March.
git-svn-id: file:///svn/unbound/trunk@2880 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-09 07:38:24 +00:00
Wouter Wijngaards f4ac05f8fe - updated iana portlist.
git-svn-id: file:///svn/unbound/trunk@2879 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-04-09 07:02:43 +00:00
Wouter Wijngaards 99eb934d97 - Make reverse zones easier by documenting the nodefault statements
commented-out in the example config file.


git-svn-id: file:///svn/unbound/trunk@2878 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-28 13:36:38 +00:00
Wouter Wijngaards bd5395c74a more fixes for endianness.
git-svn-id: file:///svn/unbound/trunk@2877 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-26 08:14:06 +00:00
Wouter Wijngaards 8acb92091e __x86 detection for intel solaris.
git-svn-id: file:///svn/unbound/trunk@2876 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-25 15:00:26 +00:00
Wouter Wijngaards ed8b5895b4 And add detection for machine/endian.h to it.
git-svn-id: file:///svn/unbound/trunk@2875 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-25 14:53:09 +00:00
Wouter Wijngaards 3ce968e97a more fixed.
git-svn-id: file:///svn/unbound/trunk@2874 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-25 10:57:20 +00:00
Wouter Wijngaards f964e7b667 Fix compile.
git-svn-id: file:///svn/unbound/trunk@2873 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-25 09:36:21 +00:00
Wouter Wijngaards 450304d3a1 - #492: Fix endianness detection, revert to older lookup3.c detection
and put new detect lines after previous tests, to avoid regressions
  but allow new detections to succeed.


git-svn-id: file:///svn/unbound/trunk@2872 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-25 09:35:27 +00:00
Wouter Wijngaards 3f2dcf1c0b remove debug print.
git-svn-id: file:///svn/unbound/trunk@2871 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-22 13:03:00 +00:00
Wouter Wijngaards efd7d6efb7 - Fix makedist for new svn for -d option.
- unbound.h header file has UNBOUND_VERSION_MAJOR define.
- Fix windows RSRC version for long version numbers.


git-svn-id: file:///svn/unbound/trunk@2870 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-22 12:41:13 +00:00
Wouter Wijngaards 93bdeae0ff iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2869 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-22 10:00:55 +00:00
Wouter Wijngaards 2ad6ee3c72 - Fix resolve of names that use a mix of public and private addresses.
git-svn-id: file:///svn/unbound/trunk@2868 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-22 09:36:33 +00:00
Wouter Wijngaards 7ea0456d7c - install copy of unbound-control.8 man page for unbound-control-setup
git-svn-id: file:///svn/unbound/trunk@2866 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-21 12:48:12 +00:00
Wouter Wijngaards d2083a31b4 trunk has 1.4.21 version
committed libunbound version 4:1:2 for binary API updated in 1.4.20


git-svn-id: file:///svn/unbound/trunk@2865 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-21 12:24:42 +00:00
Wouter Wijngaards c46c64e3ff release changelog entry.
git-svn-id: file:///svn/unbound/trunk@2863 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-21 11:17:00 +00:00
Wouter Wijngaards 4d6dfde8a6 tag 1.4.20rc1
git-svn-id: file:///svn/unbound/trunk@2860 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-14 13:06:27 +00:00
Wouter Wijngaards ee81d7c26d iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2859 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-14 12:54:52 +00:00
Wouter Wijngaards 269f6a5f52 - Fixup makedist.sh for windows compile.
git-svn-id: file:///svn/unbound/trunk@2858 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-12 13:44:59 +00:00
Wouter Wijngaards 2471a0971f in new directory.
git-svn-id: file:///svn/unbound/trunk@2857 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-12 13:35:39 +00:00
Wouter Wijngaards 08d5059ddb - testcode/ldns-testpkts.c check for makedist is informational.
git-svn-id: file:///svn/unbound/trunk@2856 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-11 15:11:56 +00:00
Wouter Wijngaards 08b59fc57e - iana portlist update.
git-svn-id: file:///svn/unbound/trunk@2855 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-03-11 14:42:13 +00:00
Wouter Wijngaards dc7d75bbed includes for compile with event2.
git-svn-id: file:///svn/unbound/trunk@2854 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-22 15:24:02 +00:00
Wouter Wijngaards 501c63598b ifs for portability with NSS.
git-svn-id: file:///svn/unbound/trunk@2853 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-22 15:16:27 +00:00
Wouter Wijngaards 8bd5f59645 - fix defines in lookup3 for bigendian bsd alpha
git-svn-id: file:///svn/unbound/trunk@2845 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-15 14:00:03 +00:00
Wouter Wijngaards 69bf8dc41d - Fixup openssl_thread init code to only run if compiled with SSL.
git-svn-id: file:///svn/unbound/trunk@2843 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-11 16:03:51 +00:00
Wouter Wijngaards 556acaaf32 Fixup for compile on open and install paths of nss and nspr.
git-svn-id: file:///svn/unbound/trunk@2842 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-08 15:50:22 +00:00
Wouter Wijngaards 18d1cf41b5 fixup nss compile with file url.
git-svn-id: file:///svn/unbound/trunk@2841 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-08 15:04:07 +00:00
Wouter Wijngaards 60fa25264f fixup nss svn path.
git-svn-id: file:///svn/unbound/trunk@2840 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-08 14:52:43 +00:00
Wouter Wijngaards e1b0e38102 Fixup use of netcat.
git-svn-id: file:///svn/unbound/trunk@2839 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-08 14:51:04 +00:00
Wouter Wijngaards 26f8395712 Compile test for libnss and libunbound compile mode, runs on check in.
git-svn-id: file:///svn/unbound/trunk@2838 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-08 14:28:40 +00:00
Wouter Wijngaards 15ed732030 lint clean (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@2836 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-07 13:34:14 +00:00
Wouter Wijngaards 90d55f8d82 update iana portlist.
git-svn-id: file:///svn/unbound/trunk@2835 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-07 13:30:17 +00:00
Wouter Wijngaards 2d9ed9b470 - add libunbound.ttl at end of result structure, version bump for
libunbound and binary backwards compatible, but 1.4.19 is not
  forward compatible with 1.4.20.
- updated configure scripts with newer versions.


git-svn-id: file:///svn/unbound/trunk@2834 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-07 13:23:48 +00:00
Wouter Wijngaards 20f4608728 - detect endianness in lookup3 on BSD.
git-svn-id: file:///svn/unbound/trunk@2833 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-02-07 08:18:33 +00:00
Wouter Wijngaards f2dc71b465 more header change for nss.
git-svn-id: file:///svn/unbound/trunk@2831 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-30 15:35:23 +00:00
Wouter Wijngaards ffab065d1e - includes and have_ssl fixes for nss.
git-svn-id: file:///svn/unbound/trunk@2830 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-30 13:15:03 +00:00
Wouter Wijngaards 9d423e7024 fix potential uninit variables.
git-svn-id: file:///svn/unbound/trunk@2829 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-29 12:58:50 +00:00
Wouter Wijngaards 6fe9aab1c2 - printout name of zone with duplicate fwd and hint errors.
git-svn-id: file:///svn/unbound/trunk@2828 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-29 08:13:57 +00:00
Wouter Wijngaards ed6b39c095 fixup for doxygen 1.8.3
git-svn-id: file:///svn/unbound/trunk@2827 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-28 13:44:38 +00:00
Wouter Wijngaards ae017713b3 lint clean.
git-svn-id: file:///svn/unbound/trunk@2826 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-28 13:32:14 +00:00
Wouter Wijngaards fefeb21cf0 - updated fwd_zero for newer nc. Updated common.sh for newer netstat.
git-svn-id: file:///svn/unbound/trunk@2825 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-28 13:30:46 +00:00
Wouter Wijngaards 60f4c5a535 update test for new requirements.
git-svn-id: file:///svn/unbound/trunk@2809 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-17 11:58:30 +00:00
Wouter Wijngaards 59521116c1 - update iana port list.
git-svn-id: file:///svn/unbound/trunk@2808 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-17 11:23:07 +00:00
Wouter Wijngaards 98b3b1a36d - unbound-anchors checks the emailAddress of the signer of the
root.xml file, default is dnssec@iana.org.  It also checks that
  the signer has the correct key usage for a digital signature.


git-svn-id: file:///svn/unbound/trunk@2807 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-17 11:17:04 +00:00
Wouter Wijngaards 44aec50f73 fix treatment of certificates without subject.
git-svn-id: file:///svn/unbound/trunk@2806 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-03 15:48:35 +00:00
Wouter Wijngaards ad0ec1b45f fixup test and test name check.
git-svn-id: file:///svn/unbound/trunk@2805 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-03 15:37:54 +00:00
Wouter Wijngaards 3dc7de758d - Check the commonName of the signer of the root.xml file in
unbound-anchor, default is dnssec@iana.org.


git-svn-id: file:///svn/unbound/trunk@2804 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-03 14:38:38 +00:00
Wouter Wijngaards 3b467728ec - Test that unbound can handle a CNAME at an intermediate node in
the chain of trust (where it seeks a DS record).


git-svn-id: file:///svn/unbound/trunk@2803 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-03 12:25:48 +00:00
Wouter Wijngaards 5d86f6932a - Test that unbound-control checks client credentials.
git-svn-id: file:///svn/unbound/trunk@2802 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-03 10:58:31 +00:00
Wouter Wijngaards b56365792e Even neater openssl callback removal code from Robert Fleischman.
git-svn-id: file:///svn/unbound/trunk@2801 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-02 14:44:34 +00:00
Wouter Wijngaards 1c3c7294e6 - Tested that unbound implements the RFC5155 Technical Errata id 3441.
Unbound already implements insecure classification of an empty
  nonterminal in NSEC3 optout zone.


git-svn-id: file:///svn/unbound/trunk@2800 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-02 14:42:20 +00:00
Wouter Wijngaards 01fe4cfcab iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2799 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-02 11:15:49 +00:00
Wouter Wijngaards dabfda2d70 - Fix openssl lock free on exit (reported by Robert Fleischman).
git-svn-id: file:///svn/unbound/trunk@2798 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-01-02 10:53:57 +00:00
Wouter Wijngaards 064bd4e2bd - Fix unbound-anchor xml parse of entity declarations for safety.
git-svn-id: file:///svn/unbound/trunk@2797 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-20 08:22:39 +00:00
Wouter Wijngaards 08188b5138 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2796 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-19 10:55:18 +00:00
Wouter Wijngaards eb48aeaa31 iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2795 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-18 15:26:25 +00:00
Wouter Wijngaards 6c0c8fd672 - Change of D.ROOT-SERVERS.NET A address in default root hints.
git-svn-id: file:///svn/unbound/trunk@2794 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-14 08:08:59 +00:00
Wouter Wijngaards b08c22e47b - trunk has 1.4.20 under development.
git-svn-id: file:///svn/unbound/trunk@2793 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-12 09:17:08 +00:00
Wouter Wijngaards a593885013 1.4.19
(svn:NO TEST)


git-svn-id: file:///svn/unbound/trunk@2791 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-12 08:43:16 +00:00
Wouter Wijngaards 5cdcb7cf09 We turn out to support RFC 1123, 6.1 Requirements for DNS of internet hosts.
git-svn-id: file:///svn/unbound/trunk@2790 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-06 10:07:51 +00:00
Wouter Wijngaards 3a9bb34d14 - note support for AAAA RR type RFC.
git-svn-id: file:///svn/unbound/trunk@2789 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-06 10:02:02 +00:00
Wouter Wijngaards 1dff48d188 changelog (svn:NO TEST)
git-svn-id: file:///svn/unbound/trunk@2788 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-04 11:52:14 +00:00
Yuri Schaeffer e00e9d2839 Typo inside a whitespace
git-svn-id: file:///svn/unbound/trunk@2786 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-04 10:18:00 +00:00
Matthijs Mekking 5361b081d3 review, found nothing, except for layout and typo
git-svn-id: file:///svn/unbound/trunk@2785 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-12-03 14:28:06 +00:00
Wouter Wijngaards e2786e481a - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2784 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-30 09:50:29 +00:00
Wouter Wijngaards 2c6462c943 - bug 481: fix python example0.
git-svn-id: file:///svn/unbound/trunk@2783 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-30 09:41:38 +00:00
Wouter Wijngaards d29761322f iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2782 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-27 16:01:47 +00:00
Wouter Wijngaards 4b3fd4f789 - Fix unbound-control forward disables configured stubs below it.
git-svn-id: file:///svn/unbound/trunk@2781 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-09 15:35:18 +00:00
Wouter Wijngaards ccebf0ff92 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2780 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-07 08:57:51 +00:00
Wouter Wijngaards 4bc1bfeb20 - Fixup ldns-testpkts, identical to ldns/examples.
git-svn-id: file:///svn/unbound/trunk@2779 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-11-07 08:49:53 +00:00
Wouter Wijngaards c3f6ca3997 - Fix bug #477: unbound-anchor segfaults if EDNS is blocked.
git-svn-id: file:///svn/unbound/trunk@2778 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-30 15:13:53 +00:00
Matthijs Mekking 79ffc1ab81 Fix validation for responses with CNAME and wildcard expanded CNAME in
ANSWER section.



git-svn-id: file:///svn/unbound/trunk@2777 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-29 14:06:00 +00:00
Wouter Wijngaards 742256f2c7 - make clean and makerealclean remove generated python and docs.
git-svn-id: file:///svn/unbound/trunk@2776 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-08 12:31:16 +00:00
Wouter Wijngaards 239b552b6d - fix build of pythonmod in objdir, for unbound.py.
git-svn-id: file:///svn/unbound/trunk@2775 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-08 12:07:51 +00:00
Wouter Wijngaards 9aaff22d88 - update ldns-testpkts.c to ldns 1.6.14 version.
git-svn-id: file:///svn/unbound/trunk@2774 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-08 10:24:50 +00:00
Wouter Wijngaards e66964bfb3 - fix build of pythonmod in objdir (thanks Jakob Schlyter).
git-svn-id: file:///svn/unbound/trunk@2773 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-05 07:06:11 +00:00
Wouter Wijngaards 7f0542f674 - fix text in unbound-anchor man page.
git-svn-id: file:///svn/unbound/trunk@2772 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-03 14:43:46 +00:00
Wouter Wijngaards a8e468fc67 - ignore trusted-keys globs that have no files (from Paul Wouters).
git-svn-id: file:///svn/unbound/trunk@2770 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-10-01 07:18:49 +00:00
Wouter Wijngaards 033ad37837 nicer documentation.
git-svn-id: file:///svn/unbound/trunk@2769 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-27 13:12:00 +00:00
Wouter Wijngaards 18f2fc28de - updated contrib/unbound.spec, patch from Valentin Bud.
git-svn-id: file:///svn/unbound/trunk@2768 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-27 09:37:04 +00:00
Wouter Wijngaards 94290ece06 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2767 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-27 09:34:24 +00:00
Wouter Wijngaards f700558dc0 unbound-control -q option is quiet, patch from Mariano Absatz.
git-svn-id: file:///svn/unbound/trunk@2766 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-27 09:32:35 +00:00
Wouter Wijngaards 9c4bbfd37d - include: directive in config file accepts wildcards. Patch from
Paul Wouters.  Suggested use: include: "/etc/unbound.d/conf.d/*"


git-svn-id: file:///svn/unbound/trunk@2765 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-27 08:52:37 +00:00
Wouter Wijngaards 1ade6965b2 - chdir to / after chroot call (suggested by Camiel Dobbelaar).
git-svn-id: file:///svn/unbound/trunk@2764 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-21 07:13:51 +00:00
Wouter Wijngaards b44780b22c - patch_rsamd5_enable.diff: this patch enables RSAMD5 validation
otherwise it is treated as insecure.  The RSAMD5 algorithm is
  deprecated (RFC6725).  The MD5 hash is considered weak for some
  purposes, if you want to sign your zone, then RSASHA256 is an
  uncontested hash.


git-svn-id: file:///svn/unbound/trunk@2760 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-09-17 13:15:12 +00:00
Wouter Wijngaards 508ea86578 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2754 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-30 12:12:58 +00:00
Wouter Wijngaards 5e5e89b9f5 - RFC6725 deprecates RSAMD5: this DNSKEY algorithm is disabled.
git-svn-id: file:///svn/unbound/trunk@2753 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-30 12:02:53 +00:00
Wouter Wijngaards 6280983293 - Nicer comments outgoing-port-avoid, thanks Stu (bug #465).
git-svn-id: file:///svn/unbound/trunk@2752 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-29 07:13:36 +00:00
Yuri Schaeffer 99cb5c6968 Unix socket contribution
git-svn-id: file:///svn/unbound/trunk@2751 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-28 12:24:57 +00:00
Wouter Wijngaards 83f5814a07 - Fallback to 1472 and 1232, one fragment size without headers.
git-svn-id: file:///svn/unbound/trunk@2746 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-22 08:46:30 +00:00
Wouter Wijngaards 940f6d98de - Fix timeouts so that when a server has been offline for a while
and is probed to see it works, it becomes fully available for
  server selection again.


git-svn-id: file:///svn/unbound/trunk@2745 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-21 07:17:48 +00:00
Wouter Wijngaards b790f02df7 - Add documentation to libunbound for default nonuse of resolv.conf.
git-svn-id: file:///svn/unbound/trunk@2744 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-17 07:06:18 +00:00
Wouter Wijngaards 093b8b0c5a iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@2741 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-02 08:08:27 +00:00
Wouter Wijngaards 47183cc7ef - trunk has 1.4.19 under development (fixes from 1 aug and 31 july
are for 1.4.19).


git-svn-id: file:///svn/unbound/trunk@2740 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-02 07:57:33 +00:00
Wouter Wijngaards 44aeac1fc9 note release date.
git-svn-id: file:///svn/unbound/trunk@2739 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-02 07:46:59 +00:00
Wouter Wijngaards ca7ded0457 compile without warnings unthreaded.
git-svn-id: file:///svn/unbound/trunk@2737 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-01 14:07:04 +00:00
Wouter Wijngaards 04abceeafa make depend.
git-svn-id: file:///svn/unbound/trunk@2736 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-01 13:19:33 +00:00
Wouter Wijngaards bbe6cb922a remove warnings on Solaris.
git-svn-id: file:///svn/unbound/trunk@2735 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-01 13:18:19 +00:00
Wouter Wijngaards a9d248e7c9 ifdef for NSS compile.
git-svn-id: file:///svn/unbound/trunk@2734 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-01 13:08:58 +00:00
Wouter Wijngaards f9762ba453 - Fix openssl race condition, initializes openssl locks, reported
by Einar Lonn and Patrik Wallstrom.


git-svn-id: file:///svn/unbound/trunk@2733 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-08-01 11:31:29 +00:00
Wouter Wijngaards 3b78588def - added manpage links for libunbound calls (Thanks Paul Wouters).
git-svn-id: file:///svn/unbound/trunk@2732 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-31 13:43:08 +00:00
Wouter Wijngaards 217ef3d9a3 - Fix forward-first option where it sets the RD flag wrongly.
git-svn-id: file:///svn/unbound/trunk@2731 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-31 12:53:53 +00:00
Wouter Wijngaards 9046a52364 - Fix that enables modules to register twice for the same
serviced_query, without race conditions or administration issues.
  This should not happen with the current codebase, but it is robust.


git-svn-id: file:///svn/unbound/trunk@2730 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-31 11:33:06 +00:00
Wouter Wijngaards c5af4ce159 - Improved forward-first and stub-first documentation.
git-svn-id: file:///svn/unbound/trunk@2729 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-07-31 08:08:43 +00:00
Wouter Wijngaards ca8e258cde tag 1.4.18rc2
git-svn-id: file:///svn/unbound/trunk@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
781 changed files with 183202 additions and 47755 deletions
+1
View File
@@ -0,0 +1 @@
testdata/*.[0-9] linguist-documentation
+38
View File
@@ -0,0 +1,38 @@
*.lo
*.o
/.libs/
/Makefile
/autom4te.cache/
/config.h
/config.log
/config.status
/dnstap/dnstap_config.h
/doc/example.conf
/doc/libunbound.3
/doc/unbound-anchor.8
/doc/unbound-checkconf.8
/doc/unbound-control.8
/doc/unbound-host.1
/doc/unbound.8
/doc/unbound.conf.5
/libtool
/libunbound.la
/smallapp/unbound-control-setup.sh
/unbound
/unbound-anchor
/unbound-checkconf
/unbound-control
/unbound-control-setup
/unbound-host
/unbound.h
/asynclook
/delayer
/lock-verify
/memstats
/perf
/petal
/pktview
/streamtcp
/testbound
/unittest
+10 -10
View File
@@ -18,13 +18,13 @@ 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.
"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
HOLDER 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.
+1132 -222
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
+6713 -4248
View File
File diff suppressed because it is too large Load Diff
+1451
View File
File diff suppressed because it is too large Load Diff
-280
View File
@@ -1,280 +0,0 @@
##### http://autoconf-archive.cryp.to/acx_pthread.html
#
# SYNOPSIS
#
# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads.
# It sets the PTHREAD_LIBS output variable to the threads library and
# linker flags, and the PTHREAD_CFLAGS output variable to any special
# C compiler flags that are needed. (The user can also force certain
# compiler flags/libs to be tested by setting these environment
# variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise).
# (This is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these
# flags, but also link it with them as well. e.g. you should link
# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
# $LIBS
#
# If you are only building threads programs, you may wish to use
# these variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads
# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
# run it if it is not found. If ACTION-IF-FOUND is not specified, the
# default action will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or
# if you have any other suggestions or comments. This macro was based
# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
# (with help from M. Frigo), as well as ac_pthread and hb_pthread
# macros posted by Alejandro Forero Cuervo to the autoconf macro
# repository. We are also grateful for the helpful feedback of
# numerous users.
#
# LAST MODIFICATION
#
# 2006-05-29
#
# COPYLEFT
#
# Copyright (c) 2006 Steven G. Johnson <stevenj@alum.mit.edu>
#
# 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, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# 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([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
[attr_name=$attr; break])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
if test x"$GCC" != xyes; then
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
else
PTHREAD_CC=$CC
fi
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD
+115
View File
@@ -0,0 +1,115 @@
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; \
print(sys.version.split()[[0]])"`
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
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
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])
#
# 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!
#
])
+332
View File
@@ -0,0 +1,332 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threads programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# 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 3 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 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.
#serial 21
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok])
if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case ${host_os} in
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;;
esac
# Clang doesn't consider unrecognized options an error unless we specify
# -Werror. We throw in some extra Clang-specific options to ensure that
# this doesn't happen for GCC, which also accepts -Werror.
AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
save_CFLAGS="$CFLAGS"
ax_pthread_extra_flags="-Werror"
CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
[AC_MSG_RESULT([yes])],
[ax_pthread_extra_flags=
AC_MSG_RESULT([no])])
CFLAGS="$save_CFLAGS"
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
if test x"$ax_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
static void routine(void *a) { *((int*)a) = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT([$ax_pthread_ok])
if test "x$ax_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $attr; return attr /* ; */])],
[attr_name=$attr; break],
[])
done
AC_MSG_RESULT([$attr_name])
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case ${host_os} in
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
osf* | hpux*) flag="-D_REENTRANT";;
solaris*)
if test "$GCC" = "yes"; then
flag="-D_REENTRANT"
else
# TODO: What about Clang on Solaris?
flag="-mt -D_REENTRANT"
fi
;;
esac
AC_MSG_RESULT([$flag])
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
[ax_cv_PTHREAD_PRIO_INHERIT], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
[[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != xyes; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD
+712
View File
@@ -0,0 +1,712 @@
/*
* cachedb/cachedb.c - cache from a database external to the program module
*
* Copyright (c) 2016, NLnet Labs. All rights reserved.
*
* 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 NLNET LABS 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
* HOLDER 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.
*/
/**
* \file
*
* This file contains a module that uses an external database to cache
* dns responses.
*/
#include "config.h"
#ifdef USE_CACHEDB
#include "cachedb/cachedb.h"
#include "util/regional.h"
#include "util/net_help.h"
#include "util/config_file.h"
#include "util/data/msgreply.h"
#include "util/data/msgencode.h"
#include "services/cache/dns.h"
#include "validator/val_neg.h"
#include "validator/val_secalgo.h"
#include "iterator/iter_utils.h"
#include "sldns/parseutil.h"
#include "sldns/wire2str.h"
#include "sldns/sbuffer.h"
#define CACHEDB_HASHSIZE 256 /* bit hash */
/** the unit test testframe for cachedb, its module state contains
* a cache for a couple queries (in memory). */
struct testframe_moddata {
/** key for single stored data element, NULL if none */
char* stored_key;
/** data for single stored data element, NULL if none */
uint8_t* stored_data;
/** length of stored data */
size_t stored_datalen;
};
static int
testframe_init(struct module_env* env, struct cachedb_env* cachedb_env)
{
(void)env;
verbose(VERB_ALGO, "testframe_init");
cachedb_env->backend_data = (void*)calloc(1,
sizeof(struct testframe_moddata));
if(!cachedb_env->backend_data) {
log_err("out of memory");
return 0;
}
return 1;
}
static void
testframe_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
{
struct testframe_moddata* d = (struct testframe_moddata*)
cachedb_env->backend_data;
(void)env;
verbose(VERB_ALGO, "testframe_deinit");
if(!d)
return;
free(d->stored_key);
free(d->stored_data);
free(d);
}
static int
testframe_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
char* key, struct sldns_buffer* result_buffer)
{
struct testframe_moddata* d = (struct testframe_moddata*)
cachedb_env->backend_data;
(void)env;
verbose(VERB_ALGO, "testframe_lookup of %s", key);
if(d->stored_key && strcmp(d->stored_key, key) == 0) {
if(d->stored_datalen > sldns_buffer_capacity(result_buffer))
return 0; /* too large */
verbose(VERB_ALGO, "testframe_lookup found %d bytes",
(int)d->stored_datalen);
sldns_buffer_clear(result_buffer);
sldns_buffer_write(result_buffer, d->stored_data,
d->stored_datalen);
sldns_buffer_flip(result_buffer);
return 1;
}
return 0;
}
static void
testframe_store(struct module_env* env, struct cachedb_env* cachedb_env,
char* key, uint8_t* data, size_t data_len)
{
struct testframe_moddata* d = (struct testframe_moddata*)
cachedb_env->backend_data;
(void)env;
verbose(VERB_ALGO, "testframe_store %s (%d bytes)", key, (int)data_len);
/* free old data element (if any) */
free(d->stored_key);
d->stored_key = NULL;
free(d->stored_data);
d->stored_data = NULL;
d->stored_datalen = 0;
d->stored_data = memdup(data, data_len);
if(!d->stored_data) {
log_err("out of memory");
return;
}
d->stored_datalen = data_len;
d->stored_key = strdup(key);
if(!d->stored_key) {
free(d->stored_data);
d->stored_data = NULL;
d->stored_datalen = 0;
return;
}
/* (key,data) successfully stored */
}
/** The testframe backend is for unit tests */
static struct cachedb_backend testframe_backend = { "testframe",
testframe_init, testframe_deinit, testframe_lookup, testframe_store
};
/** find a particular backend from possible backends */
static struct cachedb_backend*
cachedb_find_backend(const char* str)
{
if(strcmp(str, testframe_backend.name) == 0)
return &testframe_backend;
/* TODO add more backends here */
return NULL;
}
/** apply configuration to cachedb module 'global' state */
static int
cachedb_apply_cfg(struct cachedb_env* cachedb_env, struct config_file* cfg)
{
const char* backend_str = "testframe"; /* TODO get from cfg */
if(backend_str && backend_str[0]) {
cachedb_env->backend = cachedb_find_backend(backend_str);
if(!cachedb_env->backend) {
log_err("cachedb: cannot find backend name '%s",
backend_str);
return NULL;
}
}
/* TODO see if more configuration needs to be applied or not */
return 1;
}
int
cachedb_init(struct module_env* env, int id)
{
struct cachedb_env* cachedb_env = (struct cachedb_env*)calloc(1,
sizeof(struct cachedb_env));
if(!cachedb_env) {
log_err("malloc failure");
return 0;
}
env->modinfo[id] = (void*)cachedb_env;
if(!cachedb_apply_cfg(cachedb_env, env->cfg)) {
log_err("cachedb: could not apply configuration settings.");
return 0;
}
/* see if a backend is selected */
if(!cachedb_env->backend || !cachedb_env->backend->name)
return 1;
if(!(*cachedb_env->backend->init)(env, cachedb_env)) {
log_err("cachedb: could not init %s backend",
cachedb_env->backend->name);
return 0;
}
cachedb_env->enabled = 1;
return 1;
}
void
cachedb_deinit(struct module_env* env, int id)
{
struct cachedb_env* cachedb_env;
if(!env || !env->modinfo[id])
return;
cachedb_env = (struct cachedb_env*)env->modinfo[id];
/* free contents */
/* TODO */
if(cachedb_env->enabled) {
(*cachedb_env->backend->deinit)(env, cachedb_env);
}
free(cachedb_env);
env->modinfo[id] = NULL;
}
/** new query for cachedb */
static int
cachedb_new(struct module_qstate* qstate, int id)
{
struct cachedb_qstate* iq = (struct cachedb_qstate*)regional_alloc(
qstate->region, sizeof(struct cachedb_qstate));
qstate->minfo[id] = iq;
if(!iq)
return 0;
memset(iq, 0, sizeof(*iq));
/* initialise it */
/* TODO */
return 1;
}
/**
* Return an error
* @param qstate: our query state
* @param id: module id
* @param rcode: error code (DNS errcode).
* @return: 0 for use by caller, to make notation easy, like:
* return error_response(..).
*/
static int
error_response(struct module_qstate* qstate, int id, int rcode)
{
verbose(VERB_QUERY, "return error response %s",
sldns_lookup_by_id(sldns_rcodes, rcode)?
sldns_lookup_by_id(sldns_rcodes, rcode)->name:"??");
qstate->return_rcode = rcode;
qstate->return_msg = NULL;
qstate->ext_state[id] = module_finished;
return 0;
}
/**
* Hash the query name, type, class and dbacess-secret into lookup buffer.
* @param qstate: query state with query info
* and env->cfg with secret.
* @param buf: returned buffer with hash to lookup
* @param len: length of the buffer.
*/
static void
calc_hash(struct module_qstate* qstate, char* buf, size_t len)
{
uint8_t clear[1024];
size_t clen = 0;
uint8_t hash[CACHEDB_HASHSIZE/8];
const char* hex = "0123456789ABCDEF";
const char* secret = "default"; /* TODO: from qstate->env->cfg */
size_t i;
/* copy the hash info into the clear buffer */
if(clen + qstate->qinfo.qname_len < sizeof(clear)) {
memmove(clear+clen, qstate->qinfo.qname,
qstate->qinfo.qname_len);
clen += qstate->qinfo.qname_len;
}
if(clen + 4 < sizeof(clear)) {
uint16_t t = htons(qstate->qinfo.qtype);
uint16_t c = htons(qstate->qinfo.qclass);
memmove(clear+clen, &t, 2);
memmove(clear+clen+2, &c, 2);
clen += 4;
}
if(secret && secret[0] && clen + strlen(secret) < sizeof(clear)) {
memmove(clear+clen, secret, strlen(secret));
clen += strlen(secret);
}
/* hash the buffer */
secalgo_hash_sha256(clear, clen, hash);
memset(clear, 0, clen);
/* hex encode output for portability (some online dbs need
* no nulls, no control characters, and so on) */
log_assert(len >= sizeof(hash)*2 + 1);
(void)len;
for(i=0; i<sizeof(hash); i++) {
buf[i*2] = hex[(hash[i]&0xf0)>>4];
buf[i*2+1] = hex[hash[i]&0x0f];
}
buf[sizeof(hash)*2] = 0;
}
/** convert data from return_msg into the data buffer */
static int
prep_data(struct module_qstate* qstate, struct sldns_buffer* buf)
{
uint64_t timestamp, expiry;
size_t oldlim;
struct edns_data edns;
memset(&edns, 0, sizeof(edns));
edns.edns_present = 1;
edns.bits = EDNS_DO;
edns.ext_rcode = 0;
edns.edns_version = EDNS_ADVERTISED_VERSION;
edns.udp_size = EDNS_ADVERTISED_SIZE;
if(!qstate->return_msg || !qstate->return_msg->rep)
return 0;
if(verbosity >= VERB_ALGO)
log_dns_msg("cachedb encoding", &qstate->return_msg->qinfo,
qstate->return_msg->rep);
if(!reply_info_answer_encode(&qstate->return_msg->qinfo,
qstate->return_msg->rep, 0, qstate->query_flags,
buf, 0, 1, qstate->env->scratch, 65535, &edns, 1, 0))
return 0;
/* TTLs in the return_msg are relative to time(0) so we have to
* store that, we also store the smallest ttl in the packet+time(0)
* as the packet expiry time */
/* qstate->return_msg->rep->ttl contains that relative shortest ttl */
timestamp = (uint64_t)*qstate->env->now;
expiry = timestamp + (uint64_t)qstate->return_msg->rep->ttl;
timestamp = htobe64(timestamp);
expiry = htobe64(expiry);
oldlim = sldns_buffer_limit(buf);
if(oldlim + sizeof(timestamp)+sizeof(expiry) >=
sldns_buffer_capacity(buf))
return 0; /* doesn't fit. */
sldns_buffer_set_limit(buf, oldlim + sizeof(timestamp)+sizeof(expiry));
sldns_buffer_write_at(buf, oldlim, &timestamp, sizeof(timestamp));
sldns_buffer_write_at(buf, oldlim+sizeof(timestamp), &expiry,
sizeof(expiry));
return 1;
}
/** check expiry, return true if matches OK */
static int
good_expiry_and_qinfo(struct module_qstate* qstate, struct sldns_buffer* buf)
{
uint64_t expiry;
/* the expiry time is the last bytes of the buffer */
if(sldns_buffer_limit(buf) < sizeof(expiry))
return 0;
sldns_buffer_read_at(buf, sldns_buffer_limit(buf)-sizeof(expiry),
&expiry, sizeof(expiry));
expiry = be64toh(expiry);
if((time_t)expiry < *qstate->env->now)
return 0;
return 1;
}
/** convert dns message in buffer to return_msg */
static int
parse_data(struct module_qstate* qstate, struct sldns_buffer* buf)
{
struct msg_parse* prs;
struct edns_data edns;
uint64_t timestamp, expiry;
time_t adjust;
size_t lim = sldns_buffer_limit(buf);
if(lim < LDNS_HEADER_SIZE+sizeof(timestamp)+sizeof(expiry))
return 0; /* too short */
/* remove timestamp and expiry from end */
sldns_buffer_read_at(buf, lim-sizeof(expiry), &expiry, sizeof(expiry));
sldns_buffer_read_at(buf, lim-sizeof(expiry)-sizeof(timestamp),
&timestamp, sizeof(timestamp));
expiry = be64toh(expiry);
timestamp = be64toh(timestamp);
/* parse DNS packet */
regional_free_all(qstate->env->scratch);
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
sizeof(struct msg_parse));
if(!prs)
return 0; /* out of memory */
memset(prs, 0, sizeof(*prs));
memset(&edns, 0, sizeof(edns));
sldns_buffer_set_limit(buf, lim - sizeof(expiry)-sizeof(timestamp));
if(parse_packet(buf, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
sldns_buffer_set_limit(buf, lim);
return 0;
}
if(parse_extract_edns(prs, &edns, qstate->env->scratch) !=
LDNS_RCODE_NOERROR) {
sldns_buffer_set_limit(buf, lim);
return 0;
}
qstate->return_msg = dns_alloc_msg(buf, prs, qstate->region);
sldns_buffer_set_limit(buf, lim);
if(!qstate->return_msg)
return 0;
qstate->return_rcode = LDNS_RCODE_NOERROR;
/* see how much of the TTL expired, and remove it */
adjust = *qstate->env->now - (time_t)timestamp;
verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust);
/*adjust_msg(qstate->return_msg, adjust);*/
/* TODO:
msg->rep->ttl = r->ttl - adjust;
msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl);
for(i=0; i<d->count + d->rrsig_count; i++) {
if(d->rr_ttl[i] < adjust)
d->rr_ttl[i] = 0;
else d->rr_ttl[i] -= adjust;
}
if(d->ttl < adjust)
d->ttl = 0;
else d->ttl -= adjust;
*/
/* TODO */
return 0;
}
/**
* Lookup the qstate.qinfo in extcache, store in qstate.return_msg.
* return true if lookup was successful.
*/
static int
cachedb_extcache_lookup(struct module_qstate* qstate, struct cachedb_env* ie)
{
char key[(CACHEDB_HASHSIZE/8)*2+1];
calc_hash(qstate, key, sizeof(key));
/* call backend to fetch data for key into scratch buffer */
if( !(*ie->backend->lookup)(qstate->env, ie, key,
qstate->env->scratch_buffer)) {
return 0;
}
/* check expiry date and check if query-data matches */
if( !good_expiry_and_qinfo(qstate, qstate->env->scratch_buffer) ) {
return 0;
}
/* parse dns message into return_msg */
if( !parse_data(qstate, qstate->env->scratch_buffer) ) {
return 0;
}
return 1;
}
/**
* Store the qstate.return_msg in extcache for key qstate.info
*/
static void
cachedb_extcache_store(struct module_qstate* qstate, struct cachedb_env* ie)
{
char key[(CACHEDB_HASHSIZE/8)*2+1];
calc_hash(qstate, key, sizeof(key));
/* prepare data in scratch buffer */
if(!prep_data(qstate, qstate->env->scratch_buffer))
return;
/* call backend */
(*ie->backend->store)(qstate->env, ie, key,
sldns_buffer_begin(qstate->env->scratch_buffer),
sldns_buffer_limit(qstate->env->scratch_buffer));
}
/**
* See if unbound's internal cache can answer the query
*/
static int
cachedb_intcache_lookup(struct module_qstate* qstate)
{
struct dns_msg* msg;
msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname,
qstate->qinfo.qname_len, qstate->qinfo.qtype,
qstate->qinfo.qclass, qstate->query_flags,
qstate->region, qstate->env->scratch);
if(!msg && qstate->env->neg_cache) {
/* lookup in negative cache; may result in
* NOERROR/NODATA or NXDOMAIN answers that need validation */
msg = val_neg_getmsg(qstate->env->neg_cache, &qstate->qinfo,
qstate->region, qstate->env->rrset_cache,
qstate->env->scratch_buffer,
*qstate->env->now, 1/*add SOA*/, NULL);
}
if(!msg)
return 0;
/* this is the returned msg */
qstate->return_rcode = LDNS_RCODE_NOERROR;
qstate->return_msg = msg;
return 1;
}
/**
* Store query into the internal cache of unbound.
*/
static void
cachedb_intcache_store(struct module_qstate* qstate)
{
if(!qstate->return_msg)
return;
(void)dns_cache_store(qstate->env, &qstate->qinfo,
qstate->return_msg->rep, 0, qstate->prefetch_leeway, 0,
qstate->region, qstate->query_flags);
}
/**
* Handle a cachedb module event with a query
* @param qstate: query state (from the mesh), passed between modules.
* contains qstate->env module environment with global caches and so on.
* @param iq: query state specific for this module. per-query.
* @param ie: environment specific for this module. global.
* @param id: module id.
*/
static void
cachedb_handle_query(struct module_qstate* qstate,
struct cachedb_qstate* ATTR_UNUSED(iq),
struct cachedb_env* ie, int id)
{
/* check if we are enabled, and skip if so */
if(!ie->enabled) {
/* pass request to next module */
qstate->ext_state[id] = module_wait_module;
return;
}
if(qstate->blacklist || qstate->no_cache_lookup) {
/* cache is blacklisted or we are instructed from edns to not look */
/* pass request to next module */
qstate->ext_state[id] = module_wait_module;
return;
}
/* lookup inside unbound's internal cache */
if(cachedb_intcache_lookup(qstate)) {
if(verbosity >= VERB_ALGO) {
if(qstate->return_msg->rep)
log_dns_msg("cachedb internal cache lookup",
&qstate->return_msg->qinfo,
qstate->return_msg->rep);
else log_info("cachedb internal cache lookup: rcode %s",
sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)?
sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)->name:"??");
}
/* we are done with the query */
qstate->ext_state[id] = module_finished;
return;
}
/* ask backend cache to see if we have data */
if(cachedb_extcache_lookup(qstate, ie)) {
if(verbosity >= VERB_ALGO)
log_dns_msg(ie->backend->name,
&qstate->return_msg->qinfo,
qstate->return_msg->rep);
/* store this result in internal cache */
cachedb_intcache_store(qstate);
/* we are done with the query */
qstate->ext_state[id] = module_finished;
return;
}
/* no cache fetches */
/* pass request to next module */
qstate->ext_state[id] = module_wait_module;
}
/**
* Handle a cachedb module event with a response from the iterator.
* @param qstate: query state (from the mesh), passed between modules.
* contains qstate->env module environment with global caches and so on.
* @param iq: query state specific for this module. per-query.
* @param ie: environment specific for this module. global.
* @param id: module id.
*/
static void
cachedb_handle_response(struct module_qstate* qstate,
struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id)
{
/* check if we are not enabled or instructed to not cache, and skip */
if(!ie->enabled || qstate->no_cache_store) {
/* we are done with the query */
qstate->ext_state[id] = module_finished;
return;
}
/* store the item into the backend cache */
cachedb_extcache_store(qstate, ie);
/* we are done with the query */
qstate->ext_state[id] = module_finished;
}
void
cachedb_operate(struct module_qstate* qstate, enum module_ev event, int id,
struct outbound_entry* outbound)
{
struct cachedb_env* ie = (struct cachedb_env*)qstate->env->modinfo[id];
struct cachedb_qstate* iq = (struct cachedb_qstate*)qstate->minfo[id];
verbose(VERB_QUERY, "cachedb[module %d] operate: extstate:%s event:%s",
id, strextstate(qstate->ext_state[id]), strmodulevent(event));
if(iq) log_query_info(VERB_QUERY, "cachedb operate: query",
&qstate->qinfo);
/* perform cachedb state machine */
if((event == module_event_new || event == module_event_pass) &&
iq == NULL) {
if(!cachedb_new(qstate, id)) {
(void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
return;
}
iq = (struct cachedb_qstate*)qstate->minfo[id];
}
if(iq && (event == module_event_pass || event == module_event_new)) {
cachedb_handle_query(qstate, iq, ie, id);
return;
}
if(iq && (event == module_event_moddone)) {
cachedb_handle_response(qstate, iq, ie, id);
return;
}
if(iq && outbound) {
/* cachedb does not need to process responses at this time
* ignore it.
cachedb_process_response(qstate, iq, ie, id, outbound, event);
*/
return;
}
if(event == module_event_error) {
verbose(VERB_ALGO, "got called with event error, giving up");
(void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
return;
}
if(!iq && (event == module_event_moddone)) {
/* during priming, module done but we never started */
qstate->ext_state[id] = module_finished;
return;
}
log_err("bad event for cachedb");
(void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
}
void
cachedb_inform_super(struct module_qstate* ATTR_UNUSED(qstate),
int ATTR_UNUSED(id), struct module_qstate* ATTR_UNUSED(super))
{
/* cachedb does not use subordinate requests at this time */
verbose(VERB_ALGO, "cachedb inform_super was called");
}
void
cachedb_clear(struct module_qstate* qstate, int id)
{
struct cachedb_qstate* iq;
if(!qstate)
return;
iq = (struct cachedb_qstate*)qstate->minfo[id];
if(iq) {
/* free contents of iq */
/* TODO */
}
qstate->minfo[id] = NULL;
}
size_t
cachedb_get_mem(struct module_env* env, int id)
{
struct cachedb_env* ie = (struct cachedb_env*)env->modinfo[id];
if(!ie)
return 0;
return sizeof(*ie); /* TODO - more mem */
}
/**
* The cachedb function block
*/
static struct module_func_block cachedb_block = {
"cachedb",
&cachedb_init, &cachedb_deinit, &cachedb_operate,
&cachedb_inform_super, &cachedb_clear, &cachedb_get_mem
};
struct module_func_block*
cachedb_get_funcblock(void)
{
return &cachedb_block;
}
#endif /* USE_CACHEDB */
+110
View File
@@ -0,0 +1,110 @@
/*
* cachedb/cachedb.h - cache from a database external to the program module
*
* Copyright (c) 2016, NLnet Labs. All rights reserved.
*
* 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 NLNET LABS 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
* HOLDER 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.
*/
/**
* \file
*
* This file contains a module that uses an external database to cache
* dns responses.
*/
#include "util/module.h"
struct cachedb_backend;
/**
* The global variable environment contents for the cachedb
* Shared between threads, this represents long term information.
* Like database connections.
*/
struct cachedb_env {
/** true is cachedb is enabled, the backend is turned on */
int enabled;
/** the backend routines */
struct cachedb_backend* backend;
/** backend specific data here */
void* backend_data;
};
/**
* Per query state for the cachedb module.
*/
struct cachedb_qstate {
int todo;
};
/**
* Backend call routines
*/
struct cachedb_backend {
/** backend name */
const char* name;
/** Init(env, cachedb_env): false on setup failure */
int (*init)(struct module_env*, struct cachedb_env*);
/** Deinit - close db for program exit */
void (*deinit)(struct module_env*, struct cachedb_env*);
/** Lookup (env, cachedb_env, key, result_buffer): true if found */
int (*lookup)(struct module_env*, struct cachedb_env*, char*,
struct sldns_buffer*);
/** Store (env, cachedb_env, key, data, data_len) */
void (*store)(struct module_env*, struct cachedb_env*, char*,
uint8_t*, size_t);
};
/** Init the cachedb module */
int cachedb_init(struct module_env* env, int id);
/** Deinit the cachedb module */
void cachedb_deinit(struct module_env* env, int id);
/** Operate on an event on a query (in qstate). */
void cachedb_operate(struct module_qstate* qstate, enum module_ev event,
int id, struct outbound_entry* outbound);
/** Subordinate query done, inform this super request of its conclusion */
void cachedb_inform_super(struct module_qstate* qstate, int id,
struct module_qstate* super);
/** clear the cachedb query-specific contents out of qstate */
void cachedb_clear(struct module_qstate* qstate, int id);
/** return memory estimate for cachedb module */
size_t cachedb_get_mem(struct module_env* env, int id);
/**
* Get the function block with pointers to the cachedb functions
* @return the function block for "cachedb".
*/
struct module_func_block* cachedb_get_funcblock(void);
+67
View File
@@ -0,0 +1,67 @@
/* arc4_lock.c - global lock for arc4random
*
* Copyright (c) 2014, NLnet Labs. All rights reserved.
*
* 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 NLNET LABS 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
* HOLDER 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"
#define LOCKRET(func) func
#include "util/locks.h"
void _ARC4_LOCK(void);
void _ARC4_UNLOCK(void);
#ifdef THREADS_DISABLED
void _ARC4_LOCK(void)
{
}
void _ARC4_UNLOCK(void)
{
}
#else /* !THREADS_DISABLED */
static lock_quick_t arc4lock;
static int arc4lockinit = 0;
void _ARC4_LOCK(void)
{
if(!arc4lockinit) {
arc4lockinit = 1;
lock_quick_init(&arc4lock);
}
lock_quick_lock(&arc4lock);
}
void _ARC4_UNLOCK(void)
{
lock_quick_unlock(&arc4lock);
}
#endif /* THREADS_DISABLED */
+236
View File
@@ -0,0 +1,236 @@
/* $OpenBSD: arc4random.c,v 1.41 2014/07/12 13:24:54 deraadt Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
* Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
/*
* ChaCha based random number generator for OpenBSD.
*/
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#ifndef UB_ON_WINDOWS
#include <sys/mman.h>
#endif
#define KEYSTREAM_ONLY
#include "chacha_private.h"
#define arc4_min(a, b) ((a) < (b) ? (a) : (b))
#ifdef __GNUC__
#define inline __inline
#else /* !__GNUC__ */
#define inline
#endif /* !__GNUC__ */
#ifndef MAP_ANON
#define MAP_ANON MAP_ANONYMOUS
#endif
#define KEYSZ 32
#define IVSZ 8
#define BLOCKSZ 64
#define RSBUFSZ (16*BLOCKSZ)
/* Marked MAP_INHERIT_ZERO, so zero'd out in fork children. */
static struct {
size_t rs_have; /* valid bytes at end of rs_buf */
size_t rs_count; /* bytes till reseed */
} *rs;
/* Preserved in fork children. */
static struct {
chacha_ctx rs_chacha; /* chacha context for random keystream */
u_char rs_buf[RSBUFSZ]; /* keystream blocks */
} *rsx;
static inline void _rs_rekey(u_char *dat, size_t datlen);
static inline void
_rs_init(u_char *buf, size_t n)
{
if (n < KEYSZ + IVSZ)
return;
if (rs == NULL) {
#ifndef UB_ON_WINDOWS
if ((rs = mmap(NULL, sizeof(*rs), PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
abort();
#ifdef MAP_INHERIT_ZERO
if (minherit(rs, sizeof(*rs), MAP_INHERIT_ZERO) == -1)
abort();
#endif
#else /* WINDOWS */
rs = malloc(sizeof(*rs));
if(!rs)
abort();
#endif
}
if (rsx == NULL) {
#ifndef UB_ON_WINDOWS
if ((rsx = mmap(NULL, sizeof(*rsx), PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
abort();
#else /* WINDOWS */
rsx = malloc(sizeof(*rsx));
if(!rsx)
abort();
#endif
}
chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0);
chacha_ivsetup(&rsx->rs_chacha, buf + KEYSZ);
}
static void
_rs_stir(void)
{
u_char rnd[KEYSZ + IVSZ];
if (getentropy(rnd, sizeof rnd) == -1) {
#ifdef SIGKILL
raise(SIGKILL);
#else
exit(9); /* windows */
#endif
}
if (!rs)
_rs_init(rnd, sizeof(rnd));
else
_rs_rekey(rnd, sizeof(rnd));
explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */
/* invalidate rs_buf */
rs->rs_have = 0;
memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf));
rs->rs_count = 1600000;
}
static inline void
_rs_stir_if_needed(size_t len)
{
#ifndef MAP_INHERIT_ZERO
static pid_t _rs_pid = 0;
pid_t pid = getpid();
/* If a system lacks MAP_INHERIT_ZERO, resort to getpid() */
if (_rs_pid == 0 || _rs_pid != pid) {
_rs_pid = pid;
if (rs)
rs->rs_count = 0;
}
#endif
if (!rs || rs->rs_count <= len)
_rs_stir();
if (rs->rs_count <= len)
rs->rs_count = 0;
else
rs->rs_count -= len;
}
static inline void
_rs_rekey(u_char *dat, size_t datlen)
{
#ifndef KEYSTREAM_ONLY
memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf));
#endif
/* fill rs_buf with the keystream */
chacha_encrypt_bytes(&rsx->rs_chacha, rsx->rs_buf,
rsx->rs_buf, sizeof(rsx->rs_buf));
/* mix in optional user provided data */
if (dat) {
size_t i, m;
m = arc4_min(datlen, KEYSZ + IVSZ);
for (i = 0; i < m; i++)
rsx->rs_buf[i] ^= dat[i];
}
/* immediately reinit for backtracking resistance */
_rs_init(rsx->rs_buf, KEYSZ + IVSZ);
memset(rsx->rs_buf, 0, KEYSZ + IVSZ);
rs->rs_have = sizeof(rsx->rs_buf) - KEYSZ - IVSZ;
}
static inline void
_rs_random_buf(void *_buf, size_t n)
{
u_char *buf = (u_char *)_buf;
u_char *keystream;
size_t m;
_rs_stir_if_needed(n);
while (n > 0) {
if (rs->rs_have > 0) {
m = arc4_min(n, rs->rs_have);
keystream = rsx->rs_buf + sizeof(rsx->rs_buf)
- rs->rs_have;
memcpy(buf, keystream, m);
memset(keystream, 0, m);
buf += m;
n -= m;
rs->rs_have -= m;
}
if (rs->rs_have == 0)
_rs_rekey(NULL, 0);
}
}
static inline void
_rs_random_u32(uint32_t *val)
{
u_char *keystream;
_rs_stir_if_needed(sizeof(*val));
if (rs->rs_have < sizeof(*val))
_rs_rekey(NULL, 0);
keystream = rsx->rs_buf + sizeof(rsx->rs_buf) - rs->rs_have;
memcpy(val, keystream, sizeof(*val));
memset(keystream, 0, sizeof(*val));
rs->rs_have -= sizeof(*val);
}
uint32_t
arc4random(void)
{
uint32_t val;
_ARC4_LOCK();
_rs_random_u32(&val);
_ARC4_UNLOCK();
return val;
}
void
arc4random_buf(void *buf, size_t n)
{
_ARC4_LOCK();
_rs_random_buf(buf, n);
_ARC4_UNLOCK();
}
+57
View File
@@ -0,0 +1,57 @@
/* $OpenBSD: arc4random_uniform.c,v 1.1 2014/07/12 13:24:54 deraadt Exp $ */
/*
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <sys/types.h>
#include <stdlib.h>
/*
* Calculate a uniformly distributed random number less than upper_bound
* avoiding "modulo bias".
*
* Uniformity is achieved by generating new random numbers until the one
* returned is outside the range [0, 2**32 % upper_bound). This
* guarantees the selected random number will be inside
* [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
* after reduction modulo upper_bound.
*/
uint32_t
arc4random_uniform(uint32_t upper_bound)
{
uint32_t r, min;
if (upper_bound < 2)
return 0;
/* 2**32 % x == (2**32 - x) % x */
min = -upper_bound % upper_bound;
/*
* This could theoretically loop forever but each retry has
* p > 0.5 (worst case, usually far better) of selecting a
* number inside the range we need, so it should rarely need
* to re-roll.
*/
for (;;) {
r = arc4random();
if (r >= min)
break;
}
return r % upper_bound;
}
+222
View File
@@ -0,0 +1,222 @@
/*
chacha-merged.c version 20080118
D. J. Bernstein
Public domain.
*/
/* $OpenBSD: chacha_private.h,v 1.2 2013/10/04 07:02:27 djm Exp $ */
typedef unsigned char u8;
typedef unsigned int u32;
typedef struct
{
u32 input[16]; /* could be compressed */
} chacha_ctx;
#define U8C(v) (v##U)
#define U32C(v) (v##U)
#define U8V(v) ((u8)(v) & U8C(0xFF))
#define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF))
#define ROTL32(v, n) \
(U32V((v) << (n)) | ((v) >> (32 - (n))))
#define U8TO32_LITTLE(p) \
(((u32)((p)[0]) ) | \
((u32)((p)[1]) << 8) | \
((u32)((p)[2]) << 16) | \
((u32)((p)[3]) << 24))
#define U32TO8_LITTLE(p, v) \
do { \
(p)[0] = U8V((v) ); \
(p)[1] = U8V((v) >> 8); \
(p)[2] = U8V((v) >> 16); \
(p)[3] = U8V((v) >> 24); \
} while (0)
#define ROTATE(v,c) (ROTL32(v,c))
#define XOR(v,w) ((v) ^ (w))
#define PLUS(v,w) (U32V((v) + (w)))
#define PLUSONE(v) (PLUS((v),1))
#define QUARTERROUND(a,b,c,d) \
a = PLUS(a,b); d = ROTATE(XOR(d,a),16); \
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
static const char sigma[16] = "expand 32-byte k";
static const char tau[16] = "expand 16-byte k";
static void
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits,u32 ATTR_UNUSED(ivbits))
{
const char *constants;
x->input[4] = U8TO32_LITTLE(k + 0);
x->input[5] = U8TO32_LITTLE(k + 4);
x->input[6] = U8TO32_LITTLE(k + 8);
x->input[7] = U8TO32_LITTLE(k + 12);
if (kbits == 256) { /* recommended */
k += 16;
constants = sigma;
} else { /* kbits == 128 */
constants = tau;
}
x->input[8] = U8TO32_LITTLE(k + 0);
x->input[9] = U8TO32_LITTLE(k + 4);
x->input[10] = U8TO32_LITTLE(k + 8);
x->input[11] = U8TO32_LITTLE(k + 12);
x->input[0] = U8TO32_LITTLE(constants + 0);
x->input[1] = U8TO32_LITTLE(constants + 4);
x->input[2] = U8TO32_LITTLE(constants + 8);
x->input[3] = U8TO32_LITTLE(constants + 12);
}
static void
chacha_ivsetup(chacha_ctx *x,const u8 *iv)
{
x->input[12] = 0;
x->input[13] = 0;
x->input[14] = U8TO32_LITTLE(iv + 0);
x->input[15] = U8TO32_LITTLE(iv + 4);
}
static void
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
{
u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
u8 *ctarget = NULL;
u8 tmp[64];
u_int i;
if (!bytes) return;
j0 = x->input[0];
j1 = x->input[1];
j2 = x->input[2];
j3 = x->input[3];
j4 = x->input[4];
j5 = x->input[5];
j6 = x->input[6];
j7 = x->input[7];
j8 = x->input[8];
j9 = x->input[9];
j10 = x->input[10];
j11 = x->input[11];
j12 = x->input[12];
j13 = x->input[13];
j14 = x->input[14];
j15 = x->input[15];
for (;;) {
if (bytes < 64) {
for (i = 0;i < bytes;++i) tmp[i] = m[i];
m = tmp;
ctarget = c;
c = tmp;
}
x0 = j0;
x1 = j1;
x2 = j2;
x3 = j3;
x4 = j4;
x5 = j5;
x6 = j6;
x7 = j7;
x8 = j8;
x9 = j9;
x10 = j10;
x11 = j11;
x12 = j12;
x13 = j13;
x14 = j14;
x15 = j15;
for (i = 20;i > 0;i -= 2) {
QUARTERROUND( x0, x4, x8,x12)
QUARTERROUND( x1, x5, x9,x13)
QUARTERROUND( x2, x6,x10,x14)
QUARTERROUND( x3, x7,x11,x15)
QUARTERROUND( x0, x5,x10,x15)
QUARTERROUND( x1, x6,x11,x12)
QUARTERROUND( x2, x7, x8,x13)
QUARTERROUND( x3, x4, x9,x14)
}
x0 = PLUS(x0,j0);
x1 = PLUS(x1,j1);
x2 = PLUS(x2,j2);
x3 = PLUS(x3,j3);
x4 = PLUS(x4,j4);
x5 = PLUS(x5,j5);
x6 = PLUS(x6,j6);
x7 = PLUS(x7,j7);
x8 = PLUS(x8,j8);
x9 = PLUS(x9,j9);
x10 = PLUS(x10,j10);
x11 = PLUS(x11,j11);
x12 = PLUS(x12,j12);
x13 = PLUS(x13,j13);
x14 = PLUS(x14,j14);
x15 = PLUS(x15,j15);
#ifndef KEYSTREAM_ONLY
x0 = XOR(x0,U8TO32_LITTLE(m + 0));
x1 = XOR(x1,U8TO32_LITTLE(m + 4));
x2 = XOR(x2,U8TO32_LITTLE(m + 8));
x3 = XOR(x3,U8TO32_LITTLE(m + 12));
x4 = XOR(x4,U8TO32_LITTLE(m + 16));
x5 = XOR(x5,U8TO32_LITTLE(m + 20));
x6 = XOR(x6,U8TO32_LITTLE(m + 24));
x7 = XOR(x7,U8TO32_LITTLE(m + 28));
x8 = XOR(x8,U8TO32_LITTLE(m + 32));
x9 = XOR(x9,U8TO32_LITTLE(m + 36));
x10 = XOR(x10,U8TO32_LITTLE(m + 40));
x11 = XOR(x11,U8TO32_LITTLE(m + 44));
x12 = XOR(x12,U8TO32_LITTLE(m + 48));
x13 = XOR(x13,U8TO32_LITTLE(m + 52));
x14 = XOR(x14,U8TO32_LITTLE(m + 56));
x15 = XOR(x15,U8TO32_LITTLE(m + 60));
#endif
j12 = PLUSONE(j12);
if (!j12) {
j13 = PLUSONE(j13);
/* stopping at 2^70 bytes per nonce is user's responsibility */
}
U32TO8_LITTLE(c + 0,x0);
U32TO8_LITTLE(c + 4,x1);
U32TO8_LITTLE(c + 8,x2);
U32TO8_LITTLE(c + 12,x3);
U32TO8_LITTLE(c + 16,x4);
U32TO8_LITTLE(c + 20,x5);
U32TO8_LITTLE(c + 24,x6);
U32TO8_LITTLE(c + 28,x7);
U32TO8_LITTLE(c + 32,x8);
U32TO8_LITTLE(c + 36,x9);
U32TO8_LITTLE(c + 40,x10);
U32TO8_LITTLE(c + 44,x11);
U32TO8_LITTLE(c + 48,x12);
U32TO8_LITTLE(c + 52,x13);
U32TO8_LITTLE(c + 56,x14);
U32TO8_LITTLE(c + 60,x15);
if (bytes <= 64) {
if (bytes < 64) {
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
}
x->input[12] = j12;
x->input[13] = j13;
return;
}
bytes -= 64;
c += 64;
#ifndef KEYSTREAM_ONLY
m += 64;
#endif
}
}
+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;
}
+26
View File
@@ -0,0 +1,26 @@
/* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */
/*
* Public domain.
* Written by Matthew Dempsky.
*/
#include "config.h"
#include <string.h>
#ifdef HAVE_ATTR_WEAK
__attribute__((weak)) void
#else
void
#endif
__explicit_bzero_hook(void *ATTR_UNUSED(buf), size_t ATTR_UNUSED(len))
{
}
void
explicit_bzero(void *buf, size_t len)
{
#ifdef UB_ON_WINDOWS
SecureZeroMemory(buf, len);
#endif
memset(buf, 0, len);
__explicit_bzero_hook(buf, len);
}
+1 -3
View File
@@ -120,12 +120,10 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
{
struct addrinfo *ai;
ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
ai = calloc(1, sizeof(*ai) + sizeof(struct sockaddr_in));
if (ai == NULL)
return (NULL);
memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
ai->ai_addr = (struct sockaddr *)(ai + 1);
/* XXX -- ssh doesn't use sa_len */
ai->ai_addrlen = sizeof(struct sockaddr_in);
+560
View File
@@ -0,0 +1,560 @@
/* $OpenBSD: getentropy_linux.c,v 1.20 2014/07/12 15:43:49 beck Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
* Copyright (c) 2014 Bob Beck <beck@obtuse.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
/*
#define _POSIX_C_SOURCE 199309L
#define _GNU_SOURCE 1
*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
#include <sys/statvfs.h>
#include <sys/socket.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#if defined(HAVE_SSL)
#include <openssl/sha.h>
#elif defined(HAVE_NETTLE)
#include <nettle/sha.h>
#endif
#include <linux/types.h>
#include <linux/random.h>
#include <linux/sysctl.h>
#ifdef HAVE_GETAUXVAL
#include <sys/auxv.h>
#endif
#include <sys/vfs.h>
#ifndef MAP_ANON
#define MAP_ANON MAP_ANONYMOUS
#endif
#define REPEAT 5
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define HX(a, b) \
do { \
if ((a)) \
HD(errno); \
else \
HD(b); \
} while (0)
#if defined(HAVE_SSL)
#define CRYPTO_SHA512_CTX SHA512_CTX
#define CRYPTO_SHA512_INIT(x) SHA512_Init(x)
#define CRYPTO_SHA512_FINAL(r, c) SHA512_Final(r, c)
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
#elif defined(HAVE_NETTLE)
#define CRYPTO_SHA512_CTX struct sha512_ctx
#define CRYPTO_SHA512_INIT(x) sha512_init(x)
#define CRYPTO_SHA512_FINAL(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r)
#define HR(x, l) (sha512_update(&ctx, (l), (uint8_t *)(x)))
#define HD(x) (sha512_update(&ctx, sizeof (x), (uint8_t *)&(x)))
#define HF(x) (sha512_update(&ctx, sizeof (void*), (uint8_t *)&(x)))
#endif
int getentropy(void *buf, size_t len);
#ifdef CAN_REFERENCE_MAIN
extern int main(int, char *argv[]);
#endif
static int gotdata(char *buf, size_t len);
#if defined(SYS_getrandom) && defined(__NR_getrandom)
static int getentropy_getrandom(void *buf, size_t len);
#endif
static int getentropy_urandom(void *buf, size_t len);
#ifdef SYS__sysctl
static int getentropy_sysctl(void *buf, size_t len);
#endif
static int getentropy_fallback(void *buf, size_t len);
int
getentropy(void *buf, size_t len)
{
int ret = -1;
if (len > 256) {
errno = EIO;
return -1;
}
#if defined(SYS_getrandom) && defined(__NR_getrandom)
/*
* Try descriptor-less getrandom()
*/
ret = getentropy_getrandom(buf, len);
if (ret != -1)
return (ret);
if (errno != ENOSYS)
return (-1);
#endif
/*
* Try to get entropy with /dev/urandom
*
* This can fail if the process is inside a chroot or if file
* descriptors are exhausted.
*/
ret = getentropy_urandom(buf, len);
if (ret != -1)
return (ret);
#ifdef SYS__sysctl
/*
* Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID.
* sysctl is a failsafe API, so it guarantees a result. This
* should work inside a chroot, or when file descriptors are
* exhausted.
*
* However this can fail if the Linux kernel removes support
* for sysctl. Starting in 2007, there have been efforts to
* deprecate the sysctl API/ABI, and push callers towards use
* of the chroot-unavailable fd-using /proc mechanism --
* essentially the same problems as /dev/urandom.
*
* Numerous setbacks have been encountered in their deprecation
* schedule, so as of June 2014 the kernel ABI still exists on
* most Linux architectures. The sysctl() stub in libc is missing
* on some systems. There are also reports that some kernels
* spew messages to the console.
*/
ret = getentropy_sysctl(buf, len);
if (ret != -1)
return (ret);
#endif /* SYS__sysctl */
/*
* Entropy collection via /dev/urandom and sysctl have failed.
*
* No other API exists for collecting entropy. See the large
* comment block above.
*
* We have very few options:
* - Even syslog_r is unsafe to call at this low level, so
* there is no way to alert the user or program.
* - Cannot call abort() because some systems have unsafe
* corefiles.
* - Could raise(SIGKILL) resulting in silent program termination.
* - Return EIO, to hint that arc4random's stir function
* should raise(SIGKILL)
* - Do the best under the circumstances....
*
* This code path exists to bring light to the issue that Linux
* does not provide a failsafe API for entropy collection.
*
* We hope this demonstrates that Linux should either retain their
* sysctl ABI, or consider providing a new failsafe API which
* works in a chroot or when file descriptors are exhausted.
*/
#undef FAIL_INSTEAD_OF_TRYING_FALLBACK
#ifdef FAIL_INSTEAD_OF_TRYING_FALLBACK
raise(SIGKILL);
#endif
ret = getentropy_fallback(buf, len);
if (ret != -1)
return (ret);
errno = EIO;
return (ret);
}
/*
* Basic sanity checking; wish we could do better.
*/
static int
gotdata(char *buf, size_t len)
{
char any_set = 0;
size_t i;
for (i = 0; i < len; ++i)
any_set |= buf[i];
if (any_set == 0)
return -1;
return 0;
}
#if defined(SYS_getrandom) && defined(__NR_getrandom)
static int
getentropy_getrandom(void *buf, size_t len)
{
int pre_errno = errno;
int ret;
if (len > 256)
return (-1);
do {
ret = syscall(SYS_getrandom, buf, len, 0);
} while (ret == -1 && errno == EINTR);
if (ret != (int)len)
return (-1);
errno = pre_errno;
return (0);
}
#endif
static int
getentropy_urandom(void *buf, size_t len)
{
struct stat st;
size_t i;
int fd, cnt, flags;
int save_errno = errno;
start:
flags = O_RDONLY;
#ifdef O_NOFOLLOW
flags |= O_NOFOLLOW;
#endif
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
fd = open("/dev/urandom", flags, 0);
if (fd == -1) {
if (errno == EINTR)
goto start;
goto nodevrandom;
}
#ifndef O_CLOEXEC
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
#endif
/* Lightly verify that the device node looks sane */
if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode)) {
close(fd);
goto nodevrandom;
}
if (ioctl(fd, RNDGETENTCNT, &cnt) == -1) {
close(fd);
goto nodevrandom;
}
for (i = 0; i < len; ) {
size_t wanted = len - i;
ssize_t ret = read(fd, (char*)buf + i, wanted);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR)
continue;
close(fd);
goto nodevrandom;
}
i += ret;
}
close(fd);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
nodevrandom:
errno = EIO;
return -1;
}
#ifdef SYS__sysctl
static int
getentropy_sysctl(void *buf, size_t len)
{
static int mib[] = { CTL_KERN, KERN_RANDOM, RANDOM_UUID };
size_t i;
int save_errno = errno;
for (i = 0; i < len; ) {
size_t chunk = min(len - i, 16);
/* SYS__sysctl because some systems already removed sysctl() */
struct __sysctl_args args = {
.name = mib,
.nlen = 3,
.oldval = (char *)buf + i,
.oldlenp = &chunk,
};
if (syscall(SYS__sysctl, &args) != 0)
goto sysctlfailed;
i += chunk;
}
if (gotdata(buf, len) == 0) {
errno = save_errno;
return (0); /* satisfied */
}
sysctlfailed:
errno = EIO;
return -1;
}
#endif /* SYS__sysctl */
static int cl[] = {
CLOCK_REALTIME,
#ifdef CLOCK_MONOTONIC
CLOCK_MONOTONIC,
#endif
#ifdef CLOCK_MONOTONIC_RAW
CLOCK_MONOTONIC_RAW,
#endif
#ifdef CLOCK_TAI
CLOCK_TAI,
#endif
#ifdef CLOCK_VIRTUAL
CLOCK_VIRTUAL,
#endif
#ifdef CLOCK_UPTIME
CLOCK_UPTIME,
#endif
#ifdef CLOCK_PROCESS_CPUTIME_ID
CLOCK_PROCESS_CPUTIME_ID,
#endif
#ifdef CLOCK_THREAD_CPUTIME_ID
CLOCK_THREAD_CPUTIME_ID,
#endif
};
static int
getentropy_fallback(void *buf, size_t len)
{
uint8_t results[SHA512_DIGEST_LENGTH];
int save_errno = errno, e, pgs = getpagesize(), faster = 0, repeat;
static int cnt;
struct timespec ts;
struct timeval tv;
struct rusage ru;
sigset_t sigset;
struct stat st;
CRYPTO_SHA512_CTX ctx;
static pid_t lastpid;
pid_t pid;
size_t i, ii, m;
char *p;
pid = getpid();
if (lastpid == pid) {
faster = 1;
repeat = 2;
} else {
faster = 0;
lastpid = pid;
repeat = REPEAT;
}
for (i = 0; i < len; ) {
int j;
CRYPTO_SHA512_INIT(&ctx);
for (j = 0; j < repeat; j++) {
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]); ii++)
HX(clock_gettime(cl[ii], &ts) == -1, ts);
HX((pid = getpid()) == -1, pid);
HX((pid = getsid(pid)) == -1, pid);
HX((pid = getppid()) == -1, pid);
HX((pid = getpgid(0)) == -1, pid);
HX((e = getpriority(0, 0)) == -1, e);
if (!faster) {
ts.tv_sec = 0;
ts.tv_nsec = 1;
(void) nanosleep(&ts, NULL);
}
HX(sigpending(&sigset) == -1, sigset);
HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
sigset);
#ifdef CAN_REFERENCE_MAIN
HF(main); /* an addr in program */
#endif
HF(getentropy); /* an addr in this library */
HF(printf); /* an addr in libc */
p = (char *)&p;
HD(p); /* an addr on stack */
p = (char *)&errno;
HD(p); /* the addr of errno */
if (i == 0) {
struct sockaddr_storage ss;
struct statvfs stvfs;
struct termios tios;
struct statfs stfs;
socklen_t ssl;
off_t off;
/*
* Prime-sized mappings encourage fragmentation;
* thus exposing some address entropy.
*/
struct mm {
size_t npg;
void *p;
} mm[] = {
{ 17, MAP_FAILED }, { 3, MAP_FAILED },
{ 11, MAP_FAILED }, { 2, MAP_FAILED },
{ 5, MAP_FAILED }, { 3, MAP_FAILED },
{ 7, MAP_FAILED }, { 1, MAP_FAILED },
{ 57, MAP_FAILED }, { 3, MAP_FAILED },
{ 131, MAP_FAILED }, { 1, MAP_FAILED },
};
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
HX(mm[m].p = mmap(NULL,
mm[m].npg * pgs,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1,
(off_t)0), mm[m].p);
if (mm[m].p != MAP_FAILED) {
size_t mo;
/* Touch some memory... */
p = mm[m].p;
mo = cnt %
(mm[m].npg * pgs - 1);
p[mo] = 1;
cnt += (int)((long)(mm[m].p)
/ pgs);
}
/* Check cnts and times... */
for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]);
ii++) {
HX((e = clock_gettime(cl[ii],
&ts)) == -1, ts);
if (e != -1)
cnt += (int)ts.tv_nsec;
}
HX((e = getrusage(RUSAGE_SELF,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
}
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
if (mm[m].p != MAP_FAILED)
munmap(mm[m].p, mm[m].npg * pgs);
mm[m].p = MAP_FAILED;
}
HX(stat(".", &st) == -1, st);
HX(statvfs(".", &stvfs) == -1, stvfs);
HX(statfs(".", &stfs) == -1, stfs);
HX(stat("/", &st) == -1, st);
HX(statvfs("/", &stvfs) == -1, stvfs);
HX(statfs("/", &stfs) == -1, stfs);
HX((e = fstat(0, &st)) == -1, st);
if (e == -1) {
if (S_ISREG(st.st_mode) ||
S_ISFIFO(st.st_mode) ||
S_ISSOCK(st.st_mode)) {
HX(fstatvfs(0, &stvfs) == -1,
stvfs);
HX(fstatfs(0, &stfs) == -1,
stfs);
HX((off = lseek(0, (off_t)0,
SEEK_CUR)) < 0, off);
}
if (S_ISCHR(st.st_mode)) {
HX(tcgetattr(0, &tios) == -1,
tios);
} else if (S_ISSOCK(st.st_mode)) {
memset(&ss, 0, sizeof ss);
ssl = sizeof(ss);
HX(getpeername(0,
(void *)&ss, &ssl) == -1,
ss);
}
}
HX((e = getrusage(RUSAGE_CHILDREN,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
} else {
/* Subsequent hashes absorb previous result */
HD(results);
}
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
HD(cnt);
}
#ifdef HAVE_GETAUXVAL
# ifdef AT_RANDOM
/* Not as random as you think but we take what we are given */
p = (char *) getauxval(AT_RANDOM);
if (p)
HR(p, 16);
# endif
# ifdef AT_SYSINFO_EHDR
p = (char *) getauxval(AT_SYSINFO_EHDR);
if (p)
HR(p, pgs);
# endif
# ifdef AT_BASE
p = (char *) getauxval(AT_BASE);
if (p)
HD(p);
# endif
#endif /* HAVE_GETAUXVAL */
CRYPTO_SHA512_FINAL(results, &ctx);
memcpy((char*)buf + i, results, min(sizeof(results), len - i));
i += min(sizeof(results), len - i);
}
memset(results, 0, sizeof results);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
errno = EIO;
return -1;
}
+432
View File
@@ -0,0 +1,432 @@
/* $OpenBSD: getentropy_osx.c,v 1.3 2014/07/12 14:48:00 deraadt Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
* Copyright (c) 2014 Bob Beck <beck@obtuse.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/sysctl.h>
#include <sys/statvfs.h>
#include <sys/socket.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include <mach/mach_time.h>
#include <mach/mach_host.h>
#include <mach/host_info.h>
#include <sys/socketvar.h>
#include <sys/vmmeter.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <netinet/ip_var.h>
#include <netinet/tcp_var.h>
#include <netinet/udp_var.h>
#include <CommonCrypto/CommonDigest.h>
#define SHA512_Update(a, b, c) (CC_SHA512_Update((a), (b), (c)))
#define SHA512_Init(xxx) (CC_SHA512_Init((xxx)))
#define SHA512_Final(xxx, yyy) (CC_SHA512_Final((xxx), (yyy)))
#define SHA512_CTX CC_SHA512_CTX
#define SHA512_DIGEST_LENGTH CC_SHA512_DIGEST_LENGTH
#define REPEAT 5
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define HX(a, b) \
do { \
if ((a)) \
HD(errno); \
else \
HD(b); \
} while (0)
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
int getentropy(void *buf, size_t len);
#ifdef CAN_REFERENCE_MAIN
extern int main(int, char *argv[]);
#endif
static int gotdata(char *buf, size_t len);
static int getentropy_urandom(void *buf, size_t len);
static int getentropy_fallback(void *buf, size_t len);
int
getentropy(void *buf, size_t len)
{
int ret = -1;
if (len > 256) {
errno = EIO;
return -1;
}
/*
* Try to get entropy with /dev/urandom
*
* This can fail if the process is inside a chroot or if file
* descriptors are exhausted.
*/
ret = getentropy_urandom(buf, len);
if (ret != -1)
return (ret);
/*
* Entropy collection via /dev/urandom and sysctl have failed.
*
* No other API exists for collecting entropy, and we have
* no failsafe way to get it on OSX that is not sensitive
* to resource exhaustion.
*
* We have very few options:
* - Even syslog_r is unsafe to call at this low level, so
* there is no way to alert the user or program.
* - Cannot call abort() because some systems have unsafe
* corefiles.
* - Could raise(SIGKILL) resulting in silent program termination.
* - Return EIO, to hint that arc4random's stir function
* should raise(SIGKILL)
* - Do the best under the circumstances....
*
* This code path exists to bring light to the issue that OSX
* does not provide a failsafe API for entropy collection.
*
* We hope this demonstrates that OSX should consider
* providing a new failsafe API which works in a chroot or
* when file descriptors are exhausted.
*/
#undef FAIL_INSTEAD_OF_TRYING_FALLBACK
#ifdef FAIL_INSTEAD_OF_TRYING_FALLBACK
raise(SIGKILL);
#endif
ret = getentropy_fallback(buf, len);
if (ret != -1)
return (ret);
errno = EIO;
return (ret);
}
/*
* Basic sanity checking; wish we could do better.
*/
static int
gotdata(char *buf, size_t len)
{
char any_set = 0;
size_t i;
for (i = 0; i < len; ++i)
any_set |= buf[i];
if (any_set == 0)
return -1;
return 0;
}
static int
getentropy_urandom(void *buf, size_t len)
{
struct stat st;
size_t i;
int fd, flags;
int save_errno = errno;
start:
flags = O_RDONLY;
#ifdef O_NOFOLLOW
flags |= O_NOFOLLOW;
#endif
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
fd = open("/dev/urandom", flags, 0);
if (fd == -1) {
if (errno == EINTR)
goto start;
goto nodevrandom;
}
#ifndef O_CLOEXEC
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
#endif
/* Lightly verify that the device node looks sane */
if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode)) {
close(fd);
goto nodevrandom;
}
for (i = 0; i < len; ) {
size_t wanted = len - i;
ssize_t ret = read(fd, (char*)buf + i, wanted);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR)
continue;
close(fd);
goto nodevrandom;
}
i += ret;
}
close(fd);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
nodevrandom:
errno = EIO;
return -1;
}
static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS };
static int udpmib[] = { CTL_NET, AF_INET, IPPROTO_UDP, UDPCTL_STATS };
static int ipmib[] = { CTL_NET, AF_INET, IPPROTO_IP, IPCTL_STATS };
static int kmib[] = { CTL_KERN, KERN_USRSTACK };
static int hwmib[] = { CTL_HW, HW_USERMEM };
static int
getentropy_fallback(void *buf, size_t len)
{
uint8_t results[SHA512_DIGEST_LENGTH];
int save_errno = errno, e, pgs = getpagesize(), faster = 0, repeat;
static int cnt;
struct timespec ts;
struct timeval tv;
struct rusage ru;
sigset_t sigset;
struct stat st;
SHA512_CTX ctx;
static pid_t lastpid;
pid_t pid;
size_t i, ii, m;
char *p;
struct tcpstat tcpstat;
struct udpstat udpstat;
struct ipstat ipstat;
u_int64_t mach_time;
unsigned int idata;
void *addr;
pid = getpid();
if (lastpid == pid) {
faster = 1;
repeat = 2;
} else {
faster = 0;
lastpid = pid;
repeat = REPEAT;
}
for (i = 0; i < len; ) {
int j;
SHA512_Init(&ctx);
for (j = 0; j < repeat; j++) {
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
mach_time = mach_absolute_time();
HD(mach_time);
ii = sizeof(addr);
HX(sysctl(kmib, sizeof(kmib) / sizeof(kmib[0]),
&addr, &ii, NULL, 0) == -1, addr);
ii = sizeof(idata);
HX(sysctl(hwmib, sizeof(hwmib) / sizeof(hwmib[0]),
&idata, &ii, NULL, 0) == -1, idata);
ii = sizeof(tcpstat);
HX(sysctl(tcpmib, sizeof(tcpmib) / sizeof(tcpmib[0]),
&tcpstat, &ii, NULL, 0) == -1, tcpstat);
ii = sizeof(udpstat);
HX(sysctl(udpmib, sizeof(udpmib) / sizeof(udpmib[0]),
&udpstat, &ii, NULL, 0) == -1, udpstat);
ii = sizeof(ipstat);
HX(sysctl(ipmib, sizeof(ipmib) / sizeof(ipmib[0]),
&ipstat, &ii, NULL, 0) == -1, ipstat);
HX((pid = getpid()) == -1, pid);
HX((pid = getsid(pid)) == -1, pid);
HX((pid = getppid()) == -1, pid);
HX((pid = getpgid(0)) == -1, pid);
HX((e = getpriority(0, 0)) == -1, e);
if (!faster) {
ts.tv_sec = 0;
ts.tv_nsec = 1;
(void) nanosleep(&ts, NULL);
}
HX(sigpending(&sigset) == -1, sigset);
HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
sigset);
#ifdef CAN_REFERENCE_MAIN
HF(main); /* an addr in program */
#endif
HF(getentropy); /* an addr in this library */
HF(printf); /* an addr in libc */
p = (char *)&p;
HD(p); /* an addr on stack */
p = (char *)&errno;
HD(p); /* the addr of errno */
if (i == 0) {
struct sockaddr_storage ss;
struct statvfs stvfs;
struct termios tios;
struct statfs stfs;
socklen_t ssl;
off_t off;
/*
* Prime-sized mappings encourage fragmentation;
* thus exposing some address entropy.
*/
struct mm {
size_t npg;
void *p;
} mm[] = {
{ 17, MAP_FAILED }, { 3, MAP_FAILED },
{ 11, MAP_FAILED }, { 2, MAP_FAILED },
{ 5, MAP_FAILED }, { 3, MAP_FAILED },
{ 7, MAP_FAILED }, { 1, MAP_FAILED },
{ 57, MAP_FAILED }, { 3, MAP_FAILED },
{ 131, MAP_FAILED }, { 1, MAP_FAILED },
};
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
HX(mm[m].p = mmap(NULL,
mm[m].npg * pgs,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1,
(off_t)0), mm[m].p);
if (mm[m].p != MAP_FAILED) {
size_t mo;
/* Touch some memory... */
p = mm[m].p;
mo = cnt %
(mm[m].npg * pgs - 1);
p[mo] = 1;
cnt += (int)((long)(mm[m].p)
/ pgs);
}
/* Check cnts and times... */
mach_time = mach_absolute_time();
HD(mach_time);
cnt += (int)mach_time;
HX((e = getrusage(RUSAGE_SELF,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
}
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
if (mm[m].p != MAP_FAILED)
munmap(mm[m].p, mm[m].npg * pgs);
mm[m].p = MAP_FAILED;
}
HX(stat(".", &st) == -1, st);
HX(statvfs(".", &stvfs) == -1, stvfs);
HX(statfs(".", &stfs) == -1, stfs);
HX(stat("/", &st) == -1, st);
HX(statvfs("/", &stvfs) == -1, stvfs);
HX(statfs("/", &stfs) == -1, stfs);
HX((e = fstat(0, &st)) == -1, st);
if (e == -1) {
if (S_ISREG(st.st_mode) ||
S_ISFIFO(st.st_mode) ||
S_ISSOCK(st.st_mode)) {
HX(fstatvfs(0, &stvfs) == -1,
stvfs);
HX(fstatfs(0, &stfs) == -1,
stfs);
HX((off = lseek(0, (off_t)0,
SEEK_CUR)) < 0, off);
}
if (S_ISCHR(st.st_mode)) {
HX(tcgetattr(0, &tios) == -1,
tios);
} else if (S_ISSOCK(st.st_mode)) {
memset(&ss, 0, sizeof ss);
ssl = sizeof(ss);
HX(getpeername(0,
(void *)&ss, &ssl) == -1,
ss);
}
}
HX((e = getrusage(RUSAGE_CHILDREN,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
} else {
/* Subsequent hashes absorb previous result */
HD(results);
}
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
HD(cnt);
}
SHA512_Final(results, &ctx);
memcpy((char*)buf + i, results, min(sizeof(results), len - i));
i += min(sizeof(results), len - i);
}
memset(results, 0, sizeof results);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
errno = EIO;
return -1;
}
+441
View File
@@ -0,0 +1,441 @@
/* $OpenBSD: getentropy_solaris.c,v 1.3 2014/07/12 14:46:31 deraadt Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
* Copyright (c) 2014 Bob Beck <beck@obtuse.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/statvfs.h>
#include <sys/socket.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdlib.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#ifdef HAVE_SYS_SHA2_H
#include <sys/sha2.h>
#define SHA512_Init SHA512Init
#define SHA512_Update SHA512Update
#define SHA512_Final SHA512Final
#else
#include "openssl/sha.h"
#endif
#include <sys/vfs.h>
#include <sys/statfs.h>
#include <sys/loadavg.h>
#define REPEAT 5
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define HX(a, b) \
do { \
if ((a)) \
HD(errno); \
else \
HD(b); \
} while (0)
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
int getentropy(void *buf, size_t len);
#ifdef CAN_REFERENCE_MAIN
extern int main(int, char *argv[]);
#endif
static int gotdata(char *buf, size_t len);
static int getentropy_urandom(void *buf, size_t len, const char *path,
int devfscheck);
static int getentropy_fallback(void *buf, size_t len);
int
getentropy(void *buf, size_t len)
{
int ret = -1;
if (len > 256) {
errno = EIO;
return -1;
}
/*
* Try to get entropy with /dev/urandom
*
* Solaris provides /dev/urandom as a symbolic link to
* /devices/pseudo/random@0:urandom which is provided by
* a devfs filesystem. Best practice is to use O_NOFOLLOW,
* so we must try the unpublished name directly.
*
* This can fail if the process is inside a chroot which lacks
* the devfs mount, or if file descriptors are exhausted.
*/
ret = getentropy_urandom(buf, len,
"/devices/pseudo/random@0:urandom", 1);
if (ret != -1)
return (ret);
/*
* Unfortunately, chroot spaces on Solaris are sometimes setup
* with direct device node of the well-known /dev/urandom name
* (perhaps to avoid dragging all of devfs into the space).
*
* This can fail if the process is inside a chroot or if file
* descriptors are exhausted.
*/
ret = getentropy_urandom(buf, len, "/dev/urandom", 0);
if (ret != -1)
return (ret);
/*
* Entropy collection via /dev/urandom has failed.
*
* No other API exists for collecting entropy, and we have
* no failsafe way to get it on Solaris that is not sensitive
* to resource exhaustion.
*
* We have very few options:
* - Even syslog_r is unsafe to call at this low level, so
* there is no way to alert the user or program.
* - Cannot call abort() because some systems have unsafe
* corefiles.
* - Could raise(SIGKILL) resulting in silent program termination.
* - Return EIO, to hint that arc4random's stir function
* should raise(SIGKILL)
* - Do the best under the circumstances....
*
* This code path exists to bring light to the issue that Solaris
* does not provide a failsafe API for entropy collection.
*
* We hope this demonstrates that Solaris should consider
* providing a new failsafe API which works in a chroot or
* when file descriptors are exhausted.
*/
#undef FAIL_INSTEAD_OF_TRYING_FALLBACK
#ifdef FAIL_INSTEAD_OF_TRYING_FALLBACK
raise(SIGKILL);
#endif
ret = getentropy_fallback(buf, len);
if (ret != -1)
return (ret);
errno = EIO;
return (ret);
}
/*
* Basic sanity checking; wish we could do better.
*/
static int
gotdata(char *buf, size_t len)
{
char any_set = 0;
size_t i;
for (i = 0; i < len; ++i)
any_set |= buf[i];
if (any_set == 0)
return -1;
return 0;
}
static int
getentropy_urandom(void *buf, size_t len, const char *path, int devfscheck)
{
struct stat st;
size_t i;
int fd, flags;
int save_errno = errno;
start:
flags = O_RDONLY;
#ifdef O_NOFOLLOW
flags |= O_NOFOLLOW;
#endif
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
fd = open(path, flags, 0);
if (fd == -1) {
if (errno == EINTR)
goto start;
goto nodevrandom;
}
#ifndef O_CLOEXEC
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
#endif
/* Lightly verify that the device node looks sane */
if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode) ||
(devfscheck && (strcmp(st.st_fstype, "devfs") != 0))) {
close(fd);
goto nodevrandom;
}
for (i = 0; i < len; ) {
size_t wanted = len - i;
ssize_t ret = read(fd, (char*)buf + i, wanted);
if (ret == -1) {
if (errno == EAGAIN || errno == EINTR)
continue;
close(fd);
goto nodevrandom;
}
i += ret;
}
close(fd);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
nodevrandom:
errno = EIO;
return -1;
}
static const int cl[] = {
CLOCK_REALTIME,
#ifdef CLOCK_MONOTONIC
CLOCK_MONOTONIC,
#endif
#ifdef CLOCK_MONOTONIC_RAW
CLOCK_MONOTONIC_RAW,
#endif
#ifdef CLOCK_TAI
CLOCK_TAI,
#endif
#ifdef CLOCK_VIRTUAL
CLOCK_VIRTUAL,
#endif
#ifdef CLOCK_UPTIME
CLOCK_UPTIME,
#endif
#ifdef CLOCK_PROCESS_CPUTIME_ID
CLOCK_PROCESS_CPUTIME_ID,
#endif
#ifdef CLOCK_THREAD_CPUTIME_ID
CLOCK_THREAD_CPUTIME_ID,
#endif
};
static int
getentropy_fallback(void *buf, size_t len)
{
uint8_t results[SHA512_DIGEST_LENGTH];
int save_errno = errno, e, pgs = getpagesize(), faster = 0, repeat;
static int cnt;
struct timespec ts;
struct timeval tv;
double loadavg[3];
struct rusage ru;
sigset_t sigset;
struct stat st;
SHA512_CTX ctx;
static pid_t lastpid;
pid_t pid;
size_t i, ii, m;
char *p;
pid = getpid();
if (lastpid == pid) {
faster = 1;
repeat = 2;
} else {
faster = 0;
lastpid = pid;
repeat = REPEAT;
}
for (i = 0; i < len; ) {
int j;
SHA512_Init(&ctx);
for (j = 0; j < repeat; j++) {
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]); ii++)
HX(clock_gettime(cl[ii], &ts) == -1, ts);
HX((pid = getpid()) == -1, pid);
HX((pid = getsid(pid)) == -1, pid);
HX((pid = getppid()) == -1, pid);
HX((pid = getpgid(0)) == -1, pid);
HX((e = getpriority(0, 0)) == -1, e);
HX((getloadavg(loadavg, 3) == -1), loadavg);
if (!faster) {
ts.tv_sec = 0;
ts.tv_nsec = 1;
(void) nanosleep(&ts, NULL);
}
HX(sigpending(&sigset) == -1, sigset);
HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
sigset);
#ifdef CAN_REFERENCE_MAIN
HF(main); /* an addr in program */
#endif
HF(getentropy); /* an addr in this library */
HF(printf); /* an addr in libc */
p = (char *)&p;
HD(p); /* an addr on stack */
p = (char *)&errno;
HD(p); /* the addr of errno */
if (i == 0) {
struct sockaddr_storage ss;
struct statvfs stvfs;
struct termios tios;
socklen_t ssl;
off_t off;
/*
* Prime-sized mappings encourage fragmentation;
* thus exposing some address entropy.
*/
struct mm {
size_t npg;
void *p;
} mm[] = {
{ 17, MAP_FAILED }, { 3, MAP_FAILED },
{ 11, MAP_FAILED }, { 2, MAP_FAILED },
{ 5, MAP_FAILED }, { 3, MAP_FAILED },
{ 7, MAP_FAILED }, { 1, MAP_FAILED },
{ 57, MAP_FAILED }, { 3, MAP_FAILED },
{ 131, MAP_FAILED }, { 1, MAP_FAILED },
};
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
HX(mm[m].p = mmap(NULL,
mm[m].npg * pgs,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1,
(off_t)0), mm[m].p);
if (mm[m].p != MAP_FAILED) {
size_t mo;
/* Touch some memory... */
p = mm[m].p;
mo = cnt %
(mm[m].npg * pgs - 1);
p[mo] = 1;
cnt += (int)((long)(mm[m].p)
/ pgs);
}
/* Check cnts and times... */
for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]);
ii++) {
HX((e = clock_gettime(cl[ii],
&ts)) == -1, ts);
if (e != -1)
cnt += (int)ts.tv_nsec;
}
HX((e = getrusage(RUSAGE_SELF,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
}
for (m = 0; m < sizeof mm/sizeof(mm[0]); m++) {
if (mm[m].p != MAP_FAILED)
munmap(mm[m].p, mm[m].npg * pgs);
mm[m].p = MAP_FAILED;
}
HX(stat(".", &st) == -1, st);
HX(statvfs(".", &stvfs) == -1, stvfs);
HX(stat("/", &st) == -1, st);
HX(statvfs("/", &stvfs) == -1, stvfs);
HX((e = fstat(0, &st)) == -1, st);
if (e == -1) {
if (S_ISREG(st.st_mode) ||
S_ISFIFO(st.st_mode) ||
S_ISSOCK(st.st_mode)) {
HX(fstatvfs(0, &stvfs) == -1,
stvfs);
HX((off = lseek(0, (off_t)0,
SEEK_CUR)) < 0, off);
}
if (S_ISCHR(st.st_mode)) {
HX(tcgetattr(0, &tios) == -1,
tios);
} else if (S_ISSOCK(st.st_mode)) {
memset(&ss, 0, sizeof ss);
ssl = sizeof(ss);
HX(getpeername(0,
(void *)&ss, &ssl) == -1,
ss);
}
}
HX((e = getrusage(RUSAGE_CHILDREN,
&ru)) == -1, ru);
if (e != -1) {
cnt += (int)ru.ru_utime.tv_sec;
cnt += (int)ru.ru_utime.tv_usec;
}
} else {
/* Subsequent hashes absorb previous result */
HD(results);
}
HX((e = gettimeofday(&tv, NULL)) == -1, tv);
if (e != -1) {
cnt += (int)tv.tv_sec;
cnt += (int)tv.tv_usec;
}
HD(cnt);
}
SHA512_Final(results, &ctx);
memcpy((char*)buf + i, results, min(sizeof(results), len - i));
i += min(sizeof(results), len - i);
}
memset(results, 0, sizeof results);
if (gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
errno = EIO;
return -1;
}
+56
View File
@@ -0,0 +1,56 @@
/* $OpenBSD$ */
/*
* Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
* Copyright (c) 2014, Bob Beck <beck@obtuse.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <windows.h>
#include <errno.h>
#include <stdint.h>
#include <sys/types.h>
#include <wincrypt.h>
#include <process.h>
int getentropy(void *buf, size_t len);
/*
* On Windows, CryptGenRandom is supposed to be a well-seeded
* cryptographically strong random number generator.
*/
int
getentropy(void *buf, size_t len)
{
HCRYPTPROV provider;
if (len > 256) {
errno = EIO;
return -1;
}
if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT) == 0)
goto fail;
if (CryptGenRandom(provider, len, buf) == 0) {
CryptReleaseContext(provider, 0);
goto fail;
}
CryptReleaseContext(provider, 0);
return (0);
fail:
errno = EIO;
return (-1);
}
+5 -5
View File
@@ -103,7 +103,7 @@ inet_aton(const char *cp, struct in_addr *addr)
* Values are specified as for C:
* 0x=hex, 0=octal, isdigit=decimal.
*/
if (!isdigit(c))
if (!isdigit((unsigned char)c))
return (0);
val = 0; base = 10;
if (c == '0') {
@@ -114,12 +114,12 @@ inet_aton(const char *cp, struct in_addr *addr)
base = 8;
}
for (;;) {
if (isascii(c) && isdigit(c)) {
if (isascii((unsigned char)c) && isdigit((unsigned char)c)) {
val = (val * base) + (c - '0');
c = *++cp;
} else if (base == 16 && isascii(c) && isxdigit(c)) {
} else if (base == 16 && isascii((unsigned char)c) && isxdigit((unsigned char)c)) {
val = (val << 4) |
(c + 10 - (islower(c) ? 'a' : 'A'));
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
c = *++cp;
} else
break;
@@ -141,7 +141,7 @@ inet_aton(const char *cp, struct in_addr *addr)
/*
* Check for trailing characters.
*/
if (c != '\0' && (!isascii(c) || !isspace(c)))
if (c != '\0' && (!isascii((unsigned char)c) || !isspace((unsigned char)c)))
return (0);
/*
* Concoct the address according to
+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)
+45
View File
@@ -0,0 +1,45 @@
/* isblank - compatibility implementation of isblank
*
* Copyright (c) 2015, NLnet Labs. All rights reserved.
*
* 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 NLNET LABS 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
* HOLDER 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"
/* return true for a blank character: space or tab */
int isblank(int c);
/* implementation of isblank. unsigned char is the argument */
int
isblank(int c)
{
return (c==' ' || c=='\t');
}
+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 */
+1 -1
View File
@@ -28,7 +28,7 @@ void *memmove(void *dest, const void *src, size_t n)
to[i] = from[i];
return dest;
}
if (from > to && from-to < (int)n) {
if (from > to && from-to < (int)n) {
/* to overlaps with from */
/* <from......> */
/* <to........> */
+42
View File
@@ -0,0 +1,42 @@
/* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */
/*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "config.h"
#include <sys/types.h>
#include <errno.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <limits.h>
#include <stdlib.h>
/*
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
* if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
*/
#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4))
void *
reallocarray(void *optr, size_t nmemb, size_t size)
{
if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
nmemb > 0 && SIZE_MAX / nmemb < size) {
errno = ENOMEM;
return NULL;
}
return realloc(optr, size * nmemb);
}
+477
View File
@@ -0,0 +1,477 @@
/*
* FILE: sha2.c
* AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/
*
* Copyright (c) 2000-2001, Aaron D. Gifford
* All rights reserved.
*
* Modified by Jelte Jansen to fit in ldns, and not clash with any
* system-defined SHA code.
* Changes:
* - Renamed (external) functions and constants to fit ldns style
* - Removed _End and _Data functions
* - Added ldns_shaX(data, len, digest) convenience functions
* - Removed prototypes of _Transform functions and made those static
* Modified by Wouter, and trimmed, to provide SHA512 for getentropy_fallback.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the copyright holder nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``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 AUTHOR OR CONTRIBUTOR(S) 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.
*
* $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
*/
#include "config.h"
#include <string.h> /* memcpy()/memset() or bcopy()/bzero() */
#include <assert.h> /* assert() */
/* do we have sha512 header defs */
#ifndef SHA512_DIGEST_LENGTH
#define SHA512_BLOCK_LENGTH 128
#define SHA512_DIGEST_LENGTH 64
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
typedef struct _SHA512_CTX {
uint64_t state[8];
uint64_t bitcount[2];
uint8_t buffer[SHA512_BLOCK_LENGTH];
} SHA512_CTX;
#endif /* do we have sha512 header defs */
void SHA512_Init(SHA512_CTX*);
void SHA512_Update(SHA512_CTX*, void*, size_t);
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
unsigned char *SHA512(void *data, unsigned int data_len, unsigned char *digest);
/*** SHA-256/384/512 Machine Architecture Definitions *****************/
/*
* BYTE_ORDER NOTE:
*
* Please make sure that your system defines BYTE_ORDER. If your
* architecture is little-endian, make sure it also defines
* LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
* equivalent.
*
* If your system does not define the above, then you can do so by
* hand like this:
*
* #define LITTLE_ENDIAN 1234
* #define BIG_ENDIAN 4321
*
* And for little-endian machines, add:
*
* #define BYTE_ORDER LITTLE_ENDIAN
*
* Or for big-endian machines:
*
* #define BYTE_ORDER BIG_ENDIAN
*
* The FreeBSD machine this was written on defines BYTE_ORDER
* appropriately by including <sys/types.h> (which in turn includes
* <machine/endian.h> where the appropriate definitions are actually
* made).
*/
#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
#endif
typedef uint8_t sha2_byte; /* Exactly 1 byte */
typedef uint32_t sha2_word32; /* Exactly 4 bytes */
#ifdef S_SPLINT_S
typedef unsigned long long sha2_word64; /* lint 8 bytes */
#else
typedef uint64_t sha2_word64; /* Exactly 8 bytes */
#endif
/*** SHA-256/384/512 Various Length Definitions ***********************/
#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
/*** ENDIAN REVERSAL MACROS *******************************************/
#if BYTE_ORDER == LITTLE_ENDIAN
#define REVERSE32(w,x) { \
sha2_word32 tmp = (w); \
tmp = (tmp >> 16) | (tmp << 16); \
(x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \
}
#ifndef S_SPLINT_S
#define REVERSE64(w,x) { \
sha2_word64 tmp = (w); \
tmp = (tmp >> 32) | (tmp << 32); \
tmp = ((tmp & 0xff00ff00ff00ff00ULL) >> 8) | \
((tmp & 0x00ff00ff00ff00ffULL) << 8); \
(x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \
((tmp & 0x0000ffff0000ffffULL) << 16); \
}
#else /* splint */
#define REVERSE64(w,x) /* splint */
#endif /* splint */
#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/*
* Macro for incrementally adding the unsigned 64-bit integer n to the
* unsigned 128-bit integer (represented using a two-element array of
* 64-bit words):
*/
#define ADDINC128(w,n) { \
(w)[0] += (sha2_word64)(n); \
if ((w)[0] < (n)) { \
(w)[1]++; \
} \
}
#ifdef S_SPLINT_S
#undef ADDINC128
#define ADDINC128(w,n) /* splint */
#endif
/*
* Macros for copying blocks of memory and for zeroing out ranges
* of memory. Using these macros makes it easy to switch from
* using memset()/memcpy() and using bzero()/bcopy().
*
* Please define either SHA2_USE_MEMSET_MEMCPY or define
* SHA2_USE_BZERO_BCOPY depending on which function set you
* choose to use:
*/
#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY)
/* Default to memset()/memcpy() if no option is specified */
#define SHA2_USE_MEMSET_MEMCPY 1
#endif
#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY)
/* Abort with an error if BOTH options are defined */
#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both!
#endif
#ifdef SHA2_USE_MEMSET_MEMCPY
#define MEMSET_BZERO(p,l) memset((p), 0, (l))
#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l))
#endif
#ifdef SHA2_USE_BZERO_BCOPY
#define MEMSET_BZERO(p,l) bzero((p), (l))
#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l))
#endif
/*** THE SIX LOGICAL FUNCTIONS ****************************************/
/*
* Bit shifting and rotation (used by the six SHA-XYZ logical functions:
*
* NOTE: The naming of R and S appears backwards here (R is a SHIFT and
* S is a ROTATION) because the SHA-256/384/512 description document
* (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
* same "backwards" definition.
*/
/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
#define R(b,x) ((x) >> (b))
/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b))))
/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
/* Four of six logical functions used in SHA-384 and SHA-512: */
#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x)))
#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
/* Hash constant words K for SHA-384 and SHA-512: */
static const sha2_word64 K512[80] = {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
};
/* initial hash value H for SHA-512 */
static const sha2_word64 sha512_initial_hash_value[8] = {
0x6a09e667f3bcc908ULL,
0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL,
0xa54ff53a5f1d36f1ULL,
0x510e527fade682d1ULL,
0x9b05688c2b3e6c1fULL,
0x1f83d9abfb41bd6bULL,
0x5be0cd19137e2179ULL
};
typedef union _ldns_sha2_buffer_union {
uint8_t* theChars;
uint64_t* theLongs;
} ldns_sha2_buffer_union;
/*** SHA-512: *********************************************************/
void SHA512_Init(SHA512_CTX* context) {
if (context == (SHA512_CTX*)0) {
return;
}
MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH);
context->bitcount[0] = context->bitcount[1] = 0;
}
static void SHA512_Transform(SHA512_CTX* context,
const sha2_word64* data) {
sha2_word64 a, b, c, d, e, f, g, h, s0, s1;
sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer;
int j;
/* initialize registers with the prev. intermediate value */
a = context->state[0];
b = context->state[1];
c = context->state[2];
d = context->state[3];
e = context->state[4];
f = context->state[5];
g = context->state[6];
h = context->state[7];
j = 0;
do {
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert TO host byte order */
REVERSE64(*data++, W512[j]);
/* Apply the SHA-512 compression function to update a..h */
T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
#else /* BYTE_ORDER == LITTLE_ENDIAN */
/* Apply the SHA-512 compression function to update a..h with copy */
T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
#endif /* BYTE_ORDER == LITTLE_ENDIAN */
T2 = Sigma0_512(a) + Maj(a, b, c);
h = g;
g = f;
f = e;
e = d + T1;
d = c;
c = b;
b = a;
a = T1 + T2;
j++;
} while (j < 16);
do {
/* Part of the message block expansion: */
s0 = W512[(j+1)&0x0f];
s0 = sigma0_512(s0);
s1 = W512[(j+14)&0x0f];
s1 = sigma1_512(s1);
/* Apply the SHA-512 compression function to update a..h */
T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
(W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
T2 = Sigma0_512(a) + Maj(a, b, c);
h = g;
g = f;
f = e;
e = d + T1;
d = c;
c = b;
b = a;
a = T1 + T2;
j++;
} while (j < 80);
/* Compute the current intermediate hash value */
context->state[0] += a;
context->state[1] += b;
context->state[2] += c;
context->state[3] += d;
context->state[4] += e;
context->state[5] += f;
context->state[6] += g;
context->state[7] += h;
/* Clean up */
a = b = c = d = e = f = g = h = T1 = T2 = 0;
}
void SHA512_Update(SHA512_CTX* context, void *datain, size_t len) {
size_t freespace, usedspace;
const sha2_byte* data = (const sha2_byte*)datain;
if (len == 0) {
/* Calling with no data is valid - we do nothing */
return;
}
/* Sanity check: */
assert(context != (SHA512_CTX*)0 && data != (sha2_byte*)0);
usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
freespace = SHA512_BLOCK_LENGTH - usedspace;
if (len >= freespace) {
/* Fill the buffer completely and process it */
MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
ADDINC128(context->bitcount, freespace << 3);
len -= freespace;
data += freespace;
SHA512_Transform(context, (sha2_word64*)context->buffer);
} else {
/* The buffer is not yet full */
MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
ADDINC128(context->bitcount, len << 3);
/* Clean up: */
usedspace = freespace = 0;
return;
}
}
while (len >= SHA512_BLOCK_LENGTH) {
/* Process as many complete blocks as we can */
SHA512_Transform(context, (sha2_word64*)data);
ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
len -= SHA512_BLOCK_LENGTH;
data += SHA512_BLOCK_LENGTH;
}
if (len > 0) {
/* There's left-overs, so save 'em */
MEMCPY_BCOPY(context->buffer, data, len);
ADDINC128(context->bitcount, len << 3);
}
/* Clean up: */
usedspace = freespace = 0;
}
static void SHA512_Last(SHA512_CTX* context) {
size_t usedspace;
ldns_sha2_buffer_union cast_var;
usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert FROM host byte order */
REVERSE64(context->bitcount[0],context->bitcount[0]);
REVERSE64(context->bitcount[1],context->bitcount[1]);
#endif
if (usedspace > 0) {
/* Begin padding with a 1 bit: */
context->buffer[usedspace++] = 0x80;
if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
/* Set-up for the last transform: */
MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
} else {
if (usedspace < SHA512_BLOCK_LENGTH) {
MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
}
/* Do second-to-last transform: */
SHA512_Transform(context, (sha2_word64*)context->buffer);
/* And set-up for the last transform: */
MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
}
} else {
/* Prepare for final transform: */
MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH);
/* Begin padding with a 1 bit: */
*context->buffer = 0x80;
}
/* Store the length of input data (in bits): */
cast_var.theChars = context->buffer;
cast_var.theLongs[SHA512_SHORT_BLOCK_LENGTH / 8] = context->bitcount[1];
cast_var.theLongs[SHA512_SHORT_BLOCK_LENGTH / 8 + 1] = context->bitcount[0];
/* final transform: */
SHA512_Transform(context, (sha2_word64*)context->buffer);
}
void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
sha2_word64 *d = (sha2_word64*)digest;
/* Sanity check: */
assert(context != (SHA512_CTX*)0);
/* If no digest buffer is passed, we don't bother doing this: */
if (digest != (sha2_byte*)0) {
SHA512_Last(context);
/* Save the hash data for output: */
#if BYTE_ORDER == LITTLE_ENDIAN
{
/* Convert TO host byte order */
int j;
for (j = 0; j < 8; j++) {
REVERSE64(context->state[j],context->state[j]);
*d++ = context->state[j];
}
}
#else
MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH);
#endif
}
/* Zero out state data */
MEMSET_BZERO(context, sizeof(SHA512_CTX));
}
unsigned char *
SHA512(void *data, unsigned int data_len, unsigned char *digest)
{
SHA512_CTX ctx;
SHA512_Init(&ctx);
SHA512_Update(&ctx, data, data_len);
SHA512_Final(digest, &ctx);
return digest;
}
+1029 -764
View File
File diff suppressed because it is too large Load Diff
+73
View File
@@ -0,0 +1,73 @@
/* compat/strlcat.c */
/*-
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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.
*/
/* OPENBSD ORIGINAL: lib/libc/string/strlcat.c */
#include "config.h"
#ifndef HAVE_STRLCAT
#include <sys/types.h>
#include <string.h>
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
size_t
strlcat(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
n = siz - dlen;
if (n == 0)
return(dlen + strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';
return(dlen + (s - src)); /* count does not include NUL */
}
#endif /* !HAVE_STRLCAT */
+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((unsigned char)*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((unsigned char)c)) { /* whitespace */
/** whitespace matches zero or more whitespace characters in the
* input string.
**/
while (isspace((unsigned char)*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((unsigned char)*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 */
+65
View File
@@ -0,0 +1,65 @@
/**
* strsep implementation for compatibility.
*
* LICENSE
* Copyright (c) 2016, NLnet Labs
* 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"
/** see if character is in the delimiter array */
static int
in_delim(char c, const char* delim)
{
const char* p;
if(!delim)
return 0;
for(p=delim; *p; p++) {
if(*p == c)
return 1;
}
return 0;
}
char *strsep(char **stringp, const char *delim)
{
char* s;
char* orig;
if(stringp == NULL || *stringp == NULL)
return NULL;
orig = *stringp;
s = *stringp;
while(*s && !in_delim(*s, delim))
s++;
if(*s) {
*s = 0;
*stringp = s+1;
} else {
*stringp = NULL;
}
return orig;
}
+340 -298
View File
@@ -1,14 +1,12 @@
#! /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.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2007-05-17'
timestamp='2013-06-10'
# 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
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2007-05-17'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# 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.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# 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.
# Originally written by Per Bothner.
#
# 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
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +50,7 @@ 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 1992-2013 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."
@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -170,7 +184,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?
@@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
os=netbsd
os=netbsd
;;
esac
# The OS release
@@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit ;;
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -324,14 +345,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
@@ -375,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -461,8 +501,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -475,7 +515,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -532,7 +572,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[4567])
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
@@ -575,52 +615,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -640,7 +680,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
@@ -711,22 +751,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -750,14 +790,14 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -769,40 +809,51 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
*:Interix*:*)
case ${UNAME_MACHINE} in
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
@@ -823,93 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#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
}'`"
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
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -920,106 +899,132 @@ EOF
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}
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
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-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or1k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
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
@@ -1027,11 +1032,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1048,7 +1053,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:*:*)
@@ -1063,7 +1068,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1091,10 +1096,13 @@ EOF
exit ;;
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
exit ;;
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# 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
exit ;;
@@ -1129,8 +1137,18 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
/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 +1161,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:*:*)
@@ -1163,10 +1181,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1192,11 +1210,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1206,6 +1224,12 @@ 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 ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1232,9 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
unknown) UNAME_PROCESSOR=powerpc ;;
esac
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
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
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1248,7 +1284,10 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1293,13 +1332,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1314,11 +1353,14 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
@@ -1336,11 +1378,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
"4"
#else
""
""
#endif
); exit (0);
); exit (0);
#endif
#endif
@@ -1474,9 +1516,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
+637 -88
View File
File diff suppressed because it is too large Load Diff
Vendored
+270 -105
View File
@@ -1,44 +1,40 @@
#! /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.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2007-04-29'
timestamp='2013-08-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# 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
# the Free Software Foundation; either version 3 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.
# 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# 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 +68,7 @@ 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 1992-2013 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."
@@ -120,12 +115,18 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
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* | \
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | 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/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -148,10 +149,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
@@ -166,10 +170,10 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
@@ -214,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
@@ -238,24 +248,34 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| maxq | mb | microblaze | microblazeel | 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 \
@@ -266,31 +286,45 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nios | nios2 \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| or32 \
| open8 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rl78 | 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 \
| v850 | v850e \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -300,6 +334,21 @@ case $basic_machine in
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@@ -314,29 +363,37 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@@ -347,31 +404,41 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| rl78-* | 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-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| 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.
@@ -389,7 +456,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -435,6 +502,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 +514,35 @@ 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
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -475,8 +571,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -514,6 +610,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
@@ -629,7 +729,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -668,6 +767,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,8 +786,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i386-pc
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -715,10 +829,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -783,6 +905,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -813,6 +941,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
;;
@@ -857,9 +993,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@@ -869,7 +1006,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
@@ -884,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -953,6 +1094,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@@ -1009,17 +1153,9 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1088,6 +1224,9 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@@ -1096,6 +1235,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 +1277,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)
@@ -1181,9 +1324,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# 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,21 +1350,23 @@ 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* | -plan9* \
| -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* \
| -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1226,7 +1374,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*)
@@ -1265,7 +1413,7 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
-os400*)
os=-os400
;;
-wince*)
@@ -1314,7 +1462,7 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
-tpf*)
os=-tpf
;;
-triton*)
@@ -1350,12 +1498,14 @@ case $os in
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@@ -1378,10 +1528,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
score-*)
os=-elf
;;
spu-*)
spu-*)
os=-elf
;;
*-acorn)
@@ -1393,8 +1543,23 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1414,14 +1579,11 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mep-*)
mep-*)
os=-elf
;;
mips*-cisco)
@@ -1430,6 +1592,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or1k-*)
os=-elf
;;
or32-*)
os=-coff
;;
@@ -1448,7 +1613,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
*-knuth)
os=-mmixware
;;
*-wec)
@@ -1553,7 +1718,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-aix*)
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
Vendored
+15330 -21277
View File
File diff suppressed because it is too large Load Diff
+1206 -893
View File
File diff suppressed because it is too large Load Diff
+20
View File
@@ -8,4 +8,24 @@ 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.
* patch_rsamd5_enable.diff: this patch enables RSAMD5 validation (otherwise
it is treated as insecure). The RSAMD5 algorithm is deprecated (RFC6725).
* create_unbound_ad_servers.sh: shell script to enter anti-ad server lists.
* create_unbound_ad_servers.cmd: windows script to enter anti-ad server lists.
* unbound_cache.sh: shell script to save and load the cache.
* unbound_cache.cmd: windows script to save and load the cache.
* warmup.sh: shell script to warm up DNS cache by your own MRU domains.
* warmup.cmd: windows script to warm up DNS cache by your own MRU domains.
* aaaa-filter-iterator.patch: adds config option aaaa-filter: yes that
works like the BIND feature (removes AAAA records unless AAAA-only domain).
Useful for certain 'broken IPv6 default route' scenarios.
Patch from Stephane Lapie for ASAHI Net.
* unbound_smf22.tar.gz: Solaris SMF installation/removal scripts.
Contributed by Yuri Voinov.
+413
View File
@@ -0,0 +1,413 @@
Index: trunk/doc/unbound.conf.5.in
===================================================================
--- trunk/doc/unbound.conf.5.in (revision 3587)
+++ trunk/doc/unbound.conf.5.in (working copy)
@@ -593,6 +593,13 @@
possible. Best effort approach, full QNAME and original QTYPE will be sent when
upstream replies with a RCODE other than NOERROR. Default is off.
.TP
+.B aaaa\-filter: \fI<yes or no>
+Activate behavior similar to BIND's AAAA-filter.
+This forces the dropping of all AAAA records, unless in the case of
+explicit AAAA queries, when no A records have been confirmed.
+This also causes an additional A query to be sent for each AAAA query.
+This breaks DNSSEC!
+.TP
.B private\-address: \fI<IP address or subnet>
Give IPv4 of IPv6 addresses or classless subnets. These are addresses
on your private network, and are not allowed to be returned for
Index: trunk/iterator/iter_scrub.c
===================================================================
--- trunk/iterator/iter_scrub.c (revision 3587)
+++ trunk/iterator/iter_scrub.c (working copy)
@@ -617,6 +617,32 @@
}
/**
+ * ASN: Lookup A records from rrset cache.
+ * @param qinfo: the question originally asked.
+ * @param env: module environment with config and cache.
+ * @param ie: iterator environment with private address data.
+ * @return 0 if no A record found, 1 if A record found.
+ */
+static int
+asn_lookup_a_record_from_cache(struct query_info* qinfo,
+ struct module_env* env, struct iter_env* ATTR_UNUSED(ie))
+{
+ struct ub_packed_rrset_key* akey;
+
+ /* get cached A records for queried name */
+ akey = rrset_cache_lookup(env->rrset_cache, qinfo->qname,
+ qinfo->qname_len, LDNS_RR_TYPE_A, qinfo->qclass,
+ 0, *env->now, 0);
+ if(akey) { /* we had some. */
+ log_rrset_key(VERB_ALGO, "ASN-AAAA-filter: found A record",
+ akey);
+ lock_rw_unlock(&akey->entry.lock);
+ return 1;
+ }
+ return 0;
+}
+
+/**
* Given a response event, remove suspect RRsets from the response.
* "Suspect" rrsets are potentially poison. Note that this routine expects
* the response to be in a "normalized" state -- that is, all "irrelevant"
@@ -635,6 +661,7 @@
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
struct iter_env* ie)
{
+ int found_a_record = 0; /* ASN: do we have a A record? */
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;
@@ -670,6 +697,13 @@
rrset = rrset->rrset_all_next;
}
+ /* ASN: Locate any A record we can find */
+ if((ie->aaaa_filter) && (qinfo->qtype == LDNS_RR_TYPE_AAAA)) {
+ found_a_record = asn_lookup_a_record_from_cache(qinfo,
+ env, ie);
+ }
+ /* ASN: End of added code */
+
/* At this point, we brutally remove ALL rrsets that aren't
* children of the originating zone. The idea here is that,
* as far as we know, the server that we contacted is ONLY
@@ -681,6 +715,24 @@
rrset = msg->rrset_first;
while(rrset) {
+ /* ASN: For AAAA records only... */
+ if((ie->aaaa_filter) && (rrset->type == LDNS_RR_TYPE_AAAA)) {
+ /* ASN: If this is not a AAAA query, then remove AAAA
+ * records, no questions asked. If this IS a AAAA query
+ * then remove AAAA records if we have an A record.
+ * Otherwise, leave things be. */
+ if((qinfo->qtype != LDNS_RR_TYPE_AAAA) ||
+ (found_a_record)) {
+ remove_rrset("ASN-AAAA-filter: removing AAAA "
+ "for record", pkt, msg, prev, &rrset);
+ continue;
+ }
+ log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: "
+ "keep AAAA for", zonename,
+ LDNS_RR_TYPE_AAAA, qinfo->qclass);
+ }
+ /* ASN: End of added code */
+
/* remove private addresses */
if( (rrset->type == LDNS_RR_TYPE_A ||
rrset->type == LDNS_RR_TYPE_AAAA)) {
Index: trunk/iterator/iter_utils.c
===================================================================
--- trunk/iterator/iter_utils.c (revision 3587)
+++ trunk/iterator/iter_utils.c (working copy)
@@ -175,6 +175,7 @@
}
iter_env->supports_ipv6 = cfg->do_ip6;
iter_env->supports_ipv4 = cfg->do_ip4;
+ iter_env->aaaa_filter = cfg->aaaa_filter;
return 1;
}
Index: trunk/iterator/iterator.c
===================================================================
--- trunk/iterator/iterator.c (revision 3587)
+++ trunk/iterator/iterator.c (working copy)
@@ -1776,6 +1776,53 @@
return 0;
}
+
+/**
+ * ASN: This event state was added as an intermediary step between
+ * QUERYTARGETS_STATE and the next step, in order to cast a subquery for the
+ * purpose of caching A records for the queried name.
+ *
+ * @param qstate: query state.
+ * @param iq: iterator query state.
+ * @param ie: iterator shared global environment.
+ * @param id: module id.
+ * @return true if the event requires more request processing immediately,
+ * false if not. This state only returns true when it is generating
+ * a SERVFAIL response because the query has hit a dead end.
+ */
+static int
+asn_processQueryAAAA(struct module_qstate* qstate, struct iter_qstate* iq,
+ struct iter_env* ATTR_UNUSED(ie), int id)
+{
+ struct module_qstate* subq = NULL;
+
+ log_assert(iq->fetch_a_for_aaaa == 0);
+
+ /* flag the query properly in order to not loop */
+ iq->fetch_a_for_aaaa = 1;
+
+ /* re-throw same query, but with a different type */
+ if(!generate_sub_request(iq->qchase.qname,
+ iq->qchase.qname_len, LDNS_RR_TYPE_A,
+ iq->qchase.qclass, qstate, id, iq,
+ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) {
+ log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: failed "
+ "preloading of A record for",
+ iq->qchase.qname, LDNS_RR_TYPE_A,
+ iq->qchase.qclass);
+ return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
+ }
+ log_nametypeclass(VERB_ALGO, "ASN-AAAA-filter: "
+ "preloading records in cache for",
+ iq->qchase.qname, LDNS_RR_TYPE_A,
+ iq->qchase.qclass);
+
+ /* set this query as waiting */
+ qstate->ext_state[id] = module_wait_subquery;
+ /* at this point break loop */
+ return 0;
+}
+/* ASN: End of added code */
/**
* This is the request event state where the request will be sent to one of
@@ -1823,6 +1870,13 @@
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
}
+ /* ASN: If we have a AAAA query, then also query for A records */
+ if((ie->aaaa_filter) && (iq->qchase.qtype == LDNS_RR_TYPE_AAAA) &&
+ (iq->fetch_a_for_aaaa == 0)) {
+ return next_state(iq, ASN_FETCH_A_FOR_AAAA_STATE);
+ }
+ /* ASN: End of added code */
+
/* Make sure we have a delegation point, otherwise priming failed
* or another failure occurred */
if(!iq->dp) {
@@ -2922,6 +2976,61 @@
return 0;
}
+/**
+ * ASN: Do final processing on responses to A queries originated from AAAA
+ * queries. Events reach this state after the iterative resolution algorithm
+ * terminates.
+ * This is required down the road to decide whether to scrub AAAA records
+ * from the results or not.
+ *
+ * @param qstate: query state.
+ * @param id: module id.
+ * @param forq: super query state.
+ */
+static void
+asn_processAAAAResponse(struct module_qstate* qstate, int id,
+ struct module_qstate* super)
+{
+ /*struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id];*/
+ struct iter_qstate* super_iq = (struct iter_qstate*)super->minfo[id];
+ struct delegpt_ns* dpns = NULL;
+ int error = (qstate->return_rcode != LDNS_RCODE_NOERROR);
+
+ log_assert(super_iq->fetch_a_for_aaaa > 0);
+
+ /* let super go to evaluation of targets after this */
+ super_iq->state = QUERYTARGETS_STATE;
+
+ log_query_info(VERB_ALGO, "ASN-AAAA-filter: processAAAAResponse",
+ &qstate->qinfo);
+ log_query_info(VERB_ALGO, "ASN-AAAA-filter: processAAAAResponse super",
+ &super->qinfo);
+
+ if(super_iq->dp)
+ dpns = delegpt_find_ns(super_iq->dp,
+ qstate->qinfo.qname, qstate->qinfo.qname_len);
+ if (!dpns) {
+ /* not interested */
+ verbose(VERB_ALGO, "ASN-AAAA-filter: subq: %s, but parent not "
+ "interested%s", (error ? "error, but" : "success"),
+ (super_iq->dp ? "anymore" : " (was reset)"));
+ log_query_info(VERB_ALGO, "ASN-AAAA-filter: superq", &super->qinfo);
+ if(super_iq->dp && error)
+ delegpt_log(VERB_ALGO, super_iq->dp);
+ return;
+ } else if (error) {
+ verbose(VERB_ALGO, "ASN-AAAA-filter: mark as failed, "
+ "and go to target query.");
+ /* see if the failure did get (parent-lame) info */
+ if(!cache_fill_missing(super->env,
+ super_iq->qchase.qclass, super->region,
+ super_iq->dp))
+ log_err("ASN-AAAA-filter: out of memory adding missing");
+ dpns->resolved = 1; /* mark as failed */
+ }
+}
+/* ASN: End of added code */
+
/*
* Return priming query results to interestes super querystates.
*
@@ -2941,6 +3050,9 @@
else if(super->qinfo.qtype == LDNS_RR_TYPE_DS && ((struct iter_qstate*)
super->minfo[id])->state == DSNS_FIND_STATE)
processDSNSResponse(qstate, id, super);
+ else if (super->qinfo.qtype == LDNS_RR_TYPE_AAAA && ((struct iter_qstate*)
+ super->minfo[id])->state == ASN_FETCH_A_FOR_AAAA_STATE)
+ asn_processAAAAResponse(qstate, id, super);
else if(qstate->return_rcode != LDNS_RCODE_NOERROR)
error_supers(qstate, id, super);
else if(qstate->is_priming)
@@ -2978,6 +3090,9 @@
case INIT_REQUEST_3_STATE:
cont = processInitRequest3(qstate, iq, id);
break;
+ case ASN_FETCH_A_FOR_AAAA_STATE:
+ cont = asn_processQueryAAAA(qstate, iq, ie, id);
+ break;
case QUERYTARGETS_STATE:
cont = processQueryTargets(qstate, iq, ie, id);
break;
@@ -3270,6 +3385,8 @@
return "INIT REQUEST STATE (stage 2)";
case INIT_REQUEST_3_STATE:
return "INIT REQUEST STATE (stage 3)";
+ case ASN_FETCH_A_FOR_AAAA_STATE:
+ return "ASN_FETCH_A_FOR_AAAA_STATE";
case QUERYTARGETS_STATE :
return "QUERY TARGETS STATE";
case PRIME_RESP_STATE :
@@ -3294,6 +3411,7 @@
case INIT_REQUEST_STATE :
case INIT_REQUEST_2_STATE :
case INIT_REQUEST_3_STATE :
+ case ASN_FETCH_A_FOR_AAAA_STATE :
case QUERYTARGETS_STATE :
case COLLECT_CLASS_STATE :
return 0;
Index: trunk/iterator/iterator.h
===================================================================
--- trunk/iterator/iterator.h (revision 3587)
+++ trunk/iterator/iterator.h (working copy)
@@ -113,6 +113,9 @@
*/
int* target_fetch_policy;
+ /** ASN: AAAA-filter flag */
+ int aaaa_filter;
+
/** ip6.arpa dname in wireformat, used for qname-minimisation */
uint8_t* ip6arpa_dname;
};
@@ -163,6 +166,14 @@
INIT_REQUEST_3_STATE,
/**
+ * This state is responsible for intercepting AAAA queries,
+ * and launch a A subquery on the same target, to populate the
+ * cache with A records, so the AAAA filter scrubbing logic can
+ * work.
+ */
+ ASN_FETCH_A_FOR_AAAA_STATE,
+
+ /**
* Each time a delegation point changes for a given query or a
* query times out and/or wakes up, this state is (re)visited.
* This state is reponsible for iterating through a list of
@@ -346,6 +357,13 @@
*/
int refetch_glue;
+ /**
+ * ASN: This is a flag that, if true, means that this query is
+ * for fetching A records to populate cache and determine if we must
+ * return AAAA records or not.
+ */
+ int fetch_a_for_aaaa;
+
/** list of pending queries to authoritative servers. */
struct outbound_list outlist;
Index: trunk/pythonmod/interface.i
===================================================================
--- trunk/pythonmod/interface.i (revision 3587)
+++ trunk/pythonmod/interface.i (working copy)
@@ -632,6 +632,7 @@
int harden_dnssec_stripped;
int harden_referral_path;
int use_caps_bits_for_id;
+ int aaaa_filter; /* ASN */
struct config_strlist* private_address;
struct config_strlist* private_domain;
size_t unwanted_threshold;
Index: trunk/util/config_file.c
===================================================================
--- trunk/util/config_file.c (revision 3587)
+++ trunk/util/config_file.c (working copy)
@@ -176,6 +176,7 @@
cfg->harden_referral_path = 0;
cfg->harden_algo_downgrade = 0;
cfg->use_caps_bits_for_id = 0;
+ cfg->aaaa_filter = 0; /* ASN: default is disabled */
cfg->caps_whitelist = NULL;
cfg->private_address = NULL;
cfg->private_domain = NULL;
Index: trunk/util/config_file.h
===================================================================
--- trunk/util/config_file.h (revision 3587)
+++ trunk/util/config_file.h (working copy)
@@ -179,6 +179,8 @@
int harden_algo_downgrade;
/** use 0x20 bits in query as random ID bits */
int use_caps_bits_for_id;
+ /** ASN: enable AAAA filter? */
+ int aaaa_filter;
/** 0x20 whitelist, domains that do not use capsforid */
struct config_strlist* caps_whitelist;
/** strip away these private addrs from answers, no DNS Rebinding */
Index: trunk/util/configlexer.lex
===================================================================
--- trunk/util/configlexer.lex (revision 3587)
+++ trunk/util/configlexer.lex (working copy)
@@ -267,6 +267,7 @@
use-caps-for-id{COLON} { YDVAR(1, VAR_USE_CAPS_FOR_ID) }
caps-whitelist{COLON} { YDVAR(1, VAR_CAPS_WHITELIST) }
unwanted-reply-threshold{COLON} { YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
+aaaa-filter{COLON} { YDVAR(1, VAR_AAAA_FILTER) }
private-address{COLON} { YDVAR(1, VAR_PRIVATE_ADDRESS) }
private-domain{COLON} { YDVAR(1, VAR_PRIVATE_DOMAIN) }
prefetch-key{COLON} { YDVAR(1, VAR_PREFETCH_KEY) }
Index: trunk/util/configparser.y
===================================================================
--- trunk/util/configparser.y (revision 3587)
+++ trunk/util/configparser.y (working copy)
@@ -92,6 +92,7 @@
%token VAR_STATISTICS_CUMULATIVE VAR_OUTGOING_PORT_PERMIT
%token VAR_OUTGOING_PORT_AVOID VAR_DLV_ANCHOR_FILE VAR_DLV_ANCHOR
%token VAR_NEG_CACHE_SIZE VAR_HARDEN_REFERRAL_PATH VAR_PRIVATE_ADDRESS
+%token VAR_AAAA_FILTER
%token VAR_PRIVATE_DOMAIN VAR_REMOTE_CONTROL VAR_CONTROL_ENABLE
%token VAR_CONTROL_INTERFACE VAR_CONTROL_PORT VAR_SERVER_KEY_FILE
%token VAR_SERVER_CERT_FILE VAR_CONTROL_KEY_FILE VAR_CONTROL_CERT_FILE
@@ -169,6 +170,7 @@
server_dlv_anchor_file | server_dlv_anchor | server_neg_cache_size |
server_harden_referral_path | server_private_address |
server_private_domain | server_extended_statistics |
+ server_aaaa_filter |
server_local_data_ptr | server_jostle_timeout |
server_unwanted_reply_threshold | server_log_time_ascii |
server_domain_insecure | server_val_sig_skew_min |
@@ -893,6 +895,15 @@
yyerror("out of memory");
}
;
+server_aaaa_filter: VAR_AAAA_FILTER STRING_ARG
+ {
+ OUTYY(("P(server_aaaa_filter:%s)\n", $2));
+ if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
+ yyerror("expected yes or no.");
+ else cfg_parser->cfg->aaaa_filter = (strcmp($2, "yes")==0);
+ free($2);
+ }
+ ;
server_private_address: VAR_PRIVATE_ADDRESS STRING_ARG
{
OUTYY(("P(server_private_address:%s)\n", $2));
@@ -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__
+33
View File
@@ -0,0 +1,33 @@
@Echo off
rem Convert the Yoyo.org anti-ad server listing
rem into an unbound dns spoof redirection list.
rem Written by Y.Voinov (c) 2014
rem Note: Wget required!
rem Variables
set prefix="C:\Program Files (x86)"
set dst_dir=%prefix%\Unbound
set work_dir=%TEMP%
set list_addr="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D="
rem Check Wget installed
for /f "delims=" %%a in ('where wget') do @set wget=%%a
if /I "%wget%"=="" echo Wget not found. If installed, add path to PATH environment variable. & exit 1
echo Wget found: %wget%
"%wget%" -O %work_dir%\yoyo_ad_servers %list_addr%
del /Q /F /S %dst_dir%\unbound_ad_servers
for /F "eol=; tokens=*" %%a in (%work_dir%\yoyo_ad_servers) do (
echo local-zone: %%a redirect>>%dst_dir%\unbound_ad_servers
echo local-data: "%%a A 127.0.0.1">>%dst_dir%\unbound_ad_servers
)
echo Done.
rem then add an include line to your unbound.conf pointing to the full path of
rem the unbound_ad_servers file:
rem
rem include: $dst_dir/unbound_ad_servers
rem
+39
View File
@@ -0,0 +1,39 @@
#!/bin/sh
#
# Convert the Yoyo.org anti-ad server listing
# into an unbound dns spoof redirection list.
# Modified by Y.Voinov (c) 2014
# Note: Wget required!
# Variables
dst_dir="/etc/opt/csw/unbound"
work_dir="/tmp"
list_addr="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D="
# OS commands
CAT=`which cat`
ECHO=`which echo`
WGET=`which wget`
# Check Wget installed
if [ ! -f $WGET ]; then
echo "Wget not found. Exiting..."
exit 1
fi
$WGET -O $work_dir/yoyo_ad_servers "$list_addr" && \
$CAT $work_dir/yoyo_ad_servers | \
while read line ; \
do \
$ECHO "local-zone: \"$line\" redirect" ;\
$ECHO "local-data: \"$line A 127.0.0.1\"" ;\
done > \
$dst_dir/unbound_ad_servers
echo "Done."
# then add an include line to your unbound.conf pointing to the full path of
# the unbound_ad_servers file:
#
# include: $dst_dir/unbound_ad_servers
#
+13
View File
@@ -0,0 +1,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: unbound
Description: Library with validating, recursive, and caching DNS resolver
URL: http://www.unbound.net
Version: @PACKAGE_VERSION@
Requires: libcrypto libssl @PC_LIBEVENT_DEPENDENCY@ @PC_PY_DEPENDENCY@
Libs: -L${libdir} -lunbound
Libs.private: @SSLLIB@ @LIBS@
Cflags: -I${includedir}
+22
View File
@@ -0,0 +1,22 @@
Index: validator/val_secalgo.c
===================================================================
--- validator/val_secalgo.c (revision 2759)
+++ validator/val_secalgo.c (working copy)
@@ -153,7 +153,7 @@
switch(id) {
case LDNS_RSAMD5:
/* RFC 6725 deprecates RSAMD5 */
- return 0;
+ return 1;
case LDNS_DSA:
case LDNS_DSA_NSEC3:
case LDNS_RSASHA1:
@@ -617,7 +617,7 @@
switch(id) {
case LDNS_RSAMD5:
/* RFC 6725 deprecates RSAMD5 */
- return 0;
+ return 1;
case LDNS_DSA:
case LDNS_DSA_NSEC3:
case LDNS_RSASHA1:
+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.18
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.
+295 -47
View File
@@ -1,23 +1,44 @@
# 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
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 +51,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 +73,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 +136,26 @@ 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}/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 +170,17 @@ 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}
%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 +193,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 dependency 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 committed
* 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 dependency on minimum SSL for CVE-2008-5077
- Added dependency 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 dependency 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
@@ -172,7 +423,7 @@ fi
- Build against ldns-1.3.0
* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-1
- Split of -devel package, fixed dependancies, make rpmlint happy
- Split of -devel package, fixed dependencies, make rpmlint happy
* Thu Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12
- Using parts from ports collection entry by Jaap Akkerhuis.
@@ -180,6 +431,3 @@ fi
* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
- Initial version.
+105
View File
@@ -0,0 +1,105 @@
@echo off
rem --------------------------------------------------------------
rem -- DNS cache save/load script
rem --
rem -- Version 1.2
rem -- By Yuri Voinov (c) 2014
rem --------------------------------------------------------------
rem Variables
set prefix="C:\Program Files (x86)"
set program_path=%prefix%\Unbound
set uc=%program_path%\unbound-control.exe
set fname="unbound_cache.dmp"
rem Check Unbound installed
if exist %uc% goto start
echo Unbound control not found. Exiting...
exit 1
:start
rem arg1 - command (optional)
rem arg2 - file name (optional)
set arg1=%1
set arg2=%2
if /I "%arg1%" == "-h" goto help
if "%arg1%" == "" (
echo Loading cache from %program_path%\%fname%
dir /a %program_path%\%fname%
type %program_path%\%fname%|%uc% load_cache
goto end
)
if defined %arg2% (goto Not_Defined) else (goto Defined)
rem If file not specified; use default dump file
:Not_defined
if /I "%arg1%" == "-s" (
echo Saving cache to %program_path%\%fname%
%uc% dump_cache>%program_path%\%fname%
dir /a %program_path%\%fname%
echo ok
goto end
)
if /I "%arg1%" == "-l" (
echo Loading cache from %program_path%\%fname%
dir /a %program_path%\%fname%
type %program_path%\%fname%|%uc% load_cache
goto end
)
if /I "%arg1%" == "-r" (
echo Saving cache to %program_path%\%fname%
dir /a %program_path%\%fname%
%uc% dump_cache>%program_path%\%fname%
echo ok
echo Loading cache from %program_path%\%fname%
type %program_path%\%fname%|%uc% load_cache
goto end
)
rem If file name specified; use this filename
:Defined
if /I "%arg1%" == "-s" (
echo Saving cache to %arg2%
%uc% dump_cache>%arg2%
dir /a %arg2%
echo ok
goto end
)
if /I "%arg1%" == "-l" (
echo Loading cache from %arg2%
dir /a %arg2%
type %arg2%|%uc% load_cache
goto end
)
if /I "%arg1%" == "-r" (
echo Saving cache to %arg2%
dir /a %arg2%
%uc% dump_cache>%arg2%
echo ok
echo Loading cache from %arg2%
type %arg2%|%uc% load_cache
goto end
)
:help
echo Usage: unbound_cache.cmd [-s] or [-l] or [-r] or [-h] [filename]
echo.
echo l - Load - default mode. Warming up Unbound DNS cache from saved file. cache-ttl must be high value.
echo s - Save - save Unbound DNS cache contents to plain file with domain names.
echo r - Reload - reloadind new cache entries and refresh existing cache
echo h - this screen.
echo filename - file to save/load dumped cache. If not specified, %program_path%\%fname% will be used instead.
echo Note: Run without any arguments will be in default mode.
echo Also, unbound-control must be configured.
exit 1
:end
exit 0
+174
View File
@@ -0,0 +1,174 @@
#!/sbin/sh
# --------------------------------------------------------------
# -- DNS cache save/load script
# --
# -- Version 1.2
# -- By Yuri Voinov (c) 2006, 2014
# --------------------------------------------------------------
#
# ident "@(#)unbound_cache.sh 1.2 14/10/30 YV"
#
#############
# Variables #
#############
# Installation base dir
CONF="/etc/opt/csw/unbound"
BASE="/opt/csw"
# Unbound binaries
UC="$BASE/sbin/unbound-control"
FNAME="unbound_cache.dmp"
# OS utilities
BASENAME=`which basename`
CAT=`which cat`
CUT=`which cut`
ECHO=`which echo`
EXPR=`which expr`
GETOPT=`which getopt`
ID=`which id`
LS=`which ls`
###############
# Subroutines #
###############
usage_note ()
{
# Script usage note
$ECHO "Usage: `$BASENAME $0` [-s] or [-l] or [-r] or [-h] [filename]"
$ECHO .
$ECHO "l - Load - default mode. Warming up Unbound DNS cache from saved file. cache-ttl must be high value."
$ECHO "s - Save - save Unbound DNS cache contents to plain file with domain names."
$ECHO "r - Reload - reloadind new cache entries and refresh existing cache"
$ECHO "h - this screen."
$ECHO "filename - file to save/load dumped cache. If not specified, $CONF/$FNAME will be used instead."
$ECHO "Note: Run without any arguments will be in default mode."
$ECHO " Also, unbound-control must be configured."
exit 0
}
root_check ()
{
if [ ! `$ID | $CUT -f1 -d" "` = "uid=0(root)" ]; then
$ECHO "ERROR: You must be super-user to run this script."
exit 1
fi
}
check_uc ()
{
if [ ! -f "$UC" ]; then
$ECHO .
$ECHO "ERROR: $UC not found. Exiting..."
exit 1
fi
}
check_saved_file ()
{
filename=$1
if [ ! -z "$filename" -a ! -f "$filename" ]; then
$ECHO .
$ECHO "ERROR: File $filename does not exists. Save it first."
exit 1
elif [ ! -f "$CONF/$FNAME" ]; then
$ECHO .
$ECHO "ERROR: File $CONF/$FNAME does not exists. Save it first."
exit 1
fi
}
save_cache ()
{
# Save unbound cache
filename=$1
if [ -z "$filename" ]; then
$ECHO "Saving cache in $CONF/$FNAME..."
$UC dump_cache>$CONF/$FNAME
$LS -lh $CONF/$FNAME
else
$ECHO "Saving cache in $filename..."
$UC dump_cache>$filename
$LS -lh $filename
fi
$ECHO "ok"
}
load_cache ()
{
# Load saved cache contents and warmup cache
filename=$1
if [ -z "$filename" ]; then
$ECHO "Loading cache from saved $CONF/$FNAME..."
$LS -lh $CONF/$FNAME
check_saved_file $filename
$CAT $CONF/$FNAME|$UC load_cache
else
$ECHO "Loading cache from saved $filename..."
$LS -lh $filename
check_saved_file $filename
$CAT $filename|$UC load_cache
fi
}
reload_cache ()
{
# Reloading and refresh existing cache and saved dump
filename=$1
save_cache $filename
load_cache $filename
}
##############
# Main block #
##############
# Root check
root_check
# Check unbound-control
check_uc
# Check command-line arguments
if [ "x$*" = "x" ]; then
# If arguments list empty,load cache by default
load_cache
else
arg_list=$*
# Parse command line
set -- `$GETOPT sSlLrRhH: $arg_list` || {
usage_note 1>&2
}
# Read arguments
for i in $arg_list
do
case $i in
-s | -S) save="1";;
-l | -L) save="0";;
-r | -R) save="2";;
-h | -H | \?) usage_note;;
*) shift
file=$1
break;;
esac
shift
done
# Remove trailing --
shift `$EXPR $OPTIND - 1`
fi
if [ "$save" = "1" ]; then
save_cache $file
elif [ "$save" = "0" ]; then
load_cache $file
elif [ "$save" = "2" ]; then
reload_cache $file
fi
exit 0
Binary file not shown.
+119 -88
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`
@@ -138,7 +150,7 @@ get_state ( ) {
fi
done
# try to get it
echo $$ >$lock
if echo $$ >$lock ; then : ; else break; fi
done
# do not refetch if the file exists and only LEE seconds old
if test -f $state; then
@@ -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
@@ -198,6 +210,7 @@ exist_config ( ) {
if grep '^'$1'=' $state >/dev/null 2>&1; then
echo "$mn.label $2"
echo "$mn.min 0"
echo "$mn.type ABSOLUTE"
fi
}
@@ -206,6 +219,7 @@ p_config ( ) {
mn=`echo $1 | sed $ABBREV | tr . _`
echo $mn.label "$2"
echo $mn.min 0
echo $mn.type $3
}
if test "$1" = "config" ; then
@@ -216,19 +230,21 @@ if test "$1" = "config" ; then
hits)
echo "graph_title Unbound DNS traffic and cache hits"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
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 "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"
p_config "total.num.queries" "total queries from clients" "ABSOLUTE"
p_config "total.num.cachehits" "cache hits" "ABSOLUTE"
p_config "total.num.prefetch" "cache prefetch" "ABSOLUTE"
p_config "num.query.tcp" "TCP queries" "ABSOLUTE"
p_config "num.query.tcpout" "TCP out queries" "ABSOLUTE"
p_config "num.query.ipv6" "IPv6 queries" "ABSOLUTE"
p_config "unwanted.queries" "queries that failed acl" "ABSOLUTE"
p_config "unwanted.replies" "unwanted or unsolicited replies" "ABSOLUTE"
echo "u_replies.warning $warn"
echo "u_replies.critical $crit"
echo "graph_info DNS queries to the recursive resolver. The unwanted replies could be innocent duplicate packets, late replies, or spoof threats."
@@ -237,11 +253,12 @@ if test "$1" = "config" ; then
echo "graph_title Unbound requestlist size"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel number of queries"
echo "graph_scale no"
echo "graph_category DNS"
p_config "total.requestlist.avg" "Average size of queue on insert"
p_config "total.requestlist.max" "Max size of queue (in 5 min)"
p_config "total.requestlist.overwritten" "Number of queries replaced by new ones"
p_config "total.requestlist.exceeded" "Number of queries dropped due to lack of space"
p_config "total.requestlist.avg" "Average size of queue on insert" "GAUGE"
p_config "total.requestlist.max" "Max size of queue (in 5 min)" "GAUGE"
p_config "total.requestlist.overwritten" "Number of queries replaced by new ones" "GAUGE"
p_config "total.requestlist.exceeded" "Number of queries dropped due to lack of space" "GAUGE"
echo "graph_info The queries that did not hit the cache and need recursion service take up space in the requestlist. If there are too many queries, first queries get overwritten, and at last resort dropped."
;;
memory)
@@ -249,124 +266,143 @@ if test "$1" = "config" ; then
echo "graph_args --base 1024 -l 0"
echo "graph_vlabel memory used in bytes"
echo "graph_category DNS"
p_config "mem.total.sbrk" "Total memory"
p_config "mem.cache.rrset" "RRset cache memory"
p_config "mem.cache.message" "Message cache memory"
p_config "mem.mod.iterator" "Iterator module memory"
p_config "mem.mod.validator" "Validator module and key cache memory"
p_config "mem.cache.rrset" "RRset cache memory" "GAUGE"
p_config "mem.cache.message" "Message cache memory" "GAUGE"
p_config "mem.mod.iterator" "Iterator module memory" "GAUGE"
p_config "mem.mod.validator" "Validator module and key cache memory" "GAUGE"
p_config "msg.cache.count" "msg cache count" "GAUGE"
p_config "rrset.cache.count" "rrset cache count" "GAUGE"
p_config "infra.cache.count" "infra cache count" "GAUGE"
p_config "key.cache.count" "key cache count" "GAUGE"
echo "graph_info The memory used by unbound."
;;
by_type)
echo "graph_title Unbound DNS queries by type"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
for x in `grep "^num.query.type" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
tp=`echo $nm | sed -e s/num.query.type.//`
p_config "$nm" "$tp"
p_config "$nm" "$tp" "ABSOLUTE"
done
echo "graph_info queries by DNS RR type queried for"
;;
by_class)
echo "graph_title Unbound DNS queries by class"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
for x in `grep "^num.query.class" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
tp=`echo $nm | sed -e s/num.query.class.//`
p_config "$nm" "$tp"
p_config "$nm" "$tp" "ABSOLUTE"
done
echo "graph_info queries by DNS RR class queried for."
;;
by_opcode)
echo "graph_title Unbound DNS queries by opcode"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
for x in `grep "^num.query.opcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
tp=`echo $nm | sed -e s/num.query.opcode.//`
p_config "$nm" "$tp"
p_config "$nm" "$tp" "ABSOLUTE"
done
echo "graph_info queries by opcode in the query packet."
;;
by_rcode)
echo "graph_title Unbound DNS answers by return code"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel answer packets / second"
echo "graph_vlabel answer packets / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
for x in `grep "^num.answer.rcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
tp=`echo $nm | sed -e s/num.answer.rcode.//`
p_config "$nm" "$tp"
p_config "$nm" "$tp" "ABSOLUTE"
done
p_config "num.answer.secure" "answer secure"
p_config "num.answer.bogus" "answer bogus"
p_config "num.rrset.bogus" "num rrsets marked bogus"
echo "graph_info answers sorted by return value. rrsets bogus is the number of rrsets marked bogus per second by the validator"
p_config "num.answer.secure" "answer secure" "ABSOLUTE"
p_config "num.answer.bogus" "answer bogus" "ABSOLUTE"
p_config "num.rrset.bogus" "num rrsets marked bogus" "ABSOLUTE"
echo "graph_info answers sorted by return value. rrsets bogus is the number of rrsets marked bogus per \${graph_period} by the validator"
;;
by_flags)
echo "graph_title Unbound DNS incoming queries by flags"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
p_config "num.query.flags.QR" "QR (query reply) flag"
p_config "num.query.flags.AA" "AA (auth answer) flag"
p_config "num.query.flags.TC" "TC (truncated) flag"
p_config "num.query.flags.RD" "RD (recursion desired) flag"
p_config "num.query.flags.RA" "RA (rec avail) flag"
p_config "num.query.flags.Z" "Z (zero) flag"
p_config "num.query.flags.AD" "AD (auth data) flag"
p_config "num.query.flags.CD" "CD (check disabled) flag"
p_config "num.query.edns.present" "EDNS OPT present"
p_config "num.query.edns.DO" "DO (DNSSEC OK) flag"
p_config "num.query.flags.QR" "QR (query reply) flag" "ABSOLUTE"
p_config "num.query.flags.AA" "AA (auth answer) flag" "ABSOLUTE"
p_config "num.query.flags.TC" "TC (truncated) flag" "ABSOLUTE"
p_config "num.query.flags.RD" "RD (recursion desired) flag" "ABSOLUTE"
p_config "num.query.flags.RA" "RA (rec avail) flag" "ABSOLUTE"
p_config "num.query.flags.Z" "Z (zero) flag" "ABSOLUTE"
p_config "num.query.flags.AD" "AD (auth data) flag" "ABSOLUTE"
p_config "num.query.flags.CD" "CD (check disabled) flag" "ABSOLUTE"
p_config "num.query.edns.present" "EDNS OPT present" "ABSOLUTE"
p_config "num.query.edns.DO" "DO (DNSSEC OK) flag" "ABSOLUTE"
echo "graph_info This graphs plots the flags inside incoming queries. For example, if QR, AA, TC, RA, Z flags are set, the query can be rejected. RD, AD, CD and DO are legitimately set by some software."
;;
histogram)
echo "graph_title Unbound DNS histogram of reply time"
echo "graph_args --base 1000 -l 0"
echo "graph_vlabel queries / second"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category DNS"
echo hcache.label "cache hits"
echo hcache.min 0
echo hcache.type ABSOLUTE
echo hcache.draw AREA
echo hcache.colour 999999
echo h64ms.label "0 msec - 66 msec"
echo h64ms.min 0
echo h64ms.type ABSOLUTE
echo h64ms.draw STACK
echo h64ms.colour 0000FF
echo h128ms.label "66 msec - 131 msec"
echo h128ms.min 0
echo h128ms.type ABSOLUTE
echo h128ms.colour 1F00DF
echo h128ms.draw STACK
echo h256ms.label "131 msec - 262 msec"
echo h256ms.min 0
echo h256ms.type ABSOLUTE
echo h256ms.draw STACK
echo h256ms.colour 3F00BF
echo h512ms.label "262 msec - 524 msec"
echo h512ms.min 0
echo h512ms.type ABSOLUTE
echo h512ms.draw STACK
echo h512ms.colour 5F009F
echo h1s.label "524 msec - 1 sec"
echo h1s.min 0
echo h1s.type ABSOLUTE
echo h1s.draw STACK
echo h1s.colour 7F007F
echo h2s.label "1 sec - 2 sec"
echo h2s.min 0
echo h2s.type ABSOLUTE
echo h2s.draw STACK
echo h2s.colour 9F005F
echo h4s.label "2 sec - 4 sec"
echo h4s.min 0
echo h4s.type ABSOLUTE
echo h4s.draw STACK
echo h4s.colour BF003F
echo h8s.label "4 sec - 8 sec"
echo h8s.min 0
echo h8s.type ABSOLUTE
echo h8s.draw STACK
echo h8s.colour DF001F
echo h16s.label "8 sec - ..."
echo h16s.min 0
echo h16s.type ABSOLUTE
echo h16s.draw STACK
echo h16s.colour FF0000
echo "graph_info Histogram of the reply times for queries."
@@ -387,20 +423,6 @@ if test $value = 0 || test $value = "0.000000"; then
fi
elapsed="$value"
# print value for $1 / elapsed
print_qps ( ) {
mn=`echo $1 | sed $ABBREV | tr . _`
get_value $1
echo "$mn.value" `echo scale=6';' $value / $elapsed | bc `
}
# print qps if line already found in $2
print_qps_line ( ) {
mn=`echo $1 | sed $ABBREV | tr . _`
value="`echo $2 | sed -e 's/^.*=//'`"
echo "$mn.value" `echo scale=6';' $value / $elapsed | bc `
}
# print value for $1
print_value ( ) {
mn=`echo $1 | sed $ABBREV | tr . _`
@@ -408,15 +430,23 @@ print_value ( ) {
echo "$mn.value" $value
}
# print value if line already found in $2
print_value_line ( ) {
mn=`echo $1 | sed $ABBREV | tr . _`
value="`echo $2 | sed -e 's/^.*=//'`"
echo "$mn.value" $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 num.query.ipv6 \
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.tcpout num.query.ipv6 unwanted.queries \
unwanted.replies; do
if grep "^"$x"=" $state >/dev/null 2>&1; then
print_qps $x
print_value $x
fi
done
;;
@@ -427,46 +457,47 @@ queue)
done
;;
memory)
for x in mem.total.sbrk mem.cache.rrset mem.cache.message \
mem.mod.iterator mem.mod.validator; do
for x in mem.cache.rrset mem.cache.message mem.mod.iterator \
mem.mod.validator msg.cache.count rrset.cache.count \
infra.cache.count key.cache.count; do
print_value $x
done
;;
by_type)
for x in `grep "^num.query.type" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
print_value_line $nm $x
done
;;
by_class)
for x in `grep "^num.query.class" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
print_value_line $nm $x
done
;;
by_opcode)
for x in `grep "^num.query.opcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
print_value_line $nm $x
done
;;
by_rcode)
for x in `grep "^num.answer.rcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
print_value_line $nm $x
done
print_qps "num.answer.secure"
print_qps "num.answer.bogus"
print_qps "num.rrset.bogus"
print_value "num.answer.secure"
print_value "num.answer.bogus"
print_value "num.rrset.bogus"
;;
by_flags)
for x in num.query.flags.QR num.query.flags.AA num.query.flags.TC num.query.flags.RD num.query.flags.RA num.query.flags.Z num.query.flags.AD num.query.flags.CD num.query.edns.present num.query.edns.DO; do
print_qps $x
print_value $x
done
;;
histogram)
get_value total.num.cachehits
echo hcache.value `echo scale=6';' $value / $elapsed | bc `
echo hcache.value $value
r=0
for x in histogram.000000.000000.to.000000.000001 \
histogram.000000.000001.to.000000.000002 \
@@ -488,21 +519,21 @@ histogram)
get_value $x
r=`expr $r + $value`
done
echo h64ms.value `echo scale=6';' $r / $elapsed | bc `
echo h64ms.value $r
get_value histogram.000000.065536.to.000000.131072
echo h128ms.value `echo scale=6';' $value / $elapsed | bc `
echo h128ms.value $value
get_value histogram.000000.131072.to.000000.262144
echo h256ms.value `echo scale=6';' $value / $elapsed | bc `
echo h256ms.value $value
get_value histogram.000000.262144.to.000000.524288
echo h512ms.value `echo scale=6';' $value / $elapsed | bc `
echo h512ms.value $value
get_value histogram.000000.524288.to.000001.000000
echo h1s.value `echo scale=6';' $value / $elapsed | bc `
echo h1s.value $value
get_value histogram.000001.000000.to.000002.000000
echo h2s.value `echo scale=6';' $value / $elapsed | bc `
echo h2s.value $value
get_value histogram.000002.000000.to.000004.000000
echo h4s.value `echo scale=6';' $value / $elapsed | bc `
echo h4s.value $value
get_value histogram.000004.000000.to.000008.000000
echo h8s.value `echo scale=6';' $value / $elapsed | bc `
echo h8s.value $value
r=0
for x in histogram.000008.000000.to.000016.000000 \
histogram.000016.000000.to.000032.000000 \
@@ -523,6 +554,6 @@ histogram)
get_value $x
r=`expr $r + $value`
done
echo h16s.value `echo scale=6';' $r / $elapsed | bc `
echo h16s.value $r
;;
esac
Binary file not shown.
+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 $?
+153
View File
@@ -0,0 +1,153 @@
@echo off
rem --------------------------------------------------------------
rem -- Warm up DNS cache script by your own MRU domains or from
rem -- file when it specified as script argument.
rem --
rem -- Version 1.1
rem -- By Yuri Voinov (c) 2014
rem --------------------------------------------------------------
rem DNS host address
set address="127.0.0.1"
rem Check dig installed
for /f "delims=" %%a in ('where dig') do @set dig=%%a
if /I "%dig%"=="" echo Dig not found. If installed, add path to PATH environment variable. & exit 1
echo Dig found: %dig%
set arg=%1%
if defined %arg% (goto builtin) else (goto from_file)
:builtin
echo Warming up cache by MRU domains...
for %%a in (
2gis.ru
admir.kz
adobe.com
agent.mail.ru
aimp.ru
akamai.com
akamai.net
almaty.tele2.kz
aol.com
apple.com
arin.com
artlebedev.ru
auto.mail.ru
beeline.kz
bing.com
blogspot.com
comodo.com
dnscrypt.org
drive.google.com
drive.mail.ru
facebook.com
farmanager.com
fb.com
firefox.com
forum.farmanager.com
gazeta.ru
getsharex.com
gismeteo.ru
google.com
google.kz
google.ru
googlevideo.com
goto.kz
iana.org
icq.com
imap.mail.ru
instagram.com
intel.com
irr.kz
java.com
kaspersky.com
kaspersky.ru
kcell.kz
krisha.kz
lady.mail.ru
lenta.ru
libreoffice.org
linkedin.com
livejournal.com
mail.google.com
mail.ru
microsoft.com
mozilla.org
mra.mail.ru
munin-monitoring.org
my.mail.ru
news.bbcimg.co.uk
news.mail.ru
newsimg.bbc.net.uk
nvidia.com
odnoklassniki.ru
ok.ru
opencsw.org
opendns.com
opendns.org
opennet.ru
opera.com
oracle.com
peerbet.ru
piriform.com
plugring.farmanager.com
privoxy.org
qip.ru
raidcall.com
rambler.ru
reddit.com
ru.wikipedia.org
shallalist.de
skype.com
snob.ru
squid-cache.org
squidclamav.darold.net
squidguard.org
ssl.comodo.com
ssl.verisign.com
symantec.com
symantecliveupdate.com
tele2.kz
tengrinews.kz
thunderbird.com
torproject.org
torstatus.blutmagie.de
translate.google.com
unbound.net
verisign.com
vk.com
vk.me
vk.ru
vkontakte.com
vkontakte.ru
vlc.org
watsapp.net
weather.mail.ru
windowsupdate.com
www.baidu.com
www.bbc.co.uk
www.internic.net
www.opennet.ru
www.topgear.com
ya.ru
yahoo.com
yandex.com
yandex.ru
youtube.com
ytimg.com
) do "%dig%" %%a @%address% 1>nul 2>nul
goto end
:from_file
echo Warming up cache from %1% file...
%dig% -f %arg% @%address% 1>nul 2>nul
:end
echo Saving cache...
if exist unbound_cache.cmd unbound_cache.cmd -s
echo Done.
exit 0
+150
View File
@@ -0,0 +1,150 @@
#!/bin/sh
# --------------------------------------------------------------
# -- Warm up DNS cache script by your own MRU domains or from
# -- file when it specified as script argument.
# --
# -- Version 1.1
# -- By Yuri Voinov (c) 2014
# --------------------------------------------------------------
# Default DNS host address
address="127.0.0.1"
cat=`which cat`
dig=`which dig`
if [ -z "$1" ]; then
echo "Warming up cache by MRU domains..."
$dig -f - @$address >/dev/null 2>&1 <<EOT
2gis.ru
admir.kz
adobe.com
agent.mail.ru
aimp.ru
akamai.com
akamai.net
almaty.tele2.kz
aol.com
apple.com
arin.com
artlebedev.ru
auto.mail.ru
beeline.kz
bing.com
blogspot.com
clamav.net
comodo.com
dnscrypt.org
drive.google.com
drive.mail.ru
facebook.com
farmanager.com
fb.com
firefox.com
forum.farmanager.com
gazeta.ru
getsharex.com
gismeteo.ru
google.com
google.kz
google.ru
googlevideo.com
goto.kz
iana.org
icq.com
imap.mail.ru
instagram.com
instagram.com
intel.com
irr.kz
java.com
kaspersky.com
kaspersky.ru
kcell.kz
krisha.kz
lady.mail.ru
lenta.ru
libreoffice.org
linkedin.com
livejournal.com
mail.google.com
mail.ru
microsoft.com
mozilla.org
mra.mail.ru
munin-monitoring.org
my.mail.ru
news.bbcimg.co.uk
news.mail.ru
newsimg.bbc.net.uk
nvidia.com
odnoklassniki.ru
ok.ru
opencsw.org
opendns.com
opendns.org
opennet.ru
opera.com
oracle.com
peerbet.ru
piriform.com
plugring.farmanager.com
privoxy.org
qip.ru
raidcall.com
rambler.ru
reddit.com
ru.wikipedia.org
shallalist.de
skype.com
snob.ru
squid-cache.org
squidclamav.darold.net
squidguard.org
ssl.comodo.com
ssl.verisign.com
symantec.com
symantecliveupdate.com
tele2.kz
tengrinews.kz
thunderbird.com
torproject.org
torstatus.blutmagie.de
translate.google.com
unbound.net
verisign.com
vk.com
vk.me
vk.ru
vkontakte.com
vkontakte.ru
vlc.org
watsapp.net
weather.mail.ru
windowsupdate.com
www.baidu.com
www.bbc.co.uk
www.internic.net
www.opennet.ru
www.topgear.com
ya.ru
yahoo.com
yandex.com
yandex.ru
youtube.com
ytimg.com
EOT
else
echo "Warming up cache from $1 file..."
$cat $1 | $dig -f - @$address >/dev/null 2>&1
fi
echo "Done."
echo "Saving cache..."
script=`which unbound_cache.sh`
[ -f "$script" ] && $script -s
echo "Done."
exit 0
+331 -20
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -45,9 +45,11 @@
#include "util/log.h"
#include "util/config_file.h"
#include "util/net_help.h"
#include "services/localzone.h"
#include "sldns/str2wire.h"
struct acl_list*
acl_list_create()
acl_list_create(void)
{
struct acl_list* acl = (struct acl_list*)calloc(1,
sizeof(struct acl_list));
@@ -71,21 +73,21 @@ acl_list_delete(struct acl_list* acl)
}
/** insert new address into acl_list structure */
static int
static struct acl_addr*
acl_list_insert(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen, int net, enum acl_access control,
int complain_duplicates)
{
struct acl_addr* node = regional_alloc(acl->region,
struct acl_addr* node = regional_alloc_zero(acl->region,
sizeof(struct acl_addr));
if(!node)
return 0;
return NULL;
node->control = control;
if(!addr_tree_insert(&acl->tree, &node->node, addr, addrlen, net)) {
if(complain_duplicates)
verbose(VERB_QUERY, "duplicate acl address ignored.");
}
return 1;
return node;
}
/** apply acl_list string */
@@ -103,6 +105,10 @@ acl_list_str_cfg(struct acl_list* acl, const char* str, const char* s2,
control = acl_deny;
else if(strcmp(s2, "refuse") == 0)
control = acl_refuse;
else if(strcmp(s2, "deny_non_local") == 0)
control = acl_deny_non_local;
else if(strcmp(s2, "refuse_non_local") == 0)
control = acl_refuse_non_local;
else if(strcmp(s2, "allow_snoop") == 0)
control = acl_allow_snoop;
else {
@@ -121,6 +127,205 @@ acl_list_str_cfg(struct acl_list* acl, const char* str, const char* s2,
return 1;
}
/** find or create node (NULL on parse or error) */
static struct acl_addr*
acl_find_or_create(struct acl_list* acl, const char* str)
{
struct acl_addr* node;
struct sockaddr_storage addr;
int net;
socklen_t addrlen;
if(!netblockstrtoaddr(str, UNBOUND_DNS_PORT, &addr, &addrlen, &net)) {
log_err("cannot parse netblock: %s", str);
return NULL;
}
/* find or create node */
if(!(node=(struct acl_addr*)addr_tree_find(&acl->tree, &addr,
addrlen, net))) {
/* create node, type 'allow' since otherwise tags are
* pointless, can override with specific access-control: cfg */
if(!(node=(struct acl_addr*)acl_list_insert(acl, &addr,
addrlen, net, acl_allow, 1))) {
log_err("out of memory");
return NULL;
}
}
return node;
}
/** apply acl_tag string */
static int
acl_list_tags_cfg(struct acl_list* acl, const char* str, uint8_t* bitmap,
size_t bitmaplen)
{
struct acl_addr* node;
if(!(node=acl_find_or_create(acl, str)))
return 0;
node->taglen = bitmaplen;
node->taglist = regional_alloc_init(acl->region, bitmap, bitmaplen);
if(!node->taglist) {
log_err("out of memory");
return 0;
}
return 1;
}
/** apply acl_view string */
static int
acl_list_view_cfg(struct acl_list* acl, const char* str, const char* str2,
struct views* vs)
{
struct acl_addr* node;
if(!(node=acl_find_or_create(acl, str)))
return 0;
node->view = views_find_view(vs, str2, 0 /* get read lock*/);
if(!node->view) {
log_err("no view with name: %s", str2);
return 0;
}
lock_rw_unlock(&node->view->lock);
return 1;
}
/** apply acl_tag_action string */
static int
acl_list_tag_action_cfg(struct acl_list* acl, struct config_file* cfg,
const char* str, const char* tag, const char* action)
{
struct acl_addr* node;
int tagid;
enum localzone_type t;
if(!(node=acl_find_or_create(acl, str)))
return 0;
/* allocate array if not yet */
if(!node->tag_actions) {
node->tag_actions = (uint8_t*)regional_alloc_zero(acl->region,
sizeof(*node->tag_actions)*cfg->num_tags);
if(!node->tag_actions) {
log_err("out of memory");
return 0;
}
node->tag_actions_size = (size_t)cfg->num_tags;
}
/* parse tag */
if((tagid=find_tag_id(cfg, tag)) == -1) {
log_err("cannot parse tag (define-tag it): %s %s", str, tag);
return 0;
}
if((size_t)tagid >= node->tag_actions_size) {
log_err("tagid too large for array %s %s", str, tag);
return 0;
}
if(!local_zone_str2type(action, &t)) {
log_err("cannot parse access control action type: %s %s %s",
str, tag, action);
return 0;
}
node->tag_actions[tagid] = (uint8_t)t;
return 1;
}
/** check wire data parse */
static int
check_data(const char* data, const struct config_strlist* head)
{
char buf[65536];
uint8_t rr[LDNS_RR_BUF_SIZE];
size_t len = sizeof(rr);
int res;
/* '.' is sufficient for validation, and it makes the call to
* sldns_wirerr_get_type() simpler below. */
snprintf(buf, sizeof(buf), "%s %s", ".", data);
res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600, NULL, 0,
NULL, 0);
/* Reject it if we would end up having CNAME and other data (including
* another CNAME) for the same tag. */
if(res == 0 && head) {
const char* err_data = NULL;
if(sldns_wirerr_get_type(rr, len, 1) == LDNS_RR_TYPE_CNAME) {
/* adding CNAME while other data already exists. */
err_data = data;
} else {
snprintf(buf, sizeof(buf), "%s %s", ".", head->str);
len = sizeof(rr);
res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600,
NULL, 0, NULL, 0);
if(res != 0) {
/* This should be impossible here as head->str
* has been validated, but we check it just in
* case. */
return 0;
}
if(sldns_wirerr_get_type(rr, len, 1) ==
LDNS_RR_TYPE_CNAME) /* already have CNAME */
err_data = head->str;
}
if(err_data) {
log_err("redirect tag data '%s' must not coexist with "
"other data.", err_data);
return 0;
}
}
if(res == 0)
return 1;
log_err("rr data [char %d] parse error %s",
(int)LDNS_WIREPARSE_OFFSET(res)-13,
sldns_get_errorstr_parse(res));
return 0;
}
/** apply acl_tag_data string */
static int
acl_list_tag_data_cfg(struct acl_list* acl, struct config_file* cfg,
const char* str, const char* tag, const char* data)
{
struct acl_addr* node;
int tagid;
char* dupdata;
if(!(node=acl_find_or_create(acl, str)))
return 0;
/* allocate array if not yet */
if(!node->tag_datas) {
node->tag_datas = (struct config_strlist**)regional_alloc_zero(
acl->region, sizeof(*node->tag_datas)*cfg->num_tags);
if(!node->tag_datas) {
log_err("out of memory");
return 0;
}
node->tag_datas_size = (size_t)cfg->num_tags;
}
/* parse tag */
if((tagid=find_tag_id(cfg, tag)) == -1) {
log_err("cannot parse tag (define-tag it): %s %s", str, tag);
return 0;
}
if((size_t)tagid >= node->tag_datas_size) {
log_err("tagid too large for array %s %s", str, tag);
return 0;
}
/* check data? */
if(!check_data(data, node->tag_datas[tagid])) {
log_err("cannot parse access-control-tag data: %s %s '%s'",
str, tag, data);
return 0;
}
dupdata = regional_strdup(acl->region, data);
if(!dupdata) {
log_err("out of memory");
return 0;
}
if(!cfg_region_strlist_insert(acl->region,
&(node->tag_datas[tagid]), dupdata)) {
log_err("out of memory");
return 0;
}
return 1;
}
/** read acl_list config */
static int
read_acl_list(struct acl_list* acl, struct config_file* cfg)
@@ -134,13 +339,114 @@ read_acl_list(struct acl_list* acl, struct config_file* cfg)
return 1;
}
/** read acl tags config */
static int
read_acl_tags(struct acl_list* acl, struct config_file* cfg)
{
struct config_strbytelist* np, *p = cfg->acl_tags;
cfg->acl_tags = NULL;
while(p) {
log_assert(p->str && p->str2);
if(!acl_list_tags_cfg(acl, p->str, p->str2, p->str2len)) {
config_del_strbytelist(p);
return 0;
}
/* free the items as we go to free up memory */
np = p->next;
free(p->str);
free(p->str2);
free(p);
p = np;
}
return 1;
}
/** read acl view config */
static int
read_acl_view(struct acl_list* acl, struct config_file* cfg, struct views* v)
{
struct config_str2list* np, *p = cfg->acl_view;
cfg->acl_view = NULL;
while(p) {
log_assert(p->str && p->str2);
if(!acl_list_view_cfg(acl, p->str, p->str2, v)) {
return 0;
}
/* free the items as we go to free up memory */
np = p->next;
free(p->str);
free(p->str2);
free(p);
p = np;
}
return 1;
}
/** read acl tag actions config */
static int
read_acl_tag_actions(struct acl_list* acl, struct config_file* cfg)
{
struct config_str3list* p, *np;
p = cfg->acl_tag_actions;
cfg->acl_tag_actions = NULL;
while(p) {
log_assert(p->str && p->str2 && p->str3);
if(!acl_list_tag_action_cfg(acl, cfg, p->str, p->str2,
p->str3)) {
config_deltrplstrlist(p);
return 0;
}
/* free the items as we go to free up memory */
np = p->next;
free(p->str);
free(p->str2);
free(p->str3);
free(p);
p = np;
}
return 1;
}
/** read acl tag datas config */
static int
read_acl_tag_datas(struct acl_list* acl, struct config_file* cfg)
{
struct config_str3list* p, *np;
p = cfg->acl_tag_datas;
cfg->acl_tag_datas = NULL;
while(p) {
log_assert(p->str && p->str2 && p->str3);
if(!acl_list_tag_data_cfg(acl, cfg, p->str, p->str2, p->str3)) {
config_deltrplstrlist(p);
return 0;
}
/* free the items as we go to free up memory */
np = p->next;
free(p->str);
free(p->str2);
free(p->str3);
free(p);
p = np;
}
return 1;
}
int
acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg)
acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg,
struct views* v)
{
regional_free_all(acl->region);
addr_tree_init(&acl->tree);
if(!read_acl_list(acl, cfg))
return 0;
if(!read_acl_view(acl, cfg, v))
return 0;
if(!read_acl_tags(acl, cfg))
return 0;
if(!read_acl_tag_actions(acl, cfg))
return 0;
if(!read_acl_tag_datas(acl, cfg))
return 0;
/* insert defaults, with '0' to ignore them if they are duplicates */
if(!acl_list_str_cfg(acl, "0.0.0.0/0", "refuse", 0))
return 0;
@@ -159,13 +465,18 @@ acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg)
}
enum acl_access
acl_list_lookup(struct acl_list* acl, struct sockaddr_storage* addr,
acl_get_control(struct acl_addr* acl)
{
if(acl) return acl->control;
return acl_deny;
}
struct acl_addr*
acl_addr_lookup(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen)
{
struct acl_addr* r = (struct acl_addr*)addr_tree_lookup(&acl->tree,
return (struct acl_addr*)addr_tree_lookup(&acl->tree,
addr, addrlen);
if(r) return r->control;
return acl_deny;
}
size_t
+46 -16
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -43,6 +43,7 @@
#ifndef DAEMON_ACL_LIST_H
#define DAEMON_ACL_LIST_H
#include "util/storage/dnstree.h"
#include "services/view.h"
struct config_file;
struct regional;
@@ -55,6 +56,10 @@ enum acl_access {
acl_deny = 0,
/** disallow access, send a polite 'REFUSED' reply */
acl_refuse,
/** disallow any access to zones that aren't local, drop it */
acl_deny_non_local,
/** disallow access to zones that aren't local, 'REFUSED' reply */
acl_refuse_non_local,
/** allow full access for recursion (+RD) queries */
acl_allow,
/** allow full access for all queries, recursion and cache snooping */
@@ -83,13 +88,28 @@ struct acl_addr {
struct addr_tree_node node;
/** access control on this netblock */
enum acl_access control;
/** tag bitlist */
uint8_t* taglist;
/** length of the taglist (in bytes) */
size_t taglen;
/** array per tagnumber of localzonetype(in one byte). NULL if none. */
uint8_t* tag_actions;
/** size of the tag_actions_array */
size_t tag_actions_size;
/** array per tagnumber, with per tag a list of rdata strings.
* NULL if none. strings are like 'A 127.0.0.1' 'AAAA ::1' */
struct config_strlist** tag_datas;
/** size of the tag_datas array */
size_t tag_datas_size;
/* view element, NULL if none */
struct view* view;
};
/**
* 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.
@@ -101,19 +121,29 @@ void acl_list_delete(struct acl_list* acl);
* Process access control config.
* @param acl: where to store.
* @param cfg: config options.
* @param v: views structure
* @return 0 on error.
*/
int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg);
int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg,
struct views* v);
/**
* Lookup address to see its access control status.
* Lookup access control status for acl structure.
* @param acl: structure for acl storage.
* @return: what to do with message from this address.
*/
enum acl_access acl_get_control(struct acl_addr* acl);
/**
* Lookup address to see its acl structure
* @param acl: structure for address storage.
* @param addr: address to check
* @param addrlen: length of addr.
* @return: what to do with message from this address.
* @return: acl structure from this address.
*/
enum acl_access acl_list_lookup(struct acl_list* acl,
struct sockaddr_storage* addr, socklen_t addrlen);
struct acl_addr*
acl_addr_lookup(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen);
/**
* Get memory used by acl structure.
+278 -236
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -40,81 +40,41 @@
* to text format.
*/
#include "config.h"
#include <openssl/ssl.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"
/** convert to ldns rr */
static ldns_rr*
to_rr(struct ub_packed_rrset_key* k, struct packed_rrset_data* d,
uint32_t now, size_t i, uint16_t type)
{
ldns_rr* rr = ldns_rr_new();
ldns_rdf* rdf;
ldns_status status;
size_t pos;
log_assert(i < d->count + d->rrsig_count);
if(!rr) {
return NULL;
}
ldns_rr_set_type(rr, type);
ldns_rr_set_class(rr, ntohs(k->rk.rrset_class));
if(d->rr_ttl[i] < now)
ldns_rr_set_ttl(rr, 0);
else ldns_rr_set_ttl(rr, d->rr_ttl[i] - now);
pos = 0;
status = ldns_wire2dname(&rdf, k->rk.dname, k->rk.dname_len, &pos);
if(status != LDNS_STATUS_OK) {
/* we drop detailed error in status */
ldns_rr_free(rr);
return NULL;
}
ldns_rr_set_owner(rr, rdf);
pos = 0;
status = ldns_wire2rdf(rr, d->rr_data[i], d->rr_len[i], &pos);
if(status != LDNS_STATUS_OK) {
/* we drop detailed error in status */
ldns_rr_free(rr);
return NULL;
}
return rr;
}
#include "iterator/iter_fwd.h"
#include "iterator/iter_hints.h"
#include "sldns/sbuffer.h"
#include "sldns/wire2str.h"
#include "sldns/str2wire.h"
/** dump one rrset zonefile line */
static int
dump_rrset_line(SSL* ssl, struct ub_packed_rrset_key* k,
struct packed_rrset_data* d, uint32_t now, size_t i, uint16_t type)
dump_rrset_line(SSL* ssl, struct ub_packed_rrset_key* k, time_t now, size_t i)
{
char* s;
ldns_rr* rr = to_rr(k, d, now, i, type);
if(!rr) {
char s[65535];
if(!packed_rr_to_string(k, i, now, s, sizeof(s))) {
return ssl_printf(ssl, "BADRR\n");
}
s = ldns_rr2str(rr);
ldns_rr_free(rr);
if(!s) {
return ssl_printf(ssl, "BADRR\n");
}
if(!ssl_printf(ssl, "%s", s)) {
free(s);
return 0;
}
free(s);
return 1;
return ssl_printf(ssl, "%s", s);
}
/** dump rrset key and data info */
static int
dump_rrset(SSL* ssl, struct ub_packed_rrset_key* k,
struct packed_rrset_data* d, uint32_t now)
struct packed_rrset_data* d, time_t now)
{
size_t i;
/* rd lock held by caller */
@@ -122,29 +82,23 @@ dump_rrset(SSL* ssl, struct ub_packed_rrset_key* k,
if(d->ttl < now) return 1; /* expired */
/* meta line */
if(!ssl_printf(ssl, ";rrset%s %u %u %u %d %d\n",
if(!ssl_printf(ssl, ";rrset%s " ARG_LL "d %u %u %d %d\n",
(k->rk.flags & PACKED_RRSET_NSEC_AT_APEX)?" nsec_apex":"",
(unsigned)(d->ttl - now),
(long long)(d->ttl - now),
(unsigned)d->count, (unsigned)d->rrsig_count,
(int)d->trust, (int)d->security
))
return 0;
for(i=0; i<d->count; i++) {
if(!dump_rrset_line(ssl, k, d, now, i, ntohs(k->rk.type)))
for(i=0; i<d->count + d->rrsig_count; i++) {
if(!dump_rrset_line(ssl, k, now, i))
return 0;
}
for(i=0; i<d->rrsig_count; i++) {
if(!dump_rrset_line(ssl, k, d, now, i+d->count,
LDNS_RR_TYPE_RRSIG))
return 0;
}
return 1;
}
/** dump lruhash rrset cache */
static int
dump_rrset_lruhash(SSL* ssl, struct lruhash* h, uint32_t now)
dump_rrset_lruhash(SSL* ssl, struct lruhash* h, time_t now)
{
struct lruhash_entry* e;
/* lruhash already locked by caller */
@@ -184,20 +138,10 @@ dump_rrset_cache(SSL* ssl, struct worker* worker)
static int
dump_msg_ref(SSL* ssl, struct ub_packed_rrset_key* k)
{
ldns_rdf* rdf;
ldns_status status;
size_t pos;
char* nm, *tp, *cl;
pos = 0;
status = ldns_wire2dname(&rdf, k->rk.dname, k->rk.dname_len, &pos);
if(status != LDNS_STATUS_OK) {
return ssl_printf(ssl, "BADREF\n");
}
nm = ldns_rdf2str(rdf);
ldns_rdf_deep_free(rdf);
tp = ldns_rr_type2str(ntohs(k->rk.type));
cl = ldns_rr_class2str(ntohs(k->rk.rrset_class));
nm = sldns_wire2str_dname(k->rk.dname, k->rk.dname_len);
tp = sldns_wire2str_type(ntohs(k->rk.type));
cl = sldns_wire2str_class(ntohs(k->rk.rrset_class));
if(!nm || !cl || !tp) {
free(nm);
free(tp);
@@ -220,25 +164,16 @@ dump_msg_ref(SSL* ssl, struct ub_packed_rrset_key* k)
/** dump message entry */
static int
dump_msg(SSL* ssl, struct query_info* k, struct reply_info* d,
uint32_t now)
time_t now)
{
size_t i;
char* nm, *tp, *cl;
ldns_rdf* rdf;
ldns_status status;
size_t pos;
if(!k || !d) return 1;
if(d->ttl < now) return 1; /* expired */
pos = 0;
status = ldns_wire2dname(&rdf, k->qname, k->qname_len, &pos);
if(status != LDNS_STATUS_OK) {
return 1; /* skip this entry */
}
nm = ldns_rdf2str(rdf);
ldns_rdf_deep_free(rdf);
tp = ldns_rr_type2str(k->qtype);
cl = ldns_rr_class2str(k->qclass);
nm = sldns_wire2str_dname(k->qname, k->qname_len);
tp = sldns_wire2str_type(k->qtype);
cl = sldns_wire2str_class(k->qclass);
if(!nm || !tp || !cl) {
free(nm);
free(tp);
@@ -254,10 +189,10 @@ dump_msg(SSL* ssl, struct query_info* k, struct reply_info* d,
}
/* meta line */
if(!ssl_printf(ssl, "msg %s %s %s %d %d %u %d %u %u %u\n",
if(!ssl_printf(ssl, "msg %s %s %s %d %d " ARG_LL "d %d %u %u %u\n",
nm, cl, tp,
(int)d->flags, (int)d->qdcount,
(unsigned)(d->ttl-now), (int)d->security,
(long long)(d->ttl-now), (int)d->security,
(unsigned)d->an_numrrsets,
(unsigned)d->ns_numrrsets,
(unsigned)d->ar_numrrsets)) {
@@ -288,13 +223,15 @@ copy_msg(struct regional* region, struct lruhash_entry* e,
struct query_info** k, struct reply_info** d)
{
struct reply_info* rep = (struct reply_info*)e->data;
if(rep->rrset_count > RR_COUNT_MAX)
return 0; /* to protect against integer overflow */
*d = (struct reply_info*)regional_alloc_init(region, e->data,
sizeof(struct reply_info) +
sizeof(struct rrset_ref) * (rep->rrset_count-1) +
sizeof(struct ub_packed_rrset_key*) * rep->rrset_count);
if(!*d)
return 0;
(*d)->rrsets = (struct ub_packed_rrset_key**)(
(*d)->rrsets = (struct ub_packed_rrset_key**)(void *)(
(uint8_t*)(&((*d)->ref[0])) +
sizeof(struct rrset_ref) * rep->rrset_count);
*k = (struct query_info*)regional_alloc_init(region,
@@ -364,98 +301,81 @@ dump_cache(SSL* ssl, struct worker* worker)
/** read a line from ssl into buffer */
static int
ssl_read_buf(SSL* ssl, ldns_buffer* buf)
ssl_read_buf(SSL* ssl, sldns_buffer* buf)
{
return ssl_read_line(ssl, (char*)ldns_buffer_begin(buf),
ldns_buffer_capacity(buf));
return ssl_read_line(ssl, (char*)sldns_buffer_begin(buf),
sldns_buffer_capacity(buf));
}
/** check fixed text on line */
static int
read_fixed(SSL* ssl, ldns_buffer* buf, const char* str)
read_fixed(SSL* ssl, sldns_buffer* buf, const char* str)
{
if(!ssl_read_buf(ssl, buf)) return 0;
return (strcmp((char*)ldns_buffer_begin(buf), str) == 0);
return (strcmp((char*)sldns_buffer_begin(buf), str) == 0);
}
/** load an RR into rrset */
static int
load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
load_rr(SSL* ssl, sldns_buffer* buf, struct regional* region,
struct ub_packed_rrset_key* rk, struct packed_rrset_data* d,
unsigned int i, int is_rrsig, int* go_on, uint32_t now)
unsigned int i, int is_rrsig, int* go_on, time_t now)
{
ldns_rr* rr;
ldns_status status;
uint8_t rr[LDNS_RR_BUF_SIZE];
size_t rr_len = sizeof(rr), dname_len = 0;
int status;
/* read the line */
if(!ssl_read_buf(ssl, buf))
return 0;
if(strncmp((char*)ldns_buffer_begin(buf), "BADRR\n", 6) == 0) {
if(strncmp((char*)sldns_buffer_begin(buf), "BADRR\n", 6) == 0) {
*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",
ldns_get_errorstr_by_id(status),
(char*)ldns_buffer_begin(buf));
status = sldns_str2wire_rr_buf((char*)sldns_buffer_begin(buf), rr,
&rr_len, &dname_len, 3600, NULL, 0, NULL, 0);
if(status != 0) {
log_warn("error cannot parse rr: %s: %s",
sldns_get_errorstr_parse(status),
(char*)sldns_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",
(char*)ldns_buffer_begin(buf));
if(is_rrsig && sldns_wirerr_get_type(rr, rr_len, dname_len)
!= LDNS_RR_TYPE_RRSIG) {
log_warn("error expected rrsig but got %s",
(char*)sldns_buffer_begin(buf));
return 0;
}
/* convert ldns rr into packed_rr */
d->rr_ttl[i] = ldns_rr_ttl(rr) + now;
ldns_buffer_clear(buf);
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",
ldns_get_errorstr_by_id(status));
ldns_rr_free(rr);
return 0;
}
ldns_buffer_flip(buf);
ldns_buffer_write_u16_at(buf, 0, ldns_buffer_limit(buf) - 2);
d->rr_len[i] = ldns_buffer_limit(buf);
d->rr_ttl[i] = (time_t)sldns_wirerr_get_ttl(rr, rr_len, dname_len) + now;
sldns_buffer_clear(buf);
d->rr_len[i] = sldns_wirerr_get_rdatalen(rr, rr_len, dname_len)+2;
d->rr_data[i] = (uint8_t*)regional_alloc_init(region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
sldns_wirerr_get_rdatawl(rr, rr_len, dname_len), d->rr_len[i]);
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;
}
/* if first entry, fill the key structure */
if(i==0) {
rk->rk.type = htons(ldns_rr_get_type(rr));
rk->rk.rrset_class = htons(ldns_rr_get_class(rr));
ldns_buffer_clear(buf);
status = ldns_dname2buffer_wire(buf, ldns_rr_owner(rr));
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));
rk->rk.type = htons(sldns_wirerr_get_type(rr, rr_len, dname_len));
rk->rk.rrset_class = htons(sldns_wirerr_get_class(rr, rr_len, dname_len));
rk->rk.dname_len = dname_len;
rk->rk.dname = regional_alloc_init(region, rr, dname_len);
if(!rk->rk.dname) {
(void)ssl_printf(ssl, "error out of memory\n");
ldns_rr_free(rr);
log_warn("error out of memory");
return 0;
}
}
ldns_rr_free(rr);
return 1;
}
/** 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 +386,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,16 +394,17 @@ 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;
}
s = sizeof(*ad) + (sizeof(size_t) + sizeof(uint8_t*) +
sizeof(uint32_t))* num;
sizeof(time_t))* num;
for(i=0; i<num; i++)
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;
}
@@ -494,8 +415,8 @@ move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
p += sizeof(size_t)*num;
memmove(p, &d->rr_data[0], sizeof(uint8_t*)*num);
p += sizeof(uint8_t*)*num;
memmove(p, &d->rr_ttl[0], sizeof(uint32_t)*num);
p += sizeof(uint32_t)*num;
memmove(p, &d->rr_ttl[0], sizeof(time_t)*num);
p += sizeof(time_t)*num;
for(i=0; i<num; i++) {
memmove(p, d->rr_data[i], d->rr_len[i]);
p += d->rr_len[i];
@@ -513,13 +434,14 @@ move_into_cache(SSL* ssl, struct ub_packed_rrset_key* k,
/** load an rrset entry */
static int
load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
load_rrset(SSL* ssl, sldns_buffer* buf, struct worker* worker)
{
char* s = (char*)ldns_buffer_begin(buf);
char* s = (char*)sldns_buffer_begin(buf);
struct regional* region = worker->scratchpad;
struct ub_packed_rrset_key* rk;
struct packed_rrset_data* d;
unsigned int ttl, rr_count, rrsig_count, trust, security;
unsigned int rr_count, rrsig_count, trust, security;
long long ttl;
unsigned int i;
int go_on = 1;
regional_free_all(region);
@@ -528,13 +450,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;
@@ -542,27 +463,33 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
s += 10;
rk->rk.flags |= PACKED_RRSET_NSEC_AT_APEX;
}
if(sscanf(s, " %u %u %u %u %u", &ttl, &rr_count, &rrsig_count,
if(sscanf(s, " " ARG_LL "d %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;
}
if(rr_count > RR_COUNT_MAX || rrsig_count > RR_COUNT_MAX) {
log_warn("bad rrset with too many rrs");
return 0;
}
d->count = (size_t)rr_count;
d->rrsig_count = (size_t)rrsig_count;
d->security = (enum sec_status)security;
d->trust = (enum rrset_trust)trust;
d->ttl = (uint32_t)ttl + *worker->env.now;
d->ttl = (time_t)ttl + *worker->env.now;
d->rr_len = regional_alloc_zero(region,
sizeof(size_t)*(d->count+d->rrsig_count));
d->rr_ttl = regional_alloc_zero(region,
sizeof(uint32_t)*(d->count+d->rrsig_count));
sizeof(time_t)*(d->count+d->rrsig_count));
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 +497,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,17 +513,17 @@ 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 */
static int
load_rrset_cache(SSL* ssl, struct worker* worker)
{
ldns_buffer* buf = worker->env.scratch_buffer;
sldns_buffer* buf = worker->env.scratch_buffer;
if(!read_fixed(ssl, buf, "START_RRSET_CACHE")) return 0;
while(ssl_read_buf(ssl, buf) &&
strcmp((char*)ldns_buffer_begin(buf), "END_RRSET_CACHE")!=0) {
strcmp((char*)sldns_buffer_begin(buf), "END_RRSET_CACHE")!=0) {
if(!load_rrset(ssl, buf, worker))
return 0;
}
@@ -603,48 +532,40 @@ 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)
load_qinfo(char* str, struct query_info* qinfo, struct regional* region)
{
/* s is part of the buf */
char* s = str;
ldns_rr* rr;
ldns_status status;
uint8_t rr[LDNS_RR_BUF_SIZE];
size_t rr_len = sizeof(rr), dname_len = 0;
int status;
/* skip three words */
s = strchr(str, ' ');
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;
s++;
/* 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",
ldns_get_errorstr_by_id(status), str);
status = sldns_str2wire_rr_question_buf(str, rr, &rr_len, &dname_len,
NULL, 0, NULL, 0);
if(status != 0) {
log_warn("error cannot parse: %s %s",
sldns_get_errorstr_parse(status), str);
return NULL;
}
qinfo->qtype = ldns_rr_get_type(rr);
qinfo->qclass = ldns_rr_get_class(rr);
ldns_buffer_clear(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",
ldns_get_errorstr_by_id(status));
return NULL;
}
ldns_buffer_flip(buf);
qinfo->qname_len = ldns_buffer_limit(buf);
qinfo->qname = (uint8_t*)regional_alloc_init(region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
qinfo->qtype = sldns_wirerr_get_type(rr, rr_len, dname_len);
qinfo->qclass = sldns_wirerr_get_class(rr, rr_len, dname_len);
qinfo->qname_len = dname_len;
qinfo->qname = (uint8_t*)regional_alloc_init(region, rr, dname_len);
qinfo->local_alias = NULL;
if(!qinfo->qname) {
(void)ssl_printf(ssl, "error out of memory\n");
log_warn("error out of memory");
return NULL;
}
@@ -653,11 +574,11 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
/** load a msg rrset reference */
static int
load_ref(SSL* ssl, ldns_buffer* buf, struct worker* worker,
load_ref(SSL* ssl, sldns_buffer* buf, struct worker* worker,
struct regional *region, struct ub_packed_rrset_key** rrset,
int* go_on)
{
char* s = (char*)ldns_buffer_begin(buf);
char* s = (char*)sldns_buffer_begin(buf);
struct query_info qinfo;
unsigned int flags;
struct ub_packed_rrset_key* k;
@@ -670,12 +591,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, 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;
}
@@ -698,38 +619,44 @@ load_ref(SSL* ssl, ldns_buffer* buf, struct worker* worker,
/** load a msg entry */
static int
load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
load_msg(SSL* ssl, sldns_buffer* buf, struct worker* worker)
{
struct regional* region = worker->scratchpad;
struct query_info qinf;
struct reply_info rep;
char* s = (char*)ldns_buffer_begin(buf);
unsigned int flags, qdcount, ttl, security, an, ns, ar;
char* s = (char*)sldns_buffer_begin(buf);
unsigned int flags, qdcount, security, an, ns, ar;
long long ttl;
size_t i;
int go_on = 1;
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, region);
if(!s) {
return 0;
}
/* read remainder of line */
if(sscanf(s, " %u %u %u %u %u %u %u", &flags, &qdcount, &ttl,
if(sscanf(s, " %u %u " ARG_LL "d %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.ttl = (time_t)ttl;
rep.prefetch_ttl = PREFETCH_TTL_CALC(rep.ttl);
rep.security = (enum sec_status)security;
if(an > RR_COUNT_MAX || ns > RR_COUNT_MAX || ar > RR_COUNT_MAX) {
log_warn("error too many rrsets");
return 0; /* protect against integer overflow in alloc */
}
rep.an_numrrsets = (size_t)an;
rep.ns_numrrsets = (size_t)ns;
rep.ar_numrrsets = (size_t)ar;
@@ -748,8 +675,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, flags)) {
log_warn("error out of memory");
return 0;
}
return 1;
@@ -759,10 +686,10 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
static int
load_msg_cache(SSL* ssl, struct worker* worker)
{
ldns_buffer* buf = worker->env.scratch_buffer;
sldns_buffer* buf = worker->env.scratch_buffer;
if(!read_fixed(ssl, buf, "START_MSG_CACHE")) return 0;
while(ssl_read_buf(ssl, buf) &&
strcmp((char*)ldns_buffer_begin(buf), "END_MSG_CACHE")!=0) {
strcmp((char*)sldns_buffer_begin(buf), "END_MSG_CACHE")!=0) {
if(!load_msg(ssl, buf, worker))
return 0;
}
@@ -779,6 +706,112 @@ 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,
tA = 0, tAAAA = 0, tother = 0;
long long entry_ttl;
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 " ARG_LL "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,18 +821,28 @@ 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;
qinfo.qtype = LDNS_RR_TYPE_A;
qinfo.qclass = LDNS_RR_CLASS_IN;
qinfo.local_alias = NULL;
dname_str(nm, b);
if(!ssl_printf(ssl, "The following name servers are used for lookup "
"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 +851,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 +872,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;
+10 -10
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
+266 -34
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -40,6 +40,32 @@
*/
#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_TIME_H
#include <time.h>
#endif
#include <sys/time.h>
#ifdef HAVE_NSS
/* nss3 */
#include "nss.h"
#endif
#include "daemon/daemon.h"
#include "daemon/worker.h"
#include "daemon/remote.h"
@@ -47,15 +73,19 @@
#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"
#include "services/cache/infra.h"
#include "services/localzone.h"
#include "services/view.h"
#include "services/modstack.h"
#include "util/module.h"
#include "util/random.h"
#include "util/tube.h"
#include "util/net_help.h"
#include "sldns/keyraw.h"
#include <signal.h>
/** How many quit requests happened. */
@@ -63,6 +93,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.
@@ -71,8 +110,9 @@ static int sig_record_reload = 0;
static RETSIGTYPE record_sigh(int sig)
{
#ifdef LIBEVENT_SIGNAL_PROBLEM
verbose(VERB_OPS, "quit on signal, no cleanup and statistics, "
"because installed libevent version is not threadsafe");
/* cannot log, verbose here because locks may be held */
/* quit on signal, no cleanup and statistics,
because installed libevent version is not threadsafe */
exit(0);
#endif
switch(sig)
@@ -97,7 +137,8 @@ static RETSIGTYPE record_sigh(int sig)
break;
#endif
default:
log_err("ignoring signal %d", sig);
/* ignoring signal */
break;
}
}
@@ -106,7 +147,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 +185,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 +204,44 @@ daemon_init()
#endif /* USE_WINSOCK */
signal_handling_record();
checklock_start();
#ifdef HAVE_SSL
# ifdef HAVE_ERR_LOAD_CRYPTO_STRINGS
ERR_load_crypto_strings();
# endif
ERR_load_SSL_strings();
# ifdef USE_GOST
(void)sldns_key_EVP_load_gost_id();
# endif
# if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO)
OpenSSL_add_all_algorithms();
# else
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
| OPENSSL_INIT_ADD_ALL_DIGESTS
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
# endif
# 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
# if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_SSL)
(void)SSL_library_init();
# else
(void)OPENSSL_init_ssl(0, NULL);
# endif
# if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
if(!ub_openssl_lock_init())
fatal_exit("could not init openssl locks");
# endif
#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,
@@ -178,9 +249,16 @@ daemon_init()
free(daemon);
return NULL;
}
/* init edns_known_options */
if(!edns_known_options_init(daemon->env)) {
free(daemon->env);
free(daemon);
return NULL;
}
alloc_init(&daemon->superalloc, NULL, 0);
daemon->acl = acl_list_create();
if(!daemon->acl) {
edns_known_options_delete(daemon->env);
free(daemon->env);
free(daemon);
return NULL;
@@ -196,9 +274,56 @@ daemon_open_shared_ports(struct daemon* daemon)
{
log_assert(daemon);
if(daemon->cfg->port != daemon->listening_port) {
listening_ports_free(daemon->ports);
if(!(daemon->ports=listening_ports_open(daemon->cfg)))
size_t i;
struct listen_port* p0;
daemon->reuseport = 0;
/* free and close old ports */
if(daemon->ports != NULL) {
for(i=0; i<daemon->num_ports; i++)
listening_ports_free(daemon->ports[i]);
free(daemon->ports);
daemon->ports = NULL;
}
/* see if we want to reuseport */
#ifdef SO_REUSEPORT
if(daemon->cfg->so_reuseport && daemon->cfg->num_threads > 0)
daemon->reuseport = 1;
#endif
/* try to use reuseport */
p0 = listening_ports_open(daemon->cfg, &daemon->reuseport);
if(!p0) {
listening_ports_free(p0);
return 0;
}
if(daemon->reuseport) {
/* reuseport was successful, allocate for it */
daemon->num_ports = (size_t)daemon->cfg->num_threads;
} else {
/* do the normal, singleportslist thing,
* reuseport not enabled or did not work */
daemon->num_ports = 1;
}
if(!(daemon->ports = (struct listen_port**)calloc(
daemon->num_ports, sizeof(*daemon->ports)))) {
listening_ports_free(p0);
return 0;
}
daemon->ports[0] = p0;
if(daemon->reuseport) {
/* continue to use reuseport */
for(i=1; i<daemon->num_ports; i++) {
if(!(daemon->ports[i]=
listening_ports_open(daemon->cfg,
&daemon->reuseport))
|| !daemon->reuseport ) {
for(i=0; i<daemon->num_ports; i++)
listening_ports_free(daemon->ports[i]);
free(daemon->ports);
daemon->ports = NULL;
return 0;
}
}
}
daemon->listening_port = daemon->cfg->port;
}
if(!daemon->cfg->remote_control_enable && daemon->rc_port) {
@@ -230,6 +355,7 @@ static void daemon_setup_modules(struct daemon* daemon)
daemon->env)) {
fatal_exit("failed to setup modules");
}
log_edns_known_options(VERB_ALGO, daemon->env);
}
/**
@@ -239,7 +365,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 +381,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,15 +409,35 @@ 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);
if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) {
log_warn("cannot reduce num-threads to %d because so-reuseport "
"so continuing with %d threads.", (int)daemon->num,
(int)daemon->num_ports);
daemon->num = (int)daemon->num_ports;
}
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
sizeof(struct worker*));
if(!daemon->workers)
fatal_exit("out of memory during daemon init");
if(daemon->cfg->dnstap) {
#ifdef USE_DNSTAP
daemon->dtenv = dt_create(daemon->cfg->dnstap_socket_path,
(unsigned int)daemon->num);
if (!daemon->dtenv)
fatal_exit("dt_create failed");
dt_apply_cfg(daemon->dtenv, daemon->cfg);
#else
fatal_exit("dnstap enabled in config but not built with dnstap support");
#endif
}
for(i=0; i<daemon->num; i++) {
if(!(daemon->workers[i] = worker_create(daemon, i,
shufport+numport*i/daemon->num,
@@ -302,12 +448,13 @@ 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++)
@@ -322,6 +469,7 @@ void close_other_pipes(struct daemon* daemon, int thr)
}
}
}
#endif /* THREADS_DISABLED */
/**
* Function to start one thread.
@@ -332,6 +480,7 @@ static void*
thread_start(void* arg)
{
struct worker* worker = (struct worker*)arg;
int port_num = 0;
log_thread_set(&worker->thread_num);
ub_thread_blocksigs();
#ifdef THREADS_DISABLED
@@ -339,7 +488,14 @@ thread_start(void* arg)
tube_close_write(worker->cmd);
close_other_pipes(worker->daemon, worker->thread_num);
#endif
if(!worker_init(worker, worker->daemon->cfg, worker->daemon->ports, 0))
#ifdef SO_REUSEPORT
if(worker->daemon->cfg->so_reuseport)
port_num = worker->thread_num % worker->daemon->num_ports;
else
port_num = 0;
#endif
if(!worker_init(worker, worker->daemon->cfg,
worker->daemon->ports[port_num], 0))
fatal_exit("Could not initialize thread");
worker_work(worker);
@@ -395,8 +551,15 @@ void
daemon_fork(struct daemon* daemon)
{
log_assert(daemon);
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg))
if(!(daemon->views = views_create()))
fatal_exit("Could not create views: out of memory");
/* create individual views and their localzone/data trees */
if(!views_apply_cfg(daemon->views, daemon->cfg))
fatal_exit("Could not set up views");
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->views))
fatal_exit("Could not setup access control list");
/* create global local_zones */
if(!(daemon->local_zones = local_zones_create()))
fatal_exit("Could not create local zones: out of memory");
if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg))
@@ -410,9 +573,9 @@ daemon_fork(struct daemon* daemon)
*/
daemon_create_workers(daemon);
#ifdef HAVE_EV_LOOP
#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))
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
fatal_exit("Could not initialize main thread");
#endif
@@ -424,9 +587,9 @@ daemon_fork(struct daemon* daemon)
/* Special handling for the main thread. This is the thread
* that handles signals and remote control.
*/
#ifndef HAVE_EV_LOOP
#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))
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
fatal_exit("Could not initialize main thread");
#endif
signal_handling_playback(daemon->workers[0]);
@@ -453,33 +616,44 @@ daemon_cleanup(struct daemon* daemon)
log_thread_set(NULL);
/* clean up caches because
* a) RRset IDs will be recycled after a reload, causing collisions
* b) validation config can change, thus rrset, msg, keycache clear
* The infra cache is kept, the timing and edns info is still valid */
* b) validation config can change, thus rrset, msg, keycache clear */
slabhash_clear(&daemon->env->rrset_cache->table);
slabhash_clear(daemon->env->msg_cache);
local_zones_delete(daemon->local_zones);
daemon->local_zones = NULL;
/* key cache is cleared by module desetup during next daemon_init() */
views_delete(daemon->views);
daemon->views = NULL;
/* key cache is cleared by module desetup during next daemon_fork() */
daemon_remote_clear(daemon->rc);
for(i=0; i<daemon->num; i++)
worker_delete(daemon->workers[i]);
free(daemon->workers);
daemon->workers = NULL;
daemon->num = 0;
#ifdef USE_DNSTAP
dt_delete(daemon->dtenv);
#endif
daemon->cfg = NULL;
}
void
daemon_delete(struct daemon* daemon)
{
size_t i;
if(!daemon)
return;
modstack_desetup(&daemon->mods, daemon->env);
listening_ports_free(daemon->ports);
daemon_remote_delete(daemon->rc);
for(i = 0; i < daemon->num_ports; i++)
listening_ports_free(daemon->ports[i]);
free(daemon->ports);
listening_ports_free(daemon->rc_ports);
if(daemon->env) {
slabhash_delete(daemon->env->msg_cache);
rrset_cache_delete(daemon->env->rrset_cache);
infra_delete(daemon->env->infra_cache);
edns_known_options_delete(daemon->env);
inplace_cb_lists_delete(daemon->env);
}
ub_randfree(daemon->rand);
alloc_clear(&daemon->superalloc);
@@ -487,15 +661,49 @@ daemon_delete(struct daemon* daemon)
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)
sldns_key_EVP_unload_gost();
# endif
# if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS && HAVE_DECL_SK_SSL_COMP_POP_FREE
# ifndef S_SPLINT_S
# if OPENSSL_VERSION_NUMBER < 0x10100000
sk_SSL_COMP_pop_free(comp_meth, (void(*)())CRYPTO_free);
# endif
# endif
# endif
# ifdef HAVE_OPENSSL_CONFIG
EVP_cleanup();
/* ENGINE_cleanup(); */
# if OPENSSL_VERSION_NUMBER < 0x10100000
ENGINE_cleanup();
# endif
CONF_modules_free();
# endif
# ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
CRYPTO_cleanup_all_ex_data(); /* safe, no more threads right now */
ERR_remove_state(0);
# endif
# ifdef HAVE_ERR_FREE_STRINGS
ERR_free_strings();
# endif
# if OPENSSL_VERSION_NUMBER < 0x10100000
RAND_cleanup();
# endif
# if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
ub_openssl_lock_delete();
# endif
#elif defined(HAVE_NSS)
NSS_Shutdown();
#endif /* HAVE_SSL or HAVE_NSS */
checklock_stop();
#ifdef USE_WINSOCK
if(WSACleanup() != 0) {
@@ -504,3 +712,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");
}
+43 -14
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -53,7 +53,14 @@ struct module_env;
struct rrset_cache;
struct acl_list;
struct local_zones;
struct views;
struct ub_randstate;
struct daemon_remote;
#include "dnstap/dnstap_config.h"
#ifdef USE_DNSTAP
struct dt_env;
#endif
/**
* Structure holding worker list.
@@ -68,12 +75,21 @@ struct daemon {
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. */
/** array of listening ports, opened. Listening ports per worker,
* or just one element[0] shared by the worker threads. */
struct listen_port** ports;
/** size of ports array */
size_t num_ports;
/** reuseport is enabled if true */
int reuseport;
/** 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 */
@@ -96,13 +112,19 @@ struct daemon {
struct timeval time_last_stat;
/** time when daemon started */
struct timeval time_boot;
/** views structure containing view tree */
struct views* views;
#ifdef USE_DNSTAP
/** the dnstap environment master value, copied and changed by threads*/
struct dt_env* dtenv;
#endif
};
/**
* 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).
@@ -132,4 +154,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 */
+1813 -320
View File
File diff suppressed because it is too large Load Diff
+46 -21
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -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;
@@ -53,8 +56,8 @@ struct comm_reply;
struct comm_point;
struct daemon_remote;
/** number of seconds timeout on incoming remote control handshake */
#define REMOTE_CONTROL_TCP_TIMEOUT 120
/** number of milliseconds timeout on incoming remote control handshake */
#define REMOTE_CONTROL_TCP_TIMEOUT 120000
/**
* a busy control command connection, SSL state
@@ -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;
};
@@ -84,22 +89,26 @@ struct daemon_remote {
struct worker* worker;
/** commpoints for accepting remote control connections */
struct listen_list* accept_list;
/* if certificates are used */
int use_cert;
/** number of active commpoints that are handling remote control */
int active;
/** max active commpoints */
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 +116,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 +135,23 @@ 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.
@@ -130,12 +159,7 @@ int daemon_remote_open_accept(struct daemon_remote* rc,
*/
void daemon_remote_exec(struct worker* worker);
/** handle remote control accept callbacks */
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
@@ -162,5 +186,6 @@ 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 */
#endif /* DAEMON_REMOTE_H */
+77 -33
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -40,16 +40,26 @@
* numbers. These 'statistics' may be of interest to the operator.
*/
#include "config.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <sys/time.h>
#include <sys/types.h>
#include "daemon/stats.h"
#include "daemon/worker.h"
#include "daemon/daemon.h"
#include "services/mesh.h"
#include "services/outside_network.h"
#include "services/listen_dnsport.h"
#include "util/config_file.h"
#include "util/tube.h"
#include "util/timehist.h"
#include "util/net_help.h"
#include "validator/validator.h"
#include "sldns/sbuffer.h"
#include "services/cache/rrset.h"
#include "services/cache/infra.h"
#include "validator/val_kcache.h"
/** add timers and the values do not overflow or become negative */
static void
@@ -58,7 +68,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 +89,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,9 +138,10 @@ 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;
struct listen_list* lp;
s->svr = worker->stats;
s->mesh_num_states = worker->env.mesh->all.count;
@@ -139,30 +163,46 @@ server_stats_compile(struct worker* worker, struct stats_info* s)
NUM_BUCKETS_HIST);
/* values from outside network */
s->svr.unwanted_replies = worker->back->unwanted_replies;
s->svr.qtcp_outgoing = worker->back->num_tcp_outgoing;
/* 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;
/* get cache sizes */
s->svr.msg_cache_count = count_slabhash_entries(worker->env.msg_cache);
s->svr.rrset_cache_count = count_slabhash_entries(&worker->env.rrset_cache->table);
s->svr.infra_cache_count = count_slabhash_entries(worker->env.infra_cache->hosts);
if(worker->env.key_cache)
s->svr.key_cache_count = count_slabhash_entries(worker->env.key_cache->slab);
else s->svr.key_cache_count = 0;
/* get tcp accept usage */
s->svr.tcp_accept_usage = 0;
for(lp = worker->front->cps; lp; lp = lp->next) {
if(lp->com->type == comm_tcp_accept)
s->svr.tcp_accept_usage += lp->com->cur_tcp_count;
}
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 +213,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 +227,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 +238,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.qtcp_outgoing += a->svr.qtcp_outgoing;
total->svr.qipv6 += a->svr.qipv6;
total->svr.qbit_QR += a->svr.qbit_QR;
total->svr.qbit_AA += a->svr.qbit_AA;
@@ -209,11 +251,13 @@ void server_stats_add(struct stats_info* total, struct stats_info* a)
total->svr.qEDNS += a->svr.qEDNS;
total->svr.qEDNS_DO += a->svr.qEDNS_DO;
total->svr.ans_rcode_nodata += a->svr.ans_rcode_nodata;
total->svr.zero_ttl_responses += a->svr.zero_ttl_responses;
total->svr.ans_secure += a->svr.ans_secure;
total->svr.ans_bogus += a->svr.ans_bogus;
total->svr.rrset_bogus += a->svr.rrset_bogus;
total->svr.unwanted_replies += a->svr.unwanted_replies;
total->svr.unwanted_queries += a->svr.unwanted_queries;
total->svr.tcp_accept_usage += a->svr.tcp_accept_usage;
for(i=0; i<STATS_QTYPE_NUM; i++)
total->svr.qtype[i] += a->svr.qtype[i];
for(i=0; i<STATS_QCLASS_NUM; i++)
@@ -242,14 +286,14 @@ void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
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);
uint16_t flags = sldns_buffer_read_u16_at(c->buffer, 2);
if(qtype < STATS_QTYPE_NUM)
stats->qtype[qtype]++;
else stats->qtype_big++;
if(qclass < STATS_QCLASS_NUM)
stats->qclass[qclass]++;
else stats->qclass_big++;
stats->qopcode[ LDNS_OPCODE_WIRE(ldns_buffer_begin(c->buffer)) ]++;
stats->qopcode[ LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) ]++;
if(c->type != comm_udp)
stats->qtcp++;
if(repinfo && addr_is_ip6(&repinfo->addr, repinfo->addrlen))
@@ -277,12 +321,12 @@ void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
}
}
void server_stats_insrcode(struct server_stats* stats, ldns_buffer* buf)
void server_stats_insrcode(struct server_stats* stats, sldns_buffer* buf)
{
if(stats->extended && ldns_buffer_limit(buf) != 0) {
int r = (int)LDNS_RCODE_WIRE( ldns_buffer_begin(buf) );
if(stats->extended && sldns_buffer_limit(buf) != 0) {
int r = (int)LDNS_RCODE_WIRE( sldns_buffer_begin(buf) );
stats->ans_rcode[r] ++;
if(r == 0 && LDNS_ANCOUNT( ldns_buffer_begin(buf) ) == 0)
if(r == 0 && LDNS_ANCOUNT( sldns_buffer_begin(buf) ) == 0)
stats->ans_rcode_nodata ++;
}
}
+41 -15
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -48,6 +48,7 @@ struct config_file;
struct comm_point;
struct comm_reply;
struct edns_data;
struct sldns_buffer;
/** number of qtype that is stored for in array */
#define STATS_QTYPE_NUM 256
@@ -64,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
@@ -88,6 +91,8 @@ struct server_stats {
size_t qopcode[STATS_OPCODE_NUM];
/** number of queries over TCP */
size_t qtcp;
/** number of outgoing queries over TCP */
size_t qtcp_outgoing;
/** number of queries over IPv6 */
size_t qipv6;
/** number of queries with QR bit */
@@ -124,12 +129,24 @@ struct server_stats {
size_t unwanted_replies;
/** unwanted traffic received on client-facing ports */
size_t unwanted_queries;
/** usage of tcp accept list */
size_t tcp_accept_usage;
/** answers served from expired cache */
size_t zero_ttl_responses;
/** histogram data exported to array
* if the array is the same size, no data is lost, and
* if all histograms are same size (is so by default) then
* adding up works well. */
size_t hist[NUM_BUCKETS_HIST];
/** number of message cache entries */
size_t msg_cache_count;
/** number of rrset cache entries */
size_t rrset_cache_count;
/** number of infra cache entries */
size_t infra_cache_count;
/** number of key cache entries */
size_t key_cache_count;
};
/**
@@ -166,6 +183,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);
@@ -175,23 +195,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.
@@ -218,6 +244,6 @@ void server_stats_insquery(struct server_stats* stats, struct comm_point* c,
* @param stats: the stats
* @param buf: buffer with rcode. If buffer is length0: not counted.
*/
void server_stats_insrcode(struct server_stats* stats, ldns_buffer* buf);
void server_stats_insrcode(struct server_stats* stats, struct sldns_buffer* buf);
#endif /* DAEMON_STATS_H */
+241 -112
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*
*/
@@ -41,42 +41,60 @@
*/
#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"
#include "services/cache/rrset.h"
#include "services/cache/infra.h"
#include "util/fptr_wlist.h"
#include "util/data/msgreply.h"
#include "util/module.h"
#include "util/net_help.h"
#include "util/ub_event.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
#ifndef S_SPLINT_S
/* splint chokes on this system header file */
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef USE_MINI_EVENT
# ifdef USE_WINSOCK
# include "util/winsock_event.h"
# else
# include "util/mini_event.h"
# endif
#else
# include <event.h>
#endif /* S_SPLINT_S */
#ifdef HAVE_LOGIN_CAP_H
#include <login_cap.h>
#endif
/** global debug value to keep track of heap memory allocation */
void* unbound_start_brk = 0;
#ifdef UB_ON_WINDOWS
# include "winrc/win_svc.h"
#endif
#ifdef HAVE_NSS
/* nss3 */
# include "nss.h"
#endif
/** print usage. */
static void usage()
static void usage(void)
{
const char** m;
const char *evnm="event", *evsys="", *evmethod="";
time_t t;
struct timeval now;
struct ub_event_base* base;
printf("usage: unbound [options]\n");
printf(" start unbound daemon DNS resolver.\n");
printf("-h this help\n");
@@ -84,18 +102,50 @@ 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));
base = ub_default_event_base(0,&t,&now);
ub_get_event_sys(base, &evnm, &evsys, &evmethod);
printf("linked libs: %s %s (it uses %s), %s\n",
evnm, evsys, evmethod,
#ifdef HAVE_SSL
# ifdef SSLEAY_VERSION
SSLeay_version(SSLEAY_VERSION)
# else
OpenSSL_version(OPENSSL_VERSION)
# endif
#elif defined(HAVE_NSS)
NSS_GetVersion()
#elif defined(HAVE_NETTLE)
"nettle"
#endif
);
printf("linked modules:");
for(m = module_list_avail(); *m; m++)
printf(" %s", *m);
printf("\n");
printf("BSD licensed, see LICENSE in source package for details.\n");
printf("Report bugs to %s\n", PACKAGE_BUGREPORT);
ub_event_base_free(base);
}
#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)
{
#ifndef S_SPLINT_S
#ifdef HAVE_GETRLIMIT
/* list has number of ports to listen to, ifs number addresses */
int list = ((cfg->do_udp?1:0) + (cfg->do_tcp?1 +
@@ -114,12 +164,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(ub_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(ub_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;
@@ -130,8 +209,10 @@ 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));
#endif
log_warn("cannot increase max open fds from %u to %u",
(unsigned)avail, (unsigned)total+10);
/* check that calculation below does not underflow,
@@ -143,60 +224,47 @@ checkrlimits(struct config_file* cfg)
- 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;
#ifdef HAVE_SETRLIMIT
}
log_warn("increased limit(open files) from %u to %u",
#endif
verbose(VERB_ALGO, "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 */
#endif /* S_SPLINT_S */
}
/** set default logfile identity based on value from argv[0] at startup **/
static void
log_ident_set_fromdefault(struct config_file* cfg,
const char *log_default_identity)
{
if(cfg->log_identity == NULL || cfg->log_identity[0] == 0)
log_ident_set(log_default_identity);
else
log_ident_set(cfg->log_identity);
}
/** set verbosity, check rlimits, cache settings */
static void
apply_settings(struct daemon* daemon, struct config_file* cfg,
int cmdline_verbose)
int cmdline_verbose, int debug_mode, const char* log_default_identity)
{
/* 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 (debug_mode > 1) {
cfg->use_syslog = 0;
free(cfg->logfile);
cfg->logfile = NULL;
}
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);
log_ident_set_fromdefault(cfg, log_default_identity);
}
#ifdef HAVE_KILL
@@ -291,7 +359,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()) {
@@ -315,7 +388,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 */
@@ -323,23 +397,21 @@ static void
perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
const char** cfgfile)
{
#ifdef HAVE_KILL
int pidinchroot;
#endif
#ifdef HAVE_GETPWNAM
uid_t uid;
gid_t gid;
/* initialize, but not to 0 (root) */
memset(&uid, 112, sizeof(uid));
memset(&gid, 112, sizeof(gid));
log_assert(cfg);
struct passwd *pwd = NULL;
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
#ifdef UB_ON_WINDOWS
w_config_adjust_directory(cfg);
#endif
/* init syslog (as root) if needed, before daemonize, otherwise
* a fork error could not be printed since daemonize closed stderr.*/
@@ -352,7 +424,26 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
* 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
/* true if pidfile is inside chrootdir, or nochroot */
pidinchroot = !(cfg->chrootdir && cfg->chrootdir[0]) ||
(cfg->chrootdir && cfg->chrootdir[0] &&
strncmp(cfg->pidfile, cfg->chrootdir,
strlen(cfg->chrootdir))==0);
/* check old pid file before forking */
if(cfg->pidfile && cfg->pidfile[0]) {
/* calculate position of pidfile */
@@ -362,12 +453,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
cfg, 1);
if(!daemon->pidfile)
fatal_exit("pidfile alloc: out of memory");
checkoldpid(daemon->pidfile,
/* true if pidfile is inside chrootdir, or nochroot */
!(cfg->chrootdir && cfg->chrootdir[0]) ||
(cfg->chrootdir && cfg->chrootdir[0] &&
strncmp(daemon->pidfile, cfg->chrootdir,
strlen(cfg->chrootdir))==0));
checkoldpid(daemon->pidfile, pidinchroot);
}
#endif
@@ -380,24 +466,35 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
#ifdef HAVE_KILL
if(cfg->pidfile && cfg->pidfile[0]) {
writepid(daemon->pidfile, getpid());
if(!(cfg->chrootdir && cfg->chrootdir[0]) ||
(cfg->chrootdir && cfg->chrootdir[0] &&
strncmp(daemon->pidfile, cfg->chrootdir,
strlen(cfg->chrootdir))==0)) {
/* 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",
(unsigned)uid, (unsigned)gid,
if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1 &&
pidinchroot) {
# ifdef HAVE_CHOWN
if(chown(daemon->pidfile, cfg_uid, cfg_gid) == -1) {
verbose(VERB_QUERY, "cannot chown %u.%u %s: %s",
(unsigned)cfg_uid, (unsigned)cfg_gid,
daemon->pidfile, strerror(errno));
}
}
# endif /* HAVE_CHOWN */
}
}
#else
(void)daemon;
#endif
#endif /* HAVE_KILL */
/* Set user context */
#ifdef HAVE_GETPWNAM
if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) {
#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, cfg_uid, (unsigned)
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
@@ -410,6 +507,9 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
if(chroot(cfg->chrootdir))
fatal_exit("unable to chroot to %s: %s",
cfg->chrootdir, strerror(errno));
if(chdir("/"))
fatal_exit("unable to chdir to / in chroot %s: %s",
cfg->chrootdir, strerror(errno));
verbose(VERB_QUERY, "chroot to %s", cfg->chrootdir);
if(strncmp(*cfgfile, cfg->chrootdir,
strlen(cfg->chrootdir)) == 0)
@@ -450,29 +550,38 @@ 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]) {
if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) {
# ifdef HAVE_INITGROUPS
if(initgroups(cfg->username, cfg_gid) != 0)
log_warn("unable to initgroups %s: %s",
cfg->username, strerror(errno));
# endif /* HAVE_INITGROUPS */
# ifdef HAVE_ENDPWENT
endpwent();
# endif
#ifdef HAVE_SETRESGID
if(setresgid(gid,gid,gid) != 0)
if(setresgid(cfg_gid,cfg_gid,cfg_gid) != 0)
#elif defined(HAVE_SETREGID) && !defined(DARWIN_BROKEN_SETREUID)
if(setregid(gid,gid) != 0)
if(setregid(cfg_gid,cfg_gid) != 0)
#else /* use setgid */
if(setgid(gid) != 0)
if(setgid(cfg_gid) != 0)
#endif /* HAVE_SETRESGID */
fatal_exit("unable to set group id of %s: %s",
cfg->username, strerror(errno));
#ifdef HAVE_SETRESUID
if(setresuid(uid,uid,uid) != 0)
if(setresuid(cfg_uid,cfg_uid,cfg_uid) != 0)
#elif defined(HAVE_SETREUID) && !defined(DARWIN_BROKEN_SETREUID)
if(setreuid(uid,uid) != 0)
if(setreuid(cfg_uid,cfg_uid) != 0)
#else /* use setuid */
if(setuid(uid) != 0)
if(setuid(cfg_uid) != 0)
#endif /* HAVE_SETRESUID */
fatal_exit("unable to set user id of %s: %s",
cfg->username, strerror(errno));
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)
@@ -485,9 +594,10 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
* @param cmdline_verbose: verbosity resulting from commandline -v.
* These increase verbosity as specified in the config file.
* @param debug_mode: if set, do not daemonize.
* @param log_default_identity: Default identity to report in logs
*/
static void
run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode)
run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, const char* log_default_identity)
{
struct config_file* cfg = NULL;
struct daemon* daemon = NULL;
@@ -509,13 +619,15 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode)
cfgfile);
log_warn("Continuing with default config settings");
}
apply_settings(daemon, cfg, cmdline_verbose);
apply_settings(daemon, cfg, cmdline_verbose, debug_mode, log_default_identity);
if(!done_setup)
config_lookup_uid(cfg);
/* prepare */
if(!daemon_open_shared_ports(daemon))
fatal_exit("could not open ports");
if(!done_setup) {
perform_setup(daemon, cfg, debug_mode, &cfgfile);
perform_setup(daemon, cfg, debug_mode, &cfgfile);
done_setup = 1;
} else {
/* reopen log after HUP to facilitate log rotation */
@@ -561,27 +673,35 @@ main(int argc, char* argv[])
{
int c;
const char* cfgfile = CONFIGFILE;
const char* winopt = NULL;
const char* log_ident_default;
int cmdline_verbose = 0;
int debug_mode = 0;
#ifdef HAVE_SBRK
/* take debug snapshot of heap */
unbound_start_brk = sbrk(0);
#ifdef UB_ON_WINDOWS
int cmdline_cfg = 0;
#endif
log_init(NULL, 0, NULL);
log_ident_default = strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0];
log_ident_set(log_ident_default);
/* 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 ++;
cmdline_verbose++;
verbosity++;
break;
case 'd':
debug_mode = 1;
debug_mode++;
break;
case 'w':
winopt = optarg;
break;
case '?':
case 'h':
@@ -593,12 +713,21 @@ 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;
}
run_daemon(cfgfile, cmdline_verbose, debug_mode);
run_daemon(cfgfile, cmdline_verbose, debug_mode, log_ident_default);
log_init(NULL, 0, NULL); /* close logfile */
return 0;
}
+601 -350
View File
File diff suppressed because it is too large Load Diff
+27 -83
View File
@@ -21,16 +21,16 @@
* 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.
* "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
* HOLDER 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.
*/
/**
@@ -43,7 +43,7 @@
#ifndef DAEMON_WORKER_H
#define DAEMON_WORKER_H
#include "config.h"
#include "libunbound/worker.h"
#include "util/netevent.h"
#include "util/locks.h"
#include "util/alloc.h"
@@ -51,6 +51,7 @@
#include "util/data/msgparse.h"
#include "daemon/stats.h"
#include "util/module.h"
#include "dnstap/dnstap.h"
struct listen_dnsport;
struct outside_network;
struct config_file;
@@ -60,6 +61,7 @@ struct ub_randstate;
struct regional;
struct tube;
struct daemon_remote;
struct query_info;
/** worker commands */
enum worker_commands {
@@ -67,6 +69,8 @@ enum worker_commands {
worker_cmd_quit,
/** obtain statistics */
worker_cmd_stats,
/** obtain statistics without statsclear */
worker_cmd_stats_noreset,
/** execute remote control command */
worker_cmd_remote
};
@@ -100,11 +104,10 @@ 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;
/** ratelimit for errors, time value */
time_t err_limit_time;
/** ratelimit for errors, packet count */
unsigned int err_limit_count;
/** random() table for this worker. */
struct ub_randstate* rndstate;
@@ -119,6 +122,11 @@ struct worker {
/** module environment passed to modules, changed for this thread */
struct module_env env;
#ifdef USE_DNSTAP
/** dnstap environment, changed for this thread */
struct dt_env dtenv;
#endif
};
/**
@@ -162,73 +170,9 @@ void worker_delete(struct worker* worker);
void worker_send_cmd(struct worker* worker, enum worker_commands cmd);
/**
* Worker signal handler function. User argument is the worker itself.
* @param sig: signal number.
* @param arg: the worker (main worker) that handles signals.
* Init worker stats - includes server_stats_init, outside network and mesh.
* @param worker: the worker to init
*/
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)
* @param qnamelen: length in bytes of qname, including trailing 0.
* @param qtype: query type. (host order)
* @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 addr: where to.
* @param addrlen: length of addr.
* @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);
/**
* process control messages from the main thread. Frees the control
* command message.
* @param tube: tube control message came on.
* @param msg: message contents. Is freed.
* @param len: length of message.
* @param error: if error (NETEVENT_*) happened.
* @param arg: user argument
*/
void worker_handle_control_cmd(struct tube* tube, uint8_t* msg, size_t len,
int error, void* arg);
/** handles callbacks from listening event interface */
int worker_handle_request(struct comm_point* c, void* arg, int error,
struct comm_reply* repinfo);
/** process incoming replies from the network */
int worker_handle_reply(struct comm_point* c, void* arg, int error,
struct comm_reply* reply_info);
/** process incoming serviced query replies from the network */
int worker_handle_service_reply(struct comm_point* c, void* arg, int error,
struct comm_reply* reply_info);
/** cleanup the cache to remove all rrset IDs from it, arg is worker */
void worker_alloc_cleanup(void* arg);
/** statistics timer callback handler */
void worker_stat_timer_cb(void* arg);
void worker_stats_clear(struct worker* worker);
#endif /* DAEMON_WORKER_H */
+879
View File
@@ -0,0 +1,879 @@
/*
* dns64/dns64.c - DNS64 module
*
* Copyright (c) 2009, Viagénie. All rights reserved.
*
* 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 Viagénie 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.
*/
/**
* \file
*
* This file contains a module that performs DNS64 query processing.
*/
#include "config.h"
#include "dns64/dns64.h"
#include "services/cache/dns.h"
#include "services/cache/rrset.h"
#include "util/config_file.h"
#include "util/data/msgreply.h"
#include "util/fptr_wlist.h"
#include "util/net_help.h"
#include "util/regional.h"
/******************************************************************************
* *
* STATIC CONSTANTS *
* *
******************************************************************************/
/**
* This is the default DNS64 prefix that is used whent he dns64 module is listed
* in module-config but when the dns64-prefix variable is not present.
*/
static const char DEFAULT_DNS64_PREFIX[] = "64:ff9b::/96";
/**
* Maximum length of a domain name in a PTR query in the .in-addr.arpa tree.
*/
#define MAX_PTR_QNAME_IPV4 30
/**
* Per-query module-specific state. This is usually a dynamically-allocated
* structure, but in our case we only need to store one variable describing the
* state the query is in. So we repurpose the minfo pointer by storing an
* integer in there.
*/
enum dns64_qstate {
DNS64_INTERNAL_QUERY, /**< Internally-generated query, no DNS64
processing. */
DNS64_NEW_QUERY, /**< Query for which we're the first module in
line. */
DNS64_SUBQUERY_FINISHED /**< Query for which we generated a sub-query, and
for which this sub-query is finished. */
};
/******************************************************************************
* *
* STRUCTURES *
* *
******************************************************************************/
/**
* This structure contains module configuration information. One instance of
* this structure exists per instance of the module. Normally there is only one
* instance of the module.
*/
struct dns64_env {
/**
* DNS64 prefix address. We're using a full sockaddr instead of just an
* in6_addr because we can reuse Unbound's generic string parsing functions.
* It will always contain a sockaddr_in6, and only the sin6_addr member will
* ever be used.
*/
struct sockaddr_storage prefix_addr;
/**
* This is always sizeof(sockaddr_in6).
*/
socklen_t prefix_addrlen;
/**
* This is the CIDR length of the prefix. It needs to be between 0 and 96.
*/
int prefix_net;
};
/******************************************************************************
* *
* UTILITY FUNCTIONS *
* *
******************************************************************************/
/**
* Generic macro for swapping two variables.
*
* \param t Type of the variables. (e.g. int)
* \param a First variable.
* \param b Second variable.
*
* \warning Do not attempt something foolish such as swap(int,a++,b++)!
*/
#define swap(t,a,b) do {t x = a; a = b; b = x;} while(0)
/**
* Reverses a string.
*
* \param begin Points to the first character of the string.
* \param end Points one past the last character of the string.
*/
static void
reverse(char* begin, char* end)
{
while ( begin < --end ) {
swap(char, *begin, *end);
++begin;
}
}
/**
* Convert an unsigned integer to a string. The point of this function is that
* of being faster than sprintf().
*
* \param n The number to be converted.
* \param s The result will be written here. Must be large enough, be careful!
*
* \return The number of characters written.
*/
static int
uitoa(unsigned n, char* s)
{
char* ss = s;
do {
*ss++ = '0' + n % 10;
} while (n /= 10);
reverse(s, ss);
return ss - s;
}
/**
* Extract an IPv4 address embedded in the IPv6 address \a ipv6 at offset \a
* offset (in bits). Note that bits are not necessarily aligned on bytes so we
* need to be careful.
*
* \param ipv6 IPv6 address represented as a 128-bit array in big-endian
* order.
* \param offset Index of the MSB of the IPv4 address embedded in the IPv6
* address.
*/
static uint32_t
extract_ipv4(const uint8_t ipv6[16], const int offset)
{
uint32_t ipv4 = (uint32_t)ipv6[offset/8+0] << (24 + (offset%8))
| (uint32_t)ipv6[offset/8+1] << (16 + (offset%8))
| (uint32_t)ipv6[offset/8+2] << ( 8 + (offset%8))
| (uint32_t)ipv6[offset/8+3] << ( 0 + (offset%8));
if (offset/8+4 < 16)
ipv4 |= (uint32_t)ipv6[offset/8+4] >> (8 - offset%8);
return ipv4;
}
/**
* Builds the PTR query name corresponding to an IPv4 address. For example,
* given the number 3,464,175,361, this will build the string
* "\03206\03123\0231\011\07in-addr\04arpa".
*
* \param ipv4 IPv4 address represented as an unsigned 32-bit number.
* \param ptr The result will be written here. Must be large enough, be
* careful!
*
* \return The number of characters written.
*/
static size_t
ipv4_to_ptr(uint32_t ipv4, char ptr[MAX_PTR_QNAME_IPV4])
{
static const char IPV4_PTR_SUFFIX[] = "\07in-addr\04arpa";
int i;
char* c = ptr;
for (i = 0; i < 4; ++i) {
*c = uitoa((unsigned int)(ipv4 % 256), c + 1);
c += *c + 1;
ipv4 /= 256;
}
memmove(c, IPV4_PTR_SUFFIX, sizeof(IPV4_PTR_SUFFIX));
return c + sizeof(IPV4_PTR_SUFFIX) - ptr;
}
/**
* Converts an IPv6-related domain name string from a PTR query into an IPv6
* address represented as a 128-bit array.
*
* \param ptr The domain name. (e.g. "\011[...]\010\012\016\012\03ip6\04arpa")
* \param ipv6 The result will be written here, in network byte order.
*
* \return 1 on success, 0 on failure.
*/
static int
ptr_to_ipv6(const char* ptr, uint8_t ipv6[16])
{
int i;
for (i = 0; i < 64; i++) {
int x;
if (ptr[i++] != 1)
return 0;
if (ptr[i] >= '0' && ptr[i] <= '9') {
x = ptr[i] - '0';
} else if (ptr[i] >= 'a' && ptr[i] <= 'f') {
x = ptr[i] - 'a' + 10;
} else if (ptr[i] >= 'A' && ptr[i] <= 'F') {
x = ptr[i] - 'A' + 10;
} else {
return 0;
}
ipv6[15-i/4] |= x << (2 * ((i-1) % 4));
}
return 1;
}
/**
* Synthesize an IPv6 address based on an IPv4 address and the DNS64 prefix.
*
* \param prefix_addr DNS64 prefix address.
* \param prefix_net CIDR length of the DNS64 prefix. Must be between 0 and 96.
* \param a IPv4 address.
* \param aaaa IPv6 address. The result will be written here.
*/
static void
synthesize_aaaa(const uint8_t prefix_addr[16], int prefix_net,
const uint8_t a[4], uint8_t aaaa[16])
{
memcpy(aaaa, prefix_addr, 16);
aaaa[prefix_net/8+0] |= a[0] >> (0+prefix_net%8);
aaaa[prefix_net/8+1] |= a[0] << (8-prefix_net%8);
aaaa[prefix_net/8+1] |= a[1] >> (0+prefix_net%8);
aaaa[prefix_net/8+2] |= a[1] << (8-prefix_net%8);
aaaa[prefix_net/8+2] |= a[2] >> (0+prefix_net%8);
aaaa[prefix_net/8+3] |= a[2] << (8-prefix_net%8);
aaaa[prefix_net/8+3] |= a[3] >> (0+prefix_net%8);
if (prefix_net/8+4 < 16) /* <-- my beautiful symmetry is destroyed! */
aaaa[prefix_net/8+4] |= a[3] << (8-prefix_net%8);
}
/******************************************************************************
* *
* DNS64 MODULE FUNCTIONS *
* *
******************************************************************************/
/**
* This function applies the configuration found in the parsed configuration
* file \a cfg to this instance of the dns64 module. Currently only the DNS64
* prefix (a.k.a. Pref64) is configurable.
*
* \param dns64_env Module-specific global parameters.
* \param cfg Parsed configuration file.
*/
static int
dns64_apply_cfg(struct dns64_env* dns64_env, struct config_file* cfg)
{
verbose(VERB_ALGO, "dns64-prefix: %s", cfg->dns64_prefix);
if (!netblockstrtoaddr(cfg->dns64_prefix ? cfg->dns64_prefix :
DEFAULT_DNS64_PREFIX, 0, &dns64_env->prefix_addr,
&dns64_env->prefix_addrlen, &dns64_env->prefix_net)) {
log_err("cannot parse dns64-prefix netblock: %s", cfg->dns64_prefix);
return 0;
}
if (!addr_is_ip6(&dns64_env->prefix_addr, dns64_env->prefix_addrlen)) {
log_err("dns64_prefix is not IPv6: %s", cfg->dns64_prefix);
return 0;
}
if (dns64_env->prefix_net < 0 || dns64_env->prefix_net > 96) {
log_err("dns64-prefix length it not between 0 and 96: %s",
cfg->dns64_prefix);
return 0;
}
return 1;
}
/**
* Initializes this instance of the dns64 module.
*
* \param env Global state of all module instances.
* \param id This instance's ID number.
*/
int
dns64_init(struct module_env* env, int id)
{
struct dns64_env* dns64_env =
(struct dns64_env*)calloc(1, sizeof(struct dns64_env));
if (!dns64_env) {
log_err("malloc failure");
return 0;
}
env->modinfo[id] = (void*)dns64_env;
if (!dns64_apply_cfg(dns64_env, env->cfg)) {
log_err("dns64: could not apply configuration settings.");
return 0;
}
return 1;
}
/**
* Deinitializes this instance of the dns64 module.
*
* \param env Global state of all module instances.
* \param id This instance's ID number.
*/
void
dns64_deinit(struct module_env* env, int id)
{
if (!env)
return;
free(env->modinfo[id]);
env->modinfo[id] = NULL;
}
/**
* Handle PTR queries for IPv6 addresses. If the address belongs to the DNS64
* prefix, we must do a PTR query for the corresponding IPv4 address instead.
*
* \param qstate Query state structure.
* \param id This module instance's ID number.
*
* \return The new state of the query.
*/
static enum module_ext_state
handle_ipv6_ptr(struct module_qstate* qstate, int id)
{
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
struct module_qstate* subq = NULL;
struct query_info qinfo;
struct sockaddr_in6 sin6;
/* Convert the PTR query string to an IPv6 address. */
memset(&sin6, 0, sizeof(sin6));
sin6.sin6_family = AF_INET6;
if (!ptr_to_ipv6((char*)qstate->qinfo.qname, sin6.sin6_addr.s6_addr))
return module_wait_module; /* Let other module handle this. */
/*
* If this IPv6 address is not part of our DNS64 prefix, then we don't need
* to do anything. Let another module handle the query.
*/
if (addr_in_common((struct sockaddr_storage*)&sin6, 128,
&dns64_env->prefix_addr, dns64_env->prefix_net,
(socklen_t)sizeof(sin6)) != dns64_env->prefix_net)
return module_wait_module;
verbose(VERB_ALGO, "dns64: rewrite PTR record");
/*
* Create a new PTR query info for the domain name corresponding to the IPv4
* address corresponding to the IPv6 address corresponding to the original
* PTR query domain name.
*/
qinfo = qstate->qinfo;
if (!(qinfo.qname = regional_alloc(qstate->region, MAX_PTR_QNAME_IPV4)))
return module_error;
qinfo.qname_len = ipv4_to_ptr(extract_ipv4(sin6.sin6_addr.s6_addr,
dns64_env->prefix_net), (char*)qinfo.qname);
/* Create the new sub-query. */
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0, 0,
&subq))
return module_error;
if (subq) {
subq->curmod = id;
subq->ext_state[id] = module_state_initial;
subq->minfo[id] = NULL;
}
return module_wait_subquery;
}
/** allocate (special) rrset keys, return 0 on error */
static int
repinfo_alloc_rrset_keys(struct reply_info* rep,
struct regional* region)
{
size_t i;
for(i=0; i<rep->rrset_count; i++) {
if(region) {
rep->rrsets[i] = (struct ub_packed_rrset_key*)
regional_alloc(region,
sizeof(struct ub_packed_rrset_key));
if(rep->rrsets[i]) {
memset(rep->rrsets[i], 0,
sizeof(struct ub_packed_rrset_key));
rep->rrsets[i]->entry.key = rep->rrsets[i];
}
}
else return 0;/* rep->rrsets[i] = alloc_special_obtain(alloc);*/
if(!rep->rrsets[i])
return 0;
rep->rrsets[i]->entry.data = NULL;
}
return 1;
}
static enum module_ext_state
generate_type_A_query(struct module_qstate* qstate, int id)
{
struct module_qstate* subq = NULL;
struct query_info qinfo;
verbose(VERB_ALGO, "dns64: query A record");
/* Create a new query info. */
qinfo = qstate->qinfo;
qinfo.qtype = LDNS_RR_TYPE_A;
/* Start the sub-query. */
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0,
0, &subq))
{
verbose(VERB_ALGO, "dns64: sub-query creation failed");
return module_error;
}
if (subq) {
subq->curmod = id;
subq->ext_state[id] = module_state_initial;
subq->minfo[id] = NULL;
}
return module_wait_subquery;
}
/**
* Handles the "pass" event for a query. This event is received when a new query
* is received by this module. The query may have been generated internally by
* another module, in which case we don't want to do any special processing
* (this is an interesting discussion topic), or it may be brand new, e.g.
* received over a socket, in which case we do want to apply DNS64 processing.
*
* \param qstate A structure representing the state of the query that has just
* received the "pass" event.
* \param id This module's instance ID.
*
* \return The new state of the query.
*/
static enum module_ext_state
handle_event_pass(struct module_qstate* qstate, int id)
{
if ((uintptr_t)qstate->minfo[id] == DNS64_NEW_QUERY
&& qstate->qinfo.qtype == LDNS_RR_TYPE_PTR
&& qstate->qinfo.qname_len == 74
&& !strcmp((char*)&qstate->qinfo.qname[64], "\03ip6\04arpa"))
/* Handle PTR queries for IPv6 addresses. */
return handle_ipv6_ptr(qstate, id);
if (qstate->env->cfg->dns64_synthall &&
(uintptr_t)qstate->minfo[id] == DNS64_NEW_QUERY
&& qstate->qinfo.qtype == LDNS_RR_TYPE_AAAA)
return generate_type_A_query(qstate, id);
/* We are finished when our sub-query is finished. */
if ((uintptr_t)qstate->minfo[id] == DNS64_SUBQUERY_FINISHED)
return module_finished;
/* Otherwise, pass request to next module. */
verbose(VERB_ALGO, "dns64: pass to next module");
return module_wait_module;
}
/**
* Handles the "done" event for a query. We need to analyze the response and
* maybe issue a new sub-query for the A record.
*
* \param qstate A structure representing the state of the query that has just
* received the "pass" event.
* \param id This module's instance ID.
*
* \return The new state of the query.
*/
static enum module_ext_state
handle_event_moddone(struct module_qstate* qstate, int id)
{
/*
* In many cases we have nothing special to do. From most to least common:
*
* - An internal query.
* - A query for a record type other than AAAA.
* - CD FLAG was set on querier
* - An AAAA query for which an error was returned.(qstate.return_rcode)
* -> treated as servfail thus synthesize (sec 5.1.3 6147), thus
* synthesize in (sec 5.1.2 of RFC6147).
* - A successful AAAA query with an answer.
*/
if ( (enum dns64_qstate)qstate->minfo[id] == DNS64_INTERNAL_QUERY
|| qstate->qinfo.qtype != LDNS_RR_TYPE_AAAA
|| (qstate->query_flags & BIT_CD)
|| (qstate->return_msg &&
qstate->return_msg->rep &&
reply_find_answer_rrset(&qstate->qinfo,
qstate->return_msg->rep)))
return module_finished;
/* So, this is a AAAA noerror/nodata answer */
return generate_type_A_query(qstate, id);
}
/**
* This is the module's main() function. It gets called each time a query
* receives an event which we may need to handle. We respond by updating the
* state of the query.
*
* \param qstate Structure containing the state of the query.
* \param event Event that has just been received.
* \param id This module's instance ID.
* \param outbound State of a DNS query on an authoritative server. We never do
* our own queries ourselves (other modules do it for us), so
* this is unused.
*/
void
dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
struct outbound_entry* outbound)
{
(void)outbound;
verbose(VERB_QUERY, "dns64[module %d] operate: extstate:%s event:%s",
id, strextstate(qstate->ext_state[id]),
strmodulevent(event));
log_query_info(VERB_QUERY, "dns64 operate: query", &qstate->qinfo);
switch(event) {
case module_event_new:
/* Tag this query as being new and fall through. */
qstate->minfo[id] = (void*)DNS64_NEW_QUERY;
case module_event_pass:
qstate->ext_state[id] = handle_event_pass(qstate, id);
break;
case module_event_moddone:
qstate->ext_state[id] = handle_event_moddone(qstate, id);
break;
default:
qstate->ext_state[id] = module_finished;
break;
}
}
static void
dns64_synth_aaaa_data(const struct ub_packed_rrset_key* fk,
const struct packed_rrset_data* fd,
struct ub_packed_rrset_key *dk,
struct packed_rrset_data **dd_out, struct regional *region,
struct dns64_env* dns64_env )
{
struct packed_rrset_data *dd;
size_t i;
/*
* Create synthesized AAAA RR set data. We need to allocated extra memory
* for the RRs themselves. Each RR has a length, TTL, pointer to wireformat
* data, 2 bytes of data length, and 16 bytes of IPv6 address.
*/
if(fd->count > RR_COUNT_MAX) {
*dd_out = NULL;
return; /* integer overflow protection in alloc */
}
if (!(dd = *dd_out = regional_alloc(region,
sizeof(struct packed_rrset_data)
+ fd->count * (sizeof(size_t) + sizeof(time_t) +
sizeof(uint8_t*) + 2 + 16)))) {
log_err("out of memory");
return;
}
/* Copy attributes from A RR set. */
dd->ttl = fd->ttl;
dd->count = fd->count;
dd->rrsig_count = 0;
dd->trust = fd->trust;
dd->security = fd->security;
/*
* Synthesize AAAA records. Adjust pointers in structure.
*/
dd->rr_len =
(size_t*)((uint8_t*)dd + sizeof(struct packed_rrset_data));
dd->rr_data = (uint8_t**)&dd->rr_len[dd->count];
dd->rr_ttl = (time_t*)&dd->rr_data[dd->count];
for(i = 0; i < fd->count; ++i) {
if (fd->rr_len[i] != 6 || fd->rr_data[i][0] != 0
|| fd->rr_data[i][1] != 4) {
*dd_out = NULL;
return;
}
dd->rr_len[i] = 18;
dd->rr_data[i] =
(uint8_t*)&dd->rr_ttl[dd->count] + 18*i;
dd->rr_data[i][0] = 0;
dd->rr_data[i][1] = 16;
synthesize_aaaa(
((struct sockaddr_in6*)&dns64_env->prefix_addr)->sin6_addr.s6_addr,
dns64_env->prefix_net, &fd->rr_data[i][2],
&dd->rr_data[i][2] );
dd->rr_ttl[i] = fd->rr_ttl[i];
}
/*
* Create synthesized AAAA RR set key. This is mostly just bookkeeping,
* nothing interesting here.
*/
if(!dk) {
log_err("no key");
*dd_out = NULL;
return;
}
dk->rk.dname = (uint8_t*)regional_alloc_init(region,
fk->rk.dname, fk->rk.dname_len);
if(!dk->rk.dname) {
log_err("out of memory");
*dd_out = NULL;
return;
}
dk->rk.type = htons(LDNS_RR_TYPE_AAAA);
memset(&dk->entry, 0, sizeof(dk->entry));
dk->entry.key = dk;
dk->entry.hash = rrset_key_hash(&dk->rk);
dk->entry.data = dd;
}
/**
* Synthesize an AAAA RR set from an A sub-query's answer and add it to the
* original empty response.
*
* \param id This module's instance ID.
* \param super Original AAAA query.
* \param qstate A query.
*/
static void
dns64_adjust_a(int id, struct module_qstate* super, struct module_qstate* qstate)
{
struct dns64_env* dns64_env = (struct dns64_env*)super->env->modinfo[id];
struct reply_info *rep, *cp;
size_t i, s;
struct packed_rrset_data* fd, *dd;
struct ub_packed_rrset_key* fk, *dk;
verbose(VERB_ALGO, "converting A answers to AAAA answers");
log_assert(super->region);
log_assert(qstate->return_msg);
log_assert(qstate->return_msg->rep);
/* If dns64-synthall is enabled, return_msg is not initialized */
if(!super->return_msg) {
super->return_msg = (struct dns_msg*)regional_alloc(
super->region, sizeof(struct dns_msg));
if(!super->return_msg)
return;
memset(super->return_msg, 0, sizeof(*super->return_msg));
super->return_msg->qinfo = super->qinfo;
}
rep = qstate->return_msg->rep;
/*
* Build the actual reply.
*/
cp = construct_reply_info_base(super->region, rep->flags, rep->qdcount,
rep->ttl, rep->prefetch_ttl, rep->an_numrrsets, rep->ns_numrrsets,
rep->ar_numrrsets, rep->rrset_count, rep->security);
if(!cp)
return;
/* allocate ub_key structures special or not */
if(!repinfo_alloc_rrset_keys(cp, super->region)) {
return;
}
/* copy everything and replace A by AAAA */
for(i=0; i<cp->rrset_count; i++) {
fk = rep->rrsets[i];
dk = cp->rrsets[i];
fd = (struct packed_rrset_data*)fk->entry.data;
dk->rk = fk->rk;
dk->id = fk->id;
if(i<rep->an_numrrsets && fk->rk.type == htons(LDNS_RR_TYPE_A)) {
/* also sets dk->entry.hash */
dns64_synth_aaaa_data(fk, fd, dk, &dd, super->region, dns64_env);
if(!dd)
return;
/* Delete negative AAAA record from cache stored by
* the iterator module */
rrset_cache_remove(super->env->rrset_cache, dk->rk.dname,
dk->rk.dname_len, LDNS_RR_TYPE_AAAA,
LDNS_RR_CLASS_IN, 0);
} else {
dk->entry.hash = fk->entry.hash;
dk->rk.dname = (uint8_t*)regional_alloc_init(super->region,
fk->rk.dname, fk->rk.dname_len);
if(!dk->rk.dname)
return;
s = packed_rrset_sizeof(fd);
dd = (struct packed_rrset_data*)regional_alloc_init(
super->region, fd, s);
if(!dd)
return;
}
packed_rrset_ptr_fixup(dd);
dk->entry.data = (void*)dd;
}
/* Commit changes. */
super->return_msg->rep = cp;
}
/**
* Generate a response for the original IPv6 PTR query based on an IPv4 PTR
* sub-query's response.
*
* \param qstate IPv4 PTR sub-query.
* \param super Original IPv6 PTR query.
*/
static void
dns64_adjust_ptr(struct module_qstate* qstate, struct module_qstate* super)
{
struct ub_packed_rrset_key* answer;
verbose(VERB_ALGO, "adjusting PTR reply");
/* Copy the sub-query's reply to the parent. */
if (!(super->return_msg = (struct dns_msg*)regional_alloc(super->region,
sizeof(struct dns_msg))))
return;
super->return_msg->qinfo = super->qinfo;
super->return_msg->rep = reply_info_copy(qstate->return_msg->rep, NULL,
super->region);
/*
* Adjust the domain name of the answer RR set so that it matches the
* initial query's domain name.
*/
answer = reply_find_answer_rrset(&qstate->qinfo, super->return_msg->rep);
log_assert(answer);
answer->rk.dname = super->qinfo.qname;
answer->rk.dname_len = super->qinfo.qname_len;
}
/**
* This function is called when a sub-query finishes to inform the parent query.
*
* We issue two kinds of sub-queries: PTR and A.
*
* \param qstate State of the sub-query.
* \param id This module's instance ID.
* \param super State of the super-query.
*/
void
dns64_inform_super(struct module_qstate* qstate, int id,
struct module_qstate* super)
{
log_query_info(VERB_ALGO, "dns64: inform_super, sub is",
&qstate->qinfo);
log_query_info(VERB_ALGO, "super is", &super->qinfo);
/*
* Signal that the sub-query is finished, no matter whether we are
* successful or not. This lets the state machine terminate.
*/
super->minfo[id] = (void*)DNS64_SUBQUERY_FINISHED;
/* If there is no successful answer, we're done. */
if (qstate->return_rcode != LDNS_RCODE_NOERROR
|| !qstate->return_msg
|| !qstate->return_msg->rep
|| !reply_find_answer_rrset(&qstate->qinfo,
qstate->return_msg->rep))
return;
/* Generate a response suitable for the original query. */
if (qstate->qinfo.qtype == LDNS_RR_TYPE_A) {
dns64_adjust_a(id, super, qstate);
} else {
log_assert(qstate->qinfo.qtype == LDNS_RR_TYPE_PTR);
dns64_adjust_ptr(qstate, super);
}
/* Store the generated response in cache. */
if (!super->no_cache_store &&
!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
0, 0, 0, NULL, super->query_flags))
log_err("out of memory");
}
/**
* Clear module-specific data from query state. Since we do not allocate memory,
* it's just a matter of setting a pointer to NULL.
*
* \param qstate Query state.
* \param id This module's instance ID.
*/
void
dns64_clear(struct module_qstate* qstate, int id)
{
qstate->minfo[id] = NULL;
}
/**
* Returns the amount of global memory that this module uses, not including
* per-query data.
*
* \param env Module environment.
* \param id This module's instance ID.
*/
size_t
dns64_get_mem(struct module_env* env, int id)
{
struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id];
if (!dns64_env)
return 0;
return sizeof(*dns64_env);
}
/**
* The dns64 function block.
*/
static struct module_func_block dns64_block = {
"dns64",
&dns64_init, &dns64_deinit, &dns64_operate, &dns64_inform_super,
&dns64_clear, &dns64_get_mem
};
/**
* Function for returning the above function block.
*/
struct module_func_block *
dns64_get_funcblock(void)
{
return &dns64_block;
}
+71
View File
@@ -0,0 +1,71 @@
/*
* dns64/dns64.h - DNS64 module
*
* Copyright (c) 2009, Viagénie. All rights reserved.
*
* 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 NLNET LABS 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.
*/
/**
* \file
*
* This file contains a module that performs DNS64 query processing.
*/
#ifndef DNS64_DNS64_H
#define DNS64_DNS64_H
#include "util/module.h"
/**
* Get the dns64 function block.
* @return: function block with function pointers to dns64 methods.
*/
struct module_func_block *dns64_get_funcblock(void);
/** dns64 init */
int dns64_init(struct module_env* env, int id);
/** dns64 deinit */
void dns64_deinit(struct module_env* env, int id);
/** dns64 operate on a query */
void dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
struct outbound_entry* outbound);
void dns64_inform_super(struct module_qstate* qstate, int id,
struct module_qstate* super);
/** dns64 cleanup query state */
void dns64_clear(struct module_qstate* qstate, int id);
/** dns64 alloc size routine */
size_t dns64_get_mem(struct module_env* env, int id);
#endif /* DNS64_DNS64_H */
+511
View File
@@ -0,0 +1,511 @@
/* dnstap support for Unbound */
/*
* Copyright (c) 2013-2014, Farsight Security, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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 HOLDER 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 "dnstap/dnstap_config.h"
#ifdef USE_DNSTAP
#include "config.h"
#include <string.h>
#include <sys/time.h>
#include "sldns/sbuffer.h"
#include "util/config_file.h"
#include "util/net_help.h"
#include "util/netevent.h"
#include "util/log.h"
#include <fstrm.h>
#include <protobuf-c/protobuf-c.h>
#include "dnstap/dnstap.h"
#include "dnstap/dnstap.pb-c.h"
#define DNSTAP_CONTENT_TYPE "protobuf:dnstap.Dnstap"
#define DNSTAP_INITIAL_BUF_SIZE 256
struct dt_msg {
void *buf;
size_t len_buf;
Dnstap__Dnstap d;
Dnstap__Message m;
};
static int
dt_pack(const Dnstap__Dnstap *d, void **buf, size_t *sz)
{
ProtobufCBufferSimple sbuf;
memset(&sbuf, 0, sizeof(sbuf));
sbuf.base.append = protobuf_c_buffer_simple_append;
sbuf.len = 0;
sbuf.alloced = DNSTAP_INITIAL_BUF_SIZE;
sbuf.data = malloc(sbuf.alloced);
if (sbuf.data == NULL)
return 0;
sbuf.must_free_data = 1;
*sz = dnstap__dnstap__pack_to_buffer(d, (ProtobufCBuffer *) &sbuf);
if (sbuf.data == NULL)
return 0;
*buf = sbuf.data;
return 1;
}
static void
dt_send(const struct dt_env *env, void *buf, size_t len_buf)
{
fstrm_res res;
if (!buf)
return;
res = fstrm_iothr_submit(env->iothr, env->ioq, buf, len_buf,
fstrm_free_wrapper, NULL);
if (res != fstrm_res_success)
free(buf);
}
static void
dt_msg_init(const struct dt_env *env,
struct dt_msg *dm,
Dnstap__Message__Type mtype)
{
memset(dm, 0, sizeof(*dm));
dm->d.base.descriptor = &dnstap__dnstap__descriptor;
dm->m.base.descriptor = &dnstap__message__descriptor;
dm->d.type = DNSTAP__DNSTAP__TYPE__MESSAGE;
dm->d.message = &dm->m;
dm->m.type = mtype;
if (env->identity != NULL) {
dm->d.identity.data = (uint8_t *) env->identity;
dm->d.identity.len = (size_t) env->len_identity;
dm->d.has_identity = 1;
}
if (env->version != NULL) {
dm->d.version.data = (uint8_t *) env->version;
dm->d.version.len = (size_t) env->len_version;
dm->d.has_version = 1;
}
}
struct dt_env *
dt_create(const char *socket_path, unsigned num_workers)
{
fstrm_res res;
struct dt_env *env;
struct fstrm_iothr_options *fopt;
struct fstrm_unix_writer_options *fuwopt;
struct fstrm_writer *fw;
struct fstrm_writer_options *fwopt;
verbose(VERB_OPS, "attempting to connect to dnstap socket %s",
socket_path);
log_assert(socket_path != NULL);
log_assert(num_workers > 0);
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
if (!env)
return NULL;
fwopt = fstrm_writer_options_init();
res = fstrm_writer_options_add_content_type(fwopt,
DNSTAP_CONTENT_TYPE, sizeof(DNSTAP_CONTENT_TYPE) - 1);
log_assert(res == fstrm_res_success);
fuwopt = fstrm_unix_writer_options_init();
fstrm_unix_writer_options_set_socket_path(fuwopt, socket_path);
fw = fstrm_unix_writer_init(fuwopt, fwopt);
log_assert(fw != NULL);
fopt = fstrm_iothr_options_init();
fstrm_iothr_options_set_num_input_queues(fopt, num_workers);
env->iothr = fstrm_iothr_init(fopt, &fw);
if (env->iothr == NULL) {
verbose(VERB_DETAIL, "dt_create: fstrm_iothr_init() failed");
fstrm_writer_destroy(&fw);
free(env);
env = NULL;
}
fstrm_iothr_options_destroy(&fopt);
fstrm_unix_writer_options_destroy(&fuwopt);
fstrm_writer_options_destroy(&fwopt);
return env;
}
static void
dt_apply_identity(struct dt_env *env, struct config_file *cfg)
{
char buf[MAXHOSTNAMELEN+1];
if (!cfg->dnstap_send_identity)
return;
free(env->identity);
if (cfg->dnstap_identity == NULL || cfg->dnstap_identity[0] == 0) {
if (gethostname(buf, MAXHOSTNAMELEN) == 0) {
buf[MAXHOSTNAMELEN] = 0;
env->identity = strdup(buf);
} else {
fatal_exit("dt_apply_identity: gethostname() failed");
}
} else {
env->identity = strdup(cfg->dnstap_identity);
}
if (env->identity == NULL)
fatal_exit("dt_apply_identity: strdup() failed");
env->len_identity = (unsigned int)strlen(env->identity);
verbose(VERB_OPS, "dnstap identity field set to \"%s\"",
env->identity);
}
static void
dt_apply_version(struct dt_env *env, struct config_file *cfg)
{
if (!cfg->dnstap_send_version)
return;
free(env->version);
if (cfg->dnstap_version == NULL || cfg->dnstap_version[0] == 0)
env->version = strdup(PACKAGE_STRING);
else
env->version = strdup(cfg->dnstap_version);
if (env->version == NULL)
fatal_exit("dt_apply_version: strdup() failed");
env->len_version = (unsigned int)strlen(env->version);
verbose(VERB_OPS, "dnstap version field set to \"%s\"",
env->version);
}
void
dt_apply_cfg(struct dt_env *env, struct config_file *cfg)
{
if (!cfg->dnstap)
return;
dt_apply_identity(env, cfg);
dt_apply_version(env, cfg);
if ((env->log_resolver_query_messages = (unsigned int)
cfg->dnstap_log_resolver_query_messages))
{
verbose(VERB_OPS, "dnstap Message/RESOLVER_QUERY enabled");
}
if ((env->log_resolver_response_messages = (unsigned int)
cfg->dnstap_log_resolver_response_messages))
{
verbose(VERB_OPS, "dnstap Message/RESOLVER_RESPONSE enabled");
}
if ((env->log_client_query_messages = (unsigned int)
cfg->dnstap_log_client_query_messages))
{
verbose(VERB_OPS, "dnstap Message/CLIENT_QUERY enabled");
}
if ((env->log_client_response_messages = (unsigned int)
cfg->dnstap_log_client_response_messages))
{
verbose(VERB_OPS, "dnstap Message/CLIENT_RESPONSE enabled");
}
if ((env->log_forwarder_query_messages = (unsigned int)
cfg->dnstap_log_forwarder_query_messages))
{
verbose(VERB_OPS, "dnstap Message/FORWARDER_QUERY enabled");
}
if ((env->log_forwarder_response_messages = (unsigned int)
cfg->dnstap_log_forwarder_response_messages))
{
verbose(VERB_OPS, "dnstap Message/FORWARDER_RESPONSE enabled");
}
}
int
dt_init(struct dt_env *env)
{
env->ioq = fstrm_iothr_get_input_queue(env->iothr);
if (env->ioq == NULL)
return 0;
return 1;
}
void
dt_delete(struct dt_env *env)
{
if (!env)
return;
verbose(VERB_OPS, "closing dnstap socket");
fstrm_iothr_destroy(&env->iothr);
free(env->identity);
free(env->version);
free(env);
}
static void
dt_fill_timeval(const struct timeval *tv,
uint64_t *time_sec, protobuf_c_boolean *has_time_sec,
uint32_t *time_nsec, protobuf_c_boolean *has_time_nsec)
{
#ifndef S_SPLINT_S
*time_sec = tv->tv_sec;
*time_nsec = tv->tv_usec * 1000;
#endif
*has_time_sec = 1;
*has_time_nsec = 1;
}
static void
dt_fill_buffer(sldns_buffer *b, ProtobufCBinaryData *p, protobuf_c_boolean *has)
{
log_assert(b != NULL);
p->len = sldns_buffer_limit(b);
p->data = sldns_buffer_begin(b);
*has = 1;
}
static void
dt_msg_fill_net(struct dt_msg *dm,
struct sockaddr_storage *ss,
enum comm_point_type cptype,
ProtobufCBinaryData *addr, protobuf_c_boolean *has_addr,
uint32_t *port, protobuf_c_boolean *has_port)
{
log_assert(ss->ss_family == AF_INET6 || ss->ss_family == AF_INET);
if (ss->ss_family == AF_INET6) {
struct sockaddr_in6 *s = (struct sockaddr_in6 *) ss;
/* socket_family */
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET6;
dm->m.has_socket_family = 1;
/* addr: query_address or response_address */
addr->data = s->sin6_addr.s6_addr;
addr->len = 16; /* IPv6 */
*has_addr = 1;
/* port: query_port or response_port */
*port = ntohs(s->sin6_port);
*has_port = 1;
} else if (ss->ss_family == AF_INET) {
struct sockaddr_in *s = (struct sockaddr_in *) ss;
/* socket_family */
dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET;
dm->m.has_socket_family = 1;
/* addr: query_address or response_address */
addr->data = (uint8_t *) &s->sin_addr.s_addr;
addr->len = 4; /* IPv4 */
*has_addr = 1;
/* port: query_port or response_port */
*port = ntohs(s->sin_port);
*has_port = 1;
}
log_assert(cptype == comm_udp || cptype == comm_tcp);
if (cptype == comm_udp) {
/* socket_protocol */
dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__UDP;
dm->m.has_socket_protocol = 1;
} else if (cptype == comm_tcp) {
/* socket_protocol */
dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__TCP;
dm->m.has_socket_protocol = 1;
}
}
void
dt_msg_send_client_query(struct dt_env *env,
struct sockaddr_storage *qsock,
enum comm_point_type cptype,
sldns_buffer *qmsg)
{
struct dt_msg dm;
struct timeval qtime;
gettimeofday(&qtime, NULL);
/* type */
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_QUERY);
/* query_time */
dt_fill_timeval(&qtime,
&dm.m.query_time_sec, &dm.m.has_query_time_sec,
&dm.m.query_time_nsec, &dm.m.has_query_time_nsec);
/* query_message */
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
/* socket_family, socket_protocol, query_address, query_port */
log_assert(cptype == comm_udp || cptype == comm_tcp);
dt_msg_fill_net(&dm, qsock, cptype,
&dm.m.query_address, &dm.m.has_query_address,
&dm.m.query_port, &dm.m.has_query_port);
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
dt_send(env, dm.buf, dm.len_buf);
}
void
dt_msg_send_client_response(struct dt_env *env,
struct sockaddr_storage *qsock,
enum comm_point_type cptype,
sldns_buffer *rmsg)
{
struct dt_msg dm;
struct timeval rtime;
gettimeofday(&rtime, NULL);
/* type */
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_RESPONSE);
/* response_time */
dt_fill_timeval(&rtime,
&dm.m.response_time_sec, &dm.m.has_response_time_sec,
&dm.m.response_time_nsec, &dm.m.has_response_time_nsec);
/* response_message */
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
/* socket_family, socket_protocol, query_address, query_port */
log_assert(cptype == comm_udp || cptype == comm_tcp);
dt_msg_fill_net(&dm, qsock, cptype,
&dm.m.query_address, &dm.m.has_query_address,
&dm.m.query_port, &dm.m.has_query_port);
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
dt_send(env, dm.buf, dm.len_buf);
}
void
dt_msg_send_outside_query(struct dt_env *env,
struct sockaddr_storage *rsock,
enum comm_point_type cptype,
uint8_t *zone, size_t zone_len,
sldns_buffer *qmsg)
{
struct dt_msg dm;
struct timeval qtime;
uint16_t qflags;
gettimeofday(&qtime, NULL);
qflags = sldns_buffer_read_u16_at(qmsg, 2);
/* type */
if (qflags & BIT_RD) {
if (!env->log_forwarder_query_messages)
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_QUERY);
} else {
if (!env->log_resolver_query_messages)
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_QUERY);
}
/* query_zone */
dm.m.query_zone.data = zone;
dm.m.query_zone.len = zone_len;
dm.m.has_query_zone = 1;
/* query_time_sec, query_time_nsec */
dt_fill_timeval(&qtime,
&dm.m.query_time_sec, &dm.m.has_query_time_sec,
&dm.m.query_time_nsec, &dm.m.has_query_time_nsec);
/* query_message */
dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message);
/* socket_family, socket_protocol, response_address, response_port */
log_assert(cptype == comm_udp || cptype == comm_tcp);
dt_msg_fill_net(&dm, rsock, cptype,
&dm.m.response_address, &dm.m.has_response_address,
&dm.m.response_port, &dm.m.has_response_port);
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
dt_send(env, dm.buf, dm.len_buf);
}
void
dt_msg_send_outside_response(struct dt_env *env,
struct sockaddr_storage *rsock,
enum comm_point_type cptype,
uint8_t *zone, size_t zone_len,
uint8_t *qbuf, size_t qbuf_len,
const struct timeval *qtime,
const struct timeval *rtime,
sldns_buffer *rmsg)
{
struct dt_msg dm;
uint16_t qflags;
log_assert(qbuf_len >= sizeof(qflags));
memcpy(&qflags, qbuf, sizeof(qflags));
qflags = ntohs(qflags);
/* type */
if (qflags & BIT_RD) {
if (!env->log_forwarder_response_messages)
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE);
} else {
if (!env->log_resolver_response_messages)
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE);
}
/* query_zone */
dm.m.query_zone.data = zone;
dm.m.query_zone.len = zone_len;
dm.m.has_query_zone = 1;
/* query_time_sec, query_time_nsec */
dt_fill_timeval(qtime,
&dm.m.query_time_sec, &dm.m.has_query_time_sec,
&dm.m.query_time_nsec, &dm.m.has_query_time_nsec);
/* response_time_sec, response_time_nsec */
dt_fill_timeval(rtime,
&dm.m.response_time_sec, &dm.m.has_response_time_sec,
&dm.m.response_time_nsec, &dm.m.has_response_time_nsec);
/* response_message */
dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message);
/* socket_family, socket_protocol, response_address, response_port */
log_assert(cptype == comm_udp || cptype == comm_tcp);
dt_msg_fill_net(&dm, rsock, cptype,
&dm.m.response_address, &dm.m.has_response_address,
&dm.m.response_port, &dm.m.has_response_port);
if (dt_pack(&dm.d, &dm.buf, &dm.len_buf))
dt_send(env, dm.buf, dm.len_buf);
}
#endif /* USE_DNSTAP */
+188
View File
@@ -0,0 +1,188 @@
/* dnstap support for Unbound */
/*
* Copyright (c) 2013-2014, Farsight Security, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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 HOLDER 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.
*/
#ifndef UNBOUND_DNSTAP_H
#define UNBOUND_DNSTAP_H
#include "dnstap/dnstap_config.h"
#ifdef USE_DNSTAP
struct config_file;
struct fstrm_io;
struct fstrm_queue;
struct sldns_buffer;
struct dt_env {
/** dnstap I/O thread */
struct fstrm_iothr *iothr;
/** dnstap I/O thread input queue */
struct fstrm_iothr_queue *ioq;
/** dnstap "identity" field, NULL if disabled */
char *identity;
/** dnstap "version" field, NULL if disabled */
char *version;
/** length of "identity" field */
unsigned len_identity;
/** length of "version" field */
unsigned len_version;
/** whether to log Message/RESOLVER_QUERY */
unsigned log_resolver_query_messages : 1;
/** whether to log Message/RESOLVER_RESPONSE */
unsigned log_resolver_response_messages : 1;
/** whether to log Message/CLIENT_QUERY */
unsigned log_client_query_messages : 1;
/** whether to log Message/CLIENT_RESPONSE */
unsigned log_client_response_messages : 1;
/** whether to log Message/FORWARDER_QUERY */
unsigned log_forwarder_query_messages : 1;
/** whether to log Message/FORWARDER_RESPONSE */
unsigned log_forwarder_response_messages : 1;
};
/**
* Create dnstap environment object. Afterwards, call dt_apply_cfg() to fill in
* the config variables and dt_init() to fill in the per-worker state. Each
* worker needs a copy of this object but with its own I/O queue (the fq field
* of the structure) to ensure lock-free access to its own per-worker circular
* queue. Duplicate the environment object if more than one worker needs to
* share access to the dnstap I/O socket.
* @param socket_path: path to dnstap logging socket, must be non-NULL.
* @param num_workers: number of worker threads, must be > 0.
* @return dt_env object, NULL on failure.
*/
struct dt_env *
dt_create(const char *socket_path, unsigned num_workers);
/**
* Apply config settings.
* @param env: dnstap environment object.
* @param cfg: new config settings.
*/
void
dt_apply_cfg(struct dt_env *env, struct config_file *cfg);
/**
* Initialize per-worker state in dnstap environment object.
* @param env: dnstap environment object to initialize, created with dt_create().
* @return: true on success, false on failure.
*/
int
dt_init(struct dt_env *env);
/**
* Delete dnstap environment object. Closes dnstap I/O socket and deletes all
* per-worker I/O queues.
*/
void
dt_delete(struct dt_env *env);
/**
* Create and send a new dnstap "Message" event of type CLIENT_QUERY.
* @param env: dnstap environment object.
* @param qsock: address/port of client.
* @param cptype: comm_udp or comm_tcp.
* @param qmsg: query message.
*/
void
dt_msg_send_client_query(struct dt_env *env,
struct sockaddr_storage *qsock,
enum comm_point_type cptype,
struct sldns_buffer *qmsg);
/**
* Create and send a new dnstap "Message" event of type CLIENT_RESPONSE.
* @param env: dnstap environment object.
* @param qsock: address/port of client.
* @param cptype: comm_udp or comm_tcp.
* @param rmsg: response message.
*/
void
dt_msg_send_client_response(struct dt_env *env,
struct sockaddr_storage *qsock,
enum comm_point_type cptype,
struct sldns_buffer *rmsg);
/**
* Create and send a new dnstap "Message" event of type RESOLVER_QUERY or
* FORWARDER_QUERY. The type used is dependent on the value of the RD bit
* in the query header.
* @param env: dnstap environment object.
* @param rsock: address/port of server the query is being sent to.
* @param cptype: comm_udp or comm_tcp.
* @param zone: query zone.
* @param zone_len: length of zone.
* @param qmsg: query message.
*/
void
dt_msg_send_outside_query(struct dt_env *env,
struct sockaddr_storage *rsock,
enum comm_point_type cptype,
uint8_t *zone, size_t zone_len,
struct sldns_buffer *qmsg);
/**
* Create and send a new dnstap "Message" event of type RESOLVER_RESPONSE or
* FORWARDER_RESPONSE. The type used is dependent on the value of the RD bit
* in the query header.
* @param env: dnstap environment object.
* @param rsock: address/port of server the response was received from.
* @param cptype: comm_udp or comm_tcp.
* @param zone: query zone.
* @param zone_len: length of zone.
* @param qbuf: outside_network's qbuf key.
* @param qbuf_len: length of outside_network's qbuf key.
* @param qtime: time query message was sent.
* @param rtime: time response message was sent.
* @param rmsg: response message.
*/
void
dt_msg_send_outside_response(struct dt_env *env,
struct sockaddr_storage *rsock,
enum comm_point_type cptype,
uint8_t *zone, size_t zone_len,
uint8_t *qbuf, size_t qbuf_len,
const struct timeval *qtime,
const struct timeval *rtime,
struct sldns_buffer *rmsg);
#endif /* USE_DNSTAP */
#endif /* UNBOUND_DNSTAP_H */
+56
View File
@@ -0,0 +1,56 @@
# dnstap.m4
# dt_DNSTAP(default_dnstap_socket_path, [action-if-true], [action-if-false])
# --------------------------------------------------------------------------
# Check for required dnstap libraries and add dnstap configure args.
AC_DEFUN([dt_DNSTAP],
[
AC_ARG_ENABLE([dnstap],
AS_HELP_STRING([--enable-dnstap],
[Enable dnstap support (requires fstrm, protobuf-c)]),
[opt_dnstap=$enableval], [opt_dnstap=no])
AC_ARG_WITH([dnstap-socket-path],
AS_HELP_STRING([--with-dnstap-socket-path=pathname],
[set default dnstap socket path]),
[opt_dnstap_socket_path=$withval], [opt_dnstap_socket_path="$1"])
if test "x$opt_dnstap" != "xno"; then
AC_PATH_PROG([PROTOC_C], [protoc-c])
if test -z "$PROTOC_C"; then
AC_MSG_ERROR([The protoc-c program was not found. Please install protobuf-c!])
fi
AC_ARG_WITH([protobuf-c], AC_HELP_STRING([--with-protobuf-c=path],
[Path where protobuf-c is installed, for dnstap]), [
# workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
], [
# workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
CFLAGS="$CFLAGS -I/usr/include/google"
else
if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
CFLAGS="$CFLAGS -I/usr/local/include/google"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
fi
])
AC_ARG_WITH([libfstrm], AC_HELP_STRING([--with-libfstrm=path],
[Path where libfstrm is installed, for dnstap]), [
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
])
AC_SEARCH_LIBS([fstrm_iothr_init], [fstrm], [],
AC_MSG_ERROR([The fstrm library was not found. Please install fstrm!]))
AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!]))
$2
else
$3
fi
])
+262
View File
@@ -0,0 +1,262 @@
// dnstap: flexible, structured event replication format for DNS software
//
// This file contains the protobuf schemas for the "dnstap" structured event
// replication format for DNS software.
// Written in 2013-2014 by Farsight Security, Inc.
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this file to the public
// domain worldwide. This file is distributed without any warranty.
//
// You should have received a copy of the CC0 Public Domain Dedication along
// with this file. If not, see:
//
// <http://creativecommons.org/publicdomain/zero/1.0/>.
package dnstap;
// "Dnstap": this is the top-level dnstap type, which is a "union" type that
// contains other kinds of dnstap payloads, although currently only one type
// of dnstap payload is defined.
// See: https://developers.google.com/protocol-buffers/docs/techniques#union
message Dnstap {
// DNS server identity.
// If enabled, this is the identity string of the DNS server which generated
// this message. Typically this would be the same string as returned by an
// "NSID" (RFC 5001) query.
optional bytes identity = 1;
// DNS server version.
// If enabled, this is the version string of the DNS server which generated
// this message. Typically this would be the same string as returned by a
// "version.bind" query.
optional bytes version = 2;
// Extra data for this payload.
// This field can be used for adding an arbitrary byte-string annotation to
// the payload. No encoding or interpretation is applied or enforced.
optional bytes extra = 3;
// Identifies which field below is filled in.
enum Type {
MESSAGE = 1;
}
required Type type = 15;
// One of the following will be filled in.
optional Message message = 14;
}
// SocketFamily: the network protocol family of a socket. This specifies how
// to interpret "network address" fields.
enum SocketFamily {
INET = 1; // IPv4 (RFC 791)
INET6 = 2; // IPv6 (RFC 2460)
}
// SocketProtocol: the transport protocol of a socket. This specifies how to
// interpret "transport port" fields.
enum SocketProtocol {
UDP = 1; // User Datagram Protocol (RFC 768)
TCP = 2; // Transmission Control Protocol (RFC 793)
}
// Message: a wire-format (RFC 1035 section 4) DNS message and associated
// metadata. Applications generating "Message" payloads should follow
// certain requirements based on the MessageType, see below.
message Message {
// There are eight types of "Message" defined that correspond to the
// four arrows in the following diagram, slightly modified from RFC 1035
// section 2:
// +---------+ +----------+ +--------+
// | | query | | query | |
// | Stub |-SQ--------CQ->| Recursive|-RQ----AQ->| Auth. |
// | Resolver| | Server | | Name |
// | |<-SR--------CR-| |<-RR----AR-| Server |
// +---------+ response | | response | |
// +----------+ +--------+
// Each arrow has two Type values each, one for each "end" of each arrow,
// because these are considered to be distinct events. Each end of each
// arrow on the diagram above has been marked with a two-letter Type
// mnemonic. Clockwise from upper left, these mnemonic values are:
//
// SQ: STUB_QUERY
// CQ: CLIENT_QUERY
// RQ: RESOLVER_QUERY
// AQ: AUTH_QUERY
// AR: AUTH_RESPONSE
// RR: RESOLVER_RESPONSE
// CR: CLIENT_RESPONSE
// SR: STUB_RESPONSE
// Two additional types of "Message" have been defined for the
// "forwarding" case where an upstream DNS server is responsible for
// further recursion. These are not shown on the diagram above, but have
// the following mnemonic values:
// FQ: FORWARDER_QUERY
// FR: FORWARDER_RESPONSE
// The "Message" Type values are defined below.
enum Type {
// AUTH_QUERY is a DNS query message received from a resolver by an
// authoritative name server, from the perspective of the authoritative
// name server.
AUTH_QUERY = 1;
// AUTH_RESPONSE is a DNS response message sent from an authoritative
// name server to a resolver, from the perspective of the authoritative
// name server.
AUTH_RESPONSE = 2;
// RESOLVER_QUERY is a DNS query message sent from a resolver to an
// authoritative name server, from the perspective of the resolver.
// Resolvers typically clear the RD (recursion desired) bit when
// sending queries.
RESOLVER_QUERY = 3;
// RESOLVER_RESPONSE is a DNS response message received from an
// authoritative name server by a resolver, from the perspective of
// the resolver.
RESOLVER_RESPONSE = 4;
// CLIENT_QUERY is a DNS query message sent from a client to a DNS
// server which is expected to perform further recursion, from the
// perspective of the DNS server. The client may be a stub resolver or
// forwarder or some other type of software which typically sets the RD
// (recursion desired) bit when querying the DNS server. The DNS server
// may be a simple forwarding proxy or it may be a full recursive
// resolver.
CLIENT_QUERY = 5;
// CLIENT_RESPONSE is a DNS response message sent from a DNS server to
// a client, from the perspective of the DNS server. The DNS server
// typically sets the RA (recursion available) bit when responding.
CLIENT_RESPONSE = 6;
// FORWARDER_QUERY is a DNS query message sent from a downstream DNS
// server to an upstream DNS server which is expected to perform
// further recursion, from the perspective of the downstream DNS
// server.
FORWARDER_QUERY = 7;
// FORWARDER_RESPONSE is a DNS response message sent from an upstream
// DNS server performing recursion to a downstream DNS server, from the
// perspective of the downstream DNS server.
FORWARDER_RESPONSE = 8;
// STUB_QUERY is a DNS query message sent from a stub resolver to a DNS
// server, from the perspective of the stub resolver.
STUB_QUERY = 9;
// STUB_RESPONSE is a DNS response message sent from a DNS server to a
// stub resolver, from the perspective of the stub resolver.
STUB_RESPONSE = 10;
}
// One of the Type values described above.
required Type type = 1;
// One of the SocketFamily values described above.
optional SocketFamily socket_family = 2;
// One of the SocketProtocol values described above.
optional SocketProtocol socket_protocol = 3;
// The network address of the message initiator.
// For SocketFamily INET, this field is 4 octets (IPv4 address).
// For SocketFamily INET6, this field is 16 octets (IPv6 address).
optional bytes query_address = 4;
// The network address of the message responder.
// For SocketFamily INET, this field is 4 octets (IPv4 address).
// For SocketFamily INET6, this field is 16 octets (IPv6 address).
optional bytes response_address = 5;
// The transport port of the message initiator.
// This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
optional uint32 query_port = 6;
// The transport port of the message responder.
// This is a 16-bit UDP or TCP port number, depending on SocketProtocol.
optional uint32 response_port = 7;
// The time at which the DNS query message was sent or received, depending
// on whether this is an AUTH_QUERY, RESOLVER_QUERY, or CLIENT_QUERY.
// This is the number of seconds since the UNIX epoch.
optional uint64 query_time_sec = 8;
// The time at which the DNS query message was sent or received.
// This is the seconds fraction, expressed as a count of nanoseconds.
optional fixed32 query_time_nsec = 9;
// The initiator's original wire-format DNS query message, verbatim.
optional bytes query_message = 10;
// The "zone" or "bailiwick" pertaining to the DNS query message.
// This is a wire-format DNS domain name.
optional bytes query_zone = 11;
// The time at which the DNS response message was sent or received,
// depending on whether this is an AUTH_RESPONSE, RESOLVER_RESPONSE, or
// CLIENT_RESPONSE.
// This is the number of seconds since the UNIX epoch.
optional uint64 response_time_sec = 12;
// The time at which the DNS response message was sent or received.
// This is the seconds fraction, expressed as a count of nanoseconds.
optional fixed32 response_time_nsec = 13;
// The responder's original wire-format DNS response message, verbatim.
optional bytes response_message = 14;
}
// All fields except for 'type' in the Message schema are optional.
// It is recommended that at least the following fields be filled in for
// particular types of Messages.
// AUTH_QUERY:
// socket_family, socket_protocol
// query_address, query_port
// query_message
// query_time_sec, query_time_nsec
// AUTH_RESPONSE:
// socket_family, socket_protocol
// query_address, query_port
// query_time_sec, query_time_nsec
// response_message
// response_time_sec, response_time_nsec
// RESOLVER_QUERY:
// socket_family, socket_protocol
// query_name, query_type, query_class
// query_message
// query_time_sec, query_time_nsec
// query_zone
// response_address, response_port
// RESOLVER_RESPONSE:
// socket_family, socket_protocol
// query_name, query_type, query_class
// query_time_sec, query_time_nsec
// query_zone
// response_address, response_port
// response_message
// response_time_sec, response_time_nsec
// CLIENT_QUERY:
// socket_family, socket_protocol
// query_message
// query_time_sec, query_time_nsec
// CLIENT_RESPONSE:
// socket_family, socket_protocol
// query_time_sec, query_time_nsec
// response_message
// response_time_sec, response_time_nsec
+17
View File
@@ -0,0 +1,17 @@
#ifndef UNBOUND_DNSTAP_CONFIG_H
#define UNBOUND_DNSTAP_CONFIG_H
/*
* Process this file (dnstap_config.h.in) with AC_CONFIG_FILES to generate
* dnstap_config.h.
*
* This file exists so that USE_DNSTAP can be used without including config.h.
*/
#if @ENABLE_DNSTAP@ /* ENABLE_DNSTAP */
# ifndef USE_DNSTAP
# define USE_DNSTAP 1
# endif
#endif
#endif /* UNBOUND_DNSTAP_CONFIG_H */
Binary file not shown.
+8 -1
View File
@@ -11,6 +11,13 @@ 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.
Simon Perrault - DNS64 module.
Robert Edmonds - dnstap code.
+4158 -7
View File
File diff suppressed because it is too large Load Diff
+35 -23
View File
@@ -12,31 +12,45 @@ 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 1123, 6.1 Requirements for DNS of internet hosts.
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 +58,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.
@@ -82,10 +92,12 @@ AAAA type
2672: DNAME type.
OPT type
3123: APL
3596: AAAA
SSHFP type
4025: IPSECKEY
4033-4035: DS, RRSIG, NSEC, DNSKEY
4701: DHCID
5155: NSEC3, NSEC3PARAM
4408: SPF
6944: DNSKEY algorithm status
+10 -10
View File
@@ -18,13 +18,13 @@ 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.
"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
HOLDER 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.
+67 -19
View File
@@ -3,6 +3,8 @@ Copyright 2007 NLnet Labs
http://unbound.net
This software is under BSD license, see LICENSE for details.
The DNS64 module has BSD license in dns64/dns64.c.
The DNSTAP code has BSD license in dnstap/dnstap.c.
* Download the latest release version of this software from
http://unbound.net
@@ -10,17 +12,11 @@ This software is under BSD license, see LICENSE for details.
http://unbound.net/svn/
* Uses the following libraries;
* ldns http://www.nlnetlabs.nl/ldns/ (BSD license)
(required) can use tarball from source directory.
* libevent http://www.monkey.org/~provos/libevent/ (BSD license)
(optional) can use builtin alternative instead.
* libexpat (for the unbound-anchor helper program) (MIT license)
* 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.
* --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,13 +24,19 @@ 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.
This enables a debug option to statically link against the
libevent library.
* --enable-lock-checks
This enables a debug option to check lock and unlock calls. It needs
a recent pthreads library to work.
@@ -55,27 +57,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 +101,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 +120,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
+30
View File
@@ -0,0 +1,30 @@
The DNS64 code was written by Viagenie, 2009, by Simon Perrault as part
of the Ecdysis project. The code is copyright by them, and has the BSD
license (see the dns64/dns64.c file).
To enable DNS64 functionality in Unbound, two directives in unbound.conf must
be edited:
1. The "module-config" directive must start with "dns64". For example:
module-config: "dns64 validator iterator"
If you're not using DNSSEC then you may remove "validator".
2. The "dns64-prefix" directive indicates your DNS64 prefix. For example:
dns64-prefix: 64:FF9B::/96
The prefix must be a /96 or shorter.
To test that things are working right, perform a query against Unbound for a
domain name for which no AAAA record exists. You should see a AAAA record in
the answer section. The corresponding IPv6 address will be inside the DNS64
prefix. For example:
$ unbound -c unbound.conf
$ dig @localhost jazz-v4.viagenie.ca aaaa
[...]
;; ANSWER SECTION:
jazz-v4.viagenie.ca. 86400 IN AAAA 64:ff9b::ce7b:1f02
+1 -1
View File
@@ -1,6 +1,6 @@
README.svn
For a svn checkout
For a svn checkout:
* configure script, aclocal.m4, as well as yacc/lex output files are
committed to the repository.
* use --enable-debug flag for configure to enable dependency tracking and
+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 -22
View File
@@ -35,12 +35,15 @@ 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.
@@ -51,27 +54,23 @@ o no openssl_add_all_algorithms, but only the ones necessary, less space.
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.
* 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 make so revoke bit keys cannot verify signatures
o option to print UTC timestamps instead of epoch in seconds.
o print querier IP address on high loglevels.
o infra and lame cache: easier size config (in Mb), show usage in graphs.
o #226: unbound_control dump_requestlist
o #227: unbound_control flush_stats
o unbound_control get_stats_noreset
o unbound_control forward [addr {addr}] | [off]
o #231: unbound_checkconf options to output config file data.
o config entry to denote that a zone is to be treated as unsigned (even if
a DS exists to higher trust anchor).
o see if we can use daemon(3), cleaner posix usage.
o see if we can include the python bindings (contrib).
o see if we can suport var:value (nospace) by parser.
o remote control read ssl information while priviledged.
o call initgroups(3) to drop secondary group permissions.
- 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.
+400 -78
View File
@@ -1,14 +1,14 @@
#
# Example configuration file.
#
# See unbound.conf(5) man page.
# See unbound.conf(5) man page, version @version@.
#
# this is a comment.
#Use this to include other text into the file.
#include: "otherfile.conf"
# The server clause sets the main parameters.
# The server clause sets the main parameters.
server:
# whitespace is not necessary, but looks cleaner.
@@ -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,14 +32,15 @@ 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.
# Socket options are not supported on all platforms. experimental.
# interface-automatic: no
# port to answer queries from
@@ -52,10 +53,20 @@ server:
# outgoing-interface: 2001:DB8::5
# outgoing-interface: 2001:DB8::6
# Specify a netblock to use remainder 64 bits as random bits for
# upstream queries. Uses freebind option (Linux).
# outgoing-interface: 2001:DB8::/64
# Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
# And: ip -6 route add local 2001:db8::/64 dev lo
# And set prefer-ip6: yes to use the ip6 randomness from a netblock.
# Set this to yes to prefer ipv6 upstream servers over ipv4.
# prefer-ip6: no
# 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
@@ -65,6 +76,8 @@ server:
# Use this to make sure unbound does not grab a UDP port that some
# other server on this computer needs. The default is to avoid
# IANA-assigned port numbers.
# If multiple outgoing-port-permit and outgoing-port-avoid options
# are present, they are processed in order.
# outgoing-port-avoid: "3200-3208"
# number of outgoing simultaneous tcp buffers to hold per thread.
@@ -72,13 +85,42 @@ 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
# use SO_REUSEPORT to distribute queries over threads.
# so-reuseport: no
# use IP_TRANSPARENT so the interface: addresses can be non-local
# and you can config non-existing IPs that are going to work later on
# (uses IP_BINDANY on FreeBSD).
# ip-transparent: no
# use IP_FREEBIND so the interface: addresses can be non-local
# and you can bind to nonexisting IPs and interfaces that are down.
# Linux only. On Linux you also have ip-transparent that is similar.
# ip-freebind: no
# 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
# Maximum UDP response size (not applied to TCP response).
# Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
# max-udp-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
# the amount of memory to use for the message cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
# plain value in bytes or you can append k, m or G. default is "4Mb".
# msg-cache-size: 4m
# the number of slabs to use for the message cache.
@@ -92,36 +134,47 @@ server:
# if very busy, 50% queries run to completion, 50% get timeout in msec
# jostle-timeout: 200
# msec to wait before close of port on timeout UDP. 0 disables.
# delay-close: 0
# the amount of memory to use for the RRset cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
# plain value in bytes or you can append k, m or G. default is "4Mb".
# rrset-cache-size: 4m
# the number of slabs to use for the RRset cache.
# 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 cap for negative responses in the cache
# cache-max-negative-ttl: 3600
# 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
# minimum wait time for responses, increase if uplink is long. In msec.
# infra-cache-min-rtt: 50
# 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
# define a number of tags here, use with local-zone, access-control.
# repeat the define-tag statement to add additional tags.
# define-tag: "tag1 tag2 tag3"
# Enable IPv4, "yes" or "no".
# do-ip4: yes
@@ -135,6 +188,18 @@ 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
# Maximum segment size (MSS) of TCP socket on which the server
# responds to queries. Default is 0, system default MSS.
# tcp-mss: 0
# Maximum segment size (MSS) of TCP socket for outgoing queries.
# Default is 0, system default MSS.
# outgoing-tcp-mss: 0
# Detach from the terminal, run in background, "yes" or "no".
# do-daemonize: yes
@@ -143,20 +208,39 @@ server:
# By default everything is refused, except for localhost.
# Choose deny (drop message), refuse (polite error reply),
# allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
# deny_non_local (drop queries unless can be answered from local-data)
# refuse_non_local (like deny_non_local but polite error reply).
# access-control: 0.0.0.0/0 refuse
# access-control: 127.0.0.0/8 allow
# access-control: ::0/0 refuse
# access-control: ::1 allow
# access-control: ::ffff:127.0.0.1 allow
# tag access-control with list of tags (in "" with spaces between)
# Clients using this access control element use localzones that
# are tagged with one of these tags.
# access-control-tag: 192.0.2.0/24 "tag2 tag3"
# set action for particular tag for given access control element
# if you have multiple tag values, the tag used to lookup the action
# is the first tag match between access-control-tag and local-zone-tag
# where "first" comes from the order of the define-tag values.
# access-control-tag-action: 192.0.2.0/24 tag3 refuse
# set redirect data for particular tag for access control element
# access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
# Set view for access control element
# access-control-view: 192.0.2.0/24 viewname
# if given, a chroot(2) is done to the given directory.
# i.e. you can chroot to the working directory, for example,
# for extra security, but make sure all files are in that directory.
#
# If chroot is enabled, you should pass the configfile (from the
# commandline) as a full path from the original root. After the
# chroot has been performed the now defunct portion of the config
# file path is removed to be able to reread the config after a reload.
# chroot has been performed the now defunct portion of the config
# file path is removed to be able to reread the config after a reload.
#
# All other file paths (working dir, logfile, roothints, and
# key files) can be specified in several ways:
@@ -165,7 +249,7 @@ server:
# o as an absolute path relative to the original root.
# In the last case the path is adjusted to remove the unused portion.
#
# The pid file can be absolute and outside of the chroot, it is
# The pid file can be absolute and outside of the chroot, it is
# written just prior to performing the chroot and dropping permissions.
#
# Additionally, unbound may need to access /dev/random (for entropy).
@@ -179,89 +263,126 @@ server:
# If you give "" no privileges are dropped.
# username: "@UNBOUND_USERNAME@"
# the working directory. The relative files in this config are
# the working directory. The relative files in this config are
# relative to this directory. If you give "" the working directory
# is not changed.
# If you give a server: directory: dir before include: file statements
# then those includes can be relative to the working directory.
# directory: "@UNBOUND_RUN_DIR@"
# the log file, "" means log to stderr.
# 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
# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
# log to. If yes, it overrides the logfile.
# use-syslog: yes
# Log identity to report. if empty, defaults to the name of argv[0]
# (usually "unbound").
# log-identity: ""
# 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
# get one from https://www.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
# series of integers describing the policy per dependency depth.
# The number of values in the list determines the maximum dependency
# depth the recursor will pursue before giving up. Each integer means:
# -1 : fetch all targets opportunistically,
# 0: fetch on demand,
# 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 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 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
# 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 the referral path by performing additional queries for
# 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
# Default off, because the lookups burden the server. Experimental
# implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
# harden-referral-path: no
# Harden against algorithm downgrade when multiple algorithms are
# advertised in the DS record. If no, allows the weakest algorithm
# to validate the zone.
# harden-algo-downgrade: no
# Sent minimum amount of information to upstream servers to enhance
# privacy. Only sent minimum required labels of the QNAME and set QTYPE
# to NS when possible.
# qname-minimisation: no
# QNAME minimisation in strict mode. Do not fall-back to sending full
# QNAME to potentially broken nameservers. A lot of domains will not be
# resolvable when this option in enabled.
# This option only has effect when qname-minimisation is enabled.
# qname-minimisation-strict: no
# 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).
# Only 'private-domain' and 'local-data' names are allowed to have
# Domains (and domains in them) without support for dns-0x20 and
# the fallback fails because they keep sending different answers.
# caps-whitelist: "licdn.com"
# caps-whitelist: "senderbase.org"
# 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).
# Only 'private-domain' and 'local-data' names are allowed to have
# these private addresses. No default.
# 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
# private-address: ::ffff:0:0/96
# 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,92 +394,216 @@ 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
# true to disable DNSSEC lameness check in iterator.
# disable-dnssec-lame-check: no
# module configuration of the server. A string with identifiers
# separated by spaces. "iterator" or "validator iterator"
# separated by spaces. Syntax: "[dns64] [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
# DLV is going to be decommissioned. Please do not use it any more.
# 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"
# File with trusted keys for validation. Specify more than one file
# with several entries, one file per entry. Like trust-anchor-file
# but has a different file format. Format is BIND-9 style format,
# 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
# 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
# Serve expired reponses from cache, with TTL 0 in the response,
# and then attempt to fetch the data afresh.
# serve-expired: 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
# debug option that allows very small holddown times for key rollover,
# otherwise the RFC mandates probe intervals must be at least 1 hour.
# permit-small-holddown: no
# 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".
# plain value in bytes or you can append k, m or G. default is "4Mb".
# key-cache-size: 4m
# the number of slabs to use for the key cache.
# 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".
# plain value in bytes or you can append k, m or G. default is "1Mb".
# neg-cache-size: 1m
# By default, for a number of zones a small default 'nothing here'
# reply is built-in. Query traffic is thus blocked. If you
# wish to serve such zone you can unblock them by uncommenting one
# of the nodefault statements below.
# You may also have to use domain-insecure: zone to make DNSSEC work,
# unless you have your own trust anchors for this zone.
# local-zone: "localhost." nodefault
# local-zone: "127.in-addr.arpa." nodefault
# local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
# local-zone: "onion." nodefault
# local-zone: "10.in-addr.arpa." nodefault
# local-zone: "16.172.in-addr.arpa." nodefault
# local-zone: "17.172.in-addr.arpa." nodefault
# local-zone: "18.172.in-addr.arpa." nodefault
# local-zone: "19.172.in-addr.arpa." nodefault
# local-zone: "20.172.in-addr.arpa." nodefault
# local-zone: "21.172.in-addr.arpa." nodefault
# local-zone: "22.172.in-addr.arpa." nodefault
# local-zone: "23.172.in-addr.arpa." nodefault
# local-zone: "24.172.in-addr.arpa." nodefault
# local-zone: "25.172.in-addr.arpa." nodefault
# local-zone: "26.172.in-addr.arpa." nodefault
# local-zone: "27.172.in-addr.arpa." nodefault
# local-zone: "28.172.in-addr.arpa." nodefault
# local-zone: "29.172.in-addr.arpa." nodefault
# local-zone: "30.172.in-addr.arpa." nodefault
# local-zone: "31.172.in-addr.arpa." nodefault
# local-zone: "168.192.in-addr.arpa." nodefault
# local-zone: "0.in-addr.arpa." nodefault
# local-zone: "254.169.in-addr.arpa." nodefault
# local-zone: "2.0.192.in-addr.arpa." nodefault
# local-zone: "100.51.198.in-addr.arpa." nodefault
# local-zone: "113.0.203.in-addr.arpa." nodefault
# local-zone: "255.255.255.255.in-addr.arpa." nodefault
# local-zone: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
# local-zone: "d.f.ip6.arpa." nodefault
# local-zone: "8.e.f.ip6.arpa." nodefault
# local-zone: "9.e.f.ip6.arpa." nodefault
# local-zone: "a.e.f.ip6.arpa." nodefault
# local-zone: "b.e.f.ip6.arpa." nodefault
# local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
# And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
# If unbound is running service for the local host then it is useful
# to perform lan-wide lookups to the upstream, and unblock the
# long list of local-zones above. If this unbound is a dns server
# for a network of computers, disabled is better and stops information
# leakage of local lan information.
# unblock-lan-zones: no
# The insecure-lan-zones option disables validation for
# these zones, as if they were all listed as domain-insecure.
# insecure-lan-zones: no
# a number of locally served zones can be configured.
# local-zone: <zone> <type>
# local-data: "<resource record string>"
# o deny serves local data (if any), else, drops queries.
# 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 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
# o inform acts like transparent, but logs client IP address
# o inform_deny drops queries and logs client IP address
# o always_transparent, always_refuse, always_nxdomain, resolve in
# that way but ignore local data for that name.
#
# defaults are localhost address, reverse for 127.0.0.1 and ::1
# and nxdomain for AS112 zones. If you configure one of these zones
# the default content is omitted, or you can omit it with 'nodefault'.
#
#
# If you configure local-data without specifying local-zone, by
# default a transparent local-zone is created for the data.
#
@@ -380,19 +625,72 @@ server:
# you need to do the reverse notation yourself.
# local-data-ptr: "192.0.2.3 www.example.com"
# Remote control config section.
# tag a localzone with a list of tag names (in "" with spaces between)
# local-zone-tag: "example.com" "tag2 tag3"
# add a netblock specific override to a localzone, with zone type
# local-zone-override: "example.com" 192.0.2.0/24 refuse
# 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: 853
# 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
# DNS64 prefix. Must be specified when DNS64 is use.
# Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
# dns64-prefix: 64:ff9b::0/96
# ratelimit for uncached, new queries, this limits recursion effort.
# ratelimiting is experimental, and may help against randomqueryflood.
# if 0(default) it is disabled, otherwise state qps allowed per zone.
# ratelimit: 0
# ratelimits are tracked in a cache, size in bytes of cache (or k,m).
# ratelimit-size: 4m
# ratelimit cache slabs, reduces lock contention if equal to cpucount.
# ratelimit-slabs: 4
# 0 blocks when ratelimited, otherwise let 1/xth traffic through
# ratelimit-factor: 10
# override the ratelimit for a specific domain name.
# give this setting multiple times to have multiple overrides.
# ratelimit-for-domain: example.com 1000
# override the ratelimits for all domains below a domain name
# can give this multiple times, the name closest to the zone is used.
# ratelimit-below-domain: com 1000
# 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.
# set up the keys and certificates with unbound-control-setup.
# control-enable: no
# Set to no and use an absolute path as control-interface to use
# a unix local named pipe for unbound-control.
# control-use-cert: yes
# what interfaces are listened to for remote control.
# give 0.0.0.0 and ::0 to listen to all interfaces.
# control-interface: 127.0.0.1
# 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"
@@ -407,14 +705,19 @@ remote-control:
# control-cert-file: "@UNBOUND_RUN_DIR@/unbound_control.pem"
# Stub zones.
# Create entries like below, to make all queries for 'example.com' and
# '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,
# Create entries like below, to make all queries for 'example.com' and
# '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.
# Consider adding domain-insecure: name and local-zone: name nodefault
# to the server: section if the stub is a locally served zone.
# stub-zone:
# name: "example.com"
# stub-addr: 192.0.2.68
# stub-prime: "no"
# stub-prime: no
# stub-first: no
# stub-ssl-upstream: no
# stub-zone:
# name: "example.org"
# stub-host: ns.example.com.
@@ -424,10 +727,29 @@ 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-ssl-upstream: no
# forward-zone:
# name: "example.org"
# forward-host: fwd.example.com
# Views
# Create named views. Name must be unique. Map views to requests using
# the access-control-view option. Views can contain zero or more local-zone
# and local-data options. Options from matching views will override global
# options. Global options will be used if no matching view is found.
# With view-first yes, it will try to answer using the global local-zone and
# local-data elements if there is no view specific match.
# view:
# name: "viewname"
# local-zone: "example.com" redirect
# local-data: "example.com A 192.0.2.3"
# view-first: no
# view:
# name: "anotherview"
# local-zone: "example.com" refuse
+100 -20
View File
@@ -8,7 +8,6 @@
.\"
.\"
.SH "NAME"
.LP
.B libunbound,
.B unbound.h,
.B ub_ctx,
@@ -17,11 +16,14 @@
.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_set_stub,
.B ub_ctx_resolvconf,
.B ub_ctx_hosts,
.B ub_ctx_add_ta,
.B ub_ctx_add_ta_autr,
.B ub_ctx_add_ta_file,
.B ub_ctx_trustedkeys,
.B ub_ctx_debugout,
@@ -35,10 +37,14 @@
.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
.B #include <unbound.h>
.LP
\fIstruct ub_ctx *\fR
@@ -51,12 +57,21 @@
\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
\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr);
.LP
\fIint\fR
\fBub_ctx_set_stub\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone,
\fIchar*\fR addr,
.br
\fIint\fR isprime);
.LP
\fIint\fR
\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname);
.LP
\fIint\fR
@@ -66,6 +81,9 @@
\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta);
.LP
\fIint\fR
\fBub_ctx_add_ta_autr\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname);
.LP
\fIint\fR
\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname);
.LP
\fIint\fR
@@ -95,9 +113,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,8 +130,22 @@
.LP
\fIconst char *\fR
\fBub_strerror\fR(\fIint\fR err);
.SH "DESCRIPTION"
.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"
.B Unbound
is an implementation of a DNS resolver, that does caching and
DNSSEC validation. This is the library API, for using the \-lunbound library.
@@ -149,6 +179,10 @@ by default. Use
and
.B ub_ctx_hosts
to read them.
Before you call this, use the openssl functions CRYPTO_set_id_callback and
CRYPTO_set_locking_callback to set up asynchronous operation if you use
lib openssl (the application calls these functions once for initialisation).
Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function.
.TP
.B ub_ctx_delete
Delete validation context and free associated resources.
@@ -160,6 +194,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
@@ -175,20 +214,33 @@ that case the addresses are used as backup servers.
At this time it is only possible to set configuration before the
first resolve is done.
.TP
.B ub_ctx_set_stub
Set a stub zone, authoritative dns servers to use for a particular zone.
IP4 or IP6 address. If the address is NULL the stub entry is removed.
Set isprime true if you configure root hints with it. Otherwise similar to
the stub zone item from unbound's config file. Can be called several times,
for different zones, or to add multiple addresses for a particular zone.
At this time it is only possible to set configuration before the
first resolve is done.
.TP
.B ub_ctx_resolvconf
Read list of nameservers to use from the filename given.
By default the root servers are queried and full resolver mode is used, but
you can use this call to read the list of nameservers to use from the
filename given.
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,9 +249,18 @@ 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_autr
Add filename with automatically tracked trust anchor to the given context.
Pass name of a file with the managed trust anchor. You can create this
file with \fIunbound\-anchor\fR(8) for the root anchor. You can also
create it with an initial file with one line with a DNSKEY or DS record.
If the file is writable, it is updated when the trust anchor changes.
At this time it is only possible to add trusted keys before the
first resolve is done.
.TP
.B ub_ctx_add_ta_file
Add trust anchors to the given context.
Pass name of a file with DS and DNSKEY records in zone file format.
@@ -208,13 +269,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 +322,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 +337,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,8 +351,24 @@ 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
\fIstruct ub_result\fR. The result structure contains the following entries.
.P
@@ -309,11 +387,13 @@ 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 */
int ttl; /* number of seconds the result is valid */
};
.fi
.P
If both secure and bogus are false, security was not enabled for the
domain of the query.
domain of the query. Else, they are not both true, one of them is true.
.SH "RETURN VALUES"
Many routines return an error code. The value 0 (zero) denotes no error
happened. Other values can be passed to
@@ -326,7 +406,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.
+177
View File
@@ -0,0 +1,177 @@
.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"
.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.
The program fetches the trust anchor with the method from RFC7958 when
regular RFC5011 update fails to bring it up to date.
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 (RFC7958),
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
It 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 address 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 \-n \fIname
The emailAddress for the Subject of the signer's certificate from the p7s
signature file. Only signatures from this name are allowed. default is
dnssec@iana.org. If you pass "" then the emailAddress is not checked.
.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.
.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).
+15 -6
View File
@@ -8,15 +8,17 @@
.\"
.\"
.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 [ \-f ]
.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,18 @@ The available options are:
.B \-h
Show the version and commandline option help.
.TP
.B \-f
Print full pathname, with chroot applied to it. Use with the \-o option.
.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
+236 -15
View File
@@ -8,19 +8,19 @@
.\"
.\"
.SH "NAME"
.LP
unbound-control
.B unbound\-control,
.B unbound\-control\-setup
\- Unbound remote server control utility.
.SH "SYNOPSIS"
.B unbound-control
.RB [ \-h ]
.B unbound\-control
.RB [ \-hq ]
.RB [ \-c
.IR cfgfile ]
.RB [ \-s
.IR server ]
.IR command
.SH "DESCRIPTION"
.B Unbound-control
.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.
@@ -37,6 +37,9 @@ config file @ub_conf_file@ is used.
.B \-s \fIserver[@port]
IPv4 or IPv6 address of the server to contact. If not given, the
address is read from the config file.
.TP
.B \-q
quiet, if the option is given it does not print anything if it works ok.
.SH "COMMANDS"
There are several commands that the server understands.
.TP
@@ -56,11 +59,20 @@ 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.
@@ -87,6 +99,22 @@ but if the name has become an empty nonterminal (there is still data in
domain names below the removed name), NOERROR nodata answers are the
result for that name.
.TP
.B local_zones
Add local zones read from stdin of unbound\-control. Input is read per line,
with name space type on a line. For bulk additions.
.TP
.B local_zones_remove
Remove local zones read from stdin of unbound\-control. Input is one name per
line. For bulk removals.
.TP
.B local_datas
Add local data RRs read from stdin of unbound\-control. Input is one RR per
line. For bulk additions.
.TP
.B local_datas_remove
Remove local data RRs read from stdin of unbound\-control. Input is one name per
line. For bulk removals.
.TP
.B dump_cache
The contents of the cache is printed in a text format to stdout. You can
redirect it to a file to store the cache in a file.
@@ -94,7 +122,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
@@ -115,14 +144,166 @@ 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_negative
Remove all negative data from the cache. This is nxdomain answers,
nodata answers and servfail answers. Also removes bad key entries
(which could be due to failed lookups) from the dnssec key cache, and
iterator last-resort lookup failures from the rrset 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.
This prints the queries from the first thread, and not queries that are
being serviced from other threads.
.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 initialized.
.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, max\-udp\-size, ratelimit,
cache\-max\-ttl, cache\-min\-ttl, cache\-max\-negative\-ttl.
.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_insecure
List the zones with domain\-insecure.
.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 insecure_add \fIzone
Add a \fBdomain\-insecure\fR for the given zone, like the statement in unbound.conf.
Adds to the running unbound without affecting the cache contents (which may
still be bogus, use \fBflush_zone\fR to remove it), does not affect the config file.
.TP
.B insecure_remove \fIzone
Removes domain\-insecure for the given zone.
.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.
.TP
.B ratelimit_list \fR[\fI+a\fR]
List the domains that are ratelimited. Printed one per line with current
estimated qps and qps limit from config. With +a it prints all domains, not
just the ratelimited domains, with their estimated qps. The ratelimited
domains return an error for uncached (new) queries, but cached queries work
as normal.
.TP
.B view_list_local_zones \fIview\fR
\fIlist_local_zones\fR for given view.
.TP
.B view_local_zone \fIview\fR \fIname\fR \fItype
\fIlocal_zone\fR for given view.
.TP
.B view_local_zone_remove \fIview\fR \fIname
\fIlocal_zone_remove\fR for given view.
.TP
.B view_local_data \fIview\fR \fIRR data...
\fIlocal_data\fR for given view.
.TP
.B view_local_data_remove \fIview\fR \fIname
\fIlocal_data_remove\fR for given view.
.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
so that the daemon is permitted to read the files, for example with:
or as root, so that the daemon is permitted to read the files, for example with:
.nf
sudo \-u unbound unbound\-control\-setup
.fi
@@ -130,7 +311,7 @@ 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.
@@ -144,6 +325,16 @@ 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.zero_ttl
number of replies with ttl zero, because they served an expired cache entry.
.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
@@ -176,6 +367,11 @@ less than this time. Because of big outliers (usually queries to non
responsive servers), the average can be bigger than the median. This median
has been calculated by interpolation from a histogram.
.TP
.I threadX.tcpusage
The currently held tcp buffers for incoming connections. A spot value on
the time of the request. This helps you spot if the incoming\-num\-tcp
buffers are full.
.TP
.I total.num.queries
summed over threads.
.TP
@@ -185,6 +381,12 @@ summed over threads.
.I total.num.cachemiss
summed over threads.
.TP
.I total.num.prefetch
summed over threads.
.TP
.I total.num.zero_ttl
summed over threads.
.TP
.I total.num.recursivereplies
summed over threads.
.TP
@@ -206,6 +408,9 @@ summed over threads.
.I total.recursion.time.median
averaged over threads.
.TP
.I total.tcpusage
summed over threads.
.TP
.I time.now
current time in seconds since 1970.
.TP
@@ -216,9 +421,6 @@ uptime since server boot in seconds.
time since last statistics printout, in seconds.
.SH EXTENDED STATISTICS
.TP
.I mem.total.sbrk
If sbrk(2) is available, an estimate of the heap size of the program in number of bytes. Close to the total memory used by the program, as reported by top and ps. Could be wrong if the OS allocates memory non\-contiguously.
.TP
.I mem.cache.rrset
Memory in bytes in use by the RRset cache.
.TP
@@ -244,13 +446,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.
@@ -259,6 +461,10 @@ 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.tcpout
Number of queries that the unbound server made using TCP outgoing towards
other servers.
.TP
.I num.query.ipv6
Number of queries that were made using IPv6 towards the unbound server.
.TP
@@ -309,6 +515,21 @@ Replies that were unwanted or unsolicited. Could have been random traffic,
delayed duplicates, very late answers, or could be spoofing attempts.
Some low level of late answers and delayed duplicates are to be expected
with the UDP protocol. Very high values could indicate a threat (spoofing).
.TP
.I msg.cache.count
The number of items (DNS replies) in the message cache.
.TP
.I rrset.cache.count
The number of RRsets in the rrset cache. This includes rrsets used by
the messages in the message cache, but also delegation information.
.TP
.I infra.cache.count
The number of items in the infra cache. These are IP addresses with their
timing and protocol support information.
.TP
.I key.cache.count
The number of items in the key cache. These are DNSSEC keys, one item
per delegation point, and their validation status.
.SH "FILES"
.TP
.I @ub_conf_file@
@@ -316,7 +537,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).
+9 -5
View File
@@ -8,13 +8,11 @@
.\"
.\"
.SH "NAME"
.LP
.B unbound\-host
\- unbound DNS lookup utility
.SH "SYNOPSIS"
.LP
.B unbound\-host
.RB [ \-vdhr46 ]
.RB [ \-vdhr46D ]
.RB [ \-c
.IR class ]
.RB [ \-t
@@ -29,12 +27,15 @@
.RB [ \-C
.IR configfile ]
.SH "DESCRIPTION"
.LP
.B Unbound\-host
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
@@ -70,6 +71,10 @@ of trust that is built up from the trust anchor to the response, in order
to validate the response message. Can be given as a DS or DNSKEY record.
For example \-y "example.com DS 31560 5 1 1CFED84787E6E19CCF9372C1187325972FE546CD".
.TP
.B \-D
Enables DNSSEC validation. Reads the root anchor from the default configured
root anchor at the default location, \fI@UNBOUND_ROOTKEY_FILE@\fR.
.TP
.B \-f \fIkeyfile
Reads keys from a file. Every line has a DS or DNSKEY record, in the format
as for \-y. The zone file format, the same as dig and drill produce.
@@ -94,7 +99,6 @@ Use solely the IPv4 network for sending packets.
.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
is encountered.
.P

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