Compare commits

...
Author SHA1 Message Date
Willem Toorop 4014e2aec4 Expose symbols 2022-11-05 19:34:51 +01:00
Willem Toorop f3c9be889f Plumming for ub_send and ub_send_async 2022-11-05 18:50:57 +01:00
Willem Toorop cd3ebb7e72 Funcion prototypes for ub_send and ub_send_async 2022-11-05 12:51:20 +01:00
George Thessalonikefs f531faf163 Changelog entry for #767
- Merge #767 from jonathangray: consistently use IPv4/IPv6 in
    unbound.conf.5.
2022-10-21 15:49:56 +02:00
Yorgos ThessalonikefsandGitHub c0c9acccfd Merge pull request #767 from jonathangray/man
consistently use IPv4/IPv6 in unbound.conf.5
2022-10-21 15:46:45 +02:00
W.C.A. Wijngaards 17e5dd6131 - Fix that cachedb does not store failures in the external cache. 2022-10-21 10:11:47 +02:00
George Thessalonikefs e9107907e5 - Clarify the use of MAX_SENT_COUNT in the iterator code. 2022-10-18 12:29:07 +02:00
W.C.A. Wijngaards ba8642aeb7 - testcode/dohclient sets log identity to its name. 2022-10-17 16:00:43 +02:00
W.C.A. Wijngaards 5ffa4d7232 - In unit test, print python script name list correctly. 2022-10-14 16:49:57 +02:00
W.C.A. Wijngaards 2571d00535 Changelog note for #768
- Merge #768 from fobser: Arithmetic on a pointer to void is a GNU
  extension.
2022-10-14 16:22:17 +02:00
Wouter WijngaardsandGitHub f9a563d495 Merge pull request #768 from fobser/void_math
Arithmetic on a pointer to void is a GNU extension.
2022-10-14 16:21:14 +02:00
Florian Obser 08dcae0dab Arithmetic on a pointer to void is a GNU extension. 2022-10-14 13:56:32 +02:00
W.C.A. Wijngaards 5ac1bc13cb - Tag for 1.17.0 release. The code repository continues with 1.17.1. 2022-10-13 09:34:44 +02:00
W.C.A. Wijngaards f5e1ef650d Merge branch 'branch-1.17.0' 2022-10-13 09:32:22 +02:00
George Thessalonikefs d25e0cd9b0 - Fix PROXYv2 header read for TCP connections when no proxied addresses
are provided.
2022-10-11 17:39:30 +02:00
Jonathan Gray 4f27799456 consistently use IPv4/IPv6 2022-10-10 19:14:58 +11:00
W.C.A. Wijngaards 97d1cff315 Changelog note for tag for 1.17.0rc1 release. 2022-10-07 13:29:33 +02:00
George Thessalonikefs a4631a3ecf - Fix unit test to properly test the reuse_write_wait_pop function. 2022-10-07 11:29:46 +02:00
George Thessalonikefs 2569b12b9c - Fix to stop possible loops in the tcp reuse code (write_wait list
and tcp_wait list). Based on analysis and patch from Prad Seniappan
  and Karthik Umashankar.
2022-10-07 11:25:36 +02:00
W.C.A. Wijngaards bf1cce6f9b - Fix proxy length debug output printout typecasts. 2022-10-06 15:53:21 +02:00
W.C.A. Wijngaards b043bc5eb4 - Fix to stop responses with TC flag from resulting in partial
responses. It retries to fetch the data elsewhere, or fails the
  query and in depth fix removes the TC flag from the cached item.
2022-10-06 10:01:09 +02:00
George Thessalonikefs d122617dd4 - Fix checkconf test for dnscrypt and proxy port. 2022-10-05 22:03:01 +02:00
W.C.A. Wijngaards 6b8181acb7 - Fix dnscrypt compile for proxy protocol code changes. 2022-10-05 14:09:12 +02:00
George Thessalonikefs f609a45354 - Make ede.tdir test more predictable by using static data. 2022-10-05 02:44:50 +02:00
George Thessalonikefs 60db1111c0 - Use DEBUG_TDIR from environment in mini_tdir.sh for debugging.
- Fix string comparison in mini_tdir.sh.
2022-10-05 01:13:29 +02:00
George Thessalonikefs 40b2b3a6f3 Changelog entry for #764
- Merge #764: Leniency for target discovery when under load (for
  NRDelegation changes).
2022-10-04 22:24:18 +02:00
Yorgos ThessalonikefsandGitHub f1d263a318 Leniency for target discovery when under load (for NRDelegation changes) (#764)
* - Introduce leniency for target discovery when under load.

* - Allow for easier testing (to be reverted).

* - Happy compiler.

* - Precheck access to target_fetch_policy.

* - Do not mark a nameserver as resolved when one of A/AAAA is negative.

* - Update fetch_glue.rpl test for (possible) outstanding queries.

* - Update fetch_glue_cname.rpl test for possible outstanding queries.

* - Better fix for fetch_glue_cname.rpl.

* - Fix iter_emptydp_for_glue.rpl to match the referral.

* - Disabled the nxns tests for now (to be reverted).

* - Update iter_recurse.rpl for possible outstanding queries.

* Revert "- Disabled the nxns tests for now (to be reverted)."

This reverts commit 34a9c13a90.

* Revert "- Allow for easier testing (to be reverted)."

This reverts commit b6dfe35e1d.
2022-10-04 22:21:08 +02:00
W.C.A. Wijngaards f0614a57f8 - Fix to clean up after the acl_interface unit test. 2022-10-04 16:59:10 +02:00
W.C.A. Wijngaards bf7a2884fb - Fix static analysis report to remove dead code from the
rpz_callback_from_iterator_module function.
2022-10-04 09:08:11 +02:00
W.C.A. Wijngaards c0eaadfc42 - Fix to close errno block in comm_point_tcp_handle_read outside of
ifdef.
2022-10-03 16:21:39 +02:00
George Thessalonikefs 22e43aa631 Changelog entry for #760
- Merge #760: PROXYv2 downstream support. (New proxy-protocol-port
  configuration option).
2022-10-03 15:34:22 +02:00
Yorgos ThessalonikefsandGitHub c4e51a4cfe PROXYv2 downstream support (#760) 2022-10-03 15:29:47 +02:00
W.C.A. Wijngaards 7d96a7e3fe - Fix windows compile, the identifier interface is defined in headers. 2022-10-03 15:03:50 +02:00
W.C.A. Wijngaards 9842fbf760 - Fix test tdir skip report printout. 2022-10-03 10:26:30 +02:00
W.C.A. Wijngaards a102fb1df8 - Fix to remove erroneous TC flag from TCP upstream. 2022-10-03 09:53:41 +02:00
George Thessalonikefs 5b98816751 - Better output for skipped tdir tests. 2022-09-26 15:51:28 +02:00
W.C.A. Wijngaards e93c75a5d4 - Fix doxygen warning in respip.h. 2022-09-21 15:23:04 +02:00
W.C.A. Wijngaards 8e18f11965 - This patch was released in 1.16.3, the code repository continues
with the previous features and fixes for 1.17.0.
2022-09-21 12:16:13 +02:00
W.C.A. Wijngaards e3871ca907 Merge branch 'branch-1.16.3' 2022-09-21 12:11:26 +02:00
W.C.A. Wijngaards 137719522a - Patch for CVE-2022-3204 Non-Responsive Delegation Attack. 2022-09-21 11:10:38 +02:00
W.C.A. Wijngaards bd3c5702a7 branch for 1.16.3 release. 2022-09-21 11:09:03 +02:00
Philip-NLnetLabsandGitHub f68e252345 Merge pull request #757 from NLnetLabs/philip-issue-749
Philip issue 749
2022-09-20 15:07:14 +02:00
Philip Homburg 1e5158045f Merge branch 'ryndia-issue-749' into philip-issue-749 2022-09-20 14:48:57 +02:00
George Thessalonikefs 99e12ae4b5 - Remove unused testcode/mini_tpkg.sh file. 2022-09-20 14:47:24 +02:00
Philip Homburg 5f3b460586 Align with version 1.58 on cvsweb.openbsd.org 2022-09-20 14:47:19 +02:00
George Thessalonikefs 9b1647ebae - Convert tdir tests to use the new skip_test functionality. 2022-09-20 14:45:20 +02:00
George Thessalonikefs 307805b64f Changelog entry for #753:
- Merge #753: ACL per interface. (New interface-* configuration
  options).
2022-09-20 11:36:01 +02:00
Yorgos ThessalonikefsandGitHub f02d6bddd1 Merge pull request #753 from NLnetLabs/acl_interface
ACL per interface
2022-09-16 16:45:59 +02:00
eb02170338 Apply suggestions from code review
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2022-09-16 14:43:23 +02:00
George Thessalonikefs d301bfe4a2 - ACL per interface: refactor, complete testing and a bugfix for
interface names.
2022-09-11 20:57:41 +02:00
George Thessalonikefs fc123303ac - Add functionality to skip tdir tests from the .pre file;
- Initial tests for interface-* options.
2022-09-11 20:21:32 +02:00
George Thessalonikefs aec33b3d63 Documentation for interface-* options. 2022-09-11 20:21:32 +02:00
George Thessalonikefs 7e9fd2114b Cleared error messages for interface-* options. 2022-09-11 20:21:32 +02:00
George Thessalonikefs c30bdff939 Initial commit for interface based ACL. 2022-09-11 20:21:32 +02:00
ryndiaandGitHub cfc656294e Update arc4random.c 2022-09-07 20:16:20 +04:00
W.C.A. Wijngaards 007db2c327 - Fix to check pthread_t size after pthread has been detected. 2022-09-02 10:21:00 +02:00
W.C.A. Wijngaards 5bbaf78c3f - Remove include that was there for debug purposes. 2022-09-02 10:11:23 +02:00
W.C.A. Wijngaards 57230d7f22 - Fix to log a verbose message at operational notice level if a
thread is not responding, to stats requests. It is logged with
  thread identifiers.
2022-09-01 15:14:20 +02:00
W.C.A. Wijngaards d66e1cccf8 - Fix to set out of file descriptor warning to operational verbosity. 2022-09-01 14:01:56 +02:00
W.C.A. Wijngaards 2450b4653a - Slow down log frequency of write wait failures. 2022-09-01 14:00:29 +02:00
W.C.A. Wijngaards eb3378396f - Fix to update config tests to fix checking if nonblocking sockets
work on OpenBSD.
2022-09-01 09:16:05 +02:00
W.C.A. Wijngaards 1f5cc25974 - Fix for wait for udp send to stop when packet is successfully sent. 2022-08-31 16:45:15 +02:00
W.C.A. Wijngaards ec5812a748 - Fix to wait for blocked write on UDP sockets, with a timeout if it
takes too long the packet is dropped.
2022-08-31 11:54:11 +02:00
W.C.A. Wijngaards 10a5a5880a - Patch from Vadim Fedorenko that adds MSG_DONTWAIT to receive
operations, so that instruction reordering does not cause mistakenly
  blocking socket operations.
2022-08-31 10:11:25 +02:00
W.C.A. Wijngaards 2fa1c17cd9 - Fix to avoid process wide fcntl calls mixed with nonblocking
operations after a blocked write.
2022-08-31 10:09:39 +02:00
W.C.A. Wijngaards e6f878ee71 - Fix #741: systemd socket activation fails on IPv6. 2022-08-22 09:12:08 +02:00
W.C.A. Wijngaards dc6c04b243 - Fix to log accept error ENFILE and EMFILE errno, but slowly, once
per 10 seconds. Also log accept failures when no slow down is used.
2022-08-12 09:54:29 +02:00
W.C.A. Wijngaards ef57f8bd51 - Fix #734 [FR] enable unbound-checkconf to detect more (basic)
errors.
2022-08-05 14:41:05 +02:00
W.C.A. Wijngaards fbe8e3b0b2 - Fix ratelimit inconsistency, for ip-ratelimits the value is the
amount allowed, like for ratelimits.
2022-08-04 11:33:37 +02:00
W.C.A. Wijngaards 1c164ab442 Changelog note for #730
- Merge #730 from luisdallos: Fix startup failure on Windows 8.1 due
  to unsupported IPV6_USER_MTU socket option being set.
2022-08-02 16:12:31 +02:00
Wouter WijngaardsandGitHub e738ec31ca Merge pull request #730 from luisdallos/win81-unsup-sockopt-fix
Fix startup failure on Windows 8.1 due to unsupported IPV6_USER_MTU socket option being set
2022-08-02 16:12:16 +02:00
W.C.A. Wijngaards 07b073ddb3 - Fix unittest for edns subnet change. 2022-08-02 14:43:57 +02:00
W.C.A. Wijngaards 0f08cc6d55 - Fix edns subnet so that scope 0 answers only match sourcemask 0
queries for answers from cache if from a query with sourcemask 0.
2022-08-02 14:13:55 +02:00
Luis Dallos 7d3c6f1c43 Fix startup failure on Windows 8.1 due to unsupported IPV6_USER_MTU socket option being set
Newer mingw-w64 (starting from 8.0.1) introduces support for `IPV6_USER_MTU` socket
option [1], which is not supported on Windows 8.1 and older [2]. As there is no way
to avoid this socket option from being picked at compile time when targeting older
versions of Windows, check for `setsockopt(..., IPV6_USER_MTU, ...)` failures at
runtime in order to avoid startup failure on those versions of Windows where the
`IPV6_USER_MTU` socket option is unsupported.

[1]: mirror/mingw-w64@e30bff4
[2]: `WSAGetLastError()` returns `WSAENOPROTOOPT` (`Bad protocol option`) error code
2022-08-01 23:03:24 -04:00
W.C.A. Wijngaards cd22fdc28d - Fix #728: alloc_reg_obtain() core dump. Stop double
alloc_reg_release when serviced_create fails.
2022-08-01 16:45:41 +02:00
W.C.A. Wijngaards 5ae48f85c0 - The code repo continues with 1.16.3. 2022-08-01 15:17:10 +02:00
W.C.A. Wijngaards cbed768b8f - Tests for ghost domain fixes. 2022-08-01 13:26:22 +02:00
W.C.A. Wijngaards f6753a0f10 - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. 2022-08-01 13:24:40 +02:00
George Thessalonikefs efdd70c7b5 - Cleanup some comments and TODO text. 2022-07-23 19:55:15 +02:00
W.C.A. Wijngaards f993ffbb07 Changelog note for #718
- Merge #718: Introduce infra-cache-max-rtt option to config max
  retransmit timeout.
2022-07-19 15:19:12 +02:00
Wouter WijngaardsandGitHub ef9bb0213b Merge pull request #718 from hunts/make_rtt_max_timeout_configurable
Introduce infra-cache-max-rtt option to config max retransmit timeout
2022-07-19 15:15:34 +02:00
George Thessalonikefs 309e23515e - Update documentation for 'outbound-msg-retry:'. 2022-07-19 12:47:01 +02:00
Minghang Chen 249efd4285 Introduce infra-cache-max-rtt option to config max retransmit timeout
Added the option and let it default to 120 seconds so that it won't change
current behavior.

Related-to #717
2022-07-16 01:46:18 -07:00
W.C.A. Wijngaards 12cd495d55 - iana portlist update. 2022-07-15 09:20:25 +02:00
W.C.A. Wijngaards 33bd49af81 - Merge PR 714: Avoid treat normal hosts as unresponsive servers.
And fixup the lock code.
2022-07-15 08:51:31 +02:00
Wouter WijngaardsandGitHub 6e50c46102 Merge pull request #714 from hunts/rtt-of-expired-host
Avoid treat normal hosts as unresponsive servers
2022-07-15 08:49:51 +02:00
Hunts Chen 88bf803297 Avoid treat normal hosts as unresponsive servers
This is a fix for issue #713

When infra-keep-probing is on, all hosts with expired entries were treated as
unresponsive servers and thus causing problems (see #713).

This commit change that, so that normal hosts with expired entries are treated
as unknown servers.
2022-07-14 10:16:13 -07:00
George Thessalonikefs 9e4a17baaf - For windows crosscompile, fix setting the IPV6_MTU socket option
equivalent (IPV6_USER_MTU); allows cross compiling with latest
  cross-compiler versions.
2022-07-12 17:17:59 +02:00
W.C.A. Wijngaards 2abd6f7d58 - Fix dname count in sldns parse type descriptor for SVCB and HTTPS. 2022-07-12 13:29:51 +02:00
W.C.A. Wijngaards 7696398231 - Fix verbose EDE error printout. 2022-07-11 13:13:51 +02:00
Wouter WijngaardsandGitHub 886ffcc155 Merge pull request #711 from NLnetLabs/add-security.md
add SECURITY.md, based on krill
2022-07-11 11:37:28 +02:00
W.C.A. Wijngaards a45ced7739 - This became 1.16.1 on 11 July 2022.
The code repo continues with version 1.16.2 under development.
2022-07-11 11:34:54 +02:00
maertsenandGitHub 125983558b add SECURITY.md, based on krill 2022-07-05 16:39:04 +02:00
W.C.A. Wijngaards 903538c76e - Tag for 1.16.1rc1 release. 2022-07-04 13:48:56 +02:00
George Thessalonikefs d447d60fc6 Merge branch 'crrodriguez-IP_BIND_ADDRESS_NO_PORT' 2022-07-04 12:49:00 +02:00
George Thessalonikefs e5f66b4902 - For #668: relocate and make code more portable. 2022-07-04 12:46:17 +02:00
George Thessalonikefs 0f4c4c1163 Merge branch 'IP_BIND_ADDRESS_NO_PORT' of https://github.com/crrodriguez/unbound into crrodriguez-IP_BIND_ADDRESS_NO_PORT 2022-07-04 11:15:58 +02:00
George Thessalonikefs eda0c0c194 - Fix bug introduced in 'improve val_sigcrypt.c::algo_needs_missing for
one loop pass'.
2022-07-04 09:34:45 +02:00
George Thessalonikefs 309b1d368b - Reintroduce documentation and more EDE support for
val_sigcrypt.c::dnskeyset_verify_rrset_sig.
2022-07-04 00:06:26 +02:00
George Thessalonikefs c513119bba - Improve val_sigcrypt.c::algo_needs_missing for one loop pass. 2022-07-03 23:32:18 +02:00
George Thessalonikefs a30286502c - Fix for correct openssl error when adding windows CA certificates to
the openssl trust store.
2022-07-03 22:41:39 +02:00
George Thessalonikefs 317bab9f1d For #660: formatting, less verbose logging, add EDE information. 2022-07-03 22:32:56 +02:00
George Thessalonikefs 2fba248ebe Changelog entry for #660
- Merge PR #660 from Petr Menšík: Sha1 runtime insecure.
2022-07-03 22:28:17 +02:00
Yorgos ThessalonikefsandGitHub e102aea751 Merge pull request #660 from InfrastructureServices/sha1-runtime-insecure
Sha1 runtime insecure
2022-07-03 22:24:58 +02:00
George Thessalonikefs 24cb764d61 - Add missing changelog entries from PR #706. 2022-07-03 22:21:56 +02:00
George Thessalonikefs cb28bdcdb0 Changelog entry for #671:
- Merge PR #671 from Petr Menšík: Disable ED25519 and ED448 in FIPS
  mode on openssl3.
2022-07-03 22:08:47 +02:00
George Thessalonikefs bcf7a8aed2 Merge branch 'InfrastructureServices-fips-mode-algo-ed25519' 2022-07-03 21:59:20 +02:00
George Thessalonikefs 391dd86c3b Merge branch 'master' into InfrastructureServices-fips-mode-algo-ed25519 2022-07-01 17:34:09 +02:00
Yorgos ThessalonikefsandGitHub b0ce31b4e4 Merge pull request #706 from NLnetLabs/nxns-fallback
NXNS fallback
2022-07-01 16:24:33 +02:00
George Thessalonikefs 2dbaba7d73 - Improved logging for NXNS fallback. 2022-07-01 16:18:33 +02:00
George Thessalonikefs 923eb7d474 - Allow fallback to the parent side when MAX_TARGET_NX is reached.
This will also allow MAX_TARGET_NX more NXDOMAINs.
2022-06-29 17:32:29 +02:00
George Thessalonikefs 58b21e4fca - Fix to not count cached NXDOMAIN for MAX_TARGET_NX. 2022-06-29 17:26:09 +02:00
W.C.A. Wijngaards ef718f02e4 Remove debug output from windows compile workflow. 2022-06-29 12:01:39 +02:00
W.C.A. Wijngaards c8add463c4 - Fix compile warning for windows compile. 2022-06-29 12:00:44 +02:00
W.C.A. Wijngaards 203f606c38 - Fix detection of libz on windows compile with static option. 2022-06-29 11:41:20 +02:00
W.C.A. Wijngaards e7badb9428 Debug output for windows compile workflow. 2022-06-29 11:17:12 +02:00
George Thessalonikefs b816318106 - Fix #704: [FR] Statistics counter for number of outgoing UDP queries
sent; introduces 'num.query.udpout' to the 'unbound-control stats'
  command.
2022-06-29 10:51:54 +02:00
George Thessalonikefs 1ceb031b58 - Add debug option to the mini_tdir.sh test code. 2022-06-29 10:47:18 +02:00
George Thessalonikefs 352e1b28a1 Merge branch 'master' of github.com:NLnetLabs/unbound 2022-06-29 10:44:43 +02:00
W.C.A. Wijngaards 80dbc7dd2c - iana portlist update. 2022-06-29 09:38:31 +02:00
George Thessalonikefs c8e7539313 - Formatting. 2022-06-28 18:31:27 +02:00
George Thessalonikefs 12796d0af8 - Fix for cached 0 TTL records to not trigger prefetching when
serve-expired-client-timeout is set.
2022-06-28 17:05:28 +02:00
W.C.A. Wijngaards b057d2127a - Fix test program dohclient close to use portability routine. 2022-06-28 09:23:43 +02:00
George Thessalonikefs 9177867d07 - Show the output of the exact .rpl run that failed with 'make test'. 2022-06-28 00:22:30 +02:00
tcarpayandGitHub 9e6b838d0b Update changelog with #705 change 2022-06-23 17:21:17 +02:00
tcarpayandGitHub 12552fddf0 clarify addition of verbosity level mentioned in #705 2022-06-23 15:00:48 +02:00
Philip Homburg 3bade62c8a Fix use after free issue with edns options (https://github.com/NLnetLabs/unbound/issues/663) 2022-06-22 15:00:28 +02:00
Philip Homburg c806b5a2df Merge branch 'zone-parsers-blank-line-issue' 2022-06-21 15:32:35 +02:00
Philip Homburg 7f67f7118c Change log entry for lines with blanks issue 2022-06-21 15:30:04 +02:00
George Thessalonikefs 7c9177095f - Remove unused LDNS function check for GOST Engine unloading. 2022-06-20 16:27:15 +02:00
George Thessalonikefs 233cb5c218 - Note in the unbound.conf text that NOTIFY is allowed from the url:
addresses for auth and rpz zones.
2022-06-14 17:59:56 +02:00
George Thessalonikefs e6a0afae73 Changelog entry for #688
- Merge PR #688: Rpz url notify issue.
2022-06-14 17:56:23 +02:00
Yorgos ThessalonikefsandGitHub 90767fce98 Merge pull request #688 from NLnetLabs/rpz-url-notify-issue
Rpz url notify issue
2022-06-14 17:53:01 +02:00
George Thessalonikefs 187bc72633 - Add testcase for allowing NOTIFY on URL addresses. 2022-06-14 17:44:37 +02:00
Philip Homburg 78b4b12713 Test loading a zone with blank lines over https 2022-06-14 17:05:03 +02:00
Philip Homburg b8e111e379 Avoid network traffic during test, a bit of cleanup 2022-06-14 17:04:23 +02:00
Philip Homburg 0e1c266f86 Fix issue with lines that only consist of blanks with optional comment 2022-06-13 11:41:14 +02:00
Philip Homburg c6ef39a22d Test loading a cached zone that has lines consisting of blanks 2022-06-08 14:45:30 +02:00
George Thessalonikefs 459b73018f - Fix for edns client subnet to respect not looking in its cache when
instructed to do so (e.g., prefetch).
2022-06-03 16:11:35 +02:00
W.C.A. Wijngaards 97b7224885 - makedist.sh picks up 32bit libssp-0.dll when 32bit compile. 2022-06-03 15:18:27 +02:00
W.C.A. Wijngaards a3ab0921b0 Continue with 1.16.1 under development. 2022-06-02 13:56:52 +02:00
Philip Homburg 16dd802c2e Add url 'master' to allow notify list 2022-05-31 15:10:38 +02:00
Philip Homburg 6dad2d2fc6 allow-notify doesn't work for url on rpz zones (https://github.com/NLnetLabs/unbound/issues/679) 2022-05-31 15:10:38 +02:00
W.C.A. Wijngaards edc1d07718 - Version is set to 1.16.0 for release. Release tag 1.16.0rc1. 2022-05-27 16:09:28 +02:00
W.C.A. Wijngaards 2d61706171 - Fix #684: [FTBS] configure script error with libmnl on openSUSE 15.3 (and possibly other distributions) 2022-05-27 09:10:16 +02:00
W.C.A. Wijngaards 11d077c826 - Fix some lint type warnings. 2022-05-20 15:32:27 +02:00
W.C.A. Wijngaards d19d7b81ec - Fix ede test to not use default pidfile, and use local interface. 2022-05-20 15:14:11 +02:00
W.C.A. Wijngaards 714200ad0e - Fix to silence test for ede error output to the console from the
test setup script.
2022-05-20 09:08:29 +02:00
George Thessalonikefs c76420664a Merge branch 'fips-mode-algo-ed25519' of https://github.com/InfrastructureServices/unbound into InfrastructureServices-fips-mode-algo-ed25519 2022-05-19 12:53:48 +03:00
George Thessalonikefs 7e506bb477 - Fix typos in config_set_option for the 'num-threads' and
'ede-serve-expired' options.
2022-05-18 19:56:26 +03:00
George Thessalonikefs f73e548934 - Fix #678: [FR] modify behaviour of unbound-control rpz_enable zone,
by updating unbound-control's documentation.
2022-05-15 22:53:17 +03:00
W.C.A. Wijngaards e62b309959 - For #677: Added tls-system-cert to config parser and documentation.
- Changelog note for #677.
2022-05-12 16:30:19 +02:00
Wouter WijngaardsandGitHub 2132e67b36 Merge pull request #677 from InfrastructureServices/use-system-cas
Allow using system certificates not only on Windows
2022-05-12 16:16:49 +02:00
Petr Mensik 0abfddd279 Allow using system certificates not only on Windows
OpenSSL has a way to load default file. That file might contain usable
certificates to verify common connections. Allow similar trust as on
windows and leave it on openssl package to provide sane defaults.

Also provide use-system-cert alias, because it is not windows specific
anymore.
2022-05-12 16:07:41 +02:00
Yorgos ThessalonikefsandGitHub ba4564b4ef Merge pull request #674 from NLnetLabs/prefetch_when_ecs_enabled
Fix #417: prefetch and ECS causing cache corruption when used
2022-05-12 01:17:42 +02:00
George Thessalonikefs daf316ea1b - Fix #417: prefetch and ECS causing cache corruption when used
together.
2022-05-12 00:56:01 +02:00
W.C.A. Wijngaards f0d91950ad - Fix #673: DNS over TLS: error: SSL_handshake syscall: No route to
host.
2022-05-11 17:10:42 +02:00
Petr Mensik 917c30a46a Disable ED25519 and ED448 in FIPS mode on openssl3
Both crypto functions are not allowed by FIPS 140-3. Use openssl 3.0
function to check FIPS mode presence and use it to make those algorithms
unsupported.
2022-05-11 16:19:25 +02:00
George Thessalonikefs 77149fc2aa - Fix Python build in non-source directory; based on patch by
Michael Tokarev.
2022-05-10 15:57:17 +02:00
tcarpayandGitHub 47ce372f13 Changelog entry for #604: Add the basic EDE (RFC8914) cases 2022-05-06 12:53:49 +02:00
tcarpayandGitHub 0ce36e8289 Add the basic EDE (RFC8914) cases (#604) 2022-05-06 12:48:53 +02:00
W.C.A. Wijngaards b61b0af5d6 - Fix #670: SERVFAIL problems with unbound 1.15.0 running on
OpenBSD 7.1.
2022-04-28 14:51:47 +02:00
Cristian Rodríguez 6a4ea692d4 Set IP_BIND_ADDRESS_NO_PORT on outbound tcp sockets
When bound to a local address the kernel does not know if the socket
will listen() or connect() and must reserve a port inmediately after
bind() effectively limiting the random port range to ~32k.
when IP_BIND_ADDRESS_NO_PORT is set, the kernel delays source port
allocation until the time the complete 4-tuple is known allowing
a much larger number of combinations
2022-04-23 23:08:45 +00:00
Petr Mensik 74c6cf5ac6 Log detailed openssl error also for digests failures
Make output still only shown in verbose detail. But provide openssl
error details to make a reason more obvious.
2022-04-12 16:13:49 +02:00
Petr Mensik 33c8baaaba Forward indeterminate status higher
Create a path where it can result in insecure.
2022-04-08 16:26:50 +02:00
Petr Mensik 6cfcf21451 Make SHA-1 signed domains insecure if openssl refuses the digest
RHEL9/CentOS 9 would fail in default crypto policy. If call to openssl
returns invalid digest then report the name insecure. If all tested
signatures return the same issue, then make the reply insecure.
2022-04-08 16:26:50 +02:00
W.C.A. Wijngaards 1289c53c1a - Fix zonemd unsupported algo check to set reason to NULL before the
check routine, but after malformed checks, to get the correct NULL
  output when the digest matches.
2022-04-08 11:19:40 +02:00
W.C.A. Wijngaards d02e83ae2b - Fix zonemd unsupported algo check to print unsupported reason before
zeroing it.
2022-04-08 11:10:11 +02:00
W.C.A. Wijngaards 8f2847ba69 - Fix zonemd unsupported algo check reason to not copy to next record,
and check for success for debug printout.
2022-04-08 10:54:57 +02:00
W.C.A. Wijngaards 730a03e9bd - Fix zonemd unsupported algo check. 2022-04-08 09:36:01 +02:00
W.C.A. Wijngaards e4ca71e85b - Fix zonemd check to allow unsupported algorithms to load.
If there are only unsupported algorithms, or unsupported schemes,
  and no failed or successful other ZONEMD records, or malformed
  or bad ZONEMD records, the unsupported records allow the zone load.
2022-04-08 09:29:37 +02:00
W.C.A. Wijngaards 8f8a8a341a - Fix spelling error in comment in sldns_str2wire_svcparam_key_lookup. 2022-03-25 16:07:23 +01:00
W.C.A. Wijngaards 722391baf1 - Fix #651: [FR] Better logging for refused queries. 2022-03-23 13:56:52 +01:00
George Thessalonikefs ee63ac8f9b - Minor formatting. 2022-03-18 16:04:16 +02:00
George Thessalonikefs 1e23c4a376 Merge PR #648 from eaglegai: fix -q doesn't work when use with
'unbound-control stats_shm'
2022-03-18 16:03:35 +02:00
eaglegai c60bed8eef fix -q doesn't work when use with 'unbound-control stats_shm'
Signed-off-by: eaglegai <eaglegai@163.com>
2022-03-18 19:08:50 +08:00
W.C.A. Wijngaards 9484ddee2e - Fix to describe auth-zone and other configuration at the local-zone
configuration option, to allow for more broadly view of the options.
2022-03-17 14:24:37 +01:00
W.C.A. Wijngaards 402135b41a - Fix to ensure uniform handling of spaces and tabs when parsing RRs. 2022-03-16 09:54:53 +01:00
W.C.A. Wijngaards b0dbfa37f9 Changelog note for #644, move commands together for library binary. 2022-03-09 09:43:07 +01:00
Wouter WijngaardsandGitHub 79f8fc1472 Merge pull request #644 from FGasper/issue_643_pkgconfig_install_lib
Make `install-lib` make target install the pkg-config file.
2022-03-09 09:41:54 +01:00
Felipe Gasper 516f4f9cf4 Make install-lib make target install the pkg-config file.
Issue #643
2022-03-08 14:01:09 -05:00
W.C.A. Wijngaards 62c5039ab9 - Fix configure for python to use sysutils, because distutils is
deprecated. It uses sysutils when available, distutils otherwise.
2022-03-07 14:02:31 +01:00
W.C.A. Wijngaards b202b0874c - Fix for #637: fix integer overflow checks in sldns_str2period. 2022-03-03 16:24:46 +01:00
W.C.A. Wijngaards debe5c665f - Fix #637: Integer Overflow in sldns_str2period function. 2022-03-03 14:19:59 +01:00
W.C.A. Wijngaards f81420d77f - Fix compile warnings for printf ll format on mingw compile. 2022-03-02 14:34:36 +01:00
George Thessalonikefs b8e7dfa01e - Various fixes for #632: variable initialisation, convert the qinfo
to str once, accept trailing dot in the local-zone ipset option.
2022-03-02 14:29:56 +01:00
George Thessalonikefs f7ca447368 Changelog entry for #632
- Merge PR #632 from scottrw93: Match cnames in ipset.
2022-03-02 13:22:17 +01:00
gthessandGitHub a6880644aa Merge pull request #632 from scottrw93/cnames-ipset
Match cnames in ipset
2022-03-02 13:17:35 +01:00
George Thessalonikefs 0b8e6dafe5 - Added tests for ipset. 2022-03-02 13:08:16 +01:00
W.C.A. Wijngaards 99a3f5ee85 - Fix pythonmod for change in iter_dp_is_useless function prototype. 2022-03-01 10:27:24 +01:00
W.C.A. Wijngaards 7749d98a14 - Fix for edns client subnet option add fix in removal code, from review. 2022-02-28 14:51:35 +01:00
W.C.A. Wijngaards 8e8ccfe3c3 - Fix edns client subnet to add the option based on the option list,
so that it is not state dependent, after the state fix of #605 for
  double EDNS options.
2022-02-28 14:39:48 +01:00
George Thessalonikefs ad158ed5cc Changelog entry for #623:
- Merge #623 from rex4539: Fix typos.
2022-02-28 12:37:59 +01:00
gthessandGitHub 6e79237dc8 Merge pull request #623 from rex4539/typos
Fix typos
2022-02-28 12:36:11 +01:00
George Thessalonikefs 82adcfb971 - Fix #630: Unify the RPZ log messages. 2022-02-28 12:07:25 +01:00
W.C.A. Wijngaards 6e64356175 - Fix for #633: updated fix with new text. 2022-02-28 09:56:30 +01:00
W.C.A. Wijngaards e11cf2d964 - Fix #633: Document unix domain socket support for unbound-control. 2022-02-28 09:39:33 +01:00
W.C.A. Wijngaards c084c27b39 - Fix check interface existence for support detection in remote lookup. 2022-02-25 15:24:40 +01:00
W.C.A. Wijngaards 2c3225e6c7 - update Makefile dependencies. 2022-02-25 10:29:33 +01:00
W.C.A. Wijngaards 4b772ed571 - Fix to detect that no IPv6 support means that IPv6 addresses are
useless for delegation point lookups.
2022-02-25 10:27:56 +01:00
scottrw93 4f3df7ee86 Match cnames in ipset 2022-02-20 22:37:49 +00:00
Dimitris Apostolou c7be51a11b Fix typos 2022-02-18 15:51:03 +02:00
W.C.A. Wijngaards c4d8104db3 Changelog note for #631.
- Merge #631 from mollyim: Replace OpenSSL's ERR_PACK with
  ERR_GET_REASON.
2022-02-18 09:37:44 +01:00
Wouter WijngaardsandGitHub fbbb42c9d4 Merge pull request #631 from mollyim/boringssl-compat
Replace OpenSSL's ERR_PACK with ERR_GET_REASON
2022-02-18 09:37:34 +01:00
W.C.A. Wijngaards a746d9693a - Fix that address not available is squelched from the logs for
udp connect failures. It is visible on verbosity 4 and more.
2022-02-18 09:03:56 +01:00
Oscar Mira 78aee89201 Replace OpenSSL's ERR_PACK with ERR_GET_REASON 2022-02-17 20:20:18 +01:00
W.C.A. Wijngaards 6de5310728 - Fix for #628: fix rpz-passthru for qname trigger by localzone type. 2022-02-16 09:51:25 +01:00
W.C.A. Wijngaards 2b90181d3a - Fix #628: A rpz-passthru action is not ending RPZ zone processing. 2022-02-15 16:20:12 +01:00
W.C.A. Wijngaards 91a5cc9a08 - Remove debug info from #618 fix. 2022-02-11 16:34:24 +01:00
W.C.A. Wijngaards a0feea393a - Fix #618: enabling interface-automatic disables DNS-over-TLS.
Adds the option to list interface-automatic-ports.
2022-02-11 10:58:53 +01:00
W.C.A. Wijngaards 4c6b59fa47 - Fix #624: Unable to stop Unbound in Windows console (does not
respond to CTRL+C command).
2022-02-11 08:53:24 +01:00
W.C.A. Wijngaards ed4ce7b398 Release 1.15.0 on 10 feb 2022.
The repository continues with version 1.15.1.
And Changelog note.
2022-02-10 09:54:51 +01:00
W.C.A. Wijngaards 58ac43c754 Note 1.15.0rc1 tag creation in Changelog.
- Tag for 1.15.0rc1 created.
2022-02-07 11:31:41 +01:00
W.C.A. Wijngaards 5f724da8c5 - Fix that TCP interface does not use TLS when TLS is also configured. 2022-02-07 09:31:10 +01:00
W.C.A. Wijngaards c44fe07a07 - Fix #412: cache invalidation issue with CNAME+A. 2022-02-04 14:27:01 +01:00
W.C.A. Wijngaards c29b0e0a96 - Fix for #611: Integer overflow in sldns_wire2str_pkt_scan. 2022-02-03 09:03:09 +01:00
W.C.A. Wijngaards 50a312b8da - Update contrib/aaaa-filter-iterator.patch with diff for current
software version.
2022-02-02 15:35:19 +01:00
W.C.A. Wijngaards 893fb4d54b - Fix docker splint test to use more portable uname. 2022-02-02 14:47:57 +01:00
W.C.A. Wijngaards 6bad577781 Merge branch 'master' of github.com:NLnetLabs/unbound 2022-02-02 14:11:55 +01:00
W.C.A. Wijngaards 2642319ea6 - please clang analyzer for loop in test code. 2022-02-02 14:11:36 +01:00
George Thessalonikefs d123e1c919 Merge branch 'master' of github.com:NLnetLabs/unbound 2022-02-02 14:05:35 +01:00
George Thessalonikefs c53171d942 - Changelog entry clarification. 2022-02-02 14:05:31 +01:00
W.C.A. Wijngaards e656be63f9 - Fix header comment for doxygen for authextstrtoaddr. 2022-02-02 13:20:46 +01:00
W.C.A. Wijngaards ee3c478239 - Update version number in repo to 1.15.0 for upcoming release,
since it changes the aggressive-nsec default and the ratelimit change.
2022-02-02 13:09:51 +01:00
George Thessalonikefs b1feb9fb1e - Update stream_ssl.tdir test to also use the new forward-host notation. 2022-02-02 12:55:29 +01:00
George Thessalonikefs 819008cf7e - Merge PR #617: Update stub/forward-host notation to accept port and
tls-auth-name.
2022-02-02 11:57:36 +01:00
gthessandGitHub 11f2e7e6ae Merge pull request #617 from NLnetLabs/update-host-notation
Update stub/forward-host notation to accept port and tls-auth-name
2022-02-02 11:56:27 +01:00
414a37ed2b Don't accidentaly introduce a troff macro
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2022-02-02 11:53:38 +01:00
George Thessalonikefs 32c3bbd249 - Change aggressive-nsec default to yes. 2022-02-02 11:25:08 +01:00
George Thessalonikefs c6b413069d Changelog entry for #616
- Merge PR #616: Update ratelimit logic. It also introduces
  ratelimit-backoff and ip-ratelimit-backoff configuration options.
2022-02-02 11:18:14 +01:00
gthessandGitHub 358e3a5963 Merge pull request #616 from NLnetLabs/bugfix/ratelimit
Update ratelimit logic
2022-02-02 11:16:04 +01:00
George Thessalonikefs 25eae982de Merge branch 'Shchelk-bufferoverflow' 2022-02-02 10:50:54 +01:00
George Thessalonikefs 506d24c7a6 Changelog entry for #532
- Merge PR #532 from Shchelk: Fix: buffer overflow bug.
2022-02-02 10:48:56 +01:00
George Thessalonikefs d81e1c999b Merge branch 'bufferoverflow' of https://github.com/Shchelk/unbound into Shchelk-bufferoverflow 2022-02-02 10:42:06 +01:00
George Thessalonikefs a5e9221933 Changelog note for #603:
- Merge PR #603 from fobser: Use OpenSSL 1.1 API to access DSA and RSA
  internals.
2022-02-01 18:00:46 +01:00
gthessandGitHub 1199482372 Merge pull request #603 from fobser/dsa_rsa_internals
Use OpenSSL 1.1 API to access DSA and RSA internals
2022-02-01 17:58:11 +01:00
gthessandGitHub b93aa79a05 Prefer the libressl API from when it was available 2022-02-01 17:54:42 +01:00
7ddd456f02 Fix typo from review
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2022-02-01 17:38:16 +01:00
George Thessalonikefs 814a234876 - Update stub/forward-host notation to accept port and tls-auth-name.
Fixes #546.
2022-02-01 14:44:29 +01:00
George Thessalonikefs 10d9804149 Merge branch 'master' of github.com:NLnetLabs/unbound 2022-01-31 11:28:30 +01:00
George Thessalonikefs a60bbd12ed -Fix review comment for use-after-free when failing to send UDP out. 2022-01-31 11:27:35 +01:00
W.C.A. Wijngaards 84df46289d - iana portlist update. 2022-01-31 10:53:22 +01:00
George Thessalonikefs 52283194eb - Update unbound.conf manpage and example.conf file for ratelimit
options.
2022-01-30 01:04:15 +01:00
George Thessalonikefs c8a6234aac - Add tests for ratelimit. 2022-01-30 00:51:39 +01:00
George Thessalonikefs 3086335724 - Introduce ratelimit-backoff and ip-ratelimit-backoff options for more
aggressive rate limiting.
2022-01-30 00:36:29 +01:00
George Thessalonikefs f857af873e - Update ratelimit code for recent serviced_query changes and more
accurate ratelimit calculation.
2022-01-29 23:49:38 +01:00
George Thessalonikefs 888eb224a6 - Better cleanup on failed DoT/DoH listening socket creation. 2022-01-29 15:14:56 +01:00
George Thessalonikefs c49e87e1b7 - Fix tls-* and ssl-* documented alternate syntax to also be available
through remote-control and unbound-checkconf.
2022-01-29 15:11:47 +01:00
W.C.A. Wijngaards d10562c823 Merge branch 'master' of github.com:NLnetLabs/unbound 2022-01-26 16:41:04 +01:00
W.C.A. Wijngaards 54ea2948da - Test for NSID in SERVFAIL response due to DNSSEC bogus. 2022-01-26 16:40:04 +01:00
George Thessalonikefs ea47c08e70 - Fix #599: [FR] RFC 9156 (obsoletes RFC 7816), by noting the new RFC
document.
2022-01-26 14:35:22 +01:00
George Thessalonikefs 79e755e1dd Changelog note for #612:
- Merge PR #612: TCP race condition.
2022-01-25 17:29:52 +01:00
gthessandGitHub ddc3c754b0 Merge pull request #612 from NLnetLabs/tcp-race-condition
TCP race condition
2022-01-25 17:26:30 +01:00
George Thessalonikefs 5c85615515 - Fix #588: Unbound 1.13.2 crashes due to p->pc is NULL in
serviced_udp_callback.
2022-01-25 17:15:37 +01:00
George Thessalonikefs f0c6d26155 - Better bookkeeping when reclaiming the TCP buffer. 2022-01-25 10:32:37 +01:00
George Thessalonikefs 4573629fc4 - Mark waiting_tcp and serviced_query as being in the
cb_and_decommission stage to signal later code about their state;
  prevents premature item deletion.
2022-01-25 09:46:16 +01:00
W.C.A. Wijngaards 70f13e54bf Changelog note for #610
- Fix #610: Undefine-shift in sldns_str2wire_hip_buf.
2022-01-25 09:02:55 +01:00
W.C.A. Wijngaards 12a1053dfa - Fix #610: Undefine-shift in sldns_str2wire_hip_buf. 2022-01-25 08:57:49 +01:00
George Thessalonikefs c3c0186658 - Add serviced_query timer to send upstream queries outside of the mesh
flow to prevent race conditions.
2022-01-25 00:01:43 +01:00
George Thessalonikefs 8e76eb95a0 - For dnstap, do not wakeupnow right there. Instead zero the timer to
force the wakeup callback asap.
2022-01-19 15:32:02 +01:00
W.C.A. Wijngaards c7ae3ef156 - For #602: Allow the module-config "subnetcache validator cachedb
iterator".
2022-01-14 16:30:25 +01:00
W.C.A. Wijngaards 2996040c6c - Add rpz: for-downstream: yesno option, where the RPZ zone is
authoritatively answered for, so the RPZ zone contents can be
  checked with DNS queries directed at the RPZ zone.
2022-01-14 16:23:43 +01:00
George Thessalonikefs 3c8a79eed8 Changelog note for #605:
- Merge PR #605: Fix EDNS to upstream where the same option could be
  attached more than once.
2022-01-14 15:38:15 +01:00
gthessandGitHub f00d96a21b Merge pull request #605 from NLnetLabs/sq-region
Fix EDNS to upstream where the same option could be attached more than once
2022-01-14 15:33:22 +01:00
George Thessalonikefs 773d1f2911 - Make sure callback changes for EDNS are not lost. 2022-01-14 15:18:43 +01:00
George Thessalonikefs de1e91fc7f - Fix EDNS to upstream where the same option could be attached more than
once.
- Add a region to serviced_query for allocations.
2022-01-14 13:55:34 +01:00
Florian Obser ff35659d5a Use OpenSSL 1.1 API to access DSA and RSA internals
In LibreSSL 3.5, DSA and RSA internals will become opaque, so they can
no longer be accessed directly and the libunbound build will break. The
required API, DSA_set0_pqg(), DSA_set0_key() as well as RSA_set0_key(),
has been available since LibreSSL 2.7, so this change should not affect
any users.

From Theo Buehler.
2022-01-11 15:34:25 +01:00
George Thessalonikefs a97604737b - Fix prematurely terminated TCP queries when a reply has the same ID. 2022-01-11 10:00:45 +01:00
W.C.A. Wijngaards d52d94c6db Changelog note for #600
- Merge #600 from pemensik: Change file mode before changing file
  owner.
2022-01-07 13:23:18 +01:00
Wouter WijngaardsandGitHub 370a855f08 Merge pull request #600 from InfrastructureServices/remote-unix-chmod
Change file mode before changing file owner
2022-01-07 13:23:03 +01:00
Petr Mensik c7f44b99e3 Change file mode before changing file owner
Change mode first when configuring remote control unix socket. Some
security systems might strip capability of changing other user's system
even to process with effective uid 0. That is done on Fedora by SELinux
policy and systemd for example. SELinux audit then shows errors, because
unbound tries modifying permissions of not own file. Fix just by mode
change as first step, make it owned by unbound:unbound user as the last
step only.

Related: rhbz#1905441
2022-01-07 12:08:32 +01:00
Alex BandandGitHub 9bbbca5de9 Update documentation links 2022-01-07 10:21:50 +01:00
W.C.A. Wijngaards 33ef79d433 - Fix for #596: Fix rpz-signal-nxdomain-ra to work for clientip
triggered operation.
2022-01-05 16:48:35 +01:00
W.C.A. Wijngaards eccfe3e1f5 - Fix #598: Fix unbound-checkconf fatal error: module conf
'respip dns64 validator iterator' is not known to work.
2022-01-05 16:14:47 +01:00
W.C.A. Wijngaards adcbb6ced7 - Fix for #596: add unit test for nsip trigger and signal unset RA. 2022-01-05 14:31:42 +01:00
W.C.A. Wijngaards c678c696a1 - Fix for #596: add unit test for nsdname trigger and signal unset RA. 2022-01-05 14:13:52 +01:00
W.C.A. Wijngaards 313bceb983 - Fix unit tests for rpz now that the AA flag returns successfully from
the iterator loop.
2022-01-05 13:39:06 +01:00
W.C.A. Wijngaards 6b2e96430e - Fix for #596: fix that rpz return message is returned and not just
the rcode from the iterator return path. This fixes signal unset RA
  after a CNAME.
2022-01-05 13:35:18 +01:00
W.C.A. Wijngaards ceef84e022 - Fix that RPZ does not set RD flag on replies, it should be copied
from the query.
2022-01-04 13:49:31 +01:00
W.C.A. Wijngaards 95644c9309 - Fix #596: only unset RA when NXDOMAIN is signalled. 2022-01-04 13:48:29 +01:00
W.C.A. Wijngaards cbdc138df7 - Fix to add test for rpz-signal-nxdomain-ra. 2022-01-04 13:41:27 +01:00
W.C.A. Wijngaards 392c1f0f54 - Fix #596: unset the RA bit when a query is blocked by an unbound
RPZ nxdomain reply. The option rpz-signal-nxdomain-ra allows to
  signal that a domain is externally blocked to clients when it
  is blocked with NXDOMAIN by unsetting RA.
2022-01-04 13:40:07 +01:00
George Thessalonikefs 4e492725e1 - contrib/aaaa-filter-iterator.patch file renewed diff content to
apply cleanly to the current coderepo for the current code version.
2021-12-22 15:02:44 +01:00
George Thessalonikefs 65113ac775 - Fix #591: Unbound-anchor manpage links to non-existent license file. 2021-12-20 11:35:31 +01:00
George Thessalonikefs 983c716feb - Add missing configure flags for optional features in the
documentation.
- Fix Unbound capitalization in the documentation.
2021-12-13 12:46:08 +01:00
W.C.A. Wijngaards 83c712ca60 - Fix to pick up other class local zone information before unlock. 2021-12-13 10:00:53 +01:00
George Thessalonikefs 2c1a5203a5 - Allow local-data for classes other than IN to inherit a configured
local-zone's type if possible, instead of defaulting to type
  transparent as per the implicit rule.
2021-12-10 17:35:36 +01:00
W.C.A. Wijngaards 778b50f113 - Add code similar to fix for ldns for tab between strings, for
consistency, the test case was not broken.
2021-12-10 09:12:58 +01:00
W.C.A. Wijngaards d29ab10a34 Continue with version 1.14.1 2021-12-09 10:22:39 +01:00
W.C.A. Wijngaards c6c54f9de4 - Fix validator debug output about DS support, print correct algorithm. 2021-12-06 13:12:44 +01:00
W.C.A. Wijngaards c7afaef10c Changelog note for #581 2021-12-06 09:04:50 +01:00
Wouter WijngaardsandGitHub 9d1eb66f19 Merge pull request #581 from fobser/warnings
Fix -Wmissing-prototypes and -Wshadow warnings in rpz
2021-12-06 09:04:32 +01:00
Florian Obser ef076c0e15 Fix -Wshadow 2021-12-03 18:30:08 +01:00
Florian Obser 56cf526c68 Fix -Wmissing-prototypes by declaring functions static. 2021-12-03 18:29:04 +01:00
W.C.A. Wijngaards 4efbee08b5 - Fix compile warning for if_nametoindex on windows 64bit. 2021-12-03 10:44:47 +01:00
W.C.A. Wijngaards 919c8c9527 - Fix doc/unbound.doxygen to remove obsolete tag warning. 2021-12-01 17:13:11 +01:00
W.C.A. Wijngaards 5d63ad6474 - configure is set to 1.14.0, and release branch. 2021-12-01 10:08:54 +01:00
George Thessalonikefs 31bac7d5ca - Fix #574: Review fixes for size allocation. 2021-12-01 04:31:58 +01:00
George Thessalonikefs 3dbda3aac3 - Fix #454: listen_dnsport.c:825: error: ‘IPV6_TCLASS’ undeclared. 2021-12-01 04:26:36 +01:00
George Thessalonikefs 7c0cb7198b Changelog note for #530:
- Merge PR #530 from Shchelk: Fix: dereferencing a null pointer.
2021-12-01 04:03:27 +01:00
gthessandGitHub 7adeba3690 Merge pull request #530 from Shchelk/bugfix
Fix: dereferencing a null pointer
2021-12-01 04:02:03 +01:00
George Thessalonikefs 2add585015 Changelog note for #522:
- Merge PR #522 from sibeream: memory management violations fixed.
2021-12-01 04:00:24 +01:00
gthessandGitHub 43615e98b5 Merge pull request #522 from sibeream/net_help_RESOURCE_LEAK
- memory management violations fixed
2021-12-01 03:59:32 +01:00
George Thessalonikefs 05c198ebd6 Changelog note for #562:
- Merge PR #562 from Willem: Reset keepalive per new tcp session.
2021-12-01 03:58:01 +01:00
gthessandGitHub 806a75808d Merge pull request #562 from NLnetLabs/bugfix/reset-keepalive-per-tcp-session
Reset keepalive per new tcp session
2021-12-01 03:57:04 +01:00
George Thessalonikefs 173a8bb2b6 Changelog note for #555:
- Merge PR #555 from fobser: Allow interface names as scope-id in
      IPv6 link-local addresses.
2021-12-01 03:55:53 +01:00
gthessandGitHub ba9356af99 Merge pull request #555 from fobser/if_nametoindex
Allow interface names as scope-id in IPv6 link-local addresses.
2021-12-01 03:54:45 +01:00
George Thessalonikefs dc162f7fee Changelog note for #493:
- Merge PR #493 from Jaap: Fix generation of libunbound.pc.
2021-12-01 03:51:12 +01:00
George Thessalonikefs fcedb24b8d Merge branch 'master' of github.com:NLnetLabs/unbound 2021-12-01 03:50:16 +01:00
gthessandGitHub a22a79572e Merge pull request #493 from NLnetLabs/patch-configure
Fix generation of libunbound.pc
2021-12-01 03:50:01 +01:00
George Thessalonikefs 178be45fb3 Changelog note for #511:
- Merge PR #511 from yan12125: Reduce unnecessary linking.
2021-12-01 03:48:51 +01:00
gthessandGitHub 94ea0e5e8f Merge pull request #511 from yan12125/python-linking
- Reduce unnecessary linking
2021-12-01 03:46:25 +01:00
W.C.A. Wijngaards 88da8ce174 - iana portlist update. 2021-11-30 15:05:27 +01:00
W.C.A. Wijngaards 2cee189e53 - Fix to remove git tracking and ci information from release tarballs. 2021-11-30 13:38:39 +01:00
W.C.A. Wijngaards 8648db9583 - Fix #574: Review fix for spelling. 2021-11-29 16:11:32 +01:00
W.C.A. Wijngaards b5dbb0282e - Fix #576: [FR] UB_* error codes in unbound.h 2021-11-29 16:10:45 +01:00
W.C.A. Wijngaards 766c3164a3 - Fix #574: Review fixes for it. 2021-11-29 15:26:07 +01:00
W.C.A. Wijngaards b48d6760fc - Fix #574: Review fixes for it. 2021-11-29 15:13:14 +01:00
W.C.A. Wijngaards dcad9d5863 - Fix #574: unbound-checkconf reports fatal error if interface names
are used as value for interfaces:
2021-11-29 14:59:39 +01:00
W.C.A. Wijngaards 2921ce9e61 - Fix to make python module opt_list use opt_list_in. 2021-11-29 11:57:45 +01:00
W.C.A. Wijngaards 22881e28cc - Fix for #570: regen aclocal.m4, fix configure.ac for spelling. 2021-11-29 11:41:45 +01:00
Wouter WijngaardsandGitHub 9645228f03 Merge pull request #570 from rex4539/typos
Fix typos
2021-11-29 11:39:48 +01:00
Tom Carpay 5bde54b530 Document PR #563 to changelog 2021-11-15 14:19:24 +00:00
tcarpayandGitHub c47e98a659 Merge pull request #563 from NLnetLabs/bugfix/general-edns-options3
Better positioning of general EDNS option handling: revisited V2
2021-11-15 15:14:51 +01:00
Tom Carpay ff030fa332 Clarify KEEPALIVE EDNS0 option operation 2021-11-15 14:00:31 +00:00
Tom Carpay e899b4cefe Make explicit whether edns options are parsed from queries or responses 2021-11-15 13:40:51 +00:00
Tom Carpay b47dc528aa add missing return code 2021-11-15 12:33:08 +00:00
c5a1e87f75 Remove wrongly added EDE comments
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2021-11-15 13:03:26 +01:00
Dimitris Apostolou c21d6af617 Fix typos 2021-11-13 16:56:15 +02:00
a0df340b1e Update util/data/msgparse.c
Co-authored-by: gthess <george@nlnetlabs.nl>
2021-11-08 12:28:03 +01:00
TCY16 f5b586dbdc add potential EDE spots 2021-11-08 11:50:57 +01:00
TCY16 8205c87a96 complete renaming of the modules edns list 2021-11-08 11:50:29 +01:00
fa73142b79 Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-11-08 11:02:54 +01:00
W.C.A. Wijngaards 3fc987955e Changelog note for #565
- Merge #565: unbound.service.in: Disable ProtectKernelTunables again.
2021-11-05 13:22:27 +01:00
Wouter WijngaardsandGitHub 7df1a347a5 Merge pull request #565 from Maryse47/patch-1
unbound.service.in: Disable ProtectKernelTunables again
2021-11-05 13:21:00 +01:00
W.C.A. Wijngaards 738c7db9ab - Fix to remove unused code from rpz resolve client and action
function.
2021-11-05 12:13:38 +01:00
W.C.A. Wijngaards 0006c08f15 - Fix analyzer review failure in rpz action override code to not
crash on unlocking the local zone lock.
2021-11-05 12:02:50 +01:00
George Thessalonikefs 24eded6ef9 - Fix for #558: clear the UB_EV_TIMEOUT bit before adding an event. 2021-11-05 11:21:30 +01:00
George Thessalonikefs 431b749d7a - Fix for #558: fix loop in comm_point->tcp_free when a comm_point is reclaimed
more than once during callbacks.
2021-11-05 11:19:08 +01:00
W.C.A. Wijngaards e7fbd27060 - Fix that forward-zone name is documented as the full name of the
zone. It is not relative but a fully qualified domain name.
2021-11-05 10:16:27 +01:00
Maryse47andGitHub 8eb5010104 Disable ProtectKernelTunables again
This option was removed in https://github.com/NLnetLabs/unbound/commit/ff8fd0be5c529e7a1b84e8c74426e9c531c0a8f8 but reintroduced in https://github.com/NLnetLabs/unbound/commit/c32b9e4ba95983146eac805719db720f02a64358

Disable it with commentary in hope to prevent slipping it in again.
2021-11-03 13:05:11 +00:00
W.C.A. Wijngaards 1a94a68fc2 - Fix #552: Unbound assumes index.html exists on RPZ host. 2021-11-02 16:45:02 +01:00
Willem Toorop 53a1677828 Reset keepalive per new tcp session 2021-11-01 21:06:07 +01:00
Tom Carpay cb48d9e4a1 Fix keepalive logic 2021-11-01 15:01:07 +00:00
Tom Carpay 5f8447830a Move option handling to parse-time 2021-11-01 13:48:31 +00:00
Tom Carpay 89d7476539 split edns_data.opt_list in opt_list_in and opt_list_out
opt_list_in for parsed (incoming) edns options, and
opt_list_out for outgoing (to be encoded) edns options
2021-11-01 12:48:40 +00:00
Tom Carpay 3925297d07 Remove apply_edns_options from worker and mesh...
to be returned in message encoding later...
2021-11-01 10:44:55 +00:00
Tom Carpay 3ebfa9fc97 Outgoing module options go to opt_list_modules_out
And opt_list_modules_out is reset in case of failure
BEWARE! No options from modules will be encoded in the responses now!
2021-10-27 14:01:56 +00:00
Tom Carpay 3e6eeb504d Modules have their own outgoing ends options list
But nothing happens with it yet
2021-10-27 13:48:49 +00:00
Florian Obser 8756f1e4c7 Allow interface names as scope-id in IPv6 link-local addresses.
For example, this makes
forward-zone:
    name: "."
    forward-addr: fe80::20d:b9ff:fe46:c7f4%vio0
    forward-first: yes

work instead of fe80::20d:b9ff:fe46:c7f4%1.
2021-10-24 16:06:55 +02:00
W.C.A. Wijngaards ecb0b44ba8 - Fix to protect custom regional create against small values. 2021-10-11 17:23:30 +02:00
W.C.A. Wijngaards 09afdb7669 - Fix chaos replies to have truncation for short message lengths,
or long reply strings.
2021-10-11 17:00:20 +02:00
W.C.A. Wijngaards ce39d5ad17 - Fix to add example.conf note for outbound-msg-retry. 2021-10-04 09:19:27 +02:00
W.C.A. Wijngaards 89510f4a0c - Implement RFC8375: Special-Use Domain 'home.arpa.'. 2021-09-27 15:09:01 +02:00
W.C.A. Wijngaards 962cb07055 - Fix crosscompile script for the shared build flags. 2021-09-21 14:34:56 +02:00
W.C.A. Wijngaards 9f26f397a9 - Fix crosscompile windows to use libssp when it exists.
- For the windows compile script disable gost.
- Fix that on windows, use BIO_set_callback_ex instead of deprecated
2021-09-21 13:51:34 +02:00
W.C.A. Wijngaards 24d0dc1725 - Fix crosscompile shell syntax. 2021-09-21 09:23:38 +02:00
W.C.A. Wijngaards 38f500f1c9 - For crosscompile on windows, detect 64bit stackprotector library. 2021-09-21 09:20:56 +02:00
W.C.A. Wijngaards 808a3cb16d - Fix crosscompile on windows to work with openssl 3.0.0 the
link with ws2_32 needs -l:libssp.a for __strcpy_chk.
  Also copy results from lib64 directory if needed.
2021-09-20 17:52:34 +02:00
W.C.A. Wijngaards 63a406a432 - Fix more initialisation errors reported by gcc sanitizer. 2021-09-10 15:27:05 +02:00
W.C.A. Wijngaards a64cbe958d - Fix lock debug code for gcc sanitizer reports. 2021-09-10 15:11:30 +02:00
W.C.A. Wijngaards 7d70e3c861 - Fix initialisation errors reported by gcc sanitizer. 2021-09-10 14:30:57 +02:00
W.C.A. Wijngaards f976fdee28 - Fix root_anchor test to check with new icannbundle date. 2021-09-08 17:26:30 +02:00
W.C.A. Wijngaards 829f3c932e - Fix for #41: change outbound retry to int to fix signed comparison
warnings.
2021-09-08 15:07:11 +02:00
W.C.A. Wijngaards 750f46d1aa - Small fixes for #41: changelog, conflicts resolved,
processQueryResponse takes an iterator env argument like other
  functions in the iterator, no colon in string for set_option,
  and some whitespace style, to make it similar to the rest.
2021-09-08 14:52:56 +02:00
W.C.A. Wijngaards b2cf56e0ec Merge branch 'countsudoku-feature/configure-outbound_msg_retry' 2021-09-08 14:38:58 +02:00
W.C.A. Wijngaards 204edd229e Merge branch 'feature/configure-outbound_msg_retry' of git://github.com/countsudoku/unbound into countsudoku-feature/configure-outbound_msg_retry 2021-09-08 14:38:36 +02:00
W.C.A. Wijngaards 48995dba21 Changelog entry for #538
- Fix #538: Fix subnetcache statistics.
2021-09-03 16:41:21 +02:00
Wouter WijngaardsandGitHub 4c90250043 Merge pull request #538 from tduboys/fix_subnetcache_statistics
Fix subnetcache statistics
2021-09-03 16:41:07 +02:00
Thomas du Boÿs ebb4987146 Fix subnetcache statistics 2021-09-03 10:37:07 +02:00
W.C.A. Wijngaards 520fa84265 - Fix tcp fastopen failure when disabled, try normal connect instead. 2021-09-01 16:21:10 +02:00
W.C.A. Wijngaards 4b2799fdd6 - Fix #533: Negative responses get cached even when setting
cache-max-negative-ttl: 1
2021-08-27 10:33:21 +02:00
W.C.A. Wijngaards 087a7ff95e - Fix asynclook unit test for setup of lockchecks before log. 2021-08-25 16:19:12 +02:00
W.C.A. Wijngaards 1ea624d0c7 - Fix compile warning in libunbound for listen desetup routine. 2021-08-25 14:51:59 +02:00
W.C.A. Wijngaards 9fa1ae1340 - Fix RPZ locks. Do not unlock zones lock if requested and rpz find
zone does not find the zone. Readlock the clientip that is found
  for ipbased triggers. Unlock the nsdname zone lock when done.
  Unlock zone and ip in rpz nsip and nsdname callback. Unlock
  authzone and localzone if clientip found in rpz worker call.
2021-08-25 14:18:29 +02:00
W.C.A. Wijngaards c93a7fb38a - Fix the stream wait stream_wait_count_lock and http2 buffer locks
setup and desetup from race condition.
2021-08-25 13:37:50 +02:00
W.C.A. Wijngaards 889a2d09c3 - Fix #536: error: RPZ: name of record (drop.spamhaus.org.rpz.local.)
to insert into RPZ.
2021-08-25 13:14:53 +02:00
W.C.A. Wijngaards 924ff7b373 Changelog note for #401
- Merge #401: RPZ triggers. This add additional RPZ triggers,
  unbound supports a full set of rpz triggers, and this now
  includes nsdname, nsip and clientip triggers. Also actions
  are fully supported, and this now includes the tcp-only action.
2021-08-25 10:19:48 +02:00
Wouter WijngaardsandGitHub 74f1f0addd Merge pull request #401 from NLnetLabs/rpz-triggers
RPZ triggers
2021-08-25 10:14:12 +02:00
Shchelkunov Artem 0b362e3a4d Fix: buffer overflow bug
Found by static analyzer svace
Static analyzer message: Array 'token' of size 65536 bytes passed to
function 'rrinternal_parse_rdata' at str2wire.c:679 by passing as 2nd
parameter to function 'rrinternal_parse_rdata' at str2wire.c:775, where
it is accessed by unacceptable index. This may lead to buffer overflow.

on-behalf-of: @ideco-team <github@ideco.ru>
2021-08-20 19:46:01 +05:00
W.C.A. Wijngaards 2315fc9d9b Changelog entry for #531
- Fix #531: Fix: passed to proc after free.
2021-08-20 15:18:39 +02:00
Wouter WijngaardsandGitHub 1ae42b94b3 Merge pull request #531 from Shchelk/ptpaf
Fix: passed to proc after free
2021-08-20 15:15:41 +02:00
Shchelkunov Artem ba7598f559 Fix: passed to proc after free
Found by static analyzer svace
Static analyzer message: Pointer 'dp' is passed to a function at
iter_hints.c:401 after the referenced memory was deallocated at
iter_hints.c:174 by passing as 3rd parameter to function 'hints_insert'
at iter_hints.c:398.

on-behalf-of: @ideco-team <github@ideco.ru>
2021-08-20 18:06:51 +05:00
Shchelkunov Artem 5730e7bb59 Fix: dereferencing a null pointer
Found by static analyzer svace
Static analyzer message: Return value of a function 'reply_info_copy'
is dereferenced at dns64.c:923 without checking, but it is usually
checked for this function (4/5).

on-behalf-of: @ideco-team <github@ideco.ru>
2021-08-20 17:52:18 +05:00
W.C.A. Wijngaards 54b7554b5a Changelog note for #529 and nicer layout.
- Fix #529: Fix: log_assert does nothing if UNBOUND_DEBUG is
  undefined.
2021-08-20 14:32:13 +02:00
Wouter WijngaardsandGitHub a4d1224d92 Merge pull request #529 from Shchelk/next
Fix: log_assert does nothing if UNBOUND_DEBUG is undefined
2021-08-20 14:29:18 +02:00
Shchelkunov Artem 4ea9651624 Fix: log_assert does nothing if UNBOUND_DEBUG is undefined
Found by static analyzer svace
Static analyzer message: Integer value 'len' obtained from untrusted
source at tube.c:374 by passing as 2nd parameter to function 'read'
at tube.c:340 without checking its higher bound is used as a loop bound
at tube.c:374.


on-behalf-of: @ideco-team <github@ideco.ru>
2021-08-20 17:16:39 +05:00
W.C.A. Wijngaards a9de6879b8 Merge branch 'master' into rpz-triggers 2021-08-18 09:53:35 +02:00
W.C.A. Wijngaards 51f5b3ab44 - Fix sed script in ssldir split handling. 2021-08-17 13:15:20 +02:00
W.C.A. Wijngaards d88f554503 - Fix #527: not sending quad9 cert to syslog (and may be more). 2021-08-17 13:03:33 +02:00
W.C.A. Wijngaards cc6d428cb7 - Fix that --with-ssl can use "/usr/include/openssl11" to pass the
location of a different openssl version.
2021-08-17 10:32:12 +02:00
W.C.A. Wijngaards d0cc58be3d - Fix to support harden-algo-downgrade for ZONEMD dnssec checks. 2021-08-16 16:14:32 +02:00
George Thessalonikefs 2a72845576 Changelog note for #528:
- Merge PR #528 from fobser: Make sldns_str2wire_svcparam_buf() static.
2021-08-16 14:15:57 +02:00
gthessandGitHub 45542053fe Merge pull request #528 from fobser/svcparam_static
Make sldns_str2wire_svcparam_buf() static.
2021-08-16 14:12:50 +02:00
Florian Obser 25b7eb3c7c Make sldns_str2wire_svcparam_buf() static.
The function is only used in this translation unit and prevents a "no
previous prototype" warning.
2021-08-16 11:27:40 +02:00
W.C.A. Wijngaards 4034c009bb - zonemd, fix order of bogus printout string manipulation. 2021-08-13 15:24:53 +02:00
W.C.A. Wijngaards c8c2dfff22 - Fix zonemd verification of key that is not in DNS but in the zone
and needs a chain of trust.
2021-08-13 14:43:11 +02:00
W.C.A. Wijngaards ad45e9b89e - Fix for #431: Squelch permission denied errors for udp connect,
and udp send, they are visible at higher verbosity settings.
2021-08-13 09:27:58 +02:00
W.C.A. Wijngaards de31bcdf2e - Support using system-wide crypto policies. 2021-08-13 09:21:47 +02:00
George Thessalonikefs a158f365b9 - For #514: generate configure. 2021-08-12 21:46:30 +02:00
George Thessalonikefs 3b8b2e0dc7 Changelog note for #514:
- Merge PR #514, from ziollek: Docker environment for run tests.
2021-08-12 21:43:18 +02:00
gthessandGitHub 3829faf679 Merge pull request #514 from ziollek/docker_for_run_test
Docker environment for run tests
2021-08-12 21:30:36 +02:00
W.C.A. Wijngaards fdae4cdbbb - Fix to print error from unbound-anchor for writing to the key
file, also when not verbose.
2021-08-12 16:06:02 +02:00
W.C.A. Wijngaards b13bcab089 - For #519: fix comments for doxygen. 2021-08-12 15:14:22 +02:00
W.C.A. Wijngaards 2f828ec720 - For #519: yacc and lex. And fix python bindings, and test program
unbound-dnstap-socket.
2021-08-12 15:12:55 +02:00
W.C.A. Wijngaards 6bee3e77fc Changelog note for #519 and example.conf edit
- Merge #519: Support for selective enabling tcp-upstream for
  stub/forward zones.
- For #519: note stub-tcp-upstream and forward-tcp-upstream in
  the example configuration file.
2021-08-12 15:05:51 +02:00
Wouter WijngaardsandGitHub 0ace659fe2 Merge pull request #519 from ziollek/tcp_upstream_option
Support for selective enabling tcp-upstream for stub/forward zones
2021-08-12 15:03:57 +02:00
W.C.A. Wijngaards 07f70d0745 Changelog note for #523
- Merge #523: fix: free() call more than once with the same pointer.
2021-08-12 13:45:18 +02:00
Wouter WijngaardsandGitHub 79df099f4c Merge pull request #523 from Shchelk/bugfix
fix: free() call more than once with the same pointer
2021-08-12 13:45:00 +02:00
W.C.A. Wijngaards 20febc2179 Changelog note for #521
- Merge #521: Update mini_event.c.
2021-08-12 13:24:15 +02:00
Wouter WijngaardsandGitHub 6780a0844d Merge pull request #521 from liheng562653799/master
Update mini_event.c
2021-08-12 13:24:03 +02:00
W.C.A. Wijngaards f8ddcc15b8 - Add test tool readzone to .gitignore. 2021-08-12 13:17:29 +02:00
W.C.A. Wijngaards c5ceee22a9 - And 1.13.2rc1 became the 1.13.2 with the fix for the python module
build. The current code repository continues with version 1.13.3.
2021-08-12 10:04:20 +02:00
Shchelkunov Artem e20b2c1aaf fix: free() call more than once with the same pointer 2021-08-11 15:14:43 +05:00
Chih-Hsuan Yen 98087a051e - Reduce unnecessary linking
- Link to libpython only when needed, fixes #242

When pyunbound is enabled while pythonmodule is not (i.e., ./configure
--without-pythonmodule --with-pyunbound), only the Python library
_unbound.so uses Python functions, and main programs (unbound,
unbound-anchor, ...) and libunbound.so do not. This patch removes
unneeded linking.

- Link the Python library _unbound.so to Python only. _unbound.so does
  not directly use libraries used by libunbound. This patch removes
  unneeded linking mentioned in [1]

[1] https://github.com/NLnetLabs/unbound/pull/511#issuecomment-886072003
2021-08-06 22:33:22 +08:00
Artem Egorenkov 0d8dd6ec33 - memory management violations fixed 2021-08-06 14:11:12 +02:00
liheng562653799andGitHub edbf9c21ee Update mini_event.c
When in heavy load, unbound opens many outside_network sockets for out going queries to delegation servers, which may result in a big fd(maxfd) value(for thread A 65500, for thread B 65501, for thread C ...). 
There are situations when thread A has a max fd num 65500 where maxfd is of course 65500, thread B has max fd num 20 for now but maxfd is still 65501. Though linux kernel checks whether maxfd+1  passed by select syscall  is really the process' maxfd+1. Linux kernel can not tell maxfd+1 passed by thread B select syscall is much bigger(65501+1 or 65500+1  after trimed by kerne) than it should be (20+1).
In this situation, when kernel do_select() for thread B, much work is wasted.
2021-08-06 12:00:56 +08:00
W.C.A. Wijngaards 8e538dcaa8 - Fix #520: Unbound 1.13.2rc1 fails to build python module. 2021-08-05 17:10:56 +02:00
W.C.A. Wijngaards f232562430 Merge branch 'master' into rpz-triggers 2021-08-05 13:37:22 +02:00
Tomasz Ziolkowski ae45f46b9e Add (stub|forward)-tcp-upstream options which enable using tcp transport only for specified stub/forward zones 2021-08-05 08:44:18 +02:00
W.C.A. Wijngaards 4518bb1158 For 1.13.2rc1. 2021-08-05 08:37:20 +02:00
W.C.A. Wijngaards 5d349dbcf3 - Tag for 1.13.2 release. 2021-08-05 08:36:24 +02:00
W.C.A. Wijngaards 77fdd8836d - Fix unit test zonemd_reload for use in run_vm. 2021-08-04 16:26:21 +02:00
W.C.A. Wijngaards 822a96b29a - Fix libnettle zonemd unit test. 2021-08-04 14:04:31 +02:00
W.C.A. Wijngaards 067954fe8d - Fix out of sourcedir run of zonemd unit tests. 2021-08-04 13:54:38 +02:00
Tomasz Ziolkowski 59552a7a76 reformat 2021-08-04 13:05:21 +02:00
Tomasz Ziolkowski 1900ea3bb3 Revert changes in files managed by maintainers, move docker do contrib dir 2021-08-04 13:02:38 +02:00
Tomasz Ziolkowski a922c6d525 merge master 2021-08-04 13:02:20 +02:00
W.C.A. Wijngaards 592cfe3afc - Fix readzone compile under debug config. 2021-08-04 11:43:29 +02:00
W.C.A. Wijngaards 6dd270d625 - Fix missing locks in zonemd unit test. 2021-08-04 11:05:51 +02:00
W.C.A. Wijngaards c9bb0604db - Fix static analysis warnings about localzone locks that are unused. 2021-08-04 10:58:08 +02:00
George Thessalonikefs 8878680898 - Bump MAX_RESTART_COUNT to 11 from 8; in relation to #438. This allows
longer CNAME chains in Unbound.
2021-08-04 10:53:22 +02:00
George Thessalonikefs efa15747a2 Changelog note for #415:
- Merge PR #415 from sibeream: Use /proc/sys/net/ipv4/ip_local_port_range
  to determine available outgoing ports.
2021-08-04 10:47:38 +02:00
gthessandGitHub bdaecd942d Merge pull request #415 from sibeream/master
Use /proc/sys/net/ipv4/ip_local_port_range to determine available outgoing ports
2021-08-04 10:42:12 +02:00
W.C.A. Wijngaards f5d53928a3 - In unit test use openssl set security level to allow keys in test. 2021-08-04 09:58:38 +02:00
W.C.A. Wijngaards c639dc956a - Fix sign comparison warning on FreeBSD. 2021-08-03 14:13:37 +02:00
W.C.A. Wijngaards 2a0df9e72e - Annotate assertion into error printout; we think it may be an
error, but the situation looks harmless.
2021-08-03 14:08:30 +02:00
W.C.A. Wijngaards dd7dc30294 Changelog note for #517
- Merge PR #517 from dyunwei: #420 breaks the mesh reply list
  function that need to reuse the dns answer.
2021-08-03 13:11:18 +02:00
Wouter WijngaardsandGitHub 5196ee03e6 Merge pull request #517 from dyunwei/master
#420 breaks the mesh reply list function that need to reuse the dns answer.
2021-08-03 13:11:01 +02:00
George Thessalonikefs a519009378 Merge branch 'master' of github.com:NLnetLabs/unbound 2021-08-03 12:20:45 +02:00
George Thessalonikefs ca67691092 - Listen to read or write events after the SSL handshake.
Sticky events on windows would stick on read when write was needed.
2021-08-03 12:18:58 +02:00
daiyunwei 0784ad7a11 #420
clear the c->buffer in the comm_point_send_reply does resolve the "can't fit qbuffer in c->buffer" issue, but it breaks the mesh reply list function that need to reuse the answer. because the c->buffer is cleared in the comm_point_send_reply, it cannot be resued again. it means that it is not inappropriate to clear c->buffer in the comm_point_send_reply.

After some investigation, i found it is appropriate to clear c->buffer before use in the http2_query_read_done.
2021-08-03 11:40:30 +08:00
W.C.A. Wijngaards 3ed5b62578 - Fix verbose printout failure in tcp reuse unit test. 2021-08-02 16:06:36 +02:00
W.C.A. Wijngaards 89e2f2f753 - iana portlist update. 2021-08-02 15:26:20 +02:00
W.C.A. Wijngaards 0bdcbc80b9 - Move ECDSA functions to use OpenSSL 3.0.0 API. 2021-08-02 15:06:26 +02:00
W.C.A. Wijngaards d242bfb73b - Move RSA and DSA to use OpenSSL 3.0.0 API. 2021-08-02 14:43:51 +02:00
W.C.A. Wijngaards 60663c766a Review fixup for keyraw pkey function use. 2021-08-02 13:39:48 +02:00
W.C.A. Wijngaards ca00814e67 - Prepare for OpenSSL 3.0.0 provider API usage, move the sldns
keyraw functions to produce EVP_PKEY results.
2021-08-02 13:33:32 +02:00
W.C.A. Wijngaards b6abcb1508 - For #515: Fix compilation with openssl 3.0.0 beta2, lib64 dir and
SSL_get_peer_certificate.
- Move acx_nlnetlabs.m4 to version 41, with lib64 openssl dir check.
2021-07-30 13:54:43 +02:00
W.C.A. Wijngaards 11caae256b - Fix #515: Compilation against openssl 3.0.0 beta2 is failing to
build unbound.
2021-07-30 13:35:23 +02:00
Tomasz Ziolkowski 3e310a17be Docker environment for run tests + enhancement for ssl_handshake 2021-07-27 12:06:08 +02:00
George Thessalonikefs dd254137f1 - Changelog entry for #513: Stream reuse, attempt to fix #411, #439,
#469.
2021-07-26 16:55:32 +02:00
gthessandGitHub dcd75814b9 Merge pull request #513 from NLnetLabs/tcp_reuse_fix
Stream reuse, attempt to fix #411, #439, #469
2021-07-26 16:54:34 +02:00
W.C.A. Wijngaards e8d28f0a55 - Fix readzone unknown type print for memory resize. 2021-07-26 16:45:33 +02:00
George Thessalonikefs 8ee5aa312f - Fix unittcpreuse.c: properly initialise outnet. 2021-07-26 16:29:57 +02:00
George Thessalonikefs ad2bd61ed4 - Remove redundant log_assert and fix error messages. 2021-07-26 16:12:55 +02:00
George Thessalonikefs de73af2da2 - stream reuse, do not explicitly wait for a free pending_tcp if a reuse
could be used.
2021-07-26 10:47:20 +02:00
W.C.A. Wijngaards fc462aa15d Changelog note for #512
- Merge #512: unbound.service.in: upgrade hardening to latest
  standards.
2021-07-26 09:47:24 +02:00
Wouter WijngaardsandGitHub 1e17b8f67c Merge pull request #512 from ArchangeGabriel/patch-1
unbound.service.in: upgrade hardening to latest standards
2021-07-26 09:47:12 +02:00
Bruno Pagani c32b9e4ba9 unbound.service.in: upgrade hardening to latest standards
Systemd gradually introduced new protection bits, let’s enable them.
2021-07-25 05:27:22 +02:00
George Thessalonikefs ab318a8b95 - Add unittest for tcp_reuse functions. 2021-07-24 01:15:00 +02:00
George Thessalonikefs 1b7358e85c - stream reuse, move log_assert to the correct location. 2021-07-23 20:51:14 +02:00
George Thessalonikefs e1fdac7205 - stream reuse, clean links on structs that are unlinked from a list. 2021-07-23 18:45:48 +02:00
George Thessalonikefs 0c74d6abba - Fix for #411, #439, #469: stream reuse, fix loop in the free
pending_tcp list.
2021-07-23 18:25:06 +02:00
George Thessalonikefs 5b4555954a - Fix for #411, #439, #469: stream reuse, fix outnet deletion for all
non-free pending_tcp.
2021-07-23 18:05:57 +02:00
George Thessalonikefs 224571256d - Fix for #411, #439, #469: stream reuse, fix LRU list when reuse is
already in the tree.
2021-07-23 18:00:24 +02:00
George Thessalonikefs f9ad139c08 - Fix for #411, #439, #469: stream reuse, fix linking when touching the
tcp_reuse LRU list.
2021-07-23 17:51:42 +02:00
George Thessalonikefs e2221f3388 - More log_assert for stream reuse operations. 2021-07-23 17:50:28 +02:00
W.C.A. Wijngaards ca5baef433 - Fix that ldns_zone_new_frm_fp_l counts the line number for an empty
line after a comment.
2021-07-21 13:58:07 +02:00
Artem EgorenkovandArtem Egorenkov d9153cb35b Option --enable-linux-ip-local-port-range added to use system configured port range for libunbound on Linux 2021-07-20 14:46:43 +02:00
W.C.A. Wijngaards d300bc8eee - Fix for older parsers for function call in serve expired get cached. 2021-07-16 17:55:10 +02:00
W.C.A. Wijngaards 163d8b768e - Another fix from lint for ignored return value. 2021-07-16 17:48:52 +02:00
W.C.A. Wijngaards a7eaf6364d - Fix from lint for ignored return value. 2021-07-16 17:46:04 +02:00
W.C.A. Wijngaards 5f57dbf19b - Insert header into testcode/readzone.c, it was missing. 2021-07-16 17:12:41 +02:00
George Thessalonikefs ca4d68c64c - Introduce 'http-user-agent:' and 'hide-http-user-agent:' options. 2021-07-16 14:32:18 +02:00
W.C.A. Wijngaards f693cbc90b Revert "- With hide-version unbound also omits the version from http headers."
This reverts commit 9d4644b125.
2021-07-16 14:02:55 +02:00
W.C.A. Wijngaards 9d4644b125 - With hide-version unbound also omits the version from http headers. 2021-07-16 13:45:41 +02:00
W.C.A. Wijngaards 2a8d1a6d10 - review fix to remove duplicate error printout. 2021-07-16 10:53:53 +02:00
W.C.A. Wijngaards 9e712e8a0b - Fix unbound-control local_data and local_datas to print detailed
syntax errors.
2021-07-16 10:51:27 +02:00
W.C.A. Wijngaards e388ba2967 - Fix spelling in localzone.h comment. 2021-07-16 10:28:09 +02:00
W.C.A. Wijngaards 3aa53e45c8 - Fix spelling in doc/unbound.doxygen comment. 2021-07-16 10:26:45 +02:00
W.C.A. Wijngaards 8180ca192f - Fix for #510: in depth, use ifdefs for windows api event calls. 2021-07-16 09:12:06 +02:00
Wouter WijngaardsandGitHub 410f202a93 Merge pull request #510 from ndptech/master
Don't call a function which hasn't been defined
2021-07-16 09:11:21 +02:00
Nick Porter 2c3f764d61 Don't call a function which hasn't been defined 2021-07-15 17:55:33 +01:00
W.C.A. Wijngaards 3f7e164751 - iana portlist update. 2021-07-06 15:15:43 +02:00
George Thessalonikefs e521b10f32 - Fix clang-analysis warnings for testcode/readzone.c. 2021-07-05 16:51:46 +02:00
George Thessalonikefs 11d3cea823 - Fix compiler warnings for #491. 2021-07-05 15:36:27 +02:00
George Thessalonikefs c6fc7adeb1 - Fix Wunused-result compile warnings. 2021-07-04 15:19:24 +02:00
Tom Carpay a701ef75ed changelog PR #491 2021-07-02 15:15:13 +02:00
tcarpayandGitHub 379c7d592d Merge pull request #491 from NLnetLabs/svcb
Add SVCB and HTTPS types and handling according to draft-ietf-dnsop-svcb-https
2021-07-02 15:11:12 +02:00
Tom Carpay 711087bb13 rename var to remove shadow variable 2021-07-02 14:15:33 +02:00
Tom Carpay ab017cde0f Merge branch 'master' into svcb 2021-07-02 13:37:08 +02:00
877aa8df55 Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-07-02 13:14:47 +02:00
Tom Carpay a6020e4186 change test and error to be in line with new maximum svcb params (nparams >= MAX_NUMBER_OF_SVCPARAMS) 2021-07-02 11:21:19 +02:00
Tom Carpay 543d6d5c13 fix final comment: remove superfluous assert 2021-07-02 10:53:50 +02:00
W.C.A. Wijngaards f62994f6ea - Fix #506: Python Module Seems to Leak Memory if it Experiences an
Unhandled Exception.
2021-07-02 09:42:31 +02:00
Tom Carpay 3d50c25f5b fix comments - 1 2021-07-01 16:59:48 +02:00
e41125495d Apply suggestions from code review
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
2021-07-01 12:45:14 +02:00
W.C.A. Wijngaards 04e9adc610 Analysis workflow, enable the matrix of tests, on demand. 2021-06-25 16:54:23 +02:00
W.C.A. Wijngaards 57022af9a4 Analysis workflow, disable -x for bash the output is reordered with
respect to the command output.
2021-06-25 16:50:21 +02:00
W.C.A. Wijngaards 6ac9253c2a Analysis workflow, remove debug, add desciption echo, remove dll. 2021-06-25 16:34:43 +02:00
W.C.A. Wijngaards 9a90254d2f Analysis workflow, remove debug output. 2021-06-25 16:06:05 +02:00
W.C.A. Wijngaards 8e5c3f51a2 - Fix auth zone download on windows to unlink before rename. 2021-06-25 15:31:33 +02:00
W.C.A. Wijngaards 5e81763e53 Analysis workflow, fixup ctime tests. 2021-06-25 15:27:51 +02:00
W.C.A. Wijngaards e4e0eaa63e Analysis workflow, fix ctime formatting for autotrust and testbound. 2021-06-25 15:11:10 +02:00
W.C.A. Wijngaards 770a54600c Analysis workflow, check for ctime define. 2021-06-25 14:37:53 +02:00
W.C.A. Wijngaards e45e73768f Analysis workflow, see if defines are causing ctime changes. 2021-06-25 14:07:11 +02:00
W.C.A. Wijngaards 66e9317edc Analysis workflow, test ctime replacement. 2021-06-25 13:37:26 +02:00
W.C.A. Wijngaards cef1c56e88 Analysis workflow, debug output for ctime. 2021-06-25 13:12:22 +02:00
W.C.A. Wijngaards 7a5e869548 Analysis workflow, remove debug output. 2021-06-25 11:18:12 +02:00
W.C.A. Wijngaards ba846a925a - Fix configure does not require pkg-config if not needed. 2021-06-25 11:05:57 +02:00
W.C.A. Wijngaards 62ba441024 Analysis workflow, output debug. 2021-06-25 10:38:09 +02:00
W.C.A. Wijngaards 57e3d5da61 - Fix configure grep for reuseport default for failure. 2021-06-25 10:37:47 +02:00
W.C.A. Wijngaards 6ed49bf45f Analysis workflow, debug output. 2021-06-25 10:12:40 +02:00
W.C.A. Wijngaards 358bc0d8bd Analysis workflow, make debug output. 2021-06-25 09:43:02 +02:00
W.C.A. Wijngaards 1b66c5f6e4 Analysis workflow, fix make target. 2021-06-25 09:16:13 +02:00
W.C.A. Wijngaards 7d16b2c268 Analysis workflow, output failure cases. 2021-06-25 08:49:30 +02:00
W.C.A. Wijngaards 658db66c3f - Fix up permissions on rpl data file in tests. 2021-06-25 08:45:03 +02:00
W.C.A. Wijngaards e24c78efd6 Analysis workflow, remove debug output, strip more whitespace off
ADDRESS lines in testbound range.
2021-06-24 22:57:12 +02:00
W.C.A. Wijngaards 56733f1ba0 Analysis workflow, output testbound results. 2021-06-24 22:28:07 +02:00
W.C.A. Wijngaards 8a25ca9651 Fixup ctime test. 2021-06-24 22:11:42 +02:00
W.C.A. Wijngaards db5bb6270b Fixup unit auth test for windows port. 2021-06-24 21:55:46 +02:00
W.C.A. Wijngaards 26cdcc899a Analysis workflow, enable ssl compile. 2021-06-24 21:37:33 +02:00
W.C.A. Wijngaards b468f708cf Analysis workflow, fixup shell. 2021-06-24 21:33:39 +02:00
W.C.A. Wijngaards a383416f80 Analysis workflow, fixup with type. 2021-06-24 21:29:41 +02:00
W.C.A. Wijngaards abc82f5d87 Analysis workflow, echo wrong directories. 2021-06-24 21:26:16 +02:00
W.C.A. Wijngaards b4c0988cb9 Analysis workflow, set MAKESHELL. 2021-06-24 21:23:12 +02:00
W.C.A. Wijngaards f963fc51d4 Analysis workflow, remove SHELL setting because make mangles it. 2021-06-24 21:16:20 +02:00
W.C.A. Wijngaards 43f5429458 Analysis workflow, remove program files dir. 2021-06-24 21:09:25 +02:00
W.C.A. Wijngaards 4fdb6d85eb Analysis workflow, fix shell substitution. 2021-06-24 21:00:52 +02:00
W.C.A. Wijngaards 536e0e2125 Analysis workflow, also fix other makefiles. 2021-06-24 20:55:50 +02:00
W.C.A. Wijngaards 57f4047bb5 Analysis workflow, fixup shell. 2021-06-24 20:51:45 +02:00
W.C.A. Wijngaards e249ca39ed Analysis workflow, fix env variable. 2021-06-24 20:42:32 +02:00
W.C.A. Wijngaards 80a3f416de Analysis workflow, provide CONFIG_SHELL variable. 2021-06-24 20:38:12 +02:00
W.C.A. Wijngaards 547083ddbd Analysis workflow, add shell. 2021-06-24 20:31:02 +02:00
W.C.A. Wijngaards 6b84e303ba Analysis workflow, fixup shell. 2021-06-24 20:25:12 +02:00
W.C.A. Wijngaards 201011057f Analysis workflow, provide SHELL. 2021-06-24 20:13:33 +02:00
W.C.A. Wijngaards d94b3f9b78 Analysis workflow, fix mkdir. 2021-06-24 19:57:29 +02:00
W.C.A. Wijngaards 994c095ed2 Analysis workflow, build libexpat. 2021-06-24 19:50:17 +02:00
W.C.A. Wijngaards 82e7f6f056 Analysis workflow, Fixup spelling 2021-06-24 19:35:12 +02:00
W.C.A. Wijngaards 3bc29af649 Analysis workflow, fixup installtop. 2021-06-24 18:59:14 +02:00
W.C.A. Wijngaards 57055d2d89 Analysis workflow, build libs only. 2021-06-24 18:45:42 +02:00
W.C.A. Wijngaards a409f82f58 Analysis workflow, show topdir from Makefile. 2021-06-24 18:40:14 +02:00
W.C.A. Wijngaards 086e86b7aa Analysis workflow, remove usage from Configure. 2021-06-24 18:25:45 +02:00
W.C.A. Wijngaards 341198b5d7 Analysis workflow, set up Configure. 2021-06-24 18:17:51 +02:00
W.C.A. Wijngaards 0b1221ef3c Analysis workflow, use yum install. 2021-06-24 18:14:35 +02:00
W.C.A. Wijngaards 533e1db30a Analysis workflow, use installed openssl 2021-06-24 18:02:22 +02:00
W.C.A. Wijngaards 02516845d8 Analysis workflow, use perl for Configure. 2021-06-24 17:53:51 +02:00
W.C.A. Wijngaards 877db8ca36 Analysis workflow, run from other shell. 2021-06-24 17:50:58 +02:00
W.C.A. Wijngaards 98e36cd158 Analysis workflow, install perl module. 2021-06-24 17:42:25 +02:00
W.C.A. Wijngaards db917945a3 Analysis workflow, fix spelling for Pod. 2021-06-24 17:39:53 +02:00
W.C.A. Wijngaards 320e6ad462 Analysis workflow, use cpan to install perl module. 2021-06-24 17:36:48 +02:00
W.C.A. Wijngaards 5d862e4b3a Analysis workflow, perl to call cpan for it. 2021-06-24 17:26:10 +02:00
W.C.A. Wijngaards 385d87b543 Analysis workflow, install missing module. 2021-06-24 17:23:51 +02:00
W.C.A. Wijngaards 6822a48308 Analysis workflow, find perl module. 2021-06-24 17:12:34 +02:00
W.C.A. Wijngaards 4a099bb25a Analysis workflow, use different perl 2021-06-24 17:08:13 +02:00
W.C.A. Wijngaards 0b2dc96d31 Analysis workflow, find perl. 2021-06-24 17:04:07 +02:00
W.C.A. Wijngaards 1c05aa2243 Analysis workflow, fixup perl for openssl Configure. 2021-06-24 16:59:24 +02:00
W.C.A. Wijngaards bc271a2b14 Analysis workflow, fixup perl for openssl. 2021-06-24 16:55:52 +02:00
W.C.A. Wijngaards 563b047273 Analysis workflow, build openssl. 2021-06-24 16:49:33 +02:00
W.C.A. Wijngaards d994a246bb Analysis workflow, build openssl. 2021-06-24 16:41:40 +02:00
W.C.A. Wijngaards 36a9b5da0d Analysis workflow, find openssl. 2021-06-24 16:31:51 +02:00
W.C.A. Wijngaards bc51922888 Analysis workflow, find openssl. 2021-06-24 16:27:02 +02:00
W.C.A. Wijngaards b9b4636797 Analysis workflow, find openssl. 2021-06-24 16:20:55 +02:00
W.C.A. Wijngaards 085ac3c0da Analysis workflow, find mingw. 2021-06-24 16:13:21 +02:00
W.C.A. Wijngaards 3db0c7717c Analysis workflow, find mingw. 2021-06-24 16:05:02 +02:00
W.C.A. Wijngaards 0f5847f276 Analysis workflow, find mingw. 2021-06-24 15:28:09 +02:00
W.C.A. Wijngaards 5d70fbc6fa Analysis workflow, find mingw. 2021-06-24 15:25:37 +02:00
W.C.A. Wijngaards 137ff8b856 Analysis workflow, fix indentation of shell keyword. 2021-06-24 15:21:26 +02:00
Tom Carpay 9cd15f7ebf remove tests for svcparam semantics 2021-06-24 15:20:32 +02:00
W.C.A. Wijngaards ad9a287f82 Analysis workflow, add win test. 2021-06-24 15:18:54 +02:00
W.C.A. Wijngaards c017e00279 Analysis workflow, enable all the tests. 2021-06-24 14:51:11 +02:00
W.C.A. Wijngaards aba8623c44 Analysis workflow, add Android x86, arm64 and x86_64 tests. 2021-06-24 14:24:39 +02:00
W.C.A. Wijngaards 709ca6ff7e Analysis workflow, add android armv7a test. 2021-06-24 14:15:56 +02:00
W.C.A. Wijngaards 5198523a92 analysis workflow, fixup SDK and CPU definitions. 2021-06-24 13:47:33 +02:00
W.C.A. Wijngaards 46032bb670 analysis workflow, add iPhoneOS, AppleTVOS and WatchOS tests. 2021-06-24 13:38:45 +02:00
W.C.A. Wijngaards c744db2935 analysis workflow, add arm64 iOS test. 2021-06-24 13:28:52 +02:00
W.C.A. Wijngaards bb208d48fb analysis workflow, use log line groups. 2021-06-24 12:07:22 +02:00
W.C.A. Wijngaards 06af83c2cf analysis workflow, fixup ios test. 2021-06-24 11:53:44 +02:00
W.C.A. Wijngaards 6e025e303f analysis workflow, add iphone on armv7 test. 2021-06-24 11:43:02 +02:00
9880077190 Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-06-24 11:20:41 +02:00
W.C.A. Wijngaards 8990fcbd6a analysis workflow, Add address sanitizer test, disable static for build speedup. 2021-06-24 11:17:57 +02:00
W.C.A. Wijngaards a40bc40d0c analysis workflow, add undefined behaviour sanitizer test. 2021-06-24 11:11:16 +02:00
W.C.A. Wijngaards a807135373 analysis workflow, fix. 2021-06-24 10:53:25 +02:00
W.C.A. Wijngaards 8ce44a4006 analysis workflow, install libevent for test. 2021-06-24 10:51:06 +02:00
W.C.A. Wijngaards bb0a182125 analysis workflow, add libevent test, clang macos test. 2021-06-24 10:44:38 +02:00
W.C.A. Wijngaards 48a22bfb26 analysis workflow, install expat. 2021-06-24 10:32:31 +02:00
W.C.A. Wijngaards 61f8b687ef analysis workflow, macos openssl install location. 2021-06-24 10:25:17 +02:00
W.C.A. Wijngaards 4650207afd analysis workflow, add macos. 2021-06-24 10:18:29 +02:00
W.C.A. Wijngaards 173efaf743 Analysis workflow, use matrix parameters. 2021-06-24 10:05:27 +02:00
Tom Carpay cebdf52c4e fix erroneous test 2021-06-24 10:00:12 +02:00
W.C.A. Wijngaards db7a7c0239 workflow yml uses single quoted strings. 2021-06-24 09:58:43 +02:00
W.C.A. Wijngaards b99b17f3d7 Check env contents. 2021-06-24 09:49:20 +02:00
8f27a67d01 Add code point comment to HTTPS
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-06-24 09:45:08 +02:00
W.C.A. Wijngaards 521ca6a783 workflow sets runs-on. 2021-06-24 09:42:32 +02:00
W.C.A. Wijngaards 15bf9fe581 Fix syntax of analysis workflow. 2021-06-24 09:29:29 +02:00
W.C.A. Wijngaards 999eddd27f Add analyzer and port compile github workflow. 2021-06-24 09:27:46 +02:00
W.C.A. Wijngaards d3b2bc501d - Fix warnings reported by the gcc analyzer. 2021-06-23 18:02:02 +02:00
Tom Carpay cf02b31675 comment out sematic errors to default to secondary resolver behaviour 2021-06-23 15:03:35 +02:00
Tom Carpay ff41de4ec3 resolve comments 2021-06-23 14:44:03 +02:00
W.C.A. Wijngaards 7694998ea9 Merge branch 'master' of github.com:NLnetLabs/unbound 2021-06-23 14:06:13 +02:00
W.C.A. Wijngaards 9d681b627f - Fix #503: DNS over HTTPS response truncated. 2021-06-23 14:05:59 +02:00
Tom Carpay f02d9b5963 fix broken ci-build 2021-06-23 11:04:19 +02:00
eb9891f4ed Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-06-23 10:53:11 +02:00
Wouter WijngaardsandGitHub 4de4a0ffb6 Create ci.yml 2021-06-23 10:23:23 +02:00
George Thessalonikefs 896357a5b3 - Fix #495: Documentation or implementation of "verbosity" option. 2021-06-21 12:54:23 +02:00
W.C.A. Wijngaards 79209823ac - Fix a number of warnings reported by the gcc analyzer. 2021-06-18 18:12:26 +02:00
George Thessalonikefs 02b1a6ae0a - Changelog entry for #440: Various fixes to contrib/unbound_munin_ file. 2021-06-15 17:50:25 +02:00
gthessandGitHub 722d851386 Merge pull request #440 from kimheino/master
Various fixes to contrib/unbound_munin_ file
2021-06-15 17:47:57 +02:00
W.C.A. Wijngaards a887194d6b - Fix configure nonblocking test and onmingw test to use host. 2021-06-14 16:15:21 +02:00
Kim B. Heino 70a9bfda84 contrib/unbound_munin_: minor cleanup to remove two leftovers 2021-06-12 22:37:33 +03:00
W.C.A. Wijngaards 960d199b6f - Fix contrib/unbound.spec, fixed url and comment. 2021-06-10 13:35:27 +02:00
W.C.A. Wijngaards fd7caaf579 - Fix #500: SPEC file in version 1.13.1 references version 1.4;
unable to build RPM from source.
2021-06-10 09:24:48 +02:00
George Thessalonikefs fcde5c8d54 - Use host_os instead of target_os in configure for Darwin8 build. 2021-06-09 16:36:19 +02:00
George Thessalonikefs ad939e54d0 - Fix #413 (based on patch by k-ronny): unbound: does not compile on macOS
11.1-x86_64 host.
2021-06-09 15:54:41 +02:00
George Thessalonikefs d02e956da0 - Changelog entry for #486: Make VAL_MAX_RESTART_COUNT configurable.
- Generetated lexer and parser for #486; updated example.conf.
2021-06-09 12:32:58 +02:00
gthessandGitHub 45be341267 Merge pull request #486 from fobser/val-max-restart
Make VAL_MAX_RESTART_COUNT configurable.
2021-06-09 12:09:27 +02:00
George Thessalonikefs 64546fcfb4 - Fix unused variable warning when compiling with --enable-dnstap. 2021-06-08 22:15:17 +02:00
George Thessalonikefs df53badfa2 - Fix #425: Document auth-zone supports communication with DNS primary
on nondefault port.
2021-06-07 16:02:41 +02:00
Tom Carpay 307613ea83 comment changes 2021-06-07 15:29:06 +02:00
George Thessalonikefs 553d1c78ef - Merge #448 from shoeper: Update unbound-control.8.in, fix
rpz_disable typo.
2021-06-07 14:51:21 +02:00
gthessandGitHub 9c3672a790 Merge pull request #448 from shoeper/patch-1
Update unbound-control.8.in, fix rpz_disable typo
2021-06-07 14:47:35 +02:00
Tom Carpay 9beea6a00c fix key parsing and incorporate testcases 2021-06-07 14:05:14 +02:00
Tom Carpay 7562edbb8c remove superfluous double escaping 2021-06-07 08:39:05 +00:00
Tom Carpay 19c63fdaf6 add key parsing and edge case tests 2021-06-07 09:54:02 +02:00
Tom Carpay 24faac236d implement todos 2021-06-02 16:26:30 +02:00
Willem Toorop cf8418c319 Rewrite SVCB rdata in correct order 2021-06-02 12:56:54 +02:00
Willem Toorop e5acb8f638 Correct sorting of rdata 2021-06-02 12:50:04 +02:00
Tom Carpay 41f642bfb9 add error handling 2021-06-02 12:27:48 +02:00
Tom Carpay e89743b2b8 add check_svcbparams 2021-06-02 10:10:05 +02:00
George Thessalonikefs 2e87871678 - Fix test for zonemd-check option. 2021-06-01 18:02:10 +02:00
W.C.A. Wijngaards cf0aad9fb6 Merge branch 'master' into rpz-triggers 2021-05-28 15:00:55 +02:00
Tom Carpay 9dcfc90225 start of sldns_heck_svcbparams 2021-05-27 14:15:15 +00:00
Tom Carpay eb0e029dda add escaping 2021-05-27 15:22:32 +02:00
W.C.A. Wijngaards ea4f1ee8a6 - zonemd-check: yesno option, default no, enables the processing
of ZONEMD records for that zone.
2021-05-27 14:20:53 +02:00
W.C.A. Wijngaards 2196ccf5e8 - Merge #496 from banburybill: Use build system endianness if
available, otherwise try to work it out.
2021-05-27 13:29:33 +02:00
Wouter WijngaardsandGitHub d116c9711a Merge pull request #496 from banburybill/master
Use build system endianness if available, otherwise try to work it out.
2021-05-27 13:29:08 +02:00
Jim Hague 6066a24405 Use build system endianness if available, otherwise try to work it out.
The getdns build system provides the endianness, enabling building on
Windows native. This change is a convenience for getdns maintainers.
2021-05-27 10:57:35 +01:00
W.C.A. Wijngaards 0f2ae816b5 - For #492: Fix font highlighting for the man page on emacs. 2021-05-25 17:32:08 +02:00
Tom Carpay 21413aed78 fix merge error in ipv6hints 2021-05-25 16:02:22 +02:00
Willem Toorop 956d7d4e44 Fix mandatory parsing and ech printing 2021-05-25 15:56:19 +02:00
Tom Carpay 71904eb0d4 add svcb tpkg tests 2021-05-25 15:44:49 +02:00
W.C.A. Wijngaards 58eeeeb989 - Fix #492: module-config respip missing in unbound.conf.5.in man
page. Merges #494 from he32.
Remove comment line (?) from man page.
2021-05-25 15:06:57 +02:00
Wouter WijngaardsandGitHub 2749132bf7 Merge pull request #494 from he32/unbound-rpz-doc
Transplant parts of the contributed RPZ documentation.
2021-05-25 15:03:51 +02:00
Havard Eidnes 182a78f1dc Transplant parts of the contributed RPZ documentation.
This comes from the doc/IP-BasedActions.pdf file with minor
adaptations.
2021-05-25 14:51:31 +02:00
W.C.A. Wijngaards 11b3ebc386 - Move the NSEC3 max iterations count in line with the 150 value
used by BIND, Knot and PowerDNS. This sets the default value
  for it in the configuration to 150 for all key sizes.
2021-05-25 14:35:19 +02:00
Tom Carpay e21e7e7f60 Merge branch 'svcb' of github.com:NLnetLabs/unbound into svcb 2021-05-25 11:43:50 +02:00
Tom Carpay 36093b0b8a fix multiple ipv6hints entries 2021-05-25 11:43:46 +02:00
Willem Toorop 5f22f3a9cf Shift data pointer when scanning svcb wire data
Also make internal auxilary functions static
2021-05-25 10:41:00 +02:00
Willem Toorop 76cd9390da Fix str2wire ipv6hint like ipv4hint was fixed 2021-05-25 10:37:44 +02:00
Jaap Akkerhuis 56a112001a Fix generation of libunbound.pc 2021-05-24 12:41:09 +02:00
W.C.A. Wijngaards 4f7c194a83 - Test code has -q option for quiet output. 2021-05-21 17:08:58 +02:00
21c5aadbcd Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-05-21 16:09:18 +02:00
24e39a09a8 Apply suggestions from code review
Co-authored-by: Willem Toorop <willem@nlnetlabs.nl>
2021-05-21 15:42:56 +02:00
W.C.A. Wijngaards 76532f7447 - rpz-triggers, silence qname trigger explanation in rpz-log, this is
backwards compatible.
2021-05-21 14:56:38 +02:00
W.C.A. Wijngaards e5cb48c432 Merge branch 'master' into rpz-triggers 2021-05-21 14:09:30 +02:00
W.C.A. Wijngaards 0a6b22dc55 - rpz-triggers, rpz log and stats for nsip and clientip and nsdname. 2021-05-21 14:05:19 +02:00
Tom Carpay eca19fe1d1 happyflow for all signle svcparams (now without debug prints) 2021-05-20 13:39:24 +02:00
Tom Carpay 1a28a27637 happyflow for all signle svcparams 2021-05-20 13:28:34 +02:00
George Thessalonikefs ff6b527184 - Fix for #411, #439, #469: Reset the DNS message ID when moving queries
between TCP streams.
- Refactor for uniform way to produce random DNS message IDs.
2021-05-19 15:07:32 +02:00
W.C.A. Wijngaards ddec5aa559 - rpz-triggers, spelling fix in comment. 2021-05-19 11:40:31 +02:00
W.C.A. Wijngaards 23152e6eb8 Fix date in changelog. 2021-05-17 09:13:29 +02:00
W.C.A. Wijngaards f5e0207a5e - Fix #489: Compile using MSYS2 MinGW 64-bit. 2021-05-17 08:43:46 +02:00
W.C.A. Wijngaards 44f5d27683 - rpz-triggers, check for alloc failure and zone for add rpz soa. 2021-05-14 17:27:15 +02:00
W.C.A. Wijngaards 568aab1b67 - rpz-triggers, in callback from iterator, if rpz is disabled, skip. 2021-05-14 16:41:54 +02:00
W.C.A. Wijngaards 355526da7d - rpz-triggers, the added soa for client ip modified answers is affected
by the minimal-responses config option.
2021-05-14 16:34:38 +02:00
W.C.A. Wijngaards 2094763beb - rpz-triggers, add rpz SOA when minimal responses is not set. 2021-05-14 16:28:55 +02:00
W.C.A. Wijngaards 50dcadd495 - rpz-triggers, for clientip modified answers the rpz SOA is added to the
additional section with the serial number and name of the rpz zone that
  was applied.
2021-05-14 15:34:48 +02:00
W.C.A. Wijngaards ad08971b7a - rpz-triggers, use zone for local data zone based answer if available. 2021-05-14 14:04:42 +02:00
W.C.A. Wijngaards e7f476d5c3 - rpz-triggers, fix comments, log no zone answers. 2021-05-14 13:57:04 +02:00
W.C.A. Wijngaards 193e37d6e8 - rpz-triggers, call module local callback for rpz local encode replies. 2021-05-14 13:42:54 +02:00
W.C.A. Wijngaards a9df16cf9b - rpz-triggers, fix memory allocation trouble on allocation error path. 2021-05-14 13:35:24 +02:00
W.C.A. Wijngaards 9f40e93fe6 - rpz-triggers, use sec_status_insecure like respip, AA flag on RPZ responses. 2021-05-14 13:28:10 +02:00
W.C.A. Wijngaards f9f3e9d4d0 - rpz-triggers, fix compile warning 2021-05-14 13:25:21 +02:00
W.C.A. Wijngaards 32d82fac9b Merge branch 'master' into rpz-triggers 2021-05-14 08:47:56 +02:00
W.C.A. Wijngaards 9aa072d115 - Fix that auth-zone zonefiles use last TTL if no TTL is specified. 2021-05-12 17:24:03 +02:00
Tom Carpay b61d098950 fix memcpy of buffer for ech 2021-05-10 12:19:50 +00:00
Tom Carpay 5b28b213fa basic implementation of a selection of svcb params 2021-05-10 11:03:08 +02:00
W.C.A. Wijngaards 1e85196fd9 Changelog note for #487
- Merge PR #487: ifdef RLIMIT_AS in recently added check.
2021-05-10 08:18:15 +02:00
Wouter WijngaardsandGitHub f8b1745049 Merge pull request #487 from sthen/patch-1
ifdef RLIMIT_AS in recently added check
2021-05-10 08:17:37 +02:00
Stuart HendersonandGitHub cde6284a03 ifdef RLIMIT_AS in recently added check
Some OS still don't have RLIMIT_AS
2021-05-08 15:12:39 +00:00
Florian Obser d4314cad33 Make VAL_MAX_RESTART_COUNT configurable.
unbound tries very hard (up to 6 authoritative servers) to find a
validating answer. This is not always desirable, for example on high
latency links.
2021-05-08 16:56:32 +02:00
W.C.A. Wijngaards e217bb48ad - Remove case fallthrough from deprecate-rsa-1024 code. 2021-05-07 17:06:09 +02:00
W.C.A. Wijngaards 59ea44322e - Add ./configure --with-deprecate-rsa-1024 that turns off RSA 1024. 2021-05-07 14:28:20 +02:00
W.C.A. Wijngaards 07fda669e4 - Fix #485: Unbound occasionally reports broken stats. 2021-05-07 11:13:44 +02:00
W.C.A. Wijngaards 80f06ae9b1 - Rerun flex and bison. 2021-05-04 16:24:16 +02:00
W.C.A. Wijngaards 533e4bbdd6 Merge branch 'master' of github.com:NLnetLabs/unbound 2021-05-04 16:21:51 +02:00
W.C.A. Wijngaards 90d0f8bc19 - Fix to squelch tcp socket bind failures when the interface is gone. 2021-05-04 16:21:42 +02:00
George Thessalonikefs e9a5f5ab3f - Add more logging for out-of-memory cases. 2021-05-04 15:39:06 +02:00
George Thessalonikefs 71f311dbe1 - Fix for #367: only attempt to get the interface for queries
that are no longer on the tcp_waiting_list.
2021-05-04 14:45:01 +02:00
George Thessalonikefs edf35336a3 Clearer template text since not everyone can reopen GitHub issues. 2021-05-04 13:42:00 +02:00
W.C.A. Wijngaards dea1da8d7f Changelog note for #478
- Merge #478: Allow configuration of TCP timeout while waiting for
  response.
2021-05-04 10:25:32 +02:00
Wouter WijngaardsandGitHub 09b924f35b Merge pull request #478 from edevil/tcp_auth_query_timeout
Allow configuration of TCP timeout while waiting for response
2021-05-04 10:24:42 +02:00
W.C.A. Wijngaards 728a3cd7a6 Changelog note and improved comment.
- Fix #481: Fix comment in configuration file.
2021-05-03 13:07:12 +02:00
Wouter WijngaardsandGitHub 6bab2a2421 Merge pull request #481 from paulmenzel/fix-comment-in-conf-file
Fix comment in configuration file
2021-05-03 13:05:27 +02:00
Paul Menzel 3f230f4aaf doc/example.conf.in: Clarify comment for auto-trust-anchor-file
Remove `And enable:` as it refers to the uncommented option.

Fixes: 01dd4a35 ("- Added explicit note on unbound-anchor usage:")
2021-05-03 12:57:39 +02:00
W.C.A. Wijngaards 472801f8ea Merge branch 'master' of github.com:NLnetLabs/unbound 2021-04-29 10:27:02 +02:00
W.C.A. Wijngaards ecb8aed2f2 - Add that log-servfail prints an IP address and more information
about one of the last failures for that query.
2021-04-29 10:24:35 +02:00
André Cruz e07f973938 Allow configuration of TCP timeout while waiting for response
This allows us to configure how long Unbound will wait for a response
on a TCP connection.
2021-04-28 16:20:46 +01:00
gthessandGitHub aaf2236bed Merge pull request #479 from NLnetLabs/issue-templates
Create issue templates
2021-04-28 16:45:44 +02:00
gthessandGitHub 90198ee071 Create issue templates
Create issue templates for bug reports and feature requests.
2021-04-28 16:40:48 +02:00
George Thessalonikefs 45328d37b1 - Fix compiler warning for signed/unsigned comparison for
max_reuse_tcp_queries.
2021-04-28 16:15:52 +02:00
W.C.A. Wijngaards 4604f30d70 - Fix #474: always_null and others inside view. 2021-04-28 14:05:23 +02:00
W.C.A. Wijngaards 77451862f0 Changelog note for PR #470
- Merge #470 from edevil: Allow configuration of persistent TCP
  connections.
2021-04-26 16:07:28 +02:00
Wouter WijngaardsandGitHub 646d6b9bce Merge pull request #470 from edevil/configurable_tcp
Allow configuration of persistent TCP connections
2021-04-26 16:07:16 +02:00
W.C.A. Wijngaards 7226d2f9f2 - Fix that testcode dohclient has OpenSSL initialisation calls. 2021-04-22 09:41:04 +02:00
W.C.A. Wijngaards a45a7efe69 - Further fix for #468: detect SSL_CTX_set_alpn_protos for build with
OpenSSL 1.0.1.
2021-04-22 09:05:43 +02:00
W.C.A. Wijngaards 25425d9aa7 - Fix #468: OpenSSL 1.0.1 can no longer build Unbound. 2021-04-22 09:00:15 +02:00
W.C.A. Wijngaards c71a7faddd Changelog note for #466
- Merge #466 from FGasper: Support OpenSSLs that lack
  SSL_get0_alpn_selected.
2021-04-22 08:57:50 +02:00
Wouter WijngaardsandGitHub 64f18b3003 Merge pull request #466 from FGasper/feature_check_SSL_get0_alpn_selected
Support OpenSSLs that lack SSL_get0_alpn_selected.
2021-04-22 08:57:33 +02:00
André Cruz 75875d4d1c Allow configuration of persistent TCP connections
Added 2 new options to configure previously hardcoded
values: max-reuse-tcp-queries and tcp-reuse-timeout. These
allow fine-grained control over how unbound uses persistent
TCP connections to authority servers.
2021-04-21 13:50:45 +01:00
Felipe Gasper 0efccaa1eb Support OpenSSLs that lack SSL_get0_alpn_selected. 2021-04-19 13:05:50 -04:00
Willem Toorop 2c9b548ebd Simple zonefile printer
(maybe I should have called it printzone?)
2021-04-16 16:07:04 +02:00
W.C.A. Wijngaards 69349c7c24 - rpz-triggers, nicer logging for response IP triggers. 2021-04-14 16:35:39 +02:00
W.C.A. Wijngaards a23efc70ee - rpz-triggers, nicer logging for qname and clientip triggers. 2021-04-14 13:54:27 +02:00
W.C.A. Wijngaards ab94ca9684 - rpz-triggers, nicer logging for nsdname and nsip triggers, one line and
only when it applies to the delegation point.
2021-04-14 12:11:11 +02:00
W.C.A. Wijngaards b366441157 Merge branch 'master' into rpz-triggers 2021-04-14 09:39:41 +02:00
George Thessalonikefs 13e445d50b - Remove unused functions worker_handle_reply and
libworker_handle_reply.
2021-04-13 14:54:26 +02:00
George Thessalonikefs b88b9c9ffd Merge branch 'master' of github.com:NLnetLabs/unbound 2021-04-13 14:01:38 +02:00
George Thessalonikefs b774d97b3c - Fix documentation comment for files previously residing in checkconf/. 2021-04-13 13:59:08 +02:00
W.C.A. Wijngaards 55ba863440 - Fix that nxdomain synthesis does not happen above the stub or
forward definition.
2021-04-13 13:52:57 +02:00
George Thessalonikefs 403d0551b7 - Fix (increase) verbosity level for iterator error log in
processQueryTargets().
2021-04-12 16:49:45 +02:00
W.C.A. Wijngaards addd21f750 - Fix permission denied sendto log, squelch the log messages
unless high verbosity is set.
2021-04-12 11:18:23 +02:00
W.C.A. Wijngaards fb0da1b6b0 - rebuild configure to set EXTRALINK to libunbound.la for #460. 2021-04-09 17:19:04 +02:00
W.C.A. Wijngaards 0491176315 - rpz-triggers, spelling 2021-04-09 08:38:18 +02:00
W.C.A. Wijngaards 473f0cc44b - rpz-triggers, precedence fix for nsdname and nsip triggers. 2021-04-08 14:39:48 +02:00
W.C.A. Wijngaards f2d7620308 Merge branch 'master' into rpz-triggers 2021-04-08 14:28:26 +02:00
W.C.A. Wijngaards 7396eff7af - Fix for #411: Depth protect for crash on deleted element timeout. 2021-04-08 13:47:06 +02:00
W.C.A. Wijngaards f64358b351 Merge branch 'master' into rpz-triggers 2021-04-01 14:34:25 +02:00
W.C.A. Wijngaards fe324823f8 - Fix to stop IPv6 PMTU discovery. 2021-04-01 13:45:34 +02:00
W.C.A. Wijngaards a2ea701f31 - rpz-triggers, fix what domain name to match for nsdname. 2021-04-01 13:11:51 +02:00
W.C.A. Wijngaards 14582d2445 - rpz-triggers, remove unused test. 2021-04-01 12:56:47 +02:00
W.C.A. Wijngaards 1c75e62804 - rpz-triggers, separate cache storage of RPZ records from network records. 2021-04-01 12:06:14 +02:00
W.C.A. Wijngaards 1f2296a8a2 Merge branch 'master' into rpz-triggers 2021-04-01 10:56:54 +02:00
W.C.A. Wijngaards fb315509ab Changelog note for #460.
- Merge #460 from orbea: build: Link with the libtool archive.
2021-04-01 09:12:50 +02:00
Wouter WijngaardsandGitHub bf868a121d Merge pull request #460 from orbea/libtool
build: Link with the libtool archive.
2021-04-01 09:12:35 +02:00
orbea b0298224cb build: Link with the libtool archive. 2021-03-31 16:27:00 -07:00
George Thessalonikefs 9d238060e1 - Clean makedist.sh. 2021-03-31 13:37:08 +02:00
W.C.A. Wijngaards d23e1f1100 - Fix stack-protector change to not override other CFLAGS options. 2021-03-31 10:01:42 +02:00
George Thessalonikefs 1d54b2cdef - Disable the use of stack-protector for cross compiled 32-bit windows builds;
relates to #444.
2021-03-30 22:15:12 +02:00
W.C.A. Wijngaards 49d9e91492 Merge branch 'master' into rpz-triggers 2021-03-25 17:28:53 +01:00
W.C.A. Wijngaards ff0c5f863d - Fix #429: Also fix end of transfer for http download of auth zones. 2021-03-25 12:18:49 +01:00
W.C.A. Wijngaards f3dcb297d9 - Fix that cachedb does not produce empty object files when disabled. 2021-03-24 16:28:18 +01:00
W.C.A. Wijngaards 90e3b8d1a9 - Travis, fix warning in ubsan compile.
- Fix configure Targetconfiditionals.h header check, to use compile.
2021-03-24 15:34:26 +01:00
W.C.A. Wijngaards 3fddde30cb Travis, enable jobs, changelog note.
- Travis, fix script to fail when tasks fail.
2021-03-24 11:18:35 +01:00
W.C.A. Wijngaards 4041342cf2 Travis, fix quotes on config opts for iOS and Android configure. 2021-03-24 11:06:10 +01:00
W.C.A. Wijngaards 569fb4d2f4 Travis, debug print config opts. 2021-03-24 10:57:59 +01:00
W.C.A. Wijngaards c682d423c9 Travis, fix script with steps and export variables and config opts. 2021-03-24 10:49:56 +01:00
W.C.A. Wijngaards 808bb64e50 travis, script at outer scope so failed lines fail build. 2021-03-24 10:42:03 +01:00
W.C.A. Wijngaards 1d199d4a7b remove debug output. 2021-03-24 10:31:46 +01:00
W.C.A. Wijngaards 9f03bccf96 Add unistd include, and changelog note. 2021-03-24 10:22:37 +01:00
W.C.A. Wijngaards 5644036ffd Travis, deprecation test also checks if item unavailable. 2021-03-24 10:15:24 +01:00
W.C.A. Wijngaards e18c4f53aa Travis, fix deprecation test to use CFLAGS and CPPFLAGS. 2021-03-24 10:07:18 +01:00
W.C.A. Wijngaards d56a1c38bc Travis, test deprecation configure output. Debug output from configure
and remove a lot of timeconsuming tests temporarily.
2021-03-24 09:57:53 +01:00
W.C.A. Wijngaards 0e1d64de94 Travis, use config opts when testing on OSX. 2021-03-23 16:51:50 +01:00
W.C.A. Wijngaards 0894f059a1 Travis, undo the && code and enable other iOS jobs. 2021-03-23 16:34:56 +01:00
W.C.A. Wijngaards 1af851e791 Travis, fix location of libexpat, stop on error. 2021-03-23 16:27:49 +01:00
W.C.A. Wijngaards f11d99b6dc Travis, turn off homebrew update, and move to 12.2 for OSX compile. 2021-03-23 16:03:58 +01:00
W.C.A. Wijngaards 26bf371e95 Travis, try to enable brew update for the 12.2 osx image. 2021-03-23 14:45:14 +01:00
W.C.A. Wijngaards 61e6a3910f Travis, note changelog, disable homebrew update in script and cfg. 2021-03-23 14:22:00 +01:00
W.C.A. Wijngaards b5ee27f810 travis, analyzer disabled on test without debug, that does not
run anway.  Turn off failing tests except one.  Update iOS test
to xcode image 12.2.
2021-03-23 13:38:46 +01:00
W.C.A. Wijngaards 85f8d72a89 Travis, attempt to omit ios brew update. 2021-03-23 09:29:11 +01:00
W.C.A. Wijngaards 0b7efaf620 Travis changelog noted. 2021-03-23 09:17:22 +01:00
W.C.A. Wijngaards 6e8fdd8650 Travis enable all tests again. Clang analyzer only a couple times, when
there is a difference.  homebrew updates disabled, so it does not hang.
removed trailing slashes from configure paths.  Moved iOS tests to
allow-failure.
2021-03-23 08:56:42 +01:00
George Thessalonikefs a13d935153 - Reformat pythonmod/pythonmod_utils.{c,h}. 2021-03-22 18:45:31 +01:00
W.C.A. Wijngaards 7d5050c729 Asan tests shown to work, run OSX test. 2021-03-22 17:02:06 +01:00
George Thessalonikefs 50d773436d - Fix for #367: fix memory leak when cannot bind to listening port. 2021-03-22 16:46:17 +01:00
W.C.A. Wijngaards 0d2160ebd1 Travis test for OSX, ASAN results. 2021-03-22 16:36:46 +01:00
W.C.A. Wijngaards 6289806f41 - Fix memory leak reported by asan in rpz SOA record query name. 2021-03-22 15:29:34 +01:00
W.C.A. Wijngaards 574c1fa50a - Fix compile error in listen_dnsport on Android. 2021-03-22 15:02:19 +01:00
W.C.A. Wijngaards ddb8b25800 Merge branch 'master' of github.com:NLnetLabs/unbound 2021-03-22 14:53:16 +01:00
W.C.A. Wijngaards e92270bae4 - Comment out nonworking OSX and IOS travis tests, vm fails to start. 2021-03-22 14:53:05 +01:00
Alex BandandGitHub 864ac4a6c6 Add docs badge 2021-03-22 14:35:30 +01:00
George Thessalonikefs f9e3475776 - Fix unused-function warning when compiling with --enable-dnscrypt. 2021-03-22 14:31:58 +01:00
W.C.A. Wijngaards a8e0de95b8 - rpz-triggers, remove unused variable warning. 2021-03-22 09:52:00 +01:00
W.C.A. Wijngaards 3dd804755b - rpz-triggers, function documentation comments for iterator callback
functions.
2021-03-22 09:49:22 +01:00
W.C.A. Wijngaards 8e7ced72e5 - rpz-triggers, fix that after cname an nsdname or nsip trigger has cname
rrsets prepended by the iterator.
2021-03-22 09:42:04 +01:00
W.C.A. Wijngaards 81cd0d76c8 - rpz-triggers, call rpz callback only if there are auth zones configured. 2021-03-22 09:39:12 +01:00
W.C.A. Wijngaards 5b782d0a22 - iana portlist update. 2021-03-22 09:12:41 +01:00
W.C.A. Wijngaards 52953c86a2 Changelog note for #449. 2021-03-22 08:57:01 +01:00
Wouter WijngaardsandGitHub 5afda55644 Merge pull request #449 from orbea/build
build: Add missing linker flags.
2021-03-22 08:56:43 +01:00
orbea 839cce1a7b build: Add missing linker flags. 2021-03-21 16:28:58 -07:00
SvenandGitHub 0f804f1b56 Update unbound-control.8.in, fix rpz_disable typo 2021-03-20 14:28:10 +01:00
W.C.A. Wijngaards 57d4c3a8a4 - Fix for #447: squelch connection refused tcp connection failures
from the log, unless verbosity is high.
2021-03-19 17:43:36 +01:00
W.C.A. Wijngaards 5a23c84951 - rpz triggers, fix query name on trigger after cname. 2021-03-19 17:36:09 +01:00
W.C.A. Wijngaards 7f39003c04 - rpz triggers, implement qname trigger after cname. 2021-03-19 17:31:44 +01:00
W.C.A. Wijngaards 0c07861404 - Fix #441: Minimal NSEC range not accepted for top level domains. 2021-03-17 14:04:02 +01:00
W.C.A. Wijngaards 1a528238e2 - rpz triggers, use tld name for tld pointer in suffix removal. 2021-03-12 16:07:37 +01:00
W.C.A. Wijngaards e7afe0b153 - rpz triggers, rpz_insert_rr nicer. 2021-03-12 14:35:34 +01:00
W.C.A. Wijngaards 2d4523d946 - rpz triggers, fix that nsdname suffix removal returns allocated memory
of the correct length and the correct dnamelen.
2021-03-12 14:32:10 +01:00
W.C.A. Wijngaards 5ea042c863 - rpz triggers, document statistics and fix comment about statistics. 2021-03-12 13:24:17 +01:00
W.C.A. Wijngaards 62674aaff8 - rpz triggers, fix to put braces around operator. 2021-03-12 13:13:17 +01:00
W.C.A. Wijngaards 263f974120 rpz triggers, man page fix end label 2021-03-12 10:23:20 +01:00
W.C.A. Wijngaards da0bbcec48 - rpz triggers, man page explanation of rpz zone contents. 2021-03-12 10:21:48 +01:00
W.C.A. Wijngaards 4f892a37bd - rpz triggers, spelling fix. 2021-03-12 10:21:29 +01:00
W.C.A. Wijngaards c7bb118a88 - rpz trigger, fix tcp only action after merge 2021-03-12 09:18:38 +01:00
W.C.A. Wijngaards 7a5d82dd48 - rpz trigger, fix merge for unsupported ipaddr based trigger action. 2021-03-12 09:10:11 +01:00
W.C.A. Wijngaards 6f507eb036 Merge branch 'master' into rpz-triggers 2021-03-12 09:04:54 +01:00
W.C.A. Wijngaards eb82c368e0 - man page contents, list new triggers and actions. 2021-03-12 08:54:00 +01:00
W.C.A. Wijngaards 0927fe6fc4 - Fix parse of LOC RR type for decimetres. 2021-03-11 13:22:05 +01:00
Willem Toorop 6c5e67a5a2 put tls-use-sni: on a line of its own
Sorry about this, this must have happened when I added the entries for padding queries and responses.
2021-03-10 15:14:45 +01:00
Kim B. Heino 534a1a42c9 unbound_munin: Munin categories are lower case 2021-03-09 12:20:55 +02:00
Kim B. Heino 69e215b630 unbound_munin: fix statistics after unbound restart / server reboot
"unbound-control stats" lists only query types that has been seen
after unbound restart. Munin requires list of all types ever seen,
or the generated graphs are mostly empty after restart.

Fix this by adding a state file with list of seen query types etc.
2021-03-09 12:03:51 +02:00
Kim B. Heino e1caa764b8 unbound_munin_: use Munin's helper script to detect state file location 2021-03-09 11:09:45 +02:00
Kim B. Heino a190fc436f unbound_munin_: remove trailing white space 2021-03-09 11:03:54 +02:00
W.C.A. Wijngaards 269c168f7e - Debug output for #411 and #439: printout internal error and details. 2021-03-05 13:54:26 +01:00
W.C.A. Wijngaards 1bdae426ee - Workaround for #439: prevent loops in the reuse rbtree. 2021-03-05 13:46:36 +01:00
W.C.A. Wijngaards 6e4ecf7bc1 - Fix spurious errors about "Could not generate request: out of
memory".  The mesh detect cycle routine no longer wrongly stops
  the check when the calling mesh state is unique.
2021-03-04 14:13:44 +01:00
W.C.A. Wijngaards 9753f36463 - iana portlist update. 2021-03-04 10:14:32 +01:00
W.C.A. Wijngaards 6cd77933a3 - Fix: Resolve interface names on control-interface too. 2021-02-26 13:54:10 +01:00
George Thessalonikefs 826828673a - Fix for #367: rc_ports don't have ub_sock; skip cleaning up. 2021-02-26 13:13:55 +01:00
W.C.A. Wijngaards a06d761f74 - Fix to allow rpz with wildcard that applies to all TLDs at once. 2021-02-25 16:54:32 +01:00
W.C.A. Wijngaards 6c464386c6 Changelog note for #365, #367 and #368.
- Merge PR #367 : DNSTAP log local address.  With code from PR #365
  and fixes #368 : dnstap does not log the DNS message ID for
  FORWARDER_QUERY.
2021-02-25 12:00:28 +01:00
Wouter WijngaardsandGitHub 209dc32624 Merge pull request #367 from NLnetLabs/dnstap-log-local-addr
DNSTAP log local address
2021-02-25 11:58:36 +01:00
W.C.A. Wijngaards 04b4f515a7 Fix comment item. 2021-02-25 08:50:02 +01:00
W.C.A. Wijngaards 6cda81b7e4 Fix to use a simple pointer in the call of make_sock and make_sock_port. 2021-02-24 17:36:22 +01:00
W.C.A. Wijngaards 6612974d12 - spelling fix in header. 2021-02-24 16:56:57 +01:00
W.C.A. Wijngaards a9e15f36d8 - Fix unit test for added ulimit checks. 2021-02-24 15:30:12 +01:00
W.C.A. Wijngaards e6ffacc16a - Fix function documentation. 2021-02-24 15:25:12 +01:00
W.C.A. Wijngaards d3497f6bd1 - On startup of unbound it checks if rlimits on memory size look
sufficient for the configured cache size, and logs warning if not.
2021-02-24 14:14:33 +01:00
George Thessalonikefs 7f25bb4730 - ipsecmod: Better logging for detecting a cycle when attaching the
A/AAAA subquery.
2021-02-24 13:59:31 +01:00
George Thessalonikefs d69132b921 - Fix #384: (1) A minor request to improve the log (2) A minor bug in
one log message.
2021-02-24 12:00:11 +01:00
W.C.A. Wijngaards 39a557833d - Fix for zonemd, do not reject insecure result from trust anchor
validation step in dnssec chain of trust.
2021-02-23 17:09:40 +01:00
W.C.A. Wijngaards c802298fca - Fix for zonemd, that domain-insecure zones work without dnssec. 2021-02-23 17:03:23 +01:00
W.C.A. Wijngaards 7ec290255d Spelling fix. 2021-02-22 17:34:02 +01:00
W.C.A. Wijngaards 131d38f8f2 - Fix for zonemd, that nxdomain for the chain of trust is allowed
for island zones, it is treates as an insecure zone for verification.
2021-02-22 17:32:40 +01:00
W.C.A. Wijngaards 40fbc3fa8a - Fix #431: Squelch permission denied errors for tcp connect 2021-02-22 08:24:04 +01:00
W.C.A. Wijngaards aa53b933cc - rpz skip nsec3param records, and nicer log for unsupported actions. 2021-02-19 15:00:39 +01:00
W.C.A. Wijngaards bc4bdbabea - Fix #429: rpz: url: with https: broken (regression in 1.13.1). 2021-02-19 14:42:02 +01:00
W.C.A. Wijngaards f5339ec7e5 Merge branch 'master' into dnstap-log-local-addr 2021-02-18 13:12:09 +01:00
W.C.A. Wijngaards 3b24d845ff - Fix doxygen and pydoc warnings. 2021-02-18 11:39:06 +01:00
Wouter WijngaardsandGitHub bf0a91aa41 Merge pull request #317 from NLnetLabs/zonemd
ZONEMD Zone Verification
2021-02-18 11:17:04 +01:00
W.C.A. Wijngaards d6e55a586c Changelog note for #317
- Merge PR #317: ZONEMD Zone Verification, with RFC 8976 support.
  ZONEMD records are checked for zones loaded as auth-zone,
  with DNSSEC if available.  There is an added option
  zonemd-permissive-mode that makes it log but not fail wrong zones.
  With zonemd-reject-absence for an auth-zone the presence of a
  zonemd can be mandated for specific zones.
2021-02-18 11:16:19 +01:00
W.C.A. Wijngaards 2d27203718 Merge branch 'master' into zonemd 2021-02-18 11:11:50 +01:00
Wouter WijngaardsandGitHub 490d4c26cf Merge pull request #427 from vstinner/fopen
Fix #426: Replace _Py_fopen() with fopen() in pythonmod.c
2021-02-16 11:58:56 +01:00
Victor Stinner 92d01d8265 Fix #426: Replace _Py_fopen() with fopen() in pythonmod.c
The private _Py_fopen() function has been removed in Python 3.10.

Fix build on Python 3.10.
2021-02-16 11:27:52 +01:00
W.C.A. Wijngaards 5943c6f2e3 - Fix to make tests work with support indicators set for iterator. 2021-02-15 14:57:29 +01:00
W.C.A. Wijngaards 74e06cc4b3 - Fix #422: IPv6 fallback issues when IPv6 is not properly
enabled/configured.
2021-02-15 14:40:48 +01:00
W.C.A. Wijngaards c906401597 Merge branch 'master' into zonemd 2021-02-12 17:21:51 +01:00
W.C.A. Wijngaards 48e0d3356a zonemd, review comments, spelling fix. 2021-02-12 10:48:38 +01:00
W.C.A. Wijngaards b7ffa6618c zonemd, review comments, fix no anchor lookup if none. 2021-02-12 09:16:22 +01:00
W.C.A. Wijngaards 8490508559 zonemd, review comments, stop null dnskey, skip dnssec for insecure islands. 2021-02-12 08:33:03 +01:00
W.C.A. Wijngaards 6965cef5e8 zonemd, review comments, check qname for zonemd dnskey lookup. 2021-02-11 17:33:10 +01:00
W.C.A. Wijngaards e0f17c2443 zonemd, review comments, stop callback for a deleted zone. 2021-02-11 17:27:59 +01:00
W.C.A. Wijngaards d3b6e1679c zonemd, review comments, indentation. 2021-02-11 16:05:28 +01:00
W.C.A. Wijngaards 9a972aa5b2 zonemd, review comments, compare list size for rrsigtype add. 2021-02-10 16:38:39 +01:00
W.C.A. Wijngaards 12171e3124 zonemd, review comments, compare list size correctly. 2021-02-10 16:34:24 +01:00
W.C.A. Wijngaards 3d2692d6bc zonemd, review comments, add comments to unit test, scope verbose output. 2021-02-10 15:30:23 +01:00
W.C.A. Wijngaards ee0a65250a Changelog note for PR #420
- Merge PR #420 from dyunwei: DOH not responsing with
  "http2_query_read_done failure" logged.
2021-02-10 11:26:21 +01:00
Wouter WijngaardsandGitHub d0c4ce2dc5 Merge pull request #420 from dyunwei/master
DOH not responsing with "http2_query_read_done failure" logged
2021-02-10 11:25:56 +01:00
yunweiandGitHub 5d5e4579de Merge pull request #1 from NLnetLabs/master
synchronize the code.
2021-02-10 09:03:38 +08:00
W.C.A. Wijngaards e0d426ebb1 - Fix for Python 3.9, no longer use deprecated functions of
PyEval_CallObject (now PyObject_Call), PyEval_InitThreads (now
  none), PyParser_SimpleParseFile (now Py_CompileString).
2021-02-09 10:38:55 +01:00
W.C.A. Wijngaards 450155bfa0 Changelog note for 1.13.1 release and main branch is 1.13.2 in development. 2021-02-09 09:16:23 +01:00
W.C.A. Wijngaards d3b5f287b1 zonemd, fix unit test to allow nonvalidating zone without zonemd with
permissive mode for zonemd.
2021-02-04 16:18:02 +01:00
W.C.A. Wijngaards b7a633fdc0 Merge branch 'master' into zonemd 2021-02-04 16:08:11 +01:00
W.C.A. Wijngaards c365e3ab9a - release 1.13.1rc2 tag on branch-1.13.1 with added changes of 2 feb. 2021-02-04 09:18:40 +01:00
W.C.A. Wijngaards 4693929471 - Fix indentation of root anchor for use by windows install script. 2021-02-02 17:04:29 +01:00
W.C.A. Wijngaards aa8dfe94d3 Fixup to add to LIBS. 2021-02-02 14:52:05 +01:00
W.C.A. Wijngaards 18840665bc And autoconf. 2021-02-02 14:31:05 +01:00
W.C.A. Wijngaards f9a1ac3f0b - Fix windows dependency on libssp.dll because of default stack
protector in mingw.
2021-02-02 14:30:53 +01:00
W.C.A. Wijngaards bc013b66ed - Fix dynlibmod link on rhel8 for -ldl inclusion. 2021-02-02 13:18:18 +01:00
W.C.A. Wijngaards a5a9672dc4 - branch-1.13.1 is created, with release-1.13.1rc1 tag. 2021-02-02 08:48:44 +01:00
George Thessalonikefs 21def26405 - Hide our time traveling abilities. 2021-02-01 17:02:19 +01:00
George Thessalonikefs bb09b649f7 Merge branch 'master' of github.com:NLnetLabs/unbound 2021-02-01 16:59:19 +01:00
George Thessalonikefs a8485d58ca - Attempt to fix NULL keys in the reuse_tcp tree; relates to #411. 2021-02-01 16:57:56 +01:00
W.C.A. Wijngaards 7262a249f1 - Fix for doxygen 1.8.20 compatibility. 2021-01-29 16:34:46 +01:00
W.C.A. Wijngaards 0ea86f6ccb - Fix fwd ancil test post script when not supported. 2021-01-28 11:19:34 +01:00
W.C.A. Wijngaards ad8104bb7c - Fix empty clause warning in edns pass for padding. 2021-01-28 09:15:45 +01:00
W.C.A. Wijngaards 3a19ceaae6 - Fix to use correct type for label count in ipdnametoaddr rpz routine. 2021-01-28 09:14:19 +01:00
W.C.A. Wijngaards cb55b5906a - Fix empty clause warning in config_file nsid parse. 2021-01-28 09:11:46 +01:00
W.C.A. Wijngaards 9e6f8567de - Fix to use correct type for label count in rpz routine. 2021-01-28 09:07:16 +01:00
W.C.A. Wijngaards 9d700e1f85 - Annotate that we ignore the return value of if_indextoname. 2021-01-28 09:04:00 +01:00
W.C.A. Wijngaards 8ad4c9f92a - Fix compile of unbound-dnstap-socket without dnstap installed. 2021-01-26 17:29:22 +01:00
George Thessalonikefs 3124eb052d - Ignore cache blacklisting when trying to reply with expired data from
cache. (#394)
2021-01-26 15:32:50 +01:00
George Thessalonikefs 3b9c7e2826 Changelog entry for:
- Merge PR #355 from noloader: Make ICANN Update CA and DS Trust Anchor
  static data.
2021-01-26 13:19:05 +01:00
George Thessalonikefs 08ca72fffe Merge branch 'noloader-icann-ca-trust-ds' 2021-01-26 13:18:00 +01:00
George Thessalonikefs 5e92836760 Merge branch 'master' of git://github.com/noloader/unbound into noloader-icann-ca-trust-ds 2021-01-26 13:04:55 +01:00
George Thessalonikefs 2925fa46b0 Changelog entry for:
- Merge PR #275 by Roland van Rijswijk-Deij, Add feature to return the
  original instead of a decrementing TTL ('serve-original-ttl').
2021-01-26 13:01:33 +01:00
George Thessalonikefs 515df834a5 Merge branch 'rijswijk-orig_ttl' 2021-01-26 12:58:38 +01:00
George Thessalonikefs 83d9f9d268 Changelog entry for:
- Merge PR #408 from fobser: Prevent a few more yacc clashes.
2021-01-26 12:55:55 +01:00
George Thessalonikefs c18f61a3c4 Merge branch 'fobser-yacc-clashes' 2021-01-26 12:53:55 +01:00
George Thessalonikefs 707eb6108d Merge branch 'yacc-clashes' of https://github.com/fobser/unbound into fobser-yacc-clashes 2021-01-25 20:56:36 +01:00
George Thessalonikefs b7acaaa9b8 - Update example.con.in and add a testcase for PR #275. 2021-01-25 19:26:19 +01:00
George Thessalonikefs f5b7169729 Merge branch 'orig_ttl' of https://github.com/rijswijk/unbound into rijswijk-orig_ttl 2021-01-25 17:39:24 +01:00
Willem TooropandGitHub a565add710 Merge pull request #211 from NLnetLabs/features/padding
Down- and upstream padding a la RFC7830 & RFC8467
2021-01-25 15:14:33 +01:00
Willem Toorop ca2139bf3d Some review nits from George 2021-01-25 15:13:54 +01:00
Willem Toorop 4694323b1c Test some different padding sizes 2021-01-24 20:17:44 +01:00
Willem Toorop efc8022ca4 padding.tdir text in single TXT RR
So the sentences are not re-ordered and the text makes sense!
2021-01-24 18:29:00 +01:00
Willem Toorop 54b84381f4 tdir test for padding option 2021-01-24 18:12:08 +01:00
Roland van Rijswijk-Deij d253db04fd Addressed review comment from @wcawijngaards 2021-01-22 18:56:09 +00:00
Roland van Rijswijk-Deij c4c849d878 Rebase on master 2021-01-22 16:44:56 +00:00
Willem Toorop fc49d145b5 Changelog entry for padding option 2021-01-22 15:14:10 +01:00
Willem Toorop b7864b0c48 Merge branch 'master' into features/padding 2021-01-22 15:13:01 +01:00
Willem Toorop 2a3548e1ef Move NSID Changelog entry to day of merge 2021-01-22 15:10:57 +01:00
W.C.A. Wijngaards dedc1e2340 zonemd, unit test for capitalisation of owner and ns names. 2021-01-22 14:40:21 +01:00
W.C.A. Wijngaards 20ff80c5bb zonemd, fix to detect duplicate zonemd scheme and algo RRs. 2021-01-22 14:36:53 +01:00
W.C.A. Wijngaards 3a6f1ecafa Fixup if brackets. 2021-01-22 13:11:41 +01:00
George Thessalonikefs 63a02f3a87 Merge branch 'negative_soa_ttl' 2021-01-22 12:39:16 +01:00
George Thessalonikefs dc23502abb - Updated Changelog for PR #407. 2021-01-22 12:33:56 +01:00
Willem Toorop 48ecf95108 Merge branch 'master' into features/padding 2021-01-22 10:29:50 +01:00
yunweiandGitHub 0215500261 Update netevent.c
#386
I found the root cause of this issue. r_buffer is r->query_reply.c->buffer, used to fill the reply in the mesh_send_reply function, then call comm_point_send_reply, and then call http2_submit_dns_response to send the DOH response. However, the buffer is not cleared after use. If the query length is greater than the last response length, the next dns query in the same H2 session will encounter an error.
This is bug!!!

Clear the buffer after use.
2021-01-20 14:12:51 +08:00
George Thessalonikefs 38e12229b8 - Feedback for PR #407. 2021-01-19 20:09:34 +01:00
Willem TooropandGitHub 9de4c398e1 Merge pull request #363 from NLnetLabs/features/nsid
Support for RFC5001: DNS Name Server Identifier (NSID) Option
2021-01-19 17:19:48 +01:00
Willem Toorop 68d51317fe rpl tests for nsid 2021-01-19 17:18:26 +01:00
Florian Obser 68d92b7bbb Prevent a few more yacc clashes. 2021-01-19 17:13:00 +01:00
Willem Toorop 7ba51fce24 example.conf.in entry for nsid 2021-01-19 16:18:36 +01:00
George Thessalonikefs 9056613a79 - Fix TTL of SOA record for negative answers (localzone data and
authzone) to be the minimum of the SOA TTL and the SOA.MINIMUM.
2021-01-19 15:55:55 +01:00
Willem Toorop a152c7f907 Merge branch 'master' into features/nsid 2021-01-19 14:21:18 +01:00
W.C.A. Wijngaards f273716b80 - Fix declaration before statement and signed comparison warning in
dns64.
2021-01-18 10:23:01 +01:00
W.C.A. Wijngaards c125fe67bc - Fix #404: DNS query with small edns bufsize fail. 2021-01-18 08:29:52 +01:00
W.C.A. Wijngaards e55f38fa83 Changelog entry for #402.
- Merge #402 from fobser: Implement IPv4-Embedded addresses according
  to RFC6052.
2021-01-15 08:15:54 +01:00
Wouter WijngaardsandGitHub 9a055c2df4 Merge pull request #402 from fobser/dns64
Implement IPv4-Embedded addresses according to RFC6052.
2021-01-15 08:14:58 +01:00
Florian Obser 285a7fdd21 Implement IPv4-Embedded addresses according to RFC6052.
The original algorithm assumed that any prefix length would be valid
and did not skip over bits 64 to 71 and set them to zero.
This means that only dns64 prefixes with length 32 and 96 generated
embedded addresses according to RFC6052, cf. Figure 1 in 2.2.
2021-01-14 19:15:30 +01:00
W.C.A. Wijngaards 4613d2bf04 - Fix for #93: dynlibmodule import library is named libunbound.dll.a. 2021-01-14 16:50:17 +01:00
W.C.A. Wijngaards 5c760a13a4 - rpz trigger, unlock and remove node when rpz is disabled with action override. 2021-01-14 15:31:33 +01:00
W.C.A. Wijngaards 5e00d516fe - fix that testdata/rpz_qname.rpl trigger tests succeed. 2021-01-14 15:31:17 +01:00
W.C.A. Wijngaards 15b46257e1 - fix that testdata/rpz_clientip.rpl trigger tests succeed. 2021-01-14 13:49:42 +01:00
W.C.A. Wijngaards db7413acb6 Merge branch 'magenbluten-rpz' into rpz-triggers 2021-01-14 12:13:24 +01:00
W.C.A. Wijngaards cdb60adcdc Merge branch 'rpz' of https://github.com/magenbluten/unbound into magenbluten-rpz
Conflict fixed for rpz.disabled check added.
2021-01-14 12:11:29 +01:00
W.C.A. Wijngaards 3b82e690ef - Fix for #93: dynlibmodule link fix for Windows. 2021-01-13 14:56:25 +01:00
W.C.A. Wijngaards 5314f63343 Nicer changelog note for #399
- Merge #399 from xiangbao227: The lock of lruhash table should
  unlocked after markdel entry.
2021-01-13 10:10:12 +01:00
W.C.A. Wijngaards 24fd871245 Changelog note for #399
- Merge #399 from xiangbao227: The function rrset_cache_touch can
  touch an entry to the lru while markdelling the entry in
  lruhash_remove.
2021-01-13 10:07:15 +01:00
Wouter WijngaardsandGitHub 7e46204bf7 Merge pull request #399 from xiangbao227/master
I found that in function "lruhash_remove", table was locked at first ,then lru_remove the entry , then unlock the table, and then markdel entry , but in function "rrset_cache_touch" , the entry will be touched to lru again before markdelling entry in function "lruhash_remove". This may lead to core!
2021-01-13 10:05:50 +01:00
xiangbao227 93e5705259 I found that in function lruhash_remove, table was locked at first ,then lru_remove the entry , then unlock the table, and then markdel entry , but in function rrset_cache_touch , the entry will be touched to lru again before markdelling entry in function lruhash_remove. This is a bug! 2021-01-13 10:33:41 +08:00
W.C.A. Wijngaards 4d1d8b4cdd And man page documentation for them. 2021-01-12 13:40:45 +01:00
W.C.A. Wijngaards d1b92a6ce2 - Fix so local zone types always_nodata and always_deny can be used
from the config file.
2021-01-12 13:39:07 +01:00
W.C.A. Wijngaards 3322f631e5 - Fix #397: [Feature request] add new type always_null to local-zone
similar to always_nxdomain.
2021-01-12 13:35:05 +01:00
W.C.A. Wijngaards 64f508fa00 - Fix clang analysis warning. 2021-01-08 11:10:05 +01:00
W.C.A. Wijngaards d9dd7bc36f - Add comment documentation. 2021-01-08 11:01:06 +01:00
W.C.A. Wijngaards 1aa7168c6a - For #391: more double casts in python start time calculation. 2021-01-08 09:55:55 +01:00
W.C.A. Wijngaards ee2545d939 - For #391: fix indentation. 2021-01-08 09:53:52 +01:00
W.C.A. Wijngaards 3e03e2c26d - For #391: use struct timeval* start_time for callback information. 2021-01-08 09:47:46 +01:00
W.C.A. Wijngaards 260837e050 Changelog note for #391
- Merge PR #391 from fhriley: Add start_time to reply callbacks so
  modules can compute the response time.
2021-01-08 09:36:37 +01:00
Wouter WijngaardsandGitHub 48724de155 Merge pull request #391 from fhriley/reply_cb_start_time
Add start_time to reply callbacks so modules can compute the response…
2021-01-08 09:35:07 +01:00
W.C.A. Wijngaards 2e4d64684e - Fix #387: client-subnet-always-forward seems to effectively bypass
any caching?
2021-01-06 13:42:00 +01:00
W.C.A. Wijngaards 752aea8407 Changelog note for #395
- Merge PR #395 from mptre: add missing null check.
2021-01-06 13:19:46 +01:00
Wouter WijngaardsandGitHub d188096a01 Merge pull request #395 from mptre/log-addr-null
add missing null check
2021-01-06 13:19:30 +01:00
Anton Lindqvist 422213c171 add missing null check
I have a unbound forward zone configured on my router for my $DAYJOB.
The address associated with the zone is only accessible when the router
is connected to a VPN. If the VPN connection is absent, trying to
resolve any domain that must be handled by the zone crashes unbound.
Turns out there's a missing NULL check in `comm_point_send_udp_msg()`.
The same routine already has `if (addr) {} else {}` branches so I guess
protecting the call to `log_addr()` using the same conditional is
reasonable

I have also committed the same fix to unbound shipped with OpenBSD[1].

[1] https://marc.info/?l=openbsd-cvs&m=160993335615698&w=2
2021-01-06 12:44:26 +01:00
W.C.A. Wijngaards 44075a06a5 - Fix #379: zone loading over HTTP appears to have buffer issues. 2021-01-06 10:36:23 +01:00
W.C.A. Wijngaards c357e0fea4 Changelog note for #375 and -h output.
- Merge PR #375 by fhriley: Add rpz_enable and rpz_disable commands
  to unbound-control.
2021-01-05 13:43:53 +01:00
Wouter WijngaardsandGitHub 2c1ecb2231 Merge pull request #375 from fhriley/disable-rpz
Add rpz_enable and rpz_disable commands to unbound-control
2021-01-05 13:40:32 +01:00
W.C.A. Wijngaards b788e29265 Fix acx_nlnetlabs.m4 for aclocal 2021-01-05 12:48:27 +01:00
W.C.A. Wijngaards 4c4ca2433c - Fix #385: autoconf 2.70 impacts unbound build 2021-01-05 10:27:13 +01:00
W.C.A. Wijngaards 64cccdb8d5 - iana portlist updated. 2021-01-04 14:18:24 +01:00
W.C.A. Wijngaards 4d51c6b86e - For #376: Fix that comm point event is not double removed or double
added to event map.
2021-01-04 14:05:50 +01:00
Frank Riley e3abd772f7 Add start_time to reply callbacks so modules can compute the response time. 2021-01-01 15:44:21 -07:00
George Thessalonikefs 08968baec1 - Fix error cases when udp-connect is set and send() returns an error
(modified patch from Xin Li @delphij).
2020-12-16 17:11:41 +01:00
Frank Riley 42d764eeda Add rpz_enable and rpz_disable commands to unbound-control. 2020-12-13 12:35:11 -07:00
W.C.A. Wijngaards 811cf6db0c - Fix missing prototypes in the code. 2020-12-11 14:34:39 +01:00
W.C.A. Wijngaards e1c678864d Changelog note for #373
- Merge PR #373 from fobser: Warning: arithmetic on a pointer to void
  is a GNU extension.
2020-12-11 14:07:42 +01:00
Wouter WijngaardsandGitHub 48c038391a Merge pull request #373 from fobser/void-arithmetic
Warning: arithmetic on a pointer to void is a GNU extension.
2020-12-11 14:07:30 +01:00
W.C.A. Wijngaards f09b058776 Changelog note for #335
- Merge PR #335 from fobser: Sprinkle in some static to prevent
  missing prototype warnings.
2020-12-11 14:04:01 +01:00
Wouter WijngaardsandGitHub 29b5b25852 Merge pull request #335 from fobser/static
Sprinkle in some static to prevent missing prototype warnings.
2020-12-11 14:03:46 +01:00
Florian Obser 15e1b16da0 Warning: arithmetic on a pointer to void is a GNU extension. 2020-12-11 14:00:20 +01:00
W.C.A. Wijngaards 7077660932 - Fix to squelch permission denied and other errors from remote host,
they are logged at higher verbosity but not on low verbosity.
2020-12-11 10:30:54 +01:00
W.C.A. Wijngaards a4fc32809c - Fix #371: unbound-control timeout when Unbound is not running. 2020-12-11 09:33:56 +01:00
W.C.A. Wijngaards 1f7d1a00ff Fix for #368: dnstap does not log the DNS message ID for FORWARDER_QUERY 2020-12-10 08:19:07 +01:00
W.C.A. Wijngaards 51e431ada1 doxygen comments fixup 2020-12-09 14:17:02 +01:00
W.C.A. Wijngaards e25f80799a Fix use after free. 2020-12-09 14:13:46 +01:00
W.C.A. Wijngaards 9ea58b5bc0 Fix for tcp outgoing to have local address logged 2020-12-09 14:02:00 +01:00
W.C.A. Wijngaards af96ff157e Fix leak of socket mem on failure and fix if tcp has to wait we
do not know the interface at the time.  Later when it knows the
interface we do not have 'sq' with the zone name.
2020-12-09 13:52:49 +01:00
W.C.A. Wijngaards 2baa748bc7 Use port_if pointer instead of wrong UDP local addr 2020-12-09 12:13:50 +01:00
W.C.A. Wijngaards 6ce577c4d9 Use stored TCP address for callback. 2020-12-09 12:07:16 +01:00
W.C.A. Wijngaards 6bf1293bcd No need for mk_local_addr, can pass the sockaddr structure. 2020-12-09 11:56:35 +01:00
W.C.A. Wijngaards 9272725cdd Use calloc and freeaddrinfo 2020-12-09 11:43:16 +01:00
W.C.A. Wijngaards 7167153db5 configure test for struct sockaddr_in6 sin6_len member 2020-12-09 11:41:07 +01:00
W.C.A. Wijngaards 275f18cc8e Remove useless tcp_read_fd member from struct 2020-12-09 11:37:04 +01:00
W.C.A. Wijngaards 91bec32cdc For TCP store picked outgoing interface and pass it. 2020-12-09 11:34:39 +01:00
W.C.A. Wijngaards 72d3b588ca For the DoH create_http_handler, also pass the socket. 2020-12-09 11:29:57 +01:00
W.C.A. Wijngaards 159bf52384 Fix that it passes the actual UDP address instead of first
and pass NULL to make tcp log compile.
2020-12-09 11:27:33 +01:00
W.C.A. Wijngaards 1f1b93cce6 Fix test code function declaration. 2020-12-09 11:27:14 +01:00
W.C.A. Wijngaards 31cedb47cb Remove unused whitespace, add missing header change, make it compile 2020-12-09 11:13:58 +01:00
W.C.A. Wijngaards bdfa65c6ab Import the patches from the files in the tarball in
issue #365 https://github.com/NLnetLabs/unbound/files/5659923/patches.tar.gz
from iruzanov.  The merge conflicts are fixed, but no changes are made
to the patched code.
2020-12-09 11:00:51 +01:00
W.C.A. Wijngaards b49cc2e667 - iana portlist updated. 2020-12-03 10:27:19 +01:00
W.C.A. Wijngaards e21d38dcb9 - make depend. 2020-12-03 10:26:37 +01:00
W.C.A. Wijngaards 37d751e135 Code repo continues for 1.13.1 in development. 2020-12-03 10:14:14 +01:00
W.C.A. Wijngaards 9eeb95a960 - Fix update, with write event check with streamreuse and fastopen. 2020-12-02 16:17:26 +01:00
W.C.A. Wijngaards 0502ab3026 - Fix for #283: fix stream reuse and tcp fast open. 2020-12-02 15:42:24 +01:00
W.C.A. Wijngaards e049fb303c - Fix on windows to ignore connection failure on UDP, unless verbose. 2020-12-02 11:58:24 +01:00
W.C.A. Wijngaards eb052e1543 - Fix unbound-dnstap-socket to not use log routine from interrupt
handler and not print so frequently when invoked in sequence.
2020-12-02 11:51:54 +01:00
Willem Toorop fb150f9655 Merge branch 'master' into features/nsid 2020-12-02 11:19:32 +01:00
Willem Toorop cbb4575a18 Document existence of option 2020-12-02 10:58:05 +01:00
W.C.A. Wijngaards 16c496bff6 - Fix #356: deadlock when listening tcp. 2020-12-02 10:10:27 +01:00
W.C.A. Wijngaards 1ebf851bf0 - Fix #360: for the additionally reported TCP Fast Open makes TCP
connections fail, in that case we print a hint that this is
  happening with the error in the logs.
2020-12-02 09:51:26 +01:00
Willem Toorop ddb751751c NSID for Unbound 2020-12-01 15:19:17 +01:00
W.C.A. Wijngaards 5906811ff1 - Fix #358: Squelch udp connect 'no route to host' errors on low
verbosity.
2020-12-01 09:09:13 +01:00
W.C.A. Wijngaards 174bb48ae8 Changelog entry for rc tags 1.13.0rc3 and rc4. 2020-11-30 12:52:04 +01:00
W.C.A. Wijngaards e4bdc527ba - Fix assertion failure on double callback when iterator loses
interest in query at head of line that then has the tcp stream
  not kept for reuse.
2020-11-30 09:41:33 +01:00
W.C.A. Wijngaards 56a80fbbf4 - Fix contrib/metrics.awk for FreeBSD awk compatibility. 2020-11-27 15:08:31 +01:00
mb 78bcfdee64 rpz: fix local data lookup for nsdname 2020-11-27 12:22:56 +01:00
mb 842c9bfc41 rpz: cleanups 2020-11-27 10:52:01 +01:00
mb 8fce4ff27a rpz: continue nsdname and minor cleanups 2020-11-27 10:46:54 +01:00
W.C.A. Wijngaards b2894e23a9 - Fix compile warnings in rpz initialization. 2020-11-27 10:11:14 +01:00
mb eba7e1a7c7 rpz: nsdname actions 2020-11-27 10:09:54 +01:00
W.C.A. Wijngaards 67d541d690 - Fix compile warnings for windows. 2020-11-27 10:01:55 +01:00
W.C.A. Wijngaards 8ffdbc2714 - Fix when use free buffer to initialize rbtree for stream reuse. 2020-11-27 09:57:08 +01:00
W.C.A. Wijngaards 11139c1b4e - Fix compile warning for type cast in http2_submit_dns_response. 2020-11-27 09:08:48 +01:00
mb 714d546d1d rpz: add testbound nsdname script (stub) 2020-11-26 12:26:23 +01:00
W.C.A. Wijngaards 3fb0493d3f - Clear readagain upon decommission of pending tcp structure. 2020-11-26 12:23:18 +01:00
mb caaa38f7c5 rpz: strip .rpz-nsdname suffix when inserting trigger 2020-11-26 12:16:33 +01:00
W.C.A. Wijngaards 67a0614db7 - Fix that after failed read, the readagain cannot activate. 2020-11-26 12:12:52 +01:00
mb f78aa90ff1 rpz: nsdname stubs 2020-11-26 11:33:49 +01:00
W.C.A. Wijngaards e9810e1154 - For #352: contrib/metrics.awk for Prometheus style metrics output. 2020-11-26 11:00:48 +01:00
W.C.A. Wijngaards 4a8669612a - Fix to omit UDP receive errors from log, if verbosity low.
These happen because of udp-connect.
2020-11-26 09:39:54 +01:00
W.C.A. Wijngaards f6bf015f90 - tag for the 1.13.0rc2 release. 2020-11-25 14:03:32 +01:00
W.C.A. Wijngaards e50152aa1f - Fix readagain and writeagain callback functions for comm point
cleanup.
2020-11-25 13:46:28 +01:00
W.C.A. Wijngaards d05c259458 - Attempt fix for libevent state in tcp reuse cases after a packet
is written.
2020-11-25 12:12:35 +01:00
W.C.A. Wijngaards a5167e495f - Fix memory leak for edns client tag opcode config element. 2020-11-25 12:04:38 +01:00
W.C.A. Wijngaards 3c2b1fa801 - Remove debug commands from reuse tests. 2020-11-25 12:02:51 +01:00
mb d6a69d77e2 rpz: minor cleanups 2020-11-25 11:45:33 +01:00
W.C.A. Wijngaards 4b644b7965 - Better fix for reuse tree comparison for is-tls sockets. Where
the tree key identity is preserved after cleanup of the TLS state.
2020-11-25 10:22:11 +01:00
W.C.A. Wijngaards 15e8f5c6d4 - Fix udp-connect on FreeBSD, do send calls on connected UDP socket. 2020-11-25 09:55:01 +01:00
W.C.A. Wijngaards 5924a591be - with udp-connect ignore connection refused with UDP timeouts. 2020-11-25 09:41:06 +01:00
Jeffrey Walton 328e8d2294 Use size_t in place of int for length 2020-11-24 19:33:12 -05:00
Jeffrey Walton f44118408b Make ICANN Update CA and DS Trust Key static data 2020-11-24 19:33:12 -05:00
W.C.A. Wijngaards 4e8a1ede3b - Fix padding of struct regional for 32bit systems. 2020-11-24 17:06:54 +01:00
W.C.A. Wijngaards 978d3840dc - Fix crash when TLS connection is closed prematurely, when
reuse tree comparison is not properly identical to insertion.
2020-11-24 16:58:51 +01:00
mb 7acf1a5088 rpz: fix forged response 2020-11-24 16:29:15 +01:00
W.C.A. Wijngaards 6a324a37ca - tag for the 1.13.0rc1 release. 2020-11-24 15:01:44 +01:00
W.C.A. Wijngaards e78957706c - Fix one port unit test for udp-connect. 2020-11-24 14:16:06 +01:00
W.C.A. Wijngaards a69304011a - iana portlist updated. 2020-11-24 13:17:15 +01:00
mb afc73e28d8 rpz: fix forged messages 2020-11-24 12:02:59 +01:00
mb b178cf34b6 rpz: update ext_state in the iterator 2020-11-24 11:33:16 +01:00
mb 126e114d6f rpz: forge responses 2020-11-24 11:25:01 +01:00
mb 354c19f6ac rpz: apply trigger at query time not response time 2020-11-24 09:33:08 +01:00
Wouter Wijngaards 090a4e417d - set version of main branch to 1.13.0 for upcoming release. 2020-11-24 08:28:08 +01:00
Wouter Wijngaards de4e6ad99d Changelog note for #283.
- Merge PR #283 : Stream reuse.  This implements upstream stream
  reuse for performing several queries over the same TCP or TLS
  channel.
2020-11-24 08:23:24 +01:00
Wouter WijngaardsandGitHub a2411361b6 Merge pull request #283 from NLnetLabs/stream-reuse
Stream reuse
2020-11-24 08:21:07 +01:00
Wouter Wijngaards ead06af086 Merge branch 'master' into stream-reuse 2020-11-24 08:20:07 +01:00
George Thessalonikefs f04f7fdf17 Changelog note for #313:
- Merge PR #313 from Ralph Dolmans: Replace edns-client-tag with
  edns-client-string option.
2020-11-23 17:37:46 +01:00
gthessandGitHub db945f018b Merge pull request #313 from NLnetLabs/edns-string
Replace edns-client-tag with edns-client-string option
2020-11-23 17:34:42 +01:00
George Thessalonikefs b0247b6e93 Merge branch 'master' into edns-string 2020-11-23 16:58:30 +01:00
George Thessalonikefs 201b949689 Merge branch 'master' into edns-string 2020-11-23 16:35:58 +01:00
George Thessalonikefs 2d184f7505 - Update manpage. 2020-11-23 16:32:00 +01:00
W.C.A. Wijngaards 62152e0493 Fix writepid for retvalue 0. 2020-11-23 14:17:58 +01:00
W.C.A. Wijngaards 19f8f4d9f9 Further fix for CVE-2020-28935, so the chown is omitted when the pidfile
fails due to a symlink.
2020-11-23 13:48:04 +01:00
W.C.A. Wijngaards ad38783297 - Fix for #303 CVE-2020-28935 : Fix that symlink does not interfere
with chown of pidfile.
2020-11-23 13:42:11 +01:00
W.C.A. Wijngaards 9cc8aa1ddf - Option to toggle udp-connect, default is enabled. 2020-11-23 11:06:53 +01:00
W.C.A. Wijngaards 6b97cb1dd1 stream reuse, up connection reuse time to 60 seconds. 2020-11-23 10:36:22 +01:00
W.C.A. Wijngaards cca128b871 + - Fix #347: IP_DONTFRAG broken on Apple xcode 12.2. 2020-11-23 09:56:01 +01:00
W.C.A. Wijngaards 9423b5b8b2 Merge branch 'master' into stream-reuse 2020-11-23 09:49:26 +01:00
W.C.A. Wijngaards dde9fade26 stream reuse, fix review comments. 2020-11-23 09:46:26 +01:00
W.C.A. Wijngaards 4445d9c5aa stream reuse, fix review comments. 2020-11-23 09:44:56 +01:00
W.C.A. Wijngaards 8143ce6967 stream reuse, review comments. 2020-11-23 09:40:15 +01:00
W.C.A. Wijngaards 6f4c79ab95 stream reuse, fix review comments. 2020-11-23 09:37:26 +01:00
W.C.A. Wijngaards fd94b0bc9b stream reuse, rename ssl_reuse test to tls_reuse test. 2020-11-23 09:35:58 +01:00
W.C.A. Wijngaards 6ded710013 stream reuse, renamed ssl_reuse.tdir to tls_reuse.tdir. 2020-11-23 09:33:28 +01:00
W.C.A. Wijngaards d83b1979c4 stream reuse, debug output with verbose level instead of number. 2020-11-23 09:29:26 +01:00
W.C.A. Wijngaards 097e530c49 Changelog notes for #350 and #351
- Merge #351 from dvzrv: Add AF_NETLINK to set of allowed socket
  address families.
- Fix #350: with the AF_NETLINK permission, to fix 1.12.0 error:
  failed to list interfaces: getifaddrs: Address family not
  supported by protocol.
2020-11-23 08:58:41 +01:00
Wouter WijngaardsandGitHub dbd5ea4f37 Merge pull request #351 from dvzrv/issues/350
Add AF_NETLINK to set of allowed socket address families
2020-11-23 08:57:23 +01:00
David Runge c48f01445e Add AF_NETLINK to set of allowed socket address families
contrib/unbound{,_portable}.service.in:
With the changes introduced in f6a527c25a
it is now necessary to also allow access to the AF_NETLINK socket
address family to be able to get information from interfaces.

Without the AF_NETLINK address family the systemd service errors with:

```
error: failed to list interfaces: getifaddrs: Address family not
supported by protocol
```

Fixes #350
2020-11-21 14:10:39 +01:00
mb f7fb338c95 rpz: continue work on the nsip trigger 2020-11-16 12:42:23 +01:00
mb 07d937f508 rpz: more nsip 2020-11-16 09:49:06 +01:00
mb e27b160acd rpz: stubs for nsip triggers 2020-11-13 14:36:00 +01:00
W.C.A. Wijngaards b891fe113c - Retry for interfaces with unused ports if possible. 2020-11-12 13:36:37 +01:00
W.C.A. Wijngaards 48b40b305a Changelog note. 2020-11-12 12:28:10 +01:00
W.C.A. Wijngaards 26aa550bd2 - Fix to connect() to UDP destinations, default turned on,
this lowers vulnerability to ICMP side channels.
2020-11-12 12:27:41 +01:00
Ralph Dolmans a4342ceb3a Merge branch 'master' into edns-string 2020-11-11 11:38:06 +01:00
Ralph Dolmans 946ed23f73 Merge branch 'master' into edns-string 2020-11-11 11:37:32 +01:00
mb 9149a6d1e4 RPZ: stub nsip testbound scenario 2020-11-11 11:21:54 +01:00
W.C.A. Wijngaards 5385e2e094 - Fix #343: Fail to build --with-libnghttp2 with error: 'SSIZE_MAX'
undeclared.
2020-11-10 15:31:20 +01:00
W.C.A. Wijngaards 7977e1c4cb - Fix memory leak after fix for possible memory leak failure. 2020-11-10 13:51:56 +01:00
W.C.A. Wijngaards 72d7587138 Merge branch 'master' into zonemd 2020-11-10 08:10:27 +01:00
W.C.A. Wijngaards 3926035f30 Changelog note for #341 and layout change.
- Fix #341: fixing a possible memory leak.
2020-11-10 08:07:28 +01:00
Wouter WijngaardsandGitHub 140ab1f701 Merge pull request #341 from ihsinme/patch-1
fixing a possible memory leak.
2020-11-10 08:06:46 +01:00
ihsinmeandGitHub 18226f1c17 fixing a possible memory leak. 2020-11-09 18:41:22 +03:00
mb 667863770f RPZ: refactor clientip to handle multiple rrsets 2020-11-09 15:59:00 +01:00
mb 9b4bbb49b4 RPZ: one more testcase 2020-11-09 12:08:06 +01:00
mb 731afdc924 RPZ: refactor clientip trigger 2020-11-06 13:42:48 +01:00
mb 80205ba133 RPZ: towards client ip trigger and local data action 2020-11-06 12:54:32 +01:00
mb bd0c910830 RPZ: provide rpz-client-ip trigger and actions 2020-11-04 17:00:28 +01:00
mb fc4de71fe0 RPZ: fix for c89 2020-11-03 15:45:26 +01:00
mb 1ab84a1d27 RPZ: testbound: add qname and respip tcp-only examples 2020-11-03 11:03:29 +01:00
mb fb8c5a764d RPZ: provide tcp-only triggers for respip actions 2020-11-03 11:02:36 +01:00
mb dd70c2ef9a RPZ: implement stubs for rpz-tcp-only actions. 2020-11-02 14:21:57 +01:00
W.C.A. Wijngaards e573f55dcd zonemd, unit tests for insecure delegation zones. 2020-10-29 14:59:11 +01:00
W.C.A. Wijngaards cd3d54b504 zonemd, unit test for failed zonemd hash after axfr with chain of trust,
zone is written after axfr, but before check.  But zone is then rejected
after check completes..
2020-10-29 10:13:01 +01:00
W.C.A. Wijngaards 2757e0ff51 zonemd, unit test for failed zonemd hash after axfr, zone is rejected and not
written to file.
2020-10-29 10:00:59 +01:00
W.C.A. Wijngaards 43e32eae33 zonemd, unit test for zonemd from axfr with trust anchor. 2020-10-29 09:55:03 +01:00
W.C.A. Wijngaards 3ab188ea21 zonemd, please doxygen
zonemd, fix clang analyzer warning about null nsec3 salt pointer access.
2020-10-29 08:40:22 +01:00
W.C.A. Wijngaards 7ebb890a4a zonemd, unit test for zonemd from file and trust anchor directly for DNSSEC. 2020-10-28 15:10:14 +01:00
Florian Obser 9fb65e2b9e Sprinkle in some static to prevent missing prototype warnings. 2020-10-28 14:15:23 +01:00
W.C.A. Wijngaards 639a773c39 zonemd, unit test for chain of trust from recursion to check ZONEMD. 2020-10-27 13:44:44 +01:00
W.C.A. Wijngaards d104727c91 - In man page note that tls-cert-bundle is read before permission
drop and chroot.
2020-10-27 09:00:26 +01:00
W.C.A. Wijngaards 94ac072f9b zonemd, zonemd-reject-absence config for an auth-zone rejects the zone if
no ZONEMD is present.
2020-10-26 15:37:43 +01:00
W.C.A. Wijngaards 8e53f0b14f zonemd, unit test with correct title. 2020-10-23 14:40:00 +02:00
W.C.A. Wijngaards 2b9569c7fe zonemd, fix config_get_option for zonemd-permissive-mode and unit test
for zonemd-permissive-mode.
2020-10-23 14:38:57 +02:00
W.C.A. Wijngaards 165b048e07 zonemd, zonemd-permissive-mode: yes logs the failure but does not block
the zone after a ZONEMD verification failure.
2020-10-23 14:33:04 +02:00
W.C.A. Wijngaards caee84d92e zonemd, unit test for unbound-control auth_zone_reload with zonemd. 2020-10-23 12:10:30 +02:00
W.C.A. Wijngaards 89087ae294 zonemd, unbound-control auth_zone_reload errors when ZONEMD fails. 2020-10-23 11:47:00 +02:00
W.C.A. Wijngaards c72ca35f08 unbound-control auth_zone_reload sets zone to nonexpired and
also updates the xfr soa values from the new zonefile contents.
2020-10-23 11:44:28 +02:00
W.C.A. Wijngaards fb5f3f076d zonemd, zonemds are checked when a zone is auth_zone_reload from file,
or reload with unbound-control.
2020-10-23 11:20:08 +02:00
W.C.A. Wijngaards 40e713e121 zonemd, unlock xfr lock for auth zone verify of zonemd for mesh new callback. 2020-10-23 10:14:21 +02:00
W.C.A. Wijngaards 1cb7d5a194 zonemd, unit test for auth zone zonemd axfr
zonemd, zonemds are checked after zone transfer.
2020-10-23 09:12:51 +02:00
W.C.A. Wijngaards f854f4e867 zonemd, test for server start with zonemd from file. 2020-10-22 16:02:37 +02:00
W.C.A. Wijngaards 54d8473ec6 zonemd, pass module stack as function argument. 2020-10-22 13:31:37 +02:00
W.C.A. Wijngaards 6ea1ae17f7 zonemd, fix to harden against failure in pickup zonemd lookups. 2020-10-22 13:20:00 +02:00
W.C.A. Wijngaards e09873e0c8 zonemd, zonemds are checked at start 2020-10-22 12:10:46 +02:00
W.C.A. Wijngaards 5d7e001c63 Merge branch 'master' into zonemd 2020-10-22 09:49:27 +02:00
W.C.A. Wijngaards 4990dae87d - Fix that minimal-responses does not remove addresses from a priming
query response.
2020-10-22 09:26:27 +02:00
W.C.A. Wijngaards ca39cfd6ae - Fix #333: Unbound Segmentation Fault w/ log_info Functions From
Python Mod.
2020-10-22 08:47:40 +02:00
George Thessalonikefs 0272889c44 - Fix #320: potential memory corruption due to size miscomputation upton
custom region alloc init.
2020-10-21 17:44:04 +02:00
George Thessalonikefs 7c39cbc0a9 - Fix #327: net/if.h check fails on some darwin versions; contribution by
Joshua Root.
2020-10-21 16:45:18 +02:00
W.C.A. Wijngaards 4ba45c34ed zonemd, result of dnssec failures includes rrset and dnssec bogus reason. 2020-10-21 16:18:28 +02:00
W.C.A. Wijngaards 92eb12d26b zonemd, unit test remove debug. 2020-10-21 15:59:29 +02:00
W.C.A. Wijngaards 7ac4eb229d zonemd, unit tests for verifying DNSKEY with trust anchor failures. 2020-10-21 15:58:47 +02:00
W.C.A. Wijngaards 3c86bf51de zonemd, unit tests for wrong NSEC RRSIGs. 2020-10-21 15:04:06 +02:00
W.C.A. Wijngaards 58d91646f1 zonemd, unit tests for DNSSEC type bitmaps. 2020-10-21 14:23:44 +02:00
W.C.A. Wijngaards e1d119af7e zonemd, unit tests for wrong DNSSEC signatures. 2020-10-21 13:17:42 +02:00
W.C.A. Wijngaards c32c9a0ae2 zonemd, zonemd unit test in own file. 2020-10-21 12:04:53 +02:00
W.C.A. Wijngaards 1245457967 zonemd, fix that zonemd absence in unsigned zone does not invalidate zone. 2020-10-21 11:56:41 +02:00
W.C.A. Wijngaards e8d29f973d zonemd, fix that dnssec denial does not invalidate zone.
zonemd, unit test of nsec and nsec3 denial.
2020-10-21 11:51:30 +02:00
W.C.A. Wijngaards 2ebc4eae2f Merge branch 'master' into zonemd 2020-10-21 10:59:32 +02:00
W.C.A. Wijngaards ee3f26bb3d Add verbosity to debug occasional missing q1-10.example.net, from timer. 2020-10-21 10:56:51 +02:00
W.C.A. Wijngaards 1e9381f76c Merge branch 'master' into stream-reuse 2020-10-21 10:36:27 +02:00
W.C.A. Wijngaards 725d4822e7 Changelog note for #228
- Merge PR #228 : infra-keep-probing option to probe hosts that are
  down.  Add infra-keep-probing: yes option. Hosts that are down are
  probed more frequently.
  With the option turned on, it probes about every 120 seconds,
  eventually after exponential backoff, and that keeps that way. If
  traffic keeps up for the domain. It probes with one at a time, eg.
  one query is allowed to probe, other queries within that 120 second
  interval are turned away.
2020-10-21 10:35:47 +02:00
Wouter WijngaardsandGitHub 5ec15bc333 Merge pull request #228 from NLnetLabs/infra-keep-probing
infra-keep-probing option to probe hosts that are down
2020-10-21 10:34:40 +02:00
W.C.A. Wijngaards 37354c8927 Merge branch 'master' into infra-keep-probing 2020-10-21 10:13:10 +02:00
W.C.A. Wijngaards 78e9b8949c Merge branch 'master' into stream-reuse
Resolved comm_point_start_listening conflict for socket close.
2020-10-21 09:54:03 +02:00
W.C.A. Wijngaards 2eb39abbaf - Fix that reuse_tcp_close_oldest sets item_on_lru_list to 0.
- Fix to add assertions to reuse_tcp_select_id and unit test.
- Fix that if no tcp buffers then pending tcp query stops.
2020-10-21 09:49:55 +02:00
W.C.A. Wijngaards f675077502 zonemd, unit test improved debug output and unit test dnssec verify zonemd 2020-10-20 16:49:49 +02:00
W.C.A. Wijngaards 89618ff9ba zonemd, unit test more zones. 2020-10-19 16:26:22 +02:00
George Thessalonikefs 6fdc822aa0 - Changelog entry for PR #324: Add modern X.509v3 extensions to
unbound-control TLS certificates, by James Renken.
2020-10-19 15:10:17 +02:00
George Thessalonikefs 736a298eac Merge branch 'master' of github.com:NLnetLabs/unbound 2020-10-19 15:04:15 +02:00
George Thessalonikefs 2527ad1d46 Merge branch 'jprenken-master'; fixes #316. 2020-10-19 15:01:15 +02:00
George Thessalonikefs 50178d764a - Fix for attaching the X509v3 extensions to the client certificate. 2020-10-19 15:00:30 +02:00
W.C.A. Wijngaards 61922ce9da - Clean the fix for out of order TCP processing limits on number
of queries.  It was tested to work.
2020-10-19 13:39:02 +02:00
W.C.A. Wijngaards 531ce9e85c Fixup for clear of tcp handler structure. 2020-10-19 13:36:53 +02:00
W.C.A. Wijngaards 68c57314c4 - Fix to set the tcp handler event toggle flag back to default when
the handler structure is reused.
2020-10-19 12:55:43 +02:00
George Thessalonikefs 59d15ac9cf Merge branch 'master' of https://github.com/jprenken/unbound into jprenken-master 2020-10-19 12:18:55 +02:00
W.C.A. Wijngaards 4a14ef8c3a Merge branch 'master' into zonemd 2020-10-19 11:33:32 +02:00
Ralph Dolmans 8861fb17fa Changelog entry for local-zone out of chunk regional allocation 2020-10-19 11:22:38 +02:00
Ralph DolmansandGitHub a433a25ba3 Merge pull request #329 from NLnetLabs/nochunk-region
local-zone regional allocations outside of chunk
2020-10-19 11:21:30 +02:00
W.C.A. Wijngaards ab9d732796 - Log ip address when http session recv fails, eg. due to tls fail. 2020-10-19 11:06:55 +02:00
W.C.A. Wijngaards ca6e8ec6c2 Unit test for doh downstream notls. 2020-10-19 10:59:41 +02:00
W.C.A. Wijngaards 5cd2d10fe5 - Fix dnstap test to wait for log timer to see if queries are logged. 2020-10-19 10:43:35 +02:00
W.C.A. Wijngaards c8390e390d - Fix python documentation warning on functions.rst inplace_cb_reply. 2020-10-19 10:41:03 +02:00
W.C.A. Wijngaards a3e2bfbb0c - Fix #330: [Feature request] Add unencrypted DNS over HTTPS support.
This adds the option http-notls-downstream: yesno to change that,
  and the dohclient test code has the -n option.
2020-10-19 10:24:03 +02:00
W.C.A. Wijngaards ba074c8bef - Fix memory leak of https port string when reading config. 2020-10-19 10:14:40 +02:00
W.C.A. Wijngaards 46607e7c0c - Fix that http settings have colon in set_option, for
http-endpoint, http-max-streams, http-query-buffer-size,
  http-response-buffer-size, and http-nodelay.
2020-10-19 09:06:33 +02:00
W.C.A. Wijngaards f81d0ac047 - Fix that the out of order TCP processing does not limit the
number of outstanding queries over a connection.
2020-10-16 17:26:58 +02:00
Ralph Dolmans 1d11f470df - local-zone regional allocations outside of chunk to prevent large
chunk per small local-zone allocations.
2020-10-16 17:12:08 +02:00
W.C.A. Wijngaards a525284421 zonemd, remove debug. 2020-10-16 16:15:35 +02:00
W.C.A. Wijngaards ceb0214b7d zonemd, unit tests for dnssec verify 2020-10-16 16:09:13 +02:00
George Thessalonikefs d55084ea9e - Fix that if there are reply callbacks for the given rcode, those
are called per reply and a new message created if that was modified
  by the call.
- Pass the comm_reply information to the inplace_cb_reply* functions
  during the mesh state and update the documentation on that.
2020-10-15 17:17:59 +02:00
W.C.A. Wijngaards 0a238280b9 zonemd, unit test for dnssec verify, implement test. 2020-10-15 12:27:22 +02:00
W.C.A. Wijngaards e6aab488c8 zonemd, fix anchor unlock.
zonemd, unit test for dnssec verify function test harness.
2020-10-15 09:17:57 +02:00
W.C.A. Wijngaards cf6e1b6ea9 Merge branch 'master' into zonemd 2020-10-15 08:34:32 +02:00
W.C.A. Wijngaards edc8f363a7 Changelog note for #326 and changes:
- DoH content length, simplify code, remove declaration after
  statement and fix cast warning.
2020-10-15 08:22:42 +02:00
Wouter WijngaardsandGitHub 7a7d7caf6a Merge pull request #326 from netblue30/master
DoH: implement content-length header field
2020-10-15 08:19:37 +02:00
netblue30 b1a50720e5 DoH: implement content-lenght header field 2020-10-14 11:32:14 -04:00
W.C.A. Wijngaards e35b1dfbd5 zonemd, nsec3 rr iterator is type int, like other nsec3 code. 2020-10-14 14:52:32 +02:00
W.C.A. Wijngaards 42d7cdb7d5 zonemd, region freed, and qstate not used when not in a query, and nsec
and nsec3 bitmap checks.
2020-10-14 14:46:59 +02:00
W.C.A. Wijngaards 890c8deb0f - Free up auth zone parse region after use for lookup of host 2020-10-14 14:20:16 +02:00
W.C.A. Wijngaards f0c19be06f - Fix that if there are on reply callbacks, those are called per
reply and a new message created if that was modified by the call.
2020-10-14 14:03:04 +02:00
W.C.A. Wijngaards a9e13f3590 - Fix that if there are on reply callbacks, those are called per
reply and a new message created if that was modified by the call.
2020-10-14 14:01:47 +02:00
W.C.A. Wijngaards 22e82765f9 zonemd, dnssec verification routines. 2020-10-14 13:34:50 +02:00
W.C.A. Wijngaards 72032a95bb - Fix for python reply callback to see mesh state reply_list member,
it only removes it briefly for the commpoint call so that it does
  not drop it and attempt to modify the reply list during reply.
2020-10-14 10:06:28 +02:00
W.C.A. Wijngaards 79a8db1ee1 - Fix #323: unbound testsuite fails on mock build in systemd-nspawn
if systemd support is build.
2020-10-13 08:28:59 +02:00
James Renken e6c560e5c9 Add modern X.509v3 extensions to unbound-control TLS certificates 2020-10-12 22:06:20 -07:00
W.C.A. Wijngaards efc01c928c Formatting. 2020-10-09 16:47:49 +02:00
W.C.A. Wijngaards 754e6f1349 zonemd, routine to check zonemd hash if present 2020-10-09 16:46:20 +02:00
W.C.A. Wijngaards 0af62aba53 zonemd, defines for scheme and algorithm. 2020-10-09 15:14:27 +02:00
W.C.A. Wijngaards c49a4e60fe zonemd, doxygen comment fix. 2020-10-09 15:05:46 +02:00
W.C.A. Wijngaards 1dc4d7a9f6 zonemd, harden result length for unsupported algo in nettle digest final. 2020-10-09 14:40:26 +02:00
W.C.A. Wijngaards 5e477e8a31 Merge branch 'master' into zonemd 2020-10-09 14:32:24 +02:00
W.C.A. Wijngaards fca884a7e6 - Fix warning in libnss compile, nss_buf2dsa is not used without DSA. 2020-10-09 14:31:55 +02:00
W.C.A. Wijngaards 6cb0c4c61d zonemd, libnss implementation and libnettle implementation. Both succeed
on unit tests.
2020-10-09 14:30:56 +02:00
W.C.A. Wijngaards b20fefb858 zonemd, unit test, reorder test order 2020-10-09 14:03:13 +02:00
W.C.A. Wijngaards 6a8ed4bb15 zonemd, unit test, tests the check routine and reason for failure. 2020-10-09 13:59:44 +02:00
W.C.A. Wijngaards 2f7908b669 zonemd, unit test, note example origins. 2020-10-09 12:20:50 +02:00
W.C.A. Wijngaards cdf6544b46 zonemd, unit test, succeeds at verifying examples of zonemd draft-12. 2020-10-09 12:18:25 +02:00
W.C.A. Wijngaards eb4932a463 zonemd, digest code calls, secalgo openssl sha384 and sha512. 2020-10-09 11:19:31 +02:00
W.C.A. Wijngaards d7e4525829 Merge branch 'master' into zonemd 2020-10-09 09:01:52 +02:00
W.C.A. Wijngaards 795a33c6e5 - Fix dnstap socket and the chroot not applied properly to the dnstap
socket path.
2020-10-09 08:57:23 +02:00
W.C.A. Wijngaards a87f05be7b - Fix #319: potential memory leak on config failure, in rpz config. 2020-10-08 09:11:54 +02:00
W.C.A. Wijngaards ca497815b8 - Tag for 1.12.0 release.
- Current repo is version 1.12.1 in development.
2020-10-08 09:09:55 +02:00
W.C.A. Wijngaards 3163a93121 zonemd, loop over zone and canonicalize data, test call in unit test. 2020-10-06 17:07:24 +02:00
W.C.A. Wijngaards ca31ea7dc8 test rr type parse inputs and print outputs. 2020-10-06 13:38:21 +02:00
W.C.A. Wijngaards db6030dd39 Create branch zonemd
Add RR Type ZONEMD to RR definitions.
2020-10-06 10:48:24 +02:00
W.C.A. Wijngaards 52b04806f4 - Current repo is version 1.12.0 for release. Tag for 1.12.0rc1. 2020-10-01 09:11:22 +02:00
Ralph Dolmans eb799026ff Replace edns-client-tag with edns-client-string option 2020-09-30 23:17:53 +02:00
W.C.A. Wijngaards ea7c5ac392 - Fix double loopexit for unbound-dnstap-socket after sigterm. 2020-09-30 14:55:35 +02:00
W.C.A. Wijngaards 46b3440aea - Fix memory leak of edns tags at libunbound context delete. 2020-09-30 11:43:46 +02:00
W.C.A. Wijngaards a453ab629c - Easier kill of unbound-dnstap-socket tool in test. 2020-09-30 11:38:11 +02:00
W.C.A. Wijngaards bbba236a36 - Fix stream_ssl, ssl_req_order and ssl_req_timeout tests for
alloc check debug output.
2020-09-30 11:29:57 +02:00
W.C.A. Wijngaards ddb82af523 - Add dohclient test executable to gitignore. 2020-09-30 11:21:24 +02:00
W.C.A. Wijngaards a7ae0ade66 - Fix doh tests when not compiled in. 2020-09-30 11:20:33 +02:00
Ralph Dolmans b6d04f500b - DNS Flag Day 2020: change edns-buffer-size default to 1232. 2020-09-29 14:07:38 +02:00
W.C.A. Wijngaards 83200a3431 - Fix unit test for dnstap changes, so that it waits for the timer. 2020-09-29 13:29:24 +02:00
Ralph Dolmans eb8ec9c18b - Use inclusive language in configuration 2020-09-23 14:35:51 +02:00
W.C.A. Wijngaards 3527171397 - Fix to ifdef fptr wlist item for dnstap. 2020-09-23 14:30:31 +02:00
W.C.A. Wijngaards ed6e3c0c66 - Fix #305: only wake up thread when threshold reached. 2020-09-23 13:20:25 +02:00
Ralph Dolmans 7da369e85a - Add edns-client-tag-opcode option 2020-09-23 12:09:48 +02:00
W.C.A. Wijngaards e41daa954e Merge branch 'master' of github.com:NLnetLabs/unbound 2020-09-23 11:14:50 +02:00
W.C.A. Wijngaards 48a56751e9 - Fix #305: dnstap logging significantly affects unbound performance
(regression in 1.11).
2020-09-23 11:13:52 +02:00
Ralph Dolmans 9e9810ab8b - Fix edns-client-tags get_option typo 2020-09-23 10:05:39 +02:00
Ralph DolmansandGitHub 249d5a706b Merge pull request #295 from niftylettuce/patch-1
docs: fixed typo lean > learn
2020-09-21 17:21:04 +02:00
Ralph Dolmans 00fe4b0306 - Fix #304: dnstap logging not recovering after dnstap process restarts 2020-09-21 17:17:30 +02:00
W.C.A. Wijngaards c5f0ec36bb - iana portlist updated. 2020-09-21 11:38:20 +02:00
W.C.A. Wijngaards 1175269bbd - Error message is logged for dynlibmod malloc failures. 2020-09-21 10:20:10 +02:00
W.C.A. Wijngaards 9d78ad6898 - Merge PR #311 by luismerino: Dynlibmod leak. 2020-09-21 10:13:19 +02:00
Wouter WijngaardsandGitHub 8deb912fa9 Merge pull request #311 from luismerino/dynlibmod-leak
Dynlibmod leak
2020-09-21 10:12:19 +02:00
L. Merino 41ab788cab fix: avoid leaking cb_pair in inplace_cb_register_wrapped() 2020-09-19 09:58:38 +02:00
L. Merino 56e0e5b9af fix: return error when malloc fails in inplace_cb_register_wrapped() 2020-09-19 09:58:32 +02:00
W.C.A. Wijngaards 6ea24c5c86 - iana portlist updated. 2020-09-18 13:43:16 +02:00
Ralph DolmansandGitHub 867886800a Merge pull request #255 from NLnetLabs/doh
Add downstream DNS-over-HTTPS support to Unbound
2020-09-18 12:09:24 +02:00
Ralph Dolmans ea90f50ca8 Merge branch 'master' into doh 2020-09-18 12:05:53 +02:00
W.C.A. Wijngaards 2541ccbb1b - Fix that prefer-ip4 and prefer-ip6 can be get and set with
unbound-control, with libunbound and the unbound-checkconf option
  output function.
2020-09-18 09:56:38 +02:00
Ralph Dolmans 4ae823fbc2 Merge branch 'master' into doh 2020-09-16 18:38:51 +02:00
Ralph Dolmans 42a35ac26e - Final round of DoH review feedback processing. 2020-09-16 18:25:02 +02:00
W.C.A. Wijngaards 4cc559d7eb - Spelling fix. 2020-09-15 13:32:30 +02:00
George Thessalonikefs 1a568a1b8c - Reduce unbound verbosity on test; higher during development. 2020-09-15 12:48:01 +02:00
George Thessalonikefs 0ce7769719 - Introduce test for statistics. 2020-09-15 12:45:22 +02:00
W.C.A. Wijngaards 291ac59888 - Remove x file mode on ipset/ipset.c and h files. 2020-09-11 14:08:10 +02:00
Ralph Dolmans a3be2b73b6 Properly handle http_endpoint malloc failure. 2020-09-10 13:05:55 +02:00
Ralph Dolmans 39f6071854 Ignore base64 padding for strings that are supposed to be unpadded. 2020-09-10 12:27:37 +02:00
W.C.A. Wijngaards 82f2ee63c5 - Fix num.expired statistics output. 2020-09-09 11:44:44 +02:00
W.C.A. Wijngaards afbc7bb4fe - Fix #296: systemd nss-lookup.target is reached before unbound can
successfully answer queries. Changed contrib/unbound.service.in.
2020-08-31 11:50:11 +02:00
W.C.A. Wijngaards 47a5dc8cae - Refactor to use sock_strerr shorthand function. 2020-08-31 09:12:01 +02:00
W.C.A. Wijngaards a6dc0743b4 - Merge PR #293: Add missing prototype. Also refactor to use the new
shorthand function to clean up the code.
2020-08-31 08:41:34 +02:00
Wouter WijngaardsandGitHub 01bfd3f207 Merge pull request #293 from fobser/missing-prototype
Add missing prototype.
2020-08-31 08:21:09 +02:00
niftylettuceandGitHub f22ac44f89 docs: fixed typo lean > learn 2020-08-29 20:56:19 -05:00
Florian Obser 2460737490 Add missing prototype. 2020-08-28 17:31:14 +02:00
W.C.A. Wijngaards 12c0cf7cee - Review fix, doxygen and assign null in case of error free. 2020-08-27 15:27:05 +02:00
W.C.A. Wijngaards b5a237424b Please doxygen, quote the characters to stop it from parsing a doxygen command. 2020-08-27 15:12:46 +02:00
W.C.A. Wijngaards f6a527c25a - Similar to NSD PR#113, implement that interface names can be used,
eg. something like interface: eth0 is resolved at server start and
  uses the IP addresses for that named interface.
2020-08-27 14:53:33 +02:00
Ralph Dolmans 852a2e1105 - Add 'DYNLIBMOD_EXTRALIBS' to dohclient in makefile 2020-08-27 12:28:57 +02:00
Ralph Dolmans f5d8861bbf - process review feedback 2020-08-27 12:28:17 +02:00
George Thessalonikefs a912786ca9 - Update documentation in python example code. 2020-08-26 11:59:09 +02:00
W.C.A. Wijngaards 49019ba3a9 Review fix: defense check of qdcount in debug output. 2020-08-25 16:07:25 +02:00
W.C.A. Wijngaards a83fc176cc Review fix: remove unused variables. 2020-08-25 13:16:46 +02:00
W.C.A. Wijngaards aa602fdd0c - Change configure to use EVP_sha256 instead of HMAC_Update for
openssl-3.0.0.
2020-08-24 16:13:42 +02:00
W.C.A. Wijngaards 45d4cbaa42 - Fix to apply chroot to dnstap-socket-path, if chroot is enabled. 2020-08-24 14:55:16 +02:00
W.C.A. Wijngaards 45712de9a2 - Fix that dnstap reconnects do not spam the log with the repeated
attempts.  Attempts on the timer are only logged on high verbosity,
  if they produce a connection failure error.
2020-08-24 09:23:36 +02:00
Ralph Dolmans e6ebabc0cc - Fix stats double count issue (#289). 2020-08-20 17:54:28 +02:00
Ralph Dolmans 8b05dcdf8c - Create and init edns tags data for libunbound. 2020-08-13 14:57:21 +02:00
W.C.A. Wijngaards b75ff25cfd Changelog note.
- Rerun autoconf
2020-08-10 17:43:19 +02:00
W.C.A. Wijngaards 3e86d30a50 Rerun autoconf and autoheader on configure.ac, with libtool 2020-08-10 17:42:41 +02:00
Ralph Dolmans 59a66601f0 Add changlog entry for PR #277. 2020-08-10 17:35:18 +02:00
Ralph Dolmans a6603c94d8 Merge branch 'master' of github.com:NLnetLabs/unbound 2020-08-10 17:32:00 +02:00
Ralph Dolmans 5551bf20e6 Merge branch 'ciz-openssl-3.0' 2020-08-10 17:31:42 +02:00
Ralph Dolmans 31f81adadb - Check for existence 'EVP_MAC_CTX_set_params' function (openssl >=
3.0.0-alpha5)
2020-08-10 17:29:06 +02:00
W.C.A. Wijngaards a3f95d3358 - Fix #287: doc typo: "Additionaly". 2020-08-10 08:15:06 +02:00
Ralph Dolmans afd49e897f Merge branch 'openssl-3.0' of https://github.com/ciz/unbound into ciz-openssl-3.0 2020-08-06 17:27:27 +02:00
W.C.A. Wijngaards f35293caba Changelog note for #246 and #284
- Merge PR #284 and Fix #246: Remove DLV entirely from Unbound.
  The DLV has been decommisioned and in unbound 1.5.4, in 2015, there
  was advise to stop using it.  The current code base does not contain
  DLV code any more.  The use of dlv options displays a warning.
2020-08-06 14:23:33 +02:00
Wouter WijngaardsandGitHub 8fd489ea69 Merge pull request #284 from NLnetLabs/dlv-removal
DLV removal
2020-08-06 14:21:19 +02:00
W.C.A. Wijngaards 2fade6f970 Merge branch 'master' into dlv-removal 2020-08-06 14:20:42 +02:00
W.C.A. Wijngaards 022a716e5b dlv removal, remove DLV reference from unused use in test case. 2020-08-06 14:18:16 +02:00
W.C.A. Wijngaards 4ec55910c4 dlv removal, free unused variable. 2020-08-06 08:14:14 +02:00
W.C.A. Wijngaards 50091d49ea - contrib/aaaa-filter-iterator.patch file renewed diff content to
apply cleanly to the current coderepo for the current code version.
2020-08-05 16:33:48 +02:00
Ralph Dolmans ce0b39007d - Changelog entry for EDNS client tag functionality 2020-08-05 16:10:10 +02:00
Ralph DolmansandGitHub 74ec8a758b Merge pull request #272 from NLnetLabs/edns-client-tag
Add EDNS client tag functionality
2020-08-05 16:07:49 +02:00
Ralph Dolmans 70c8d09edd - Process EDNS client tag review feedback 2020-08-05 15:56:45 +02:00
W.C.A. Wijngaards 8f2b9b461b dlv removal, remove DLV references from man page and pythonmod interface. 2020-08-05 10:25:56 +02:00
W.C.A. Wijngaards dd59521e52 dlv removal, remove from comments and unused code in iterator and validator 2020-08-04 17:17:48 +02:00
George Thessalonikefs ded7fdafb3 - Merge PR #280, Make tvOS & watchOS checks verify
truthiness as well as definedness, by Felipe Gasper (fixes #279).
2020-08-04 16:38:40 +02:00
George Thessalonikefs 74c1d5b3f5 Merge branch 'issue_279_have_fork_macos' of https://github.com/FGasper/unbound into FGasper-issue_279_have_fork_macos 2020-08-04 16:33:33 +02:00
George Thessalonikefs 764a0dc765 - Improve error log message when inserting rpz RR. 2020-08-04 12:49:43 +02:00
W.C.A. Wijngaards f78f6a3b29 dlv removal, remove from tests and validator state machine 2020-08-04 09:15:45 +02:00
W.C.A. Wijngaards c0c722cd97 DLV removal 2020-08-04 09:05:09 +02:00
W.C.A. Wijngaards 4770359384 Merge branch 'master' into stream-reuse 2020-08-04 08:45:15 +02:00
W.C.A. Wijngaards 6983189528 Merge branch 'master' into infra-keep-probing 2020-08-04 08:45:04 +02:00
W.C.A. Wijngaards fc55345dcb - Fix mini_event.h on OpenBSD cannot find fd_set. 2020-08-04 08:14:25 +02:00
Felipe Gasper 9bc30967d2 Make tvOS & watchOS checks verify truthiness as well as definedness. 2020-08-03 14:38:47 -04:00
Vitezslav Cizek 61100b6463 net_help: Rename EVP_MAC_set_ctx_params to EVP_MAC_CTX_set_params
This fixes build with OpenSSL 3.0.0 Alpha 5.
EVP_MAC_set_ctx_params got renamed back to EVP_MAC_CTX_set_params
in https://github.com/openssl/openssl/pull/12186
2020-07-31 14:48:44 +02:00
W.C.A. Wijngaards d684bee4b0 stream reuse, move drop in tcp_reuse test to timeout section of test. 2020-07-31 09:32:19 +02:00
W.C.A. Wijngaards 2f9050dde8 Merge branch 'master' into stream-reuse 2020-07-31 09:11:35 +02:00
W.C.A. Wijngaards 1cfa21f23d Merge branch 'master' into infra-keep-probing 2020-07-31 09:11:20 +02:00
W.C.A. Wijngaards e855d5779a - Fix doxygen comment for no ssl for tls session ticket key callback
routine.
2020-07-31 09:10:40 +02:00
W.C.A. Wijngaards d973b756a0 stream reuse, disable debug in test 2020-07-30 17:52:57 +02:00
W.C.A. Wijngaards 1116bf6400 stream reuse, add tls test for stream reuse. 2020-07-30 17:51:49 +02:00
W.C.A. Wijngaards 7a211e5a07 stream reuse, fix tls close by upstream after timeout write event handling. 2020-07-30 17:51:13 +02:00
W.C.A. Wijngaards 12d880ad47 stream reuse, add a test for close by upstream server after timeout. 2020-07-30 16:41:28 +02:00
Ubuntu f95dce8e34 Rebase on master 2020-07-29 16:02:16 +00:00
Ubuntu 027884aad2 Disable enforcing of min/max TTL when serving original TTL 2020-07-29 15:52:58 +00:00
Ubuntu 21f175b1ac Adjust semantics of TTL adjustment after feedback from @wcawijngaards 2020-07-29 15:27:15 +00:00
Ubuntu 506dad946b Ensure packet_rrset_data is always initialised to zero upon allocation 2020-07-29 15:26:42 +00:00
W.C.A. Wijngaards 444681af9d stream reuse, defensible wait add and debug log with details for requeue. 2020-07-27 17:12:23 +02:00
W.C.A. Wijngaards 2932d530c1 stream reuse, send queries one by one when upstream refuses multiple queries,
by closing the connection.
2020-07-27 16:59:46 +02:00
Ralph Dolmans 200e22ceea Merge branch 'master' into edns-client-tag 2020-07-27 15:54:58 +02:00
Ralph Dolmans fa892b2456 - Add EDNS client tag test 2020-07-27 15:54:43 +02:00
W.C.A. Wijngaards 3b7b7adffc Merge branch 'master' into stream-reuse 2020-07-27 13:16:55 +02:00
W.C.A. Wijngaards 75be0d3e14 Merge branch 'master' into infra-keep-probing 2020-07-27 13:16:39 +02:00
George Thessalonikefs 69f0adf83b - Merge PR #268, draft-ietf-dnsop-serve-stale-10 has become RFC 8767 on
March 2020, by and0x000.
2020-07-27 13:11:46 +02:00
George Thessalonikefs 4231883480 Merge branch 'master' of https://github.com/and0x000/unbound into and0x000-master 2020-07-27 13:07:19 +02:00
W.C.A. Wijngaards e4b702ef4f Changelog note for PR #270
- Merge PR #270 from cgzones: munin plugin: always exit 0 in autoconf
2020-07-27 13:02:47 +02:00
Wouter WijngaardsandGitHub 5db73977d8 Merge pull request #270 from cgzones/munin
munin plugin: always exit 0 in autoconf
2020-07-27 13:02:30 +02:00
Ralph Dolmans 04ab1c9c87 Merge branch 'master' of github.com:NLnetLabs/unbound 2020-07-27 12:14:41 +02:00
Ralph Dolmans 4bd97633a1 - Merge PR #269, Fix python module len() implementations, by Torbjörn Lönnemark 2020-07-27 12:14:08 +02:00
Ralph DolmansandGitHub 5184c91e9c Merge pull request #269 from tobbez/python-fix-len
Fix python module len() implementations
2020-07-27 12:12:31 +02:00
W.C.A. Wijngaards d201a11a67 - branch now named 1.11.1. 1.11.0rc1 became the 1.11.0 release. 2020-07-27 12:10:28 +02:00
Ralph Dolmans 2fe398f4bf EDNS client tags - insert configured tags into tree 2020-07-24 16:00:13 +02:00
Ralph Dolmans 64806a0d14 Add edns-client-tag configuration option 2020-07-24 14:52:04 +02:00
Ralph Dolmans 16029281a8 Start of EDNS client tags implementation. 2020-07-23 17:17:44 +02:00
Christian Göttsche c6ff5558de munin plugin: always exit 0 in autoconf
The autoconf operation should always exit 0, also in case the answer in "no",
see https://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#autoconf
2020-07-23 16:04:26 +02:00
W.C.A. Wijngaards 0d77f9af6c stream reuse, test with connection drops. 2020-07-23 10:29:36 +02:00
W.C.A. Wijngaards fc55a4b8ce stream reuse, test with a list of outstanding queries to the upstream server. 2020-07-23 10:18:17 +02:00
W.C.A. Wijngaards 72f8871e61 stream reuse, test timeout and simultaneous queries. 2020-07-22 15:40:17 +02:00
W.C.A. Wijngaards f1c4a4d515 stream reuse, fix cleanup with streams in the connection table. 2020-07-22 15:20:58 +02:00
W.C.A. Wijngaards 2d20edb39f stream reuse, free up elements that are connected in outside network delete. 2020-07-22 10:30:50 +02:00
W.C.A. Wijngaards 8b43b94b22 Merge branch 'master' into stream-reuse 2020-07-22 09:53:57 +02:00
W.C.A. Wijngaards 63b92ea1e8 Merge branch 'master' into infra-keep-probing 2020-07-22 09:53:30 +02:00
Torbjörn Lönnemark 9af8080f2b Fix python module len() implementations
They were all missing the 'self.' prefix when accessing the 'obj'
instance variable, causing the following exception when attempting to
call len() on (for example) a ReplyInfo_RRSet:

  File "/usr/lib/python3.7/site-packages/unboundmodule.py", line 377, in __len__
    def __len__(self): return obj.rrset_count
NameError: name 'obj' is not defined
2020-07-22 03:13:00 +02:00
and0x000 dd0b55250b draft-ietf-dnsop-serve-stale-10 has become RFC 8767 on March 2020 2020-07-20 18:10:21 +02:00
W.C.A. Wijngaards 753487ff7f - branch now named 1.11.0 and 1.11.0rc1 tag. 2020-07-20 13:02:09 +02:00
W.C.A. Wijngaards c8ff4f55e7 - Fix contrib/fastrpz.patch to apply cleanly. It fixes for changes
due to added libdynmod, but it does not compile, it conflicts with
  new rpz code.
2020-07-20 11:05:28 +02:00
W.C.A. Wijngaards 6a13b51bed - Fix contrib/fastrpz.patch to apply cleanly. 2020-07-20 10:55:13 +02:00
W.C.A. Wijngaards 477bb1a6ff - Fix contrib/fastrpz.patch to apply cleanly. 2020-07-20 10:53:30 +02:00
W.C.A. Wijngaards 53ecdfc0b5 - Fix streamtcp to print packet data to stdout. This makes the
stdout and stderr not mix together lines, when parsing its output.
2020-07-20 10:34:40 +02:00
W.C.A. Wijngaards b7b5952c3a - Fix lock dependency cycle in rpz zone config setup. 2020-07-17 17:15:55 +02:00
W.C.A. Wijngaards 7d4445c03d - Fix libnettle compile for session ticket key callback function
changes.
2020-07-17 16:53:52 +02:00
Ralph Dolmans 3a21617c62 Merge branch 'jcourreges-align-cmsg-buffers' 2020-07-17 13:07:49 +02:00
Ralph Dolmans 14a0433470 - Merge PR #234 - Ensure proper alignment of cmsg buffers by Jérémie
Courrèges-Anglas.
- Fix PR #234 log_assert sizeof to use union buffer.
2020-07-17 13:07:03 +02:00
Ralph Dolmans 7d364f1111 Merge branch 'align-cmsg-buffers' of https://github.com/jcourreges/unbound into jcourreges-align-cmsg-buffers 2020-07-17 13:01:44 +02:00
W.C.A. Wijngaards 3d1383bed3 Merge branch 'master' into infra-keep-probing 2020-07-16 16:00:06 +02:00
W.C.A. Wijngaards a9c8da5cfb Merge branch 'master' into stream-reuse 2020-07-16 15:58:20 +02:00
W.C.A. Wijngaards 2902ee133b - Fix unused variable warning for clang analyzer. 2020-07-16 15:41:25 +02:00
W.C.A. Wijngaards 84adade86c - Fix check conf test for referencing installation paths. 2020-07-16 14:47:15 +02:00
W.C.A. Wijngaards ff5d0ce327 Merge branch 'master' into stream-reuse 2020-07-16 14:13:24 +02:00
George Thessalonikefs 8876751ed1 - Changelog entry for PR #265; include-toplevel. 2020-07-16 13:01:28 +02:00
gthessandGitHub 7b0c2c5e5d Merge pull request #265 from NLnetLabs/include-toplevel
Introduce include-toplevel configuration option; closes #161.
2020-07-16 12:57:42 +02:00
George Thessalonikefs 833ab1aab3 Merge branch 'master' into include-toplevel 2020-07-16 12:53:29 +02:00
Ralph Dolmans b953cd9aa0 Change unbound-dnstap-socket void cast for unused parameter 2020-07-16 12:31:30 +02:00
Ralph Dolmans d75f58d659 - Add changelog entry for bidirectional frame streams support. 2020-07-16 11:45:10 +02:00
Ralph DolmansandGitHub fc86347578 Merge pull request #264 from NLnetLabs/fstrm-bidi
Bidirectional frame streams support
2020-07-16 11:42:29 +02:00
Ralph Dolmans 6ca79ff727 correct byte count in comment 2020-07-16 10:54:18 +02:00
Ralph Dolmans 889b979a0e remove unused define 2020-07-15 23:01:13 +02:00
Ubuntu ec6fde611c Cleaned up adjustment in message encoding, fixes spurious negative TTLs 2020-07-15 15:36:06 +00:00
Ralph Dolmans 7189ba715d dnstap log message typo fix 2020-07-15 17:33:48 +02:00
Ralph Dolmans b280527e3e Log dnstap connection close due to unknown content type. 2020-07-15 17:31:18 +02:00
Ralph Dolmans e7cc57ceae - Ignore unknown frame streams control fields. 2020-07-15 17:16:14 +02:00
Ubuntu b5b79e3a36 Add feature to serve original TTLs rather than decrementing ones 2020-07-15 15:15:45 +00:00
Ralph Dolmans db3ac2335c - Handle SSL_ERROR_WANT_WRITE on SSL_read for negotiation
- Close connection when receiving overly large frame
2020-07-15 15:49:42 +02:00
George Thessalonikefs 7f802b07ef Merge branch 'master' into include-toplevel 2020-07-15 15:17:48 +02:00
Ralph Dolmans c00a5d0723 Add maximum to received frame streams frames. 2020-07-14 14:29:09 +02:00
Ralph Dolmans d4bcfbe996 Merge branch 'master' into fstrm-bidi 2020-07-13 17:30:36 +02:00
Ralph Dolmans 9cebc13150 - Add option to send DNSTAP messages over bidirectional frame streams 2020-07-13 17:28:50 +02:00
W.C.A. Wijngaards a7776a15e5 stream reuse, make reuse possible straight away after first query to address. 2020-07-13 16:11:52 +02:00
W.C.A. Wijngaards b71695e8bb stream reuse, update lru when reuse elements are used with lru touch routine. 2020-07-13 15:59:23 +02:00
W.C.A. Wijngaards 766005a356 stream reuse, in callbacks, removed whitespace. 2020-07-13 15:45:16 +02:00
W.C.A. Wijngaards 19a35fb839 stream reuse, write and read again if more data can go over the channel,
this amortizes the event loop mechanism for busy channels, for performance.
2020-07-13 15:16:59 +02:00
W.C.A. Wijngaards 9914b7216b stream reuse, remove debug output 2020-07-10 16:06:17 +02:00
W.C.A. Wijngaards 7a69ff4182 fix that ssl_handle_it() uses tcp_is_reading in tcp_write_and_read mode.
fix that netevent tcp_write_and_read mode does not close due to error from
assert that not both write and read happen at the same time.
2020-07-10 15:37:30 +02:00
W.C.A. Wijngaards e431676457 stream reuse, fix bad id in reply errors. 2020-07-10 15:13:16 +02:00
W.C.A. Wijngaards 46a364be8e stream reuse, neater code for tree by id and use callback routine for timer. 2020-07-09 16:50:57 +02:00
W.C.A. Wijngaards ad6fa1eb45 stream reuse, comment improved 2020-07-09 16:37:40 +02:00
W.C.A. Wijngaards d87774c3c6 stream reuse, fix decommission to first remove from tree and then do the
callbacks and then delete the element.
2020-07-09 16:34:48 +02:00
W.C.A. Wijngaards 79f315f480 stream reuse, fix double callback and double delete, items are in the tree. 2020-07-09 15:47:24 +02:00
W.C.A. Wijngaards 8201d1422b stream reuse, fix to put id number in waiting tcp packet. 2020-07-09 15:35:32 +02:00
W.C.A. Wijngaards b1ea8273f0 stream reuse, fix to not keep stream when it is in error and closed.
stream reuse, fix to stop listening on the fd before rw mode change.
stream reuse, fix waiting tcp id value stored before tree insert.
stream reuse, fix to not double delete pend.query.
2020-07-09 14:29:56 +02:00
W.C.A. Wijngaards 4e44e8663d stream reuse, fix to return key pointer from reuse_tcp_by_id_find. 2020-07-09 14:06:21 +02:00
W.C.A. Wijngaards 9b583d2331 stream reuse, the id for pending stored in waiting_tcp structure, because
there can be multiple messages waiting for reply.
2020-07-09 13:58:44 +02:00
W.C.A. Wijngaards 734a248284 stream reuse, check incoming messages from rbtree in outnet_tcp_cb when
read a reply, and call that callback and remove that entry.
2020-07-09 13:49:36 +02:00
W.C.A. Wijngaards e95edd3d36 debug prints in verbose output. 2020-07-09 13:41:50 +02:00
W.C.A. Wijngaards ccc9e0749c stream reuse toggle write and read to only read mode when write is done.
tcp callback from stream read without entry linked.
2020-07-09 13:41:03 +02:00
W.C.A. Wijngaards d89a45d1e1 in outnet_tcptimer: pick up callbacks and clean the struct pending for
use again in tcp_free list; then perform the callbacks in a cleaner state
for reentry into the outside network code.  Delete callbacks afterwards.
2020-07-09 10:28:47 +02:00
W.C.A. Wijngaards 80f21f48c5 Merge branch 'master' into stream-reuse 2020-07-09 08:55:19 +02:00
W.C.A. Wijngaards abe7a01bf5 Merge branch 'master' into infra-keep-probing 2020-07-09 08:55:01 +02:00
W.C.A. Wijngaards e99b5046eb - Fix to use SSL_CTX_set_tlsext_ticket_key_evp_cb in OpenSSL
3.0.0-alpha4.
- Longer keys for the test set, this avoids weak crypto errors.
2020-07-08 16:22:39 +02:00
W.C.A. Wijngaards ff50993f36 - Fix add missing DSA header, for compilation without deprecated
OpenSSL APIs.
2020-07-08 11:43:50 +02:00
W.C.A. Wijngaards d84529cc0e - Review fixes for checkconf #259 change. 2020-07-07 10:18:56 +02:00
W.C.A. Wijngaards 4d009e19fc - Fix #259: Fix unbound-checkconf does not check view existence.
unbound-checkconf checks access-control-view, access-control-tags,
  access-control-tag-actions and access-control-tag-datas.
- Fix offset of error printout for access-control-tag-datas.
2020-07-07 09:00:04 +02:00
W.C.A. Wijngaards 233c14a476 - run_vm cleanup better and removes trailing slash on single argument. 2020-07-06 11:33:07 +02:00
W.C.A. Wijngaards 06d33f61c1 - Fix tcp req info drop due to size call into mesh accounting
removal of mesh state during mesh send reply.
2020-06-30 17:22:43 +02:00
W.C.A. Wijngaards 52774b6b20 - Review fix for number of detached states due to use of variable
after end of loop.
2020-06-30 16:35:48 +02:00
W.C.A. Wijngaards 84b0207956 - Fix for mesh accounting when rpz decides to drop a reply with a
tcp stream waiting for it.
2020-06-30 16:20:09 +02:00
W.C.A. Wijngaards 6f0c2956ac - Also move reply list clean for mesh callbacks to the scrip callback
can see the reply_info.
- Fix for mesh accounting if the reply list already empty to begin
  with.
2020-06-30 15:48:11 +02:00
W.C.A. Wijngaards 8ac054733b - Move reply list clean for serve expired mesh callback to after
the reply is sent, so that script callbacks have reply_info.
2020-06-30 13:41:26 +02:00
W.C.A. Wijngaards cfe009a31c tcp read and write handling of write events in netevent for tcp and ssl. 2020-06-26 16:05:15 +02:00
W.C.A. Wijngaards 64c8d18814 in tcp write callback routine dont reset read byte count if write and read.
in tcp write callback and write and read and write is done perform callback.
tcp connection is selected to not toggle readwrite and give closed callback.
2020-06-26 10:54:13 +02:00
W.C.A. Wijngaards d033ce6c23 tcp callback function refactor, split read and timeout event setup, leave
unused queries that are already sent to track their reply on the query
pipeline, when serviced query is deleted deal with the write wait list,
2020-06-25 17:23:46 +02:00
W.C.A. Wijngaards dfb6d32189 outnet_tcp_cb: add assertion and return when write packets done is handled. 2020-06-25 16:29:37 +02:00
W.C.A. Wijngaards cbcbd5fa07 pending_tcp_query: cleaner comments. 2020-06-25 16:22:43 +02:00
W.C.A. Wijngaards c32c43f9f2 for tcp use_free_buffer write straight away on reuse connection, if possible 2020-06-25 16:11:46 +02:00
W.C.A. Wijngaards 34c063701e in outside_network.c: also log messages that end up on the waiting list.
with dnstap.
for tcp use_free_buffer reuse existing entry if second wait entry on the
same addr as the other waiting.
2020-06-25 16:05:25 +02:00
W.C.A. Wijngaards 39a50f30a3 tcp callback handle timeout event for read and reuse keepalive. 2020-06-25 14:26:29 +02:00
W.C.A. Wijngaards 5f5cdd3be1 comm point write and read structure members. 2020-06-25 13:06:21 +02:00
Ralph Dolmans 70b270925d - Add http-response-buffer-size test 2020-06-24 16:31:51 +02:00
W.C.A. Wijngaards 4aaccef8f2 fix testcode for added function whitelist item. 2020-06-24 16:31:10 +02:00
W.C.A. Wijngaards 75da272afe reuse tcp id_cmp function. clear list and tree after delete. clear when
decommisioned. callbacks when closed for lru space, and when closed because
not kept open.
2020-06-24 16:28:42 +02:00
Ralph Dolmans d9cdb924ad Add DoH endpoint configuration test 2020-06-24 15:34:50 +02:00
Ralph Dolmans 941559c2b7 dohclient memory leak fix 2020-06-24 15:09:05 +02:00
Ralph Dolmans 2e66809c65 - Add dohclient, for use in tests 2020-06-24 14:59:56 +02:00
Ralph Dolmans 740da89578 Merge branch 'master' into doh 2020-06-24 14:18:47 +02:00
Ralph Dolmans 0fbfce4c99 - Add DoH tests 2020-06-24 14:04:34 +02:00
W.C.A. Wijngaards dd096ccd22 Merge branch 'master' into stream-reuse 2020-06-24 13:39:13 +02:00
W.C.A. Wijngaards 445a066cbe Merge branch 'master' into infra-keep-probing 2020-06-24 13:38:56 +02:00
W.C.A. Wijngaards 2a90e8fa1e - doxygen file comments for dynlibmodule. 2020-06-24 13:37:43 +02:00
W.C.A. Wijngaards be1182c3db - iana portlist updated. 2020-06-24 13:33:47 +02:00
W.C.A. Wijngaards 4fe2122890 Merge branch 'master' into infra-keep-probing
Remade yacc and lex files.
2020-06-24 13:21:14 +02:00
W.C.A. Wijngaards 658e5f1553 Merge branch 'master' into stream-reuse 2020-06-24 12:57:50 +02:00
W.C.A. Wijngaards 04d805b0eb reuse tcp lookup with correct address as key. 2020-06-24 12:57:15 +02:00
W.C.A. Wijngaards 8ca34be36a fix reuse tcp crash, use addr in reuse struct, free leaked tcp entries. 2020-06-24 10:09:49 +02:00
W.C.A. Wijngaards 6f9310173d Fix grammar. 2020-06-23 17:32:33 +02:00
W.C.A. Wijngaards c809bb9ece tcp reuse timeout event cleanup and callbacks. 2020-06-23 15:29:40 +02:00
W.C.A. Wijngaards d96e718f80 fix crash on cleanup. 2020-06-19 18:04:12 +02:00
W.C.A. Wijngaards 0e0c57734a fix uninit after malloc for on_tcp_waiting_list. 2020-06-19 17:40:45 +02:00
W.C.A. Wijngaards 4b6e41e3de fix documentation for waiting_tcp pkt NULL setting. 2020-06-19 17:37:23 +02:00
W.C.A. Wijngaards a1babfff1e add bool if on tcp waiting list, so that pkt can be stored.
remove pkt args from outnet_tcp_take_into_use, use w.pkt.
2020-06-19 17:31:36 +02:00
W.C.A. Wijngaards 5203954068 - Fix display of event loop method with libev. 2020-06-17 14:32:57 +02:00
W.C.A. Wijngaards 6e0756e819 - Fix default explanation in man page for qname-minimisation-strict. 2020-06-17 08:20:52 +02:00
W.C.A. Wijngaards a695ba447c set timeout to wait for reuse
add comm_point indicator for write events for reuse stream writes.
2020-06-09 16:15:03 +02:00
W.C.A. Wijngaards d8b7b5ee27 fix to set pending pointer in reuse tcp structure
fix debug output of reuse tcp and test leak of process
2020-06-09 09:14:01 +02:00
W.C.A. Wijngaards c053513cbd - Mention tls name possible when tls is enabled for stub-addr in the
man page.
2020-06-08 08:35:10 +02:00
W.C.A. Wijngaards fd723aed27 tcp connection is stored and picked up for reuse
fix that comm_point_start_listening does not close the same fd that is started.
2020-06-03 17:24:26 +02:00
W.C.A. Wijngaards 7cc6a89e21 fix spare id random selection. 2020-06-03 14:23:06 +02:00
W.C.A. Wijngaards 150e1b0491 spare id random selection better. 2020-06-03 14:03:34 +02:00
W.C.A. Wijngaards 0f3c638193 find reuse find tcp loop code for multiple connections to the same destination
find spare id value in reused connection.
2020-06-03 12:10:31 +02:00
W.C.A. Wijngaards 7b46067029 add test for tcp reuse 2020-06-03 10:01:51 +02:00
W.C.A. Wijngaards d9afcae346 add debug printout 2020-06-03 09:38:02 +02:00
George Thessalonikefs 062f7b7ba2 - Changelog entry for PR #241. 2020-05-27 18:25:29 +02:00
gthessandGitHub 90d556d650 Merge pull request #241 from edmonds/edmonds/libunbound.pc/do-not-use-requires
contrib/libunbound.pc.in: Do not use "Requires:"
2020-05-27 18:21:05 +02:00
W.C.A. Wijngaards d1904bd509 tree key addr 2020-05-26 16:27:45 +02:00
W.C.A. Wijngaards aad363ddd1 rename next,prev to lru_next,lru_prev for clarity. 2020-05-26 13:41:07 +02:00
W.C.A. Wijngaards 1a6cc6e5dc fixup lru list presence boolean. 2020-05-26 08:46:36 +02:00
Robert Edmonds c93b4b3158 contrib/libunbound.pc.in: Do not use "Requires:"
This commit updates contrib/libunbound.pc.in to remove the "Requires:"
directive and move its contents to "Requires.private:".

The pkg-config manpage documents the Requires/Libs fields as follows:

   Requires:
          This is a comma-separated list of packages that are required  by
          your package. Flags from dependent packages will be merged in to
          the flags reported for your package. Optionally, you can specify
          the  version  of the required package (using the operators =, <,
          >, >=, <=); specifying a version allows  pkg-config  to  perform
          extra  sanity  checks. You may only mention the same package one
          time on the Requires: line. If the version of a package  is  un‐
          specified, any version will be used with no checking.

   Requires.private:
          A list of packages required by this package. The difference from
          Requires is that the packages listed under Requires.private  are
          not  taken into account when a flag list is computed for dynami‐
          cally linked executable (i.e., when --static was not specified).
          In  the  situation where each .pc file corresponds to a library,
          Requires.private shall be used exclusively to specify the depen‐
          dencies between the libraries.

   Libs:  This  line  should give the link flags specific to your package.
          Don't add any flags for required packages; pkg-config  will  add
          those automatically.

   Libs.private:
          This line should list any private libraries in use.  Private li‐
          braries are libraries which are not  exposed  through  your  li‐
          brary,  but  are needed in the case of static linking. This dif‐
          fers from Requires.private in that it references libraries  that
          do not have package files installed.

In other words:

1) "Requires:" should specify the name of .pc packages that are required
to be installed to compile and dynamically link against libunbound. This
corresponds to needing the -dev (or -devel) package containing the .pc
file to be installed on the system. Since libunbound's header files
actually do not have any includes on any other library's headers, the
"Requires:" directive should be empty.

2) "Requires.private:" specifies the name of .pc packages that
correspond to libraries that are required to be installed to statically
link against libunbound. E.g., if libunbound.a has undefined symbols
event_* that are in libevent.a, statically linking against libunbound.a
requires statically linking libevent.a, and because libevent has a .pc
file, this means "libevent" should appear in libunbound.pc's
"Requires.private:" directive.

3) "Libs:" specifies the link flags needed to link against libunbound,
only, not including any dependencies.

4) "Libs.private:" specifies the link flags needed to statically link
against libraries that libunbound depends on that do not have .pc files.
I think it's possible for unbound's build system to actually declare
link flags under "Libs.private:" for some libraries that do have .pc
files (e.g. libcrypto/-lcrypto, libssl/-lssl, for OpenSSL) but in
practice this appears to be harmless.

Given #1 above that libunbound does not have any header dependencies
against any other packages it does not appear that "Requires:" is needed
at all. See https://bugs.debian.org/958331 for an example of a bug
report that this causes. We should not need to install the nettle-dev
package only for building binaries that compile against the libunbound
headers and link against the libunbound library.
2020-05-25 17:58:37 -04:00
George Thessalonikefs 21cd836e82 - Update contrib/aaaa-filter-iterator.patch for the recent
generate_sub_request() change and to apply cleanly.
2020-05-25 11:49:48 +02:00
George Thessalonikefs 8af3d73b9b - Fix for integer overflow when printing RDF_TYPE_TIME. 2020-05-21 22:48:57 +02:00
W.C.A. Wijngaards a83f5d7260 Merge branch 'master' into stream-reuse 2020-05-20 15:39:50 +02:00
W.C.A. Wijngaards f37242566b - For PR #93: unit test for dynlib module. 2020-05-19 15:49:08 +02:00
W.C.A. Wijngaards 711c0548f0 - For PR #93: windows compile warnings removal
- windows compile warnings removal for ip dscp option code.
2020-05-19 14:36:57 +02:00
W.C.A. Wijngaards a1d4e151ee - Release 1.10.1 is 1.10.0 with fixes, code repository continues,
including those fixes, towards the next release.  Configure has
  version 1.10.2 version number in it.
2020-05-19 10:29:37 +02:00
W.C.A. Wijngaards ba0f382eee - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
  used to make Unbound unresponsive.
2020-05-19 10:27:27 +02:00
W.C.A. Wijngaards 4ccac696ca - For PR #93: fix link of other executables for dynlibmod dependency. 2020-05-18 17:26:01 +02:00
W.C.A. Wijngaards a238f35d7d - For PR #93: man page spelling reference fix. 2020-05-18 10:22:00 +02:00
W.C.A. Wijngaards a77ebed550 - For PR #93: checkconf allows python dynlib in module-config, for
a couple cases.
2020-05-18 10:18:28 +02:00
W.C.A. Wijngaards 84e95d6c68 - For PR #93: checkconf allow multiple dynlib in module-config, for
a couple cases.
2020-05-18 10:16:40 +02:00
W.C.A. Wijngaards 01db6c365c - For PR #93: dynlibmod can handle reloads and deinit and inits again,
with dlclose and dlopen of the library again.  Also for multiple
  modules.  Fix memory leak by not closing dlopened content.  Fix
  to allow one dynlibmod instance by unbound-checkconf.
2020-05-18 10:11:16 +02:00
W.C.A. Wijngaards 510e79a053 - For PR #93: Fix warnings for dynlibmodule. 2020-05-15 16:42:45 +02:00
W.C.A. Wijngaards 2c8ebe6206 - Fixed conflicts for PR #93 and make configure, yacc, lex. 2020-05-15 14:55:36 +02:00
W.C.A. Wijngaards 80308880d2 Merge branch 'PMunch-master' 2020-05-15 14:53:39 +02:00
W.C.A. Wijngaards edcef18274 Merge branch 'master' of git://github.com/PMunch/unbound into PMunch-master
Fixed conflicts in Makefile.in and configparser.y
2020-05-15 14:52:53 +02:00
Ralph Dolmans 99fd6cf711 - Cache ECS answers with longest scope of CNAME chain. 2020-05-15 13:13:49 +02:00
Ralph Dolmans 605e6c9bda add dohclient to makefile 2020-05-15 09:52:15 +02:00
Ralph Dolmans 4fc7b434d7 - Document new DoH configuration options. 2020-05-13 13:05:40 +02:00
Ralph Dolmans 8fc2320b5c - Add mem.http.query_buffer and mem.http.response_buffer stats
- Add configurable limits for http-query-buffer-size and
  http-response-buffer-size
- Make http endpoint, max_streams, and TCP_NODELAY for HTTP sockets
  configurable.
2020-05-12 18:12:19 +02:00
Jeremie Courreges-Anglas 8175161059 Ensure proper alignment of cmsg buffers
The cmsg macros expect a control message buffer to be aligned like
a struct cmsghdr.  The current layout around those stack-allocated
buffers probably provides the required alignment (usually 4 bytes).
Use a union to enforce proper alignment, in case future changes modify
the stack layout.

Spotted when chasing an unrelated bug with Otto Moerbeek (@omoerbeek).
2020-05-10 17:23:33 +02:00
Ralph Dolmans 6cc761f6b2 - Add base64 decode unit test 2020-05-08 14:19:44 +02:00
Ralph Dolmans 723980fe77 - Add query.num.https counter 2020-05-08 12:14:17 +02:00
Ralph Dolmans e7601870cc Merge branch 'master' into doh 2020-05-07 17:12:26 +02:00
Ralph Dolmans 8dae5d9f81 - Add DNS-over-HTTPS support 2020-05-07 16:36:26 +02:00
George Thessalonikefs 1bd4dbf302 - New include directive 'include-toplevel:'. It closes the previous
clause (if any) and requires that all included files explicitly
  start a clause.
2020-04-29 11:23:12 +02:00
George Thessalonikefs a269db3828 - Explicitly use 'rrset-roundrobin: no' for test cases. 2020-04-22 19:27:20 +02:00
W.C.A. Wijngaards 055f5e68a3 Add infra-keep-probing: yes option. Hosts that are down are probed more
frequently.
2020-04-22 16:29:06 +02:00
George Thessalonikefs 584c2cf804 - Fix tests for new rrset-roundrobin default. 2020-04-21 22:02:56 +02:00
W.C.A. Wijngaards 6320776b25 Changelog note for PR #225
- Merge #225 from akhait: KSK-2010 has been revoked. It removes the
  KSK-2010 from the default list in unbound-anchor, now that the
  revocation period is over.  KSK-2017 is the only trust anchor in
  the shipped default now.
2020-04-21 15:11:02 +02:00
Wouter WijngaardsandGitHub d8bd6e2281 Merge pull request #225 from akhait/master
KSK-2010 has been revoked
2020-04-21 15:09:29 +02:00
Anna Khaitovich 201c158377 KSK-2010 has been revoked 2020-04-21 13:40:24 +02:00
George Thessalonikefs 226d66ca92 - Change default value for 'rrset-roundrobin' to yes. 2020-04-21 12:58:48 +02:00
W.C.A. Wijngaards cee3098e87 - Remove unneeded was_mesh_reply check. 2020-04-20 15:35:45 +02:00
W.C.A. Wijngaards 00323b71d7 - Fix for count of reply states in the mesh. 2020-04-20 14:24:05 +02:00
W.C.A. Wijngaards 5151190dbc Fix that it is --enable-rpath, for #222. 2020-04-20 10:08:08 +02:00
W.C.A. Wijngaards 52ebdd85da - Fix #222: --with-rpath, fails to rpath python lib. 2020-04-20 10:04:34 +02:00
George Thessalonikefs 0c10453546 - Document SNI support in unbound-anchor.8.in. 2020-04-17 11:47:36 +02:00
George Thessalonikefs a4dcd5eb91 - Update Changelog for PR #221. 2020-04-17 11:41:47 +02:00
gthessandGitHub 334498d9b9 Merge pull request #221 from NLnetLabs/more-SNI
More SNI support on TLS
2020-04-17 11:37:47 +02:00
George Thessalonikefs d2055b83d8 - Enable SNI by default in unbound-anchor. 2020-04-17 11:33:12 +02:00
George Thessalonikefs 1db2ab678d Revert "- Remove SNI support from unbound-anchor; TLS is used only for"
This reverts commit 9d197eb110.

Server-side software may use SNI to pick the correct virtual host.
2020-04-17 11:27:39 +02:00
George Thessalonikefs 9d197eb110 - Remove SNI support from unbound-anchor; TLS is used only for
encryption and not validation.
2020-04-17 10:42:58 +02:00
George Thessalonikefs e430e95d30 - Add SNI support on more TLS connections (fixes #193).
- Add SNI support to unbound-anchor.
2020-04-16 14:39:05 +02:00
George Thessalonikefs e18ab07c62 - Add doxygen documentation for DSCP. 2020-04-16 13:58:35 +02:00
W.C.A. Wijngaards 963cfb58be - Fix for posix shell syntax for trap in run_msg.sh test script. 2020-04-16 13:17:33 +02:00
W.C.A. Wijngaards 3cd288a9f2 - Fix for posix shell syntax for trap in nsd-control-setup. 2020-04-16 13:14:50 +02:00
W.C.A. Wijngaards 2193d06af6 Merge branch 'master' of github.com:NLnetLabs/unbound 2020-04-16 11:48:53 +02:00
W.C.A. Wijngaards eed157d36e - Fix help return code in unbound-control-setup script. 2020-04-16 11:47:27 +02:00
George Thessalonikefs 8a87fc6ae7 - Fix #220: auth-zone section in config may lead to segfault. 2020-04-15 17:57:02 +02:00
Willem Toorop 2c8a91c2f9 pad-queries default yes 2020-04-14 08:52:51 +02:00
Willem Toorop 60e53d36b7 Merge branch 'master' into features/padding 2020-04-14 08:28:41 +02:00
W.C.A. Wijngaards c7f1d2d889 - Merge PR #214 from gearnode: unbound-control-setup recreate
certificates.  With the -r option the certificates are created
  again, without it, only the files that do not exist are created.
2020-04-07 13:49:25 +02:00
Wouter WijngaardsandGitHub c9bae13502 Merge pull request #214 from gearnode/idempotent-nsd-unbound-setup
unbound-control-setup recreate certificates
2020-04-07 13:48:54 +02:00
Gearnode 22ab255231 fix unbound-control-setup is not idempotent 2020-04-07 13:19:36 +02:00
Ralph Dolmans 03a37d1ff6 - Keep track of number of timeouts. Use this counter to determine if capsforid
fallback should be started.
2020-04-06 18:00:06 +02:00
George Thessalonikefs 33a2613a49 - More documentation for redis-expire-records option. 2020-04-06 13:46:45 +02:00
Willem Toorop 551e476a17 Merge branch 'master' into features/padding 2020-04-02 18:54:18 +02:00
Willem Toorop 4f78b37c61 Down- and upstream padding a la RFC7830 & RFC8467 2020-04-02 18:34:03 +02:00
George Thessalonikefs a601fd6d3c Merge branch 'Talkabout-redis-expire-records' 2020-04-01 17:24:07 +02:00
George Thessalonikefs 557a309f9d - Changes for PR #206 (formatting and remade lex and yacc output). 2020-04-01 17:14:58 +02:00
George Thessalonikefs 20aa782ce5 Merge branch 'master' of https://github.com/Talkabout/unbound into Talkabout-redis-expire-records 2020-04-01 16:04:48 +02:00
Talkabout e7b45298c1 changed init logic of redis backend as per review request 2020-04-01 13:32:13 +02:00
Talkabout c25eb2c4c8 implemented review feedback
renamed option from 'redis-set-ttl' to 'redis-expire-records'
2020-03-31 23:10:45 +02:00
Talkabout b130a8b459 added option 'redis-set-ttl' to define whether ttl should be added to redis records
added check for redis command 'setex' when initializing redis connection
updated documentation
minor improvements to previous changes
2020-03-31 12:47:13 +02:00
W.C.A. Wijngaards 94e92b197a - Merge PR #208: Fix uncached CLIENT_RESPONSE'es on stateful
transports.
2020-03-30 14:55:00 +02:00
Wouter WijngaardsandGitHub 5cb93eb7e1 Merge pull request #208 from NLnetLabs/bugfix/dnstap-client-response-on-stateful-transports
Fix uncached CLIENT_RESPONSE'es on stateful transports
2020-03-30 14:54:31 +02:00
Willem Toorop af0bd5b0b4 Send tcp_req_info->spool_buffer as dnstap CLIENT_RESPONSE
When tcp_req_info exists. This fixes that dnstap CLIENT_RESPONSE messages did not contain the response message when answering on statful transport for uncached responses.
2020-03-30 12:19:17 +02:00
Willem Toorop 9d9eee8402 Fix uncached CLIENT_RESPONSE'es on stateful transports
Because repinfo->c->buffer does not contain the response when the it did not came from cache.
Only after tcp_req_info_send_reply is called, is the response on the buffer which is used to fill the dnstap protobuf's.
2020-03-30 11:39:07 +02:00
W.C.A. Wijngaards 65e7be5190 nroff fix for dash. 2020-03-30 10:29:15 +02:00
W.C.A. Wijngaards e9e2871f18 - Merge PR #207: Clarify if-automatic listens on 0.0.0.0 and :: 2020-03-30 10:27:44 +02:00
Wouter WijngaardsandGitHub 4e5c23d969 Merge pull request #207 from NLnetLabs/maintenance/if-transparent-doc
Clarify if-automatic listens on 0.0.0.0 and ::
2020-03-30 10:27:14 +02:00
Willem Toorop d8dcee4c71 Clarify if-automatic listens on 0.0.0.0 and :: 2020-03-30 10:07:25 +02:00
Talkabout fa0623a9b5 honor 'server_expired_ttl' in redis 2020-03-29 23:53:01 +02:00
Talkabout f66a519dff Merge branch 'master' of https://github.com/Talkabout/unbound 2020-03-29 15:23:13 +02:00
Talkabout 1ec02f7229 added logic for redis to honor ttl when serve_expired is not enabled 2020-03-29 15:22:10 +02:00
W.C.A. Wijngaards 8dc35cfce3 Changelog note for PR #203.
- Merge PR #203 from noloader: Update README-Travis.md with current
  procedures.
2020-03-27 16:07:03 +01:00
Wouter WijngaardsandGitHub 2ace7f0c58 Merge pull request #203 from noloader/master
Update README-Travis.md with current procedures
2020-03-27 16:06:31 +01:00
Ralph Dolmans 51593d47ac Make unbound-control error returned on missing domain name more user friendly. 2020-03-27 11:27:12 +01:00
Jeffrey Walton 2902e4ab5f Update README-Travis.md with current procedures 2020-03-26 19:57:58 -04:00
Ralph Dolmans e4eb76a5f3 - Fix RPZ concurrency issue when using auth_zone_reload. 2020-03-26 19:11:57 +01:00
George Thessalonikefs 40ed82f522 Changelog entry for #201
- Merge PR #201 from noloader: Fix OpenSSL cross-compaile warnings.
2020-03-25 14:10:27 +01:00
George Thessalonikefs ce87858c78 Merge branch 'noloader-android' 2020-03-25 13:59:51 +01:00
George Thessalonikefs 042ba77c63 - Keep 'arm64-v8a' support for Travis android builds. 2020-03-25 13:58:57 +01:00
Jeffrey Walton c228e0ac16 Fix OpenSSL corss-compaile warning
warning: '__ANDROID_API__' macro redefined
2020-03-25 05:00:35 -04:00
W.C.A. Wijngaards 2889be5e90 - Travis fix for ios by omitting tools from install. 2020-03-24 10:23:00 +01:00
W.C.A. Wijngaards 7459b1dceb - Fixes for #200 : example.conf note and set_value for ip-dscp. 2020-03-24 09:36:27 +01:00
W.C.A. Wijngaards bcdc13514a - Fixes on #200. and rerun autoconf. 2020-03-24 09:32:04 +01:00
W.C.A. Wijngaards 311f163aed Changelog for #200 and bison, flex regenerate.
- Merge PR #200 from yarikk: add ip-dscp option to specify the DSCP
  tag for outgoing packets.
2020-03-24 09:25:05 +01:00
Wouter WijngaardsandGitHub a96a7a6a20 Merge pull request #200 from yarikk/ipdiffserv
add ip-dscp option to specify the DSCP tag for outgoing packets
2020-03-24 09:24:16 +01:00
Yaroslav KandYaroslav Kolomiiets cfddbcb5be add setting IP DiffServ Codepoint (DSCP, previously TOS) on sockets 2020-03-23 19:37:43 +00:00
Yaroslav KandYaroslav Kolomiiets c0118410a2 add ip-dscp configuration option for setting IP DiffServ codepoint (DSCP, previously TOS) on sockets 2020-03-23 19:37:43 +00:00
W.C.A. Wijngaards cca5cfc88f - Fix compile on Solaris for unbound-checkconf. 2020-03-23 17:26:06 +01:00
George Thessalonikefs ce7fd591c6 - Changelog note for PR #198: Declare lz_enter_rr_into_zone() static,
it's only used in this file, by fobser.
2020-03-20 13:06:43 +01:00
gthessandGitHub 1d9108fdbc Merge pull request #198 from fobser/missing_prototype
Declare lz_enter_rr_into_zone() static, it's only used in this file.
2020-03-20 13:04:09 +01:00
W.C.A. Wijngaards e8aab3f3f4 Changelog note for #197.
- Merge PR #197 from fobser: Make log_ident_revert_to_default() a
  proper prototype.
2020-03-20 11:54:57 +01:00
Wouter WijngaardsandGitHub c262e1f892 Merge pull request #197 from fobser/proper_prototype
Make log_ident_revert_to_default() a proper prototype.
2020-03-20 11:54:39 +01:00
Florian Obser 1a81965748 Declare lz_enter_rr_into_zone() static, it's only used in this file.
Pointed out by clang with -Wmissing-prototypes
2020-03-20 11:53:13 +01:00
Florian Obser bdd245ff7d Make log_ident_revert_to_default() a proper prototype.
Pointed out by clang with -Wstrict-prototypes.
2020-03-20 11:44:38 +01:00
Ralph Dolmans 7fa2b19389 - Fix .travis.yml error, missing 'env' option. 2020-03-19 18:11:22 +01:00
Ralph Dolmans 5f7d73ae88 - Merge PR#194: Add libevent testing to Travis, by Jeffrey Walton. 2020-03-19 17:59:08 +01:00
Ralph Dolmans f9b814c06a Merge branch 'noloader-libevent' 2020-03-19 17:58:01 +01:00
Ralph Dolmans 1cf77d4255 Merge branch 'libevent' of https://github.com/noloader/unbound into noloader-libevent 2020-03-19 17:57:35 +01:00
Ralph Dolmans 3cf6c3f7ca Merge branch 'fobser-kernel-random-port' 2020-03-19 17:38:09 +01:00
Ralph Dolmans d0ee8c1cbd Add changelog entries for PR#134. 2020-03-19 17:37:27 +01:00
Ralph Dolmans 4504dd3737 - Log warning when using outgoing-port-permit and outgoing-port-avoid
while explicit port randomisation is disabled.
2020-03-19 17:34:46 +01:00
Ralph Dolmans 87474563ff Merge branch 'kernel-random-port' of https://github.com/fobser/unbound into fobser-kernel-random-port 2020-03-19 15:48:12 +01:00
Ralph Dolmans 2c03028fa3 - Fix #158: open tls-session-ticket-keys as binary, for Windows. By Daisuke
HIGASHI.
2020-03-19 14:00:33 +01:00
Ralph Dolmans 68eab24db7 Merge branch 'noloader-ios' 2020-03-19 10:55:55 +01:00
Ralph Dolmans acfa55713c - Merge PR#191: Update iOS testing on Travis, by Jeffrey Walton. 2020-03-19 10:55:39 +01:00
Jeffrey Walton dafe849c5b Add libevent testing to Travis 2020-03-17 12:33:08 -04:00
Jeffrey Walton 20dbd6339e Sync with upstream 2020-03-17 06:32:13 -04:00
W.C.A. Wijngaards e4268663e6 - Fix #192: In the unbound-checkconf tool, the module config of
dns64 subnetcache respip validator iterator is whitelisted, it was
  reported it seems to work.
2020-03-16 09:44:38 +01:00
Wouter Wijngaards 59fe188954 - Fix compile of test tools without protobuf. 2020-03-12 10:49:24 +01:00
Ralph Dolmans 28e6c86e61 - Add check to make sure RPZ records are subdomain of configured zone origin. 2020-03-11 17:37:50 +01:00
George Thessalonikefs 67b4ab2c90 - Changelog entry for (Fix #189, Merge PR #190). 2020-03-11 11:50:38 +01:00
gthessandGitHub 68044510e5 Merge pull request #190 from noloader/netbsd
Fix NetBSD compile (GH #189)
2020-03-11 11:45:16 +01:00
W.C.A. Wijngaards 50bc604586 Changelog for #188 and configure script created. Removed unneeded whitespace. 2020-03-11 08:41:56 +01:00
W.C.A. Wijngaards 39c18add57 Fix #188: unbound-control.c:882:6: error: 'execlp' is unavailable: not available on tvOS 2020-03-11 08:39:48 +01:00
Jeffrey Walton 6ab0db6e25 Fix NetBSD compile (GH #189) 2020-03-11 03:35:28 -04:00
George Thessalonikefs 10e5ab2c5f Merge branch 'noloader-makefile' 2020-03-06 12:01:05 +01:00
George Thessalonikefs 730aa097f8 - Changelog note for PR #186: Fix unrecognized 'echo -n' option on OS X,
by noloader.
2020-03-06 11:59:13 +01:00
Jeffrey Walton 171740222c Fix unrecognized 'echo -n' option on OS X
Also see https://github.com/NLnetLabs/unbound/issues/183.
This PR also updates a few typos in README-Travis.md, and expands the discussion of PKG_CONFIG_PATH for those who are not familiar with it.
2020-03-05 14:53:08 -05:00
W.C.A. Wijngaards 93c92eeabb Fix changelog note, it is #182, not #184. 2020-03-05 17:03:28 +01:00
W.C.A. Wijngaards b8540e1e70 Changelog note for #184.
- Fix PR #184 from noloader: Add iOS testing to Travis.
2020-03-05 17:02:20 +01:00
Wouter WijngaardsandGitHub a29a61529c Merge pull request #182 from noloader/ios
Add iOS testing to Travis
2020-03-05 17:01:59 +01:00
Jeffrey Walton 135fdd5839 Add iOS testing to Travis 2020-03-05 06:44:13 -05:00
Ralph Dolmans cd6bb00f2c - Update README-Travis.md (from PR #179), by Jeffrey Walton. 2020-03-04 12:02:10 +01:00
George Thessalonikefs a1b2261b7b - Merge PR #180 from noloader: Avoid calling exit in Travis script. 2020-03-04 10:25:04 +01:00
gthessandGitHub 1e48e73222 Merge pull request #181 from noloader/openssl-pie
Fix OpenSSL -pie warning on Android
2020-03-04 10:22:23 +01:00
W.C.A. Wijngaards 779d65208e Changelog note for PR#180 .
- Merge PR#180 from noloader: Avoid calling exit in Travis script.
2020-03-04 08:18:00 +01:00
Wouter WijngaardsandGitHub ee9fd34d1f Merge pull request #180 from noloader/travis
Avoid calling exit in Travis script
2020-03-04 08:17:39 +01:00
Jeffrey Walton a53c452f25 Test OpenSSL -pie changes
See https://github.com/openssl/openssl/issues/11237
2020-03-03 16:25:25 -05:00
Jeffrey Walton fc2d2459af Avoid calling exit in Travis script
The Travis docs state it should not be done. Blame Jeffrey Walton. Sorry about that.
2020-03-03 14:01:06 -05:00
George Thessalonikefs 114d650d32 - Upgrade config.guess(2020-01-01) and config.sub(2020-01-01). 2020-03-03 18:29:11 +01:00
George Thessalonikefs 0c51af0fb4 - Make contrib/android/install_openssl.sh Code of Conduct compliant. 2020-03-02 16:12:51 +01:00
George Thessalonikefs e756724f86 Merge branch 'noloader-android' 2020-03-02 15:22:19 +01:00
George Thessalonikefs f4eaf6c0ff - Merge PR #174: Add Android to Travis testing, by noloader.
- Move android build scripts to contrib/ and allow android tests to fail.
2020-03-02 15:17:59 +01:00
George Thessalonikefs e67d4c99d6 Merge branch 'master' of https://github.com/noloader/unbound into noloader-android 2020-03-02 14:46:04 +01:00
Ralph Dolmans 26f057d668 Merge branch 'noloader-openssl' 2020-03-02 14:14:25 +01:00
Ralph Dolmans 868ce6372d - Add github reference in changelog (Fix #175, Merge PR #176) 2020-03-02 14:13:20 +01:00
Ralph Dolmans 90040b24ce - Fix link error when OpenSSL is configured with no-engine, thanks noloader. 2020-03-02 14:06:10 +01:00
W.C.A. Wijngaards 4207b58700 - Fix #177: dnstap does not build on macOS. 2020-03-02 13:33:34 +01:00
Willem Toorop d4dcdba07e Cleanup nettle_ecc_point when verifying for ...
... ECDSA256 with libnettle
2020-03-02 12:27:45 +01:00
Ralph Dolmans 75a2a05c7c Merge branch 'openssl' of https://github.com/noloader/unbound into noloader-openssl 2020-03-02 12:23:38 +01:00
George Thessalonikefs c5897dc058 - Fix compiler warning in dns64/dns64.c. 2020-03-02 11:52:33 +01:00
Jeffrey Walton 05041f9cff Add Android to Travis testing. 2020-03-01 09:28:26 -05:00
Jeffrey Walton f5f83bc025 Fix link error when OpenSSL is configured with no-engine (GH #175) 2020-02-29 19:27:44 -05:00
W.C.A. Wijngaards 93189d3083 Changelog note for PR #164 and text for release explanation.
- Merge PR #164: Framestreams, this branch implements dnstap
  unidirectional connectivity in unbound. This has a number of
  new features.

  The dependency on libfstrm is removed. The fstrm protocol code
  resides in dnstap/dnstap_fstrm.h and dnstap/dnstap_fstrm.c. This
  contains a brief definition of what unbound needs.

  The make unbound-dnstap-socket builds a debug tool,
  unbound-dnstap-socket. It can listen, accept multiple DNSTAP
  streams and print information. Commandline options control it.

  Unbound can reconnect if the unix domain socket file socket is
  closed. This uses exponential backoff after which it uses a
  one second timer to throttle cpu down. There is also support
  to use TCP and TLS for connecting to the log server. There
  are new config options to turn them on, in the dnstap section
  in the man page and example config file. dnstap-ip with IP
  address of server for TCP or TLS use. dnstap-tls to turn
  on TLS. And dnstap-tls-server-name, dnstap-tls-cert-bundle,
  dnstap-tls-client-key-file and dnstap-tls-client-cert-file
  to configure the certificates for server authentication and
  client authentication, or leave at "" to not use that.
2020-02-28 15:23:54 +01:00
Wouter WijngaardsandGitHub 1c3f0293fd Merge pull request #164 from NLnetLabs/framestreams
Framestreams
2020-02-28 15:19:09 +01:00
W.C.A. Wijngaards 614ed2717b Merge branch 'master' into framestreams
Fixed bison and flex conflicts by regenerating the files.
2020-02-28 14:31:24 +01:00
Ralph Dolmans 8f1cb41725 Merge PR #172: Add IBM s390x arch for testing, by noloader. 2020-02-28 11:42:17 +01:00
Ralph Dolmans 81de07e208 Merge branch 'noloader-master' 2020-02-28 11:40:48 +01:00
Ralph Dolmans b42a21d419 Merge branch 'master' of https://github.com/noloader/unbound into noloader-master 2020-02-28 11:39:35 +01:00
W.C.A. Wijngaards e13dfc743d For incoming ssl context with verifypem != NULL, we can set
SSL_VERIFY_FAIL_IF_NO_PEER_CERT that can reject client
connections without peer cert during the handshake, which is nicer
than just a connection drop to the client (when we then check
for no peer certificate afterwards).
2020-02-28 11:10:12 +01:00
W.C.A. Wijngaards d5544a0f13 dnstap io, cast void unused return value. 2020-02-28 11:09:45 +01:00
W.C.A. Wijngaards d68c1e29b6 Changelog note for PR #173.
- Merge PR #173: updated makedist.sh for config.guess and
  config.sub and sha256 digest for gpg, by noloader.
2020-02-28 10:15:57 +01:00
Wouter WijngaardsandGitHub 6e54225bd7 Merge pull request #173 from noloader/makedist
Update makedist.sh
2020-02-28 10:14:33 +01:00
W.C.A. Wijngaards ed5a9ed1b1 dnstap io, fix for review comment. 2020-02-28 09:22:15 +01:00
W.C.A. Wijngaards 49622dd51a dnstap io, fix uniform error message for no dnstap-socket-path. 2020-02-28 09:19:53 +01:00
W.C.A. Wijngaards e856908696 dnstap io, free alloced resource on fail path. 2020-02-28 09:17:02 +01:00
W.C.A. Wijngaards 065506d1a8 dnstap io, use sldns_str_print to print to string. 2020-02-28 09:11:10 +01:00
W.C.A. Wijngaards b63032b4dd dnstap io, fixup fptr_wlist for unbound_dnstap_socket tool. 2020-02-28 08:55:10 +01:00
W.C.A. Wijngaards 85c4e58831 dnstap debug tool, document string change more clearly. 2020-02-28 08:36:44 +01:00
W.C.A. Wijngaards 5b61afd38c Return 0 when ssl authentication is not available 2020-02-28 08:11:11 +01:00
Jeffrey Walton 8fbb03de5e Update makedist.sh
Use the latest config.guess and config.sub
Use SHA-256 for release signing
2020-02-27 19:10:05 -05:00
Jeffrey Walton 1cb1e90f53 Add IBM s390x arch for testing
I believe this is a big-endian platform, so it is nice to have for insurance
2020-02-27 12:56:20 -05:00
George Thessalonikefs c50f9dd412 Merge branch 'noloader-travis' 2020-02-27 18:14:14 +01:00
George Thessalonikefs 9efe85fb4c - Merge PR #171: Add additional compilers and platforms to Travis
testing, by noloader.
2020-02-27 18:13:22 +01:00
George Thessalonikefs 6476a11189 - Provide openssl location for osx travis build. 2020-02-27 18:11:25 +01:00
W.C.A. Wijngaards 398e260145 Fixup ssl authentication not available with check for it. 2020-02-27 16:57:24 +01:00
Jeffrey Walton e382b884d3 Use Brew to install OpenSSL on OS X 2020-02-27 10:52:58 -05:00
W.C.A. Wijngaards f03245c362 Document log check functions. 2020-02-27 16:28:36 +01:00
Jeffrey Walton 2d6e0d8eea Add additional compilers and platforms to Travis testing 2020-02-27 10:08:49 -05:00
W.C.A. Wijngaards 6f4818ebcb - Fix more undefined sanitizer issues, in respip copy_rrset null
dname, and in the client_info_compare routine for null memcmp.
2020-02-27 15:43:27 +01:00
W.C.A. Wijngaards 57bbbfc0e6 - Fix #170: Fix gcc undefined sanitizer signed integer overflow
warning in signature expiry RFC1982 serial number arithmetic.
2020-02-27 15:22:35 +01:00
W.C.A. Wijngaards 348e246b66 - Fix #169: Fix warning for daemon/remote.c output may be truncated
from snprintf.
2020-02-27 15:08:10 +01:00
W.C.A. Wijngaards f469049198 - iana portlist updated. 2020-02-26 14:32:14 +01:00
W.C.A. Wijngaards 5aa8ae510e Fix spelling of dtstream.c 2020-02-26 13:11:27 +01:00
W.C.A. Wijngaards e24d7c64a8 Dnstap io, note that it creates a thread when possible. 2020-02-26 12:21:42 +01:00
W.C.A. Wijngaards 6a51e9e037 Add dnstap io callbacks to fptr whitelist event. 2020-02-26 12:14:52 +01:00
W.C.A. Wijngaards 58b7e732b8 Fixup dtstream.h file description comment. And for dtstream.c too. 2020-02-26 12:05:38 +01:00
W.C.A. Wijngaards de35486fb7 Documentation for prefer-ip4, Issue #165. 2020-02-25 09:58:32 +01:00
W.C.A. Wijngaards 318d4e91cc - Fix #165: Add prefer-ip4: yesno config option to prefer ipv4 for
using ipv4 filters, because the hosts ip6 netblock /64 is not owned
  by one operator, and thus reputation is shared.
2020-02-25 09:55:59 +01:00
George Thessalonikefs f99dd8f6dc Changelog note for PR #166.
- Merge PR #166: Fix typo in unbound.service.in, by glitsj16.
2020-02-24 12:01:20 +01:00
gthessandGitHub 137d1d896a Merge pull request #166 from glitsj16/systemd-units
Fix typo in unbound.service.in
2020-02-24 11:57:50 +01:00
glitsj16andGitHub 42ee37847f Fix typo 2020-02-22 01:16:11 +00:00
Florian Obser 5aaa5e253d Allow the kernel to provide random source ports.
On some operating systems, for example OpenBSD since some decades, the
kernel binds to a random source port if asked for any port (port
number 0). There is no need to replicate this functionality in
userland.
2020-02-20 14:54:06 +01:00
W.C.A. Wijngaards d2a843b422 - master branch has 1.10.1 version. 2020-02-20 14:42:58 +01:00
W.C.A. Wijngaards 6d7e0d68cf Note tag position in Changelog. 2020-02-20 14:41:39 +01:00
W.C.A. Wijngaards 66836f591e Merge branch 'master' of github.com:NLnetLabs/unbound 2020-02-20 09:17:40 +01:00
W.C.A. Wijngaards ec0d6f196e - Updated contrib/unbound_smf23.tar.gz with Solaris SMF service for
Unbound from Yuri Voinov.
2020-02-20 09:17:24 +01:00
Alex BandandGitHub e55b89096f Add GitHub Sponsors for Organisations 2020-02-20 09:13:54 +01:00
W.C.A. Wijngaards 57baa78dd1 Fix memory leak in error case. From review. 2020-02-19 17:33:36 +01:00
W.C.A. Wijngaards 9473b0b2c5 Fix issue reported by clang analyzer. 2020-02-18 17:20:45 +01:00
W.C.A. Wijngaards 8f14388cb4 dnstap io, move control frame ready, accept and log to dnstap_fstrm code. 2020-02-18 17:04:08 +01:00
W.C.A. Wijngaards 3753d01253 dnstap io, test for client authentication, unbound can send client
authentication credentials, when configured, and unbound-dnstap-socket can
verify the client credentials, and refuses the connection if missing.
2020-02-18 16:30:13 +01:00
W.C.A. Wijngaards 9556d59536 dnstap io, test that failed name or auth certificate fails to connect tls. 2020-02-18 14:18:03 +01:00
W.C.A. Wijngaards 184f26355a Fix ifdef of X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS, and
Merge branch 'master' into framestreams
2020-02-18 08:33:58 +01:00
W.C.A. Wijngaards 6accd3d681 - protect X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS with ifdef for
different openssl versions.
2020-02-18 08:31:38 +01:00
W.C.A. Wijngaards b4f055effc Merge branch 'master' into framestreams 2020-02-17 15:25:47 +01:00
W.C.A. Wijngaards 85fd23769f - changelog point where the tag for 1.10.0rc2 release is. 2020-02-17 15:24:29 +01:00
Ralph Dolmans b770699319 typo fix 2020-02-17 13:38:01 +01:00
Ralph Dolmans fe5370a98a - Add respip to supported module-config options in unbound-checkconf. 2020-02-17 13:36:30 +01:00
George Thessalonikefs 4b354d38c1 - Remove unused variable. 2020-02-17 12:56:20 +01:00
W.C.A. Wijngaards a9b7638f4b Neater changelog 2020-02-17 10:10:44 +01:00
W.C.A. Wijngaards 42fdfd8121 - contrib/drop2rpz: perl script that converts the Spamhaus DROP-List
in RPZ-Format, contributed by Andreas Schulze.
2020-02-17 10:09:46 +01:00
W.C.A. Wijngaards 2106692a89 dnstap io, test TLS with peername and TLS authentication. 2020-02-14 15:44:55 +01:00
W.C.A. Wijngaards 7b19ba3d57 dnstap io, fix spinning reconnect when handshake fails for TLS. 2020-02-14 15:41:17 +01:00
W.C.A. Wijngaards 4d3524f496 dnstap io, test for TLS and reconnect for that. And fix unused parameters
for dt_create and fix check of socket path when using IP address.
2020-02-14 14:44:02 +01:00
W.C.A. Wijngaards 7da19e96ce dnstap io, test for TCP and reconnect for that. 2020-02-14 14:16:56 +01:00
W.C.A. Wijngaards 583e8b71e4 Nicer comment text. 2020-02-14 13:54:07 +01:00
W.C.A. Wijngaards 465af58457 dnstap io, fix to compile without ssl. 2020-02-14 13:23:58 +01:00
W.C.A. Wijngaards 748b70ae8b dnstap io, fix clang analysis warning 2020-02-14 10:33:33 +01:00
W.C.A. Wijngaards 6d1b4e050d dnstap io, dnstap tls default is yes, and man page documentation. 2020-02-14 10:01:37 +01:00
W.C.A. Wijngaards 00700bbe13 dnstap io, config entries parse and lex. 2020-02-14 09:40:37 +01:00
W.C.A. Wijngaards 78e6060858 dnstap io, example.conf example, config_file entries for tcp and tls. 2020-02-14 09:03:09 +01:00
W.C.A. Wijngaards 2665ae0414 - Stop unbound-checkconf from insisting that auth-zone and rpz
zonefiles have to exist.  They can not exist, and download later.
2020-02-14 07:57:57 +01:00
W.C.A. Wijngaards 77bdbc6e98 - Fix spelling in unbound.conf.5.in. 2020-02-14 07:54:49 +01:00
W.C.A. Wijngaards 76772fe786 dnstap io, check peer verification in unbound-dnstap-socket tap_handshake. 2020-02-12 16:49:18 +01:00
W.C.A. Wijngaards 5714260953 dnstap io, move peer check into routine. 2020-02-12 15:34:56 +01:00
W.C.A. Wijngaards 25a88d6d54 dnstap io, check peer verification in dtstream dtio_ssl_handshake. 2020-02-12 15:23:58 +01:00
W.C.A. Wijngaards 808995e041 Merge branch 'master' into stream-reuse 2020-02-12 12:53:24 +01:00
W.C.A. Wijngaards 0f0bb21a89 Merge branch 'master' into framestreams 2020-02-12 12:53:12 +01:00
W.C.A. Wijngaards 00d622bed7 - updated version number to 1.10.0. 2020-02-12 12:51:35 +01:00
W.C.A. Wijngaards 014833d0e6 Merge branch 'stream-reuse' of github.com:NLnetLabs/unbound into stream-reuse 2020-02-12 11:58:39 +01:00
W.C.A. Wijngaards 6c14c7520b Merge branch 'master' into stream-reuse 2020-02-12 11:58:17 +01:00
W.C.A. Wijngaards e5e72eb398 Merge branch 'master' into framestreams 2020-02-12 11:58:01 +01:00
W.C.A. Wijngaards 9e193be648 - Fix compile warning when threads disabled. 2020-02-12 11:55:02 +01:00
W.C.A. Wijngaards 7dcfe531e4 - Fix to clean memory leak of respip_addr.lock when ip_tree deleted. 2020-02-12 11:49:26 +01:00
W.C.A. Wijngaards e965775064 - Fix contrib/fastrpz.patch to apply cleanly. Fix for serve-stale
fixes, but it does not compile, conflicts with new rpz code.
2020-02-12 11:29:55 +01:00
W.C.A. Wijngaards 6e13c6f401 - Fix contrib/fastrpz.patch to apply cleanly. 2020-02-12 11:24:59 +01:00
W.C.A. Wijngaards 2916cfb3b0 - Fix with libnettle make test with dsa disabled. 2020-02-12 11:15:24 +01:00
George Thessalonikefs da2bda6f4d - Clean debug comments. 2020-02-10 15:54:41 +01:00
George Thessalonikefs adda4f6ace - Fix use after free on log-identity after a reload; Fixes #163. 2020-02-10 13:56:22 +01:00
George Thessalonikefs c316b1d7d5 - Document 'ub_result.was_ratelimited' in libunbound. 2020-02-10 10:31:47 +01:00
W.C.A. Wijngaards af84a27dff Merge branch 'master' into stream-reuse 2020-02-06 17:27:55 +01:00
W.C.A. Wijngaards aee3706f66 - Fix to put braces around empty if body when threading is disabled. 2020-02-06 15:33:02 +01:00
George Thessalonikefs 8e135d5f59 - Document in unbound.conf manpage that configuration clauses can be repeated in the configuration file. 2020-02-06 14:39:58 +01:00
George Thessalonikefs 5d6358b66d - Cleaner code for mesh_serve_expired_lookup. 2020-02-06 14:38:01 +01:00
W.C.A. Wijngaards 4089147351 - Fix to lock and release once in mesh_serve_expired_lookup. 2020-02-06 14:01:45 +01:00
W.C.A. Wijngaards 18ea62e369 - Fix to lock zone before adding rpz qname trigger. 2020-02-06 12:22:15 +01:00
W.C.A. Wijngaards d000523b00 - Fix to create and destroy rpz_lock in auth_zones structure. 2020-02-06 11:51:17 +01:00
George Thessalonikefs 0758d29324 - Fix num_reply_states and num_detached_states counting with
serve_expired_callback.
2020-02-06 11:44:48 +01:00
W.C.A. Wijngaards af7abd4dfd - Fix num_reply_addr counting in mesh and tcp drop due to size
after serve_stale commit.
2020-02-06 11:09:30 +01:00
W.C.A. Wijngaards 7e061e4d5f Fix test to check if server up afterwards 2020-02-06 10:25:47 +01:00
W.C.A. Wijngaards ad180402ea dnstap io, set tls auth name in outgoing ssl 2020-02-05 16:17:21 +01:00
W.C.A. Wijngaards 812d8f71e8 dnstap io, ssl write. 2020-02-05 15:04:04 +01:00
W.C.A. Wijngaards 58fdcf06e8 Merge branch 'master' into framestreams 2020-02-05 14:25:47 +01:00
gthessandGitHub f7fe95ad7b Serve stale (#159)
- Added serve-stale functionality as described in
  draft-ietf-dnsop-serve-stale-10. `serve-expired-*` options can be used
  to configure the behavior.
- Updated cachedb to honor `serve-expired-ttl`; Fixes #107.
- Renamed statistic `num.zero_ttl` to `num.expired` as expired replies
  come with a configurable TTL value (`serve-expired-reply-ttl`).
- Fixed stats when replying with cached, cname-aliased records.
- Added missing default values for redis cachedb backend.
2020-02-05 14:20:27 +01:00
W.C.A. Wijngaards 5b117c851a dnstap io, ssl handshake. 2020-02-05 13:59:56 +01:00
W.C.A. Wijngaards e5d43a6f4e dnstap io, close fd routine. 2020-02-05 13:03:58 +01:00
W.C.A. Wijngaards 9f7a16c7ab dnstap io, ssl and ssl ctx creation. 2020-02-04 17:23:19 +01:00
W.C.A. Wijngaards f24d0e4054 dnstap create debug tool with other debug tools in list. 2020-02-04 09:45:44 +01:00
W.C.A. Wijngaards 9115eb88ed Merge branch 'master' into framestreams 2020-02-04 09:40:00 +01:00
Ralph Dolmans 5980d9c389 Merge branch 'master' of github.com:NLnetLabs/unbound 2020-02-03 16:53:50 +01:00
Ralph Dolmans 4fc622031d - Reformat rpz disabled stats counter 2020-02-03 16:52:25 +01:00
Alex BandandGitHub dde8631600 Link to NLnet Labs funding page 2020-02-03 16:51:03 +01:00
Ralph Dolmans 8c88ab4747 - Add assertion to please static analyzer 2020-02-03 16:44:21 +01:00
Ralph Dolmans a4a9fbdb8f - remove unused code block in respip 2020-02-03 14:19:44 +01:00
W.C.A. Wijngaards 1420d59949 dnstap io, connect and write over TCP. 2020-01-31 17:07:40 +01:00
W.C.A. Wijngaards 27a5239ccf dnstap unbound-dnstap-sock, comments and log output on tls error close. 2020-01-31 14:13:41 +01:00
W.C.A. Wijngaards dc31cf3652 dnstap unbound-dnstap-sock, read from TLS. 2020-01-31 14:03:28 +01:00
W.C.A. Wijngaards 03db238a51 dnstap unbound-dnstap-sock, verbose accepted stream IP addresses 2020-01-31 13:05:06 +01:00
W.C.A. Wijngaards 8d2ff8a6bf dnstap unbound-dnstap-sock, add -t option. 2020-01-31 11:18:14 +01:00
W.C.A. Wijngaards b912169f15 dnstap unbound-dnstap-sock, fixup check for ssl context create error. 2020-01-31 11:11:43 +01:00
W.C.A. Wijngaards 473783e432 dnstap unbound-dnstap-sock, tls options and context created. 2020-01-31 11:10:04 +01:00
W.C.A. Wijngaards 59136055b9 dnstap unbound-dnstap-sock, fixup constant defines. 2020-01-31 10:05:00 +01:00
W.C.A. Wijngaards 70b2c24a4e dnstap unbound-dnstap-sock, fixup signal handler exit. 2020-01-31 10:02:51 +01:00
W.C.A. Wijngaards 11e80ce3ab dnstap unbound-dnstap-sock, can listen to multiple sockets, can listen
to TCP sockets, cleans up on exit after signal.
2020-01-31 09:53:49 +01:00
W.C.A. Wijngaards 12c51866d0 Merge branch 'master' into framestreams 2020-01-31 07:49:38 +01:00
W.C.A. Wijngaards 7495b25f94 - Fix fclose on error in TLS session ticket code. 2020-01-31 07:49:14 +01:00
Ralph Dolmans 810862dc65 - Stop working on socket when socket() call returns an error.
- Check malloc return values in TLS session ticket code
2020-01-30 19:15:58 +01:00
W.C.A. Wijngaards a8264065f6 - put fstrm protocol contents in separate files, dnstap_fstrm.c
and dnstap_fstrm.h
2020-01-30 17:11:07 +01:00
W.C.A. Wijngaards 8dd683768b Merge branch 'master' into framestreams 2020-01-30 16:22:12 +01:00
W.C.A. Wijngaards c9ac6a5eab Merge branch 'master' into stream-reuse 2020-01-30 16:21:50 +01:00
W.C.A. Wijngaards a4244e79ca - Add getentropy_freebsd.o to Makefile dependencies. 2020-01-30 16:15:51 +01:00
W.C.A. Wijngaards 833021d84d - Add build rule for ipset to Makefile 2020-01-30 16:12:39 +01:00
Ralph Dolmans 2c459443da - Add changelog entry for RPZ merge 2020-01-30 16:04:27 +01:00
Ralph Dolmans 1646b26369 Merge branch 'rpz' 2020-01-30 15:59:01 +01:00
Ralph Dolmans 056176ec9a Merge branch 'master' into rpz 2020-01-30 15:57:34 +01:00
W.C.A. Wijngaards 3102fa5775 Merge branch 'master' into stream-reuse 2020-01-30 15:49:57 +01:00
W.C.A. Wijngaards b1d8b549e0 Merge branch 'master' into framestreams 2020-01-30 15:49:24 +01:00
Ralph Dolmans d69ba6f39f - Add changelog entry for memory leak fix 2020-01-30 15:47:49 +01:00
Ralph Dolmans 882741bf55 - Fix memory leak in do_auth_zone_transfer on success 2020-01-30 15:45:54 +01:00
W.C.A. Wijngaards dd1b35412f dnstap io, add reconnect test. 2020-01-30 15:13:25 +01:00
Ralph Dolmans 5dc6798e75 Merge branch 'master' of github.com:NLnetLabs/unbound 2020-01-30 14:58:25 +01:00
W.C.A. Wijngaards 8aa338ba2d dnstap io, test threads in unit test. 2020-01-30 14:57:03 +01:00
Ralph Dolmans 4f5b934688 - Fix small memory leak in error condition remote.c
- Fix double free in error condition view.c
2020-01-30 14:56:48 +01:00
Ralph Dolmans b9c9fc066f - Fix RPZ locking issues on error conditions 2020-01-30 14:46:39 +01:00
Ralph Dolmans 833c4b1300 - Revert addition of cscope.out to project .gitignore, should be in
global ignore list
2020-01-30 14:25:45 +01:00
W.C.A. Wijngaards c79de51da8 Merge branch 'master' into stream-reuse 2020-01-30 14:25:00 +01:00
W.C.A. Wijngaards 9c71e5733d Merge branch 'master' into framestreams 2020-01-30 14:20:31 +01:00
W.C.A. Wijngaards a5f133ef2f - updated .gitignore for added contrib file. 2020-01-30 14:20:08 +01:00
W.C.A. Wijngaards 1645ea8b8b Merge branch 'master' into framestreams 2020-01-30 14:14:29 +01:00
W.C.A. Wijngaards de5c0d4228 Changelog note for PR#151.
- Merge PR#151: Fixes for systemd units, by Maryse47, Edmonds
  and Frzk.  Updates the unbound.service systemd file and adds
  a portable systemd service file.
2020-01-30 14:11:41 +01:00
Wouter WijngaardsandGitHub e4e00db42e Merge pull request #151 from Maryse47/systemd_fix
Fixes for systemd units
2020-01-30 14:09:29 +01:00
Ralph Dolmans 3609287344 - Fix RPZ stats RPZ_NO_OVERRIDE_ACTION check 2020-01-30 14:05:56 +01:00
W.C.A. Wijngaards fa49fc77e3 fix dnstap io for lock checks, log identity (numworkers+1), and add locks
around protected area modification in the message queue.
2020-01-30 13:39:31 +01:00
W.C.A. Wijngaards 9dbb5662b7 fix ascync test compile with lock checks. 2020-01-30 13:39:13 +01:00
W.C.A. Wijngaards ba49524708 dnstap socket tool better help text. 2020-01-30 13:10:29 +01:00
W.C.A. Wijngaards 36dd4a2124 Merge branch 'master' into framestreams 2020-01-30 13:06:52 +01:00
W.C.A. Wijngaards 20a2574da1 - Update contrib/fastrpz.patch for clean diff with current code. 2020-01-30 13:05:35 +01:00
W.C.A. Wijngaards bf13191b87 - Fix subnet tests for disabled DSA algorithm by default. 2020-01-30 09:08:19 +01:00
W.C.A. Wijngaards 93a609d6db Merge branch 'master' into framestreams 2020-01-29 16:36:46 +01:00
Ralph Dolmans 5fcae2f0e0 - Fix misplaced parentheses from PR#156 2020-01-29 16:32:03 +01:00
W.C.A. Wijngaards 0248872938 dnstap io, move setup with nothreads into its own routine. 2020-01-29 16:31:33 +01:00
W.C.A. Wijngaards 565b3ef8cb dnstap io, fix compile warning when compiled with threading enabled. 2020-01-29 16:22:32 +01:00
W.C.A. Wijngaards af252929e8 Merge branch 'master' into framestreams 2020-01-29 16:10:16 +01:00
Ralph Dolmans 4326b10169 - Add PR#156 merge to changelog (Added unbound-control view_local_datas_remove
command)
2020-01-29 15:46:05 +01:00
Ralph DolmansandGitHub d82de651c6 Merge pull request #156 from n3bul4/master
Added unbound-control view_local_datas_remove command
2020-01-29 15:44:39 +01:00
Alexander Berkes 61c2333174 Added view_local_datas_remove description to documentation 2020-01-29 15:32:55 +01:00
Ralph Dolmans 88a706acf8 - Add extra dnamelen checks to ipdnametoaddr and netblockdnametoaddr 2020-01-29 15:16:44 +01:00
Ralph Dolmans 7da16febc4 - Use consistent dname buffer sizes for RPZ 2020-01-29 12:07:13 +01:00
W.C.A. Wijngaards 079de39b46 - Fix #157: undefined reference to `htobe64'. 2020-01-29 11:56:29 +01:00
Ralph Dolmans 1d9185229e - Make dname_has_label's dnamelen check work with 0 length 2020-01-29 11:30:22 +01:00
Ralph Dolmans ef120738c0 - Fix RPZ's get_tld_label maxdnamelen check 2020-01-29 10:57:29 +01:00
Alexander Berkes 396d4223d9 Added unbound-control view_local_datas_remove command 2020-01-29 02:28:00 +01:00
Maryse47 9aa4b5a7a6 unbound.service.in: don't write pidfile at start
Pidfiles aren't needed while running unbound through systemd.
The PID of the unbound daemon can still be obtained with:
'systemctl show --property MainPID --value unbound'.

While disabling pidfiles we can also drop CAP_CHOWN and writable
/run directory.
2020-01-28 19:03:18 +01:00
Maryse47 939cf38576 unbound.service.in: drop CAP_IPC_LOCK
CAP_IPC_LOCK controls whether a process can lock pages into physical
memory (for instance to prevent passwords or private keys from
being swapped to disk), e.g. mmap() with the MAP_LOCKED flag or
shmctl() with the SHM_LOCK command, neither of which seem to be
used by unbound.
2020-01-28 18:42:41 +01:00
Ralph Dolmans 9df07b4036 - Address review feedback 2020-01-28 18:35:04 +01:00
W.C.A. Wijngaards 1e4165d25b dnstap io, without threads, logs from the main event loop. 2020-01-28 15:51:39 +01:00
W.C.A. Wijngaards 989922631a dnstap io, fix exit when compiled without threads. 2020-01-28 15:09:21 +01:00
W.C.A. Wijngaards 53e8f992d9 Merge branch 'master' into framestreams 2020-01-28 14:39:26 +01:00
W.C.A. Wijngaards 6c0a863584 - Fix to silence the tls handshake errors for broken pipe and reset
by peer, unless verbosity is set to 2 or higher.
2020-01-28 14:32:06 +01:00
W.C.A. Wijngaards f1407d8814 Merge branch 'master' into framestreams 2020-01-28 14:25:43 +01:00
W.C.A. Wijngaards e13675d6cb dnstap io, windows portability improvements. 2020-01-28 14:24:14 +01:00
Ralph Dolmans a930b94658 - Add PR#147 merge to changelog 2020-01-28 13:41:26 +01:00
Ralph DolmansandGitHub 13a7783d7b Merge pull request #147 from mnach/minor-rfc-comment
minor #1344 change rfc reference for reserved top level dns names
2020-01-28 13:39:18 +01:00
PMunchandGitHub b7e8dc1182 Merge branch 'master' into master 2020-01-28 13:18:01 +01:00
W.C.A. Wijngaards bb81684206 dnstap io, fix memory leak if dnstap queue full. 2020-01-28 12:48:36 +01:00
W.C.A. Wijngaards 82ac0071b7 Merge branch 'master' into framestreams 2020-01-28 12:46:33 +01:00
W.C.A. Wijngaards b3bf416888 dnstap io, fix for msg queue cleanup and make test. 2020-01-28 12:46:08 +01:00
W.C.A. Wijngaards f6287fc718 - iana portlist updated. 2020-01-28 12:25:37 +01:00
W.C.A. Wijngaards c3712a288f merge master into framestreams, autoconf again. 2020-01-28 12:21:05 +01:00
W.C.A. Wijngaards 1a69e4c9ee Merge branch 'master' into framestreams 2020-01-28 12:20:09 +01:00
Maryse47 c0789a8785 unbound.service.in: allow CAP_CHOWN
CAP_CHOWN is needed for changing onwership of pidfile before
dropping privileges and truncate pidfile on exit.
2020-01-27 18:31:10 +01:00
Mikhail Nacharov c3fac2550f minor #1344 change rfc reference for reserved top level dns names 2020-01-27 22:04:09 +05:00
Ralph Dolmans 0feee99055 - Add changelog entry for PR#148. 2020-01-27 16:06:06 +01:00
Ralph DolmansandGitHub 1d0fc2d179 Merge pull request #148 from pettai/morestats
Add some TLS stats to unbound_munin_
2020-01-27 16:04:00 +01:00
Ralph Dolmans 41621fb1df - Add changelog entry for RP#154
- autoconf after PR#154
2020-01-27 15:50:12 +01:00
Ralph DolmansandGitHub 6b3df091fe Merge pull request #154 from edmonds/edmonds/libbsd-support
Allow use of libbsd functions with configure option --with-libbsd
2020-01-27 15:44:32 +01:00
Ralph DolmansandGitHub 7e200ce90e Merge branch 'master' into edmonds/libbsd-support 2020-01-27 15:37:33 +01:00
Maryse47 cfce0a5e60 unbound.service.in: add StateDirectory
State directory will be created under /var/lib/unbound and will be
useful for writing various files managed at runtime like trust
anchors updates there instead of in ConfigureDirectory which could
be made read-only next. For this chroot needs to be disabled.
2020-01-27 13:46:31 +01:00
Maryse47 72bfa5a48c Move unbound_nochroot.service to unbound_portable.service
The real purpose of this service is to make it work with
https://systemd.io/PORTABLE_SERVICES/ which are incompatible with
chroot workarounds from original unbound.service.

The service content is identical to unbound.service with exception
for chroot related rules which were modified as needed.
2020-01-27 13:44:47 +01:00
Maryse47 1464bedce2 unbound.service.in: add RuntimeDirectory and ConfigurationDirectory
Adding 'RuntimeDirectory' is needed when pidfile path is set to
subdirectory under /run.

Adding ConfigurationDirectory may help in some non-standard setups.

Also add more descriptions about used rules to avoid user confusion
about they meaning and purpose.
2020-01-27 13:44:46 +01:00
W.C.A. Wijngaards 68ff1730ac - Fix #153: Disable validation for DSA algorithms. RFC 8624
compliance.
2020-01-27 09:40:18 +01:00
W.C.A. Wijngaards 82a6a2f8cc Changelog note for PR#155.
- Merge PR#155 from Rober Edmonds: contrib/libunbound.pc.in: Fixes
  to Libs/Requires for crypto library dependencies.
2020-01-27 09:31:07 +01:00
W.C.A. Wijngaards 0ae684830a Merge branch 'master' of github.com:NLnetLabs/unbound 2020-01-27 09:29:18 +01:00
Wouter WijngaardsandGitHub ec9e4eb406 Merge pull request #155 from edmonds/edmonds/pkg-config/libs-fixes
contrib/libunbound.pc.in: Fixes to Libs/Requires for crypto library dependencies
2020-01-27 09:28:53 +01:00
Robert Edmonds 394f9403df contrib/libunbound.pc.in: Embed the correct crypto dependencies
This commit removes the hardcoded dependency in the libunbound
pkg-config .pc file on the libcrypto and libssl modules and instead
populates the .pc file based on which crypto library was selected at
configure time.

Note that the .pc file specifies pkg-config module names for the
"Requires" line and this can vary from the library filename (e.g. "nss"
is the pkg-config module name vs. "nss3" being the library name).
2020-01-26 22:30:31 -05:00
Robert Edmonds 36b5d74fc4 contrib/libunbound.pc.in: Only specify -lunbound for Libs
According to the pkg-config manpage, the "Libs" line in a .pc file
should give the link flags "specific to your package", and specifically
says not to include link flags for dependencies:

    Libs:  This line should give the link flags specific to your
           package.  Don't add any flags for required packages;
           pkg-config will add those automatically.
2020-01-26 22:06:58 -05:00
Steven ChamberlainandRobert Edmonds f6b4f2a149 Allow use of libbsd functions with configure option --with-libbsd
Add a new configure option `--with-libbsd', which allows to use libbsd's
portable implementations of:

    strlcpy strlcat arc4random arc4random_uniform reallocarray

instead of the embedded code copies in contrib/, which will be
difficult to maintain in the long term.

Also patch util/random.c so that, when building with libbsd and without
OpenSSL, arc4random can still be used as the PRNG.  Otherwise, building
with libnettle would need a kernel-specific getentropy implementation,
and libbsd does not export one.

[edmonds@debian.org: Imported patch description from BTS, refreshed
patch against Unbound 1.9.6.]
2020-01-26 19:09:43 -05:00
W.C.A. Wijngaards cf5aa85f29 dnstap io, nicer layout for wouldblock calls. 2020-01-23 16:51:57 +01:00
W.C.A. Wijngaards 8f2f004778 dnstap io, fix event reference in winevent wouldblock call. 2020-01-23 16:49:44 +01:00
W.C.A. Wijngaards 522fcccea2 Merge branch 'master' into framestreams 2020-01-23 16:24:54 +01:00
W.C.A. Wijngaards 61456ff81d Changelog and contrib/README note for PR#150.
- Merge PR#150 from Frzk: Systemd unit without chroot.  It add
  contrib/unbound_nochroot.service.in, a systemd file for use with
  chroot: "", see comments in the file, it uses systemd protections
  instead.
2020-01-23 16:16:52 +01:00
Wouter WijngaardsandGitHub ff92edcd41 Merge pull request #150 from Frzk/systemd_unit_without_chroot
Systemd unit without chroot
2020-01-23 16:14:17 +01:00
W.C.A. Wijngaards 874c349b44 dnstap io, remove --with-libfstrm, it is not required to build dnstap
support. protobuf-c is still used for handling the dnstap encoding.
2020-01-23 15:56:12 +01:00
François KUBLER c3f6f0a332 Patch configure.ac file to take the new contrib/unbound_nochroot.service unit file in consideration.
All props to Wouter Wijngaards for this work.
2020-01-23 15:51:07 +01:00
W.C.A. Wijngaards 4c64c4b78e dnstap io, remove libfstrm calls from dnstap.c. 2020-01-23 15:49:36 +01:00
François KUBLER 016f742f16 Added a new unit file to run unbound with systemd and without chroot.
See https://github.com/NLnetLabs/unbound/pull/149
2020-01-23 15:46:53 +01:00
W.C.A. Wijngaards 1042134eec dnstap io, failure to add event closes and attempts to reopen the output. 2020-01-23 15:39:27 +01:00
W.C.A. Wijngaards b33df3cc63 in stop flush use timer_del to remove timer. 2020-01-23 15:17:43 +01:00
W.C.A. Wijngaards 299086d447 dnstap io, reconnect attempts with exponential backoff to once per second. 2020-01-23 15:11:08 +01:00
W.C.A. Wijngaards 86e1948afe dnstap io, fixup error exit of event add routines. 2020-01-23 13:38:10 +01:00
W.C.A. Wijngaards 8c47d16e29 dnstap io, sleeps thread when there is no traffic. 2020-01-23 13:27:21 +01:00
W.C.A. Wijngaards c0f410f721 dnstap io, make sure to free current message when stream closes. 2020-01-23 11:51:10 +01:00
W.C.A. Wijngaards 29fdcf0c71 loop in output callback for performance. 2020-01-23 11:44:32 +01:00
W.C.A. Wijngaards e7d5a89ae2 check close neater also with a write at the same time. 2020-01-23 11:16:41 +01:00
W.C.A. Wijngaards 24536473d8 dnstap io: check for close of channel by the other side. 2020-01-23 11:07:30 +01:00
W.C.A. Wijngaards 14d7658897 dtio_find_msg loop roundrobin instead of first queue only, with
state in the dtio struct for loop iterator.
2020-01-23 10:34:38 +01:00
W.C.A. Wijngaards e9772b609e dnstap io fixup socket creation, stop flush dtio pointer, connect reports. 2020-01-23 09:55:15 +01:00
frpet 05cb07093d Update unbound_munin_
Add TLS (DoT) counters
2020-01-23 08:23:16 +01:00
W.C.A. Wijngaards 569cccea24 dnstap io output performs nonblocking connect. 2020-01-22 17:41:34 +01:00
W.C.A. Wijngaards 814a886354 output event del before free. 2020-01-22 15:26:04 +01:00
W.C.A. Wijngaards a21ac9838d write data and stop flush for dnstap io. 2020-01-22 15:20:48 +01:00
W.C.A. Wijngaards 3cc1f4a74e remove fatal_exit from runtime reopen routines. 2020-01-22 12:05:52 +01:00
W.C.A. Wijngaards 6fb602d57b improve fstrm routine documentation. 2020-01-22 11:57:15 +01:00
W.C.A. Wijngaards 9f2ac374f4 fstrm routines for start and stop, fstrm_create_control_frame_start and
fstrm_create_control_frame_stop, suitable for reuse, together with fstrm
protocol defines.
2020-01-22 11:44:11 +01:00
W.C.A. Wijngaards 3e7758ee58 Remove editor file that was added by mistake. 2020-01-21 17:15:37 +01:00
W.C.A. Wijngaards 351e0e6986 iothread find msg. 2020-01-21 17:14:47 +01:00
W.C.A. Wijngaards efc79beb2d iothread work. 2020-01-21 17:01:25 +01:00
W.C.A. Wijngaards 57ad169605 the framestream queue. 2020-01-21 14:50:37 +01:00
W.C.A. Wijngaards bb55cc1685 dnstap unit test. 2020-01-21 14:02:45 +01:00
W.C.A. Wijngaards ade0ba63ff dnstap test program prints messages and timestamps in long format. 2020-01-21 10:14:30 +01:00
W.C.A. Wijngaards 7bddf97450 dnstap test program prints identity and version. 2020-01-21 09:56:28 +01:00
W.C.A. Wijngaards ac362625c3 dnstap test progam can log on one line type,ip,qname,qtype,qclass 2020-01-20 17:23:01 +01:00
W.C.A. Wijngaards 90a9de9d52 unbound-dnstap-socket debug test program. 2020-01-20 15:45:31 +01:00
W.C.A. Wijngaards 9285e10fef iolist item added. 2020-01-20 12:12:27 +01:00
W.C.A. Wijngaards c6534ac6b3 Writeup of FrameStreams protocol. 2020-01-20 11:44:45 +01:00
W.C.A. Wijngaards b7e08045b1 git branch to track feature for framestreams. The aim is to make
reconnecting work, TLS support and not depend on the libfstrm library,
but keep compatibility with the Frame Streams protocol spec for
existing DNSTAP tools.
2020-01-20 11:04:06 +01:00
Ralph Dolmans e00ce7e02e - extend rpz_respip.rpl with ipv6 without zz label case 2020-01-16 17:52:09 +01:00
Ralph Dolmans bda4c4a375 - improve dname_has_label(), add unit test 2020-01-16 17:50:44 +01:00
W.C.A. Wijngaards 57aefd102e Stream reuse branch, for TCP and TLS stream reuse.
This is for upstream pipes and using them again for the next query.

Signposted code for reuse_tcp structure in outside_network.h
2020-01-16 17:12:32 +01:00
Ralph Dolmans b78373216d - Add cname target wc synth. to testbound test 2020-01-16 12:39:23 +01:00
Ralph Dolmans 24131ca29e Revert travis verbosity 2020-01-16 01:41:25 +01:00
Ralph Dolmans 72c4c6b30c - Fix the dname_has_label fix 2020-01-16 01:36:07 +01:00
Ralph Dolmans fd6456dd56 attemp to get more info out of travis 2020-01-16 00:51:42 +01:00
Ralph Dolmans 53d85f903c try to understand travis 2020-01-16 00:18:00 +01:00
Ralph Dolmans 9877e52161 Merge branch 'master' of github.com:NLnetLabs/unbound into rpz 2020-01-15 23:44:10 +01:00
Ralph Dolmans 627285af23 - Fix faulty assert 2020-01-15 23:19:24 +01:00
Ralph Dolmans 16543731f5 - Fix doxygen issue 2020-01-15 23:14:24 +01:00
Ralph Dolmans 344f12dd99 - fix compiler warnings 2020-01-15 23:03:44 +01:00
Ralph Dolmans 14913d75c0 - processed RPZ review feedback
- fix potential locking issue
  - add extra out of bound checks
2020-01-15 22:45:29 +01:00
Ralph Dolmans e098285892 - Implement RPZ CNAME target wildcard synthesis 2020-01-15 22:42:18 +01:00
W.C.A. Wijngaards 1e0c957dcd - Fix auth zone support for NSEC3 records without salt. 2020-01-14 16:03:29 +01:00
W.C.A. Wijngaards ea26e5038e - Fix for memory leak when edns subnet config options are read when
compiled without edns subnet support.
2020-01-14 15:48:27 +01:00
W.C.A. Wijngaards 2c4be0c201 - Fix crash after reload where a stats lookup could reference old key
cache and neg cache structures.
2020-01-14 15:18:52 +01:00
W.C.A. Wijngaards 9b3f3101e3 - Removed the dnscrypt_queries and dnscrypt_queries_chacha tests,
because dnscrypt-proxy (2.0.36) does not support the test setup
  any more, and also the config file format does not seem to have
  the appropriate keys to recreate that setup.
2020-01-14 14:40:44 +01:00
W.C.A. Wijngaards e149bc7046 - Fix unreachable code in ssl set options code. 2020-01-10 11:28:01 +01:00
W.C.A. Wijngaards a8db52120b - Fix the relationship between serve-expired and prefetch options,
patch from Saksham Manchanda from Secure64.
2020-01-10 10:04:50 +01:00
Ralph Dolmans 92a525225b - Add changelog entry for fix #138 (stop binding pidfile inside chroot dir in
systemd service file).
2020-01-08 16:36:18 +01:00
Ralph DolmansandGitHub 1e8d20de0d Merge pull request #142 from Maryse47/patch-1
unbound.service.in: stop binding pidfile inside chroot dir
2020-01-08 16:23:23 +01:00
Maryse47andGitHub 89d98564c3 unbound.service.in: stop binding pidfile inside chroot dir
Apparently pidfile isn't used inside chroot and binding it may cause some weird failures with older systemd.

Fixes https://github.com/NLnetLabs/unbound/issues/138
2020-01-08 15:21:22 +00:00
W.C.A. Wijngaards c4e199ecca - And update for more spare space. 2020-01-08 12:58:07 +01:00
W.C.A. Wijngaards 5ae1544583 - Updated sldns_bget_token_par fix for also space for the zero
delimiter after the character.
2020-01-08 11:55:42 +01:00
W.C.A. Wijngaards 05a5dc2d0d - Fix out-of-bounds null-byte write in sldns_bget_token_par while
parsing type WKS, reported by Luis Merino from X41 D-Sec.
2020-01-08 11:08:16 +01:00
W.C.A. Wijngaards 19473d95eb - Fix 'make test' to work for --disable-sha1 configure option. 2020-01-08 09:23:46 +01:00
George Thessalonikefs 8686b0abbf - Changes to compat/getentropy_solaris.c for,
ifdef stdint.h inclusion for older systems.
  ifdef sha2.h inclusion for older systems.
2020-01-07 15:19:15 +02:00
George Thessalonikefs d68ece28c4 - Downgrade compat/getentropy_solaris.c to version 1.4 from OpenBSD.
The dl_iterate_phdr() function introduced in newer versions raises
  compilation errors on solaris 10.
2020-01-07 15:06:14 +02:00
W.C.A. Wijngaards 453c84b237 - Fix #140: Document slave not downloading new zonefile upon update. 2020-01-06 16:36:44 +01:00
W.C.A. Wijngaards 20a3d3be5f (Changelog note for #135).
- Merge #135 from Florian Obser: Use passed in neg and key cache
  if non-NULL.
2020-01-06 16:18:46 +01:00
Wouter WijngaardsandGitHub d982dff464 Merge pull request #135 from fobser/pass-in-neg-key-cache
Use passed in neg and key cache if non-NULL.
2020-01-06 16:17:16 +01:00
Ralph Dolmans 2abaca7a49 - Fix dname_has_label() code review changes 2019-12-23 17:35:11 +01:00
Ralph Dolmans ae4f6a259b Proccess more review feedback 2019-12-23 16:02:43 +01:00
Florian Obser da6ac0c4ff Use passed in neg and key cache if non-NULL.
With this the neg and key caches can be shared between multiple
libunbound contexts.

The msg and rrset caches already allowed this since context_finalize()
did not touch those if they are already available and have the correct
size.

Care must be taken to properly unhook the caches from the validator
environment before calling ub_ctx_delete() otherwise one risks double
free or use after free bugs.
2019-12-19 13:20:34 +01:00
George Thessalonikefs 1d45b4a1e0 - Update mailing list URL. 2019-12-16 16:03:31 +01:00
W.C.A. Wijngaards 40787a06d8 Fixup 1.9.7 version commit in configure.ac. 2019-12-12 15:52:21 +01:00
Ralph Dolmans 90b42b56b6 - Fix typo to let serve-expired-ttl work with ub_ctx_set_option(), by
Florian Obser
2019-12-12 13:05:09 +01:00
Ralph DolmansandGitHub 13a76ba0a6 Merge pull request #129 from fobser/serve-expired-ttl-typo
Fix typo to let serve-expired-ttl work with ub_ctx_set_option().
2019-12-12 12:59:28 +01:00
Ralph Dolmans f1d5d5d682 Make master 1.9.7 in development. 2019-12-12 12:48:29 +01:00
Florian Obser 0a499ec2ee Fix typo to let serve-expired-ttl work with ub_ctx_set_option(). 2019-12-10 18:03:24 +01:00
W.C.A. Wijngaards 41d3e2027c - Fix to make auth zone IXFR to fallback to AXFR if a single
response RR is received over TCP with the SOA in it.
2019-12-10 13:09:50 +01:00
W.C.A. Wijngaards e828d678ba - Fix Makefile.in for ipset module compile, from Adi Prasaja. 2019-12-06 11:31:34 +01:00
W.C.A. Wijngaards f3c2d05728 - Fix ipsecmod compile. 2019-12-06 07:59:55 +01:00
W.C.A. Wijngaards 4b73b5f299 - tag for 1.9.6rc1. 2019-12-05 11:21:46 +01:00
W.C.A. Wijngaards ff7d68ca53 - unbound-fuzzers.tar.bz2: three programs for fuzzing, that are 1:1
replacements for unbound-fuzzme.c that gets created after applying
  the contrib/unbound-fuzzme.patch.  They are contributed by
  Eric Sesterhenn from X41 D-Sec.
2019-12-05 09:10:49 +01:00
W.C.A. Wijngaards 3fb98a72d2 - Fix Make Test Fails when Configured With --enable-alloc-nonregional,
reported by X41 D-Sec.
2019-12-04 16:23:52 +01:00
W.C.A. Wijngaards 6e8b4a7796 - update contrib/fastrpz.patch to apply more cleanly. 2019-12-04 11:41:13 +01:00
W.C.A. Wijngaards 6f7eb3ea9f - Fix testbound for alloccheck runs, memory purify and lock checks. 2019-12-04 11:37:24 +01:00
W.C.A. Wijngaards 216747bb17 - Fix lock type for memory purify log lock deletion. 2019-12-04 09:44:31 +01:00
W.C.A. Wijngaards 8f79119826 - make depend 2019-12-03 17:28:51 +01:00
W.C.A. Wijngaards 4106308bd5 - Fix Hardcoded Constant, reported by X41 D-Sec. 2019-12-03 17:23:38 +01:00
W.C.A. Wijngaards c4c1f9e5ef - Fix _vfixed not Used, removed from sbuffer code,
reported by X41 D-Sec.
2019-12-03 17:07:35 +01:00
W.C.A. Wijngaards b6f0b1af86 - Fix compile error in dnscrypt. 2019-12-03 16:44:24 +01:00
W.C.A. Wijngaards 68027ab145 - Fix Client NONCE Generation used for Server NONCE,
reported by X41 D-Sec.
2019-12-03 16:42:14 +01:00
W.C.A. Wijngaards 4a7ebfabcf - Fix Bad Indentation, in dnscrypt.c,
reported by X41 D-Sec.
2019-12-03 16:34:53 +01:00
W.C.A. Wijngaards 9ce6119513 - Fix snprintf() supports the n-specifier,
reported by X41 D-Sec.
2019-12-03 16:29:18 +01:00
W.C.A. Wijngaards 534eac6ae5 Note what it did, lower to 256 max count. 2019-12-03 16:21:04 +01:00
W.C.A. Wijngaards d3ff930b06 - Fix Hang in sldns_wire2str_pkt_scan(),
reported by X41 D-Sec.
2019-12-03 16:20:24 +01:00
W.C.A. Wijngaards 6c3a0b54ed - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec.
2019-12-03 16:18:47 +01:00
W.C.A. Wijngaards 2d444a5037 - Fix Insufficient Handling of Compressed Names in dname_pkt_copy(),
reported by X41 D-Sec.
2019-12-03 16:17:03 +01:00
W.C.A. Wijngaards c99438c6a1 - Fix Out of Bounds Write in sldns_b64_pton(),
fixed by check in sldns_str2wire_int16_data_buf(),
  reported by X41 D-Sec.
2019-12-03 16:10:34 +01:00
W.C.A. Wijngaards 3f3cadd416 - Fix Out of Bounds Write in sldns_str2wire_str_buf(),
reported by X41 D-Sec.
2019-12-03 16:01:31 +01:00
W.C.A. Wijngaards e183a66d60 - Fix OOB Read in sldns_wire2str_dname_scan(),
reported by X41 D-Sec.
2019-12-03 15:42:34 +01:00
W.C.A. Wijngaards d2eb78e871 - Fix Assert Causing DoS in dname_pkt_copy(),
reported by X41 D-Sec.
2019-12-03 15:20:48 +01:00
W.C.A. Wijngaards 5a66aecef9 - Fix similar code in auth_zone synth cname to add the extra checks. 2019-12-03 15:11:22 +01:00
W.C.A. Wijngaards f5e06689d1 - Fix Assert Causing DoS in synth_cname(),
reported by X41 D-Sec.
2019-12-03 15:10:36 +01:00
W.C.A. Wijngaards 5a00b31f86 - Fix text around serial arithmatic used for RRSIG times to refer
to correct RFC number.
2019-12-03 12:58:09 +01:00
W.C.A. Wijngaards cdbf091c0d Changelog entry for merge of #124.
- Merge pull request #124 from rmetrich: Changed log lock
  from 'quick' to 'basic' because this is an I/O lock.
2019-12-03 10:03:44 +01:00
Wouter WijngaardsandGitHub 4edb16296b Merge pull request #124 from rmetrich/basic_loglock
Changed log lock from 'quick' to 'basic' because this is an I/O lock.
2019-12-03 10:03:24 +01:00
W.C.A. Wijngaards aa64c58368 Changelog entry for #122.
- Merge pull request #122 from he32: In tcp_callback_writer(),
  don't disable time-out when changing to read.
2019-12-02 13:59:43 +01:00
Wouter WijngaardsandGitHub b4a01d6096 Merge pull request #122 from he32/timeout-fix
In tcp_callback_writer(), don't disable time-out when changing to read.
2019-12-02 13:59:13 +01:00
Renaud Métrich d63cb99649 Changed log lock from 'quick' to 'basic' because this is an I/O lock.
We cannot use a 'quick' lock (i.e. lock spinning on the CPU) for the log
lock because it can wait a lot on I/Os. Using a 'quick' lock leads to
eating the CPU for no good reason.

Example of 'pidstat' output when using various locks for log_lock:

- 'quick' lock and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:15:11 PM   UID      TGID       TID    %usr %system    %CPU CPU  Command
04:15:21 PM   998     16431         -  100.00    4.20  100.00   2  unbound
04:15:21 PM   998         -     16431   31.00    1.00   32.00   2  |__unbound
04:15:21 PM   998         -     16432   31.30    0.80   32.10   0  |__unbound
04:15:21 PM   998         -     16433   30.20    1.40   31.60   1  |__unbound
04:15:21 PM   998         -     16434   30.70    1.00   31.70   3  |__unbound

- 'quick' lock and log file system being fast

04:15:40 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:15:50 PM   998     16431         -   10.00    1.60  11.60   1  unbound
04:15:50 PM   998         -     16431    2.50    0.50   3.00   1  |__unbound
04:15:50 PM   998         -     16432    2.30    0.40   2.70   3  |__unbound
04:15:50 PM   998         -     16433    2.70    0.30   3.00   0  |__unbound
04:15:50 PM   998         -     16434    2.60    0.40   3.00   2  |__unbound

- 'basic' lock (this commit) and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:29:48 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:29:58 PM   998     11632         -    7.10   14.10  21.20   3  unbound
04:29:58 PM   998         -     11632    1.70    3.20   4.90   3  |__unbound
04:29:58 PM   998         -     11633    1.60    3.30   4.90   1  |__unbound
04:29:58 PM   998         -     11634    2.00    4.10   6.10   1  |__unbound
04:29:58 PM   998         -     11635    1.90    3.50   5.40   1  |__unbound

We can see in the above example, when 'basic' lock is used, that CPU
isn't consumed when log file system is slow.

Another reproducer scenario: put the log file on a NFS share with 'sync'
option.
2019-11-26 16:32:07 +01:00
Havard Eidnes dc0b1699e5 In tcp_callback_writer(), don't disable time-out when changing to read. 2019-11-26 00:02:34 +01:00
W.C.A. Wijngaards f82f971997 - Add make distclean that removes everything configure produced,
and make maintainer-clean that removes bison and flex output.
2019-11-22 15:10:02 +01:00
George Thessalonikefs 30b0fa1e8e Fix compiler warnings. 2019-11-22 14:30:56 +01:00
W.C.A. Wijngaards 1718a8e6b5 - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. 2019-11-22 14:23:00 +01:00
Ralph Dolmans bbb737ca5a processing RPZ review feedback 2019-11-22 12:56:24 +08:00
W.C.A. Wijngaards ebad5416d7 - Fix comments for doxygen in dns64. 2019-11-20 15:22:20 +01:00
PMunch 8802509a61 Fix return code of init to mirror native modules
The return code of the init procedure was just set to be 1 in the
dynamic library loading module. This ha been rectified and it will now
return whatever is returned from the loaded module.
2019-11-20 15:13:57 +01:00
W.C.A. Wijngaards 8833d44d01 - Fix python examples/calc.py for eval, reported by X41 D-Sec. 2019-11-20 15:07:09 +01:00
W.C.A. Wijngaards da4d6ffee3 - Fix Bad Randomness in Seed, reported by X41 D-Sec. 2019-11-20 14:40:50 +01:00
W.C.A. Wijngaards 981fedea0e - Fix NULL Pointer Dereference via Control Port,
reported by X41 D-Sec.
2019-11-20 14:37:13 +01:00
W.C.A. Wijngaards 493921ef1f Review fix of space. 2019-11-20 14:24:31 +01:00
W.C.A. Wijngaards 3a49e683ed - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
W.C.A. Wijngaards 3907876eac - Fix Unrequired Checks, reported by X41 D-Sec. 2019-11-20 14:05:54 +01:00
W.C.A. Wijngaards fcd9b34bb5 - Fix Useless memset() in validator, reported by X41 D-Sec. 2019-11-20 14:02:58 +01:00
W.C.A. Wijngaards d63ec2dfcb - Fix Terminating Quotes not Written, reported by X41 D-Sec. 2019-11-20 14:01:01 +01:00
W.C.A. Wijngaards 6139943428 - Fix compile with --enable-alloc-checks, reported by X41 D-Sec. 2019-11-20 13:51:10 +01:00
W.C.A. Wijngaards a76e43341f - Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec. 2019-11-20 13:30:27 +01:00
W.C.A. Wijngaards d63536289c - Changes to compat/getentropy files for,
no link to openssl if using nettle, and hence config.h for
  HAVE_NETTLE variable.
  compat definition of MAP_ANON, for older systems.
  ifdef stdint.h inclusion for older systems.
  ifdef sha2.h inclusion for older systems.
2019-11-20 13:28:49 +01:00
W.C.A. Wijngaards d085a0039b - Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD. 2019-11-20 13:12:36 +01:00
W.C.A. Wijngaards 3ebc480690 - Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD. 2019-11-20 13:11:05 +01:00
W.C.A. Wijngaards 20dd979d00 - Synchronize compat/getentropy_win.c with version 1.5 from
OpenBSD, no changes but makes the file, comments, identical.
2019-11-20 13:08:43 +01:00
W.C.A. Wijngaards 623dba975a - Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD. 2019-11-20 13:05:10 +01:00
W.C.A. Wijngaards 09707fc403 - Fix Integer Underflow in Regional Allocator,
reported by X41 D-Sec.
2019-11-20 13:00:56 +01:00
W.C.A. Wijngaards 2dcc7016ac - Fix Local Memory Leak in cachedb_init(),
reported by X41 D-Sec.
2019-11-20 12:56:39 +01:00
W.C.A. Wijngaards f887552763 - Fix Config Injection in create_unbound_ad_servers.sh,
reported by X41 D-Sec.
2019-11-20 12:02:19 +01:00
W.C.A. Wijngaards 72d348de6a - Fix Out-of-Bounds Read in dname_valid(),
reported by X41 D-Sec.
2019-11-20 11:38:11 +01:00
W.C.A. Wijngaards 7646c96259 - Fix Randomness Error not Handled Properly,
reported by X41 D-Sec.
2019-11-20 11:35:07 +01:00
W.C.A. Wijngaards d8809c672a - Fix Weak Entropy Used For Nettle,
reported by X41 D-Sec.
2019-11-20 11:28:53 +01:00
W.C.A. Wijngaards 7e3da817c3 - Adjust unbound-control to make stats_shm a read only operation. 2019-11-20 11:18:03 +01:00
W.C.A. Wijngaards c54fe82886 - Fix Shared Memory World Writeable,
reported by X41 D-Sec.
2019-11-20 11:13:45 +01:00
W.C.A. Wijngaards 1fa40654d2 - Fix Race Condition in autr_tp_create(),
reported by X41 D-Sec.
2019-11-20 11:01:56 +01:00
W.C.A. Wijngaards d79d75538b - Fix Out of Bounds Read in rrinternal_get_owner(),
reported by X41 D-Sec.
2019-11-20 08:28:12 +01:00
W.C.A. Wijngaards fa23ee8f31 - Fix Out of Bounds Write in sldns_bget_token_par(),
reported by X41 D-Sec.
2019-11-19 16:54:44 +01:00
W.C.A. Wijngaards 51c23b0209 - Fix Out of Bounds Read in sldns_str2wire_dname(),
reported by X41 D-Sec.
2019-11-19 16:46:33 +01:00
W.C.A. Wijngaards a3545867fc - Fix Integer Overflow to Buffer Overflow in
sldns_str2wire_dname_buf_origin(), reported by X41 D-Sec.
2019-11-19 16:42:17 +01:00
W.C.A. Wijngaards 02080f6b18 - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec.
2019-11-19 16:32:40 +01:00
W.C.A. Wijngaards 07156bd5ea - Fix Out-of-bounds Read in rr_comment_dnskey(),
reported by X41 D-Sec.
2019-11-19 16:17:06 +01:00
W.C.A. Wijngaards 2a4e840be4 - Fix Unchecked NULL Pointer in dns64_inform_super()
and ipsecmod_new(), reported by X41 D-Sec.
2019-11-19 15:48:18 +01:00
W.C.A. Wijngaards 226298bbd3 - Fix Integer Overflow in Regional Allocator,
reported by X41 D-Sec.
2019-11-19 15:38:05 +01:00
W.C.A. Wijngaards 5d46bb3879 Cast to unsigned before comparison for assertion. 2019-11-19 15:26:57 +01:00
W.C.A. Wijngaards a839a8ae01 And check the buffer size precisely. 2019-11-19 12:11:28 +01:00
W.C.A. Wijngaards 79a6e9fbe2 - Fixes to please lint checks. 2019-11-19 12:10:03 +01:00
W.C.A. Wijngaards 16bbfc3461 - Fix authzone printout buffer length check. 2019-11-19 10:09:44 +01:00
W.C.A. Wijngaards d8090b8cae - 1.9.5 is 1.9.4 with bugfix, trunk is 1.9.6 in development. 2019-11-19 10:06:12 +01:00
W.C.A. Wijngaards 09845779d5 - Fix CVE-2019-18934, shell execution in ipsecmod. 2019-11-19 10:05:18 +01:00
W.C.A. Wijngaards cb8374cce5 - gitignore .source tempfile used for compatible make. 2019-11-18 15:58:19 +01:00
W.C.A. Wijngaards 442e95620e - Portable grep usage for reuseport configure test.
- Check return type of HMAC_Init_ex for openssl 0.9.8.
2019-11-18 15:53:47 +01:00
W.C.A. Wijngaards af6f5a3f54 - Provide a prototype for compat malloc to remove compile warning. 2019-11-18 13:52:17 +01:00
W.C.A. Wijngaards 253d95a8ef - update to bison output of 3.4.1 in code repository. 2019-11-18 10:50:54 +01:00
W.C.A. Wijngaards 57f2582790 - In unbound-host use separate variable for get_option to please
code checkers.
2019-11-18 10:45:47 +01:00
W.C.A. Wijngaards d05d6b959a - fixes for splint cleanliness, long vs int in SSL set_mode. 2019-11-13 15:16:27 +01:00
W.C.A. Wijngaards d4c904d091 - contrib/fastrpz.patch updated to apply for current code. 2019-11-13 11:40:56 +01:00
W.C.A. Wijngaards 5ac9bf3f9b - iana portlist updated. 2019-11-13 11:37:06 +01:00
W.C.A. Wijngaards f759fc5839 Changelog note and configure autoconf generated.
- Merge #102 from jrtc27: Add getentropy emulation for FreeBSD.
2019-11-11 14:46:24 +01:00
Wouter WijngaardsandGitHub 8903dc779f Merge pull request #102 from jrtc27/freebsd-getentropy
Add getentropy emulation for FreeBSD
2019-11-11 14:45:18 +01:00
W.C.A. Wijngaards 29b90c6e58 - Fix #109: check number of arguments for stdin-pipes in
unbound-control and fail if too many arguments.
2019-11-11 12:02:51 +01:00
PMunch 5eabc429bc Add "dynlib" prefix to example output, log queries
This adds the "dynlib: " prefix to all messages created by the
`helloworld.c` dynamic library example.

It also adds logging of queries that pass through `operate`.
2019-11-04 16:03:04 +01:00
James Clarke 9b310f4084 Add getentropy emulation for FreeBSD 2019-11-02 18:08:23 +00:00
PMunch d104d3be22 Add inplace callback to dynlibmod, improve example
This adds the possibility to properly register inplace callbacks in the
dynamic library module. It works by creating a wrapper procedure that
is available to the dynamic library and will call the given callback
through a whitelisted callback function.

The dynamic library example has already been improved to include
comments and some simple examples on allocating and deallocating memory
and registering callbacks.
2019-11-01 10:44:26 +01:00
W.C.A. Wijngaards 7dfbcdf276 - Fix #99: Memory leak in ub_ctx (event_base will never be freed). 2019-10-24 09:58:45 +02:00
George Thessalonikefs 941b324187 Add new configure option --enable-fully-static to enable full static build if
requested; in relation to #91.
2019-10-23 16:10:07 +02:00
W.C.A. Wijngaards 21472c2393 Changelog note for #97.
- Merge #97: manpage: Add missing word on unbound.conf,
  from Erethon.
2019-10-23 07:56:17 +02:00
Wouter WijngaardsandGitHub 488e4c66cd Merge pull request #97 from Erethon/master
manpage: Add missing word on unbound.conf
2019-10-23 07:54:57 +02:00
Dionysis Grigoropoulos e8b8d42f8b manpage: Add missing word on unbound.conf 2019-10-23 00:35:49 +03:00
W.C.A. Wijngaards e6a179e27a - drop-tld.diff: adds option drop-tld: yesno that drops 2 label
queries, to stop random floods.  Apply with
  patch -p1 < contrib/drop-tld.diff and compile.
  From Saksham Manchanda (Secure64).  Please note that we think this
  will drop DNSKEY and DS lookups for tlds and hence break DNSSEC
  lookups for downstream clients.
2019-10-22 10:32:37 +02:00
PMunch f79811435b Cleanup some minor things in dynlibmod 2019-10-22 08:42:00 +02:00
PMunch f177dc974c Add support for multiple dynamic modules
Allows the use of multiple dynamic modules. Simply add more "dynlib"
entries to the "modules-config" and the same amount of "dynlib-file"
entries in the dynlib configuration block.
2019-10-21 15:59:53 +02:00
PMunch 8eeb910e3d Improve dynlib module and add documentation
Dynamic library module is now only a thin wrapper that loads dynamic
libraries and forwards all function calls directly to the loaded module.
This meant adding get_mem and clear, and get_mem calls have been added
in the expected places.

Documentation has also been added to the example.conf and the
unbound.conf manpage.
2019-10-21 14:20:33 +02:00
PMunch 1762437121 Add dynamic library support 2019-10-21 09:34:51 +02:00
W.C.A. Wijngaards eb2283332b - Add doxygen comments to unbound-anchor source address code, in #86. 2019-10-07 09:50:04 +02:00
W.C.A. Wijngaards b2c3b4758b For #86, note credit for Lukas Wunner. 2019-10-03 16:29:45 +02:00
W.C.A. Wijngaards 8bfbd81fec Changelog entry for #86 and whitespace fix.
- Merge #86 from psquarejho: Added -b source address option to
  smallapp/unbound-anchor.c.
2019-10-03 16:22:42 +02:00
Wouter WijngaardsandGitHub 3d91a9fd56 Merge pull request #86 from psquarejho/master
Added -b / source address option to smallapp/unbound-anchor.c
2019-10-03 16:19:58 +02:00
W.C.A. Wijngaards facc6c6541 - Merge 1.9.4 release with fix for vulnerability CVE-2019-16866.
- Continue with development of 1.9.5.
2019-10-03 11:40:13 +02:00
W.C.A. Wijngaards 380b87e21a Merge remote-tracking branch 'origin/branch-1.9.4' 2019-10-03 11:37:22 +02:00
W.C.A. Wijngaards b60c4a472c Branch 1.9.4 prepares for 1.9.4 release from 1.9.3 2019-10-03 10:34:40 +02:00
W.C.A. Wijngaards 82dffb1023 Changelog entry for Merge #90.
- Merge #90 from vcunat: fix build with nettle-3.5.
2019-10-03 08:59:16 +02:00
Wouter WijngaardsandGitHub dc30e66ddc Merge pull request #90 from vcunat/p/nettle-3.5
fix build with nettle-3.5
2019-10-03 08:58:47 +02:00
Vladimír Čunát ec021e0d4b fix build with nettle-3.5
https://git.lysator.liu.se/nettle/nettle/commit/8bf4747d9
2019-10-02 20:05:03 +02:00
W.C.A. Wijngaards 7963c9f463 Changelog note for #87.
- Merge #87 from hardfalcon: Fix contrib/unbound.service.in,
  Drop CAP_KILL, use + prefix for ExecReload= instead.
2019-09-26 13:17:46 +02:00
Wouter WijngaardsandGitHub 710851e69a Merge pull request #87 from hardfalcon/patch-1
Drop CAP_KILL, use + prefix for ExecReload= instead
2019-09-26 13:17:24 +02:00
Pascal ErnsterandGitHub 11f22074a9 Drop CAP_KILL, use + prefix for ExecReload= instead
CAP_KILL seems a bit too much privileges for the sole purpose of being able to make ExecReload= work.
Use the + prefix on ExecReload= instead to run "/bin/kill -HUP $MAINPID" with full privileges, ignoring the restrictions from CapabilityBoundingSet=.

See https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= for further details about the + prefix in ExecReload=.
2019-09-26 08:41:37 +00:00
W.C.A. Wijngaards 55bb4c1275 - The unbound.conf includes are sorted ascending, for include
statements with a '*' from glob.
2019-09-25 16:50:30 +02:00
Jens Hoffrichter b966dd8e06 Added -b / source address option to smallapp/unbound-anchor.c 2019-09-24 14:42:36 +00:00
W.C.A. Wijngaards 06a91b0eaa Changelog entry for fix #84 and #85.
- Merge #85 for #84 from sam-lunt: Add kill capability to systemd
  service file to fix that systemctl reload fails.
2019-09-23 09:20:12 +02:00
Wouter WijngaardsandGitHub 3df64cc677 Merge pull request #85 from sam-lunt/add-cap-kill
Add kill capability to systemd service file
2019-09-23 09:18:36 +02:00
sam-luntandGitHub 6943cab670 Add kill capability to systemd service file
The ExecReload command calls kills on a process owned by the unbound user (or whatever user is configured). To do so, it needs the CAP_KILL capability.
2019-09-21 14:36:12 -05:00
W.C.A. Wijngaards f635b47ade Changelog entry for #83
- Merge #83 from Maryse47: contrib/unbound.service.in: do not fork
  into the background.
2019-09-20 12:59:41 +02:00
Wouter WijngaardsandGitHub eb7f9a50f2 Merge pull request #83 from Maryse47/nofork
unbound.service.in: do not fork into the background
2019-09-20 12:59:21 +02:00
Maryse47andGitHub acdd4058d2 unbound.service.in: do not fork into the background
This is needed when unbound config doesn't set "do-daemonize: no" by itself otherwise starting service fails with:
 systemd[1]: unbound.service: Got notification message from PID <PID>, but reception only permitted for main PID which is currently not known

https://github.com/NLnetLabs/unbound/blob/release-1.9.3/doc/example.conf.in#L236
2019-09-20 10:07:37 +00:00
W.C.A. Wijngaards 1b62399a6e Changelog entry for #81.
- Merge #81 from Maryse47: Consistently use /dev/urandom instead
  of /dev/random in scripts and docs.
2019-09-20 07:44:43 +02:00
Wouter WijngaardsandGitHub e1e71eac3e Merge pull request #81 from Maryse47/urandom
Consistently use /dev/urandom instead of /dev/random in scripts and docs
2019-09-20 07:44:22 +02:00
W.C.A. Wijngaards aefd2df51f (Changelog entry for #82).
- Merge #82 from hardfalcon: Downgrade CAP_NET_ADMIN to CAP_NET_RAW
  in unbound.service.
2019-09-20 07:38:34 +02:00
Wouter WijngaardsandGitHub 15020f7666 Merge pull request #82 from hardfalcon/patch-1
Downgrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service
2019-09-20 07:37:32 +02:00
Pascal ErnsterandGitHub ae2d5276d2 Downgrade CAP_NET_ADMIN to CAP_NET_RAW in unbound.service
Since kernel 3.2, CAP_NET_RAW instead of CAP_NET_ADMIN is sufficient to allow for the usage of the IP_TRANSPARENT socket option. CAP_NET_ADMIN allows far more mayhem then CAP_NET_RAW, so prefer the safer, more restrictive solution.
2019-09-20 04:47:56 +00:00
Maryse47 ce0e9bef45 Consistently use /dev/urandom instead of /dev/random in scripts and docs
Unbound code call /dev/urandom (see below)  but various docs and scripts
mention /dev/random which may be confusing.

https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/arc4random.c#L107
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_linux.c#L251
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_osx.c
https://github.com/NLnetLabs/unbound/blob/release-1.9.3/compat/getentropy_solaris.c#L116
2019-09-19 17:40:49 +02:00
W.C.A. Wijngaards 1dcc88b6e8 - Merge #80 from stasic: Improve wording in man page.
(Changelog entry for merge)
2019-09-19 16:56:14 +02:00
Wouter WijngaardsandGitHub faa9dd7bf6 Merge pull request #80 from stasic/patch-1
Improve wording in man page
2019-09-19 16:54:42 +02:00
Arsen StasicandGitHub 9303292b7f Improve wording in man page
Make it more consistent throughout the man page.
If a config option can either be *yes* or *no* use exact these terms and not something like *on* which could be easily read as *no*.
2019-09-19 14:51:54 +00:00
W.C.A. Wijngaards 9f0b260c49 - Fix wrong response ttl for prepended short CNAME ttls, this would
create a wrong zero_ttl response count with serve-expired enabled.
2019-09-19 16:29:51 +02:00
W.C.A. Wijngaards ab53baa6f5 - Fix for oss-fuzz build warning. 2019-09-19 10:09:49 +02:00
W.C.A. Wijngaards 554e4a939c - Fix fix for #78 to also free service callback struct. 2019-09-19 10:03:47 +02:00
W.C.A. Wijngaards 45b3215594 - oss-fuzz badge on README.md. 2019-09-19 09:55:23 +02:00
W.C.A. Wijngaards 3cb1cdeebd - Merge pull request #76 from Maryse47: Improvements and fixes for
systemd unbound.service.
(Changelog note for merge of #76).
2019-09-19 09:53:21 +02:00
Wouter WijngaardsandGitHub 9a9d59ecaf Merge pull request #76 from Maryse47/patch-1
Improvements and fixes for systemd unbound.service
2019-09-19 09:52:30 +02:00
W.C.A. Wijngaards 1a4eaaabc5 - Fix #78: Memory leak in outside_network.c. 2019-09-19 09:11:23 +02:00
Maryse47 ff8fd0be5c Improvements and fixes for systemd unbound.service
1. Remove `ProtectKernelTunables=true`: This prevents various with socket options from working as shown below.
`unbound[] warning: so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root permissions(linux) or sysctl bigger net.core.rmem_max(linux) or kern.ipc.maxsockbuf(bsd) values.`

2. Add `CAP_NET_ADMIN` to available caps which is needed for `ip-transparent: yes` config option to work as shown below.
`unbound[] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted`

3. Make `ReadWritePaths` less permissive: `UNBOUND_SYSCONF_DIR` equals to `sysconfdir` which usually equals to `/etc` and `UNBOUND_LOCALSTATE_DIR` equals to `localstatedir` which usually equals to `/var`. Allowing write access for those dirs shouldn't be needed. The only dirs unbound should be allow to write to are `/run` ( for pidfile), `@UNBOUND_RUN_DIR@` (for chroot) and `@UNBOUND_CHROOT_DIR@` in case it differs from the previous one.

4. Bind-mount `/run/systemd/notify`, `UNBOUND_PIDFILE`, `/dev/log`, `/dev/urandom` in order to use them inside chroot.

5. Add few extra hardening options: `RestrictNamespaces`, `LockPersonality` and `RestrictSUIDSGID` should be safe to use.
2019-09-18 21:48:12 +02:00
W.C.A. Wijngaards 13d96540de - Use explicit bzero for wiping clear buffer of hash in cachedb,
reported by Eric Sesterhenn from X41 D-Sec.
2019-09-11 15:31:03 +02:00
Ralph Dolmans f3dfb4d537 Typo fix, reported by jpmens 2019-09-09 18:54:23 +02:00
Ralph Dolmans 9843b836ee Merge branch 'master' into rpz 2019-09-09 17:17:43 +02:00
Ralph Dolmans 4ac33aa104 - Merge clean up
- revert dname2str off by one fix
- fix str2dname off by one at right location
2019-09-09 17:13:08 +02:00
Ralph Dolmans 2b5cd8e9b4 Merge remote-tracking branch 'ralph/feature/rpz' into rpz 2019-09-09 17:11:26 +02:00
W.C.A. Wijngaards e45e9f1ce0 - Fix #72: configure --with-syslog-facility=LOCAL0-7 with default
LOG_DAEMON (as before) can set the syslog facility that the server
  uses to log messages.
2019-09-09 14:27:55 +02:00
W.C.A. Wijngaards 05b9f4fd28 - Fix #71: fix openssl error squelch commit compilation error. 2019-09-04 08:44:19 +02:00
W.C.A. Wijngaards 1089fd6dc1 - squelch DNS over TLS errors 'ssl handshake failed crypto error'
on low verbosity, they show on verbosity 3 (query details), because
  there is a high volume and the operator cannot do anything for the
  remote failure.  Specifically filters the high volume errors.
2019-09-03 09:47:27 +02:00
W.C.A. Wijngaards 366296ec14 - updated Makefile dependencies. 2019-09-02 15:56:24 +02:00
W.C.A. Wijngaards 7f9aa6734a - ipset: refactor long routine into three smaller ones. 2019-09-02 15:17:25 +02:00
W.C.A. Wijngaards 9902a5f81d - ipset module #28: log that an address is added, when verbosity high. 2019-09-02 13:50:42 +02:00
W.C.A. Wijngaards cd0a2b1af1 - Master is 1.9.4 in development. 2019-08-27 09:56:20 +02:00
Ralph Dolmans bc39217070 Don't pass along unused parameter 2019-08-23 12:45:34 +02:00
Ralph Dolmans ccb576f95e - add always_deny action, use this one for RPZ
- use localzone's memory layout when removing rr from rrset
2019-08-23 12:15:37 +02:00
W.C.A. Wijngaards a374dfb669 - Fix contrib/fastrpz.patch asprintf return value checks. 2019-08-23 08:41:46 +02:00
W.C.A. Wijngaards 79fa94834e - 1.9.3rc2 release candidate tag. 2019-08-22 14:50:49 +02:00
W.C.A. Wijngaards e35d5f5a2d delete duplicate file. 2019-08-22 13:32:34 +02:00
W.C.A. Wijngaards 334e2b1e35 updated fastrpz.patch to apply cleanly. 2019-08-22 13:31:09 +02:00
W.C.A. Wijngaards 06847ff3be - Fix that pkg-config is setup before --enable-systemd needs it. 2019-08-22 12:22:25 +02:00
W.C.A. Wijngaards 80c2c69fa7 - Fix log_dns_msg to log irrespective of minimal responses config. 2019-08-21 17:41:29 +02:00
Ralph Dolmans 8b752e359e - Document limitation of pidfile removal outside of chroot directory. 2019-08-19 13:27:19 +02:00
W.C.A. Wijngaards d3b3d64ef3 - Remove warning about unknown cast-function-type warning pragma. 2019-08-16 12:52:58 +02:00
W.C.A. Wijngaards c602ba7319 - Fixup contrib/fastrpz.patch 2019-08-16 12:37:13 +02:00
W.C.A. Wijngaards bdb6c153e4 - Please doxygen's parser for "@" occurrence in doxygen comment. 2019-08-16 12:21:40 +02:00
W.C.A. Wijngaards d8a8730cac - Fix unittest valgrind false positive uninitialised value report,
where if gcc 9.1.1 uses -O2 (but not -O1) then valgrind 3.15.0
  issues an uninitialised value for the token buffer at the str2wire.c
  rrinternal_get_owner() strcmp with the '@' value.  Rewritten to use
  straight character comparisons removes the false positive.  Also
  valgrinds --expensive-definedness-checks=yes can stop this false
  positive.
2019-08-16 12:18:23 +02:00
Ralph Dolmans a16111d471 Prevent potential double free 2019-08-16 12:13:30 +02:00
W.C.A. Wijngaards 0532cdd357 - (for later release): -V prints if TCP fastopen is available. 2019-08-15 17:04:38 +02:00
W.C.A. Wijngaards e84b913585 - 1.9.3rc1 release candidate tag. 2019-08-15 15:49:15 +02:00
W.C.A. Wijngaards a5027f5f56 - Fix character buffer size in ub_ctx_hosts. 2019-08-15 15:11:04 +02:00
W.C.A. Wijngaards 06a58ca248 - escape commandline contents for -V. 2019-08-15 15:05:02 +02:00
W.C.A. Wijngaards 4700d79024 - avoid warning about upcast on 32bit systems for autotrust. 2019-08-15 14:25:46 +02:00
W.C.A. Wijngaards 9d9884c442 - Fix autotrust temp file uniqueness windows compile. 2019-08-15 14:02:14 +02:00
W.C.A. Wijngaards c1c75929fa - iana portlist updated. 2019-08-15 13:07:26 +02:00
W.C.A. Wijngaards 8cb3656b3e - Fix warning for unused variable for compilation without systemd. 2019-08-14 16:08:19 +02:00
George Thessalonikefs a90f173875 - Fix #59, when compiled with systemd support check that we can properly
communicate with systemd through the `NOTIFY_SOCKET`.
2019-08-14 15:51:28 +02:00
Wouter WijngaardsandGitHub b266db3920 Merge pull request #57 from NLnetLabs/show-build-options
Introduce `-V` option to print the version number and build options.
2019-08-14 12:47:42 +02:00
gthessandGitHub fd415d8833 Merge branch 'master' into show-build-options 2019-08-14 11:45:41 +02:00
W.C.A. Wijngaards b5a52f8c86 - Generate configlexer with newer flex. 2019-08-14 11:40:35 +02:00
W.C.A. Wijngaards 67271242bf autoconf for the '-V' option changes. 2019-08-14 11:34:27 +02:00
Ralph Dolmans 965f16cc89 - Add RPZ AXFR test
- Fix memory leak
2019-08-13 17:06:43 +02:00
Ralph Dolmans 4cbf4f4996 - Add RPZ response IP override test 2019-08-12 18:44:30 +02:00
George Thessalonikefs 008813f0a2 - Introduce -V option to print the version number and build options.
Previously reported build options like linked libs and linked modules
  are now moved from `-h` to `-V` as well for consistency.
- PACKAGE_BUGREPORT now also includes link to GitHub issues.
2019-08-12 17:52:43 +02:00
Ralph Dolmans 88fce791df - Add RPZ respip test
- Fix rpz memory leak
2019-08-12 16:06:15 +02:00
Ralph Dolmans 7180284d82 - Add RPZ/QNAME override test 2019-08-08 16:43:28 +02:00
Ralph Dolmans 401fc15443 - Extend RPZ/QNAME trigger test
- Fix potential memory leak
2019-08-08 16:07:16 +02:00
Ralph Dolmans 4eb7771f97 - Added RPZ/QNAME trigger test 2019-08-08 13:50:02 +02:00
Ralph Dolmans abbb5c0f6d Update RPZ man page and example.conf 2019-08-07 14:53:23 +02:00
Ralph Dolmans 0987a82877 Add statistics support for disabled (action override) response IP RPZ
triggers.
2019-08-07 14:09:48 +02:00
W.C.A. Wijngaards fa506e3cda - Check repinfo in worker_handle_request, if null, drop it. 2019-08-01 16:57:36 +02:00
W.C.A. Wijngaards df0c844eed - Fix to timeval_add for remaining second in microseconds. 2019-08-01 16:48:41 +02:00
W.C.A. Wijngaards 199e6c586b - Fix to return after failed auth zone http chunk write.
- Fix to remove unused test for task_probe existance.
2019-08-01 16:40:52 +02:00
Ralph Dolmans 1c5d081853 - Add RPZ response IP override option, logging, and statistics 2019-08-01 14:31:37 +02:00
W.C.A. Wijngaards 21f740d313 - Fix #52 #53, fix for example fail program. 2019-08-01 09:34:44 +02:00
W.C.A. Wijngaards e860d39f54 - For #52 #53, second context does not close logfile override. 2019-08-01 09:15:33 +02:00
W.C.A. Wijngaards fe0b1da859 Fix comment. 2019-07-29 16:58:23 +02:00
W.C.A. Wijngaards 27811ffaa9 - Add hex print of trust anchor pointer to trust anchor file temp
name to make it unique, for libunbound created multiple contexts.
2019-07-29 16:51:40 +02:00
W.C.A. Wijngaards 7d5ab2f4de - Add verbose log message when auth zone file is written, at level 4. 2019-07-29 09:25:49 +02:00
W.C.A. Wijngaards 5f5c00203e - Fix question section mismatch in local zone redirect. 2019-07-23 14:01:59 +02:00
W.C.A. Wijngaards b4b0065554 Fixup space in error message. 2019-07-19 12:51:37 +02:00
W.C.A. Wijngaards c94e13220b - Fix #49: Set no renegotiation on the SSL context to stop client
session renegotiation.
2019-07-19 08:18:06 +02:00
Ralph Dolmans 9ce7045413 - Fix doxygen issue
- Fix memory leak
 - IANA ports update
 - merge littlehash ASAN changes
2019-07-16 19:45:49 +02:00
Ralph Dolmans a8d6147ae4 - Added RPZ response IP support 2019-07-16 18:43:16 +02:00
W.C.A. Wijngaards 368386c011 - Fix #48: Unbound returns additional records on NODATA response,
if minimal-responses is enabled, also the additional for negative
  responses is removed.
2019-07-12 14:34:35 +02:00
Ralph Dolmans d5ebc63add - Fix in respip addrtree selection. Absence of addr_tree_init_parents() call
made it impossible to go up the tree when the matching netmask is too
   specific.
2019-07-09 14:58:36 +02:00
Ralph Dolmans d323e1bda8 - Fix for possible assertion failure when answering respip CNAME from cache. 2019-07-05 16:52:03 +02:00
W.C.A. Wijngaards 36819adcc2 Nicer spelling and layout. 2019-06-25 15:14:07 +02:00
W.C.A. Wijngaards da46ea24d5 - For #45, check that 127.0.0.1 and ::1 are not used in unbound.conf
when do-not-query-localhost is turned on, or at default on,
  unbound-checkconf prints a warning if it is found in forward-addr or
  stub-addr statements.
2019-06-25 14:50:49 +02:00
Ralph Dolmans 395d83cfc8 Procedures to parse RPZ ip address notation. 2019-06-24 16:01:01 +02:00
W.C.A. Wijngaards 1aa1facabc - Fix memleak in unit test, reported from the clang 8.0 static analyzer. 2019-06-24 10:53:27 +02:00
W.C.A. Wijngaards 78b2f1cc20 - Fix python dict reference and double free in config. 2019-06-18 17:25:08 +02:00
W.C.A. Wijngaards 164f302011 - Merge PR #6: Python module: support multiple instances
- Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
- Merge PR #4: Python module: assign something useful to the
  per-query data store 'qdata'
Noted in Changelog.
2019-06-18 17:11:31 +02:00
W.C.A. Wijngaards cc39725cf3 Merge branch 'episource-dev/all-merged/master'.
Merge PR #6: Python module: support multiple instances
Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
Merge PR #4: Python module: assign something useful to the per-query data store 'qdata'
2019-06-18 17:08:59 +02:00
W.C.A. Wijngaards 63b2628a18 Merge branch 'dev/all-merged/master' of git://github.com/episource/unbound into episource-dev/all-merged/master 2019-06-18 17:07:57 +02:00
W.C.A. Wijngaards 0f3eac4a0e - Added documentation to the ipset files (for doxygen output). 2019-06-18 16:25:11 +02:00
W.C.A. Wijngaards 72738471f1 - make depend 2019-06-18 15:59:10 +02:00
W.C.A. Wijngaards c1e75c0369 - Fix to make unbound-control with ipset, remove unused variable,
use unsigned type because of comparison, and assign null instead
  of compare with it.  Remade lex and yacc output.
2019-06-18 15:57:28 +02:00
W.C.A. Wijngaards b16c872a60 - PR #28: IPSet module, by Kevin Chou. Created a module to support
the ipset that could add the domain's ip to a list easily.
  Needs libmnl, and --enable-ipset and config it, doc/README.ipset.md.
- Fix to omit RRSIGs from addition to the ipset.
2019-06-18 15:38:37 +02:00
W.C.A. Wijngaards 364441e0f5 Merge branch 'k9982874-master',PR #28 IPset module. 2019-06-18 13:54:04 +02:00
W.C.A. Wijngaards ed95b07764 Merge branch 'master' of git://github.com/k9982874/unbound into k9982874-master 2019-06-18 13:52:52 +02:00
W.C.A. Wijngaards bf2307ca97 - Fix for #24: Fix abort due to scan of auth zone masters using old
address from previous scan.
2019-06-17 14:15:36 +02:00
W.C.A. Wijngaards 1ec96d8f07 - Fix #39: In libunbound, leftover logfile is close()d unpredictably. 2019-06-17 12:13:12 +02:00
W.C.A. Wijngaards 3499d3c647 - Master contains version 1.9.3 in development. 2019-06-17 11:42:19 +02:00
W.C.A. Wijngaards ee06aaaad9 - 1.9.2rc3 release candidate tag. 2019-06-14 08:38:37 +02:00
Moritz Schneider f72885e5d7 Update Changelog 2019-06-12 19:11:20 +02:00
Moritz Schneider 8d9b94d3ef Update documentation for outbound-msg-retry 2019-06-12 19:09:15 +02:00
Moritz Schneider 7c18b36521 Adapt some comments 2019-06-12 19:01:30 +02:00
Moritz Schneider eb5683d6e6 Update configparser with outbound-msg-retry config parameter 2019-06-12 19:01:29 +02:00
Moritz Schneider 79cc049096 Make outbound msg retry configurable 2019-06-12 19:01:28 +02:00
Moritz Schneider 78fa3fcb07 Add unit test for check the configuration of outbound max retries 2019-06-12 19:01:27 +02:00
Moritz Schneider 2a4c7c81e7 Styling: Fix mixture of tabs and spaces 2019-06-12 19:01:27 +02:00
Moritz Schneider 1f9e3e9ba6 Styling: remove trailing whitespaces 2019-06-12 19:01:26 +02:00
W.C.A. Wijngaards af6c5dea43 - Fix another spoolbuf storage code point, in prefetch. 2019-06-12 08:32:45 +02:00
W.C.A. Wijngaards b57771d42b - 1.9.2rc1 release candidate tag. 2019-06-11 12:46:44 +02:00
W.C.A. Wijngaards 6067ce6d2b - Fix that fixes the Fix that spoolbuf is not used to store tcp
pipelined response between mesh send and callback end, this fixes
  error cases that did not use the correct spoolbuf.
2019-06-11 12:15:43 +02:00
W.C.A. Wijngaards 081fd4fdae - 1.9.2rc1 release candidate tag. 2019-06-06 09:32:53 +02:00
Ralph Dolmans 3021e320dd Only strdup rpz_log_name when configured 2019-06-05 14:26:57 +02:00
Ralph Dolmans a77c35ef50 Add RPZ config options to unbound.conf man page. 2019-06-04 15:39:08 +02:00
Ralph Dolmans bc83e0b016 fix double free issue 2019-06-04 12:38:44 +02:00
W.C.A. Wijngaards 09a0e6ee30 - iana portlist updated. 2019-06-04 12:21:21 +02:00
Ralph Dolmans 268580f348 Added RPZ log name and stats 2019-06-03 15:46:39 +02:00
W.C.A. Wijngaards a4f4d7b6ba - Fix to guard _OPENBSD_SOURCE from redefinition. 2019-05-29 13:28:03 +02:00
W.C.A. Wijngaards e2a2dcdfd5 - gitignore config.h.in~. 2019-05-28 11:12:41 +02:00
W.C.A. Wijngaards 14b11384a4 - Fix to define _OPENBSD_SOURCE to get reallocarray on NetBSD. 2019-05-28 11:12:05 +02:00
W.C.A. Wijngaards a03f0a388e - Fix double file close in tcp pipelined response code. 2019-05-27 11:23:41 +02:00
Wouter Wijngaards 0b77c9d676 - Fix that spoolbuf is not used to store tcp pipelined response
between mesh send and callback end.
2019-05-24 09:35:38 +02:00
W.C.A. Wijngaards 1c3ba0cef7 - Note that so-reuseport at extreme load is better turned off,
otherwise queries are not distributed evenly, on Linux 4.4.x.
2019-05-20 11:57:09 +02:00
Kevin Chou 19c2ece763 fix segmentation fault 2019-05-18 13:48:49 +08:00
Ralph Dolmans b0b69321f9 - Added RPZ action overrides
- Added RPZ policy apply logging
2019-05-16 22:30:42 +02:00
W.C.A. Wijngaards 310396190b - Fix #31: swig 4.0 and python module. 2019-05-16 11:06:01 +02:00
W.C.A. Wijngaards a08fe8ca60 - Attempt to fix malformed tcp response. 2019-05-13 15:39:59 +02:00
W.C.A. Wijngaards a95f5fd5cb - Squelch log messages from tcp send about connection reset by peer.
They can be enabled with verbosity at higher values for diagnosing
  network connectivity issues.
2019-05-13 10:39:39 +02:00
W.C.A. Wijngaards a922a19d70 - Revert fix for oss-fuzz, error is in that build script that
unconditionally includes .o files detected by configure, also
  when the machine architecture uses different LIBOBJS files.
2019-05-09 17:07:01 +02:00
W.C.A. Wijngaards a8d0177b36 - Attempt to fix build failure in oss-fuzz
because of reallocarray.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14648.
Does not omit compile flags from commandline.
2019-05-08 14:43:56 +02:00
W.C.A. Wijngaards 779b86fb22 - Fix doxygen output error on readme markdown vignettes. 2019-05-07 16:11:15 +02:00
W.C.A. Wijngaards e3453711e5 - Fix edns-subnet locks, in error cases the lock was not unlocked. 2019-05-07 16:10:22 +02:00
W.C.A. Wijngaards 73484d3b36 Fix spelling in code annotation of changes
in the public domain lookup3.c file.
2019-05-06 10:10:58 +02:00
W.C.A. Wijngaards f1c23891ab - Fix #30: AddressSanitizer finding in lookup3.c.
This sets the hash function to use a slower but better auditable code
that does not read beyond array boundaries.  This makes code better
security checkable, and is better for security.  It is fixed to be
slower, but not read outside of the array.
2019-05-06 09:44:01 +02:00
W.C.A. Wijngaards 9b7843f879 - Fix #29: Solaris 11.3 and missing symbols be64toh, htobe64. 2019-05-06 09:26:23 +02:00
Kevin Chou 5f4c9b0dfe rollback the code 2019-05-05 10:47:00 +08:00
Kevin Chou 3280e76527 bugfix 2019-05-04 17:39:27 +08:00
Kevin Chou 46099259be performance improvement 2019-05-04 12:52:18 +08:00
Kevin Chu 56af87e2f3 edit config parser to support ipset 2019-05-03 17:45:34 +08:00
W.C.A. Wijngaards bd5eeff364 - And gitignore unit test generated files, and generated doc files. 2019-05-02 16:14:03 +02:00
W.C.A. Wijngaards 2fea5663bd - Fix .gitignore, add pythonmod and dnstap generated files. 2019-05-02 16:01:56 +02:00
Kevin Chu 1a48bdebb5 Add support for ipset 2019-05-02 19:43:30 +08:00
W.C.A. Wijngaards f46c238552 - contrib/fastrpz.patch updated for code changes, and with git diff. 2019-05-02 11:17:41 +02:00
Ralph Dolmans 7e300939c0 Add repology batch to README.md 2019-05-01 18:03:16 +02:00
W.C.A. Wijngaards 409bc229ef Merge branch 'features/XoT' 2019-05-01 16:41:47 +02:00
W.C.A. Wijngaards ee0087d5c7 - PR #16: XoT support, AXFR over TLS
Turn it on with master: <ip>#<authname> in unbound.conf.  This uses TLS to
download the AXFR (or IXFR).
2019-05-01 16:41:09 +02:00
Willem Toorop d4f697f160 Merge branch 'master' into features/XoT 2019-05-01 16:24:52 +02:00
W.C.A. Wijngaards 6e4bab2629 fixup shell 2019-05-01 13:39:32 +02:00
W.C.A. Wijngaards 5c5ddbe859 - Nicer travis output for clang analysis. 2019-05-01 13:34:45 +02:00
gthessandGitHub ea506d0f68 Merge pull request #26 from NLnetLabs/github_readme
Added README.md file for Github use
2019-05-01 13:18:49 +02:00
W.C.A. Wijngaards 27e334e813 fixup to remove .git from makedist tarballs. 2019-05-01 12:47:53 +02:00
W.C.A. Wijngaards 8e48a5cf5f Merge branch 'makedist_from_git' 2019-05-01 12:28:29 +02:00
Ralph Dolmans 9bc81f31d8 Added README.md file for Github use 2019-05-01 12:28:24 +02:00
W.C.A. Wijngaards c6db87d81d - Update makedist for git. 2019-05-01 12:27:19 +02:00
W.C.A. Wijngaards f90e80d3bc update makedist for git 2019-05-01 12:14:41 +02:00
e60f92ea29 Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:41:56 +02:00
46b5e96c54 Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:41:45 +02:00
f5a197f96e Update services/outside_network.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:25:45 +02:00
196654efec Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:25:09 +02:00
a9c8d00d63 Update services/outside_network.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:25:04 +02:00
5e4cfcc665 Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:24:45 +02:00
193cb2fcc4 Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:23:23 +02:00
b57a2f15db Update services/authzone.c
Co-Authored-By: wtoorop <willem@nlnetlabs.nl>
2019-04-29 11:23:11 +02:00
wtooropandGitHub 8d2c08befd Merge pull request #4 from wcawijngaards/features/XoT
Fix test code for call change for XoT.
2019-04-29 10:58:49 +02:00
W.C.A. Wijngaards d9a9f73e82 Fix test code for call change for XoT. 2019-04-29 10:52:25 +02:00
wtooropandGitHub e19da1b619 Merge pull request #3 from wcawijngaards/features/XoT
Fixup fd pass.
2019-04-29 10:44:06 +02:00
W.C.A. Wijngaards 6ce60bcb61 Fixup fd pass. 2019-04-29 10:40:12 +02:00
Wouter WijngaardsandGitHub ff026a1f3c Merge branch 'master' into features/XoT 2019-04-29 10:32:27 +02:00
wtooropandGitHub a37730cee8 Merge pull request #2 from wcawijngaards/features/XoT
Review changes for the XoT branch
2019-04-29 10:27:15 +02:00
W.C.A. Wijngaards af11b54071 Review changes for the XoT branch
With doc, SSL setup function, and function parameter doc.
2019-04-29 10:25:19 +02:00
Ralph Dolmans a7f68865e4 - Make IXFR deletion more robust 2019-04-25 20:00:56 +02:00
Ralph Dolmans 8dac8c00ce - Don't attempt an RPZ delete for unsupported actions 2019-04-25 19:02:17 +02:00
Ralph Dolmans 83bf2fd253 - locking issues 2019-04-25 16:14:39 +02:00
Wouter Wijngaards 2a78803049 - Fix wrong query name in local zone redirect answers with a CNAME,
the copy of the local alias is in unpacked form.


git-svn-id: file:///svn/unbound/trunk@5175 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-25 14:07:42 +00:00
Ralph Dolmans 46acf0f99d Merge branch 'feature/rpz' of github.com:ralphdolmans/unbound into feature/rpz 2019-04-25 14:47:09 +02:00
Ralph Dolmans ba67920f9a - IXFR/AXFR support for RPZ 2019-04-25 14:46:45 +02:00
Ralph DolmansandGitHub 186c9e8e82 Merge pull request #5 from NLnetLabs/master
bring fork up to date
2019-04-25 14:43:02 +02:00
Ralph Dolmans edf1ad369a - Scrub RRs from answer section when reusing NXDOMAIN message for subdomain
answers.
 - For harden-below-nxdomain: do not consider a name to be non-exitent when
   message contains a CNAME record.


git-svn-id: file:///svn/unbound/trunk@5174 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 15:09:15 +00:00
Wouter Wijngaards 52ea271a65 Remove lint, gives parse errors on system headers.
git-svn-id: file:///svn/unbound/trunk@5173 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 11:34:12 +00:00
Wouter Wijngaards ae54e9013b Add splint to run make lint.
git-svn-id: file:///svn/unbound/trunk@5172 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 11:29:31 +00:00
Wouter Wijngaards 8a3ae4d08a See if make lint works.
git-svn-id: file:///svn/unbound/trunk@5171 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 11:26:07 +00:00
Wouter Wijngaards 1cc54b080a Brackets to stop exiting from the build script.
git-svn-id: file:///svn/unbound/trunk@5170 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 10:41:24 +00:00
Wouter Wijngaards 63171a2522 Disable flto for correct warning report.
git-svn-id: file:///svn/unbound/trunk@5169 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 10:30:33 +00:00
Wouter Wijngaards 2e023a5699 Printout with exit code.
git-svn-id: file:///svn/unbound/trunk@5168 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 10:18:32 +00:00
Wouter Wijngaards 1c1fc36d76 Prinout analysis output (if any).
git-svn-id: file:///svn/unbound/trunk@5167 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 10:05:17 +00:00
Wouter Wijngaards 42d7db578a Fix run directory for clang analysis.
git-svn-id: file:///svn/unbound/trunk@5166 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 09:49:11 +00:00
Wouter Wijngaards d4a6380562 Run clang analysis from travis.
git-svn-id: file:///svn/unbound/trunk@5165 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 09:40:54 +00:00
Wouter Wijngaards 8133251662 Fix to libssl-dev
git-svn-id: file:///svn/unbound/trunk@5164 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 09:35:07 +00:00
Wouter Wijngaards 5a8d314ce3 fixup to libopenssl-dev.
git-svn-id: file:///svn/unbound/trunk@5163 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 09:32:58 +00:00
Wouter Wijngaards 99f36a4e1e - travis build file.
git-svn-id: file:///svn/unbound/trunk@5162 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-18 09:30:35 +00:00
Wouter Wijngaards 61a28c2ee5 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@5161 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-16 13:21:22 +00:00
Wouter Wijngaards 2552a81b40 - Better braces in if statement in TCP fastopen code.
git-svn-id: file:///svn/unbound/trunk@5160 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-16 12:53:50 +00:00
Wouter Wijngaards ab6f1d0fc7 - Fix tls write event for read state change to re-call SSL_write and
not resume the TLS handshake.


git-svn-id: file:///svn/unbound/trunk@5159 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-15 11:52:21 +00:00
Wouter Wijngaards c8a56bfa8f - Squelch SSL read and write connection reset by peer and broken pipe
messages.  Verbosity 2 and higher enables them.


git-svn-id: file:///svn/unbound/trunk@5158 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 15:04:32 +00:00
George Thessalonikefs d1150541bb - Update python documentation for init_standard().
- Typos.


git-svn-id: file:///svn/unbound/trunk@5157 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 15:03:04 +00:00
Wouter Wijngaards ead84a5a64 Nicer.
git-svn-id: file:///svn/unbound/trunk@5156 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 13:51:08 +00:00
Wouter Wijngaards c6369e9ffa - Fix that auth zone fails over to next master for timeout in tcp.
git-svn-id: file:///svn/unbound/trunk@5155 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 13:41:53 +00:00
Ralph Dolmans 74f11b852c - apply chroot to auth-zone zonefile in unbound-checkconf 2019-04-11 15:07:49 +02:00
Wouter Wijngaards 474afc9016 - Fix that auth zone uses correct network type for sockets for
SOA serial probes.  This fixes that probes fail because earlier
  probe addresses are unreachable.


git-svn-id: file:///svn/unbound/trunk@5154 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-11 08:00:33 +00:00
Ralph Dolmans edcf2ddd12 - Fix locking issue
- Fixes for compiler warnings
2019-04-10 11:53:08 +02:00
Wouter Wijngaards bd3c02bd59 - Fix to wipe ssl ticket keys from memory with explicit_bzero,
if available.


git-svn-id: file:///svn/unbound/trunk@5153 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-08 14:42:08 +00:00
Wouter Wijngaards 32b1d900ff Add explanation to changelog.
git-svn-id: file:///svn/unbound/trunk@5152 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-08 14:36:00 +00:00
Wouter Wijngaards 4eac399dfd - Fix #17: Add python module example from Jan Janak, that is a
plugin for the Unbound DNS resolver to resolve DNS records in
  multicast DNS [RFC 6762] via Avahi.


git-svn-id: file:///svn/unbound/trunk@5151 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-08 14:34:58 +00:00
Wouter Wijngaards c26fc84945 - verbose information about auth zone lookup process, also lookup
start, timeout and fail.


git-svn-id: file:///svn/unbound/trunk@5150 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-08 12:42:09 +00:00
Wouter Wijngaards 2b47ca080e - Fix to use event_assign with libevent for thread-safety.
git-svn-id: file:///svn/unbound/trunk@5149 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-08 11:02:34 +00:00
Ralph Dolmans c66e47c372 Initial RPZ commit - now with all files 2019-04-05 17:39:10 +02:00
Ralph Dolmans 9274d2630e Initial RPZ commit 2019-04-05 17:38:43 +02:00
Wouter Wijngaards 348cbab016 - Fix to reinit event structure for accepted TCP (and TLS) sockets.
git-svn-id: file:///svn/unbound/trunk@5148 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-05 14:11:28 +00:00
Ralph DolmansandGitHub b43b8d47f8 Merge pull request #3 from NLnetLabs/master
bring fork up-to-date with upstream
2019-04-05 15:55:49 +02:00
Wouter Wijngaards a777329b7f - Fix spelling error in log output for event method.
git-svn-id: file:///svn/unbound/trunk@5147 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-04 14:28:39 +00:00
Willem Toorop 92121f7878 Report XoT failure as XoT failure, not https 2019-04-03 12:41:14 +02:00
Wouter Wijngaards ce8167a3bb - Fix auth-zone NSEC3 response for wildcard nodata answers,
include the closest encloser in the answer.


git-svn-id: file:///svn/unbound/trunk@5146 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-03 06:36:40 +00:00
Wouter Wijngaards 937523285a - Move goto label in answer_from_cache to the end of the function
where it is more visible.


git-svn-id: file:///svn/unbound/trunk@5145 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-03 05:32:28 +00:00
Wouter Wijngaards 8a0de6b519 - Fix for auth zone nsec3 ent fix for wildcard nodata.
git-svn-id: file:///svn/unbound/trunk@5144 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-02 14:28:36 +00:00
Wouter Wijngaards e338143639 - Fix for out of bounds integers, thanks to OSTIF audit. It is in
allocation debug code.


git-svn-id: file:///svn/unbound/trunk@5143 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-02 12:28:20 +00:00
Wouter Wijngaards 59570b0413 - Fix auth-zone NSEC3 response for empty nonterminals with exact
match nsec3 records.


git-svn-id: file:///svn/unbound/trunk@5142 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-04-02 12:21:41 +00:00
Wouter Wijngaards 78adebf8ec - Fix crash if tls-servic-pem not filled in when necessary.
git-svn-id: file:///svn/unbound/trunk@5141 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-25 08:51:17 +00:00
Wouter Wijngaards b75c37252c - Fix that tls-session-ticket-keys: "" on its own in unbound.conf
disables the tls session ticker key calls into the OpenSSL API.


git-svn-id: file:///svn/unbound/trunk@5140 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-25 08:47:14 +00:00
Willem Toorop 48ad6477eb AXFR over TLS
Enable by specifying an auth name, like this:
```
auth-zone:
        name: nlnetlabs.nl
        master: 185.49.140.60#ns.nlnetlabs.nl
```
2019-03-24 10:43:57 +01:00
Wouter Wijngaards 296f28e8d0 - Fix #4240: Fix whitespace cleanup in example.conf.
git-svn-id: file:///svn/unbound/trunk@5139 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-21 12:14:20 +00:00
Wouter Wijngaards 83e2cade5b - add type CAA to libpyunbound (accessing libunbound from python).
git-svn-id: file:///svn/unbound/trunk@5138 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-19 12:14:52 +00:00
Wouter Wijngaards ce0628ee55 - Fix #4239: set NOTIMPL when deny-any is enabled, for RFC8482.
git-svn-id: file:///svn/unbound/trunk@5137 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-18 09:26:06 +00:00
Wouter Wijngaards bb5251da66 - Add log message, at verbosity 4, that says the query is encrypted
with TLS, if that is enabled for the query.


git-svn-id: file:///svn/unbound/trunk@5136 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-18 08:41:39 +00:00
Wouter Wijngaards bfd0c5ec85 1.9.1 on 12 March 2019. Trunk has 1.9.2 in development.
git-svn-id: file:///svn/unbound/trunk@5135 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-12 09:33:18 +00:00
Wouter Wijngaards 8092cd6331 - Fix for #4233: guard use of NDEBUG, so that it can be passed in
CFLAGS into configure.


git-svn-id: file:///svn/unbound/trunk@5133 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-07 08:34:00 +00:00
Wouter Wijngaards 7105ea9293 - Tag release 1.9.1rc1.
git-svn-id: file:///svn/unbound/trunk@5132 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-05 08:48:15 +00:00
Philipp Serr efb3697332 Merge branch 'dev/pythonmod-multi-instance/v1.9.0' into dev/all-merged/master 2019-03-02 14:35:19 +01:00
Philipp Serr 56a174bb0f Merge branch 'dev/pythonmod-data/v1.9.0' into dev/all-merged/master 2019-03-02 14:34:58 +01:00
Philipp Serr 9d2980de1a Merge branch 'dev/module_ext_state/v1.9.0' into dev/all-merged/master 2019-03-02 14:34:41 +01:00
Philipp Serr bfae29866b Document how to configure multiple python modules 2019-03-02 14:32:49 +01:00
Philipp Serr b248654aab Support multiple python module instances
This commit adds proper support for multiple instances of the python
module: When more than one instance is added to the module list, the
first instance loads the first script specified in the `python:`
configuration section. The second instance loads the second script,
and so on.

When there are more module instances in the module list than there are
scripts in the `python:` section, an error is raised during
initialization and unbound won't start. When more scripts than module
instances are provided, the surplus scripts are ignored.
2019-03-02 14:32:48 +01:00
Philipp Serr 7cc4ff05ad Initialize per-query qdata and per-module mod_env
The python module used to assign None to the per-query (qdata argument)
and per-module (mod_env variable) data stores. Hence, there was no
obvious way for python code to use these data stores.

This commit initializes both data stores with a dict instance.
2019-03-02 09:26:57 +01:00
Philipp Serr b4a9031cdb Add module_restart_next definition to swig file 2019-03-02 09:25:14 +01:00
Wouter Wijngaards 16cc196bf2 - output forwarder log in ssl_req_order test.
git-svn-id: file:///svn/unbound/trunk@5130 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-03-01 12:38:53 +00:00
Wouter Wijngaards c79a99a577 Fix to account for tabs as well.
git-svn-id: file:///svn/unbound/trunk@5129 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-28 12:06:04 +00:00
Wouter Wijngaards a82c0eeece - Print correct module that failed when module-config is wrong.
git-svn-id: file:///svn/unbound/trunk@5128 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-28 09:56:45 +00:00
Wouter Wijngaards a62c1135fe - Remove memory leak on pythonmod python2 script file init.
- Remove swig gcc8 python function cast warnings, they are ignored.


git-svn-id: file:///svn/unbound/trunk@5127 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-28 09:12:54 +00:00
Wouter Wijngaards ba0cad0bc3 Fixup for python 2
git-svn-id: file:///svn/unbound/trunk@5126 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-27 14:22:55 +00:00
Wouter Wijngaards 7c1f9699d8 - Fix for python module on Windows, fix fopen.
git-svn-id: file:///svn/unbound/trunk@5125 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-27 14:14:08 +00:00
Wouter Wijngaards 33a814683b - Fix #14: contrib/unbound.init: Fix wrong comparison judgment
before copying.


git-svn-id: file:///svn/unbound/trunk@5124 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-27 06:58:10 +00:00
Wouter Wijngaards beebe5ba0c - Fix #4229: Unbound man pages lack information, about access-control
order and local zone tags, and elements in views.


git-svn-id: file:///svn/unbound/trunk@5123 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-27 06:56:21 +00:00
Wouter Wijngaards 225534e5ab - Fix #4227: pair event del and add for libevent for tcp_req_info.
git-svn-id: file:///svn/unbound/trunk@5122 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-25 15:48:27 +00:00
Wouter Wijngaards 3599fd9c60 - In man page and example config explain that most modules have to
be listed at the start of module-config.


git-svn-id: file:///svn/unbound/trunk@5121 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-21 10:03:11 +00:00
Wouter Wijngaards 5b162ead92 - In example.conf explain where to put cachedb module in module-config.
git-svn-id: file:///svn/unbound/trunk@5120 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-21 09:48:38 +00:00
Wouter Wijngaards 62428e17f6 - Fix the error for unknown module in module-config is understandable,
and explains it was not compiled in and where to see the list.


git-svn-id: file:///svn/unbound/trunk@5119 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-21 09:40:25 +00:00
Wouter Wijngaards 079253670e - Fix pythonmod include and sockaddr_un ifdefs for compile on
Windows, and for libunbound.


git-svn-id: file:///svn/unbound/trunk@5118 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-20 15:19:58 +00:00
Wouter Wijngaards 91e863138b - Print query name and IP address when domain rate limit exceeded.
git-svn-id: file:///svn/unbound/trunk@5117 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-18 15:53:02 +00:00
Wouter Wijngaards d1e92a0ebd - Spaces instead of tabs in that log message.
git-svn-id: file:///svn/unbound/trunk@5116 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-18 12:32:42 +00:00
Wouter Wijngaards 3949bf2c82 - Print query name with ip_ratelimit exceeded log lines.
git-svn-id: file:///svn/unbound/trunk@5115 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-18 10:40:41 +00:00
Wouter Wijngaards a41375411e - Fix capsforid canonical sort qsort callback.
git-svn-id: file:///svn/unbound/trunk@5114 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-14 08:16:15 +00:00
Wouter Wijngaards 030832cf12 - make depend, with newer gcc, nicer layout.
git-svn-id: file:///svn/unbound/trunk@5113 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-11 10:02:45 +00:00
Wouter Wijngaards 49a36d98bb - Fix #13: Remove left-over requirements on OpenSSL >= 1.1.0 for
cert name matching, from man page.


git-svn-id: file:///svn/unbound/trunk@5112 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-11 09:59:47 +00:00
Wouter Wijngaards ddae2885bd Also fix this unit test for qname minimisation
asked queries that have to be added to the provided answer list.


git-svn-id: file:///svn/unbound/trunk@5111 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-11 09:56:57 +00:00
Wouter Wijngaards 19193fd534 - Fix recursion lame test for qname minimisation asked queries,
that were not present in the set of prepared answers.


git-svn-id: file:///svn/unbound/trunk@5110 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-11 09:49:13 +00:00
Wouter Wijngaards 4e249c96e8 - Note default for module-config in man page.
git-svn-id: file:///svn/unbound/trunk@5109 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-11 08:53:59 +00:00
Wouter Wijngaards cae8361dcd - Fix #4225: clients seem to erroneously receive no answer with
DNS-over-TLS and qname-minimisation.


git-svn-id: file:///svn/unbound/trunk@5108 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-08 15:05:24 +00:00
Wouter Wijngaards 429e130768 - Fix that qname minimisation does not skip a label when missing
nameserver targets need to be fetched.


git-svn-id: file:///svn/unbound/trunk@5107 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-08 13:30:51 +00:00
Wouter Wijngaards 20d57ec58b - Fix #4206: OpenSSL 1.0.2 hostname verification for FreeBSD 11.2.
git-svn-id: file:///svn/unbound/trunk@5106 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-07 08:34:28 +00:00
Wouter Wijngaards e43c3daec2 Trunk has 1.9.1 in development.
git-svn-id: file:///svn/unbound/trunk@5105 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-05 09:26:39 +00:00
Wouter Wijngaards 64c4e69b07 Release version numbers.
git-svn-id: file:///svn/unbound/trunk@5102 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-05 08:17:36 +00:00
Wouter Wijngaards a9e028564d Keep scratch region free on exit.
git-svn-id: file:///svn/unbound/trunk@5101 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-04 15:48:21 +00:00
Wouter Wijngaards 99994a26b0 - Perform canonical sort for 0x20 capsforid compare of replies,
this sorts rrsets in the authority and additional section before
  comparison, so that out of order rrsets do not cause failure.


git-svn-id: file:///svn/unbound/trunk@5100 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-04 15:22:08 +00:00
Wouter Wijngaards fe97f25b75 - Fix that log-replies prints the correct name for local-alias
names, for names that have a CNAME in local-data configuration.
  It logs the original query name, not the target of the CNAME.
- Add local-zone type inform_redirect, which logs like type inform,
  and redirects like type redirect.


git-svn-id: file:///svn/unbound/trunk@5099 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-02-04 09:51:27 +00:00
Wouter Wijngaards 281030d576 - Wipe TLS session key data from memory on exit.
git-svn-id: file:///svn/unbound/trunk@5098 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 15:25:27 +00:00
Wouter Wijngaards 8992e8c91f note ticker number.
git-svn-id: file:///svn/unbound/trunk@5097 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 12:35:33 +00:00
Wouter Wijngaards b34a6defc1 - Fix OpenSSL without ENGINE support compilation.
git-svn-id: file:///svn/unbound/trunk@5096 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 12:33:28 +00:00
Wouter Wijngaards 8cf5eae166 - Fix OpenSSL without ENGINE support compilation.
git-svn-id: file:///svn/unbound/trunk@5095 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 11:34:11 +00:00
Wouter Wijngaards df8f236b62 - For openssl 1.0.2 use the CRYPTO_THREADID locking callbacks,
still supports the set_id_callback previous API.  And for 1.1.0
  no locking callbacks are needed.


git-svn-id: file:///svn/unbound/trunk@5094 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 11:31:55 +00:00
Wouter Wijngaards 273ff1201b - fixed pkg-config operations, PKG_PROG_PKG_CONFIG moved out of
conditional section, fixes systemd builds, from Enrico Scholz.


git-svn-id: file:///svn/unbound/trunk@5093 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 10:21:54 +00:00
Wouter Wijngaards 91f585ed38 - improve documentation for forward-first.
git-svn-id: file:///svn/unbound/trunk@5092 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 09:37:06 +00:00
Wouter Wijngaards b9b226bdea - improve documentation for tls-service-key.
git-svn-id: file:///svn/unbound/trunk@5091 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 09:22:48 +00:00
Wouter Wijngaards 8fffdca2a6 - Set ub_ctx_set_tls call signature in ltrace config file for
libunbound in contrib/libunbound.so.conf.


git-svn-id: file:///svn/unbound/trunk@5090 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-31 09:16:15 +00:00
Ralph Dolmans 723845b350 - Fix case in which query timeout can result in marking delegation as
edns_lame_known.


git-svn-id: file:///svn/unbound/trunk@5089 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-30 13:44:19 +00:00
Wouter Wijngaards 31b677b35f - Fix locking for libunbound context setup with broken port config.
git-svn-id: file:///svn/unbound/trunk@5088 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-29 16:07:07 +00:00
Wouter Wijngaards c2e3baa81a - Fix #4224: auth_xfr_notify.rpl test broken due to typo
git-svn-id: file:///svn/unbound/trunk@5087 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-29 14:37:35 +00:00
Wouter Wijngaards 7273b35243 - Fix spelling of tls-ciphers in example.conf.in.
git-svn-id: file:///svn/unbound/trunk@5086 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-29 12:43:56 +00:00
Wouter Wijngaards dfe8e0dfa2 - set version to 1.9.0 for release.
git-svn-id: file:///svn/unbound/trunk@5084 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-29 08:07:50 +00:00
Wouter Wijngaards 7ad8ffccf5 - List example config for root zone copy locally hosted with auth-zone
as suggested from draft-ietf-dnsop-7706-bis-02.  But with updated
  B root address.



git-svn-id: file:///svn/unbound/trunk@5083 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-28 08:49:12 +00:00
Wouter Wijngaards 065c7c5dd8 - List d.root-servers.net as a host that allows AXFR in example.conf
config file, as suggested from draft-ietf-dnsop-7706-bis-02.


git-svn-id: file:///svn/unbound/trunk@5082 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-28 08:39:50 +00:00
Wouter Wijngaards 71744b8bb2 - Set build system for added call in the libunbound API.
git-svn-id: file:///svn/unbound/trunk@5081 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-28 08:26:10 +00:00
Wouter Wijngaards 3d2dfc4769 - ub_ctx_set_tls call for libunbound that enables DoT for the machines
set with ub_ctx_set_fwd.  Patch from Florian Obser.


git-svn-id: file:///svn/unbound/trunk@5080 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-28 08:22:08 +00:00
Wouter Wijngaards 5e4f0d65ce Fix year on recent commit messages.
git-svn-id: file:///svn/unbound/trunk@5079 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 16:19:37 +00:00
Wouter Wijngaards aae44940c7 - output of newer lex 2.6.1 and bison 3.0.5.
git-svn-id: file:///svn/unbound/trunk@5078 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 13:00:09 +00:00
Wouter Wijngaards 062c2cacfc - remove compile warnings from libnettle compile.
git-svn-id: file:///svn/unbound/trunk@5077 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 12:58:06 +00:00
Wouter Wijngaards ce65cdde71 - no lock when threads disabled in tcp request buffer count.
git-svn-id: file:///svn/unbound/trunk@5076 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 12:54:40 +00:00
Wouter Wijngaards b005fcd87b - updated contrib/fastrpz.patch to cleanly diff.
git-svn-id: file:///svn/unbound/trunk@5075 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 12:50:45 +00:00
Wouter Wijngaards f11d6653d6 - Fix that tcp for auth zone and outgoing does not remove and
then gets the ssl read again applied to the deleted commpoint.


git-svn-id: file:///svn/unbound/trunk@5074 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-25 12:46:15 +00:00
Wouter Wijngaards 20d5e35576 - Moved includes and make depend.
git-svn-id: file:///svn/unbound/trunk@5073 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 16:10:05 +00:00
Wouter Wijngaards 3028fa50a8 - Patch from Florian Obser fixes some compiler warnings:
include mini_event.h to have a prototype for mini_ev_cmp
  include edns.h to have a prototype for apply_edns_options
  sldns_wire2str_edns_keepalive_print is only called in the wire2str,
  module declare it static to get rid of compiler warning:
  no previous prototype for function
  infra_find_ip_ratedata() is only called in the infra module,
  declare it static to get rid of compiler warning:
  no previous prototype for function
  do not shadow local variable buf in authzone
  auth_chunks_delete and az_nsec3_findnode are only called in the
  authzone module, declare them static to get rid of compiler warning:
  no previous prototype for function...
  copy_rrset() is only called in the respip module, declare it
  static to get rid of compiler warning:
  no previous prototype for function 'copy_rrset'
  no need for another variable "r"; gets rid of compiler warning:
  declaration shadows a local variable in libunbound.c
  no need for another variable "ns"; gets rid of compiler warning:
  declaration shadows a local variable in iterator.c



git-svn-id: file:///svn/unbound/trunk@5072 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 16:05:00 +00:00
Wouter Wijngaards e584933b2b make fix nicer in perf testcode.
git-svn-id: file:///svn/unbound/trunk@5071 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 12:52:26 +00:00
Wouter Wijngaards d48abb9a84 clang analysis fixes, assert arc4random buffer in init,
no check for already checked delegation pointer in iterator,
in testcode check for NULL packet matches, in perf do not copy
from NULL start list when growing capacity.  Adjust host and file
only when present in test header read to please checker.  In
testcode for unknown macro operand give zero result. Initialise the
passed argv array in test code.  In test code add EDNS data
segment copy only when nonempty.


git-svn-id: file:///svn/unbound/trunk@5070 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 11:55:10 +00:00
Wouter Wijngaards 37361a1d10 - Fix unit test for python 3.7 new keyword 'async'.
git-svn-id: file:///svn/unbound/trunk@5069 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 09:37:57 +00:00
Wouter Wijngaards 299cc0c689 - Newer aclocal and libtoolize used for generating configure scripts,
aclocal 1.16.1 and libtoolize 2.4.6.


git-svn-id: file:///svn/unbound/trunk@5068 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 08:57:47 +00:00
Wouter Wijngaards 707e5a915b Neater spaces
git-svn-id: file:///svn/unbound/trunk@5067 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 14:18:24 +00:00
Wouter Wijngaards 649e265d6f - Fix for IXFR fallback to reset counter when IXFR does not timeout.
git-svn-id: file:///svn/unbound/trunk@5066 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 11:52:17 +00:00
Wouter Wijngaards 9d4ca81959 Fixup ssl unit test with example ticket files.
git-svn-id: file:///svn/unbound/trunk@5065 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 10:50:26 +00:00
Wouter Wijngaards 68a57554a6 For TLS session keys, keep config options in order read from file to keep the first one as the first one.
git-svn-id: file:///svn/unbound/trunk@5064 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 10:41:03 +00:00
Wouter Wijngaards cc9fb69911 fix lint and clang analysis errors
git-svn-id: file:///svn/unbound/trunk@5063 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 10:23:02 +00:00
Wouter Wijngaards d3f397c686 More fixes, statistic counter at end of struct for backwards compatibility, man page, free at exit, indent.
git-svn-id: file:///svn/unbound/trunk@5062 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 10:19:04 +00:00
Wouter Wijngaards ed8b859e31 make depend
git-svn-id: file:///svn/unbound/trunk@5061 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 09:44:08 +00:00
Wouter Wijngaards 011a7d8830 - Fixes for patch (includes, declarations, warnings).
git-svn-id: file:///svn/unbound/trunk@5060 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 09:43:47 +00:00
Wouter Wijngaards 510606dd1c - Patch for TLS session resumption from Manabu Sonoda,
enable with tls-session-ticket-keys in unbound.conf.


git-svn-id: file:///svn/unbound/trunk@5059 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 09:35:52 +00:00
Wouter Wijngaards 4e59c8344f - Fix configure to detect SSL_CTX_set_ciphersuites, for better
library compatibility when compiling.


git-svn-id: file:///svn/unbound/trunk@5058 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 08:57:49 +00:00
Wouter Wijngaards 4c8f334c15 another spelling fix.
git-svn-id: file:///svn/unbound/trunk@5057 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 08:48:52 +00:00
Wouter Wijngaards 2f52ecdd9c lex and yacc.
git-svn-id: file:///svn/unbound/trunk@5056 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 08:46:33 +00:00
Wouter Wijngaards 5d82b7c421 - Fixes for the patch, and man page entry.
git-svn-id: file:///svn/unbound/trunk@5055 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 08:45:16 +00:00
Wouter Wijngaards 8ae9f26bce - Patch from Manabu Sonoda with tls-ciphers and tls-ciphersuites
options for unbound.conf.


git-svn-id: file:///svn/unbound/trunk@5054 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-23 08:37:00 +00:00
Wouter Wijngaards 55f560a3ca - Fix that auth zone after IXFR fallback tries the same master.
git-svn-id: file:///svn/unbound/trunk@5053 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 15:44:09 +00:00
Wouter Wijngaards 51caffb454 - Fix for #4219: secondaries not updated after serial change, unbound
falls back to AXFR after IXFR gives several timeout failures.


git-svn-id: file:///svn/unbound/trunk@5052 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 15:36:58 +00:00
Wouter Wijngaards ef1baf94f7 Fix lint and unit test.
git-svn-id: file:///svn/unbound/trunk@5051 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 13:35:33 +00:00
Wouter Wijngaards 8b18d1a0a4 - unbound-control stats has mem.streamwait that counts TCP and TLS
waiting result buffers.


git-svn-id: file:///svn/unbound/trunk@5050 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 13:20:06 +00:00
Wouter Wijngaards 4481b9584c Fix test failure.
git-svn-id: file:///svn/unbound/trunk@5049 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 10:29:01 +00:00
Wouter Wijngaards dec68aa9a9 - Doc for stream-wait-size and unit test.
git-svn-id: file:///svn/unbound/trunk@5048 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 08:52:23 +00:00
Wouter Wijngaards c10712a82b - Fix space calculation for tcp req buffer size.
git-svn-id: file:///svn/unbound/trunk@5047 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-22 08:27:49 +00:00
Wouter Wijngaards d81e2c654f - Add stream-wait-size: 4m config option to limit the maximum
memory used by waiting tcp and tls stream replies.  This avoids
  a denial of service where these replies use up all of the memory.


git-svn-id: file:///svn/unbound/trunk@5046 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 16:20:14 +00:00
Wouter Wijngaards f5dcd84d27 Fix reread of buffer data, better, also for TCP.
git-svn-id: file:///svn/unbound/trunk@5045 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 14:14:12 +00:00
Wouter Wijngaards 7c4911c577 No leaks found.
git-svn-id: file:///svn/unbound/trunk@5044 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 13:45:13 +00:00
Wouter Wijngaards be4583ac84 - Fix that multiple dns fragments can be carried in one TLS frame.
git-svn-id: file:///svn/unbound/trunk@5043 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 13:41:13 +00:00
Wouter Wijngaards 068374740c - Unit tests for ssl out of order processing.
git-svn-id: file:///svn/unbound/trunk@5042 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 13:26:21 +00:00
Wouter Wijngaards f7d63b0927 - Unit test for tcp request reorder and timeouts.
git-svn-id: file:///svn/unbound/trunk@5041 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 13:04:08 +00:00
Wouter Wijngaards 9087b18234 - Fix tcp idle timeout test, for difference in the tcp reply code.
git-svn-id: file:///svn/unbound/trunk@5040 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-21 09:36:01 +00:00
Wouter Wijngaards 19a3907657 - increase mesh max activation count for capsforid long fetches.
git-svn-id: file:///svn/unbound/trunk@5039 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-17 08:58:09 +00:00
Wouter Wijngaards 762920232a - For caps-for-id fallback, use the whitelist to avoid timeout
starting a fallback sequence for it.


git-svn-id: file:///svn/unbound/trunk@5038 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-17 08:50:25 +00:00
Ralph Dolmans f30fe71395 - Get ready for the DNS flag day: remove EDNS lame procedure, do not re-query
without EDNS after timeout.


git-svn-id: file:///svn/unbound/trunk@5037 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-16 10:23:13 +00:00
Wouter Wijngaards ec6f4bab46 comment fixes after review.
git-svn-id: file:///svn/unbound/trunk@5036 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-15 13:42:22 +00:00
Wouter Wijngaards 0d2efc3f3f - Review fixes in out of order processing.
git-svn-id: file:///svn/unbound/trunk@5035 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-15 10:27:00 +00:00
Wouter Wijngaards bb480068fa - In the out of order processing, reset byte count for (potential)
partial read.


git-svn-id: file:///svn/unbound/trunk@5034 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-15 09:24:00 +00:00
Wouter Wijngaards ae9fe1a10e - streamtcp option -a send queries consecutively and prints answers
as they arrive.
- Fix for out of order processing administration quit cleanup.
- unit test for tcp out of order processing.


git-svn-id: file:///svn/unbound/trunk@5033 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-14 15:52:50 +00:00
Wouter Wijngaards dd19026e91 - Initial commit for out-of-order processing for TCP and TLS.
git-svn-id: file:///svn/unbound/trunk@5032 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-11 14:12:27 +00:00
Wouter Wijngaards 42d2c04ae1 - Log query name for looping module errors.
git-svn-id: file:///svn/unbound/trunk@5031 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-09 13:57:14 +00:00
Wouter Wijngaards db2557826a - Fix NSEC3 record that is returned in wildcard replies from
auth-zone zones with NSEC3 and wildcards.


git-svn-id: file:///svn/unbound/trunk@5030 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-08 14:39:31 +00:00
Wouter Wijngaards 11d98df304 - Fix syntax in comment of local alias processing.
git-svn-id: file:///svn/unbound/trunk@5029 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-08 13:29:38 +00:00
Wouter Wijngaards ec84fd2ca6 - Add contrib/unbound-fuzzme.patch from Jacob Hoffman-Andrews,
the patch adds a program used for fuzzing.


git-svn-id: file:///svn/unbound/trunk@5028 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-07 15:01:24 +00:00
Wouter Wijngaards fe6eb5f665 - Document interaction between the tls-upstream option in the server
section and forward-tls-upstream option in the forward-zone sections.


git-svn-id: file:///svn/unbound/trunk@5027 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-07 10:52:08 +00:00
Wouter Wijngaards 90b00dfe57 - On FreeBSD warn if systcl settings do not allow server TCP FASTOPEN,
and server tcp fastopen is enabled at compile time.


git-svn-id: file:///svn/unbound/trunk@5026 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-07 09:06:41 +00:00
Wouter Wijngaards 023411f975 - Fix for crash in dns64 module if response is null.
git-svn-id: file:///svn/unbound/trunk@5025 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-12 16:03:05 +00:00
Wouter Wijngaards a97bfa08ec trunk had 1.8.2, Which became 1.8.3 on 11 december with only the dns64 fix of 6 dec.
Trunk then became 1.8.4 in development.


git-svn-id: file:///svn/unbound/trunk@5024 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-11 11:08:57 +00:00
Wouter Wijngaards 9c2a45c59e svn trunk 1.8.2, Which became 1.8.3 on 11 december with only the dns64 fix of 6 dec.
Trunk then became 1.8.4 in development.


git-svn-id: file:///svn/unbound/trunk@5020 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-11 09:44:16 +00:00
Wouter Wijngaards 1b72e814e7 - Fixup openssl 1.0.2 compile
git-svn-id: file:///svn/unbound/trunk@5019 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 14:36:43 +00:00
Wouter Wijngaards 71b078611f - Fix #4206: support openssl 1.0.2 for TLS hostname verification,
alongside the 1.1.0 and later support that is already there.


git-svn-id: file:///svn/unbound/trunk@5018 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 14:27:24 +00:00
Wouter Wijngaards 1ef8cfcac5 - Fix for FreeBSD port make with dnscrypt and dnstap enabled.
git-svn-id: file:///svn/unbound/trunk@5017 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 13:14:57 +00:00
Wouter Wijngaards 6b8e316663 - Fix for FreeBSD port make with dnscrypt and dnstap enabled.
git-svn-id: file:///svn/unbound/trunk@5016 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 10:41:33 +00:00
Wouter Wijngaards 21d03697ca - ip-ratelimit-factor of 1 allows all traffic through, instead of the
previous blocking everything.


git-svn-id: file:///svn/unbound/trunk@5015 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 09:38:50 +00:00
Wouter Wijngaards 4c7f824e0a - Fix config parser memory leaks.
git-svn-id: file:///svn/unbound/trunk@5014 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-10 09:27:49 +00:00
Wouter Wijngaards 42244e1b4d - Fix dns64 allocation in wrong region for returned internal queries.
git-svn-id: file:///svn/unbound/trunk@5013 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-06 08:04:37 +00:00
Wouter Wijngaards 2981adac66 trunk has 1.8.3 in development.
git-svn-id: file:///svn/unbound/trunk@5012 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-04 09:30:03 +00:00
Wouter Wijngaards 91971db3d0 And document.
git-svn-id: file:///svn/unbound/trunk@5009 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 14:56:12 +00:00
Wouter Wijngaards b4e8ab4254 Fix test.
git-svn-id: file:///svn/unbound/trunk@5008 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 14:54:29 +00:00
Wouter Wijngaards 198a7ce74d - cache-max-ttl also defines upperbound of initial TTL in response.
git-svn-id: file:///svn/unbound/trunk@5007 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 14:50:47 +00:00
Wouter Wijngaards e103490376 Cleaner image.
git-svn-id: file:///svn/unbound/trunk@5006 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 11:24:51 +00:00
Wouter Wijngaards f3658c210c Fixup icon lines.
git-svn-id: file:///svn/unbound/trunk@5005 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 11:16:17 +00:00
Wouter Wijngaards 1ba3682d9b remove unnecessary files, they are in combined.ico.
git-svn-id: file:///svn/unbound/trunk@5004 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 10:39:35 +00:00
Wouter Wijngaards 39b7468bab Fixup icon more, for small icon display on Windows 10.
git-svn-id: file:///svn/unbound/trunk@5003 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 10:09:54 +00:00
Wouter Wijngaards a42e9aaaba more fixes, higher colormap.
git-svn-id: file:///svn/unbound/trunk@5002 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 09:06:05 +00:00
Wouter Wijngaards a9b7194485 - Fix icon, no ragged edges and nicer resolutions available, for eg.
Win 7 and Windows 10 display.


git-svn-id: file:///svn/unbound/trunk@5001 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-03 08:30:55 +00:00
Wouter Wijngaards 2ad55ba791 - log-tag-queryreply: yes in unbound.conf tags the log-queries and
log-replies in the log file for easier log filter maintenance.


git-svn-id: file:///svn/unbound/trunk@5000 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-30 09:45:37 +00:00
Wouter Wijngaards ac8dc59341 - Patch for typo in unbound.conf man page.
git-svn-id: file:///svn/unbound/trunk@4999 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-30 08:33:50 +00:00
Wouter Wijngaards c1c1cd97e7 - Remove clang analysis warnings.
git-svn-id: file:///svn/unbound/trunk@4998 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 14:39:26 +00:00
Wouter Wijngaards b23c373f4d - Refuse to start with no ports.
git-svn-id: file:///svn/unbound/trunk@4997 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 14:26:16 +00:00
Wouter Wijngaards e6da6c251c Fixup test.
git-svn-id: file:///svn/unbound/trunk@4996 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 13:09:46 +00:00
Wouter Wijngaards 81ded6124d - Fix that unbound-checkconf does not complains if the config file
is not placed inside the chroot.


git-svn-id: file:///svn/unbound/trunk@4995 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 12:55:13 +00:00
Wouter Wijngaards c417f733af - tag for 1.8.2rc1.
git-svn-id: file:///svn/unbound/trunk@4994 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 09:27:19 +00:00
Wouter Wijngaards 63dcbe3d75 - Fix chroot auth-zone fix to remove chroot prefix.
git-svn-id: file:///svn/unbound/trunk@4992 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 08:27:47 +00:00
Wouter Wijngaards fb342b73d3 - iana portlist updated.
git-svn-id: file:///svn/unbound/trunk@4991 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 08:27:22 +00:00
Wouter Wijngaards cccb5094a4 - Fix clang analysis for outside directory build test.
git-svn-id: file:///svn/unbound/trunk@4990 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-28 13:34:31 +00:00
Wouter Wijngaards 3330d5296c - Fix leak in chroot fix for auth-zone.
git-svn-id: file:///svn/unbound/trunk@4989 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-28 12:37:52 +00:00
Wouter Wijngaards f95f98b12a - Update contrib fastrpz patch for latest release.
git-svn-id: file:///svn/unbound/trunk@4988 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 15:47:52 +00:00
Wouter Wijngaards 7bb6358540 Better fix.
git-svn-id: file:///svn/unbound/trunk@4987 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 13:46:44 +00:00
Wouter Wijngaards ca33c52086 - Fix windows compile for new rrset roundrobin fix.
git-svn-id: file:///svn/unbound/trunk@4986 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 13:35:29 +00:00
Wouter Wijngaards aba3ba738f - Put new logos into windows installer.
git-svn-id: file:///svn/unbound/trunk@4985 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 13:24:40 +00:00
Wouter Wijngaards 60da4369a4 - stat count SERVFAIL downstream auth-zone queries for expired zones.
git-svn-id: file:///svn/unbound/trunk@4984 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 12:42:59 +00:00
Wouter Wijngaards b04e84ab9e - auth-zone give SERVFAIL when expired, fallback activates when
expired, and this is documented in the man page.


git-svn-id: file:///svn/unbound/trunk@4983 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 12:31:37 +00:00
Wouter Wijngaards d96de4c222 - New and better fix for Fix #4193: Fix that prefetch failure does
not overwrite valid cache entry with SERVFAIL.


git-svn-id: file:///svn/unbound/trunk@4982 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 10:56:45 +00:00
Wouter Wijngaards 0ff5c52657 - Fix #4208: 'stub-no-cache' and 'forward-no-cache' not work.
git-svn-id: file:///svn/unbound/trunk@4981 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 10:29:14 +00:00
Wouter Wijngaards f532367412 Review fix.
git-svn-id: file:///svn/unbound/trunk@4980 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 09:05:00 +00:00
Wouter Wijngaards 94996b8a29 - Fix DNS64 to not store intermediate results in cache, this avoids
other threads from picking up the wrong data.  The module restores
  the previous no_cache_store setting when the the module is finished.


git-svn-id: file:///svn/unbound/trunk@4979 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 08:43:38 +00:00
Wouter Wijngaards 59e6f149a7 - Fix that unbound-control can send file for view_local_datas.
git-svn-id: file:///svn/unbound/trunk@4978 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-26 13:55:36 +00:00
Wouter Wijngaards 470806b097 - Add unbound-control view_local_datas command, like local_datas.
git-svn-id: file:///svn/unbound/trunk@4977 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-26 13:37:23 +00:00
Wouter Wijngaards 8fcc82171a - Fix #4193: Fix that prefetch failure does not overwrite valid cache
entry with SERVFAIL.


git-svn-id: file:///svn/unbound/trunk@4976 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-26 10:25:50 +00:00
Wouter Wijngaards 4d5b32ee59 - Fix to not set GLOB_NOSORT so the unbound.conf include: files are
sorted and in a predictable order.


git-svn-id: file:///svn/unbound/trunk@4975 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-26 09:54:34 +00:00
Wouter Wijngaards 816aa50dfc - make depend.
git-svn-id: file:///svn/unbound/trunk@4974 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 15:57:15 +00:00
Wouter Wijngaards 068c52d8f5 - Fix that empty zonefile means the zonefile is not set and not used.
git-svn-id: file:///svn/unbound/trunk@4973 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 15:55:18 +00:00
Wouter Wijngaards 692caffe2c - auth zone zonefiles can be in a chroot, the chroot directory
components are removed before use.


git-svn-id: file:///svn/unbound/trunk@4972 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 15:51:09 +00:00
Wouter Wijngaards c97bb52d77 - Fix #4209: Crash in libunbound when called from getdns.
git-svn-id: file:///svn/unbound/trunk@4971 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 15:07:30 +00:00
Wouter Wijngaards 438634b718 nicer python error log errors.
git-svn-id: file:///svn/unbound/trunk@4970 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 13:47:37 +00:00
Wouter Wijngaards d21cb609a8 - review fixes for python module.
git-svn-id: file:///svn/unbound/trunk@4969 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 13:31:21 +00:00
Wouter Wijngaards 668c0627c0 Fix compare signed with unsigned in python interface for pythonmod
git-svn-id: file:///svn/unbound/trunk@4968 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 13:07:37 +00:00
Wouter Wijngaards de0b6da9f4 - ignore debug python module for test in doxygen output.
git-svn-id: file:///svn/unbound/trunk@4967 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 13:05:26 +00:00
Wouter Wijngaards 5853f90076 - With ./configure --with-pyunbound --with-pythonmodule
PYTHON_VERSION=3.6 or with 2.7 unbound can compile and unit tests
  succeed for the python module.
- pythonmod logs the python error and traceback on failure.


git-svn-id: file:///svn/unbound/trunk@4966 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-22 13:01:29 +00:00
Wouter Wijngaards 022d5131b3 Fixup.
git-svn-id: file:///svn/unbound/trunk@4965 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-21 06:44:24 +00:00
Wouter Wijngaards 7458729d28 - Scrub NS records from NODATA responses as well.
git-svn-id: file:///svn/unbound/trunk@4964 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-21 06:37:00 +00:00
Wouter Wijngaards 7acf6a4a66 - Removed compile warnings in pythonmod sockaddr routines.
git-svn-id: file:///svn/unbound/trunk@4963 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-20 12:28:09 +00:00
Wouter Wijngaards 04d73b9192 - Add patch from Jan Vcelak for pythonmod,
add sockaddr_storage getters, add support for query callbacks,
  allow raw address access via comm_reply and update API documentation.


git-svn-id: file:///svn/unbound/trunk@4962 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-20 12:24:40 +00:00
Wouter Wijngaards f7e99131b9 - Scrub NS records from NXDOMAIN responses to stop fragmentation
poisoning of the cache.


git-svn-id: file:///svn/unbound/trunk@4961 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-20 09:44:40 +00:00
Wouter Wijngaards 069b0b8c90 - Support SO_REUSEPORT_LB in FreeBSD 12 with the so-reuseport: yes
option in unbound.conf.


git-svn-id: file:///svn/unbound/trunk@4960 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-19 09:36:27 +00:00
Ralph Dolmans 1ff7a89433 - added contrib config files to gitignore
git-svn-id: file:///svn/unbound/trunk@4959 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-14 09:51:31 +00:00
Ralph Dolmans 640d1cf929 - Bugfix min-client-subnet-ipv6
git-svn-id: file:///svn/unbound/trunk@4958 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-06 09:44:10 +00:00
Wouter Wijngaards c9955f9fdf - Fix #4152: Logs shows wrong time when using log-time-ascii: yes.
git-svn-id: file:///svn/unbound/trunk@4957 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 13:52:13 +00:00
Wouter Wijngaards 9a877e0e9a - remade makefile dependencies.
(note the make depend just done).


git-svn-id: file:///svn/unbound/trunk@4956 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 09:31:25 +00:00
Wouter Wijngaards 6b49224c85 make depend
git-svn-id: file:///svn/unbound/trunk@4955 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 09:30:57 +00:00
Wouter Wijngaards fd5e4e6019 - Fix #4126: RTT_band too low on VSAT links with 600+ms latency,
adds the option unknown-server-time-limit to unbound.conf that
  can be increased to avoid the problem.


git-svn-id: file:///svn/unbound/trunk@4954 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 09:21:41 +00:00
Wouter Wijngaards 8e2a100460 - Fix #4132: Openness/closeness of RANGE intervals in rpl files.
git-svn-id: file:///svn/unbound/trunk@4953 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 09:01:53 +00:00
Ralph Dolmans 359dcc3c5c Document min-client-subnet-ipv4/6 default value
git-svn-id: file:///svn/unbound/trunk@4952 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 08:55:55 +00:00
Ralph Dolmans 6021341118 - Add min-client-subnet-ipv6 and min-client-subnet-ipv4 options.
git-svn-id: file:///svn/unbound/trunk@4951 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 08:53:50 +00:00
Wouter Wijngaards d5922830d0 - Fix #4141: More randomness to rrset-roundrobin.
git-svn-id: file:///svn/unbound/trunk@4950 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 08:26:40 +00:00
Wouter Wijngaards 23505d30a5 - Fix #4190: Please create a "ANY" deny option, adds the option
deny-any: yes in unbound.conf.  This responds with an empty message
  to queries of type ANY.


git-svn-id: file:///svn/unbound/trunk@4949 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 08:07:37 +00:00
Wouter Wijngaards 0f83653e76 Move rcode code back.
git-svn-id: file:///svn/unbound/trunk@4948 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 07:49:49 +00:00
Wouter Wijngaards 20f0e8ad55 - Fix #4191: NXDOMAIN vs SERVFAIL during dns64 PTR query.
git-svn-id: file:///svn/unbound/trunk@4947 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 07:45:00 +00:00
Ralph Dolmans 140a165ab2 - Add markdel function to ECS slabhash.
- Limit ECS scope returned to client to the scope used for caching.      
 - Make lint like previous #4154 fix. 


git-svn-id: file:///svn/unbound/trunk@4946 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-24 13:50:18 +00:00
Wouter Wijngaards 5fec1c8b1f - Fix #4154: make ECS_MAX_TREESIZE configurable, with
the max-ecs-tree-size-ipv4 and max-ecs-tree-size-ipv6 options.


git-svn-id: file:///svn/unbound/trunk@4945 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 14:54:28 +00:00
Wouter Wijngaards 6bd4060ae0 portability.
git-svn-id: file:///svn/unbound/trunk@4944 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 10:19:30 +00:00
Wouter Wijngaards 84a8415357 - check that the dnstap socket file can be opened and exists, print
error if not.


git-svn-id: file:///svn/unbound/trunk@4943 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 10:17:38 +00:00
Wouter Wijngaards 6429b5c298 - Fix #4192: unbound-control-setup generates keys not readable by
group.


git-svn-id: file:///svn/unbound/trunk@4942 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 10:07:13 +00:00
Ralph Dolmans 6b5e7d78e3 - Change fast-server-num default to 3.
git-svn-id: file:///svn/unbound/trunk@4941 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 09:36:36 +00:00
Ralph Dolmans a8b2c64cbf More lint pleasing
git-svn-id: file:///svn/unbound/trunk@4940 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 16:38:25 +00:00
Ralph Dolmans 9268f0db50 Please lint by using proper types
git-svn-id: file:///svn/unbound/trunk@4939 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 16:33:04 +00:00
Ralph Dolmans 02bd3e2ff1 - Add fast-server-permil and fast-server-num options.
- Deprecate low-rtt and low-rtt-permil options.


git-svn-id: file:///svn/unbound/trunk@4938 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 16:03:46 +00:00
Wouter Wijngaards 2d28fba3bf - Squelch log of failed to tcp initiate after TCP Fastopen failure.
git-svn-id: file:///svn/unbound/trunk@4937 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 13:27:53 +00:00
Wouter Wijngaards 19aed2dcb1 Trunk has 1.8.2 in development.
git-svn-id: file:///svn/unbound/trunk@4936 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 12:09:44 +00:00
Wouter Wijngaards eed1e0789a - fastrpz.patch fix included.
git-svn-id: file:///svn/unbound/trunk@4935 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-08 10:33:09 +00:00
Wouter Wijngaards 837565c505 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4933 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-05 15:18:08 +00:00
Wouter Wijngaards fece182cf5 - Set default for so-reuseport to no for FreeBSD. It is enabled
by default for Linux and DragonFlyBSD.  The setting can 
  be configured in unbound.conf to override the default.


git-svn-id: file:///svn/unbound/trunk@4932 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-05 15:07:19 +00:00
Wouter Wijngaards 945452bff4 - Squelch EADDRNOTAVAIL errors when the interface goes away,
this omits 'can't assign requested address' errors unless
  verbosity is set to a high value.


git-svn-id: file:///svn/unbound/trunk@4931 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-05 06:29:05 +00:00
Wouter Wijngaards 1c08a2ba55 - clang analyze test is used only when assertions are enabled.
git-svn-id: file:///svn/unbound/trunk@4930 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:42:50 +00:00
Wouter Wijngaards d967ceb98b Remove that fix, analyzer is for debug with assertions.
- Fix clang analyzer for optimize compile analysis.


git-svn-id: file:///svn/unbound/trunk@4929 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:32:33 +00:00
Wouter Wijngaards a3c3e13b2f remove unused diagnostic pragmas that themselves generate warnings
git-svn-id: file:///svn/unbound/trunk@4928 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:17:40 +00:00
Wouter Wijngaards 83a186f6cc Remove unused diagnostic pragmas that themselves generate warnings
git-svn-id: file:///svn/unbound/trunk@4927 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:17:11 +00:00
Wouter Wijngaards 2598f9bb18 line fixup
git-svn-id: file:///svn/unbound/trunk@4926 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:13:19 +00:00
Wouter Wijngaards ba28c48efc Remove unused variable from contrib fastrpz/rpz.c
git-svn-id: file:///svn/unbound/trunk@4925 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:12:29 +00:00
Wouter Wijngaards 98234d1017 - updated contrib/fastrpz.patch to apply for this version
git-svn-id: file:///svn/unbound/trunk@4924 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 12:00:06 +00:00
Wouter Wijngaards 99a92b3483 - Fix testlock code to set noreturn on error routine.
git-svn-id: file:///svn/unbound/trunk@4923 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 10:53:40 +00:00
Wouter Wijngaards c85ff492d0 - Fix clang analyzer for optimize compile analysis.
git-svn-id: file:///svn/unbound/trunk@4922 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 10:51:05 +00:00
Wouter Wijngaards b09cfb8fb1 - dnscrypt.c removed sizeof to get array bounds.
git-svn-id: file:///svn/unbound/trunk@4921 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 10:47:12 +00:00
Wouter Wijngaards 966a958ca5 Fixup fastrpz.patch
git-svn-id: file:///svn/unbound/trunk@4920 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-02 10:34:00 +00:00
Wouter Wijngaards 885069e1f6 - tag for release 1.8.1rc1.
git-svn-id: file:///svn/unbound/trunk@4918 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-01 11:28:05 +00:00
Wouter Wijngaards 077b38e2c5 note down that memory leak #4149 is fixed.
git-svn-id: file:///svn/unbound/trunk@4917 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-01 09:36:15 +00:00
Wouter Wijngaards 9be04e6fac - Fix #4188: IPv6 forwarders without ipv6 result in SERVFAIL, fixes
qname minimisation with a forwarder when connectivity has issues
  from rejecting responses.


git-svn-id: file:///svn/unbound/trunk@4916 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-27 08:19:29 +00:00
Wouter Wijngaards 377d5b426a - Add SSL cleanup for tcp timeout.
git-svn-id: file:///svn/unbound/trunk@4915 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-25 09:01:13 +00:00
Wouter Wijngaards f82a128909 - Perform TLS SNI indication of the host that is being contacted
for DNS over TLS service.  It sets the configured tls auth name.
  This is useful for hosts that apart from the DNS over TLS services
  also provide other (web) services.


git-svn-id: file:///svn/unbound/trunk@4914 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-25 08:31:42 +00:00
Wouter Wijngaards 216759e955 - Fix #4156: Fix systemd service manager state change notification.
git-svn-id: file:///svn/unbound/trunk@4913 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 12:30:22 +00:00
Wouter Wijngaards 9b6caf5a5b - Fix that with harden-below-nxdomain and qname minisation enabled
some iterator states for nonresponsive domains can get into a
  state where they waited for an empty list.
- Stop UDP to TCP failover after timeouts that causes the ping count
  to be reset by the TCP time measurement (that exists for TLS),
  because that causes the UDP part to not be measured as timeout.


git-svn-id: file:///svn/unbound/trunk@4912 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 11:25:52 +00:00
Wouter Wijngaards 5c25bbd93f fix error print
git-svn-id: file:///svn/unbound/trunk@4911 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:44:11 +00:00
Wouter Wijngaards d8937492cb fixup 3
git-svn-id: file:///svn/unbound/trunk@4910 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:35:09 +00:00
Wouter Wijngaards e91d85edb5 Fixup
git-svn-id: file:///svn/unbound/trunk@4909 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:32:40 +00:00
Wouter Wijngaards 5089db7331 - Fix unbound for openssl in FIPS mode, it uses the digests with
the EVP call contexts.


git-svn-id: file:///svn/unbound/trunk@4908 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:28:55 +00:00
Wouter Wijngaards 8e20d628e8 - Fix compile on Mac for unbound, provide explicit_bzero when libc
does not have it.


git-svn-id: file:///svn/unbound/trunk@4907 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:06:57 +00:00
Wouter Wijngaards d275505df6 - annotate exit functions with noreturn in unbound-control.
git-svn-id: file:///svn/unbound/trunk@4906 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 14:43:43 +00:00
Wouter Wijngaards f7516e6b2b - nicer bio free code in unbound-anchor.
git-svn-id: file:///svn/unbound/trunk@4905 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 12:49:37 +00:00
Wouter Wijngaards 898d4c8dd9 - Fix memory leak when message parse fails partway through copy.
- remove unused udpsize assignment in message encode.


git-svn-id: file:///svn/unbound/trunk@4904 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 12:30:44 +00:00
Wouter Wijngaards 2e9d09b961 - initialize statistics totals for printout.
- in authzone check that node exists before adding rrset.
	- in unbound-anchor, use readwrite memory BIO.
	- assertion in autotrust that packed rrset is formed correctly.


git-svn-id: file:///svn/unbound/trunk@4903 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 12:20:41 +00:00
Wouter Wijngaards 8dd6efe5ed - remove unused variable assignment from iterator scrub routine.
- check for null in delegation point during iterator refetch
  in forward zone.
- neater pointer cast in libunbound context quit routine.


git-svn-id: file:///svn/unbound/trunk@4902 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:36:22 +00:00
Wouter Wijngaards 635df9c806 - unit test has clang analysis.
git-svn-id: file:///svn/unbound/trunk@4901 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:24:08 +00:00
Wouter Wijngaards 75b8b8c875 - Free memory leak in config strlist append.
- make sure nsec3 comparison salt is initialized.


git-svn-id: file:///svn/unbound/trunk@4900 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:23:30 +00:00
Wouter Wijngaards 90f0530234 Fix lint found flaw.
git-svn-id: file:///svn/unbound/trunk@4899 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:23:01 +00:00
Wouter Wijngaards d744827f93 Better sbuffer assertion.
git-svn-id: file:///svn/unbound/trunk@4898 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:00:57 +00:00
Wouter Wijngaards fe8b22caa1 - in testcode, free async ids, initialise array, and check for null
pointer during test of the test.  And use exit for return to note
  irregular program stop.


git-svn-id: file:///svn/unbound/trunk@4897 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 09:45:07 +00:00
Wouter Wijngaards 9a82526b91 - exit log routine is annotated as noreturn function.
- free memory leaks in config strlist and str2list insert functions.
- do not move unused argv variable after getopt.
- Remove unused if clause in testcode.


git-svn-id: file:///svn/unbound/trunk@4896 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 08:58:21 +00:00
Wouter Wijngaards 225a6d9c6e - Fix seed for random backup code to use explicit zero when wiped.
git-svn-id: file:///svn/unbound/trunk@4895 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 07:49:51 +00:00
Wouter Wijngaards 87c8dd5434 - Fix initialisation in remote.c
git-svn-id: file:///svn/unbound/trunk@4894 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-11 14:11:50 +00:00
Wouter Wijngaards a09c4bbdc2 - Fix spelling errors.
git-svn-id: file:///svn/unbound/trunk@4893 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-11 13:28:21 +00:00
Wouter Wijngaards d01651c305 - Fix to squelch respip warning in unit test, it is printed at
higher verbosity settings.


git-svn-id: file:///svn/unbound/trunk@4892 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-11 13:24:31 +00:00
Wouter Wijngaards 00982fc3db - Fixed unused return value warnings in contrib/fastrpz.patch for
asprintf.


git-svn-id: file:///svn/unbound/trunk@4891 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-11 13:19:55 +00:00
Wouter Wijngaards d8f890a43a - iana port update.
git-svn-id: file:///svn/unbound/trunk@4890 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-10 12:35:01 +00:00
Wouter Wijngaards a58681a718 1.8.1 in svn trunk.
git-svn-id: file:///svn/unbound/trunk@4889 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-10 12:32:28 +00:00
Wouter Wijngaards c9d33fb9f7 1.8.0 release.
git-svn-id: file:///svn/unbound/trunk@4888 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-10 12:30:29 +00:00
Wouter Wijngaards 254df71810 - Fix spelling error in header, from getdns commit by Andreas Gelmini.
git-svn-id: file:///svn/unbound/trunk@4886 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-05 05:33:38 +00:00
Wouter Wijngaards 194dc32059 explain ip-ratelimit-factor causes the log line and it is a per-query log line.
git-svn-id: file:///svn/unbound/trunk@4885 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-04 09:26:51 +00:00
Ralph Dolmans 987c1c97e5 - More explicitly mention the type of ratelimit when applying ip-ratelimit.
git-svn-id: file:///svn/unbound/trunk@4884 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-04 09:16:07 +00:00
Wouter Wijngaards 25c8497ba6 - Tag for 1.8.0rc1 release.
git-svn-id: file:///svn/unbound/trunk@4882 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-04 07:15:06 +00:00
Wouter Wijngaards 5577e55400 - Disable minimal-responses in subnet unit tests.
git-svn-id: file:///svn/unbound/trunk@4881 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-31 14:59:10 +00:00
Wouter Wijngaards 27472f1270 better locking.
git-svn-id: file:///svn/unbound/trunk@4880 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-30 09:21:05 +00:00
Wouter Wijngaards 30a14c2716 - Fix that a local-zone with a local-zone-type that is transparent
in a view with view-first, makes queries check for answers from the
  local-zones defined outside of views.


git-svn-id: file:///svn/unbound/trunk@4879 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-30 09:06:07 +00:00
Wouter Wijngaards d4a69e4d2a flex.
git-svn-id: file:///svn/unbound/trunk@4878 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-30 09:02:29 +00:00
Wouter Wijngaards 000e75581b Fixup that it does not set prefetch_ttl twice, but sets the new serve_expired_ttl member of the reply ttls.
git-svn-id: file:///svn/unbound/trunk@4877 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-30 08:03:29 +00:00
Ralph Dolmans 2e5e31e8ac - Added serve-expired-ttl and serve-expired-ttl-reset options.
git-svn-id: file:///svn/unbound/trunk@4876 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-28 14:21:56 +00:00
Ralph Dolmans ae2653fcc5 - Disable minimal-responses in ipsecmod unit tests.
git-svn-id: file:///svn/unbound/trunk@4875 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-28 14:11:21 +00:00
Wouter Wijngaards f7118f29b9 - Fix lintflags for lint on FreeBSD.
git-svn-id: file:///svn/unbound/trunk@4874 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-27 13:42:27 +00:00
Wouter Wijngaards 57a5e75840 Fixup test and lint hook.
git-svn-id: file:///svn/unbound/trunk@4873 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-27 13:29:48 +00:00
Wouter Wijngaards 8d14e7c0a4 - next release is called 1.8.0.
git-svn-id: file:///svn/unbound/trunk@4872 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-27 13:20:12 +00:00
Wouter Wijngaards e0745813f4 - Set defaults to yes for a number of options to increase speed and
resilience of the server.  The so-reuseport, harden-below-nxdomain,
  and minimal-responses options are enabled by default.  They used
  to be disabled by default, waiting to make sure they worked.  They
  are enabled by default now, and can be disabled explicitly by
  setting them to "no" in the unbound.conf config file.  The reuseport
  and minimal options increases speed of the server, and should be
  otherwise harmless.  The harden-below-nxdomain option works well
  together with the recently default enabled qname minimisation, this
  causes more fetches to use information from the cache.


git-svn-id: file:///svn/unbound/trunk@4871 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-27 13:18:19 +00:00
George Thessalonikefs 0171d06aa2 - #4140: Expose repinfo (comm_reply) to the inplace_callbacks. This
gives access to reply information for the client's communication
  point when the callback is called before the mesh state (modules).
  Changes to C and Python's inplace_callback signatures were also
  necessary.


git-svn-id: file:///svn/unbound/trunk@4870 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-22 10:51:13 +00:00
Wouter Wijngaards 4daf8f5bdb - Fix only misc failure from log-servfail when val-log-level is not
enabled.


git-svn-id: file:///svn/unbound/trunk@4869 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 14:31:37 +00:00
Wouter Wijngaards 8893735a2d edns-subnet retain rcode when no return_msg, for log-servfail.
git-svn-id: file:///svn/unbound/trunk@4868 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 14:25:07 +00:00
Wouter Wijngaards 00ba747be7 - #4146: num.query.subnet and num.query.subnet_cache counters.
git-svn-id: file:///svn/unbound/trunk@4867 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 14:14:28 +00:00
Wouter Wijngaards 504ef71975 and documentation.
git-svn-id: file:///svn/unbound/trunk@4866 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 07:14:48 +00:00
Wouter Wijngaards 9926fcac4b flex and bison re-run.
git-svn-id: file:///svn/unbound/trunk@4865 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 07:10:49 +00:00
Wouter Wijngaards 01d8dc2240 - log-local-actions: yes option for unbound.conf that logs all the
local zone actions, a patch from Saksham Manchanda (Secure64).


git-svn-id: file:///svn/unbound/trunk@4864 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 07:10:09 +00:00
Wouter Wijngaards 4fe427ded2 - log-servfail: yes prints log lines that say why queries are
returning SERVFAIL to clients.


git-svn-id: file:///svn/unbound/trunk@4863 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 15:22:05 +00:00
Wouter Wijngaards b0ca964984 and printout for these cases too.
git-svn-id: file:///svn/unbound/trunk@4862 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 15:09:23 +00:00
Wouter Wijngaards e8c4f20f66 - added more servfail printout statements, to the iterator.
git-svn-id: file:///svn/unbound/trunk@4861 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 15:01:35 +00:00
Wouter Wijngaards b0daf867c2 and the error looks good.
git-svn-id: file:///svn/unbound/trunk@4860 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 14:17:48 +00:00
Wouter Wijngaards 8385c462ed - print servfail info to log as error.
git-svn-id: file:///svn/unbound/trunk@4859 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 13:29:27 +00:00
Ralph Dolmans afd4063f20 - Fix classification for QTYPE=CNAME queries when QNAME minimisation is enabled.
git-svn-id: file:///svn/unbound/trunk@4858 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 12:48:47 +00:00
Wouter Wijngaards ed24498f2e - Set libunbound to increase current, because the libunbound change
to the event callback function signature.  That needs programs,
  that use it, to recompile against the new header definition.


git-svn-id: file:///svn/unbound/trunk@4857 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 09:07:06 +00:00
Wouter Wijngaards f2b12c0761 - Fix contrib/fastrpz.patch.
git-svn-id: file:///svn/unbound/trunk@4856 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-16 10:29:00 +00:00
Wouter Wijngaards df85836b15 - Fix warning on compile without threads.
git-svn-id: file:///svn/unbound/trunk@4855 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-16 10:28:11 +00:00
Wouter Wijngaards 3f2b6828e5 Test unit test for reordering.
git-svn-id: file:///svn/unbound/trunk@4854 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-15 09:40:30 +00:00
Wouter Wijngaards 1958d9fbd5 - Fix segfault in auth-zone read and reorder of RRSIGs.
git-svn-id: file:///svn/unbound/trunk@4853 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-15 09:26:13 +00:00
Wouter Wijngaards 0c04b5eaf5 - Upgraded crosscompile script to include libunbound DLL in the
zipfile.


git-svn-id: file:///svn/unbound/trunk@4852 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-14 14:52:09 +00:00
Wouter Wijngaards 8e5a32f4dc - Fix that printout of error for cycle targets is a verbosity 4
printout and does not wrongly print it is a memory error.


git-svn-id: file:///svn/unbound/trunk@4851 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-14 07:27:57 +00:00
Wouter Wijngaards efe5c8e6be - Fix #4144: dns64 module caches wrong (negative) information.
git-svn-id: file:///svn/unbound/trunk@4850 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-10 08:03:17 +00:00
Wouter Wijngaards 1e61604aab use closer of stub and forward if both configured.
git-svn-id: file:///svn/unbound/trunk@4849 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 13:00:06 +00:00
Wouter Wijngaards 488eaf09ce Fixup log printout.
git-svn-id: file:///svn/unbound/trunk@4848 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 12:56:49 +00:00
Wouter Wijngaards 8b1012613e documentation.
git-svn-id: file:///svn/unbound/trunk@4847 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 12:48:33 +00:00
Wouter Wijngaards 256ab3d935 - Patch for stub-no-cache and forward-no-cache options that disable
caching for the contents of that stub or forward, for when you
  want immediate changes visible, from Bjoern A. Zeeb.


git-svn-id: file:///svn/unbound/trunk@4846 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 12:44:40 +00:00
Wouter Wijngaards a07337fd6d Breakout at end.
git-svn-id: file:///svn/unbound/trunk@4845 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 09:07:31 +00:00
Wouter Wijngaards be79ffa371 - document --enable-subnet in doc/README.
git-svn-id: file:///svn/unbound/trunk@4844 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 08:48:04 +00:00
Wouter Wijngaards c580e0e33c Fixup
git-svn-id: file:///svn/unbound/trunk@4843 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 08:46:13 +00:00
Wouter Wijngaards d2f7999b4e - unbound-checkconf checks if modules exist and prints if they are
not compiled in the name of the wrong module.


git-svn-id: file:///svn/unbound/trunk@4842 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-09 08:33:56 +00:00
Wouter Wijngaards 611e37aa2d (On the patch)
- make depend, yacc, lex, doc, headers.  And log the limit exceeded
  message only on high verbosity, so as to not spam the logs when
  it is busy.


git-svn-id: file:///svn/unbound/trunk@4841 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:48:49 +00:00
Ralph Dolmans 3f2d186694 - Make capsforid fallback QNAME minimisation aware.
git-svn-id: file:///svn/unbound/trunk@4840 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:43:49 +00:00
Wouter Wijngaards 73f01304f0 tcp-connection-limit in example config.
git-svn-id: file:///svn/unbound/trunk@4839 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:28:57 +00:00
Wouter Wijngaards 77bd7d228b Fix comment reference to variable name in header file.
git-svn-id: file:///svn/unbound/trunk@4838 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:03:46 +00:00
Wouter Wijngaards b97b04a9db yacc and lex.
git-svn-id: file:///svn/unbound/trunk@4837 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 12:02:10 +00:00
Wouter Wijngaards 6e4583a528 redid the make depend.
git-svn-id: file:///svn/unbound/trunk@4836 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 11:58:06 +00:00
Wouter Wijngaards 586b811b87 - Patch to implement tcp-connection-limit from Jim Hague (Sinodun).
This limits the number of simultaneous TCP client connections
  from a nominated netblock.
And a simple test for TCP connection limit.


git-svn-id: file:///svn/unbound/trunk@4835 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 11:57:42 +00:00
Wouter Wijngaards 070019c9be - Fix #4142: unbound.service.in: improvements and fixes.
Add unit dependency ordering (based on systemd-resolved).
  Add 'CAP_SYS_RESOURCE' to 'CapabilityBoundingSet' (fixes warnings
  about missing privileges during startup). Add 'AF_INET6' to
  'RestrictAddressFamilies' (without it IPV6 can't work). From
  Guido Shanahan.


git-svn-id: file:///svn/unbound/trunk@4834 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-07 08:30:22 +00:00
George Thessalonikefs ce04bcb463 please lint.
git-svn-id: file:///svn/unbound/trunk@4833 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-06 09:00:49 +00:00
Wouter Wijngaards cf1bfbba5d test post hook.
git-svn-id: file:///svn/unbound/trunk@4832 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-06 07:41:41 +00:00
Wouter Wijngaards a4fd088875 change for post hook
git-svn-id: file:///svn/unbound/trunk@4831 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-06 07:30:11 +00:00
Wouter Wijngaards 27023b3f21 - Fix for #4136: Fix to unconditionally call destroy in daemon.c.
git-svn-id: file:///svn/unbound/trunk@4830 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-06 07:18:05 +00:00
George Thessalonikefs b2a7933045 Make sure that we don't randomly fail the pylib ratelimiting tests.
git-svn-id: file:///svn/unbound/trunk@4829 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-03 15:57:48 +00:00
George Thessalonikefs 749d1b9ebc - Expose if a query (or a subquery) was ratelimited (not src IP
ratelimiting) to libunbound under 'ub_result.was_ratelimited'.
  This also introduces a change to 'ub_event_callback_type' in
  libunbound/unbound-event.h.
- Tidy pylib tests.


git-svn-id: file:///svn/unbound/trunk@4828 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-03 14:00:46 +00:00
Wouter Wijngaards 87bdb489f9 - New fix for #4136: This one ignores lex without without
yylex_destroy.


git-svn-id: file:///svn/unbound/trunk@4827 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-03 11:10:55 +00:00
Wouter Wijngaards 37e9f5591a - Revert previous change for #4136: because it introduces build
problems.


git-svn-id: file:///svn/unbound/trunk@4826 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-03 09:47:53 +00:00
Wouter Wijngaards d546e7766d - iana port list update.
git-svn-id: file:///svn/unbound/trunk@4825 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-01 14:07:54 +00:00
Wouter Wijngaards 62f69f9b40 - Fix to remove systemd sockaddr function check, that is not
always present.  Make socket activation more lenient.  But not
  different when socket activation is not used.


git-svn-id: file:///svn/unbound/trunk@4824 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-01 13:49:27 +00:00
Wouter Wijngaards 168bc963d3 edns keepalive in example.conf
git-svn-id: file:///svn/unbound/trunk@4823 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 13:59:34 +00:00
Wouter Wijngaards 1f148e632f remove unused variable
git-svn-id: file:///svn/unbound/trunk@4822 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 13:36:45 +00:00
Wouter Wijngaards c887ae1022 - Fix #4139: Fix unbound-host leaks memory on ANY.
git-svn-id: file:///svn/unbound/trunk@4821 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 11:58:19 +00:00
Wouter Wijngaards 375d3e7520 document -d on streamtcp man page.
git-svn-id: file:///svn/unbound/trunk@4820 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 10:36:01 +00:00
Wouter Wijngaards 3b171545b6 error message changed.
git-svn-id: file:///svn/unbound/trunk@4819 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 10:33:17 +00:00
Wouter Wijngaards aa5efa172d idle timeout is in milliseconds, fix test config.
git-svn-id: file:///svn/unbound/trunk@4818 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 10:30:42 +00:00
Wouter Wijngaards a2961e50fb For windows portability, example.conf documentation.
git-svn-id: file:///svn/unbound/trunk@4817 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 10:24:09 +00:00
Wouter Wijngaards adc498d29d test 3 works outside srcdir longtest
git-svn-id: file:///svn/unbound/trunk@4816 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:52:40 +00:00
Wouter Wijngaards 1ff3e51ee1 Make test 6 work in outside srcdir longtest.
git-svn-id: file:///svn/unbound/trunk@4815 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:41:55 +00:00
Wouter Wijngaards f9c0f359a7 please lint.
git-svn-id: file:///svn/unbound/trunk@4814 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:14:52 +00:00
Wouter Wijngaards cc538f4f9f - Please doxygen so it passes.
git-svn-id: file:///svn/unbound/trunk@4813 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:10:20 +00:00
Wouter Wijngaards 900cd200a2 more comments (from commit messages).
git-svn-id: file:///svn/unbound/trunk@4812 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 08:00:57 +00:00
Wouter Wijngaards 45e73bcc8e Insert comments for documentation purposes.
git-svn-id: file:///svn/unbound/trunk@4811 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:55:47 +00:00
Wouter Wijngaards 26eaf2d1ee And these source files.
git-svn-id: file:///svn/unbound/trunk@4810 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:48:58 +00:00
Wouter Wijngaards 2f32ef7646 Another patch from Jim Hague:
- Fix 'make depend' to work when build dir is not project root.


git-svn-id: file:///svn/unbound/trunk@4809 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:27:16 +00:00
Wouter Wijngaards b7abbd1d72 - Fix mesh.c incompatible pointer pass.
- yacc and lex.


git-svn-id: file:///svn/unbound/trunk@4808 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:23:58 +00:00
Wouter Wijngaards f364edafd3 - From Wouter: make depend, the dependencies in the patches did not
apply cleanly.


git-svn-id: file:///svn/unbound/trunk@4807 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:21:39 +00:00
Wouter Wijngaards e3f08cb2a2 - Implement progressive backoff of TCP idle/keepalive timeout.
git-svn-id: file:///svn/unbound/trunk@4806 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:20:15 +00:00
Wouter Wijngaards a92b00ef3c - Correct and expand manual page entries for keepalive and idle timeout.
git-svn-id: file:///svn/unbound/trunk@4805 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:19:26 +00:00
Wouter Wijngaards 3dbdde7fed - Add edns-tcp-keepalive and edns-tcp-keepalive timeout options
and implement option in client responses.


git-svn-id: file:///svn/unbound/trunk@4804 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:18:34 +00:00
Wouter Wijngaards 6da37e5ecd - Error if EDNS Keepalive received over UDP.
implement and add test.


git-svn-id: file:///svn/unbound/trunk@4803 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:16:25 +00:00
Wouter Wijngaards 007123ee2c - Sort out test runs when the build directory isn't the project
root directory.
- Add config tcp-idle-timeout (default 30s). This applies to
  client connections only; the timeout on TCP connections upstream
  is unaffected.


git-svn-id: file:///svn/unbound/trunk@4802 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-31 07:15:12 +00:00
Wouter Wijngaards 10c085f81d - Fix #4136: insufficiency from mismatch of FLEX capability between
released tarball and build host.


git-svn-id: file:///svn/unbound/trunk@4801 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-30 09:58:05 +00:00
Wouter Wijngaards 1d315e11cf - Fix man page, say that chroot is enabled by default.
git-svn-id: file:///svn/unbound/trunk@4800 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-27 09:19:57 +00:00
Wouter Wijngaards c91b657a40 Attribute and put fix in section.
git-svn-id: file:///svn/unbound/trunk@4799 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-26 07:10:24 +00:00
Wouter Wijngaards 60f59271d6 - Fix #4135: 64-bit Windows Installer Creates Entries Under The
Wrong Registry Key.


git-svn-id: file:///svn/unbound/trunk@4798 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-26 06:59:57 +00:00
Wouter Wijngaards 40abe08ac8 - Fix use-systemd readiness signalling, only when use-systemd is yes
and not in signal handler.


git-svn-id: file:///svn/unbound/trunk@4797 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-23 13:05:39 +00:00
Wouter Wijngaards ae1790b8e8 fixup for :
git-svn-id: file:///svn/unbound/trunk@4796 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-20 12:52:37 +00:00
Wouter Wijngaards aa5fb8b10b - Fix #4131: for solaris, error YY_CURRENT_BUFFER undeclared.
git-svn-id: file:///svn/unbound/trunk@4795 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-20 11:53:57 +00:00
Wouter Wijngaards 6de329359c better line about fix suggestion
git-svn-id: file:///svn/unbound/trunk@4794 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-20 08:58:30 +00:00
Wouter Wijngaards 2e34a8f643 double spaces.
git-svn-id: file:///svn/unbound/trunk@4793 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-20 08:56:47 +00:00
Wouter Wijngaards bded93f69b - Fix #4130: print text describing -dd and unbound-checkconf on
config file read error at startup, the errors may have been moved
  away by the startup process.


git-svn-id: file:///svn/unbound/trunk@4792 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-20 05:42:38 +00:00
Wouter Wijngaards 38e77d50f2 - Fix #4129 unbound-control error message with wrong cert permissions
is too cryptic.


git-svn-id: file:///svn/unbound/trunk@4791 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-19 06:22:11 +00:00
Wouter Wijngaards f8e585f308 nicer code, in function.
git-svn-id: file:///svn/unbound/trunk@4790 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 15:07:09 +00:00
Wouter Wijngaards 5bda4f9822 Fixup cache size test for msg cache.
git-svn-id: file:///svn/unbound/trunk@4789 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 14:56:02 +00:00
Wouter Wijngaards d2d7b987fa brackets added.
git-svn-id: file:///svn/unbound/trunk@4788 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 14:44:20 +00:00
Wouter Wijngaards 7579216922 - Resize ratelimit and ip-ratelimit caches if changed on reload.
git-svn-id: file:///svn/unbound/trunk@4787 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 14:42:38 +00:00
Wouter Wijngaards 330c6e1cb0 - Fix that ratelimit and ip-ratelimit are applied after reload of
git-svn-id: file:///svn/unbound/trunk@4786 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 14:27:44 +00:00
Wouter Wijngaards 41e5a66b73 Fixup
git-svn-id: file:///svn/unbound/trunk@4785 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 12:30:53 +00:00
Wouter Wijngaards cc5ab744c5 - Print error if SSL name verification configured but not available
in the ssl library.


git-svn-id: file:///svn/unbound/trunk@4784 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 12:26:32 +00:00
Wouter Wijngaards 0ae750e552 - Fix #4127 unbound -h does not list -p help.
git-svn-id: file:///svn/unbound/trunk@4783 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-17 07:03:37 +00:00
Wouter Wijngaards cabc120f22 for outgoing UDP sockets.
git-svn-id: file:///svn/unbound/trunk@4782 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-16 10:30:44 +00:00
Wouter Wijngaards c96c2d8a45 - Squelch can't bind socket errors with Permission denied unless
verbosity is 4 or higher, for UDP sockets.


git-svn-id: file:///svn/unbound/trunk@4781 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-16 10:27:12 +00:00
Wouter Wijngaards 8aa53f027d - Fix qname minimisation NXDOMAIN validation lookup failures causing
error_supers assertion fails.


git-svn-id: file:///svn/unbound/trunk@4780 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-16 10:21:34 +00:00
Wouter Wijngaards 4bf9d12419 - Fix for 4126 that the #define for UNKNOWN_SERVER_NICENESS can be more
easily changed to adjust default rtt assumptions.


git-svn-id: file:///svn/unbound/trunk@4779 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-12 14:15:03 +00:00
Wouter Wijngaards f93746b1af - Fix to improve systemd socket activation code file descriptor
assignment.


git-svn-id: file:///svn/unbound/trunk@4778 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-12 10:35:33 +00:00
Wouter Wijngaards 23dc22b78d - Note in documentation that the cert name match code needs
git-svn-id: file:///svn/unbound/trunk@4777 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-10 08:02:32 +00:00
Wouter Wijngaards 5e3c30beac - Fix round robin for failed addresses with prefer-ip6: yes
git-svn-id: file:///svn/unbound/trunk@4776 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 14:40:35 +00:00
Wouter Wijngaards 86f16bef93 Fix round robin for failed addresses with prefer-ip6: yes
git-svn-id: file:///svn/unbound/trunk@4775 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 14:14:19 +00:00
Wouter Wijngaards f2e90b0872 - Note RFC8162 support. SMIMEA record type can be read in by the
zone record parser.


git-svn-id: file:///svn/unbound/trunk@4774 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 12:06:05 +00:00
Wouter Wijngaards 1249e0db3f - Note RFC8162 support.
git-svn-id: file:///svn/unbound/trunk@4773 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 11:56:38 +00:00
Wouter Wijngaards 15c4dd79f4 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4772 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 06:48:44 +00:00
Wouter Wijngaards e324a7819a - Fix documentation ambiguity for tls-win-cert in tls-upstream and
forward-tls-upstream docs.


git-svn-id: file:///svn/unbound/trunk@4771 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-06 05:39:08 +00:00
Wouter Wijngaards 81e9f82a8d - Fix #4112: Fix that unbound-anchor -f /etc/resolv.conf will not pass
if DNSSEC is not enabled.  New option -R allows fallback from
  resolv.conf to direct queries.


git-svn-id: file:///svn/unbound/trunk@4770 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-04 10:02:16 +00:00
Wouter Wijngaards 5d298ed474 - Fix permission denied printed for auth zone probe random port nrs.
git-svn-id: file:///svn/unbound/trunk@4769 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-03 13:58:49 +00:00
Wouter Wijngaards 82e1e3959f - Better documentation for unblock-lan-zones and insecure-lan-zones
config statements.


git-svn-id: file:///svn/unbound/trunk@4768 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-03 08:54:01 +00:00
Wouter Wijngaards 7181c0fa6a - Update libunbound/python/examples/dnssec_test.py example code to
also set the 20326 trust anchor for the root in the example code.


git-svn-id: file:///svn/unbound/trunk@4767 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-02 14:46:31 +00:00
Wouter Wijngaards 49f27c06af Note that fix works to decrease problem, and is included for next release.
git-svn-id: file:///svn/unbound/trunk@4766 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-02 08:55:04 +00:00
Wouter Wijngaards 7247718e12 - Fix typo on man page in ip-address description.
git-svn-id: file:///svn/unbound/trunk@4765 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-02 07:19:12 +00:00
Wouter Wijngaards 61acc76244 - Fix checking for libhiredis printout in configure output.
git-svn-id: file:///svn/unbound/trunk@4764 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-07-02 07:09:30 +00:00
Wouter Wijngaards 2faa4f9ee2 And documentation.
git-svn-id: file:///svn/unbound/trunk@4763 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-29 13:03:57 +00:00
Wouter Wijngaards 2beae211ee - dns64-ignore-aaaa: config option to list domain names for which the
existing AAAA is ignored and dns64 processing is used on the A
  record.


git-svn-id: file:///svn/unbound/trunk@4762 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-29 12:58:52 +00:00
Wouter Wijngaards d3ff7a9333 - log port number with err_addr logs.
git-svn-id: file:///svn/unbound/trunk@4761 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-29 08:34:41 +00:00
Wouter Wijngaards 23df700f15 explain num.tcp and num.tls
git-svn-id: file:///svn/unbound/trunk@4760 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-28 09:14:31 +00:00
Wouter Wijngaards 755233c720 - num.queries.tls counter for queries over TLS.
git-svn-id: file:///svn/unbound/trunk@4759 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-28 08:15:47 +00:00
Wouter Wijngaards bca54a8b25 - Patch, do not export python from pkg-config, from Petr Menšík.
git-svn-id: file:///svn/unbound/trunk@4758 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-27 06:07:31 +00:00
Wouter Wijngaards b5aab36d41 - #4109: Fix that package config depends on python unconditionally.
git-svn-id: file:///svn/unbound/trunk@4757 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-27 05:46:36 +00:00
Wouter Wijngaards d7cfe91cb3 - Fix that auth-zone does not start the wait timer without checking
if the wait timer has already been started.
(the code is part of the previous commit).



git-svn-id: file:///svn/unbound/trunk@4756 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-26 13:56:23 +00:00
Wouter Wijngaards a31d45b13e - Fix that auth-zone master reply with current SOA serial does not
stop scan of masters for an updated zone.


git-svn-id: file:///svn/unbound/trunk@4755 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-26 13:48:36 +00:00
Wouter Wijngaards 23f475bccc - Tentative fix for permission denied on IPv6 address on FreeBSD.
git-svn-id: file:///svn/unbound/trunk@4754 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-26 08:01:44 +00:00
Wouter Wijngaards 025fdd0049 Document behaviour.
git-svn-id: file:///svn/unbound/trunk@4753 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-21 12:51:14 +00:00
Wouter Wijngaards 5bb6dbe21c And moved -C to front.
git-svn-id: file:///svn/unbound/trunk@4752 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-21 12:39:49 +00:00
Wouter Wijngaards c225ced1a9 - Fix usage printout for unbound-host, hostname has to be last
argument on BSDs and Windows.


git-svn-id: file:///svn/unbound/trunk@4751 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-21 12:31:42 +00:00
Wouter Wijngaards 3a58ad15e8 Note contents of release 1.7.3
git-svn-id: file:///svn/unbound/trunk@4750 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-21 10:00:17 +00:00
Wouter Wijngaards 5106ad7a2c - #4108: systemd reload hang fix.
git-svn-id: file:///svn/unbound/trunk@4747 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-21 07:11:12 +00:00
Wouter Wijngaards 8c044a616b - Fix windows unbound-control no cert bad file descriptor error.
git-svn-id: file:///svn/unbound/trunk@4746 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-19 13:13:35 +00:00
Wouter Wijngaards 9ccf611954 add trailing newline.
git-svn-id: file:///svn/unbound/trunk@4745 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-19 09:59:48 +00:00
Wouter Wijngaards 5dfcf122d1 - Windows example service.conf edited with more windows specific
configuration.


git-svn-id: file:///svn/unbound/trunk@4744 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-19 09:57:39 +00:00
Wouter Wijngaards 7b092127cb - Fix for unbound-control on Windows and set TCP socket parameters
more closely.


git-svn-id: file:///svn/unbound/trunk@4743 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-19 09:40:59 +00:00
Wouter Wijngaards b26257248d - Fix unbound-checkconf for control-use-cert.
git-svn-id: file:///svn/unbound/trunk@4742 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-18 12:15:21 +00:00
Wouter Wijngaards 3c7d270958 Changelog note, fix is part of 1.7.3rc2.
git-svn-id: file:///svn/unbound/trunk@4741 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-18 09:46:40 +00:00
Wouter Wijngaards c15eae814f - Fix that control-use-cert: no works for 127.0.0.1 to disable certs.
git-svn-id: file:///svn/unbound/trunk@4738 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-18 09:04:35 +00:00
Wouter Wijngaards 0e72e06886 - Print warning when control-use-cert is used with an IP-address
in unbound-control, and that TLS is enabled.


git-svn-id: file:///svn/unbound/trunk@4737 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-18 08:40:30 +00:00
Wouter Wijngaards abff4d1237 - unbound-control auth_zone_transfer _zone_ option starts the probe
sequence for a master to transfer the zone from and transfers when
  a new zone version is available.


git-svn-id: file:///svn/unbound/trunk@4736 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-15 15:01:31 +00:00
Wouter Wijngaards 386f23334b - unbound-control auth_zone_reload _zone_ option rereads the zonefile.
git-svn-id: file:///svn/unbound/trunk@4735 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-15 13:42:41 +00:00
Wouter Wijngaards a523683d4c - trunk has 1.7.4.
git-svn-id: file:///svn/unbound/trunk@4734 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-15 11:55:23 +00:00
Wouter Wijngaards b25332e1f4 - tag for 1.7.3rc1.
git-svn-id: file:///svn/unbound/trunk@4732 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-15 05:38:39 +00:00
Wouter Wijngaards a6ec2c6fc7 - Fix nettle compile.
git-svn-id: file:///svn/unbound/trunk@4731 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-14 12:08:09 +00:00
Wouter Wijngaards 9cb404ba5f - Fix that first control-interface determines if TLS is used. Warn
when IP address interfaces are used without TLS.


git-svn-id: file:///svn/unbound/trunk@4730 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-14 08:14:43 +00:00
Wouter Wijngaards 12251022ec - #4103: Fix that auth-zone does not insist on SOA record first in
file for url downloads.


git-svn-id: file:///svn/unbound/trunk@4729 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-14 07:09:01 +00:00
Ralph Dolmans 00a0cabf7f - Don't count CNAME response types received during qname minimisation as query
restart.


git-svn-id: file:///svn/unbound/trunk@4728 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 13:09:14 +00:00
Wouter Wijngaards d6ed0e868f remove unreachable point for portablity
git-svn-id: file:///svn/unbound/trunk@4727 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 13:02:52 +00:00
Wouter Wijngaards 700ad78f10 Fix snprintf size.
git-svn-id: file:///svn/unbound/trunk@4726 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 12:39:48 +00:00
Wouter Wijngaards d65accbb23 - remade dependencies in the Makefile.
git-svn-id: file:///svn/unbound/trunk@4725 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 12:23:56 +00:00
Wouter Wijngaards 78767f2014 - Fix buffer size warning in unit test.
git-svn-id: file:///svn/unbound/trunk@4724 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 11:01:14 +00:00
Wouter Wijngaards 21af42a281 Continue to read also when signals are sent.
git-svn-id: file:///svn/unbound/trunk@4723 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 10:50:51 +00:00
Wouter Wijngaards 0b0ece9db0 better documentation in header file
git-svn-id: file:///svn/unbound/trunk@4722 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 10:15:08 +00:00
Wouter Wijngaards 23edc18cac - Rename tls-additional-ports to tls-additional-port, because every
line adds one port.


git-svn-id: file:///svn/unbound/trunk@4721 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 08:45:57 +00:00
Wouter Wijngaards 7153c94bd7 Fixup error print for unix pipe.
git-svn-id: file:///svn/unbound/trunk@4720 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 08:15:44 +00:00
Wouter Wijngaards 4df697b4b7 Accurate printout in status output.
git-svn-id: file:///svn/unbound/trunk@4719 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 08:05:03 +00:00
Wouter Wijngaards 7fd32916e8 - #4102 for NSD, but for Unbound. Named unix pipes do not use
certificate and key files, access can be restricted with file and
  directory permissions.  The option control-use-cert is no longer
  used, and ignored if found in unbound.conf.


git-svn-id: file:///svn/unbound/trunk@4718 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-12 07:43:52 +00:00
Wouter Wijngaards 3f837bc440 trunk is 1.7.3 in development.
git-svn-id: file:///svn/unbound/trunk@4717 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-11 10:05:03 +00:00
Wouter Wijngaards f0769bed93 note OpenBSD accept4.
git-svn-id: file:///svn/unbound/trunk@4716 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-11 09:08:41 +00:00
Wouter Wijngaards a1bfc07105 - Patch to fix openwrt for mac os build darwin detection in configure.
git-svn-id: file:///svn/unbound/trunk@4713 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-06 05:31:12 +00:00
Wouter Wijngaards beba72d6db adjust test, for timer too slow for old machines.
git-svn-id: file:///svn/unbound/trunk@4712 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-05 08:09:00 +00:00
Wouter Wijngaards a4a5bfaa2f - Fix crash if ratelimit taken into use with unbound-control
instead of with unbound.conf.


git-svn-id: file:///svn/unbound/trunk@4711 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-05 07:06:19 +00:00
Wouter Wijngaards 62ea384d19 accept4 also on OpenBSD
git-svn-id: file:///svn/unbound/trunk@4710 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-05 06:59:05 +00:00
Wouter Wijngaards 53b1e11eba better fix for #4100
git-svn-id: file:///svn/unbound/trunk@4709 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-04 14:07:08 +00:00
Wouter Wijngaards 7fae96eb1e Track bug.nr 4100
git-svn-id: file:///svn/unbound/trunk@4708 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-04 12:50:32 +00:00
Wouter Wijngaards d386641820 - Fix stub reprime when it becomes useless.
git-svn-id: file:///svn/unbound/trunk@4707 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-04 12:28:33 +00:00
Wouter Wijngaards 7c5e38294a - tag for 1.7.2rc1
git-svn-id: file:///svn/unbound/trunk@4705 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-04 10:40:47 +00:00
Wouter Wijngaards 1cadc5d677 - Fix deadlock caused by incoming notify for auth-zone.
git-svn-id: file:///svn/unbound/trunk@4704 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-04 09:01:55 +00:00
Wouter Wijngaards 7509bf208e - Rename additional-tls-port to tls-additional-ports.
The older name is accepted for backwards compatibility.


git-svn-id: file:///svn/unbound/trunk@4703 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-01 08:02:04 +00:00
Wouter Wijngaards ec34bc9af1 rerun bison.
git-svn-id: file:///svn/unbound/trunk@4702 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-30 09:35:21 +00:00
Wouter Wijngaards 8d1af17449 - Patch from Syzdek: Add ability to ignore RD bit and treat all
requests as if the RD bit is set.


git-svn-id: file:///svn/unbound/trunk@4701 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-30 09:33:21 +00:00
Wouter Wijngaards 0db1573d34 - Fix that fallback for windows port.
git-svn-id: file:///svn/unbound/trunk@4700 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-29 07:52:31 +00:00
Wouter Wijngaards b3c45a8edb - in compat/arc4random call getentropy_urandom when getentropy fails
with ENOSYS.


git-svn-id: file:///svn/unbound/trunk@4699 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-29 07:48:58 +00:00
Wouter Wijngaards 1a0bd1a150 - tls-win-cert option that adds the system certificate store for
authenticating DNS-over-TLS connections.  It can be used instead
  of the tls-cert-bundle option, or with it to add certificates.


git-svn-id: file:///svn/unbound/trunk@4698 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-28 14:15:06 +00:00
Wouter Wijngaards 5a726fb61f - Add routine from getdns to add windows cert store to the SSL_CTX.
git-svn-id: file:///svn/unbound/trunk@4697 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-28 13:22:10 +00:00
Wouter Wijngaards 6792d2d036 - Fix windows tcp and tls spin on events.
git-svn-id: file:///svn/unbound/trunk@4696 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-28 12:30:34 +00:00
Wouter Wijngaards d32fb26adb - Fix close events for tcp only.
git-svn-id: file:///svn/unbound/trunk@4695 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-25 10:41:24 +00:00
Wouter Wijngaards d4ba7731ad - Fix that tcp sticky events are removed for closed fd on windows.
git-svn-id: file:///svn/unbound/trunk@4694 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-25 10:02:06 +00:00
Wouter Wijngaards b9607297e9 - For TCP and TLS connections that don't establish, perform address
update in infra cache, so future selections can exclude them.


git-svn-id: file:///svn/unbound/trunk@4693 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-25 06:21:39 +00:00
Wouter Wijngaards 9ed59fdf34 setup when ssl upstream or a cert-bundle is configured.
git-svn-id: file:///svn/unbound/trunk@4692 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 13:03:10 +00:00
Wouter Wijngaards 8bcb44a019 Fix asynclook for libunbound needing SSL initialization
git-svn-id: file:///svn/unbound/trunk@4691 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 12:59:17 +00:00
Wouter Wijngaards 6b28c8ace2 - unbound-host initializes ssl (for potential DNS-over-TLS usage
inside libunbound).


git-svn-id: file:///svn/unbound/trunk@4690 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 12:30:13 +00:00
Wouter Wijngaards 55088951c0 - Fix that windows unbound service can use DNS-over-TLS.
git-svn-id: file:///svn/unbound/trunk@4689 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 09:23:24 +00:00
Wouter Wijngaards 55a0d89f0d make depend for win_svc.c include.
git-svn-id: file:///svn/unbound/trunk@4688 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 09:05:37 +00:00
Wouter Wijngaards d532c9913c - Fix that libunbound can do DNS-over-TLS, when configured.
git-svn-id: file:///svn/unbound/trunk@4687 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-24 08:57:37 +00:00
Wouter Wijngaards 261bf354b7 - Use accept4 to speed up incoming TCP (and TLS) connections,
available on Linux and FreeBSD.


git-svn-id: file:///svn/unbound/trunk@4686 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-23 13:55:09 +00:00
Ralph Dolmans 50b6dc4b81 - Qname minimisation default changed to yes.
git-svn-id: file:///svn/unbound/trunk@4685 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-17 10:33:19 +00:00
Wouter Wijngaards ba29a4a078 generated yacc and lex output.
git-svn-id: file:///svn/unbound/trunk@4684 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-15 07:48:12 +00:00
Wouter Wijngaards 676644d8e8 - Fix low-rtt-pct to low-rtt-permil, as it is parts in one thousand.
git-svn-id: file:///svn/unbound/trunk@4683 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-15 07:30:53 +00:00
Wouter Wijngaards f64a897cbc - Fix contrib/libunbound.pc for libssl libcrypto references,
from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226914


git-svn-id: file:///svn/unbound/trunk@4682 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-11 11:52:19 +00:00
Wouter Wijngaards 8b209f8f68 - Fix mesh state assertion failure due to callback removal.
git-svn-id: file:///svn/unbound/trunk@4681 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-07 11:29:12 +00:00
Wouter Wijngaards 16b6619dfa - Fix windows to not have sticky TLS events for TCP.
- Fix read of DNS over TLS length and data in one read call.


git-svn-id: file:///svn/unbound/trunk@4680 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-07 08:31:17 +00:00
Wouter Wijngaards a8c8fa6bc6 Fix async bool.
git-svn-id: file:///svn/unbound/trunk@4679 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:37:04 +00:00
Wouter Wijngaards 6d7e5df98f fix to please gcc 8 and lint.
git-svn-id: file:///svn/unbound/trunk@4678 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:29:15 +00:00
Wouter Wijngaards 1d5d95c8cb And cast here.
git-svn-id: file:///svn/unbound/trunk@4677 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:17:56 +00:00
Wouter Wijngaards 8f886fc6dd - Fix function type cast warning in libunbound context callback type.
git-svn-id: file:///svn/unbound/trunk@4676 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:12:19 +00:00
Wouter Wijngaards 581f975b38 - Fix gcc 8 buffer warning in testcode.
git-svn-id: file:///svn/unbound/trunk@4675 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:09:33 +00:00
Wouter Wijngaards d2c8bcf318 - Fix that configure --with-libhiredis also turns on cachedb.
git-svn-id: file:///svn/unbound/trunk@4674 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 09:59:18 +00:00
Wouter Wijngaards ef1ed6365c trunk has 1.7.2 in development
git-svn-id: file:///svn/unbound/trunk@4673 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 07:59:09 +00:00
Wouter Wijngaards 82418e2bf7 Fixup test for new timeout value.
git-svn-id: file:///svn/unbound/trunk@4671 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-02 06:52:46 +00:00
Wouter Wijngaards 6fefbb4115 - Fix fail to reject dead peers in forward-zone, with ssl-upstream.
git-svn-id: file:///svn/unbound/trunk@4670 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-02 06:36:02 +00:00
Wouter Wijngaards 85bf0bd994 - Fix that unbound-control reload frees the rrset keys and returns
the memory pages to the system.


git-svn-id: file:///svn/unbound/trunk@4669 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-01 14:00:06 +00:00
Wouter Wijngaards 913d4537f4 valgrind for unittest.
git-svn-id: file:///svn/unbound/trunk@4668 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-01 12:20:37 +00:00
Wouter Wijngaards 4e2bafafef valgrind more unit tests.
git-svn-id: file:///svn/unbound/trunk@4667 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-01 12:12:21 +00:00
Wouter Wijngaards bffb7c52d5 - Fix spelling error in man page and note defaults as no instead of
off.


git-svn-id: file:///svn/unbound/trunk@4666 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-30 07:24:05 +00:00
Wouter Wijngaards 38c4d3d09d - tag for 1.7.1rc1 release.
git-svn-id: file:///svn/unbound/trunk@4664 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-26 07:18:42 +00:00
Wouter Wijngaards 2951f21dab - Fix for crash in daemon_cleanup with dnstap during reload,
from Saksham Manchanda.
- Also that for dnscrypt.


git-svn-id: file:///svn/unbound/trunk@4663 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-26 06:59:49 +00:00
Ralph Dolmans d97a635084 - Fix memory leak when caching wildcard records for aggressive NSEC use
git-svn-id: file:///svn/unbound/trunk@4662 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-25 13:13:05 +00:00
Wouter Wijngaards 2c9d9fe211 And assertion.
git-svn-id: file:///svn/unbound/trunk@4661 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 15:16:16 +00:00
Wouter Wijngaards 583411768d - Fix auth https for libev.
git-svn-id: file:///svn/unbound/trunk@4660 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 15:13:18 +00:00
Wouter Wijngaards a55df65bc9 - Fix contrib/fastrpz.patch for this release.
git-svn-id: file:///svn/unbound/trunk@4659 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 14:26:21 +00:00
Wouter Wijngaards d6de848e29 This lexer output looks like it'll have less signed-unsigned warnings.
git-svn-id: file:///svn/unbound/trunk@4658 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 10:23:12 +00:00
Wouter Wijngaards 649a98d855 Fixup whitespace for added authzone code.
git-svn-id: file:///svn/unbound/trunk@4657 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 10:22:30 +00:00
Ralph Dolmans 127759b160 strcpy to memmove, to please analysers
git-svn-id: file:///svn/unbound/trunk@4656 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 10:10:11 +00:00
Wouter Wijngaards 5b29f1b3ac Fix libunbound return for root key sentinel.
git-svn-id: file:///svn/unbound/trunk@4655 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 09:16:10 +00:00
Ralph Dolmans 755177fb4c Add root-key-sentinel test description
git-svn-id: file:///svn/unbound/trunk@4654 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 09:13:57 +00:00
Ralph Dolmans ee9c42bee5 Added root-key-sentinel test
git-svn-id: file:///svn/unbound/trunk@4653 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 09:10:38 +00:00
Ralph Dolmans 4d06c36342 - Added root-key-sentinel support
git-svn-id: file:///svn/unbound/trunk@4652 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 09:03:49 +00:00
Wouter Wijngaards 1508d3708c make depend
git-svn-id: file:///svn/unbound/trunk@4651 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 14:42:52 +00:00
Wouter Wijngaards ea6266f736 - list_auth_zones unbound-control command.
git-svn-id: file:///svn/unbound/trunk@4650 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 14:42:30 +00:00
Wouter Wijngaards 406a9d8350 unit test with TLS authentication
git-svn-id: file:///svn/unbound/trunk@4649 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 14:18:24 +00:00
Wouter Wijngaards 2be0263dfa - Fix cname classification with qname minimisation enabled.
git-svn-id: file:///svn/unbound/trunk@4648 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 13:14:39 +00:00
Wouter Wijngaards deea985a20 - Attempt for auth zone fix; add of callback in mesh gets from
callback does not skip callback of result.


git-svn-id: file:///svn/unbound/trunk@4647 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 12:51:00 +00:00
Wouter Wijngaards 0d18256828 - Fix sldns parse failure for CDS alternate delete syntax empty hex.
git-svn-id: file:///svn/unbound/trunk@4646 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 10:35:35 +00:00
Wouter Wijngaards abe18e41bc - auth zone http download stores exact copy of downloaded file,
including comments in the file.


git-svn-id: file:///svn/unbound/trunk@4645 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 10:13:50 +00:00
Wouter Wijngaards 716282cc1a - Fix #4092: libunbound: use-caps-for-id lacks colon in
config_set_option.


git-svn-id: file:///svn/unbound/trunk@4644 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 07:51:21 +00:00
Wouter Wijngaards f5a59fea5d - makedist uses bz2 for expat code, instead of tar.gz.
git-svn-id: file:///svn/unbound/trunk@4643 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-23 07:45:18 +00:00
Wouter Wijngaards 2e70e3a0d3 - Delete auth zone when removed from config.
git-svn-id: file:///svn/unbound/trunk@4642 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-20 14:40:07 +00:00
Wouter Wijngaards 7ff459af13 - Fix #4091: Fix that reload of auth-zone does not merge the zonefile
with the previous contents.


git-svn-id: file:///svn/unbound/trunk@4641 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-20 14:15:34 +00:00
Wouter Wijngaards 5bee11a6d3 - removed free from failed parse case.
git-svn-id: file:///svn/unbound/trunk@4640 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-20 14:10:55 +00:00
Wouter Wijngaards 0b21483b17 explain how to read the certificate.
git-svn-id: file:///svn/unbound/trunk@4639 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-20 13:45:59 +00:00
Wouter Wijngaards 7444b3a8bf - man page documentation for dns-over-tls forward-addr '#' notation.
git-svn-id: file:///svn/unbound/trunk@4638 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-20 11:50:41 +00:00
Wouter Wijngaards f39e39ed47 - For addr with #authname and no @port notation, the default is 853.
git-svn-id: file:///svn/unbound/trunk@4637 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 14:23:14 +00:00
Wouter Wijngaards 1989c52ca0 Note bugfix and RFC support.
- Fix #658: unbound using TLS in a forwarding configuration does not
  verify the server's certificate (RFC 8310 support).


git-svn-id: file:///svn/unbound/trunk@4636 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:45:27 +00:00
Wouter Wijngaards d8df0ddef8 note RFC.
git-svn-id: file:///svn/unbound/trunk@4635 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:44:04 +00:00
Wouter Wijngaards 7f6e3852b8 Note example use of tls authentication.
git-svn-id: file:///svn/unbound/trunk@4634 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:32:39 +00:00
Wouter Wijngaards 23656b2b0e fix lint
git-svn-id: file:///svn/unbound/trunk@4633 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:18:00 +00:00
Wouter Wijngaards c16a32d2be fix doxygen comments.
git-svn-id: file:///svn/unbound/trunk@4632 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:16:10 +00:00
Wouter Wijngaards 9d28279475 - Can set tls authentication with forward-addr: IP#tls.auth.name
And put the public cert bundle in tls-cert-bundle: "ca-bundle.pem".


git-svn-id: file:///svn/unbound/trunk@4631 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-19 12:10:05 +00:00
Wouter Wijngaards 913de80cbc - Fix auth-zone retry timer to be on schedule with retry timeout,
with backoff.  Also time a refresh at the zone expiry.


git-svn-id: file:///svn/unbound/trunk@4630 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-18 06:43:02 +00:00
Wouter Wijngaards e4c8085408 - unit test for allow-notify
git-svn-id: file:///svn/unbound/trunk@4629 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-17 14:58:43 +00:00
Wouter Wijngaards 1b055c6ca7 - allow-notify: config statement for auth-zones.
git-svn-id: file:///svn/unbound/trunk@4628 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-17 13:23:35 +00:00
Wouter Wijngaards 630600e70d - auth zone notify work.
git-svn-id: file:///svn/unbound/trunk@4627 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-17 12:18:34 +00:00
Wouter Wijngaards 4809fe1b95 - auth zone notify work.
git-svn-id: file:///svn/unbound/trunk@4626 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-16 15:10:30 +00:00
Wouter Wijngaards 2d6715878d - auth zone notify work.
git-svn-id: file:///svn/unbound/trunk@4625 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-16 14:24:57 +00:00
Wouter Wijngaards 4691979679 - Fix auth zone target lookup iterator.
- notify with prefix


git-svn-id: file:///svn/unbound/trunk@4624 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-16 13:14:24 +00:00
Wouter Wijngaards 4e5af01354 - Fix memory free on fail for $INCLUDE in authzone.
- Fix that an internal error to look up the wrong rr type for
  auth zone gets stopped, before trying to send there.
- auth zone notify work.


git-svn-id: file:///svn/unbound/trunk@4623 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-13 13:04:26 +00:00
Wouter Wijngaards b23b39bcfd - Fix for max include depth for authzones.
git-svn-id: file:///svn/unbound/trunk@4622 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-13 06:25:30 +00:00
Wouter Wijngaards 4f974e3465 fix lint.
git-svn-id: file:///svn/unbound/trunk@4621 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 15:06:51 +00:00
Wouter Wijngaards 85994fb61c Fix doxygen
git-svn-id: file:///svn/unbound/trunk@4620 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 15:06:02 +00:00
Wouter Wijngaards ad9784c5e8 - auth zone notify work.
git-svn-id: file:///svn/unbound/trunk@4619 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 14:57:38 +00:00
Ralph Dolmans c239c3f395 cast neg cache stats to long long
git-svn-id: file:///svn/unbound/trunk@4618 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 11:48:05 +00:00
Wouter Wijngaards 8d22d3c13d make depend
git-svn-id: file:///svn/unbound/trunk@4617 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 11:46:21 +00:00
Ralph Dolmans 6ef9cafc0e - num.query.aggressive.NOERROR and num.query.aggressive.NXDOMAIN statistics
counters


git-svn-id: file:///svn/unbound/trunk@4616 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 11:39:23 +00:00
Wouter Wijngaards 471ed1befe Note default value.
git-svn-id: file:///svn/unbound/trunk@4615 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 07:47:52 +00:00
Wouter Wijngaards e822adf725 - documentation for low-rtt and low-rtt-pct.
git-svn-id: file:///svn/unbound/trunk@4614 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 07:34:26 +00:00
Wouter Wijngaards d91f09896d get_option and set_option for low-rtt and low-rtt-pct.
git-svn-id: file:///svn/unbound/trunk@4613 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-09 13:39:29 +00:00
Wouter Wijngaards d41cdb6ce8 - low-rtt and low-rtt-pct in unbound.conf enable the server selection
of fast servers for some percentage of the time.


git-svn-id: file:///svn/unbound/trunk@4612 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-09 13:27:28 +00:00
Wouter Wijngaards fbee729c5b - Accept both option names with and without colon for get_option
and set_option.


git-svn-id: file:///svn/unbound/trunk@4611 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-09 10:42:48 +00:00
Wouter Wijngaards 89ad258515 - num.query.authzone.up and num.query.authzone.down statistics counters.
- Fix downstream auth zone, only fallback when auth zone fails to
  answer and fallback is enabled.


git-svn-id: file:///svn/unbound/trunk@4610 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-09 10:15:06 +00:00
Wouter Wijngaards 0e5abca6b7 - Fix that flush_zone sets prefetch ttl expired, so that with
serve-expired enabled it'll start prefetching those entries.


git-svn-id: file:///svn/unbound/trunk@4609 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-09 07:39:59 +00:00
Wouter Wijngaards 9cd2f836bd Removed unused files (from an editor?).
git-svn-id: file:///svn/unbound/trunk@4608 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-06 06:16:03 +00:00
Wouter Wijngaards 1f9caf5805 - ED448 support.
git-svn-id: file:///svn/unbound/trunk@4607 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 14:44:17 +00:00
Wouter Wijngaards c515215eea - Fix unbound-control over pipe with openssl 1.1.1, the TLSv1.3
tls_choose_sigalg routine does not allow the ciphers for the pipe,
  so use TLSv1.2.


git-svn-id: file:///svn/unbound/trunk@4606 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 13:43:05 +00:00
Wouter Wijngaards 100cc496de Fixup.
git-svn-id: file:///svn/unbound/trunk@4605 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 09:58:59 +00:00
Wouter Wijngaards 0a06c5bfa2 - Fix above stub queries for type NS and useless delegation point.
git-svn-id: file:///svn/unbound/trunk@4604 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 09:53:27 +00:00
Wouter Wijngaards 6f4451b761 - nitpick fixes in example.conf.
git-svn-id: file:///svn/unbound/trunk@4603 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 08:30:25 +00:00
Wouter Wijngaards 55b5227431 make depend
git-svn-id: file:///svn/unbound/trunk@4602 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 08:10:40 +00:00
Wouter Wijngaards 2be98b581a - Combine write of tcp length and tcp query for dns over tls.
git-svn-id: file:///svn/unbound/trunk@4601 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 08:10:25 +00:00
Wouter Wijngaards 4e0128f16a - Fix unable to resolve after new WLAN connection, due to auth-zone
failing with a forwarder set.  Now, auth-zone is only used for
  answers (not referrals) when a forwarder is set.


git-svn-id: file:///svn/unbound/trunk@4600 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-03 12:22:35 +00:00
Wouter Wijngaards 3d1f9ae9d3 - Fix #4043: make test fails due to v6 presentation issue in macOS.
git-svn-id: file:///svn/unbound/trunk@4599 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-03 07:47:02 +00:00
Ralph Dolmans 5fabe62e70 - Check "result" in dup_all(), by Florian Obser.
git-svn-id: file:///svn/unbound/trunk@4598 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-29 08:02:26 +00:00
Ralph Dolmans 39f6488471 - Fix unbound-control get_option aggressive-nsec
git-svn-id: file:///svn/unbound/trunk@4597 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-23 12:23:02 +00:00
Wouter Wijngaards 170c03f7db fix compile.
git-svn-id: file:///svn/unbound/trunk@4596 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-22 09:39:26 +00:00
Ralph Dolmans e5c14bfd16 Changelog typo fix
git-svn-id: file:///svn/unbound/trunk@4595 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-21 15:42:25 +00:00
Wouter Wijngaards 4a0d32ec53 deleted the chmod+x on this file, this means it removed the svn:executable property.
git-svn-id: file:///svn/unbound/trunk@4594 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-21 15:02:25 +00:00
Ralph Dolmans 9f0d521b88 - Do use cached NSEC records to generate negative answers for domains under
DNSSEC Negative Trust Anchors.


git-svn-id: file:///svn/unbound/trunk@4593 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-21 14:34:17 +00:00
Wouter Wijngaards 78031b37fc - iana port update.
git-svn-id: file:///svn/unbound/trunk@4592 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-19 13:19:53 +00:00
Wouter Wijngaards e1e629e592 - corrected a minor typo in the changelog.
- move htobe64/be64toh portability code to cachedb.c.


git-svn-id: file:///svn/unbound/trunk@4591 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-16 06:46:56 +00:00
Wouter Wijngaards 554b8b35ae fix.
git-svn-id: file:///svn/unbound/trunk@4590 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 14:28:04 +00:00
Wouter Wijngaards 874165904f doc and flex and yacc.
git-svn-id: file:///svn/unbound/trunk@4589 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 14:23:51 +00:00
Wouter Wijngaards 1d2d33d01a - Create additional tls service interfaces by opening them on other
portnumbers and listing the portnumbers as additional-tls-port: nr.


git-svn-id: file:///svn/unbound/trunk@4588 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 14:19:02 +00:00
Wouter Wijngaards 59935375a3 - Fix #3817: core dump happens in libunbound delete, when queued
servfail hits deleted message queue.


git-svn-id: file:///svn/unbound/trunk@4587 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 13:32:19 +00:00
Wouter Wijngaards e784758a21 - Add --with-libhiredis, unbound support for a new cached backend
that uses a Redis server as the storage.  This implementation
  depends on the hiredis client library (https://redislabs.com/lp/hiredis/).
  And unbound should be built with both --enable-cachedb and
  --with-libhiredis[=PATH] (where $PATH/include/hiredis/hiredis.h
  should exist).  Patch from Jinmei Tatuya (Infoblox).


git-svn-id: file:///svn/unbound/trunk@4586 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 12:33:51 +00:00
Wouter Wijngaards f7fe1a1093 1.7.1 in development
git-svn-id: file:///svn/unbound/trunk@4585 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-15 10:19:14 +00:00
Wouter Wijngaards 3a287a70cd Test and fix.
git-svn-id: file:///svn/unbound/trunk@4583 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-13 13:14:56 +00:00
Wouter Wijngaards d111aaf64f - Fix #3736: Fix 0 TTL domains stuck on SERVFAIL unless manually
flushed with serve-expired on.


git-svn-id: file:///svn/unbound/trunk@4582 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-13 12:52:11 +00:00
Wouter Wijngaards cc617eadc9 Fix
git-svn-id: file:///svn/unbound/trunk@4581 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-13 08:13:16 +00:00
Wouter Wijngaards 54e15f5ace - Fix typo in documentation.
git-svn-id: file:///svn/unbound/trunk@4580 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-13 08:12:38 +00:00
Wouter Wijngaards d1a76b55bc - Check IXFR start serial.
git-svn-id: file:///svn/unbound/trunk@4579 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-12 14:34:24 +00:00
Wouter Wijngaards a48abc2f8b - Fix #3727: Protocol name is TLS, options have been renamed but
documentation is not consistent.


git-svn-id: file:///svn/unbound/trunk@4578 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-12 12:35:53 +00:00
Wouter Wijngaards 3a7d4d7c8d - tag 1.7.0rc3.
git-svn-id: file:///svn/unbound/trunk@4576 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-12 09:22:16 +00:00
Wouter Wijngaards 5e6c2e37ca - Added documentation for aggressive-nsec: yes.
git-svn-id: file:///svn/unbound/trunk@4575 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-12 08:21:44 +00:00
Wouter Wijngaards b8c60d092f configure --disable-swig-version-check stops the swig version check.
git-svn-id: file:///svn/unbound/trunk@4574 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-09 08:01:11 +00:00
Wouter Wijngaards b57c76ed05 - Fix #3598: Fix swig build issue on rhel6 based system.
git-svn-id: file:///svn/unbound/trunk@4573 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-09 08:00:40 +00:00
Wouter Wijngaards 8da3f91a1d 1.7.0rc2
git-svn-id: file:///svn/unbound/trunk@4571 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-08 13:37:34 +00:00
Wouter Wijngaards fdedd3aa38 - note when tag 1.7.0rc1 happened in the changelog.
git-svn-id: file:///svn/unbound/trunk@4570 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:57:33 +00:00
Wouter Wijngaards a5fbb38fe2 - Attempt to remove warning about trailing whitespace.
git-svn-id: file:///svn/unbound/trunk@4569 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:52:49 +00:00
Wouter Wijngaards 3b25c475f5 - Attempt to remove warning about trailing whitespace.
git-svn-id: file:///svn/unbound/trunk@4568 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:52:18 +00:00
Wouter Wijngaards babe659a64 - patch suggested by Debian lintian: allow to -> allow one to, from
A. Schulze.


git-svn-id: file:///svn/unbound/trunk@4567 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:40:09 +00:00
Wouter Wijngaards 980711e658 - patch to log creates keytag queries, from A. Schulze.
git-svn-id: file:///svn/unbound/trunk@4566 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:39:10 +00:00
Wouter Wijngaards 3a69cf5c69 - Fixed contrib/fastrpz.patch, even though this already applied
cleanly for me, now also for others.


git-svn-id: file:///svn/unbound/trunk@4565 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:32:14 +00:00
Wouter Wijngaards 5c8819f1ac - Fix for windows compile.
git-svn-id: file:///svn/unbound/trunk@4563 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-06 09:18:53 +00:00
Wouter Wijngaards f6f2ab1e4a - svn trunk contains 1.7.0, this is the number for the next release.
git-svn-id: file:///svn/unbound/trunk@4561 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-06 09:07:22 +00:00
Wouter Wijngaards 1a7540c80a - Reverted fix for #3512, this may not be the best way forward;
although it could be changed at a later time, to stay similar to
  other implementations.


git-svn-id: file:///svn/unbound/trunk@4560 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-06 08:22:33 +00:00
Wouter Wijngaards 5919273709 - Fix #3582: Squelch address already in use log when reuseaddr option
causes same port to be used twice for tcp connections.


git-svn-id: file:///svn/unbound/trunk@4559 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-05 15:45:34 +00:00
Wouter Wijngaards 4a3a6d1294 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4558 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-05 14:38:30 +00:00
Wouter Wijngaards 9407439587 removed unneeded includes.
git-svn-id: file:///svn/unbound/trunk@4557 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-05 14:37:14 +00:00
Wouter Wijngaards d754cd3de4 - Fix to check define of DSA for when openssl is without deprecated.
git-svn-id: file:///svn/unbound/trunk@4556 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-05 14:28:21 +00:00
Wouter Wijngaards 9f88892190 - Fix nettle compile.
git-svn-id: file:///svn/unbound/trunk@4555 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 13:03:54 +00:00
Wouter Wijngaards 1df2544e07 - Fix compile with staticexe and python module.
git-svn-id: file:///svn/unbound/trunk@4554 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 10:53:49 +00:00
Wouter Wijngaards 0e390bca00 - Fix compile without threads, and remove unused variable.
git-svn-id: file:///svn/unbound/trunk@4553 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 10:36:12 +00:00
Wouter Wijngaards 8de66ab4b8 - Fixup contrib/fastrpz.patch so that it applies.
git-svn-id: file:///svn/unbound/trunk@4552 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 10:18:28 +00:00
Ralph Dolmans 8148308cff - use existing code to find signer on positive wildcard answers
git-svn-id: file:///svn/unbound/trunk@4551 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-22 15:32:18 +00:00
Ralph Dolmans 24fc3242fc - Save wildcard RRset from answer with original owner for use in aggressive
NSEC.


git-svn-id: file:///svn/unbound/trunk@4550 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-22 15:12:31 +00:00
Wouter Wijngaards cd955fa34d - more robust cachedump rrset routine.
git-svn-id: file:///svn/unbound/trunk@4549 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 15:25:19 +00:00
Wouter Wijngaards 28e9561a94 fix spelling error
git-svn-id: file:///svn/unbound/trunk@4548 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 14:07:12 +00:00
Wouter Wijngaards 6905e41b57 - Fix validation for CNAME loops. When it detects a cname loop,
by finding the cname, cname in the existing list, it returns
  the partial result with the validation result up to then.


git-svn-id: file:///svn/unbound/trunk@4547 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 14:04:02 +00:00
Wouter Wijngaards 075f470778 neater code.
git-svn-id: file:///svn/unbound/trunk@4546 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 13:19:49 +00:00
Wouter Wijngaards b8c72d7cbc comment to explain it.
git-svn-id: file:///svn/unbound/trunk@4545 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 13:17:27 +00:00
Wouter Wijngaards b89db70821 - Fix #3512: unbound incorrectly reports SERVFAIL for CAA query
when there is a CNAME loop.


git-svn-id: file:///svn/unbound/trunk@4544 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 13:13:58 +00:00
Wouter Wijngaards a92e9692c1 fix noview.
git-svn-id: file:///svn/unbound/trunk@4543 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-19 13:30:38 +00:00
Wouter Wijngaards 3d57bf0a3b - Fix for more maintainable code in localzone.
git-svn-id: file:///svn/unbound/trunk@4542 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-19 13:21:57 +00:00
Wouter Wijngaards ec21a197ac bug ref nr.
git-svn-id: file:///svn/unbound/trunk@4541 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-19 12:14:43 +00:00
Wouter Wijngaards ccf1ff8f02 - local-zone noview can be used to break out of the view to the
global local zone contents, for queries for that zone.


git-svn-id: file:///svn/unbound/trunk@4540 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-19 12:13:23 +00:00
Wouter Wijngaards 76eee77b08 - Fix #3505: Documentation for default local zones references
wrong RFC.


git-svn-id: file:///svn/unbound/trunk@4539 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-19 08:43:23 +00:00
Wouter Wijngaards 5b7942d197 - Fixes for clang static analyzer, the missing ; in
edns-subnet/addrtree.c after the assert made clang analyzer
  produce a failure to analyze it.


git-svn-id: file:///svn/unbound/trunk@4538 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-16 10:31:48 +00:00
Ralph Dolmans a5df3a131e - Aggressive NSEC tests
git-svn-id: file:///svn/unbound/trunk@4537 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 14:40:29 +00:00
Wouter Wijngaards a901fc5fe7 auth zone: default is https if no 'http://' given.
git-svn-id: file:///svn/unbound/trunk@4536 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 14:28:51 +00:00
Wouter Wijngaards a554c14f18 auth zone whitespace fixes and input validation.
git-svn-id: file:///svn/unbound/trunk@4535 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 14:26:20 +00:00
Wouter Wijngaards da06b1c76c auth zone review fixes
git-svn-id: file:///svn/unbound/trunk@4534 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 14:09:57 +00:00
Wouter Wijngaards b32284af57 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4533 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 10:35:31 +00:00
Wouter Wijngaards 54bd1fdd62 - tls-cert-bundle option in unbound.conf enables TLS authentication.
git-svn-id: file:///svn/unbound/trunk@4532 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-13 10:35:09 +00:00
Wouter Wijngaards da961fd840 - Unit test for auth zone https url download.
git-svn-id: file:///svn/unbound/trunk@4531 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 15:40:05 +00:00
Ralph Dolmans 8449dc1b9d - Fix the ce_len+2 fix (Aggressive NSEC review)
git-svn-id: file:///svn/unbound/trunk@4530 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 12:22:29 +00:00
Ralph Dolmans 0648475a66 - Processed aggressive NSEC code review remarks Wouter
git-svn-id: file:///svn/unbound/trunk@4529 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 12:14:01 +00:00
Ralph Dolmans eff62cecac - Added tests with wildcard expanded NSEC records (CVE-2017-15105 test)
git-svn-id: file:///svn/unbound/trunk@4528 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 11:39:03 +00:00
Wouter Wijngaards e63a4cd0fd auth zone work, nicer debug output.
git-svn-id: file:///svn/unbound/trunk@4527 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-09 08:23:20 +00:00
Wouter Wijngaards dd2ba08f7c auth zone stop sending packets when the application quits.
git-svn-id: file:///svn/unbound/trunk@4526 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-09 08:14:06 +00:00
Wouter Wijngaards d19f3c8c07 - auth zone url config.
git-svn-id: file:///svn/unbound/trunk@4525 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 16:11:27 +00:00
Wouter Wijngaards 427836884e auth zone http work.
git-svn-id: file:///svn/unbound/trunk@4524 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 15:14:51 +00:00
Wouter Wijngaards 1ad34fe7ae auth zone work.
git-svn-id: file:///svn/unbound/trunk@4523 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 14:37:36 +00:00
Ralph Dolmans 77f78152ee - Aggressive use of NSEC implementation. Use cached NSEC records to generate
NXDOMAIN, NODATA and positive wildcard answers.


git-svn-id: file:///svn/unbound/trunk@4522 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 13:16:36 +00:00
Wouter Wijngaards ad89368b4e auth zone work.
git-svn-id: file:///svn/unbound/trunk@4521 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 11:59:30 +00:00
Wouter Wijngaards 5b41e86d51 auth zone review.
git-svn-id: file:///svn/unbound/trunk@4520 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 10:43:58 +00:00
Wouter Wijngaards 48bd83f3b4 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4519 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 10:14:34 +00:00
Wouter Wijngaards db766ce064 fix for doxygen and lint.
git-svn-id: file:///svn/unbound/trunk@4518 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 10:00:10 +00:00
Wouter Wijngaards 75eb720ab5 auth zone work on http feature.
git-svn-id: file:///svn/unbound/trunk@4517 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-07 16:10:31 +00:00
Wouter Wijngaards 88c43a1b45 fix for doxygen
git-svn-id: file:///svn/unbound/trunk@4516 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-06 16:00:10 +00:00
Wouter Wijngaards 0ab8edd170 auth zone work.
git-svn-id: file:///svn/unbound/trunk@4515 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-06 15:54:49 +00:00
Wouter Wijngaards 10e165c574 fix lint warning
git-svn-id: file:///svn/unbound/trunk@4514 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-06 11:17:29 +00:00
Wouter Wijngaards 18aed94e0c fix lint warning
git-svn-id: file:///svn/unbound/trunk@4513 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-06 11:16:23 +00:00
Wouter Wijngaards 3b87862c8a auth zone work.
git-svn-id: file:///svn/unbound/trunk@4512 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-06 09:32:41 +00:00
Wouter Wijngaards 6fc79a70a3 Fixup tests for checklocks. Add auth axfr test for socket code.
git-svn-id: file:///svn/unbound/trunk@4511 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 15:33:32 +00:00
Wouter Wijngaards a1b7abfb9f - auth-zone provides a way to configure RFC7706 from unbound.conf,
eg. with auth-zone: name: "." for-downstream: no for-upstream: yes
  fallback-enabled: yes and masters or a zonefile with data.


git-svn-id: file:///svn/unbound/trunk@4510 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 14:21:46 +00:00
Wouter Wijngaards ff6ab04ecd make depend.
git-svn-id: file:///svn/unbound/trunk@4509 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 12:18:44 +00:00
Wouter Wijngaards bf6f33ceaf - Fix #3451: dnstap not building when you have a separate build dir.
And removed protoc warning, set dnstap.proto syntax to proto2.


git-svn-id: file:///svn/unbound/trunk@4508 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 12:14:51 +00:00
Wouter Wijngaards 324d6e7c36 auth zone fixup lock protection, it wrongly covered the rbtree node.
git-svn-id: file:///svn/unbound/trunk@4507 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 10:57:15 +00:00
Wouter Wijngaards 7edf4a3e75 auth zone test probe of SOA
git-svn-id: file:///svn/unbound/trunk@4506 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 09:59:53 +00:00
Wouter Wijngaards e6b770b686 auth zone ixfr unit tests
git-svn-id: file:///svn/unbound/trunk@4505 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 09:53:26 +00:00
Wouter Wijngaards 172b84f7ce auth zone ixfr unit test, and fixes.
git-svn-id: file:///svn/unbound/trunk@4504 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 09:42:42 +00:00
Wouter Wijngaards dfb8fb2986 auth zone, remove unused code
git-svn-id: file:///svn/unbound/trunk@4503 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 16:13:37 +00:00
Wouter Wijngaards b5739f66a3 fix unit test for new output func.
git-svn-id: file:///svn/unbound/trunk@4502 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 15:16:40 +00:00
Wouter Wijngaards 862b0b568c auth zone, axfr and printout works.
git-svn-id: file:///svn/unbound/trunk@4501 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 14:41:20 +00:00
Wouter Wijngaards 237e796955 Enable valgrind in (some) tests.
git-svn-id: file:///svn/unbound/trunk@4500 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 11:24:00 +00:00
Wouter Wijngaards 1931d6e9cf fix spelling error in delegation.
git-svn-id: file:///svn/unbound/trunk@4499 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 11:13:45 +00:00
Wouter Wijngaards b02f855df8 Fix more critical regions. Cleans tests.
git-svn-id: file:///svn/unbound/trunk@4498 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 11:08:50 +00:00
Wouter Wijngaards 632ea0d02e - lock subnet new item before insertion to please checklocks,
no modification of critical regions outside of lock region.


git-svn-id: file:///svn/unbound/trunk@4497 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 10:52:44 +00:00
Wouter Wijngaards a66fd181e5 auth zone race condition remove and checklock fix for
check of unused alignment memory in structure.


git-svn-id: file:///svn/unbound/trunk@4496 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 10:35:11 +00:00
Wouter Wijngaards cb28d35bd2 - Fix lock race condition in dns cache dname synthesis.
git-svn-id: file:///svn/unbound/trunk@4495 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 10:33:19 +00:00
Wouter Wijngaards 004609b5a7 - unit test with valgrind
git-svn-id: file:///svn/unbound/trunk@4494 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 09:52:52 +00:00
Wouter Wijngaards fdd1199cb1 - unit test with valgrind
git-svn-id: file:///svn/unbound/trunk@4493 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 09:45:13 +00:00
Wouter Wijngaards e95a9ac466 remove debug printf.
git-svn-id: file:///svn/unbound/trunk@4492 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 09:27:55 +00:00
Wouter Wijngaards 30891d6fff - Fix unfreed locks in log and arc4random at exit of unbound.
git-svn-id: file:///svn/unbound/trunk@4491 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 09:27:16 +00:00
Wouter Wijngaards 8605797002 - fix unaligned structure making a false positive in checklock
unitialised memory.


git-svn-id: file:///svn/unbound/trunk@4490 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 15:55:48 +00:00
Wouter Wijngaards cc9a0671f3 auth zone socket creation fix.
git-svn-id: file:///svn/unbound/trunk@4489 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 15:43:00 +00:00
Wouter Wijngaards 0b5e37dcee auth zone test for host lookup
git-svn-id: file:///svn/unbound/trunk@4488 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 15:02:38 +00:00
Wouter Wijngaards abeb60d511 auth zone, nicer debug log
git-svn-id: file:///svn/unbound/trunk@4487 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 13:37:36 +00:00
Wouter Wijngaards 4b9df2bae1 auth zone test checks stored axfr zonefile
git-svn-id: file:///svn/unbound/trunk@4486 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 13:29:31 +00:00
Wouter Wijngaards 61d431e44f auth zone unit test extra_packet moves multipe tcp packets on stream
git-svn-id: file:///svn/unbound/trunk@4485 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 12:23:48 +00:00
Wouter Wijngaards 6a0b5aa8e3 auth zone test, udp and tcp answered from unit test
git-svn-id: file:///svn/unbound/trunk@4484 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-01 10:38:05 +00:00
Wouter Wijngaards 392be1e787 auth zone fix comment
git-svn-id: file:///svn/unbound/trunk@4483 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 15:19:23 +00:00
Wouter Wijngaards 84e819dc31 auth zone move file descriptor functionality to outside network
for the unit test


git-svn-id: file:///svn/unbound/trunk@4482 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 14:59:17 +00:00
Wouter Wijngaards c1047e6a6c auth zone test with zone transfer
git-svn-id: file:///svn/unbound/trunk@4481 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 12:58:25 +00:00
Wouter Wijngaards ca60143bdf cleanup without losing zone contents, and also backoff for nonresponsive
masters while zone data is available.


git-svn-id: file:///svn/unbound/trunk@4480 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 12:52:40 +00:00
Wouter Wijngaards c834b5eecd pickup worker events, and free them.
exponential backoff for continuously failing zones.


git-svn-id: file:///svn/unbound/trunk@4479 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 12:33:19 +00:00
Wouter Wijngaards 10cd092a78 failover for dnssec bogus
git-svn-id: file:///svn/unbound/trunk@4478 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 11:14:01 +00:00
Wouter Wijngaards 0c4a702a39 test for validation of queries answered with a zonefile
git-svn-id: file:///svn/unbound/trunk@4477 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 10:53:01 +00:00
Wouter Wijngaards ed002df8f5 Test authority zone with zonefile for root referrals (RFC7706)
git-svn-id: file:///svn/unbound/trunk@4476 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 08:37:38 +00:00
Wouter Wijngaards bbcea9d913 make depend
git-svn-id: file:///svn/unbound/trunk@4475 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 08:30:50 +00:00
Wouter Wijngaards 657753aac2 auth zone for downstream
git-svn-id: file:///svn/unbound/trunk@4474 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-31 08:30:32 +00:00
Wouter Wijngaards 7de2b4e047 no $INCLUDE in this test.
git-svn-id: file:///svn/unbound/trunk@4473 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 16:14:09 +00:00
Wouter Wijngaards f6946b9412 Test for no-upstream enabled, and thus fallback to normal priming and lookup.
git-svn-id: file:///svn/unbound/trunk@4472 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 16:08:29 +00:00
Wouter Wijngaards 70f3d25173 remove debug print
git-svn-id: file:///svn/unbound/trunk@4471 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 16:02:48 +00:00
Wouter Wijngaards fdd1a602d5 fix to please doxygen's parser.
git-svn-id: file:///svn/unbound/trunk@4470 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 15:51:28 +00:00
Wouter Wijngaards bea3b6b72d unit test for auth zone lookup
git-svn-id: file:///svn/unbound/trunk@4469 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 15:44:49 +00:00
Wouter Wijngaards 7d5dc75dc5 Fix sldns parse state prev dname.
git-svn-id: file:///svn/unbound/trunk@4468 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 14:26:19 +00:00
Wouter Wijngaards 2e1f4420a8 fix $INCLUDE
git-svn-id: file:///svn/unbound/trunk@4467 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 11:12:22 +00:00
Wouter Wijngaards 0362614f94 auth zone, make depend, fallback, create and delete, and lease_time,
and lock fixes.


git-svn-id: file:///svn/unbound/trunk@4466 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 10:35:20 +00:00
Wouter Wijngaards 208d045cf5 lint fixes.
git-svn-id: file:///svn/unbound/trunk@4465 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:48:40 +00:00
Wouter Wijngaards 47909a6f2d lint fixes
git-svn-id: file:///svn/unbound/trunk@4464 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:48:01 +00:00
Ralph Dolmans f4ff97c297 Also use NSEC with longest closest encloser for CNAME responses.
git-svn-id: file:///svn/unbound/trunk@4463 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:44:39 +00:00
Wouter Wijngaards 0121427ef1 remove unused TODO items
git-svn-id: file:///svn/unbound/trunk@4462 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:41:07 +00:00
Wouter Wijngaards a1e63e8118 auth zone work, ixfr apply procedure.
git-svn-id: file:///svn/unbound/trunk@4461 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:33:08 +00:00
Ralph Dolmans b9f4ff6e9f - Use NSEC with longest ce to prove wildcard absence.
- Only use *.ce to prove wildcard absence, no longer names.


git-svn-id: file:///svn/unbound/trunk@4460 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 13:46:57 +00:00
Wouter Wijngaards 942ced78ed remove unneeded statements
git-svn-id: file:///svn/unbound/trunk@4459 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 15:49:15 +00:00
Wouter Wijngaards 9ae592209f fixup iterator
git-svn-id: file:///svn/unbound/trunk@4458 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 15:47:57 +00:00
Wouter Wijngaards dc2e0ec3b6 unneeded statement
git-svn-id: file:///svn/unbound/trunk@4457 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 15:46:48 +00:00
Wouter Wijngaards dd77a1fb9a fix id check
git-svn-id: file:///svn/unbound/trunk@4456 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 15:42:27 +00:00
Wouter Wijngaards 2ef71d6def lint fix.
git-svn-id: file:///svn/unbound/trunk@4455 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 14:40:00 +00:00
Wouter Wijngaards 414ed74526 lint fixes.
git-svn-id: file:///svn/unbound/trunk@4454 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 14:39:19 +00:00
Wouter Wijngaards 01eab08c1c fix ixfr and axfr end detection.
git-svn-id: file:///svn/unbound/trunk@4453 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 14:35:53 +00:00
Wouter Wijngaards 5fd83a85e8 authzone transfer functionality
git-svn-id: file:///svn/unbound/trunk@4452 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-26 14:16:04 +00:00
Wouter Wijngaards 093131438d correct name for libunbound.so.conf
git-svn-id: file:///svn/unbound/trunk@4451 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-25 09:47:09 +00:00
Wouter Wijngaards 603b62fdb5 add semicolon at end of line.
git-svn-id: file:///svn/unbound/trunk@4450 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-25 09:33:24 +00:00
Wouter Wijngaards ec179380f4 - ltrace.conf file for libunbound in contrib.
git-svn-id: file:///svn/unbound/trunk@4449 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-25 09:31:49 +00:00
Wouter Wijngaards 7eddb38162 - Print fatal errors about remote control setup before log init,
so that it is printed to console.


git-svn-id: file:///svn/unbound/trunk@4448 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-23 15:59:18 +00:00
Wouter Wijngaards c54dfcade9 - Fix that unbound-checkconf -f flag works with auto-trust-anchor-file
for startup scripts to get the full pathname(s) of anchor file(s).


git-svn-id: file:///svn/unbound/trunk@4447 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-23 14:20:17 +00:00
Wouter Wijngaards 859ca7db68 - Fix #3397: Fix that when the cache contains an unsigned DNAME in
the middle of a cname chain, a result without the DNAME could
  be returned.


git-svn-id: file:///svn/unbound/trunk@4446 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-22 14:30:16 +00:00
Wouter Wijngaards df6fbb82be - Fix #3397: Fix that cachedb could return a partial CNAME chain.
git-svn-id: file:///svn/unbound/trunk@4445 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-22 13:54:20 +00:00
Wouter Wijngaards 4b4b1eec8b - Accept tls-upstream in unbound.conf, the ssl-upstream keyword is
also recognized and means the same.  Also for tls-port,
  tls-service-key, tls-service-pem, stub-tls-upstream and
  forward-tls-upstream.


git-svn-id: file:///svn/unbound/trunk@4444 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-22 08:35:44 +00:00
Wouter Wijngaards d759fdd457 - make depend: code dependencies updated in Makefile.
git-svn-id: file:///svn/unbound/trunk@4443 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-19 09:52:40 +00:00
Wouter Wijngaards fa57a0fbac - iana port update.
git-svn-id: file:///svn/unbound/trunk@4442 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-19 09:51:50 +00:00
Wouter Wijngaards 2a6250e3fb - patch for CVE-2017-15105: vulnerability in the processing of
wildcard synthesized NSEC records.


git-svn-id: file:///svn/unbound/trunk@4441 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-19 09:50:35 +00:00
Wouter Wijngaards be26349e37 - trunk has 1.6.9 with fix and previous commits.
git-svn-id: file:///svn/unbound/trunk@4440 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-19 09:49:32 +00:00
Ralph Dolmans b2943670ca - Copy query and correctly set flags on REFUSED answers when cache snooping is
not allowed.


git-svn-id: file:///svn/unbound/trunk@4436 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-04 15:16:19 +00:00
Ralph Dolmans 7e8d3423cd Please lint
git-svn-id: file:///svn/unbound/trunk@4435 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-03 17:05:48 +00:00
Ralph Dolmans 0df528cc9e - Fix queries being leaked above stub when refetching glue.
git-svn-id: file:///svn/unbound/trunk@4434 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-03 16:54:22 +00:00
Wouter Wijngaards 21d1989e05 fix oneoff
git-svn-id: file:///svn/unbound/trunk@4433 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 13:36:17 +00:00
Wouter Wijngaards fa90bbc07a fixup larger than 2**31 case.
git-svn-id: file:///svn/unbound/trunk@4432 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 12:43:43 +00:00
Wouter Wijngaards 44eb7bfd25 - Remove clang optimizer disable,
Fix that expiration date checks don't fail with clang -O2.


git-svn-id: file:///svn/unbound/trunk@4431 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 10:48:00 +00:00
Wouter Wijngaards 6cb75924d9 - Fix that DS queries with referral replies are answered straight
away, without a repeat query picking the DS from cache.
  The correct reply should have been an answer, the reply is fixed
  by the scrubber to have the answer in the answer section.


git-svn-id: file:///svn/unbound/trunk@4430 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 09:48:22 +00:00
Wouter Wijngaards cb98f5896f - Also disable -flto for clang, to make incep-expi signature check
work.


git-svn-id: file:///svn/unbound/trunk@4429 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 12:54:02 +00:00
Wouter Wijngaards dfba6bf690 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4428 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 12:42:45 +00:00
Wouter Wijngaards 06b80629bc - Fix timestamp failure because of clang optimizer failure, by
disabling -O2 when the compiler --version is clang.


git-svn-id: file:///svn/unbound/trunk@4427 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 10:25:41 +00:00
Wouter Wijngaards 87edf6497d remove debug output
git-svn-id: file:///svn/unbound/trunk@4426 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 10:21:38 +00:00
Wouter Wijngaards 6bae276ecb this version of unbound fails when compiled with CC=clang and -O (edit Makefile), or -O2 (default). If you use no optimizing flag, unittest works.
git-svn-id: file:///svn/unbound/trunk@4425 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 10:16:06 +00:00
Wouter Wijngaards b1abc813fc unit test for timestamp failure with clang
git-svn-id: file:///svn/unbound/trunk@4424 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 09:38:11 +00:00
Wouter Wijngaards 1264f8cff8 authzone work
git-svn-id: file:///svn/unbound/trunk@4423 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-12 15:55:23 +00:00
Wouter Wijngaards 3b393e0e2d set repinfo correctly (this prints out debug and errors with the correct remote IP)
git-svn-id: file:///svn/unbound/trunk@4422 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-12 15:45:55 +00:00
Wouter Wijngaards a7d55a5ad8 fix unit tests
git-svn-id: file:///svn/unbound/trunk@4421 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-12 15:41:03 +00:00
Wouter Wijngaards 30da6bde6f - authzone work, transfer connect.
git-svn-id: file:///svn/unbound/trunk@4420 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-12 15:39:45 +00:00
Ralph Dolmans d918602521 - Fix qname-minimisation documentation (A QTYPE, not NS)
git-svn-id: file:///svn/unbound/trunk@4419 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-12 09:23:13 +00:00
Ralph Dolmans e2aef3fa43 - Check whether --with-libunbound-only is set when using --with-nettle or
--with-nss. 


git-svn-id: file:///svn/unbound/trunk@4418 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-07 10:51:22 +00:00
Wouter Wijngaards 1ed537dc52 lookup and transfer setup
git-svn-id: file:///svn/unbound/trunk@4417 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-04 16:24:24 +00:00
Wouter Wijngaards 072347e594 disown and pickup of next task.
git-svn-id: file:///svn/unbound/trunk@4416 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-04 14:51:01 +00:00
Wouter Wijngaards 743ea6815b fixup locks.
git-svn-id: file:///svn/unbound/trunk@4415 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-04 09:50:31 +00:00
Wouter Wijngaards 2f69cd1765 - Fix link failure on OmniOS.
git-svn-id: file:///svn/unbound/trunk@4414 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-04 08:28:16 +00:00
Wouter Wijngaards c1e91553b9 auth zone transfer setup.
git-svn-id: file:///svn/unbound/trunk@4413 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-01 16:04:54 +00:00
Wouter Wijngaards 36a54a9c9d iterate probe over looked up ip4 and ip6 addresses
git-svn-id: file:///svn/unbound/trunk@4412 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-01 14:20:55 +00:00
Wouter Wijngaards d88bb99957 - auth zone work. probe hostname lookup.
git-svn-id: file:///svn/unbound/trunk@4411 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-01 14:02:28 +00:00
Wouter Wijngaards 6030306d9c note that state must be separated because of error corner cases.
git-svn-id: file:///svn/unbound/trunk@4410 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-30 16:07:10 +00:00
Wouter Wijngaards aeeb123b1e - Fix #3299 - forward CNAME daisy chain is not working
git-svn-id: file:///svn/unbound/trunk@4409 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-30 08:34:20 +00:00
Wouter Wijngaards 019d363dcd re-run aclocal (of Fedora 27).
git-svn-id: file:///svn/unbound/trunk@4408 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-17 14:44:57 +00:00
Wouter Wijngaards 038303e6a5 upgraded comment
git-svn-id: file:///svn/unbound/trunk@4407 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-16 14:36:23 +00:00
Wouter Wijngaards 635c4b5b89 fix for lint.
git-svn-id: file:///svn/unbound/trunk@4406 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-14 16:05:00 +00:00
Wouter Wijngaards 975a7b1fc0 - auth xfer work on probe timer and lookup.
git-svn-id: file:///svn/unbound/trunk@4405 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-14 15:58:24 +00:00
Wouter Wijngaards 52aeaf4924 - Fix #2882: Unbound behaviour changes (wrong) when domain-insecure is
set for stub zone.  It no longer searches for DNSSEC information.


git-svn-id: file:///svn/unbound/trunk@4404 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-14 10:01:44 +00:00
Wouter Wijngaards 6c2fa12f10 no AAAA shortcuts.
git-svn-id: file:///svn/unbound/trunk@4403 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-13 14:15:10 +00:00
Wouter Wijngaards f3304d408c - Fix qname minimisation to send AAAA queries at zonecut like type A.
git-svn-id: file:///svn/unbound/trunk@4402 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-13 12:11:38 +00:00
Wouter Wijngaards 05e3539856 - Fix #2801: Install libunbound.pc.
git-svn-id: file:///svn/unbound/trunk@4401 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-13 10:25:01 +00:00
Wouter Wijngaards ff384cd658 unused void cast.
git-svn-id: file:///svn/unbound/trunk@4400 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-09 16:06:27 +00:00
Wouter Wijngaards 62fff935da - Fix #2492: Documentation libunbound.
git-svn-id: file:///svn/unbound/trunk@4399 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-07 08:05:12 +00:00
Wouter Wijngaards 35bd34f8e6 - Fix #2141 - for libsodium detect lack of entropy in chroot, print
a message and exit.


git-svn-id: file:///svn/unbound/trunk@4398 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-03 15:08:14 +00:00
Wouter Wijngaards 02fdb4c879 - Fix #2034 - Autoconf and -flto.
git-svn-id: file:///svn/unbound/trunk@4397 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-03 10:52:25 +00:00
Wouter Wijngaards 621b1c57a3 - Fix #2362: TLS1.3/openssl-1.1.1 not working.
git-svn-id: file:///svn/unbound/trunk@4396 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-03 07:40:36 +00:00
Wouter Wijngaards d905317682 Correct line ending in man page.
git-svn-id: file:///svn/unbound/trunk@4395 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-02 10:25:27 +00:00
Wouter Wijngaards 9e59d5eb52 Typing error fix up.
git-svn-id: file:///svn/unbound/trunk@4394 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-02 09:44:27 +00:00
Wouter Wijngaards 10b8997cc5 - make ip-transparent option work on OpenBSD.
git-svn-id: file:///svn/unbound/trunk@4393 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-02 09:34:19 +00:00
Wouter Wijngaards d41209512e - Fix #1913: ub_ctx_config is under circumstances thread-safe.
git-svn-id: file:///svn/unbound/trunk@4392 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-11-02 08:23:52 +00:00
Wouter Wijngaards 8cf7e424e2 - iana port update.
git-svn-id: file:///svn/unbound/trunk@4391 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-31 13:18:04 +00:00
Wouter Wijngaards cba64aaaa4 - lexer output.
git-svn-id: file:///svn/unbound/trunk@4390 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-31 10:07:01 +00:00
Wouter Wijngaards 31b331ca67 - Document that errno is left informative on libunbound config read
fail.


git-svn-id: file:///svn/unbound/trunk@4389 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-31 08:18:18 +00:00
Ralph Dolmans e13088d911 - Fix #2031: Double included headers
git-svn-id: file:///svn/unbound/trunk@4388 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-25 13:30:32 +00:00
Ralph Dolmans d016f85110 - Fix #1949: [dnscrypt] make provider name mismatch more obvious.
git-svn-id: file:///svn/unbound/trunk@4387 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-25 10:13:35 +00:00
Ralph Dolmans bcadc2b45c - Fixed libunbound manual typo.
git-svn-id: file:///svn/unbound/trunk@4386 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-25 08:38:24 +00:00
Ralph Dolmans afb2d5f105 - Update B root ipv4 address.
git-svn-id: file:///svn/unbound/trunk@4385 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-24 14:50:20 +00:00
Wouter Wijngaards 15d892c62d authzone, handle probe return packets.
git-svn-id: file:///svn/unbound/trunk@4384 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-20 14:43:51 +00:00
Wouter Wijngaards eb0f3256d9 fix lint
git-svn-id: file:///svn/unbound/trunk@4383 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-20 12:13:37 +00:00
Wouter Wijngaards f9add77d7b corrected fix for test link.
git-svn-id: file:///svn/unbound/trunk@4382 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-20 11:55:19 +00:00
Wouter Wijngaards 4863f45f7e fix test link
git-svn-id: file:///svn/unbound/trunk@4381 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-19 15:14:00 +00:00
Wouter Wijngaards 6f88df1fc8 authzone work.
git-svn-id: file:///svn/unbound/trunk@4380 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-19 15:11:20 +00:00
Wouter Wijngaards aa76ed9baf fix doxygen
git-svn-id: file:///svn/unbound/trunk@4379 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-19 10:18:09 +00:00
Wouter Wijngaards bdb6a5501a - authzone work, probe timer setup.
git-svn-id: file:///svn/unbound/trunk@4378 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-19 09:03:36 +00:00
Wouter Wijngaards 7bf7524d22 - lint for recent authzone commit.
git-svn-id: file:///svn/unbound/trunk@4377 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-18 06:43:51 +00:00
Wouter Wijngaards b37bc47eaa - Work on local root zone code.
git-svn-id: file:///svn/unbound/trunk@4376 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-17 15:16:31 +00:00
Wouter Wijngaards c5c2cb13d4 - Better documentation for cache-max-negative-ttl.
git-svn-id: file:///svn/unbound/trunk@4375 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-17 12:53:21 +00:00
Wouter Wijngaards 8752326d8c Turn duplicates into warnings for dnscrypt, and
fix declaration and code mix warning.


git-svn-id: file:///svn/unbound/trunk@4374 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-17 07:36:51 +00:00
Wouter Wijngaards 52e2331dd4 - [dnscrypt] prevent dnscrypt-secret-key, dnscrypt-provider-cert
duplicates
- [dnscrypt] introduce dnscrypt-provider-cert-rotated option,
  from Manu Bretelle.
	This option allows handling multiple cert/key pairs while only
	distributing some of them.
	In order to reliably match a client magic with a given key without
	strong assumption as to how those were generated, we need both key and
	cert. Likewise, in order to know which ES version should be used.
	On the other hand, when rotating a cert, it can be desirable to only
	serve the new cert but still be able to handle clients that are still
	using the old certs's public key.
	The `dnscrypt-provider-cert-rotated` allow to instruct unbound to not
	publish the cert as part of the DNS's provider_name's TXT answer.



git-svn-id: file:///svn/unbound/trunk@4373 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-17 07:34:49 +00:00
Wouter Wijngaards 5ad3bbb27f - Fix #1749: With harden-referral-path: performance drops, due to
circular dependency in NS and DS lookups.


git-svn-id: file:///svn/unbound/trunk@4372 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-17 07:22:58 +00:00
Wouter Wijngaards a253d276d7 - trunk has version 1.6.8.
git-svn-id: file:///svn/unbound/trunk@4371 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-10 07:38:56 +00:00
Wouter Wijngaards effb5c4203 - tag 1.6.7
git-svn-id: file:///svn/unbound/trunk@4369 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-10 07:10:35 +00:00
Wouter Wijngaards 64f4a0d800 - Fix spelling in unbound-control man page.
git-svn-id: file:///svn/unbound/trunk@4368 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-06 07:00:10 +00:00
Wouter Wijngaards 5ef3663385 - tag 1.6.7rc1
git-svn-id: file:///svn/unbound/trunk@4366 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 14:31:39 +00:00
Ralph Dolmans 9a727c3c1a - Use RCODE from A response on DNS64 synthesized answer.
git-svn-id: file:///svn/unbound/trunk@4365 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 13:55:04 +00:00
Wouter Wijngaards 3e1e982625 remove duplicate statements.
git-svn-id: file:///svn/unbound/trunk@4364 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 10:47:30 +00:00
Wouter Wijngaards d506659635 - Fix some more crpls in testdata for different signaling default.
git-svn-id: file:///svn/unbound/trunk@4363 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 10:44:16 +00:00
Wouter Wijngaards 9247e8522b - Fix trust-anchor-signaling works in libunbound.
git-svn-id: file:///svn/unbound/trunk@4362 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 10:37:34 +00:00
Ralph Dolmans ef740d0cca also disable trust-anchor-signaling is crpl tests
git-svn-id: file:///svn/unbound/trunk@4361 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 10:36:52 +00:00
Ralph Dolmans ac9b95ca0c - Set trust-anchor-signaling default to yes
git-svn-id: file:///svn/unbound/trunk@4360 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 10:17:25 +00:00
Wouter Wijngaards bbe5c6acf0 - Fix param unused warning for windows exportsymbol compile.
git-svn-id: file:///svn/unbound/trunk@4359 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-02 12:24:48 +00:00
Ralph Dolmans 5e4faec554 - Fix #1450: Generate again patch contrib/aaaa-filter-iterator.patch (by Danilo
G. Baio). 


git-svn-id: file:///svn/unbound/trunk@4358 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-25 12:49:47 +00:00
Ralph Dolmans 207beff489 - Log name of looping module
git-svn-id: file:///svn/unbound/trunk@4357 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-21 08:19:47 +00:00
Wouter Wijngaards 60beab1e8d Spelling fixes are from Josh Soref.
git-svn-id: file:///svn/unbound/trunk@4356 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-20 07:01:52 +00:00
Wouter Wijngaards 7afdc695fe - Fix DNSCACHE_STORE_ZEROTTL to be bigger than 0xffff.
git-svn-id: file:///svn/unbound/trunk@4355 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-19 11:54:58 +00:00
Wouter Wijngaards 3264fa8a6f assert and lint.
git-svn-id: file:///svn/unbound/trunk@4354 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-19 09:15:59 +00:00
Wouter Wijngaards 55d8fe2837 - use a cachedb answer even if it's "expired" when serve-expired is yes
(patch from Jinmei Tatuya).
- trigger refetching of the answer in that case (this will bypass
  cachedb lookup)
- allow storing a 0-TTL answer from cachedb in the in-memory message
  cache when serve-expired is yes


git-svn-id: file:///svn/unbound/trunk@4353 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-19 09:08:29 +00:00
Ralph Dolmans 3427b992f7 - Fix #1400: allowing use of global cache on ECS-forwarding unless
always-forward.


git-svn-id: file:///svn/unbound/trunk@4352 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 09:09:10 +00:00
Wouter Wijngaards ee8f07a686 - Fix #1440: [dnscrypt] client nonce cache.
git-svn-id: file:///svn/unbound/trunk@4351 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 08:55:08 +00:00
Wouter Wijngaards a37e562079 and man page.
git-svn-id: file:///svn/unbound/trunk@4350 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 08:50:20 +00:00
Wouter Wijngaards c49226613b - Fix #1435: Please allow UDP to be disabled separately upstream and
downstream.


git-svn-id: file:///svn/unbound/trunk@4349 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 08:42:24 +00:00
Wouter Wijngaards 3ede03449c - Fix that looping modules always stop the query, and don't pass
control.


git-svn-id: file:///svn/unbound/trunk@4348 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 07:54:24 +00:00
Wouter Wijngaards 60318b18f7 - tag 1.6.6rc2, became 1.6.6 on 18 sep. trunk 1.6.7 in development.
git-svn-id: file:///svn/unbound/trunk@4347 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 07:49:41 +00:00
Wouter Wijngaards 32a4e9bfe6 autoconf.
git-svn-id: file:///svn/unbound/trunk@4345 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:29:41 +00:00
Wouter Wijngaards 7d17a926ac - Spelling fixes, from Phil Porada.
git-svn-id: file:///svn/unbound/trunk@4344 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:29:28 +00:00
Wouter Wijngaards ce1f757ce0 - Fix unbound-host to report error for DNSSEC state of failed lookups.
git-svn-id: file:///svn/unbound/trunk@4343 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:11:43 +00:00
Wouter Wijngaards b01f0db381 - tag 1.6.6rc2
git-svn-id: file:///svn/unbound/trunk@4341 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-13 06:57:39 +00:00
Wouter Wijngaards 0b7d3bfd30 - Add dns64 for client-subnet in unbound-checkconf.
git-svn-id: file:///svn/unbound/trunk@4340 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-12 05:43:46 +00:00
Wouter Wijngaards 0042a5c5fc remove debug
git-svn-id: file:///svn/unbound/trunk@4339 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-05 08:36:00 +00:00
Wouter Wijngaards edd22eb36c - Fix #1434: Fix windows openssl 1.1.0 linking.
git-svn-id: file:///svn/unbound/trunk@4338 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-05 08:28:39 +00:00
Ralph Dolmans eb25148123 - Fix #1412: QNAME minimisation strict mode not honored
git-svn-id: file:///svn/unbound/trunk@4337 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-04 15:15:27 +00:00
Wouter Wijngaards 0fcc88689d - makedist fix for windows binaries, with openssl 1.1.0 windres fix,
and expat 2.2.4 install target fix.


git-svn-id: file:///svn/unbound/trunk@4336 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-04 14:02:15 +00:00
Wouter Wijngaards 03d62b2e43 note tag 1.6.6rc1
git-svn-id: file:///svn/unbound/trunk@4335 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-04 12:55:25 +00:00
Wouter Wijngaards 93b07b3526 and in man page.
git-svn-id: file:///svn/unbound/trunk@4333 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-01 14:55:52 +00:00
Wouter Wijngaards 08ceb2a737 - Recommend 1472 buffer size in unbound.conf
git-svn-id: file:///svn/unbound/trunk@4332 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-01 14:54:37 +00:00
Wouter Wijngaards 4194c613bf lock_protect mutex in cachedb.
git-svn-id: file:///svn/unbound/trunk@4331 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 14:16:07 +00:00
Wouter Wijngaards 6a5e7be380 - Fix #1418: [ip ratelimit] initialize slabhash using
ip-ratelimit-slabs.


git-svn-id: file:///svn/unbound/trunk@4330 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 12:02:14 +00:00
Wouter Wijngaards e583448a6d les and bison.
git-svn-id: file:///svn/unbound/trunk@4329 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 11:59:38 +00:00
Wouter Wijngaards a17400b45e dnscrypt cache size configuration option.
git-svn-id: file:///svn/unbound/trunk@4328 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 11:58:29 +00:00
Wouter Wijngaards a1153ba1f7 - make depend
git-svn-id: file:///svn/unbound/trunk@4327 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 08:08:45 +00:00
Wouter Wijngaards 425dec3037 - Fix #1417: [dnscrypt] shared secret cache counters, and works when
dnscrypt is not enabled.


git-svn-id: file:///svn/unbound/trunk@4326 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 08:06:17 +00:00
Wouter Wijngaards a270aa3c53 - but reverted that, tests fails with that escape.
git-svn-id: file:///svn/unbound/trunk@4325 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 07:48:09 +00:00
Wouter Wijngaards 8a6d68e5d2 - For #1417: escape ; in dnscrypt tests.
git-svn-id: file:///svn/unbound/trunk@4324 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 07:43:54 +00:00
Wouter Wijngaards 79c45131d1 - Fix #1424: cachedb:testframe is not thread safe.
git-svn-id: file:///svn/unbound/trunk@4323 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-31 07:35:08 +00:00
Wouter Wijngaards fe18bbcb1f - Fix 1416: qname-minimisation breaks TLSA lookups with CNAMEs.
git-svn-id: file:///svn/unbound/trunk@4322 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-30 13:13:43 +00:00
Wouter Wijngaards 7a322130d6 - updated contrib/fastrpz.patch to apply with configparser changes.
git-svn-id: file:///svn/unbound/trunk@4321 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-30 11:12:03 +00:00
Wouter Wijngaards 41e555aadf Fix dnscrypt tests grep.
git-svn-id: file:///svn/unbound/trunk@4320 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-29 09:27:22 +00:00
Wouter Wijngaards 2f270e6fbb - fixup WKS test on buildhost without servicebyname.
git-svn-id: file:///svn/unbound/trunk@4319 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-29 08:56:22 +00:00
Wouter Wijngaards cfcf5437f4 - new keys and certs for dnscrypt tests.
git-svn-id: file:///svn/unbound/trunk@4318 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-29 08:48:19 +00:00
Wouter Wijngaards f5a2cb3593 - zero qinfo in handle_request, this zeroes local_alias and also the
qname member.


git-svn-id: file:///svn/unbound/trunk@4317 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-29 07:31:45 +00:00
Wouter Wijngaards 1624efa939 - Fix #1414: fix segfault on parse failure and log_replies.
git-svn-id: file:///svn/unbound/trunk@4316 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-29 07:28:29 +00:00
Wouter Wijngaards 6a8a202b71 nicer layout.
git-svn-id: file:///svn/unbound/trunk@4315 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 14:12:08 +00:00
Wouter Wijngaards 3c3f1b42bb - Fix WKS records on kvm autobuild host, with default protobyname
entries for udp and tcp.


git-svn-id: file:///svn/unbound/trunk@4314 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 13:00:45 +00:00
Wouter Wijngaards 9a44fc5142 - Small fixes for the shared secret cache patch.
git-svn-id: file:///svn/unbound/trunk@4313 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 11:05:51 +00:00
Wouter Wijngaards e3cc298ffd - Fix #1415: [dnscrypt] shared secret cache, patch from
Manu Bretelle.


git-svn-id: file:///svn/unbound/trunk@4312 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 10:55:41 +00:00
Wouter Wijngaards cd46a535cd - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4311 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 08:29:00 +00:00
Wouter Wijngaards 80f310e2a4 - Fix #1415: patch to free dnscrypt environment on reload.
git-svn-id: file:///svn/unbound/trunk@4310 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-28 07:49:42 +00:00
Wouter Wijngaards ffc2f687cf - Fix to reclaim tcp handler when it is closed due to dnscrypt buffer
allocation failure.


git-svn-id: file:///svn/unbound/trunk@4309 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-22 13:40:44 +00:00
Wouter Wijngaards e5b8a37a20 - make depend
git-svn-id: file:///svn/unbound/trunk@4308 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-22 07:44:41 +00:00
Wouter Wijngaards 3dc206c721 - Fix #1407: Add ECS options check to unbound-checkconf.
git-svn-id: file:///svn/unbound/trunk@4307 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-22 07:43:59 +00:00
Wouter Wijngaards d8960d2c55 - Fix #1402: squelch invalid argument error for fd_set_block on windows.
git-svn-id: file:///svn/unbound/trunk@4306 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 14:15:32 +00:00
Wouter Wijngaards 64a5e6af4a Better text for change:
- Fix install of trust anchor when two anchors are present, makes both
	  valid. Checks hash of DS but not signature of new key. This fixes
	  the root.key file if created when unbound is installed between
	  sep11 and oct11 2017.



git-svn-id: file:///svn/unbound/trunk@4305 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 12:48:05 +00:00
Wouter Wijngaards b320c7ebd5 - Fix issue on macOX 10.10 where TCP fast open is detected but not
implemented causing TCP to fail. The fix allows fallback to regular
  TCP in this case and is also more robust for cases where connectx()
  fails for some reason.


git-svn-id: file:///svn/unbound/trunk@4304 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 11:44:46 +00:00
Wouter Wijngaards 293e94d0ed - trunk version 1.6.6 in development.
git-svn-id: file:///svn/unbound/trunk@4303 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 08:58:55 +00:00
Wouter Wijngaards 8d1e4b3648 - Fix install of trust anchor when two anchors are present, makes both
valid.  Checks hash of DS but not signature of new key.  This fixes
  installs between sep11 and oct11 2017.


git-svn-id: file:///svn/unbound/trunk@4302 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 08:57:44 +00:00
Wouter Wijngaards 6e23e40a2f better text.
git-svn-id: file:///svn/unbound/trunk@4299 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-10 07:26:09 +00:00
Wouter Wijngaards 61605c1dfa - Patch to show DNSCrypt status in help output, from Carsten
Strotmann.


git-svn-id: file:///svn/unbound/trunk@4298 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-10 07:13:44 +00:00
Wouter Wijngaards c8cdd542dd - Remove spaces from Makefile.
git-svn-id: file:///svn/unbound/trunk@4297 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-08 09:43:51 +00:00
Wouter Wijngaards 5797c77f55 yacc 1.9 and flex 2.6.1.
git-svn-id: file:///svn/unbound/trunk@4296 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-08 09:09:45 +00:00
Wouter Wijngaards ae67923bab - Fix #1398: make cachedb secret configurable.
git-svn-id: file:///svn/unbound/trunk@4295 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-08 09:04:51 +00:00
Wouter Wijngaards 1159e53618 - Fix #1397: Recursive DS lookups for AS112 zones names should recurse.
git-svn-id: file:///svn/unbound/trunk@4294 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-07 07:42:45 +00:00
Ralph Dolmans 3de694be05 Do not add rrset_bogus and query ratelimiting stats per thread.
git-svn-id: file:///svn/unbound/trunk@4293 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-03 15:32:24 +00:00
Ralph Dolmans 7b18274d7e - Added stats for queries that have been ratelimited by domain recursion.
git-svn-id: file:///svn/unbound/trunk@4292 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-03 12:52:33 +00:00
Ralph Dolmans 9f49585a63 - Do not reset rrset.bogus stats when called using stats_noreset.
git-svn-id: file:///svn/unbound/trunk@4291 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-03 10:50:46 +00:00
Ralph Dolmans de731edc0d - Remove unused iter_env member (ip6arpa_dname)
git-svn-id: file:///svn/unbound/trunk@4290 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-03 09:29:21 +00:00
Wouter Wijngaards 4f9236ae55 - Fix #1394: mix of serve-expired and response-ip could cause a crash.
git-svn-id: file:///svn/unbound/trunk@4289 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-03 07:13:12 +00:00
Wouter Wijngaards ff6a1cee12 - iana update
git-svn-id: file:///svn/unbound/trunk@4288 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 11:58:18 +00:00
Wouter Wijngaards 6d8a924889 fix type cast.
git-svn-id: file:///svn/unbound/trunk@4287 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 10:50:16 +00:00
Wouter Wijngaards e396684a54 - Fix #1365: Add Ed25519 support using libnettle.
git-svn-id: file:///svn/unbound/trunk@4286 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 10:44:30 +00:00
Wouter Wijngaards 8abb85e4b2 - Fix DSA configure switch (--disable dsa) for libnettle and libnss.
git-svn-id: file:///svn/unbound/trunk@4285 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 10:09:05 +00:00
Wouter Wijngaards 6f4b0c4fa6 double fallthrough annotation to please gcc parser.
git-svn-id: file:///svn/unbound/trunk@4284 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:58:00 +00:00
Wouter Wijngaards cb0e3980d8 annotate fallthrough
git-svn-id: file:///svn/unbound/trunk@4283 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:54:21 +00:00
Wouter Wijngaards 36eeb92391 remove warning
git-svn-id: file:///svn/unbound/trunk@4282 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:53:11 +00:00
Wouter Wijngaards b7d9b59aa9 - Fix compile with libnettle
git-svn-id: file:///svn/unbound/trunk@4281 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:52:20 +00:00
Wouter Wijngaards 62e88b46cc - remove warning from windows compile.
git-svn-id: file:///svn/unbound/trunk@4280 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:30:12 +00:00
Wouter Wijngaards 7f6827aaae - squelch TCP fast open error on FreeBSD when kernel has it disabled,
unless verbosity is high.


git-svn-id: file:///svn/unbound/trunk@4279 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:14:42 +00:00
Wouter Wijngaards abb6cfdebd - upgrade aclocal(pkg.m4 0.29.1), config.guess(2016-10-02),
config.sub(2016-09-05).
- annotate case statement fallthrough for gcc 7.1.1.
- flex output from flex 2.6.1.
- snprintf of thread number does not warn about truncated string.


git-svn-id: file:///svn/unbound/trunk@4278 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:04:18 +00:00
Wouter Wijngaards feb890564b please doxygen
git-svn-id: file:///svn/unbound/trunk@4277 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-17 08:31:59 +00:00
Wouter Wijngaards 1d3e6758b2 - Fix #1349: allow suppression of pidfiles (from Daniel Kahn Gillmor).
With the -p option unbound does not create a pidfile.


git-svn-id: file:///svn/unbound/trunk@4276 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-17 08:26:49 +00:00
Wouter Wijngaards c52c07c086 - Fix #1350: make cachedb backend configurable (from JINMEI Tatuya).
git-svn-id: file:///svn/unbound/trunk@4275 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-17 08:21:19 +00:00
Wouter Wijngaards 554ff98fd5 fix doc.
git-svn-id: file:///svn/unbound/trunk@4274 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-11 14:31:32 +00:00
Wouter Wijngaards 160b70f417 - Redirect all localhost names to localhost address for RFC6761.
git-svn-id: file:///svn/unbound/trunk@4273 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-11 14:29:54 +00:00
Wouter Wijngaards c8189d1018 - Fix #1344: RFC6761-reserved domains: test. and invalid.
git-svn-id: file:///svn/unbound/trunk@4272 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-11 13:27:33 +00:00
Wouter Wijngaards 316f594fa5 fixup printout of skipped.
git-svn-id: file:///svn/unbound/trunk@4271 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 14:29:25 +00:00
Wouter Wijngaards bedac6bc28 test report again
git-svn-id: file:///svn/unbound/trunk@4270 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 14:21:52 +00:00
Wouter Wijngaards 40a4688400 Test -f report.
git-svn-id: file:///svn/unbound/trunk@4269 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 14:16:47 +00:00
Wouter Wijngaards 399b0dd686 full report with -f
git-svn-id: file:///svn/unbound/trunk@4268 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 14:12:34 +00:00
Wouter Wijngaards ecfe84702b run tests.
git-svn-id: file:///svn/unbound/trunk@4267 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:41:13 +00:00
Wouter Wijngaards 0f4fdb6669 - Fix svn hooks for tdir (selected if testcode/mini_tdir.sh exists).
git-svn-id: file:///svn/unbound/trunk@4266 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:39:28 +00:00
Wouter Wijngaards 71788cf43a Fixup speed_cache for 01-doc test.
git-svn-id: file:///svn/unbound/trunk@4265 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:30:37 +00:00
Wouter Wijngaards 5165e14802 tests in tdir format.
git-svn-id: file:///svn/unbound/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:27:30 +00:00
Wouter Wijngaards ead37db595 - Fix tests to use .tdir (from Manu Bretelle) instead of .tpkg.
git-svn-id: file:///svn/unbound/trunk@4263 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:27:05 +00:00
Wouter Wijngaards 522bff52fe - Fix 1332: Bump verbosity of failed chown'ing of the control socket.
git-svn-id: file:///svn/unbound/trunk@4262 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-05 06:59:45 +00:00
Wouter Wijngaards d514a9c709 Fixup
git-svn-id: file:///svn/unbound/trunk@4261 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-03 13:44:17 +00:00
Wouter Wijngaards 67f54eea66 - Fix openssl 1.1.0 load of ssl error strings from ssl init.
git-svn-id: file:///svn/unbound/trunk@4260 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-03 13:37:37 +00:00
Wouter Wijngaards 1a0bb5ad5a - Fix pythonmod link line option flag.
git-svn-id: file:///svn/unbound/trunk@4259 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-03 12:48:53 +00:00
Wouter Wijngaards 7e8e85459c - Fix #1331: libunbound segfault in threaded mode when context is
deleted.


git-svn-id: file:///svn/unbound/trunk@4258 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-03 11:41:32 +00:00
Wouter Wijngaards 5fba7e4339 - Fix for unbound-checkconf, check ipsecmod-hook if ipsecmod is turned
on.


git-svn-id: file:///svn/unbound/trunk@4257 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-03 07:14:37 +00:00
Wouter Wijngaards 962fea87d3 lint fix and check errcode.
git-svn-id: file:///svn/unbound/trunk@4256 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-29 11:53:21 +00:00
Wouter Wijngaards 08a3461810 - enhancement for hardened-tls for DNS over TLS. Removed duplicated
security settings.


git-svn-id: file:///svn/unbound/trunk@4255 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-29 11:45:43 +00:00
Wouter Wijngaards 60d4c9bd54 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4254 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-29 07:36:02 +00:00
Wouter Wijngaards 7a9d8f49f4 - Fix python example0 return module wait instead of error for pass.
git-svn-id: file:///svn/unbound/trunk@4253 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-29 07:28:11 +00:00
Wouter Wijngaards 50b7b2113e - Fix that infra cache host hash does not change after reconfig.
git-svn-id: file:///svn/unbound/trunk@4252 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-27 15:23:17 +00:00
Wouter Wijngaards 0b8117df2f - Remove signed unsigned warning from authzone.
git-svn-id: file:///svn/unbound/trunk@4251 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-27 10:54:15 +00:00
Wouter Wijngaards 0393f598d5 - Trunk contains 1.6.5, with changes from 26, 27 june.
git-svn-id: file:///svn/unbound/trunk@4250 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-27 10:53:52 +00:00
Wouter Wijngaards 5573d7508b - unbound-control dump_infra prints port number for address if not 53.
git-svn-id: file:///svn/unbound/trunk@4248 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-26 12:31:49 +00:00
Wouter Wijngaards 542162b4e0 - First fix for zero b64 and hex text zone format in sldns.
git-svn-id: file:///svn/unbound/trunk@4247 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-26 11:36:54 +00:00
Wouter Wijngaards e7260518ea - Better fixup of dnscrypt_cert_chacha test for different escapes.
git-svn-id: file:///svn/unbound/trunk@4246 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-26 09:06:42 +00:00
Wouter Wijngaards 82258dff59 Fixup the fixup.
git-svn-id: file:///svn/unbound/trunk@4245 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-23 07:09:58 +00:00
Wouter Wijngaards a2f8946764 - (for 1.6.5): fixup of dnscrypt_cert_chacha test (from Manu Bretelle).
git-svn-id: file:///svn/unbound/trunk@4244 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-23 06:56:59 +00:00
Wouter Wijngaards 171a7a107e - Tag 1.6.4rc2
git-svn-id: file:///svn/unbound/trunk@4242 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-22 12:08:18 +00:00
Ralph Dolmans 6195229d76 - Added fastrpz patch to contrib
git-svn-id: file:///svn/unbound/trunk@4241 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-22 12:03:32 +00:00
Wouter Wijngaards 062515d9bc - Fix #1316: heap read buffer overflow in parse_edns_options.
git-svn-id: file:///svn/unbound/trunk@4240 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-21 11:50:39 +00:00
Wouter Wijngaards 311264b960 - Fix lintian typo.
git-svn-id: file:///svn/unbound/trunk@4239 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-20 13:34:01 +00:00
Wouter Wijngaards bdd2cd248d - Tag 1.6.4rc1
git-svn-id: file:///svn/unbound/trunk@4237 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-20 07:38:52 +00:00
Wouter Wijngaards 1f6a7da0b0 - Fix warning in pythonmod under clang compiler.
git-svn-id: file:///svn/unbound/trunk@4236 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-20 07:05:30 +00:00
Ralph Dolmans 71d2d60b85 - Fix #1277: disable domain ratelimit by setting value to 0.
git-svn-id: file:///svn/unbound/trunk@4235 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 13:22:43 +00:00
Wouter Wijngaards 4e66465e22 - Fix to unlock view in view test.
git-svn-id: file:///svn/unbound/trunk@4234 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 11:16:31 +00:00
Wouter Wijngaards 2288777334 - Fix dnscrypt chacha cert support ifdefs.
- Fix dnscrypt chacha cert unit test escapes in grep.
- Remove asynclook tests that cause test and purifier problems.


git-svn-id: file:///svn/unbound/trunk@4233 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 08:20:44 +00:00
Wouter Wijngaards cf0429f3e1 and yacc, lex it.
git-svn-id: file:///svn/unbound/trunk@4232 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:56:28 +00:00
Wouter Wijngaards dff6c5ff7a - Fix memory leak in dnscrypt config read.
git-svn-id: file:///svn/unbound/trunk@4231 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:55:52 +00:00
Wouter Wijngaards df78cb7ccb - Fix memory leak in sldns_buffer_new_frm_data.
git-svn-id: file:///svn/unbound/trunk@4230 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:42:52 +00:00
Wouter Wijngaards acada5a8f6 - Free callback in edns-subnetmod on exit and restart.
git-svn-id: file:///svn/unbound/trunk@4229 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:31:30 +00:00
Wouter Wijngaards 20f8dafcd4 - Fix #1301: memory leak in respip and tests.
git-svn-id: file:///svn/unbound/trunk@4228 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:27:49 +00:00
Wouter Wijngaards 7bb1d8a8d1 - Fix query for refetch_glue of stub leaking to internet.
git-svn-id: file:///svn/unbound/trunk@4227 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-15 15:00:07 +00:00
Wouter Wijngaards 39b5f5bbc6 - Fix stub zone queries leaking to the internet for
harden-referral-path ns checks.


git-svn-id: file:///svn/unbound/trunk@4226 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-15 07:59:05 +00:00
Wouter Wijngaards 7ebe1fe115 - More fixes in depth for buffer checks in 0x20 qname checks.
git-svn-id: file:///svn/unbound/trunk@4225 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-13 14:34:44 +00:00
Wouter Wijngaards 843bd4156e - Fix #1280: Unbound fails assert when response from authoritative
contains malformed qname.  When 0x20 caps-for-id is enabled, when
  assertions are not enabled the malformed qname is handled correctly.
- 1.6.3 tag created, with only #1280 fix, trunk is 1.6.4 development.


git-svn-id: file:///svn/unbound/trunk@4224 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-13 14:25:47 +00:00
Wouter Wijngaards ca8d0a0e92 - Fix #1279: Memory leak on reload when python module is enabled.
git-svn-id: file:///svn/unbound/trunk@4220 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-13 07:10:58 +00:00
Wouter Wijngaards 5989d675ce make depend.
git-svn-id: file:///svn/unbound/trunk@4219 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-12 10:12:13 +00:00
Wouter Wijngaards c4869780d1 - Fix #1278: Incomplete wildcard proof.
git-svn-id: file:///svn/unbound/trunk@4218 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-12 10:11:28 +00:00
Ralph Dolmans 998793998d - Added domain name based ECS whitelist.
git-svn-id: file:///svn/unbound/trunk@4217 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-08 14:44:55 +00:00
Wouter Wijngaards e2459be7e1 - dnscrypt unit tests with chacha.
git-svn-id: file:///svn/unbound/trunk@4216 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-08 08:27:49 +00:00
Wouter Wijngaards 33de42e729 - Detect chacha for dnscrypt at configure time.
git-svn-id: file:///svn/unbound/trunk@4215 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-08 08:17:38 +00:00
Wouter Wijngaards b3b854072b and this dnscrypt commit for chacha.
git-svn-id: file:///svn/unbound/trunk@4214 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-08 07:29:06 +00:00
Wouter Wijngaards 54eabdde58 - Add dnscrypt XChaCha20 tests.
git-svn-id: file:///svn/unbound/trunk@4213 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 11:39:02 +00:00
Wouter Wijngaards 6e6ff89972 make depend
git-svn-id: file:///svn/unbound/trunk@4212 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 09:26:35 +00:00
Wouter Wijngaards 0992621839 Fixup compile for clean_additional changes
git-svn-id: file:///svn/unbound/trunk@4211 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 09:24:33 +00:00
Wouter Wijngaards 7e9d37acae - Fix that unbound-control can set val_clean_additional and val_permissive_mode.
git-svn-id: file:///svn/unbound/trunk@4210 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 07:00:02 +00:00
Wouter Wijngaards bfddc0dc64 - Fix that unbound-control can set val_clean_additional and val_permissive_mode.
git-svn-id: file:///svn/unbound/trunk@4209 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 06:59:47 +00:00
Wouter Wijngaards b9196d48d2 - Fix #1276: [dnscrypt] add XChaCha20-Poly1305 cipher.
git-svn-id: file:///svn/unbound/trunk@4208 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-06 12:52:26 +00:00
Wouter Wijngaards 75cb40edd1 - Fix #1275: cached data in cachedb is never used.
git-svn-id: file:///svn/unbound/trunk@4207 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-06 12:08:14 +00:00
Wouter Wijngaards 124f8d57ab - renumbering B-Root's IPv6 address to 2001:500:200::b.
git-svn-id: file:///svn/unbound/trunk@4206 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-06 09:33:09 +00:00
Wouter Wijngaards f78e04a12c - Add an explicit type cast for TCP FASTOPEN fix.
git-svn-id: file:///svn/unbound/trunk@4205 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-06 07:59:32 +00:00
Ralph Dolmans b93fd4e0c9 - Fix #1274: automatically trim chroot path from dnscrypt key/cert paths (from
Manu Bretelle).


git-svn-id: file:///svn/unbound/trunk@4204 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-01 09:51:05 +00:00
Wouter Wijngaards 401e456a17 - Fix fastopen EPIPE fallthrough to perform connect.
git-svn-id: file:///svn/unbound/trunk@4203 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-01 09:06:14 +00:00
Ralph Dolmans 69828ed94b - Also use global local-zones when there is a matching view that does not have
any local-zone specified. 


git-svn-id: file:///svn/unbound/trunk@4202 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-31 11:45:39 +00:00
Wouter Wijngaards 627299f5e4 - If MSG_FASTOPEN gives EPIPE fallthrough to try normal tcp write.
git-svn-id: file:///svn/unbound/trunk@4201 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-31 11:09:15 +00:00
Wouter Wijngaards e4c60435d2 - Fix #1273: cachedb.c doesn't compile with -Wextra.
git-svn-id: file:///svn/unbound/trunk@4200 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-31 05:42:23 +00:00
Ralph Dolmans 486edb10db - Fix #1269: inconsistent use of built-in local zones with views.
- Add defaults for new local-zone trees added to views using unbound-control.


git-svn-id: file:///svn/unbound/trunk@4199 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-30 13:04:19 +00:00
Wouter Wijngaards 8c4e7ffb14 - Support for openssl EVP_DigestVerify.
- Support for the ED25519 algorithm with openssl (from openssl 1.1.1).


git-svn-id: file:///svn/unbound/trunk@4198 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-30 12:28:25 +00:00
Wouter Wijngaards dd0da65da9 fix for lint
git-svn-id: file:///svn/unbound/trunk@4197 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-29 14:34:28 +00:00
Wouter Wijngaards 75395a12e5 fixup attach_edns check for streamtcp (in case of future enhancements and smaller buffer sizes).
git-svn-id: file:///svn/unbound/trunk@4196 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-29 14:27:20 +00:00
Wouter Wijngaards 8b2397542e - Fix assertion for low buffer size and big edns payload when worker
overrides udpsize.


git-svn-id: file:///svn/unbound/trunk@4195 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-29 07:32:45 +00:00
Ralph Dolmans 6132c9f8d5 - Added redirect-bogus.patch to contrib directory.
git-svn-id: file:///svn/unbound/trunk@4194 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-26 12:09:38 +00:00
Wouter Wijngaards ca57014bf2 - printout localzone for duplicate local-zone warnings.
git-svn-id: file:///svn/unbound/trunk@4193 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-26 11:09:16 +00:00
Wouter Wijngaards 3304a4f622 - exec_prefix is by default equal to prefix.
git-svn-id: file:///svn/unbound/trunk@4192 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-26 10:47:18 +00:00
Wouter Wijngaards 6538b82928 - Fix #1270: unitauth.c doesn't compile with higher warning level
and optimization


git-svn-id: file:///svn/unbound/trunk@4191 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-26 06:50:48 +00:00
Wouter Wijngaards aa1b0fca72 lint fix.
git-svn-id: file:///svn/unbound/trunk@4190 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-24 12:32:39 +00:00
Wouter Wijngaards aa9365446b - authzone cname chain, no rrset duplicates, wildcard doesn't change
rrsets added for cname chain.


git-svn-id: file:///svn/unbound/trunk@4189 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-24 12:26:44 +00:00
Wouter Wijngaards 632c1e83f8 save about 90 bytes per rrset and fix NSEC cover finding.
git-svn-id: file:///svn/unbound/trunk@4188 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 15:36:17 +00:00
Wouter Wijngaards 115c8f8dd5 remove debug
git-svn-id: file:///svn/unbound/trunk@4187 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 13:02:07 +00:00
Wouter Wijngaards b8f4099e55 better coverage.
git-svn-id: file:///svn/unbound/trunk@4186 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 12:58:31 +00:00
Wouter Wijngaards 6c899d8947 Fix wildcard, DS lookup, CNAME from DNAME, and returnvalue check in unit test.
git-svn-id: file:///svn/unbound/trunk@4185 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 12:47:54 +00:00
Wouter Wijngaards 3b5b21d29f autzone query unit test
git-svn-id: file:///svn/unbound/trunk@4184 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 11:50:06 +00:00
Wouter Wijngaards 65dde0c965 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4183 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 10:33:15 +00:00
Wouter Wijngaards eb3144bacb fix lint for unitauth.c
git-svn-id: file:///svn/unbound/trunk@4182 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 10:32:27 +00:00
Wouter Wijngaards efd19f766f fix minimum ttl, verbose domain and ce determination and fix unit test qname length
git-svn-id: file:///svn/unbound/trunk@4181 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 10:07:10 +00:00
Wouter Wijngaards 4c8fb76a72 lint fixes.
git-svn-id: file:///svn/unbound/trunk@4180 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 09:41:12 +00:00
Wouter Wijngaards 37c1739483 make depend for unitauth.c
git-svn-id: file:///svn/unbound/trunk@4179 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 09:33:11 +00:00
Wouter Wijngaards 71fba3d221 - first services/authzone check in, it compiles and reads and writes
zonefiles.


git-svn-id: file:///svn/unbound/trunk@4178 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-23 09:32:40 +00:00
Wouter Wijngaards 1a44a8402e - Fix #1268: SIGSEGV after log_reopen.
git-svn-id: file:///svn/unbound/trunk@4177 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-22 07:20:59 +00:00
Wouter Wijngaards f8000b355e - str2wire fp2rr returns line string for $directives.
git-svn-id: file:///svn/unbound/trunk@4176 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-19 08:54:37 +00:00
Wouter Wijngaards 1329ff5f36 and compatibility with BoringSSL.
git-svn-id: file:///svn/unbound/trunk@4175 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-18 07:20:26 +00:00
Wouter Wijngaards 658c759b3d - Fix #1267: Libunbound validator/val_secalgo.c uses obsolete APIs.
git-svn-id: file:///svn/unbound/trunk@4174 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-18 07:15:16 +00:00
Wouter Wijngaards 6e0ba733f3 - Fix #1265 to use /bin/kill.
git-svn-id: file:///svn/unbound/trunk@4173 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-18 07:08:55 +00:00
Wouter Wijngaards 0b10c8da28 Fixup with prefix and exec_prefix expanded.
git-svn-id: file:///svn/unbound/trunk@4172 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 15:04:05 +00:00
Wouter Wijngaards 0d271cbb09 - Fix #1265: contrib/unbound.service contains hardcoded path.
git-svn-id: file:///svn/unbound/trunk@4171 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 14:50:10 +00:00
Wouter Wijngaards a40e8ae321 commentfix.
git-svn-id: file:///svn/unbound/trunk@4170 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 13:26:26 +00:00
George Thessalonikefs 95544096bf - Use qstate's region for IPSECKEY rrset (ipsecmod).
git-svn-id: file:///svn/unbound/trunk@4169 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 13:22:06 +00:00
Wouter Wijngaards 58fc4b8ea8 slightly more generic for rcodes that are not SERVFAIL.
git-svn-id: file:///svn/unbound/trunk@4168 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:51:45 +00:00
Wouter Wijngaards cf2da96a28 don't accidentally increase repttl if it was small because of another (short-ttl) RRset in the reply. There would be cache replies trying to work with expired RRsets if this extra if wasn't there.
git-svn-id: file:///svn/unbound/trunk@4167 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:43:48 +00:00
Wouter Wijngaards e1b6145e5c descript can have NULL _name for unknown types (even though only A, AAAA at this point), but the type_buf() routine works all the time.
git-svn-id: file:///svn/unbound/trunk@4166 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:39:43 +00:00
Wouter Wijngaards 903fe8db7e but my fix for the comment was wrong, remove this part of the fix.
git-svn-id: file:///svn/unbound/trunk@4165 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:20:58 +00:00
Wouter Wijngaards 39be1377e2 cast size_t to long for print as %ld.
git-svn-id: file:///svn/unbound/trunk@4164 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:19:35 +00:00
Wouter Wijngaards de4c7bd317 fixup comment.
git-svn-id: file:///svn/unbound/trunk@4163 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-17 12:13:45 +00:00
Wouter Wijngaards f78acf53fb - Fix type AVC sldns RR definition.
git-svn-id: file:///svn/unbound/trunk@4162 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 15:00:36 +00:00
Wouter Wijngaards 92d625b648 - better module memory lookup, fix of unbound-control shm names for
module memory printout of statistics.


git-svn-id: file:///svn/unbound/trunk@4161 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 14:16:59 +00:00
Wouter Wijngaards 305f6f0295 compiler warning fixes.
git-svn-id: file:///svn/unbound/trunk@4160 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 13:25:49 +00:00
Wouter Wijngaards 7641f23f87 - updated configure, dependencies and flex output.
git-svn-id: file:///svn/unbound/trunk@4159 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 13:21:10 +00:00
George Thessalonikefs 491b0a26e4 - Implemented opportunistic IPsec support module (ipsecmod).
- Some whitespace fixup.


git-svn-id: file:///svn/unbound/trunk@4158 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 12:39:24 +00:00
Wouter Wijngaards 5febdd39a1 - document trust-anchor-signaling in example config file.
git-svn-id: file:///svn/unbound/trunk@4157 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 07:50:42 +00:00
Wouter Wijngaards c5cfa6c09c remove warning.
git-svn-id: file:///svn/unbound/trunk@4156 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 07:30:44 +00:00
Wouter Wijngaards d0d6e34746 - updated dependencies in the makefile.
git-svn-id: file:///svn/unbound/trunk@4155 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-16 07:28:50 +00:00
Wouter Wijngaards 1db056b19c - Fix queries for nameservers under a stub leaking to the internet.
git-svn-id: file:///svn/unbound/trunk@4154 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-12 15:10:10 +00:00
Wouter Wijngaards 893159454f - Adjust servfail by iterator to not store in cache when serve-expired
is enabled, to avoid overwriting useful information there.


git-svn-id: file:///svn/unbound/trunk@4153 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-12 12:16:41 +00:00
Ralph Dolmans ce54c45394 - Add 'c' to getopt() in testbound.
- iana portlist update.


git-svn-id: file:///svn/unbound/trunk@4152 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-09 15:02:39 +00:00
Wouter Wijngaards 4e502fd624 - Set SO_REUSEADDR on outgoing tcp connections to fix the bind before
connect limited tcp connections.  With the option tcp connections
  can share the same source port (for different destinations).


git-svn-id: file:///svn/unbound/trunk@4151 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-08 10:41:03 +00:00
Wouter Wijngaards ad2e157763 - Fix tcp-mss failure printout text.
git-svn-id: file:///svn/unbound/trunk@4150 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-08 07:15:48 +00:00
Wouter Wijngaards d42090d63b same space as gldns
git-svn-id: file:///svn/unbound/trunk@4149 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 15:02:03 +00:00
Wouter Wijngaards 1d181f0ade - sldns SMIMEA and AVC definitions, same as getdns definitions.
git-svn-id: file:///svn/unbound/trunk@4148 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 14:48:52 +00:00
Wouter Wijngaards 93d1d33f3f TKEY values.
git-svn-id: file:///svn/unbound/trunk@4147 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 14:10:50 +00:00
Wouter Wijngaards 9649cc8c50 disable debug output.
git-svn-id: file:///svn/unbound/trunk@4146 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 13:56:20 +00:00
Wouter Wijngaards cb26ca2ce7 - Fix sldns parse and printout of TSIG RRs.
The printout text format is the same as dig uses.


git-svn-id: file:///svn/unbound/trunk@4145 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 13:53:06 +00:00
Ralph Dolmans 657948dd0c - Added mesh_add_sub to add detached mesh entries.
- Use mesh_add_sub for key tag signaling queries.


git-svn-id: file:///svn/unbound/trunk@4144 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 13:17:56 +00:00
Wouter Wijngaards 7e8d548d24 - Fix sldns int16_data parse.
git-svn-id: file:///svn/unbound/trunk@4143 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 12:15:06 +00:00
Wouter Wijngaards 4770bfbb5b - Fix sldns wire2str printout of RR type CAA tags.
git-svn-id: file:///svn/unbound/trunk@4142 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 12:05:10 +00:00
Wouter Wijngaards 3018dc636a - Added test for leak of stub information.
git-svn-id: file:///svn/unbound/trunk@4141 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 09:16:54 +00:00
Wouter Wijngaards f610f40558 Fix #1258: 64bit getting installed in C:\Program Files (x86).
git-svn-id: file:///svn/unbound/trunk@4140 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-01 14:57:36 +00:00
Wouter Wijngaards eb67febcc4 - Fix #1258: Windows 10 X64 unbound 1.6.2 service will not start.
git-svn-id: file:///svn/unbound/trunk@4139 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-01 14:41:40 +00:00
Wouter Wijngaards 3676f20923 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4138 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-01 13:29:48 +00:00
Wouter Wijngaards 7940e854e6 - Fix #1259: "--disable-ecdsa" argument overwritten
by "#ifdef SHA256_DIGEST_LENGTH@daemon/remote.c".


git-svn-id: file:///svn/unbound/trunk@4137 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-01 07:34:48 +00:00
Ralph Dolmans cb253fafe7 regional_alloc + memcpy to regional_alloc_init
git-svn-id: file:///svn/unbound/trunk@4136 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 15:03:32 +00:00
Ralph Dolmans 33001c8c4b please lint
git-svn-id: file:///svn/unbound/trunk@4135 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 13:27:07 +00:00
Ralph Dolmans a511d5d95e - Implemented trust anchor signaling using key tag query.
git-svn-id: file:///svn/unbound/trunk@4134 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 12:58:13 +00:00
Wouter Wijngaards 619b808b31 - Based on #1257: check parse limit before t increment in sldns RR
string parse routine.


git-svn-id: file:///svn/unbound/trunk@4133 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 09:03:15 +00:00
Wouter Wijngaards 56bde1ceca - trunk contains 1.6.3 version number (changes from 1.6.2 back from
when the 1.6.2rc1 tag has been created).


git-svn-id: file:///svn/unbound/trunk@4132 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-24 12:30:55 +00:00
Wouter Wijngaards 7925a98141 variables get_option and set_option also for dnscrypt.
git-svn-id: file:///svn/unbound/trunk@4130 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-24 09:00:45 +00:00
Wouter Wijngaards 461c8c97db - unbound-checkconf -o allows query of dnstap config variables.
Also unbound-control get_option.


git-svn-id: file:///svn/unbound/trunk@4129 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-24 08:30:32 +00:00
Ralph Dolmans 593949c88e - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4128 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-21 10:26:01 +00:00
Ralph Dolmans 73873da0c0 - Fix #1254: clarify ratelimit-{for,below}-domain (from Manu Bretelle).
git-svn-id: file:///svn/unbound/trunk@4127 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-21 10:20:35 +00:00
Ralph Dolmans dae84a96fb - Fix #1253: unused variable in edns-subnet/addrtree.c:getbit().
git-svn-id: file:///svn/unbound/trunk@4126 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-18 13:25:09 +00:00
Ralph Dolmans 89c2383c71 - Fix #1252: more indentation inconsistencies.
git-svn-id: file:///svn/unbound/trunk@4125 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-18 09:00:52 +00:00
Wouter Wijngaards 582a7f449e lint.
git-svn-id: file:///svn/unbound/trunk@4124 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 13:29:38 +00:00
Wouter Wijngaards 8d853b7eb6 more lint for stats
git-svn-id: file:///svn/unbound/trunk@4123 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 13:24:26 +00:00
Wouter Wijngaards a482b5cf12 no lint for timeval.
git-svn-id: file:///svn/unbound/trunk@4122 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 13:17:51 +00:00
Wouter Wijngaards 0f8b560bd5 more lint.
git-svn-id: file:///svn/unbound/trunk@4121 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 13:11:54 +00:00
Wouter Wijngaards 8466ee1c62 please lint.
git-svn-id: file:///svn/unbound/trunk@4120 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 13:03:38 +00:00
Wouter Wijngaards d4e0116ba8 please lint.
git-svn-id: file:///svn/unbound/trunk@4119 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 12:56:53 +00:00
Wouter Wijngaards 16f2e53d5f one more dependency
git-svn-id: file:///svn/unbound/trunk@4118 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 12:47:46 +00:00
Wouter Wijngaards 17dd3370fc - (for 1.6.3:) unbound.h exports the shm stats structures. They use
type long long and no ifdefs, and ub_ before the typenames.


git-svn-id: file:///svn/unbound/trunk@4117 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 12:47:29 +00:00
Ralph Dolmans 710778dfdd - Added ECS unit test (from Manu Bretelle).
- ECS documentation fix (from Manu Bretelle). 


git-svn-id: file:///svn/unbound/trunk@4116 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 08:49:32 +00:00
Wouter Wijngaards ef589f8981 - tag for 1.6.2rc1
git-svn-id: file:///svn/unbound/trunk@4114 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 07:37:07 +00:00
Wouter Wijngaards 16428ccbd2 - Fix #1250: inconsistent indentation in services/listen_dnsport.c.
git-svn-id: file:///svn/unbound/trunk@4113 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-13 07:17:05 +00:00
Wouter Wijngaards c9e5433a70 - subnet mem value is available in shm, also when not enabled,
to make the struct easier to memmap by other applications,
  independent of the configuration of unbound.


git-svn-id: file:///svn/unbound/trunk@4112 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 15:01:11 +00:00
Ralph Dolmans 4b39a9eaf8 - Set SHM ECS memory usage to 0 when module not loaded.
git-svn-id: file:///svn/unbound/trunk@4111 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 13:51:34 +00:00
Ralph Dolmans 1c02193ddb - Fix #1249: unbound doesn't return FORMERR to bogus ECS.
git-svn-id: file:///svn/unbound/trunk@4110 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 13:12:21 +00:00
Ralph Dolmans 2be864c218 - Properly check for allocation failure in local_data_find_tag_datas.
git-svn-id: file:///svn/unbound/trunk@4109 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 12:44:53 +00:00
Ralph Dolmans 22339c9ba9 - Fix #1247: unbound does not shorten source prefix length when forwarding ECS.
git-svn-id: file:///svn/unbound/trunk@4108 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 11:47:18 +00:00
Ralph Dolmans a8bfa02af1 - Also display ECS module memory stats in stats_shm
git-svn-id: file:///svn/unbound/trunk@4107 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-11 13:37:39 +00:00
Ralph Dolmans 8fedcffc02 - Display ECS module memory usage.
git-svn-id: file:///svn/unbound/trunk@4106 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-11 13:10:30 +00:00
Wouter Wijngaards 5a0ae9a055 better description.
- harden-algo-downgrade: no also makes unbound more lenient about
	  digest algorithms in DS records.


git-svn-id: file:///svn/unbound/trunk@4105 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 13:56:31 +00:00
Wouter Wijngaards 4d7d32c846 - harden algo downgrade also makes unbound more lenient about digest
algorithms in DS records.


git-svn-id: file:///svn/unbound/trunk@4104 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 13:38:50 +00:00
Ralph Dolmans e3058de235 - Use correct identifier for SHM destroy.
git-svn-id: file:///svn/unbound/trunk@4103 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 12:58:26 +00:00
Ralph Dolmans d7304e7c75 - Zero initialize addrtree allocation.
git-svn-id: file:///svn/unbound/trunk@4102 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 10:46:54 +00:00
Ralph Dolmans bde9269510 Respip dereference after NULL check.
git-svn-id: file:///svn/unbound/trunk@4101 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 10:18:22 +00:00
Ralph Dolmans a5c7c469ee - Remove ECS option after REFUSED answer
- Fix small memory leak in edns_opt_copy_alloc



git-svn-id: file:///svn/unbound/trunk@4100 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 09:12:04 +00:00
George Thessalonikefs 4e0787dcf3 - Fix pythonmod for cb changes.
- Some whitespace fixup.


git-svn-id: file:///svn/unbound/trunk@4099 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-07 17:07:16 +00:00
Ralph Dolmans 7e59ef65e6 Unlock view in respip unit test
git-svn-id: file:///svn/unbound/trunk@4098 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-07 08:57:05 +00:00
Wouter Wijngaards 06e794898f - Fix pythonmod for cb changes.
git-svn-id: file:///svn/unbound/trunk@4097 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 14:17:37 +00:00
Wouter Wijngaards 5591fdff8d assign cb_arg
git-svn-id: file:///svn/unbound/trunk@4096 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:47:46 +00:00
Ralph Dolmans ae31233b19 - remove malloc from inplace_cb_register
git-svn-id: file:///svn/unbound/trunk@4095 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:41:49 +00:00
Wouter Wijngaards b96a41d19e Fixup unused parameters.
git-svn-id: file:///svn/unbound/trunk@4094 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:35:33 +00:00
Wouter Wijngaards a416f30459 fixup unused parameters.
git-svn-id: file:///svn/unbound/trunk@4093 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:23:52 +00:00
Ralph Dolmans a2bc93547f - Generalise inplace callback (de)registration
- (de)register inplace callbacks for module id
- No unbound-control set_option for ECS options
- Deprecated client-subnet-opcode config option
- Introduced client-subnet-always-forward config option
- Changed max-client-subnet-ipv6 default to 56 (as in RFC)
- Removed extern ECS config options
- module_restart_next now calls clear on all following modules
- Also create ECS module qstate on module_event_pass event


git-svn-id: file:///svn/unbound/trunk@4092 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:13:06 +00:00
Wouter Wijngaards bdac428d79 - Fix respip for braces when locks arent used.
git-svn-id: file:///svn/unbound/trunk@4091 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 11:57:27 +00:00
Wouter Wijngaards f7595c3348 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4090 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 07:04:34 +00:00
Wouter Wijngaards a5abaed4ce - Small fixup for documentation.
git-svn-id: file:///svn/unbound/trunk@4089 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 06:55:55 +00:00
Wouter Wijngaards 7338c1b892 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4088 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-04 13:46:45 +00:00
Wouter Wijngaards 4321a363a4 - Fix #1244: document that use of chroot requires trust anchor file to
be under chroot.


git-svn-id: file:///svn/unbound/trunk@4087 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-04 13:39:33 +00:00
Ralph Dolmans d30ae35c62 - Do not add current time twice to TTL before ECS cache store.
- Do not touch rrset cache after ECS cache message generation.
- Use LDNS_EDNS_CLIENT_SUBNET as default ECS opcode.


git-svn-id: file:///svn/unbound/trunk@4086 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-03 09:36:18 +00:00
Wouter Wijngaards 292a337dad - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4085 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-03 09:07:17 +00:00
Wouter Wijngaards 897635b32b - Fix #1217: Add metrics to unbound-control interface showing
crypted, cert request, plaintext and malformed queries (from
  Manu Bretelle).


git-svn-id: file:///svn/unbound/trunk@4084 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-03 09:03:32 +00:00
Wouter Wijngaards e56c63172c include for gettimeofday
git-svn-id: file:///svn/unbound/trunk@4083 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-27 06:50:29 +00:00
Wouter Wijngaards 3f7af974a3 - Remove (now unused) event2 include from dnscrypt code.
git-svn-id: file:///svn/unbound/trunk@4082 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-27 06:27:22 +00:00
George Thessalonikefs d8272d4010 - Update Changelog.
git-svn-id: file:///svn/unbound/trunk@4081 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-24 11:02:26 +00:00
George Thessalonikefs 1163c6345b - Fix to prevent non-referal query from being cached as referal when the
no_cache_store flag was set.


git-svn-id: file:///svn/unbound/trunk@4080 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-24 10:51:56 +00:00
Wouter Wijngaards b7a9969e73 - Fix #1239: configure fails to find python distutils if python
prints warning.


git-svn-id: file:///svn/unbound/trunk@4079 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-23 10:23:38 +00:00
Wouter Wijngaards 4fb762f6e4 - Fix #1229: Systemd service sandboxing, options in wrong sections.
git-svn-id: file:///svn/unbound/trunk@4078 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-22 07:22:34 +00:00
Wouter Wijngaards 78fecfe558 - Fix #1238: segmentation fault when adding through the remote
interface a per-view local zone to a view with no previous
  (configured) local zones.


git-svn-id: file:///svn/unbound/trunk@4077 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-22 07:19:38 +00:00
Wouter Wijngaards 02282ba679 ltmain from Fedora distro.
git-svn-id: file:///svn/unbound/trunk@4076 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-21 14:20:59 +00:00
Wouter Wijngaards 553544feac autoconf (because easier diffs with other releases)
git-svn-id: file:///svn/unbound/trunk@4075 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-21 14:18:45 +00:00
Ralph Dolmans b0fd814975 - Merge EDNS Client subnet implementation from feature branch into main branch,
using new EDNS processing framework.


git-svn-id: file:///svn/unbound/trunk@4074 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-21 12:08:17 +00:00
Wouter Wijngaards 80029d63f0 - Fix doxygen for dnscrypt files.
git-svn-id: file:///svn/unbound/trunk@4073 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-21 08:50:17 +00:00
Wouter Wijngaards f0bf15d2cb - fixup for lruhash (whitespace and header file comment).
- dnscrypt tests.


git-svn-id: file:///svn/unbound/trunk@4072 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:51:34 +00:00
Wouter Wijngaards fadd01e93e nicer gettimeofday error handling.
git-svn-id: file:///svn/unbound/trunk@4071 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:35:00 +00:00
Wouter Wijngaards 29ac62d7b0 Fixup compile without libsodium.
git-svn-id: file:///svn/unbound/trunk@4070 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:30:53 +00:00
Wouter Wijngaards 01697a9ab8 whitespace better.
git-svn-id: file:///svn/unbound/trunk@4069 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:26:41 +00:00
Wouter Wijngaards d1cbf19798 - lru_demote and lruhash_insert_or_retrieve functions for getdns.
git-svn-id: file:///svn/unbound/trunk@4068 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:25:06 +00:00
Wouter Wijngaards 451e1900a9 more fixups.
git-svn-id: file:///svn/unbound/trunk@4067 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:16:19 +00:00
Wouter Wijngaards 86f0baf146 - make depend, autoconf, remove warnings about statement before var.
git-svn-id: file:///svn/unbound/trunk@4066 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 15:09:06 +00:00
Wouter Wijngaards 7c9584e408 - #1217. DNSCrypt support, with --enable-dnscrypt, libsodium and then
enabled in the config file from Manu Bretelle.


git-svn-id: file:///svn/unbound/trunk@4065 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-20 14:55:31 +00:00
Wouter Wijngaards f952ac1dee - Fix #1237 - Wrong resolving in chain, for norec queries that get
SERVFAIL returned.


git-svn-id: file:///svn/unbound/trunk@4064 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-17 14:32:25 +00:00
Wouter Wijngaards 52dd15dd87 - Patch for view functionality for local-data-ptr from Björn Ketelaars.
git-svn-id: file:///svn/unbound/trunk@4063 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-17 08:01:40 +00:00
Wouter Wijngaards 984c6c33bc prettier size_t and defines.
git-svn-id: file:///svn/unbound/trunk@4062 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:43:25 +00:00
Wouter Wijngaards 84be084384 Fixup array reference
git-svn-id: file:///svn/unbound/trunk@4061 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:24:14 +00:00
Wouter Wijngaards 91bafce012 fix for lint
git-svn-id: file:///svn/unbound/trunk@4060 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:18:10 +00:00
Wouter Wijngaards 77b328475a one less include and make depend
git-svn-id: file:///svn/unbound/trunk@4059 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:15:04 +00:00
Wouter Wijngaards cc31f2f6e9 fix layout.
git-svn-id: file:///svn/unbound/trunk@4058 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:10:08 +00:00
Wouter Wijngaards a83c7764f5 fix comparison, unsigned does not become negative.
git-svn-id: file:///svn/unbound/trunk@4057 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:07:34 +00:00
Wouter Wijngaards f374268521 - trustanchor tags are sorted. reusable routine to fetch taglist.
git-svn-id: file:///svn/unbound/trunk@4056 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:04:18 +00:00
Wouter Wijngaards ca48de34e9 - Fix that looped DNAMEs do not cause unbound to spend effort.
git-svn-id: file:///svn/unbound/trunk@4055 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 14:32:58 +00:00
Wouter Wijngaards 2042facc8b fixup
git-svn-id: file:///svn/unbound/trunk@4054 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 09:29:59 +00:00
Wouter Wijngaards df947d4056 fix doxygen annotation
git-svn-id: file:///svn/unbound/trunk@4053 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 09:28:19 +00:00
Wouter Wijngaards 3d6783e38c remove debug print out
git-svn-id: file:///svn/unbound/trunk@4052 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 09:27:08 +00:00
Wouter Wijngaards 6c456aa15e - Add trustanchor.unbound CH TXT that gets a response with a number
of TXT RRs with a string like "example.com. 2345 1234" with
  the trust anchors and their keytags.


git-svn-id: file:///svn/unbound/trunk@4051 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 09:17:58 +00:00
Wouter Wijngaards bf1b3c1166 Fixup validation test; the YXDOMAIN is returned and the DNAME.
git-svn-id: file:///svn/unbound/trunk@4050 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-13 08:29:08 +00:00
Wouter Wijngaards 45517ad616 - Fix #1235: Fix too long DNAME expansion produces SERVFAIL instead
of YXDOMAIN + query loop, reported by Petr Spacek.


git-svn-id: file:///svn/unbound/trunk@4049 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-13 08:27:01 +00:00
Wouter Wijngaards 6d57b0ddb7 - testbound understands Deckard MATCH rcode question answer commands.
git-svn-id: file:///svn/unbound/trunk@4048 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-13 08:15:07 +00:00
Wouter Wijngaards 038550c889 - Fix #1234: shortening DNAME loop produces duplicate DNAME records
in ANSWER section.


git-svn-id: file:///svn/unbound/trunk@4047 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-10 13:04:24 +00:00
Wouter Wijngaards 2b9d47ff01 - unbound-control list local zone and data commands listed in the
help output.


git-svn-id: file:///svn/unbound/trunk@4046 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-09 16:25:32 +00:00
Wouter Wijngaards bc64aa2cf2 fixup testbound -1
git-svn-id: file:///svn/unbound/trunk@4045 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-09 13:31:16 +00:00
Wouter Wijngaards a6fba1b8a6 fixup script tests
git-svn-id: file:///svn/unbound/trunk@4044 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-09 13:23:06 +00:00
Wouter Wijngaards 05215e8e7d - --disable-sha1 disables SHA1 support in RRSIG, so from DNSKEY and
DS records.  NSEC3 is not disabled.
- fake-sha1 test option; print warning if used.  To make unit tests.


git-svn-id: file:///svn/unbound/trunk@4043 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-09 13:18:08 +00:00
Wouter Wijngaards fdbac8e51d lint for unit test
git-svn-id: file:///svn/unbound/trunk@4042 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 08:51:43 +00:00
Wouter Wijngaards e3385174c3 lint.
git-svn-id: file:///svn/unbound/trunk@4041 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 08:38:30 +00:00
Wouter Wijngaards 94ce9cad2a please lint.
git-svn-id: file:///svn/unbound/trunk@4040 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 08:30:15 +00:00
Wouter Wijngaards 6ac9904ee5 please doxygen.
git-svn-id: file:///svn/unbound/trunk@4039 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 08:27:17 +00:00
Wouter Wijngaards 4a429c11d5 - fix enum conversion warnings
git-svn-id: file:///svn/unbound/trunk@4038 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 08:21:51 +00:00
Wouter Wijngaards cbf8c632dc - swig version 2.0.1 required.
git-svn-id: file:///svn/unbound/trunk@4037 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 07:57:06 +00:00
Wouter Wijngaards 578fc220ad - make depend for build dependencies.
git-svn-id: file:///svn/unbound/trunk@4036 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-08 07:54:41 +00:00
Wouter Wijngaards cae9809e11 - Response actions based on IP address from Jinmei Tatuya (Infoblox).
git-svn-id: file:///svn/unbound/trunk@4035 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-07 14:58:51 +00:00
Wouter Wijngaards 570564a375 - Fix #1230: swig version 2.0.0 is required for pythonmod, with
1.3.40 it crashes when running repeatly unbound-control reload.


git-svn-id: file:///svn/unbound/trunk@4034 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-07 10:40:45 +00:00
Wouter Wijngaards 5058406b84 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4033 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-06 15:33:30 +00:00
Wouter Wijngaards 7e6e9a0155 - Fix #1229: Systemd service sandboxing in contrib/unbound.service.
git-svn-id: file:///svn/unbound/trunk@4032 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-06 15:27:36 +00:00
Ralph Dolmans 6137f1b0b2 - Fix testpkts.c, check if DO bit is set, not only if there is an OPT record.
git-svn-id: file:///svn/unbound/trunk@4031 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-28 13:11:05 +00:00
Wouter Wijngaards 689fdc1d0b - For #1227: if we have sha256, set the cipher list to have no
known vulns.


git-svn-id: file:///svn/unbound/trunk@4030 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-28 08:23:25 +00:00
Wouter Wijngaards 791767d62f - Fix #1227: Fix that Unbound control allows weak ciphersuits.
git-svn-id: file:///svn/unbound/trunk@4029 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-27 15:24:58 +00:00
Wouter Wijngaards 7455717359 - Fix #1226: provide official 32bit binary for windows.
git-svn-id: file:///svn/unbound/trunk@4028 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-27 15:05:52 +00:00
Wouter Wijngaards 3289d8482c - Fix #1227: Fix that Unbound control allows weak ciphersuits.
git-svn-id: file:///svn/unbound/trunk@4027 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-27 14:40:30 +00:00
Wouter Wijngaards 8ce59e67d5 meant NetBSD.
git-svn-id: file:///svn/unbound/trunk@4026 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-24 15:53:34 +00:00
Wouter Wijngaards 5f48fa3a6e - include sys/time.h for new shm code on OpenBSD.
git-svn-id: file:///svn/unbound/trunk@4025 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-24 15:51:19 +00:00
Wouter Wijngaards 0fff8a32b5 - make depend, autoconf, doxygen and lint fixed up.
git-svn-id: file:///svn/unbound/trunk@4024 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 16:27:47 +00:00
Wouter Wijngaards 975c915632 fixed for lint
git-svn-id: file:///svn/unbound/trunk@4023 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 14:17:58 +00:00
Wouter Wijngaards 307c1b3321 lint.
git-svn-id: file:///svn/unbound/trunk@4022 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 14:09:54 +00:00
Wouter Wijngaards 37da5dcdb6 Fix doxygen for recent commit.
git-svn-id: file:///svn/unbound/trunk@4021 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 13:54:04 +00:00
Wouter Wijngaards 35ae8ef313 - Patch from Luiz Fernando Softov for Stats Shared Memory.
- unbound-control stats_shm command prints stats using shared memory,
  which uses less cpu.


git-svn-id: file:///svn/unbound/trunk@4020 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 12:05:05 +00:00
Wouter Wijngaards 14ec958b8f - Fix doc/CNAME-basedRedirectionDesignNotes.pdf zone static to
redirect.


git-svn-id: file:///svn/unbound/trunk@4019 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-23 08:27:31 +00:00
Wouter Wijngaards 5b34bde1a4 - Fix #1224: Fix that defaults should not fall back to "Program Files
(x86) if Unbound is 64bit by default on windows.


git-svn-id: file:///svn/unbound/trunk@4018 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-22 07:31:32 +00:00
Wouter Wijngaards 44cfd1d49b - iana portlist update
git-svn-id: file:///svn/unbound/trunk@4017 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-21 14:15:05 +00:00
Wouter Wijngaards 7b1687ac0e trunk has 1.6.2
git-svn-id: file:///svn/unbound/trunk@4016 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-21 14:06:48 +00:00
Wouter Wijngaards 648c15fbac - sldns updated for vfixed and buffer resize indication from getdns.
git-svn-id: file:///svn/unbound/trunk@4014 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-16 09:48:03 +00:00
Wouter Wijngaards 34fd9dd88d - sldns has ED25519 and ED448 algorithm number and name for display.
git-svn-id: file:///svn/unbound/trunk@4013 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-15 09:38:15 +00:00
Wouter Wijngaards 37799b8560 tag 1.6.1rc3
git-svn-id: file:///svn/unbound/trunk@4011 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-14 13:42:46 +00:00
George Thessalonikefs 64adf68436 - Fix manpage to include chroot note on Python module section.
git-svn-id: file:///svn/unbound/trunk@4010 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-13 11:47:16 +00:00
Wouter Wijngaards f97dcc8e40 - Fix autoconf of systemd check for lack of pkg-config.
git-svn-id: file:///svn/unbound/trunk@4009 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-13 10:15:01 +00:00
Wouter Wijngaards 86dcdaae33 - Fix dnstap for warning of set but not used.
git-svn-id: file:///svn/unbound/trunk@4007 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-10 08:26:59 +00:00
Wouter Wijngaards 9fb526d554 more fixes for pythonmod.
git-svn-id: file:///svn/unbound/trunk@4006 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-10 08:13:24 +00:00
Wouter Wijngaards e338cb00f3 - Fix pythonmod for typedef changes.
git-svn-id: file:///svn/unbound/trunk@4005 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-10 07:58:38 +00:00
Wouter Wijngaards d3edcc3fab - tag 1.6.1rc1.
git-svn-id: file:///svn/unbound/trunk@4003 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-09 08:54:28 +00:00
Wouter Wijngaards e6a54f732e - Fix for type name change and fix warning on windows compile.
git-svn-id: file:///svn/unbound/trunk@4002 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-08 13:55:28 +00:00
Wouter Wijngaards 2e7c9ad2f3 Fixup for type change.
git-svn-id: file:///svn/unbound/trunk@4001 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-08 13:45:56 +00:00
Wouter Wijngaards 367c3f034e - Include root trust anchor id 20326 in unbound-anchor.
git-svn-id: file:///svn/unbound/trunk@4000 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-07 15:22:31 +00:00
Wouter Wijngaards 901d83fcff more fixes for $host usage
git-svn-id: file:///svn/unbound/trunk@3999 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-06 12:52:32 +00:00
Wouter Wijngaards 4b22dcb7ad - Fix compile on solaris of the fix to use $host detect.
git-svn-id: file:///svn/unbound/trunk@3998 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-06 12:48:42 +00:00
Wouter Wijngaards 86c28f2d57 - fix root_anchor test for updated icannbundle.pem lower certificates.
git-svn-id: file:///svn/unbound/trunk@3997 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-02-03 09:33:32 +00:00
Wouter Wijngaards 41fccf9fe4 more helpful error message.
git-svn-id: file:///svn/unbound/trunk@3996 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-26 11:07:52 +00:00
Wouter Wijngaards 4c17395deb - Fix 1211: Fix can't enable interface-automatic if no IPv6 with
more helpful error message.


git-svn-id: file:///svn/unbound/trunk@3995 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-26 11:03:06 +00:00
Wouter Wijngaards 240a012bd8 layout.
git-svn-id: file:///svn/unbound/trunk@3994 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-20 16:09:37 +00:00
Wouter Wijngaards 929b623e59 - Increase MAX_MODULE to 16.
git-svn-id: file:///svn/unbound/trunk@3993 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-20 07:33:54 +00:00
Wouter Wijngaards 709d8223f5 fixes for _t changes.
git-svn-id: file:///svn/unbound/trunk@3992 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 14:11:59 +00:00
Wouter Wijngaards 8746283787 fixup pythonmod.
git-svn-id: file:///svn/unbound/trunk@3991 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 11:51:47 +00:00
Wouter Wijngaards ff1b857f90 compile fix
git-svn-id: file:///svn/unbound/trunk@3990 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 11:34:21 +00:00
Wouter Wijngaards c010e93d4a - Fix to rename internally used types from _t to _type, because _t
type names are reserved by POSIX.
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3989 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 10:25:41 +00:00
Wouter Wijngaards 5d522b0017 - Fix to Rename ub_callback_t to ub_callback_type, because POSIX
reserves _t typedefs.


git-svn-id: file:///svn/unbound/trunk@3988 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 09:08:15 +00:00
Wouter Wijngaards 42c2282f12 complete ellipsis.
git-svn-id: file:///svn/unbound/trunk@3987 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-12 15:57:22 +00:00
Wouter Wijngaards 8e23542b85 - Fix #1206: Some view-related commands are missing from 'unbound-control -h'
git-svn-id: file:///svn/unbound/trunk@3986 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-12 15:56:05 +00:00
Wouter Wijngaards ef80a99397 - Fix to also block meta types 128 through to 248 with formerr.
git-svn-id: file:///svn/unbound/trunk@3985 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-12 08:12:39 +00:00
Wouter Wijngaards ba11247f93 - Fix #1202: Fix code comment that packed_rrset_data is not always
'packed'.


git-svn-id: file:///svn/unbound/trunk@3984 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-09 09:47:06 +00:00
Wouter Wijngaards e5431ca7e5 - Fix #1201: Fix missing unlock in answer_from_cache error condition.
git-svn-id: file:///svn/unbound/trunk@3983 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-06 15:50:39 +00:00
Wouter Wijngaards b019a6aad9 please splint.
git-svn-id: file:///svn/unbound/trunk@3982 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-05 14:07:51 +00:00
Wouter Wijngaards 3a1ffe4c69 - Fix #1185: Source IP rate limiting, patch from Larissa Feng.
git-svn-id: file:///svn/unbound/trunk@3981 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-05 13:57:12 +00:00
Wouter Wijngaards 9b4b0de746 - Fix #1184: Log DNS replies. This includes the same logging
information that DNS queries and response code and response size,
  patch from Larissa Feng.


git-svn-id: file:///svn/unbound/trunk@3980 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-05 11:39:54 +00:00
Wouter Wijngaards a3441215f1 and ratelimit the formerr.
git-svn-id: file:///svn/unbound/trunk@3979 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-05 10:22:13 +00:00
Wouter Wijngaards 5adb2dc4cf - Fix to return formerr for queries for meta-types, to avoid
packet amplification if this meta-type is sent on to upstream.


git-svn-id: file:///svn/unbound/trunk@3978 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-05 08:14:34 +00:00
Wouter Wijngaards 3f7248fa11 Remove warnings about unused variables.
git-svn-id: file:///svn/unbound/trunk@3977 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-03 14:01:12 +00:00
Wouter Wijngaards 5839981255 - Fix reload chdir failure when also chrooted to that directory.
git-svn-id: file:///svn/unbound/trunk@3976 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-03 13:46:00 +00:00
Wouter Wijngaards cd7db58ce3 - configure --enable-systemd and lets unbound use systemd sockets if
you enable use-systemd: yes in unbound.conf.
  Also there are contrib/unbound.socket and contrib/unbound.service:
  systemd files for unbound, install them in /usr/lib/systemd/system.
  Contributed by Sami Kerola and Pavel Odintsov.



git-svn-id: file:///svn/unbound/trunk@3975 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-03 13:43:29 +00:00
Wouter Wijngaards 3d74d8e95b - Fix #1194: Cross build fails when $host isn't uname for getentropy.
git-svn-id: file:///svn/unbound/trunk@3974 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-02 08:51:50 +00:00
Ralph Dolmans 3869421258 Pass RCODE value to encode as int to local_error_encode()
git-svn-id: file:///svn/unbound/trunk@3973 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-23 12:34:02 +00:00
Ralph Dolmans b4b2c18909 - Fix #1190: Do not echo back EDNS options in local-zone error response.
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3972 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-23 11:46:54 +00:00
Ralph Dolmans 95d5334783 - Fix #1188: Unresolved symbol 'fake_dsa' in libunbound.so when built with
Nettle


git-svn-id: file:///svn/unbound/trunk@3971 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-21 10:29:19 +00:00
Ralph Dolmans 6f757b28f3 - Fix #1191: remove comment about view deletion.
git-svn-id: file:///svn/unbound/trunk@3970 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-19 11:37:05 +00:00
Wouter Wijngaards db2cf53e7b - Fix inet_ntop and inet_pton warnings in windows compile.
git-svn-id: file:///svn/unbound/trunk@3969 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-15 13:10:58 +00:00
Wouter Wijngaards 33ba1f38d6 - 64bit is default for windows builds.
git-svn-id: file:///svn/unbound/trunk@3968 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-15 11:34:24 +00:00
Wouter Wijngaards 3d680a6d82 - iana portlist update
git-svn-id: file:///svn/unbound/trunk@3967 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-15 08:43:33 +00:00
Wouter Wijngaards c9bcf1b3f7 trunk is 1.6.1
git-svn-id: file:///svn/unbound/trunk@3966 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-15 08:43:04 +00:00
Wouter Wijngaards 242b255aac note release.
git-svn-id: file:///svn/unbound/trunk@3965 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-15 08:41:43 +00:00
Wouter Wijngaards 5351f69e49 - Fix #1178: attempt to fix setup error at end, pop result values
at end of install.


git-svn-id: file:///svn/unbound/trunk@3963 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-14 08:55:44 +00:00
Wouter Wijngaards 631d2b4214 - Fix unbound-control and ipv6 only.
git-svn-id: file:///svn/unbound/trunk@3962 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-13 14:21:15 +00:00
Wouter Wijngaards 235e1399eb - Fix #1182: Fix Resource leak (socket), at startup.
git-svn-id: file:///svn/unbound/trunk@3961 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-13 12:55:55 +00:00
Wouter Wijngaards 163e7046cb printf arguments more portable.
git-svn-id: file:///svn/unbound/trunk@3960 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-09 10:52:02 +00:00
Wouter Wijngaards 41d174b7f6 - Fix #1176: stack size too small for Alpine Linux.
git-svn-id: file:///svn/unbound/trunk@3959 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-09 10:09:01 +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
1737 changed files with 241366 additions and 35526 deletions
+1
View File
@@ -0,0 +1 @@
testdata/*.[0-9] linguist-documentation
+2
View File
@@ -0,0 +1,2 @@
github: [NLnetLabs]
custom: ['https://nlnetlabs.nl/funding/']
+41
View File
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve Unbound
title: ''
labels: ''
assignees: ''
---
<!--
Thanks for taking the time to report an issue!
Before continuing please make sure that you checked the existing (opened and closed) issues and pull requests to avoid opening a duplicate issue. We would rather prefer to add the information to the existing one. If you are able, feel free to reopen the closed issue afterwards. If not, please create a new issue linking to the old one.
If you rather have a support question and you need guidance on running/configuring Unbound, please refrain from opening an issue and use the community support mailing list instead (https://www.nlnetlabs.nl/support/mailing-lists/).
We would like to keep GitHub issues for possible bugs and feature requests only.
If you are unsure whether an issue is a bug or not, feel free to reach out to mailing list users or open an issue here.
If you are opening an issue, please complete as much of the following sections as possible to give us a better understanding of your situation.
-->
**Describe the bug**
A clear and concise description of what the bug is.
**To reproduce**
Steps to reproduce the behavior:
1.
2.
3.
**Expected behavior**
A clear and concise description of what you expected to happen.
**System:**
- Unbound version:
- OS:
- `unbound -V` output:
**Additional information**
Add any other information that you may have gathered about the issue here.
+31
View File
@@ -0,0 +1,31 @@
---
name: Feature request
about: Suggest an idea for Unbound
title: "[FR]"
labels: ''
assignees: ''
---
<!--
Thanks for taking the time to report an issue!
Before continuing please make sure that you checked the existing (opened and closed) issues and pull requests to avoid opening a duplicate issue. We would rather prefer to add the information to the existing one. If you are able, feel free to reopen the closed issue afterwards. If not, please create a new issue linking to the old one.
If you rather have a support question and you need guidance on running/configuring Unbound, please refrain from opening an issue and use the community support mailing list instead (https://www.nlnetlabs.nl/support/mailing-lists/).
We would like to keep GitHub issues for possible bugs and feature requests only.
If you are unsure whether an issue is a bug or not, feel free to reach out to mailing list users or open an issue here.
If you are opening an issue, please complete as much of the following sections as possible to give us a better understanding of your situation.
-->
**Current behavior**
Is there a current behavior that the feature relates to?
If yes, would you wish the current behavior to change?
**Describe the desired feature**
A clear and concise description of what the feature should be.
**Potential use-case**
Describe how you see this feature being useful to other Unbound users.
+346
View File
@@ -0,0 +1,346 @@
name: Analysis and Ports
on:
workflow_dispatch:
inputs:
start:
description: 'Start analysis and port workflow'
default: 'yes'
required: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: GCC on Linux
os: ubuntu-latest
config: "--enable-debug --disable-flto"
make_test: "yes"
- name: Clang-analyzer
os: ubuntu-latest
config: "CC=clang --enable-debug --disable-flto --disable-static"
make_test: "yes"
clang_analysis: "yes"
- name: libevent
os: ubuntu-latest
install_libevent: "yes"
config: "CC=clang --enable-debug --disable-flto --with-libevent --disable-static"
make_test: "yes"
clang_analysis: "yes"
- name: OS X
os: macos-latest
install_expat: "yes"
config: "--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat"
make_test: "yes"
- name: Clang on OS X
os: macos-latest
install_expat: "yes"
config: "CC=clang --enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat --disable-static"
make_test: "yes"
clang_analysis: "yes"
- name: ubsan (gcc undefined behaviour sanitizer)
os: ubuntu-latest
config: 'CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover=all" --disable-flto --disable-static'
make_test: "yes"
- name: asan (gcc address sanitizer)
os: ubuntu-latest
config: 'CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" --disable-flto --disable-static'
make_test: "yes"
- name: Apple iPhone on iOS, armv7
os: macos-latest
AUTOTOOLS_HOST: armv7-apple-ios
OPENSSL_HOST: ios-cross
IOS_SDK: iPhoneOS
IOS_CPU: armv7s
test_ios: "yes"
config: "no"
make: "no"
- name: Apple iPhone on iOS, arm64
os: macos-latest
AUTOTOOLS_HOST: aarch64-apple-ios
OPENSSL_HOST: ios64-cross
IOS_SDK: iPhoneOS
IOS_CPU: arm64
test_ios: "yes"
config: "no"
make: "no"
- name: Apple TV on iOS, arm64
os: macos-latest
AUTOTOOLS_HOST: aarch64-apple-ios
OPENSSL_HOST: ios64-cross
IOS_SDK: AppleTVOS
IOS_CPU: arm64
test_ios: "yes"
config: "no"
make: "no"
- name: Apple Watch on iOS, armv7
os: macos-latest
AUTOTOOLS_HOST: armv7-apple-ios
OPENSSL_HOST: ios-cross
IOS_SDK: WatchOS
IOS_CPU: armv7k
test_ios: "yes"
config: "no"
make: "no"
- name: iPhoneSimulator on OS X, i386
os: macos-latest
AUTOTOOLS_HOST: i386-apple-ios
OPENSSL_HOST: iphoneos-cross
IOS_SDK: iPhoneSimulator
IOS_CPU: i386
test_ios: "yes"
config: "no"
make: "no"
- name: iPhoneSimulator on OS X, x86_64
os: macos-latest
AUTOTOOLS_HOST: x86_64-apple-ios
OPENSSL_HOST: iphoneos-cross
IOS_SDK: iPhoneSimulator
IOS_CPU: x86_64
test_ios: "yes"
config: "no"
make: "no"
- name: AppleTVSimulator on OS X, x86_64
os: macos-latest
AUTOTOOLS_HOST: x86_64-apple-ios
OPENSSL_HOST: iphoneos-cross
IOS_SDK: AppleTVSimulator
IOS_CPU: x86_64
test_ios: "yes"
config: "no"
make: "no"
- name: WatchSimulator on OS X, i386
os: macos-latest
AUTOTOOLS_HOST: i386-apple-ios
OPENSSL_HOST: iphoneos-cross
IOS_SDK: WatchSimulator
IOS_CPU: i386
test_ios: "yes"
config: "no"
make: "no"
- name: Android armv7a
os: ubuntu-latest
AUTOTOOLS_HOST: armv7a-linux-androidabi
OPENSSL_HOST: android-arm
ANDROID_CPU: armv7a
ANDROID_API: 23
test_android: "yes"
config: "no"
make: "no"
- name: Android aarch64
os: ubuntu-latest
AUTOTOOLS_HOST: aarch64-linux-android
OPENSSL_HOST: android-arm64
ANDROID_CPU: aarch64
ANDROID_API: 23
test_android: "yes"
config: "no"
make: "no"
- name: Android x86
os: ubuntu-latest
AUTOTOOLS_HOST: i686-linux-android
OPENSSL_HOST: android-x86
ANDROID_CPU: x86
ANDROID_API: 23
test_android: "yes"
config: "no"
make: "no"
- name: Android x86_64
os: ubuntu-latest
AUTOTOOLS_HOST: x86_64-linux-android
OPENSSL_HOST: android-x86_64
ANDROID_CPU: x86_64
ANDROID_API: 23
test_android: "yes"
config: "no"
make: "no"
- name: Windows
os: windows-latest
test_windows: "yes"
config: "no"
make: "no"
steps:
- uses: actions/checkout@v2
with:
submodules: false
- name: test_windows
if: ${{ matrix.test_windows == 'yes' }}
shell: bash
run: |
export unboundpath=`pwd`
echo unboundpath=${unboundpath}
cd ..
export prepath=`pwd`
echo prepath=${prepath}
#echo "curl cpanm"
#curl -L -k -s -S -o cpanm https://cpanmin.us/
#echo "perl cpanm Pod::Usage"
#perl cpanm Pod::Usage
mkdir openssl
echo "curl openssl"
curl -L -k -s -S -o openssl-1.1.1j.tar.gz https://www.openssl.org/source/openssl-1.1.1j.tar.gz
tar xzf openssl-1.1.1j.tar.gz
cd openssl-1.1.1j
# remove pod::Usage because we do not need -help or -man output
# from the Configure script
echo "Fixup ./Configure by removing use Pod::Usage require"
sed -e 's/use Pod::Usage//' < Configure > Configure.fix
echo "./Configure.fix no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64 --prefix=\""$prepath/openssl\"""
./Configure.fix no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64 --prefix="$prepath/openssl"
# make the libs only, build faster
echo "make build_libs"
#make
make build_libs
mv Makefile Makefile.orig
# fixup \\ in the installtop to /.
echo "fixup INSTALLTOP"
sed -e 's?^INSTALLTOP=.*$?INSTALLTOP='"$prepath"'/openssl?' < Makefile.orig > Makefile
# install the includes and libs only, build faster
echo "make install_dev"
#make install_sw
make install_dev
cd ..
mkdir expat
echo "curl expat"
curl -L -k -s -S -o expat-2.2.10.tar.gz https://github.com/libexpat/libexpat/releases/download/R_2_2_10/expat-2.2.10.tar.gz
tar xzf expat-2.2.10.tar.gz
cd expat-2.2.10
echo "./configure SHELL=/usr/bin/bash CONFIG_SHELL=/usr/bin/bash --prefix=\"$prepath/expat\" --exec-prefix=\"$prepath/expat\" --bindir=\"$prepath/expat/bin\" --includedir=\"$prepath/expat/include\" --mandir=\"$prepath/expat/man\" --libdir=\"$prepath/expat/lib\""
./configure SHELL=/usr/bin/bash CONFIG_SHELL=/usr/bin/bash --prefix="$prepath/expat" --exec-prefix="$prepath/expat" --bindir="$prepath/expat/bin" --includedir="$prepath/expat/include" --mandir="$prepath/expat/man" --libdir="$prepath/expat/lib"
# fixup SHELL is treated specially, but SHELZZ is not by make.
echo "Fixup Makefiles by renaming SHELL to SHELLZZ"
mv Makefile Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < Makefile.orig > Makefile
mv lib/Makefile lib/Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < lib/Makefile.orig > lib/Makefile
mv doc/Makefile doc/Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < doc/Makefile.orig > doc/Makefile
mv examples/Makefile examples/Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < examples/Makefile.orig > examples/Makefile
mv tests/Makefile tests/Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < tests/Makefile.orig > tests/Makefile
mv xmlwf/Makefile xmlwf/Makefile.orig
sed -e 's/SHELL/SHELLZZ/g' < xmlwf/Makefile.orig > xmlwf/Makefile
echo "make"
make
echo "make install"
make install
cd ..
echo "unbound"
cd unbound
echo "./configure --enable-debug --enable-static-exe --disable-flto \"--with-ssl=$prepath/openssl\" --with-libexpat=\"$prepath/expat\" --disable-shared"
./configure --enable-debug --enable-static-exe --disable-flto "--with-ssl=$prepath/openssl" --with-libexpat="$prepath/expat" --disable-shared
make
# specific test output
#make testbound.exe; ./testbound.exe -s
#make testbound; ./testbound.exe -p testdata/acl.rpl -o -vvvv
make test
- name: test_android
if: ${{ matrix.test_android == 'yes' }}
env:
AUTOTOOLS_HOST: ${{ matrix.AUTOTOOLS_HOST }}
OPENSSL_HOST: ${{ matrix.OPENSSL_HOST }}
ANDROID_API: ${{ matrix.ANDROID_API }}
ANDROID_CPU: ${{ matrix.ANDROID_CPU }}
run: |
#(already installed) ./contrib/android/install_tools.sh
export ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
echo ANDROID_PREFIX=${ANDROID_PREFIX}
export ANDROID_SDK_ROOT="$HOME/android-sdk"
echo ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
export ANDROID_NDK_ROOT="$HOME/android-ndk"
echo ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}
export AUTOTOOLS_BUILD="$(./config.guess)"
echo AUTOTOOLS_BUILD=${AUTOTOOLS_BUILD}
export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig"
echo PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
export CONFIG_OPTS="--build=$AUTOTOOLS_BUILD --host=$AUTOTOOLS_HOST --prefix=$ANDROID_PREFIX --with-ssl=$ANDROID_PREFIX --disable-gost --with-libexpat=$ANDROID_PREFIX"
echo CONFIG_OPTS=${CONFIG_OPTS}
echo "::group::install_ndk"
echo "./contrib/android/install_ndk.sh"
./contrib/android/install_ndk.sh
echo "::endgroup::"
echo "::group::setenv_android.sh"
echo "./contrib/android/setenv_android.sh"
source ./contrib/android/setenv_android.sh
echo "::endgroup::"
echo "::group::install_openssl"
echo "./contrib/android/install_openssl.sh"
./contrib/android/install_openssl.sh
echo "::endgroup::"
echo "::group::install_expat"
echo "./contrib/android/install_expat.sh"
./contrib/android/install_expat.sh
echo "::endgroup::"
echo "::group::configure"
echo "./configure ${CONFIG_OPTS}"
./configure ${CONFIG_OPTS}
echo "::endgroup::"
echo "::group::make"
# make is here to preserve environment variables
make
echo "::endgroup::"
echo "::group::make install"
make install
echo "::endgroup::"
- name: test ios
if: ${{ matrix.test_ios == 'yes' }}
env:
AUTOTOOLS_HOST: ${{ matrix.AUTOTOOLS_HOST }}
OPENSSL_HOST: ${{ matrix.OPENSSL_HOST }}
IOS_SDK: ${{ matrix.IOS_SDK }}
IOS_CPU: ${{ matrix.IOS_CPU }}
run: |
#(already installed) ./contrib/ios/install_tools.sh
export AUTOTOOLS_BUILD="$(./config.guess)"
echo AUTOTOOLS_BUILD=${AUTOTOOLS_BUILD}
export IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
echo IOS_PREFIX=${IOS_PREFIX}
export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig"
echo PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
export CONFIG_OPTS="--build=$AUTOTOOLS_BUILD --host=$AUTOTOOLS_HOST --prefix=$IOS_PREFIX --with-ssl=$IOS_PREFIX --disable-gost --with-libexpat=$IOS_PREFIX"
echo CONFIG_OPTS=${CONFIG_OPTS}
echo "::group::setenv_ios.sh"
echo "./contrib/ios/setenv_ios.sh"
source ./contrib/ios/setenv_ios.sh
echo "::endgroup::"
echo "::group::install_openssl"
echo "./contrib/ios/install_openssl.sh"
./contrib/ios/install_openssl.sh
echo "::endgroup::"
echo "::group::install_expat"
echo "./contrib/ios/install_expat.sh"
./contrib/ios/install_expat.sh
echo "::endgroup::"
echo "::group::configure"
echo "./configure ${CONFIG_OPTS}"
./configure ${CONFIG_OPTS}
echo "::endgroup::"
echo "::group::make"
# make is here to preserve environment variables
make
echo "::endgroup::"
echo "::group::make install"
make install
echo "::endgroup::"
- name: install libevent
if: ${{ matrix.install_libevent == 'yes' }}
run: sudo apt-get install libevent-dev
- name: install expat
if: ${{ matrix.install_expat == 'yes' }}
run: brew install expat
- name: configure
if: ${{ matrix.config != 'no' }}
run: ./configure ${{ matrix.config }}
- name: make
if: ${{ matrix.make != 'no' }}
run: make
- name: make test
if: ${{ matrix.make_test == 'yes' }}
run: make test
- name: clang-analysis
if: ${{ matrix.clang_analysis == 'yes' }}
run: (cd testdata/clang-analysis.tdir; bash clang-analysis.test)
+21
View File
@@ -0,0 +1,21 @@
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: configure
run: ./configure --enable-debug
- name: make
run: make
- name: make test
run: make test
+59
View File
@@ -0,0 +1,59 @@
*.lo
*.o
/.libs/
/.source
/Makefile
/autom4te.cache/
/config.h
/config.h.in~
/config.log
/config.status
/dnstap/dnstap_config.h
/dnscrypt/dnscrypt_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
/_unbound.la
/smallapp/unbound-control-setup.sh
/unbound
/unbound-anchor
/unbound-checkconf
/unbound-control
/unbound-control-setup
/unbound-host
/unbound.h
/asynclook
/delayer
/dohclient
/lock-verify
/memstats
/perf
/petal
/pktview
/readzone
/streamtcp
/unbound-dnstap-socket
/testbound
/unittest
/contrib/libunbound.pc
/contrib/unbound.service
/contrib/unbound.socket
/contrib/unbound_portable.service
/dnstap/dnstap.pb-c.c
/dnstap/dnstap.pb-c.h
/libunbound/python/libunbound_wrap.c
/libunbound/python/unbound.py
/pythonmod/interface.h
/pythonmod/unboundmodule.py
/testdata/result.*
/testdata/.done-*
/testdata/.perfstats.txt
/doc/html
/doc/xml
+380
View File
@@ -0,0 +1,380 @@
language: c
git:
depth: 5
addons:
apt:
packages:
- libssl-dev
- libevent-dev
- libexpat-dev
- clang
homebrew:
packages:
- openssl
- libevent
- expat
# homebrew update takes 20min or hangs, so disable update
#update: true
jobs:
include:
- os: linux
name: GCC on Linux, Amd64
compiler: gcc
arch: amd64
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: Clang on Linux, Amd64, clang-analysis
compiler: clang
arch: amd64
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- TEST_ANALYZER=yes
- os: osx
osx_image: xcode12.2
name: Clang on OS X, Amd64, clang-analysis
compiler: clang
arch: amd64
env:
- TEST_OSX=yes
- CONFIG_OPTS="--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl --with-libexpat=/usr/local/opt/expat"
- TEST_ANALYZER=yes
- HOMEBREW_NO_AUTO_UPDATE=1
- os: linux
name: Libevent, GCC on Linux, Amd64
compiler: gcc
arch: amd64
env:
- TEST_LIBEVENT=yes
- CONFIG_OPTS="--with-libevent"
- os: linux
name: Libevent, Clang on Linux, Amd64
compiler: clang
arch: amd64
env:
- TEST_LIBEVENT=yes
- CONFIG_OPTS="--with-libevent"
- os: osx
osx_image: xcode12.2
name: Libevent, Clang on OS X, Amd64
compiler: clang
arch: amd64
env:
- TEST_OSX=yes
- TEST_LIBEVENT=yes
- CONFIG_OPTS="--disable-flto --with-ssl=/usr/local/opt/openssl --with-libevent=/usr/local/opt/libevent --with-libexpat=/usr/local/opt/expat"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: linux
name: UBsan, GCC on Linux, Amd64
compiler: gcc
arch: amd64
dist: bionic
env:
- TEST_UBSAN=yes
- os: linux
name: UBsan, Clang on Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_UBSAN=yes
- os: linux
name: Asan, GCC on Linux, Amd64
compiler: gcc
arch: amd64
dist: bionic
env:
- TEST_ASAN=yes
- os: linux
name: Asan, Clang on Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ASAN=yes
- os: linux
name: GCC on Linux, Aarch64
compiler: gcc
arch: arm64
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: Clang on Linux, Aarch64
compiler: clang
arch: arm64
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: GCC on Linux, PowerPC64
compiler: gcc
arch: ppc64le
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: Clang on Linux, PowerPC64
compiler: clang
arch: ppc64le
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: GCC on Linux, s390x
compiler: gcc
arch: s390x
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: linux
name: Clang on Linux, s390x
compiler: clang
arch: s390x
dist: bionic
env:
- CONFIG_OPTS="--enable-debug --disable-flto"
- os: osx
osx_image: xcode12.2
name: Apple iPhone on iOS, armv7
compiler: clang
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=armv7-apple-ios
- OPENSSL_HOST=ios-cross
- IOS_SDK=iPhoneOS
- IOS_CPU=armv7s
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: Apple iPhone on iOS, arm64
compiler: clang
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=aarch64-apple-ios
- OPENSSL_HOST=ios64-cross
- IOS_SDK=iPhoneOS
- IOS_CPU=arm64
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: Apple TV on iOS, arm64
compiler: clang
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=aarch64-apple-ios
- OPENSSL_HOST=ios64-cross
- IOS_SDK=AppleTVOS
- IOS_CPU=arm64
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: Apple Watch on iOS, armv7
compiler: clang
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=armv7-apple-ios
- OPENSSL_HOST=ios-cross
- IOS_SDK=WatchOS
- IOS_CPU=armv7k
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: iPhoneSimulator on OS X, i386
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=i386-apple-ios
- OPENSSL_HOST=iphoneos-cross
- IOS_CPU=i386
- IOS_SDK=iPhoneSimulator
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: iPhoneSimulator on OS X, x86_64
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=x86_64-apple-ios
- OPENSSL_HOST=iphoneos-cross
- IOS_CPU=x86_64
- IOS_SDK=iPhoneSimulator
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: AppleTVSimulator on OS X, x86_64
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=x86_64-apple-ios
- OPENSSL_HOST=iphoneos-cross
- IOS_CPU=x86_64
- IOS_SDK=AppleTVSimulator
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: osx
osx_image: xcode12.2
name: WatchSimulator on OS X, i386
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=i386-apple-ios
- OPENSSL_HOST=iphoneos-cross
- IOS_CPU=i386
- IOS_SDK=WatchSimulator
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
- HOMEBREW_NO_AUTO_UPDATE=1
- os: linux
name: Android armv7a, Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ANDROID=yes
- AUTOTOOLS_HOST=armv7a-linux-androideabi
- OPENSSL_HOST=android-arm
- ANDROID_CPU=armv7a
- ANDROID_API=23
- ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- os: linux
name: Android aarch64, Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ANDROID=yes
- AUTOTOOLS_HOST=aarch64-linux-android
- OPENSSL_HOST=android-arm64
- ANDROID_CPU=aarch64
- ANDROID_API=23
- ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- os: linux
name: Android x86, Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ANDROID=yes
- AUTOTOOLS_HOST=i686-linux-android
- OPENSSL_HOST=android-x86
- ANDROID_CPU=x86
- ANDROID_API=23
- ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- os: linux
name: Android x86_64, Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ANDROID=yes
- AUTOTOOLS_HOST=x86_64-linux-android
- OPENSSL_HOST=android-x86_64
- ANDROID_CPU=x86_64
- ANDROID_API=23
- ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
allow_failures:
- os: osx
name: Apple iPhone on iOS, armv7
- os: osx
name: Apple iPhone on iOS, arm64
- os: osx
name: Apple TV on iOS, arm64
- os: osx
name: Apple Watch on iOS, armv7
- os: osx
name: iPhoneSimulator on OS X, i386
- os: osx
name: iPhoneSimulator on OS X, x86_64
- os: osx
name: AppleTVSimulator on OS X, x86_64
- os: osx
name: WatchSimulator on OS X, i386
- os: linux
name: Android armv7a, Linux, Amd64
- os: linux
name: Android aarch64, Linux, Amd64
- os: linux
name: Android x86, Linux, Amd64
- os: linux
name: Android x86_64, Linux, Amd64
before_script:
- |
if [ "$TEST_ANDROID" = "yes" ]; then
./contrib/android/install_tools.sh
elif [ "$TEST_IOS" = "yes" ]; then
./contrib/ios/install_tools.sh
fi
# The Travis docs say to avoid calling exit in the script. It leads to
# some code duplication to avoid failures in cross-compiles. Also see
# https://docs.travis-ci.com/user/job-lifecycle/ in the Travis docs.
script:
- |
export MAKE_TEST="yes"
if [ "$TEST_UBSAN" = "yes" ]; then
export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover=all"
elif [ "$TEST_ASAN" = "yes" ]; then
export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address"
fi
- |
if [ "$TEST_IOS" = "yes" ]; then
export AUTOTOOLS_BUILD="$(./config.guess)"
export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig"
source ./contrib/ios/setenv_ios.sh
./contrib/ios/install_openssl.sh
./contrib/ios/install_expat.sh
export CONFIG_OPTS="\
--build=$AUTOTOOLS_BUILD --host=$AUTOTOOLS_HOST \
--prefix=$IOS_PREFIX \
--with-ssl=$IOS_PREFIX --disable-gost \
--with-libexpat=$IOS_PREFIX "
echo CONFIG_OPTS ${CONFIG_OPTS}
export MAKE_TEST=no
export TEST_INSTALL=yes
fi
- |
if [ "$TEST_ANDROID" = "yes" ]; then
export AUTOTOOLS_BUILD="$(./config.guess)"
export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig"
./contrib/android/install_ndk.sh
source ./contrib/android/setenv_android.sh
./contrib/android/install_openssl.sh
./contrib/android/install_expat.sh
export CONFIG_OPTS="\
--build=$AUTOTOOLS_BUILD --host=$AUTOTOOLS_HOST \
--prefix=$ANDROID_PREFIX \
--with-ssl=$ANDROID_PREFIX --disable-gost \
--with-libexpat=$ANDROID_PREFIX "
echo CONFIG_OPTS ${CONFIG_OPTS}
export MAKE_TEST=no
export TEST_INSTALL=yes
fi
- ./configure ${CONFIG_OPTS}
- make -j 2
- |
if [ "$MAKE_TEST" = "yes" ]; then
make test
fi
- |
if [ "$TEST_INSTALL" = "yes" ]; then
make install
fi
- |
if [ "$TEST_ANALYZER" = "yes" ]; then
(cd testdata/clang-analysis.tdir; bash clang-analysis.test)
fi
+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.
+1464 -339
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1,6 +1,5 @@
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 max 256 ports are opened at
the same time and the builtin alternative is equally capable and a
+278
View File
@@ -0,0 +1,278 @@
# Travis Testing
Unbound 1.10 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware.
Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL and Expat, and then builds Unbound. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs.
iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13.
The Unbound Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead Unbound specifies the exact job to run under the `jobs:` and `include:` keys.
## Typical recipe
A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following.
```
- os: linux
name: GCC on Linux, Aarch64
compiler: gcc
arch: arm64
dist: bionic
- os: linux
name: Clang on Linux, Aarch64
compiler: clang
arch: arm64
dist: bionic
```
OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang.
## Sanitizer builds
Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `TEST_UBSAN=yes` or `TEST_ASAN=yes` for the sanitizer builds.
The recipes are similar to the following.
```
- os: linux
name: UBsan, GCC on Linux, Amd64
compiler: gcc
arch: amd64
dist: bionic
env: TEST_UBSAN=yes
- os: linux
name: UBsan, Clang on Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env: TEST_UBSAN=yes
```
When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string.
```
if [ "$TEST_UBSAN" = "yes" ]; then
export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover"
./configure
make -j 2
make test
elif [ "$TEST_ASAN" = "yes" ]; then
export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address"
./configure
make -j 2
make test
...
```
## Android builds
Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL and Expat prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes.
### Android job
The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below.
```
- os: linux
name: Android armv7a, Linux, Amd64
compiler: clang
arch: amd64
dist: bionic
env:
- TEST_ANDROID=yes
- AUTOTOOLS_HOST=armv7a-linux-androideabi
- OPENSSL_HOST=android-arm
- ANDROID_CPU=armv7a
- ANDROID_API=23
- ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU"
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
```
### ANDROID_NDK_ROOT
The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`).
If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly.
### Tool installation
The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java.
```
before_script:
- |
if [ "$TEST_ANDROID" = "yes" ]; then
./contrib/android/install_tools.sh
elif [ "$TEST_IOS" = "yes" ]; then
./contrib/ios/install_tools.sh
fi
```
### NDK installation
The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory.
If you are working from a developer machine you probably already have a NDK and SDK installed.
### Android environment
The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`.
`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select.
The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64.
```
armv8a|aarch64|arm64|arm64-v8a)
CC="aarch64-linux-android$ANDROID_API-clang"
CXX="aarch64-linux-android$ANDROID_API-clang++"
LD="aarch64-linux-android-ld"
AS="aarch64-linux-android-as"
AR="aarch64-linux-android-ar"
RANLIB="aarch64-linux-android-ranlib"
STRIP="aarch64-linux-android-strip"
CFLAGS="-funwind-tables -fexceptions"
CXXFLAGS="-funwind-tables -fexceptions -frtti"
```
### OpenSSL and Expat
The fifth step builds OpenSSL and Expat. OpenSSL and Expat are built for Android using the scripts `contrib/android/install_openssl.sh` and `contrib/android/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory.
`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. `PKG_CONFIG_PATH` is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`.
OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The Unbound version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean Unbound's `15-android.conf` will only work with Unbound, with NDK-r19 and above, and a properly set environment.
OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option.
### Android build
Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The recipe looks as follows.
```
elif [ "$TEST_ANDROID" = "yes" ]; then
export AUTOTOOLS_BUILD="$(./config.guess)"
export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig"
./contrib/android/install_ndk.sh
source ./contrib/android/setenv_android.sh
./contrib/android/install_openssl.sh
./contrib/android/install_expat.sh
./configure \
--build="$AUTOTOOLS_BUILD" \
--host="$AUTOTOOLS_HOST" \
--prefix="$ANDROID_PREFIX" \
--with-ssl="$ANDROID_PREFIX" \
--with-libexpat="$ANDROID_PREFIX" \
--disable-gost;
make -j 2
make install
```
Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them.
### Android flags
`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags.
`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs.
To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`.
## iOS builds
Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL and Expat prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes.
### iOS job
The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below.
```
- os: osx
osx_image: xcode10
name: Apple iPhone on iOS, armv7
compiler: clang
env:
- TEST_IOS=yes
- AUTOTOOLS_HOST=armv7-apple-ios
- OPENSSL_HOST=ios-cross
- IOS_SDK=iPhoneOS
- IOS_CPU=armv7s
- IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU"
```
### Tool installation
The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis.
```
before_script:
- |
if [ "$TEST_ANDROID" = "yes" ]; then
./contrib/android/install_tools.sh
elif [ "$TEST_IOS" = "yes" ]; then
./contrib/ios/install_tools.sh
fi
```
### iOS environment
The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`.
`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select.
The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools.
```
CPP=cpp
CC=clang
CXX=clang++
LD=ld
AS=as
AR=ar
RANLIB=ranlib
STRIP=strip
```
If you are working from a developer machine you probably already have the necessary tools installed.
### OpenSSL and Expat
The fourth step builds OpenSSL and Expat. OpenSSL and Expat are built for iOS using the scripts `contrib/ios/install_openssl.sh` and `contrib/ios/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory.
`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair receives a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported.
`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`.
OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean Unbound's `15-ios.conf` will only work with Unbound and a properly set environment.
OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`.
### iOS build
Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The full recipe looks as follows.
```
elif [ "$TEST_IOS" = "yes" ]; then
export AUTOTOOLS_BUILD="$(./config.guess)"
export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig"
source ./contrib/ios/setenv_ios.sh
./contrib/ios/install_openssl.sh
./contrib/ios/install_expat.sh
./configure \
--build="$AUTOTOOLS_BUILD" \
--host="$AUTOTOOLS_HOST" \
--prefix="$IOS_PREFIX" \
--with-ssl="$IOS_PREFIX" \
--with-libexpat="$IOS_PREFIX" \
--disable-gost;
make -j 2
make install
```
Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them.
### iOS flags
`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags.
+39
View File
@@ -0,0 +1,39 @@
# Unbound
[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound)
[![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound)
[![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest)
Unbound is a validating, recursive, caching DNS resolver. It is designed to be
fast and lean and incorporates modern features based on open standards. If you
have any feedback, we would love to hear from you. Dont hesitate to
[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new)
or post a message on the [Unbound mailing list](https://lists.nlnetlabs.nl/mailman/listinfo/unbound-users).
You can learn more about Unbound by reading our
[documentation](https://unbound.docs.nlnetlabs.nl/).
## Compiling
Make sure you have the C toolchain, OpenSSL and its include files, and libexpat
installed. Unbound can be compiled and installed using:
```
./configure && make && make install
```
You can use libevent if you want. libevent is useful when using 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.
Use the `--with-libevent=dir` configure option to compile Unbound with libevent
support.
## Unbound configuration
All of Unbound's configuration options are described in the man pages, which
will be installed and are available on the Unbound
[documentation page](https://unbound.docs.nlnetlabs.nl/).
An example configuration file is located in
[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in).
+31
View File
@@ -0,0 +1,31 @@
# Security Policy
## Supported Versions
NLnet Labs adheres to the straightforward, semantic versioning scheme that is
commonly used in the software industry.
Support is provided in respect of the latest release, i.e. releases with the
highest minor and patch version level. We do not backport security fixes to
older (minor) versions. In the event a new major version is released (e.g. from
3.2.18 to 4.0.0), support will also be provided on the latest minor version of
the previous major version (3.2.18) for a period of one year from the release of
the new major version (4.0.0).
In the event that, during this period, a new patch or minor version of the
previous major version is released, then support on these versions will only be
provided for the remainder of the one-year-period.
You can find detailed information on our software support policy here:
https://www.nlnetlabs.nl/support/software-support-policy/
## Reporting a Vulnerability
We take security very seriously. If you have discovered a security vulnerability
in one of our projects and you would like to report it to us, you can send an
encrypted message to our Security Entry Point.
Details are described here:
https://www.nlnetlabs.nl/security-report/
+14 -3
View File
@@ -103,9 +103,20 @@ AC_DEFUN([AC_PROG_SWIG],[
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
[badversion=0]
if test $available_major -lt $required_major ; then
[badversion=1]
fi
if test $available_major -eq $required_major \
-a $available_minor -lt $required_minor ; then
[badversion=1]
fi
if test $available_major -eq $required_major \
-a $available_minor -eq $required_minor \
-a $available_patch -lt $required_patch ; then
[badversion=1]
fi
if test $badversion -eq 1 ; 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
Vendored
+2696 -1306
View File
File diff suppressed because it is too large Load Diff
+251 -93
View File
@@ -2,7 +2,39 @@
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
# Version 14
# Version 44
# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD.
# 2021-08-17 fix sed script in ssldir split handling.
# 2021-08-17 fix for openssl to detect split version, with ssldir_include
# and ssldir_lib output directories.
# 2021-07-30 fix for openssl use of lib64 directory.
# 2021-06-14 fix nonblocking test to use host instead of target for mingw test.
# 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for
# 64bit compatibility.
# 2021-03-24 fix ACX_FUNC_DEPRECATED to use CPPFLAGS and CFLAGS.
# 2021-01-05 fix defun for aclocal
# 2021-01-05 autoconf 2.70 autoupdate and fixes, no AC_TRY_COMPILE
# 2020-08-24 Use EVP_sha256 instead of HMAC_Update (for openssl-3.0.0).
# 2016-03-21 Check -ldl -pthread for libcrypto for ldns and openssl 1.1.0.
# 2016-03-21 Use HMAC_Update instead of HMAC_CTX_Init (for openssl-1.1.0).
# 2016-01-04 -D_DEFAULT_SOURCE defined with -D_BSD_SOURCE for Linux glibc 2.20
# 2015-12-11 FLTO check for new OSX, clang.
# 2015-11-18 spelling check fix.
# 2015-11-05 ACX_SSL_CHECKS no longer adds -ldl needlessly.
# 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added.
# 2015-03-17 AHX_CONFIG_REALLOCARRAY added
# 2013-09-19 FLTO help text improved.
# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
# 2013-06-25 FLTO has --disable-flto option.
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
# Fix ACX_MALLOC for redefined malloc error.
# Fix GETADDRINFO_WITH_INCLUDES to add -lws2_32
# 2011-11-10 Fix FLTO test to not drop a.out in current directory.
# 2011-11-01 Fix FLTO test for llvm on Lion.
# 2011-08-01 Fix nonblock test (broken at v13).
# 2011-08-01 Fix autoconf 2.68 warnings
# 2011-06-23 Add ACX_CHECK_FLTO to check -flto.
@@ -10,7 +42,7 @@
# 2010-07-02 Add check for ss_family (for minix).
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
# 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end.
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS seperate, -ldl
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS separate, -ldl
# 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN
# 2010-01-20 added AHX_COONFIG_STRLCAT
# 2009-07-14 U_CHAR detection improved for windows crosscompile.
@@ -81,6 +113,8 @@
# ACX_CHECK_MEMCMP_SIGNED - check if memcmp uses signed characters.
# AHX_MEMCMP_BROKEN - replace memcmp func for CHECK_MEMCMP_SIGNED.
# ACX_CHECK_SS_FAMILY - check for sockaddr_storage.ss_family
# ACX_CHECK_PIE - add --enable-pie option and check if works
# ACX_CHECK_RELRO_NOW - add --enable-relro-now option and check it
#
dnl Escape backslashes as \\, for C:\ paths, for the C preprocessor defines.
@@ -94,7 +128,7 @@ dnl Calculate comma separated windows-resource numbers from package version.
dnl Picks the first three(,0) or four numbers out of the name.
dnl $1: variable for the result
AC_DEFUN([ACX_RSRC_VERSION],
[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `]
[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `]
])
dnl Routine to help check for compiler flags.
@@ -109,7 +143,7 @@ AC_MSG_CHECKING(whether $CC supports -$1)
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
AC_CACHE_VAL(cv_prog_cc_flag_$cache,
[
echo 'void f(){}' >conftest.c
echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -$1 -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -223,7 +257,7 @@ ACX_CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"])
AC_CHECK_HEADERS([getopt.h time.h],,, [AC_INCLUDES_DEFAULT])
ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE,
ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE,
[
#include "confdefs.h"
#include <stdlib.h>
@@ -254,11 +288,13 @@ int test() {
a = getopt(2, opts, "a");
a = isascii(32);
str = gai_strerror(0);
if(str && t && tv.tv_usec && msg.msg_control)
a = 0;
return a;
}
], [CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"])
], [CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"])
ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE,
ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE,
[
#include "confdefs.h"
#include <stdlib.h>
@@ -289,9 +325,11 @@ int test() {
a = getopt(2, opts, "a");
a = isascii(32);
str = gai_strerror(0);
if(str && t && tv.tv_usec && msg.msg_control)
a = 0;
return a;
}
], [CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"])
], [CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"])
ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG,
[
@@ -303,7 +341,7 @@ int test() {
}
], [CFLAGS="$CFLAGS $C99FLAG"])
ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE,
ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE,
[
#include <ctype.h>
@@ -312,7 +350,7 @@ int test() {
a = isascii(32);
return a;
}
], [CFLAGS="$CFLAGS -D_BSD_SOURCE"])
], [CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"])
ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE,
[
@@ -355,6 +393,8 @@ int test() {
const char* str = NULL;
t = ctime_r(&time, buf);
str = gai_strerror(0);
if(t && str)
a = 0;
return a;
}
], [CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"])
@@ -381,6 +421,8 @@ int test() {
srandom(32);
a = getopt(2, opts, "a");
a = isascii(32);
if(tv.tv_usec)
a = 0;
return a;
}
], [CFLAGS="$CFLAGS -D__EXTENSIONS__"])
@@ -390,11 +432,22 @@ int test() {
dnl Check if CC supports -flto.
dnl in a way that supports clang and suncc (that flag does something else,
dnl but fails to link). It sets it in CFLAGS if it works.
AC_DEFUN([ACX_CHECK_FLTO],
[AC_MSG_CHECKING([if $CC supports -flto])
BAKCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -flto"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [AC_MSG_RESULT(yes)], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
AC_DEFUN([ACX_CHECK_FLTO], [
AC_ARG_ENABLE([flto], AS_HELP_STRING([--disable-flto], [Disable link-time optimization (gcc specific option)]))
AS_IF([test "x$enable_flto" != "xno"], [
AC_MSG_CHECKING([if $CC supports -flto])
BAKCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -flto"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
CFLAGS="$BAKCFLAGS"
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
rm -f conftest conftest.c conftest.o
], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
])
])
dnl Check the printf-format attribute (if any)
@@ -405,15 +458,12 @@ AC_DEFUN([ACX_CHECK_FORMAT_ATTRIBUTE],
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "format" attribute)
AC_CACHE_VAL(ac_cv_c_format_attribute,
[ac_cv_c_format_attribute=no
AC_TRY_COMPILE(
[#include <stdio.h>
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
], [
]], [[
f ("%s", "str");
],
[ac_cv_c_format_attribute="yes"],
[ac_cv_c_format_attribute="no"])
]])],[ac_cv_c_format_attribute="yes"],[ac_cv_c_format_attribute="no"])
])
AC_MSG_RESULT($ac_cv_c_format_attribute)
@@ -442,14 +492,11 @@ AC_DEFUN([ACX_CHECK_UNUSED_ATTRIBUTE],
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "unused" attribute)
AC_CACHE_VAL(ac_cv_c_unused_attribute,
[ac_cv_c_unused_attribute=no
AC_TRY_COMPILE(
[#include <stdio.h>
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
void f (char *u __attribute__((unused)));
], [
]], [[
f ("x");
],
[ac_cv_c_unused_attribute="yes"],
[ac_cv_c_unused_attribute="no"])
]])],[ac_cv_c_unused_attribute="yes"],[ac_cv_c_unused_attribute="no"])
])
dnl Setup ATTR_UNUSED config.h parts.
@@ -506,7 +553,7 @@ dnl as a requirement so that is gets called before LIBTOOL
dnl because libtools 'AC_REQUIRE' names are right after this one, before
dnl this function contents.
AC_REQUIRE([ACX_LIBTOOL_C_PRE])
AC_PROG_LIBTOOL
LT_INIT
])
dnl Detect if u_char type is defined, otherwise define it.
@@ -604,6 +651,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [
withval=$1
if test x_$withval != x_no; then
AC_MSG_CHECKING(for SSL)
if test -n "$withval"; then
dnl look for openssl install with different version, eg.
dnl in /usr/include/openssl11/openssl/ssl.h
dnl and /usr/lib64/openssl11/libssl.so
dnl with the --with-ssl=/usr/include/openssl11
if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then
ssldir="$withval"
found_ssl="yes"
withval=""
ssldir_include="$ssldir"
dnl find the libdir
ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'`
if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
: # found here
else
ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'`
if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then
: # found here
else
AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"])
fi
fi
fi
fi
if test x_$withval = x_ -o x_$withval = x_yes; then
withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
fi
@@ -611,12 +682,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
found_ssl="yes"
AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
dnl assume /usr/include is already in the include-path.
if test "$ssldir" != "/usr"; then
CPPFLAGS="$CPPFLAGS -I$ssldir/include"
LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
fi
ssldir_include="$ssldir/include"
if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then
ssldir_lib="$ssldir/lib64"
else
ssldir_lib="$ssldir/lib"
fi
break;
fi
done
@@ -624,38 +695,41 @@ AC_DEFUN([ACX_SSL_CHECKS], [
AC_MSG_ERROR(Cannot find the SSL libraries in $withval)
else
AC_MSG_RESULT(found in $ssldir)
AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
HAVE_SSL=yes
dnl assume /usr is already in the lib and dynlib paths.
if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
LDFLAGS="$LDFLAGS -L$ssldir/lib"
LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
ACX_RUNTIME_PATH_ADD([$ssldir/lib])
fi
dnl assume /usr is already in the include, lib and dynlib paths.
if test "$ssldir" != "/usr"; then
CPPFLAGS="$CPPFLAGS -I$ssldir_include"
LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include"
LDFLAGS="$LDFLAGS -L$ssldir_lib"
LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib"
ACX_RUNTIME_PATH_ADD([$ssldir_lib])
fi
AC_MSG_CHECKING([for HMAC_CTX_init in -lcrypto])
AC_MSG_CHECKING([for EVP_sha256 in -lcrypto])
LIBS="$LIBS -lcrypto"
LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
AC_TRY_LINK(, [
int HMAC_CTX_init(void);
(void)HMAC_CTX_init();
], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int EVP_sha256(void);
(void)EVP_sha256();
]])],[
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
[If you have HMAC_CTX_init])
], [
AC_DEFINE([HAVE_EVP_SHA256], 1,
[If you have EVP_sha256])
],[
AC_MSG_RESULT(no)
# check if -lwsock32 or -lgdi32 are needed.
BAKLIBS="$LIBS"
BAKSSLLIBS="$LIBSSL_LIBS"
LIBS="$LIBS -lgdi32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
LIBS="$LIBS -lgdi32 -lws2_32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
AC_TRY_LINK([], [
int HMAC_CTX_init(void);
(void)HMAC_CTX_init();
],[
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
[If you have HMAC_CTX_init])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int EVP_sha256(void);
(void)EVP_sha256();
]])],[
AC_DEFINE([HAVE_EVP_SHA256], 1,
[If you have EVP_sha256])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
@@ -664,28 +738,37 @@ AC_DEFUN([ACX_SSL_CHECKS], [
LIBS="$LIBS -ldl"
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
AC_MSG_CHECKING([if -lcrypto needs -ldl])
AC_TRY_LINK([], [
int HMAC_CTX_init(void);
(void)HMAC_CTX_init();
],[
AC_DEFINE([HAVE_HMAC_CTX_INIT], 1,
[If you have HMAC_CTX_init])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int EVP_sha256(void);
(void)EVP_sha256();
]])],[
AC_DEFINE([HAVE_EVP_SHA256], 1,
[If you have EVP_sha256])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -ldl -pthread"
LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int EVP_sha256(void);
(void)EVP_sha256();
]])],[
AC_DEFINE([HAVE_EVP_SHA256], 1,
[If you have EVP_sha256])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
])
])
])
])
fi
AC_SUBST(HAVE_SSL)
AC_SUBST(RUNTIME_PATH)
# openssl engine functionality needs dlopen().
BAKLIBS="$LIBS"
AC_SEARCH_LIBS([dlopen], [dl])
if test "$LIBS" != "$BAKLIBS"; then
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
fi
fi
AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT])
@@ -699,9 +782,8 @@ dnl Checks main header files of SSL.
dnl
AC_DEFUN([ACX_WITH_SSL],
[
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[
],[
withval="yes"
])
@@ -718,9 +800,8 @@ dnl Checks main header files of SSL.
dnl
AC_DEFUN([ACX_WITH_SSL_OPTIONAL],
[
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[
],[
withval="yes"
])
@@ -784,7 +865,18 @@ int main() {
}
]])],
dnl this case on linux, solaris, bsd
[ac_cv_func_getaddrinfo="yes"],
[ac_cv_func_getaddrinfo="yes"
dnl see if on windows
if test "$ac_cv_header_windows_h" = "yes"; then
AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used])
USE_WINSOCK="1"
if echo $LIBS | grep 'lws2_32' >/dev/null; then
:
else
LIBS="$LIBS -lws2_32"
fi
fi
],
dnl no quick getaddrinfo, try mingw32 and winsock2 library.
ORIGLIBS="$LIBS"
LIBS="$LIBS -lws2_32"
@@ -832,7 +924,7 @@ AC_CACHE_VAL(cv_cc_deprecated_$cache,
[
echo '$3' >conftest.c
echo 'void f(){ $2 }' >>conftest.c
if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then
eval "cv_cc_deprecated_$cache=no"
else
eval "cv_cc_deprecated_$cache=yes"
@@ -858,7 +950,7 @@ dnl a nonblocking socket do not work, a new call to select is necessary.
AC_DEFUN([ACX_CHECK_NONBLOCKING_BROKEN],
[
AC_MSG_CHECKING([if nonblocking sockets work])
if echo $target | grep mingw32 >/dev/null; then
if echo $host | grep mingw >/dev/null; then
AC_MSG_RESULT([no (windows)])
AC_DEFINE([NONBLOCKING_IS_BROKEN], 1, [Define if the network stack does not fully support nonblocking io (causes lower performance).])
else
@@ -872,6 +964,9 @@ AC_LANG_SOURCE([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -1000,7 +1095,7 @@ dnl defines MKDIR_HAS_ONE_ARG
AC_DEFUN([ACX_MKDIR_ONE_ARG],
[
AC_MSG_CHECKING([whether mkdir has one arg])
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <unistd.h>
#ifdef HAVE_WINSOCK2_H
@@ -1009,14 +1104,12 @@ AC_TRY_COMPILE([
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
], [
]], [[
(void)mkdir("directory");
],
AC_MSG_RESULT(yes)
]])],[AC_MSG_RESULT(yes)
AC_DEFINE(MKDIR_HAS_ONE_ARG, 1, [Define if mkdir has one argument.])
,
AC_MSG_RESULT(no)
)
],[AC_MSG_RESULT(no)
])
])dnl end of ACX_MKDIR_ONE_ARG
dnl Check for ioctlsocket function. works on mingw32 too.
@@ -1040,10 +1133,23 @@ dnl detect malloc and provide malloc compat prototype.
dnl $1: unique name for compat code
AC_DEFUN([ACX_FUNC_MALLOC],
[
AC_FUNC_MALLOC
if test "$ac_cv_func_malloc_0_nonnull" = no; then
AC_DEFINE_UNQUOTED([malloc], [rpl_malloc_$1], [Define if replacement function should be used.])
fi
AC_MSG_CHECKING([for GNU libc compatible malloc])
AC_RUN_IFELSE([AC_LANG_PROGRAM(
[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
#include <stdlib.h>
#else
char *malloc ();
#endif
]], [ if(malloc(0) != 0) return 1;])
],
[AC_MSG_RESULT([no])
AC_LIBOBJ(malloc)
AC_DEFINE_UNQUOTED([malloc], [rpl_malloc_$1], [Define if replacement function should be used.])] ,
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_MALLOC], 1, [If have GNU libc compatible malloc])],
[AC_MSG_RESULT([no (crosscompile)])
AC_LIBOBJ(malloc)
AC_DEFINE_UNQUOTED([malloc], [rpl_malloc_$1], [Define if replacement function should be used.])] )
])
dnl Define fallback for fseeko and ftello if needed.
@@ -1162,10 +1268,20 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
])
dnl provide reallocarray compat prototype.
dnl $1: unique name for compat code
AC_DEFUN([AHX_CONFIG_REALLOCARRAY],
[
#ifndef HAVE_REALLOCARRAY
#define reallocarray reallocarray$1
void* reallocarray(void *ptr, size_t nmemb, size_t size);
#endif
])
dnl provide w32 compat definition for sleep
AC_DEFUN([AHX_CONFIG_W32_SLEEP],
[
#ifndef HAVE_SLEEP
#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
])
@@ -1223,6 +1339,7 @@ AC_DEFUN([ACX_STRIP_EXT_FLAGS],
AC_MSG_NOTICE([Stripping extension flags...])
ACX_CFLAGS_STRIP(-D_GNU_SOURCE)
ACX_CFLAGS_STRIP(-D_BSD_SOURCE)
ACX_CFLAGS_STRIP(-D_DEFAULT_SOURCE)
ACX_CFLAGS_STRIP(-D__EXTENSIONS__)
ACX_CFLAGS_STRIP(-D_POSIX_C_SOURCE=200112)
ACX_CFLAGS_STRIP(-D_XOPEN_SOURCE=600)
@@ -1250,6 +1367,7 @@ dnl config.h part to define omitted cflags, use with ACX_STRIP_EXT_FLAGS.
AC_DEFUN([AHX_CONFIG_EXT_FLAGS],
[AHX_CONFIG_FLAG_EXT(-D_GNU_SOURCE)
AHX_CONFIG_FLAG_EXT(-D_BSD_SOURCE)
AHX_CONFIG_FLAG_EXT(-D_DEFAULT_SOURCE)
AHX_CONFIG_FLAG_EXT(-D__EXTENSIONS__)
AHX_CONFIG_FLAG_EXT(-D_POSIX_C_SOURCE=200112)
AHX_CONFIG_FLAG_EXT(-D_XOPEN_SOURCE=600)
@@ -1284,9 +1402,7 @@ int main(void)
dnl define memcmp to its replacement, pass unique id for program as arg
AC_DEFUN([AHX_MEMCMP_BROKEN], [
#ifdef MEMCMP_IS_BROKEN
# ifdef memcmp
# undef memcmp
# endif
#include "compat/memcmp.h"
#define memcmp memcmp_$1
int memcmp(const void *x, const void *y, size_t n);
#endif
@@ -1326,4 +1442,46 @@ AC_DEFUN([ACX_CHECK_SS_FAMILY],
#endif
]) ])
dnl Check if CC and linker support -fPIE and -pie.
dnl If so, sets them in CFLAGS / LDFLAGS.
AC_DEFUN([ACX_CHECK_PIE], [
AC_ARG_ENABLE([pie], AS_HELP_STRING([--enable-pie], [Enable Position-Independent Executable (eg. to fully benefit from ASLR, small performance penalty)]))
AS_IF([test "x$enable_pie" = "xyes"], [
AC_MSG_CHECKING([if $CC supports PIE])
BAKLDFLAGS="$LDFLAGS"
BAKCFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS -pie"
CFLAGS="$CFLAGS -fPIE"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
LDFLAGS="$BAKLDFLAGS"
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
rm -f conftest conftest.c conftest.o
], [LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
])
])
dnl Check if linker supports -Wl,-z,relro,-z,now.
dnl If so, adds it to LDFLAGS.
AC_DEFUN([ACX_CHECK_RELRO_NOW], [
AC_ARG_ENABLE([relro_now], AS_HELP_STRING([--enable-relro-now], [Enable full relocation binding at load-time (RELRO NOW, to protect GOT and .dtor areas)]))
AS_IF([test "x$enable_relro_now" = "xyes"], [
AC_MSG_CHECKING([if $CC supports -Wl,-z,relro,-z,now])
BAKLDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
LDFLAGS="$BAKLDFLAGS"
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
rm -f conftest conftest.c conftest.o
], [LDFLAGS="$BAKLDFLAGS" ; AC_MSG_RESULT(no)])
])
])
dnl End of file
-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
+55 -113
View File
@@ -14,79 +14,49 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
fi
if test -z "$PYTHON_VERSION"; then
PYTHON_VERSION=`$PYTHON -c "import sys, string; \
print string.split(sys.version)[[0]]"`
PYTHON_VERSION=`$PYTHON -c "import sys; \
print(sys.version.split()[[0]])"`
fi
#
# Check for a version of Python >= 2.1.0
#
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
ver = string.split(sys.version)[[0]]; \
print ver >= '2.1.0'"`
if test "$ac_supports_python_ver" != "True"; then
if test -z "$PYTHON_NOVERSIONCHECK"; then
AC_MSG_RESULT([no])
AC_MSG_FAILURE([
This version of the AC@&t@_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.
])
else
AC_MSG_RESULT([skip at user request])
fi
else
# Check if you have sysconfig
AC_MSG_CHECKING([for the sysconfig Python module])
if ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`; then
AC_MSG_RESULT([yes])
fi
#
# if the macro parameter ``version'' is set, honour it
#
if test -n "$1"; then
AC_MSG_CHECKING([for a version of Python $1])
ac_supports_python_ver=`$PYTHON -c "import sys, string; \
ver = string.split(sys.version)[[0]]; \
print ver $1"`
if test "$ac_supports_python_ver" = "True"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([this package requires Python $1.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
])
PYTHON_VERSION=""
fi
fi
#
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else
sysconfig_module="sysconfig"
# if yes, use sysconfig, because distutils is deprecated.
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
# if no, try to use distutils
#
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
if ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`; 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
sysconfig_module="distutils.sysconfig"
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 "$sysconfig_module" = "sysconfig"; then
python_path=`$PYTHON -c 'import sysconfig; \
print(sysconfig.get_path("include"));'`
else
python_path=`$PYTHON -c "import distutils.sysconfig; \
print(distutils.sysconfig.get_python_inc());"`
fi
if test -n "${python_path}"; then
python_path="-I$python_path"
fi
@@ -100,77 +70,49 @@ $ac_distutils_result])
#
AC_MSG_CHECKING([for Python library path])
if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print join(get_config_vars('VERSION'))"`
if test "$py_version" = "[None]"; then
if test -n "$PYTHON_VERSION"; then
py_version=$PYTHON_VERSION
else
py_version=`$PYTHON -c "import sys; \
print sys.version[[:3]]"`
fi
fi
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print '-L' + get_python_lib(0,1), \
'-L' + os.path.dirname(get_python_lib(0,1)), \
'-lpython';"`$py_version
PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module 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])
if test -z "$PYTHON_LIBDIR"; then
PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \
print(get_config_var('LIBDIR'));"`
fi
#
# 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);"`
if test "$sysconfig_module" = "sysconfig"; then
PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \
print(sysconfig.get_path("platlib"));'`
else
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
print(distutils.sysconfig.get_python_lib(1,0));"`
fi
fi
AC_MSG_RESULT([$PYTHON_SITE_PKG])
AC_SUBST([PYTHON_SITE_PKG])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LOCALMODLIBS'), conf('LIBS')"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
AC_SUBST(PYTHON_EXTRA_LIBS)
#
# linking flags needed when embedding
#
AC_MSG_CHECKING(python extra linking flags)
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LINKFORSHARED')"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
#
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development environment])
AC_LANG_PUSH([C])
# save current global flags
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
AC_TRY_LINK([
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
LIBS="$LIBS $PYTHON_LDFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <Python.h>
],[
]],[[
Py_Initialize();
],[pythonexists=yes],[pythonexists=no])
]])],[pythonexists=yes],[pythonexists=no])
AC_MSG_RESULT([$pythonexists])
+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
+874
View File
@@ -0,0 +1,874 @@
/*
* 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 "cachedb/redis.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"
/* header file for htobe64 */
#ifdef HAVE_ENDIAN_H
# include <endian.h>
#endif
#ifdef HAVE_SYS_ENDIAN_H
# include <sys/endian.h>
#endif
#ifndef HAVE_HTOBE64
# ifdef HAVE_LIBKERN_OSBYTEORDER_H
/* In practice this is specific to MacOS X. We assume it doesn't have
* htobe64/be64toh but has alternatives with a different name. */
# include <libkern/OSByteOrder.h>
# define htobe64(x) OSSwapHostToBigInt64(x)
# define be64toh(x) OSSwapBigToHostInt64(x)
# else
/* not OSX */
/* Some compilers do not define __BYTE_ORDER__, like IBM XLC on AIX */
# if __BIG_ENDIAN__
# define be64toh(n) (n)
# define htobe64(n) (n)
# else
# define be64toh(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32))
# define htobe64(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32))
# endif /* _ENDIAN */
# endif /* HAVE_LIBKERN_OSBYTEORDER_H */
#endif /* HAVE_BE64TOH */
/** the unit test testframe for cachedb, its module state contains
* a cache for a couple queries (in memory). */
struct testframe_moddata {
/** lock for mutex */
lock_basic_type lock;
/** 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)
{
struct testframe_moddata* d;
(void)env;
verbose(VERB_ALGO, "testframe_init");
d = (struct testframe_moddata*)calloc(1,
sizeof(struct testframe_moddata));
cachedb_env->backend_data = (void*)d;
if(!cachedb_env->backend_data) {
log_err("out of memory");
return 0;
}
lock_basic_init(&d->lock);
lock_protect(&d->lock, d, sizeof(*d));
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;
lock_basic_destroy(&d->lock);
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);
lock_basic_lock(&d->lock);
if(d->stored_key && strcmp(d->stored_key, key) == 0) {
if(d->stored_datalen > sldns_buffer_capacity(result_buffer)) {
lock_basic_unlock(&d->lock);
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);
lock_basic_unlock(&d->lock);
return 1;
}
lock_basic_unlock(&d->lock);
return 0;
}
static void
testframe_store(struct module_env* env, struct cachedb_env* cachedb_env,
char* key, uint8_t* data, size_t data_len, time_t ATTR_UNUSED(ttl))
{
struct testframe_moddata* d = (struct testframe_moddata*)
cachedb_env->backend_data;
(void)env;
lock_basic_lock(&d->lock);
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) {
lock_basic_unlock(&d->lock);
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;
lock_basic_unlock(&d->lock);
return;
}
lock_basic_unlock(&d->lock);
/* (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)
{
#ifdef USE_REDIS
if(strcmp(str, redis_backend.name) == 0)
return &redis_backend;
#endif
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 = cfg->cachedb_backend;
cachedb_env->backend = cachedb_find_backend(backend_str);
if(!cachedb_env->backend) {
log_err("cachedb: cannot find backend name '%s'", backend_str);
return 0;
}
/* 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.");
free(cachedb_env);
env->modinfo[id] = NULL;
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);
free(cachedb_env);
env->modinfo[id] = NULL;
return 0;
}
cachedb_env->enabled = 1;
if(env->cfg->serve_expired_reply_ttl)
log_warn(
"cachedb: serve-expired-reply-ttl is set but not working for data "
"originating from the external cache; 0 TLL is used for those.");
if(env->cfg->serve_expired_client_timeout)
log_warn(
"cachedb: serve-expired-client-timeout is set but not working for "
"data originating from the external cache; expired data are used "
"in the reply without first trying to refresh the data.");
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 = qstate->env->cfg->cachedb_secret;
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);
#ifdef HAVE_EXPLICIT_BZERO
explicit_bzero(clear, clen);
#else
memset(clear, 0, clen);
#endif
/* 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;
/* do not store failures like SERVFAIL in the cachedb, this avoids
* overwriting expired, valid, content with broken content. */
if(FLAGS_GET_RCODE(qstate->return_msg->rep->flags) !=
LDNS_RCODE_NOERROR &&
FLAGS_GET_RCODE(qstate->return_msg->rep->flags) !=
LDNS_RCODE_NXDOMAIN &&
FLAGS_GET_RCODE(qstate->return_msg->rep->flags) !=
LDNS_RCODE_YXDOMAIN)
return 0;
/* We don't store the reply if its TTL is 0 unless serve-expired is
* enabled. Such a reply won't be reusable and simply be a waste for
* the backend. It's also compatible with the default behavior of
* dns_cache_store_msg(). */
if(qstate->return_msg->rep->ttl == 0 &&
!qstate->env->cfg->serve_expired)
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);
/* Check if we are allowed to return expired entries:
* - serve_expired needs to be set
* - if SERVE_EXPIRED_TTL is set make sure that the record is not older
* than that. */
if((time_t)expiry < *qstate->env->now &&
(!qstate->env->cfg->serve_expired ||
(SERVE_EXPIRED_TTL &&
*qstate->env->now - (time_t)expiry > SERVE_EXPIRED_TTL)))
return 0;
return 1;
}
/* Adjust the TTL of the given RRset by 'subtract'. If 'subtract' is
* negative, set the TTL to 0. */
static void
packed_rrset_ttl_subtract(struct packed_rrset_data* data, time_t subtract)
{
size_t i;
size_t total = data->count + data->rrsig_count;
if(subtract >= 0 && data->ttl > subtract)
data->ttl -= subtract;
else data->ttl = 0;
for(i=0; i<total; i++) {
if(subtract >= 0 && data->rr_ttl[i] > subtract)
data->rr_ttl[i] -= subtract;
else data->rr_ttl[i] = 0;
}
data->ttl_add = (subtract < data->ttl_add) ? (data->ttl_add - subtract) : 0;
}
/* Adjust the TTL of a DNS message and its RRs by 'adjust'. If 'adjust' is
* negative, set the TTLs to 0. */
static void
adjust_msg_ttl(struct dns_msg* msg, time_t adjust)
{
size_t i;
if(adjust >= 0 && msg->rep->ttl > adjust)
msg->rep->ttl -= adjust;
else
msg->rep->ttl = 0;
msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(msg->rep->ttl);
msg->rep->serve_expired_ttl = msg->rep->ttl + SERVE_EXPIRED_TTL;
for(i=0; i<msg->rep->rrset_count; i++) {
packed_rrset_ttl_subtract((struct packed_rrset_data*)msg->
rep->rrsets[i]->entry.data, adjust);
}
}
/** 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_from_response_msg(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 */
if(*qstate->env->now <= (time_t)timestamp) {
verbose(VERB_ALGO, "cachedb msg adjust by zero");
return 1; /* message from the future (clock skew?) */
}
adjust = *qstate->env->now - (time_t)timestamp;
if(qstate->return_msg->rep->ttl < adjust) {
verbose(VERB_ALGO, "cachedb msg expired");
/* If serve-expired is enabled, we still use an expired message
* setting the TTL to 0. */
if(qstate->env->cfg->serve_expired)
adjust = -1;
else
return 0; /* message expired */
}
verbose(VERB_ALGO, "cachedb msg adjusted down by %d", (int)adjust);
adjust_msg_ttl(qstate->return_msg, adjust);
/* Similar to the unbound worker, if serve-expired is enabled and
* the msg would be considered to be expired, mark the state so a
* refetch will be scheduled. The comparison between 'expiry' and
* 'now' should be redundant given how these values were calculated,
* but we check it just in case as does good_expiry_and_qinfo(). */
if(qstate->env->cfg->serve_expired &&
(adjust == -1 || (time_t)expiry < *qstate->env->now)) {
qstate->need_refetch = 1;
}
return 1;
}
/**
* 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),
qstate->return_msg->rep->ttl);
}
/**
* See if unbound's internal cache can answer the query
*/
static int
cachedb_intcache_lookup(struct module_qstate* qstate)
{
uint8_t* dpname=NULL;
size_t dpnamelen=0;
struct dns_msg* msg;
if(iter_stub_fwd_no_cache(qstate, &qstate->qinfo,
&dpname, &dpnamelen))
return 0; /* no cache for these queries */
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,
1, /* no partial messages with only a CNAME */
dpname, dpnamelen
);
if(!msg && qstate->env->neg_cache &&
iter_qname_indicates_dnssec(qstate->env, &qstate->qinfo)) {
/* 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,
qstate->env->cfg);
}
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)
{
uint32_t store_flags = qstate->query_flags;
if(qstate->env->cfg->serve_expired)
store_flags |= DNSCACHE_STORE_ZEROTTL;
if(!qstate->return_msg)
return;
(void)dns_cache_store(qstate->env, &qstate->qinfo,
qstate->return_msg->rep, 0, qstate->prefetch_leeway, 0,
qstate->region, store_flags, qstate->qstarttime);
}
/**
* 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.
* This does not look for expired entries. */
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);
/* In case we have expired data but there is a client timer for expired
* answers, pass execution to next module in order to try updating the
* data first.
* TODO: this needs revisit. The expired data stored from cachedb has
* 0 TTL which is picked up by iterator later when looking in the cache.
* Document that ext cachedb does not work properly with
* serve_stale_reply_ttl yet. */
if(qstate->need_refetch && qstate->serve_expired_data &&
qstate->serve_expired_data->timer) {
qstate->return_msg = NULL;
qstate->ext_state[id] = module_wait_module;
return;
}
/* 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 */
+112
View File
@@ -0,0 +1,112 @@
/*
* 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, time_t);
};
#define CACHEDB_HASHSIZE 256 /* bit hash */
/** 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);
+330
View File
@@ -0,0 +1,330 @@
/*
* cachedb/redis.c - cachedb redis module
*
* Copyright (c) 2018, 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 the redis database to cache
* dns responses.
*/
#include "config.h"
#ifdef USE_CACHEDB
#include "cachedb/redis.h"
#include "cachedb/cachedb.h"
#include "util/alloc.h"
#include "util/config_file.h"
#include "sldns/sbuffer.h"
#ifdef USE_REDIS
#include "hiredis/hiredis.h"
struct redis_moddata {
redisContext** ctxs; /* thread-specific redis contexts */
int numctxs; /* number of ctx entries */
const char* server_host; /* server's IP address or host name */
int server_port; /* server's TCP port */
struct timeval timeout; /* timeout for connection setup and commands */
};
static redisReply* redis_command(struct module_env*, struct cachedb_env*,
const char*, const uint8_t*, size_t);
static redisContext*
redis_connect(const struct redis_moddata* moddata)
{
redisContext* ctx;
ctx = redisConnectWithTimeout(moddata->server_host,
moddata->server_port, moddata->timeout);
if(!ctx || ctx->err) {
const char *errstr = "out of memory";
if(ctx)
errstr = ctx->errstr;
log_err("failed to connect to redis server: %s", errstr);
goto fail;
}
if(redisSetTimeout(ctx, moddata->timeout) != REDIS_OK) {
log_err("failed to set redis timeout");
goto fail;
}
return ctx;
fail:
if(ctx)
redisFree(ctx);
return NULL;
}
static int
redis_init(struct module_env* env, struct cachedb_env* cachedb_env)
{
int i;
struct redis_moddata* moddata = NULL;
verbose(VERB_ALGO, "redis_init");
moddata = calloc(1, sizeof(struct redis_moddata));
if(!moddata) {
log_err("out of memory");
return 0;
}
moddata->numctxs = env->cfg->num_threads;
moddata->ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*));
if(!moddata->ctxs) {
log_err("out of memory");
free(moddata);
return 0;
}
/* note: server_host is a shallow reference to configured string.
* we don't have to free it in this module. */
moddata->server_host = env->cfg->redis_server_host;
moddata->server_port = env->cfg->redis_server_port;
moddata->timeout.tv_sec = env->cfg->redis_timeout / 1000;
moddata->timeout.tv_usec = (env->cfg->redis_timeout % 1000) * 1000;
for(i = 0; i < moddata->numctxs; i++)
moddata->ctxs[i] = redis_connect(moddata);
cachedb_env->backend_data = moddata;
if(env->cfg->redis_expire_records) {
redisReply* rep = NULL;
int redis_reply_type = 0;
/** check if setex command is supported */
rep = redis_command(env, cachedb_env,
"SETEX __UNBOUND_REDIS_CHECK__ 1 none", NULL, 0);
if(!rep) {
/** init failed, no response from redis server*/
log_err("redis_init: failed to init redis, the "
"redis-expire-records option requires the SETEX command "
"(redis >= 2.0.0)");
return 0;
}
redis_reply_type = rep->type;
freeReplyObject(rep);
switch(redis_reply_type) {
case REDIS_REPLY_STATUS:
break;
default:
/** init failed, setex command not supported */
log_err("redis_init: failed to init redis, the "
"redis-expire-records option requires the SETEX command "
"(redis >= 2.0.0)");
return 0;
}
}
return 1;
}
static void
redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
{
struct redis_moddata* moddata = (struct redis_moddata*)
cachedb_env->backend_data;
(void)env;
verbose(VERB_ALGO, "redis_deinit");
if(!moddata)
return;
if(moddata->ctxs) {
int i;
for(i = 0; i < moddata->numctxs; i++) {
if(moddata->ctxs[i])
redisFree(moddata->ctxs[i]);
}
free(moddata->ctxs);
}
free(moddata);
}
/*
* Send a redis command and get a reply. Unified so that it can be used for
* both SET and GET. If 'data' is non-NULL the command is supposed to be
* SET and GET otherwise, but the implementation of this function is agnostic
* about the semantics (except for logging): 'command', 'data', and 'data_len'
* are opaquely passed to redisCommand().
* This function first checks whether a connection with a redis server has
* been established; if not it tries to set up a new one.
* It returns redisReply returned from redisCommand() or NULL if some low
* level error happens. The caller is responsible to check the return value,
* if it's non-NULL, it has to free it with freeReplyObject().
*/
static redisReply*
redis_command(struct module_env* env, struct cachedb_env* cachedb_env,
const char* command, const uint8_t* data, size_t data_len)
{
redisContext* ctx;
redisReply* rep;
struct redis_moddata* d = (struct redis_moddata*)
cachedb_env->backend_data;
/* We assume env->alloc->thread_num is a unique ID for each thread
* in [0, num-of-threads). We could treat it as an error condition
* if the assumption didn't hold, but it seems to be a fundamental
* assumption throughout the unbound architecture, so we simply assert
* it. */
log_assert(env->alloc->thread_num < d->numctxs);
ctx = d->ctxs[env->alloc->thread_num];
/* If we've not established a connection to the server or we've closed
* it on a failure, try to re-establish a new one. Failures will be
* logged in redis_connect(). */
if(!ctx) {
ctx = redis_connect(d);
d->ctxs[env->alloc->thread_num] = ctx;
}
if(!ctx)
return NULL;
/* Send the command and get a reply, synchronously. */
rep = (redisReply*)redisCommand(ctx, command, data, data_len);
if(!rep) {
/* Once an error as a NULL-reply is returned the context cannot
* be reused and we'll need to set up a new connection. */
log_err("redis_command: failed to receive a reply, "
"closing connection: %s", ctx->errstr);
redisFree(ctx);
d->ctxs[env->alloc->thread_num] = NULL;
return NULL;
}
/* Check error in reply to unify logging in that case.
* The caller may perform context-dependent checks and logging. */
if(rep->type == REDIS_REPLY_ERROR)
log_err("redis: %s resulted in an error: %s",
data ? "set" : "get", rep->str);
return rep;
}
static int
redis_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
char* key, struct sldns_buffer* result_buffer)
{
redisReply* rep;
char cmdbuf[4+(CACHEDB_HASHSIZE/8)*2+1]; /* "GET " + key */
int n;
int ret = 0;
verbose(VERB_ALGO, "redis_lookup of %s", key);
n = snprintf(cmdbuf, sizeof(cmdbuf), "GET %s", key);
if(n < 0 || n >= (int)sizeof(cmdbuf)) {
log_err("redis_lookup: unexpected failure to build command");
return 0;
}
rep = redis_command(env, cachedb_env, cmdbuf, NULL, 0);
if(!rep)
return 0;
switch(rep->type) {
case REDIS_REPLY_NIL:
verbose(VERB_ALGO, "redis_lookup: no data cached");
break;
case REDIS_REPLY_STRING:
verbose(VERB_ALGO, "redis_lookup found %d bytes",
(int)rep->len);
if((size_t)rep->len > sldns_buffer_capacity(result_buffer)) {
log_err("redis_lookup: replied data too long: %lu",
(size_t)rep->len);
break;
}
sldns_buffer_clear(result_buffer);
sldns_buffer_write(result_buffer, rep->str, rep->len);
sldns_buffer_flip(result_buffer);
ret = 1;
break;
case REDIS_REPLY_ERROR:
break; /* already logged */
default:
log_err("redis_lookup: unexpected type of reply for (%d)",
rep->type);
break;
}
freeReplyObject(rep);
return ret;
}
static void
redis_store(struct module_env* env, struct cachedb_env* cachedb_env,
char* key, uint8_t* data, size_t data_len, time_t ttl)
{
redisReply* rep;
int n;
int set_ttl = (env->cfg->redis_expire_records &&
(!env->cfg->serve_expired || env->cfg->serve_expired_ttl > 0));
/* Supported commands:
* - "SET " + key + " %b"
* - "SETEX " + key + " " + ttl + " %b"
*/
char cmdbuf[6+(CACHEDB_HASHSIZE/8)*2+11+3+1];
if (!set_ttl) {
verbose(VERB_ALGO, "redis_store %s (%d bytes)", key, (int)data_len);
/* build command to set to a binary safe string */
n = snprintf(cmdbuf, sizeof(cmdbuf), "SET %s %%b", key);
} else {
/* add expired ttl time to redis ttl to avoid premature eviction of key */
ttl += env->cfg->serve_expired_ttl;
verbose(VERB_ALGO, "redis_store %s (%d bytes) with ttl %u",
key, (int)data_len, (uint32_t)ttl);
/* build command to set to a binary safe string */
n = snprintf(cmdbuf, sizeof(cmdbuf), "SETEX %s %u %%b", key,
(uint32_t)ttl);
}
if(n < 0 || n >= (int)sizeof(cmdbuf)) {
log_err("redis_store: unexpected failure to build command");
return;
}
rep = redis_command(env, cachedb_env, cmdbuf, data, data_len);
if(rep) {
verbose(VERB_ALGO, "redis_store set completed");
if(rep->type != REDIS_REPLY_STATUS &&
rep->type != REDIS_REPLY_ERROR) {
log_err("redis_store: unexpected type of reply (%d)",
rep->type);
}
freeReplyObject(rep);
}
}
struct cachedb_backend redis_backend = { "redis",
redis_init, redis_deinit, redis_lookup, redis_store
};
#endif /* USE_REDIS */
#endif /* USE_CACHEDB */
+45
View File
@@ -0,0 +1,45 @@
/*
* cachedb/redis.h - cachedb redis module
*
* Copyright (c) 2018, 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 the redis database to cache
* dns responses.
*/
/** the redis backend definition, contains callable functions
* and name string */
extern struct cachedb_backend redis_backend;
+82
View File
@@ -0,0 +1,82 @@
/* 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
#ifdef ENABLE_LOCK_CHECKS
#undef ENABLE_LOCK_CHECKS
#endif
#include "util/locks.h"
void _ARC4_LOCK(void);
void _ARC4_UNLOCK(void);
#ifdef THREADS_DISABLED
void _ARC4_LOCK(void)
{
}
void _ARC4_UNLOCK(void)
{
}
void _ARC4_LOCK_DESTROY(void)
{
}
#else /* !THREADS_DISABLED */
static lock_quick_type 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);
}
void _ARC4_LOCK_DESTROY(void)
{
if(arc4lockinit) {
arc4lockinit = 0;
lock_quick_destroy(&arc4lock);
}
}
#endif /* THREADS_DISABLED */
+312
View File
@@ -0,0 +1,312 @@
/* $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)
#define REKEY_BASE (1024*1024) /* NB. should be a power of 2 */
/* 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);
/*
* Basic sanity checking; wish we could do better.
*/
static int
fallback_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;
}
/* fallback for getentropy in case libc returns failure */
static int
fallback_getentropy_urandom(void *buf, size_t len)
{
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
# ifdef HAVE_FCNTL
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
# endif
#endif
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 (fallback_gotdata(buf, len) == 0) {
errno = save_errno;
return 0; /* satisfied */
}
nodevrandom:
errno = EIO;
return -1;
}
static inline void
_rs_init(u_char *buf, size_t n)
{
assert(buf);
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];
uint32_t rekey_fuzz = 0;
if (getentropy(rnd, sizeof rnd) == -1) {
if(errno != ENOSYS ||
fallback_getentropy_urandom(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));
/* rekey interval should not be predictable */
chacha_encrypt_bytes(&rsx->rs_chacha, (uint8_t *)&rekey_fuzz,
(uint8_t *)&rekey_fuzz, sizeof(rekey_fuzz));
rs->rs_count = REKEY_BASE + (rekey_fuzz % REKEY_BASE);
}
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
}
}
+2 -2
View File
@@ -6,7 +6,7 @@
#include "util/locks.h"
/** the lock for ctime buffer */
static lock_basic_t ctime_lock;
static lock_basic_type ctime_lock;
/** has it been inited */
static int ctime_r_init = 0;
@@ -38,5 +38,5 @@ char *ctime_r(const time_t *timep, char *buf)
strcpy(buf, result);
}
lock_basic_unlock(&ctime_lock);
return result;
return buf;
}
+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);
+62
View File
@@ -0,0 +1,62 @@
/* $OpenBSD: getentropy_freebsd.c,v 1.3 2016/08/07 03:27:21 tb Exp $ */
/*
* Copyright (c) 2014 Pawel Jakub Dawidek <pjd@FreeBSD.org>
* Copyright (c) 2014 Brent Cook <bcook@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.
*
* Emulation of getentropy(2) as documented at:
* http://man.openbsd.org/getentropy.2
*/
#include <sys/types.h>
#include <sys/sysctl.h>
#include <errno.h>
#include <stddef.h>
/*
* Derived from lib/libc/gen/arc4random.c from FreeBSD.
*/
static size_t
getentropy_sysctl(u_char *buf, size_t size)
{
int mib[2];
size_t len, done;
mib[0] = CTL_KERN;
mib[1] = KERN_ARND;
done = 0;
do {
len = size;
if (sysctl(mib, 2, buf, &len, NULL, 0) == -1)
return (done);
done += len;
buf += len;
size -= len;
} while (size > 0);
return (done);
}
int
getentropy(void *buf, size_t len)
{
if (len <= 256 && getentropy_sysctl(buf, len) == len)
return (0);
errno = EIO;
return (-1);
}
+539
View File
@@ -0,0 +1,539 @@
/* $OpenBSD: getentropy_linux.c,v 1.46 2018/11/20 08:04:28 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.
*
* Emulation of getentropy(2) as documented at:
* http://man.openbsd.org/getentropy.2
*/
#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 SYS__sysctl
#include <linux/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 <link.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#ifndef HAVE_NETTLE
#include <openssl/sha.h>
#else
#include <nettle/sha.h>
#define SHA512_CTX struct sha512_ctx
#define SHA512_Init(x) sha512_init(x)
#define SHA512_Update(x, b, s) sha512_update(x, s, b)
#define SHA512_Final(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r)
#endif
#include <linux/types.h>
#include <linux/random.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)
#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);
#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
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);
static int getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data);
int
getentropy(void *buf, size_t len)
{
int ret = -1;
if (len > 256) {
errno = EIO;
return (-1);
}
#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
/*
* Try descriptor-less getrandom(), in non-blocking mode.
*
* The design of Linux getrandom is broken. It has an
* uninitialized phase coupled with blocking behaviour, which
* is unacceptable from within a library at boot time without
* possible recovery. See http://bugs.python.org/issue26839#msg267745
*/
ret = getentropy_getrandom(buf, len);
if (ret != -1)
return (ret);
#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
* still 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);
}
#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
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, GRND_NONBLOCK);
} 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);
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;
}
errno = save_errno;
return (0); /* satisfied */
sysctlfailed:
errno = EIO;
return (-1);
}
#endif /* SYS__sysctl */
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_phdr(struct dl_phdr_info *info, size_t ATTR_UNUSED(size), void *data)
{
SHA512_CTX *ctx = data;
SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr));
return (0);
}
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;
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;
}
dl_iterate_phdr(getentropy_phdr, &ctx);
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);
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
SHA512_Final(results, &ctx);
memcpy((char *)buf + i, results, min(sizeof(results), len - i));
i += min(sizeof(results), len - i);
}
explicit_bzero(&ctx, sizeof ctx);
explicit_bzero(results, sizeof results);
errno = save_errno;
return (0); /* satisfied */
}
+417
View File
@@ -0,0 +1,417 @@
/* $OpenBSD: getentropy_osx.c,v 1.12 2018/11/20 08:04:28 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.
*
* Emulation of getentropy(2) as documented at:
* http://man.openbsd.org/getentropy.2
*/
#include <TargetConditionals.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>
#if TARGET_OS_OSX
#include <sys/socketvar.h>
#include <sys/vmmeter.h>
#endif
#include <netinet/in.h>
#include <netinet/tcp.h>
#if TARGET_OS_OSX
#include <netinet/udp.h>
#include <netinet/ip_var.h>
#include <netinet/tcp_var.h>
#include <netinet/udp_var.h>
#endif
#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);
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);
}
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);
errno = save_errno;
return (0); /* satisfied */
nodevrandom:
errno = EIO;
return (-1);
}
#if TARGET_OS_OSX
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 };
#endif
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;
#if TARGET_OS_OSX
struct tcpstat tcpstat;
struct udpstat udpstat;
struct ipstat ipstat;
#endif
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);
#if TARGET_OS_OSX
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);
#endif
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);
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);
}
explicit_bzero(&ctx, sizeof ctx);
explicit_bzero(results, sizeof results);
errno = save_errno;
return (0); /* satisfied */
}
+441
View File
@@ -0,0 +1,441 @@
/* $OpenBSD: getentropy_solaris.c,v 1.4 2014/07/12 20:41:47 wouter 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;
}
+59
View File
@@ -0,0 +1,59 @@
/* $OpenBSD: getentropy_win.c,v 1.5 2016/08/07 03:27:21 tb 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.
*
* Emulation of getentropy(2) as documented at:
* http://man.openbsd.org/getentropy.2
*/
#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');
}
+5
View File
@@ -5,7 +5,12 @@
#undef malloc
#include <sys/types.h>
#ifndef USE_WINSOCK
void *malloc ();
#else
/* provide a prototype */
void *malloc (size_t n);
#endif
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
+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;
}
+1032 -784
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 */
+5 -7
View File
@@ -89,7 +89,7 @@ str2int(const char **buf, int max)
{
int ret=0, count=0;
while (*buf[0] != '\0' && isdigit(*buf[0]) && count<max) {
while (*buf[0] != '\0' && isdigit((unsigned char)*buf[0]) && count<max) {
ret = ret*10 + (*buf[0] - '0');
(*buf)++;
count++;
@@ -106,18 +106,16 @@ str2int(const char **buf, int max)
char *
unbound_strptime(const char *s, const char *format, struct tm *tm)
{
int c, alt_format, ret;
int c, ret;
int split_year = 0;
while ((c = *format) != '\0') {
alt_format = 0;
/* whitespace, literal or format */
if (isspace(c)) { /* whitespace */
if (isspace((unsigned char)c)) { /* whitespace */
/** whitespace matches zero or more whitespace characters in the
* input string.
**/
while (isspace(*s))
while (isspace((unsigned char)*s))
s++;
}
else if (c == '%') { /* format */
@@ -223,7 +221,7 @@ unbound_strptime(const char *s, const char *format, struct tm *tm)
break;
case 'n': /* arbitrary whitespace */
case 't':
while (isspace(*s))
while (isspace((unsigned char)*s))
s++;
break;
case 'p': /* am pm */
+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;
}
+670 -504
View File
File diff suppressed because it is too large Load Diff
+609 -36
View File
@@ -1,20 +1,26 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* apply the noreturn attribute to a function that exits the program */
#undef ATTR_NORETURN
/* apply the weak attribute to a symbol */
#undef ATTR_WEAK
/* Directory to chroot to */
#undef CHROOT_DIR
/* Define this to enable client subnet option. */
#undef CLIENT_SUBNET
/* Do sha512 definitions in config.h */
#undef COMPAT_SHA512
/* Command line arguments used with configure */
#undef CONFCMDLINE
/* Pathname to the Unbound configuration file */
#undef CONFIGFILE
/* configure flags */
#undef CONFIGURE_BUILD_WITH
/* configure date */
#undef CONFIGURE_DATE
/* configure target system */
#undef CONFIGURE_TARGET
/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
*/
#undef DARWIN_BROKEN_SETREUID
@@ -22,30 +28,125 @@
/* Whether daemon is deprecated */
#undef DEPRECATED_DAEMON
/* Deprecate RSA 1024 bit length, makes that an unsupported key */
#undef DEPRECATE_RSA_1024
/* Define this to enable kernel based UDP source port randomization. */
#undef DISABLE_EXPLICIT_PORT_RANDOMISATION
/* default dnstap socket path */
#undef DNSTAP_SOCKET_PATH
/* Define if you want to use debug lock checking (slow). */
#undef ENABLE_LOCK_CHECKS
/* Define this if you enabled-allsymbols from libunbound to link binaries to
it for smaller install size, but the libunbound export table is polluted by
internal symbols */
#undef EXPORT_ALL_SYMBOLS
/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4
/* Define to 1 if you have the `arc4random' function. */
#undef HAVE_ARC4RANDOM
/* Define to 1 if you have the `arc4random_uniform' function. */
#undef HAVE_ARC4RANDOM_UNIFORM
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Whether the C compiler accepts the "format" attribute */
#undef HAVE_ATTR_FORMAT
/* Whether the C compiler accepts the "noreturn" attribute */
#undef HAVE_ATTR_NORETURN
/* Whether the C compiler accepts the "unused" attribute */
#undef HAVE_ATTR_UNUSED
/* Define to 1 if your system has a working `chown' function. */
/* Whether the C compiler accepts the "weak" attribute */
#undef HAVE_ATTR_WEAK
/* If we have be64toh */
#undef HAVE_BE64TOH
/* Define to 1 if you have the `BIO_set_callback_ex' function. */
#undef HAVE_BIO_SET_CALLBACK_EX
/* Define to 1 if you have the <bsd/stdlib.h> header file. */
#undef HAVE_BSD_STDLIB_H
/* Define to 1 if you have the <bsd/string.h> header file. */
#undef HAVE_BSD_STRING_H
/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN
/* Define to 1 if you have the `chroot' function. */
#undef HAVE_CHROOT
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
#undef HAVE_CRYPTO_THREADID_SET_CALLBACK
/* Define to 1 if you have the `ctime_r' function. */
#undef HAVE_CTIME_R
/* Define to 1 if you have the `daemon' function. */
#undef HAVE_DAEMON
/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
don't. */
#undef HAVE_DECL_ARC4RANDOM
/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
if you don't. */
#undef HAVE_DECL_ARC4RANDOM_UNIFORM
/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
you don't. */
#undef HAVE_DECL_EVSIGNAL_ASSIGN
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#undef HAVE_DECL_INET_NTOP
/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
don't. */
#undef HAVE_DECL_INET_PTON
/* Define to 1 if you have the declaration of `nghttp2_session_server_new',
and to 0 if you don't. */
#undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW
/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
don't. */
#undef HAVE_DECL_NID_ED25519
/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
don't. */
#undef HAVE_DECL_NID_ED448
/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
don't. */
#undef HAVE_DECL_NID_SECP384R1
/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
if you don't. */
#undef HAVE_DECL_NID_X9_62_PRIME256V1
/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
don't. */
#undef HAVE_DECL_REALLOCARRAY
/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
don't. */
#undef HAVE_DECL_REDISCONNECT
/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
if you don't. */
#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
@@ -54,9 +155,52 @@
`SSL_COMP_get_compression_methods', and to 0 if you don't. */
#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
0 if you don't. */
#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
don't. */
#undef HAVE_DECL_STRLCAT
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
don't. */
#undef HAVE_DECL_STRLCPY
/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
you don't. */
#undef HAVE_DECL_XML_STOPPARSER
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `DSA_SIG_set0' function. */
#undef HAVE_DSA_SIG_SET0
/* Define to 1 if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H
/* Define to 1 if you have the `endprotoent' function. */
#undef HAVE_ENDPROTOENT
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
/* Define to 1 if you have the `endservent' function. */
#undef HAVE_ENDSERVENT
/* Define to 1 if you have the `ENGINE_cleanup' function. */
#undef HAVE_ENGINE_CLEANUP
/* Define to 1 if you have the `ERR_free_strings' function. */
#undef HAVE_ERR_FREE_STRINGS
/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
#undef HAVE_ERR_LOAD_CRYPTO_STRINGS
/* Define to 1 if you have the `event_assign' function. */
#undef HAVE_EVENT_ASSIGN
/* Define to 1 if you have the `event_base_free' function. */
#undef HAVE_EVENT_BASE_FREE
@@ -72,6 +216,31 @@
/* Define to 1 if you have the <event.h> header file. */
#undef HAVE_EVENT_H
/* Define to 1 if you have the `EVP_aes_256_cbc' function. */
#undef HAVE_EVP_AES_256_CBC
/* Define to 1 if you have the `EVP_cleanup' function. */
#undef HAVE_EVP_CLEANUP
/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled'
function. */
#undef HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED
/* Define to 1 if you have the `EVP_DigestVerify' function. */
#undef HAVE_EVP_DIGESTVERIFY
/* Define to 1 if you have the `EVP_dss1' function. */
#undef HAVE_EVP_DSS1
/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
#undef HAVE_EVP_ENCRYPTINIT_EX
/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */
#undef HAVE_EVP_MAC_CTX_SET_PARAMS
/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
#undef HAVE_EVP_MD_CTX_NEW
/* Define to 1 if you have the `EVP_sha1' function. */
#undef HAVE_EVP_SHA1
@@ -90,18 +259,36 @@
/* Define to 1 if you have the <expat.h> header file. */
#undef HAVE_EXPAT_H
/* Define to 1 if you have the `explicit_bzero' function. */
#undef HAVE_EXPLICIT_BZERO
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
/* Define to 1 if you have the `FIPS_mode' function. */
#undef HAVE_FIPS_MODE
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the `fsync' function. */
#undef HAVE_FSYNC
/* Whether getaddrinfo is available */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
/* Define to 1 if you have the `getentropy' function. */
#undef HAVE_GETENTROPY
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
@@ -111,6 +298,9 @@
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
/* Define to 1 if you have the `gettid' function. */
#undef HAVE_GETTID
/* Define to 1 if you have the `glob' function. */
#undef HAVE_GLOB
@@ -123,8 +313,20 @@
/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* If you have HMAC_CTX_init */
#undef HAVE_HMAC_CTX_INIT
/* Define to 1 if you have the <hiredis/hiredis.h> header file. */
#undef HAVE_HIREDIS_HIREDIS_H
/* Define to 1 if you have the `HMAC_Init_ex' function. */
#undef HAVE_HMAC_INIT_EX
/* If we have htobe64 */
#undef HAVE_HTOBE64
/* Define to 1 if you have the <ifaddrs.h> header file. */
#undef HAVE_IFADDRS_H
/* Define to 1 if you have the `if_nametoindex' function. */
#undef HAVE_IF_NAMETOINDEX
/* Define to 1 if you have the `inet_aton' function. */
#undef HAVE_INET_ATON
@@ -147,17 +349,20 @@
/* Define to 1 if you have the <iphlpapi.h> header file. */
#undef HAVE_IPHLPAPI_H
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
/* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */
#undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST
/* Use portable libbsd functions */
#undef HAVE_LIBBSD
/* Define to 1 if you have the <ldns/ldns.h> header file. */
#undef HAVE_LDNS_LDNS_H
/* Define to 1 if you have the <libkern/OSByteOrder.h> header file. */
#undef HAVE_LIBKERN_OSBYTEORDER_H
/* Define to 1 if you have the `ldns' library (-lldns). */
#undef HAVE_LIBLDNS
/* Define if we have LibreSSL */
#undef HAVE_LIBRESSL
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
@@ -165,8 +370,7 @@
/* Define to 1 if you have the <login_cap.h> header file. */
#undef HAVE_LOGIN_CAP_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
/* If have GNU libc compatible malloc */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memmove' function. */
@@ -181,27 +385,93 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
/* Define to 1 if you have the <netioapi.h> header file. */
#undef HAVE_NETIOAPI_H
/* Use libnettle for crypto */
#undef HAVE_NETTLE
/* Define to 1 if you have the <nettle/dsa-compat.h> header file. */
#undef HAVE_NETTLE_DSA_COMPAT_H
/* Define to 1 if you have the <nettle/eddsa.h> header file. */
#undef HAVE_NETTLE_EDDSA_H
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define this to use nghttp2 client. */
#undef HAVE_NGHTTP2
/* Define to 1 if you have the <nghttp2/nghttp2.h> header file. */
#undef HAVE_NGHTTP2_NGHTTP2_H
/* Use libnss for crypto */
#undef HAVE_NSS
/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
#undef HAVE_OPENSSL_ADD_ALL_DIGESTS
/* Define to 1 if you have the <openssl/bn.h> header file. */
#undef HAVE_OPENSSL_BN_H
/* Define to 1 if you have the `OPENSSL_config' function. */
#undef HAVE_OPENSSL_CONFIG
/* Define to 1 if you have the <openssl/conf.h> header file. */
#undef HAVE_OPENSSL_CONF_H
/* Define to 1 if you have the <openssl/core_names.h> header file. */
#undef HAVE_OPENSSL_CORE_NAMES_H
/* Define to 1 if you have the <openssl/dh.h> header file. */
#undef HAVE_OPENSSL_DH_H
/* Define to 1 if you have the <openssl/dsa.h> header file. */
#undef HAVE_OPENSSL_DSA_H
/* Define to 1 if you have the <openssl/engine.h> header file. */
#undef HAVE_OPENSSL_ENGINE_H
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
#undef HAVE_OPENSSL_INIT_CRYPTO
/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
#undef HAVE_OPENSSL_INIT_SSL
/* Define to 1 if you have the <openssl/param_build.h> header file. */
#undef HAVE_OPENSSL_PARAM_BUILD_H
/* Define to 1 if you have the <openssl/rand.h> header file. */
#undef HAVE_OPENSSL_RAND_H
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#undef HAVE_OPENSSL_RSA_H
/* Define to 1 if you have the <openssl/ssl.h> header file. */
#undef HAVE_OPENSSL_SSL_H
/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
#undef HAVE_OSSL_PARAM_BLD_NEW
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
/* Define to 1 if the system has the type `pthread_rwlock_t'. */
#undef HAVE_PTHREAD_RWLOCK_T
@@ -217,12 +487,15 @@
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
/* Define to 1 if you have the `RAND_cleanup' function. */
#undef HAVE_RAND_CLEANUP
/* If we have reallocarray(3) */
#undef HAVE_REALLOCARRAY
/* Define to 1 if you have the `recvmsg' function. */
#undef HAVE_RECVMSG
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
/* Define to 1 if you have the `sendmsg' function. */
#undef HAVE_SENDMSG
@@ -247,6 +520,12 @@
/* Define to 1 if you have the `setusercontext' function. */
#undef HAVE_SETUSERCONTEXT
/* Define to 1 if you have the `SHA512_Update' function. */
#undef HAVE_SHA512_UPDATE
/* Define to 1 if you have the `shmget' function. */
#undef HAVE_SHMGET
/* Define to 1 if you have the `sigprocmask' function. */
#undef HAVE_SIGPROCMASK
@@ -268,6 +547,34 @@
/* Define if you have the SSL libraries installed. */
#undef HAVE_SSL
/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
#undef HAVE_SSL_CTX_SET_ALPN_PROTOS
/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
#undef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
#undef HAVE_SSL_CTX_SET_CIPHERSUITES
/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
function. */
#undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB
/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
#undef HAVE_SSL_GET0_ALPN_SELECTED
/* Define to 1 if you have the `SSL_get0_peername' function. */
#undef HAVE_SSL_GET0_PEERNAME
/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
#undef HAVE_SSL_GET1_PEER_CERTIFICATE
/* Define to 1 if you have the `SSL_set1_host' function. */
#undef HAVE_SSL_SET1_HOST
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@@ -289,39 +596,78 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strlcat' function. */
#undef HAVE_STRLCAT
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strptime' function. */
#undef HAVE_STRPTIME
/* Define to 1 if you have the `strsep' function. */
#undef HAVE_STRSEP
/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
/* Define if you have Swig libraries and header files. */
#undef HAVE_SWIG
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
/* Define to 1 if systemd should be used */
#undef HAVE_SYSTEMD
/* Define to 1 if you have the <sys/endian.h> header file. */
#undef HAVE_SYS_ENDIAN_H
/* Define to 1 if you have the <sys/ipc.h> header file. */
#undef HAVE_SYS_IPC_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/sha2.h> header file. */
#undef HAVE_SYS_SHA2_H
/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#undef HAVE_SYS_SYSCTL_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H
/* Define to 1 if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <TargetConditionals.h> header file. */
#undef HAVE_TARGETCONDITIONALS_H
/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
@@ -361,14 +707,19 @@
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
#undef HAVE_X509_VERIFY_PARAM_SET1_HOST
/* Define to 1 if you have the `_beginthreadex' function. */
#undef HAVE__BEGINTHREADEX
/* If HMAC_Init_ex() returns void */
#undef HMAC_INIT_EX_RETURNS_VOID
/* if lex has yylex_destroy */
#undef LEX_HAS_YYLEX_DESTROY
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Define to the maximum message length to pass to syslog. */
@@ -390,6 +741,9 @@
/* Put -D_BSD_SOURCE define in config.h */
#undef OMITTED__D_BSD_SOURCE
/* Put -D_DEFAULT_SOURCE define in config.h */
#undef OMITTED__D_DEFAULT_SOURCE
/* Put -D_GNU_SOURCE define in config.h */
#undef OMITTED__D_GNU_SOURCE
@@ -433,9 +787,13 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define as the return type of signal handlers (`int' or `void'). */
/* Return type of signal handlers, but autoconf 2.70 says 'your code may
safely assume C89 semantics that RETSIGTYPE is void.' */
#undef RETSIGTYPE
/* if REUSEPORT is enabled by default */
#undef REUSEPORT_DEFAULT
/* default rootkey location */
#undef ROOT_ANCHOR_FILE
@@ -451,6 +809,24 @@
/* Shared data */
#undef SHARE_DIR
/* The size of `pthread_t', as computed by sizeof. */
#undef SIZEOF_PTHREAD_T
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `time_t', as computed by sizeof. */
#undef SIZEOF_TIME_T
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* define if (v)snprintf does not return length needed, (but length used) */
#undef SNPRINTF_RET_BROKEN
/* Define to 1 if libsodium supports sodium_set_misuse_handler */
#undef SODIUM_MISUSE_HANDLER
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -460,6 +836,9 @@
/* Use win32 resources and API */
#undef UB_ON_WINDOWS
/* the SYSLOG_FACILITY to use, default LOG_DAEMON */
#undef UB_SYSLOG_FACILITY
/* default username */
#undef UB_USERNAME
@@ -475,12 +854,68 @@
/* define this to enable debug checks. */
#undef UNBOUND_DEBUG
/* Define to 1 to use cachedb support */
#undef USE_CACHEDB
/* Define to 1 to enable dnscrypt support */
#undef USE_DNSCRYPT
/* Define to 1 to enable dnscrypt with xchacha20 support */
#undef USE_DNSCRYPT_XCHACHA20
/* Define to 1 to enable dnstap support */
#undef USE_DNSTAP
/* Define this to enable DSA support. */
#undef USE_DSA
/* Define this to enable ECDSA support. */
#undef USE_ECDSA
/* Define this to enable an EVP workaround for older openssl */
#undef USE_ECDSA_EVP_WORKAROUND
/* Define this to enable ED25519 support. */
#undef USE_ED25519
/* Define this to enable ED448 support. */
#undef USE_ED448
/* Define this to enable GOST support. */
#undef USE_GOST
/* Define to 1 to use ipsecmod support. */
#undef USE_IPSECMOD
/* Define to 1 to use ipset support */
#undef USE_IPSET
/* Define if you enable libevent */
#undef USE_LIBEVENT
/* Define this to enable use of /proc/sys/net/ipv4/ip_local_port_range as a
default outgoing port range. This is only for the libunbound on Linux and
does not affect unbound resolving daemon itself. This may severely limit
the number of available outgoing ports and thus decrease randomness. Define
this only when the target system restricts (e.g. some of SELinux enabled
distributions) the use of non-ephemeral ports. */
#undef USE_LINUX_IP_LOCAL_PORT_RANGE
/* Define if you want to use internal select based events */
#undef USE_MINI_EVENT
/* Define this to enable client TCP Fast Open. */
#undef USE_MSG_FASTOPEN
/* Define this to enable client TCP Fast Open. */
#undef USE_OSX_MSG_FASTOPEN
/* Define this to use hiredis client. */
#undef USE_REDIS
/* Define this to enable SHA1 support. */
#undef USE_SHA1
/* Define this to enable SHA256 and SHA512 support. */
#undef USE_SHA2
@@ -506,12 +941,18 @@
#endif
/* Define this to enable server TCP Fast Open. */
#undef USE_TCP_FASTOPEN
/* Whether the windows socket API is used */
#undef USE_WINSOCK
/* the version of the windows API enabled */
#undef WINVER
/* Define if you want dynlib module. */
#undef WITH_DYNLIBMODULE
/* Define if you want Python module. */
#undef WITH_PYTHONMODULE
@@ -522,6 +963,11 @@
`char[]'. */
#undef YYTEXT_POINTER
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -534,6 +980,9 @@
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Enable for compile on Minix */
#undef _NETBSD_SOURCE
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
@@ -541,6 +990,10 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* defined to use gcc ansi snprintf and sscanf that understands %lld when
compiled for windows. */
#undef __USE_MINGW_ANSI_STDIO
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -621,6 +1074,10 @@
#define _BSD_SOURCE 1
#endif
#if defined(OMITTED__D_DEFAULT_SOURCE) && !defined(_DEFAULT_SOURCE)
#define _DEFAULT_SOURCE 1
#endif
#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
#define __EXTENSIONS__ 1
#endif
@@ -648,8 +1105,20 @@
#ifndef _OPENBSD_SOURCE
#define _OPENBSD_SOURCE 1
#endif
#ifndef UNBOUND_DEBUG
# ifndef NDEBUG
# define NDEBUG
# endif
#endif
/** Use small-ldns codebase */
#define USE_SLDNS 1
#ifdef HAVE_SSL
# define LDNS_BUILD_CONFIG_HAVE_SSL 1
#endif
#include <stdio.h>
@@ -662,6 +1131,10 @@
#include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
@@ -684,6 +1157,10 @@
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -696,6 +1173,16 @@
#include <ws2tcpip.h>
#endif
#if !defined(USE_WINSOCK) || !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN) || defined(__USE_MINGW_ANSI_STDIO)
#define ARG_LL "%ll"
#else
#define ARG_LL "%I64"
#endif
#ifndef AF_LOCAL
#define AF_LOCAL AF_UNIX
#endif
#ifdef HAVE_ATTR_FORMAT
@@ -727,15 +1214,13 @@
#define MAXHOSTNAMELEN 256
#endif
#ifndef HAVE_SNPRINTF
#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
#define snprintf snprintf_unbound
#define vsnprintf vsnprintf_unbound
#include <stdarg.h>
int snprintf (char *str, size_t count, const char *fmt, ...);
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif /* HAVE_SNPRINTF */
#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
#ifndef HAVE_INET_PTON
#define inet_pton inet_pton_unbound
@@ -761,6 +1246,12 @@ void *memmove(void *dest, const void *src, size_t n);
#endif
#ifndef HAVE_STRLCAT
#define strlcat strlcat_unbound
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_STRLCPY
#define strlcpy strlcpy_unbound
size_t strlcpy(char *dst, const char *src, size_t siz);
@@ -773,7 +1264,13 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
#ifndef HAVE_SLEEP
#ifndef HAVE_REALLOCARRAY
#define reallocarray reallocarrayunbound
void* reallocarray(void *ptr, size_t nmemb, size_t size);
#endif
#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
@@ -807,9 +1304,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#ifdef MEMCMP_IS_BROKEN
# ifdef memcmp
# undef memcmp
# endif
#include "compat/memcmp.h"
#define memcmp memcmp_unbound
int memcmp(const void *x, const void *y, size_t n);
#endif
@@ -821,12 +1316,88 @@ int memcmp(const void *x, const void *y, size_t n);
char *ctime_r(const time_t *timep, char *buf);
#endif
#ifndef HAVE_STRSEP
#define strsep unbound_strsep
char *strsep(char **stringp, const char *delim);
#endif
#ifndef HAVE_ISBLANK
#define isblank unbound_isblank
int isblank(int c);
#endif
#ifndef HAVE_EXPLICIT_BZERO
#define explicit_bzero unbound_explicit_bzero
void explicit_bzero(void* buf, size_t len);
#endif
#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
int inet_pton(int af, const char* src, void* dst);
#endif
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
#define strptime unbound_strptime
struct tm;
char *strptime(const char *s, const char *format, struct tm *tm);
#endif
#if !HAVE_DECL_REALLOCARRAY
void *reallocarray(void *ptr, size_t nmemb, size_t size);
#endif
#ifdef HAVE_LIBBSD
#include <bsd/string.h>
#include <bsd/stdlib.h>
#endif
#ifdef HAVE_LIBRESSL
# if !HAVE_DECL_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t siz);
# endif
# if !HAVE_DECL_STRLCAT
size_t strlcat(char *dst, const char *src, size_t siz);
# endif
# if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
uint32_t arc4random(void);
# endif
# if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
uint32_t arc4random_uniform(uint32_t upper_bound);
# endif
#endif /* HAVE_LIBRESSL */
#ifndef HAVE_ARC4RANDOM
int getentropy(void* buf, size_t len);
uint32_t arc4random(void);
void arc4random_buf(void* buf, size_t n);
void _ARC4_LOCK(void);
void _ARC4_UNLOCK(void);
void _ARC4_LOCK_DESTROY(void);
#endif
#ifndef HAVE_ARC4RANDOM_UNIFORM
uint32_t arc4random_uniform(uint32_t upper_bound);
#endif
#ifdef COMPAT_SHA512
#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 /* SHA512_DIGEST_LENGTH */
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);
#endif /* COMPAT_SHA512 */
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1
@@ -841,8 +1412,6 @@ char *strptime(const char *s, const char *format, struct tm *tm);
# endif
#endif /* CHECKED_INET6 */
/* maximum nesting of included files */
#define MAXINCLUDES 10
#ifndef HAVE_GETADDRINFO
struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
@@ -871,6 +1440,10 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
/** default port for DNS traffic. */
#define UNBOUND_DNS_PORT 53
/** default port for DNS over TLS traffic. */
#define UNBOUND_DNS_OVER_TLS_PORT 853
/** default port for DNS over HTTPS traffic. */
#define UNBOUND_DNS_OVER_HTTPS_PORT 443
/** default port for unbound control traffic, registered port with IANA,
ub-dns-control 8953/tcp unbound dns nameserver control */
#define UNBOUND_CONTROL_PORT 8953
Vendored
+1408 -1320
View File
File diff suppressed because it is too large Load Diff
Vendored
+7703 -2600
View File
File diff suppressed because it is too large Load Diff
+1576 -234
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
FROM gcc:latest
WORKDIR /usr/src/unbound
RUN apt-get update
# install semantic parser & lexical analyzer
RUN apt-get install -y bison flex
# install packages used in tests
RUN apt-get install -y ldnsutils dnsutils xxd splint doxygen netcat
# accept short rsa keys, which are used in tests
RUN sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
CMD ["/bin/bash"]
+40
View File
@@ -15,3 +15,43 @@ distribution but may be helpful.
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_smf23.tar.gz: Solaris SMF installation/removal scripts.
Contributed by Yuri Voinov.
* unbound.socket and unbound.service: systemd files for unbound, install them
in /usr/lib/systemd/system. Contributed by Sami Kerola and Pavel Odintsov.
* unbound_portable.service.in: systemd file for use unbound as portable service,
see comments in the file. Contributed by Frzk.
* redirect-bogus.patch: Return configured address for bogus A and AAAA answers,
instead of SERVFAIL. Contributed by SIDN.
* fastrpz.patch: fastrpz support from Farsight Security.
* libunbound.so.conf: ltrace.conf file, see ltrace.conf(5), for libunbound.
* unbound-querycachedb.py: utility to show data stored in cachedb backend
for a particular query name and type. It requires dnspython and (for
redis backend) redis Python modules.
* unbound-fuzzme.patch: adds unbound-fuzzme program that parses a packet from
stdin. Used with fuzzers, patch from Jacob Hoffman-Andrews.
* unbound-fuzzers.tar.bz2: three programs for fuzzing, that are 1:1
replacements for unbound-fuzzme.c that gets created after applying
the contrib/unbound-fuzzme.patch. They are contributed by
Eric Sesterhenn from X41 D-Sec.
* drop-tld.diff: adds option drop-tld: yesno that drops 2 label queries,
to stop random floods. Apply with patch -p1 < contrib/drop-tld.diff and
compile. From Saksham Manchanda (Secure64). Please note that we think
this will drop DNSKEY and DS lookups for tlds and hence break DNSSEC
lookups for downstream clients.
* drop2rpz: perl script that converts the Spamhaus DROP-List in RPZ-Format,
contributed by Andreas Schulze.
* metrics.awk: awk script that can convert unbound-control stats to
Prometheus metrics format output.
+413
View File
@@ -0,0 +1,413 @@
diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in
index 5a75e319..c6c6dbe2 100644
--- a/doc/unbound.conf.5.in
+++ b/doc/unbound.conf.5.in
@@ -970,6 +970,13 @@ potentially broken nameservers. A lot of domains will not be resolvable when
this option in enabled. Only use if you know what you are doing.
This option only has effect when qname-minimisation is enabled. Default is no.
.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 aggressive\-nsec: \fI<yes or no>
Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
and other denials, using information from previous NXDOMAINs answers.
diff --git a/iterator/iter_scrub.c b/iterator/iter_scrub.c
index f093c1bf..e55a2246 100644
--- a/iterator/iter_scrub.c
+++ b/iterator/iter_scrub.c
@@ -679,6 +679,32 @@ static int sanitize_nsec_is_overreach(sldns_buffer* pkt,
return 0;
}
+/**
+ * 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
@@ -698,6 +724,7 @@ scrub_sanitize(sldns_buffer* pkt, struct msg_parse* msg,
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;
@@ -733,6 +760,13 @@ scrub_sanitize(sldns_buffer* pkt, struct msg_parse* msg,
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
@@ -744,6 +778,24 @@ scrub_sanitize(sldns_buffer* pkt, struct msg_parse* msg,
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)) {
diff --git a/iterator/iter_utils.c b/iterator/iter_utils.c
index 2482a1f4..bd5ba243 100644
--- a/iterator/iter_utils.c
+++ b/iterator/iter_utils.c
@@ -177,6 +177,7 @@ iter_apply_cfg(struct iter_env* iter_env, struct config_file* cfg)
iter_env->supports_ipv6 = cfg->do_ip6;
iter_env->supports_ipv4 = cfg->do_ip4;
iter_env->outbound_msg_retry = cfg->outbound_msg_retry;
+ iter_env->aaaa_filter = cfg->aaaa_filter;
return 1;
}
diff --git a/iterator/iterator.c b/iterator/iterator.c
index 54006940..768fe202 100644
--- a/iterator/iterator.c
+++ b/iterator/iterator.c
@@ -2155,6 +2155,53 @@ processDSNSFind(struct module_qstate* qstate, struct iter_qstate* iq, int id)
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, 0)) {
+ 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
@@ -2216,6 +2263,13 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq,
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) {
@@ -3648,6 +3702,61 @@ processFinished(struct module_qstate* qstate, struct iter_qstate* iq,
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 interested super querystates.
*
@@ -3667,6 +3776,9 @@ iter_inform_super(struct module_qstate* qstate, int id,
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)
@@ -3704,6 +3816,9 @@ iter_handle(struct module_qstate* qstate, struct iter_qstate* iq,
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;
@@ -4040,6 +4155,8 @@ iter_state_to_string(enum iter_state state)
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 :
@@ -4064,6 +4181,7 @@ iter_state_is_responsestate(enum iter_state s)
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;
diff --git a/iterator/iterator.h b/iterator/iterator.h
index 8b840528..a61c4195 100644
--- a/iterator/iterator.h
+++ b/iterator/iterator.h
@@ -133,6 +133,9 @@ struct iter_env {
*/
int* target_fetch_policy;
+ /** ASN: AAAA-filter flag */
+ int aaaa_filter;
+
/** lock on ratelimit counter */
lock_basic_type queries_ratelimit_lock;
/** number of queries that have been ratelimited */
@@ -187,6 +190,14 @@ enum iter_state {
*/
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.
@@ -376,6 +387,13 @@ struct iter_qstate {
*/
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;
diff --git a/pythonmod/interface.i b/pythonmod/interface.i
index 1ca8686a..d91b19ec 100644
--- a/pythonmod/interface.i
+++ b/pythonmod/interface.i
@@ -995,6 +995,7 @@ struct config_file {
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;
diff --git a/util/config_file.c b/util/config_file.c
index 969d664b..8d94b008 100644
--- a/util/config_file.c
+++ b/util/config_file.c
@@ -231,6 +231,7 @@ config_create(void)
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;
diff --git a/util/config_file.h b/util/config_file.h
index c7c9a0a4..e3aa15b0 100644
--- a/util/config_file.h
+++ b/util/config_file.h
@@ -285,6 +285,8 @@ struct config_file {
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 */
diff --git a/util/configlexer.lex b/util/configlexer.lex
index 34a0e5dd..c890be2a 100644
--- a/util/configlexer.lex
+++ b/util/configlexer.lex
@@ -317,6 +317,7 @@ use-caps-for-id{COLON} { YDVAR(1, VAR_USE_CAPS_FOR_ID) }
caps-whitelist{COLON} { YDVAR(1, VAR_CAPS_WHITELIST) }
caps-exempt{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) }
diff --git a/util/configparser.y b/util/configparser.y
index d4f965f9..8cc237c6 100644
--- a/util/configparser.y
+++ b/util/configparser.y
@@ -97,6 +97,7 @@ extern struct config_parser_state* cfg_parser;
%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
@@ -247,6 +248,7 @@ content_server: server_num_threads | server_verbosity | server_port |
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 |
@@ -1754,6 +1756,15 @@ server_caps_whitelist: VAR_CAPS_WHITELIST STRING_ARG
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));
+37
View File
@@ -0,0 +1,37 @@
#### Android...
#
# Heavily hacked 15-android.conf based on OpenSSL's config file of the same name.
# This 15-android.conf avoids compiler errors using NDK-r20. This 15-android.conf
# requires an environment set (sourced) using setenv-android.sh.
my %targets = (
"android" => {
inherit_from => [ "linux-generic32" ],
template => 1,
bin_cflags => add("-fPIE"),
bin_lflags => add("-pie"),
enable => [ ],
},
"android-arm" => {
inherit_from => [ "android", asm("armv4_asm") ],
bn_ops => [ "BN_LLONG", "RC4_CHAR" ],
},
"android-arm64" => {
inherit_from => [ "android", asm("aarch64_asm") ],
bn_ops => [ "SIXTY_FOUR_BIT_LONG", "RC4_CHAR" ],
perlasm_scheme => "linux64",
},
"android-x86" => {
inherit_from => [ "android", asm("x86_asm") ],
cflags => add(picker(release => "-fomit-frame-pointer")),
bn_ops => [ "BN_LLONG", "RC4_INT" ],
perlasm_scheme => "android",
},
"android-x86_64" => {
inherit_from => [ "android", asm("x86_64_asm") ],
bn_ops => [ "SIXTY_FOUR_BIT_LONG", "RC4_INT" ],
perlasm_scheme => "elf",
},
);
+51
View File
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
echo "Downloading Expat"
if ! curl -L -k -s -o expat-2.2.9.tar.gz https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.gz;
then
echo "Failed to download Expat"
exit 1
fi
echo "Unpacking Expat"
rm -rf ./expat-2.2.9
if ! tar -xf expat-2.2.9.tar.gz;
then
echo "Failed to unpack Expat"
exit 1
fi
cd expat-2.2.9 || exit 1
echo "Configuring Expat"
if ! ./configure --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" --prefix="$ANDROID_PREFIX"; then
echo "Error: Failed to configure Expat"
exit 1
fi
# Cleanup warnings, https://github.com/libexpat/libexpat/issues/383
echo "Fixing Makefiles"
(IFS="" find "$PWD" -name 'Makefile' -print | while read -r file
do
cp -p "$file" "$file.fixed"
sed 's|-Wduplicated-cond ||g; s|-Wduplicated-branches ||g; s|-Wlogical-op ||g' "$file" > "$file.fixed"
mv "$file.fixed" "$file"
cp -p "$file" "$file.fixed"
sed 's|-Wrestrict ||g; s|-Wjump-misses-init ||g; s|-Wmisleading-indentation ||g' "$file" > "$file.fixed"
mv "$file.fixed" "$file"
done)
echo "Building Expat"
if ! make; then
echo "Failed to build Expat"
exit 1
fi
echo "Installing Expat"
if ! make install; then
echo "Failed to install Expat"
exit 1
fi
exit 0
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
if [ -z "$ANDROID_SDK_ROOT" ]; then
echo "ERROR: ANDROID_SDK_ROOT is not a valid path. Please set it."
echo "SDK root is $ANDROID_SDK_ROOT"
exit 1
fi
if [ -z "$ANDROID_NDK_ROOT" ]; then
echo "ERROR: ANDROID_NDK_ROOT is not a valid path. Please set it."
echo "NDK root is $ANDROID_NDK_ROOT"
exit 1
fi
echo "Using ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT"
echo "Using ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT"
echo "Downloading SDK"
if ! curl -L -k -s -o "$HOME/android-sdk.zip" https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip;
then
echo "Failed to download SDK"
exit 1
fi
echo "Downloading NDK"
if ! curl -L -k -s -o "$HOME/android-ndk.zip" https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip;
then
echo "Failed to download NDK"
exit 1
fi
echo "Unpacking SDK to $ANDROID_SDK_ROOT"
if ! unzip -qq "$HOME/android-sdk.zip" -d "$ANDROID_SDK_ROOT";
then
echo "Failed to unpack SDK"
exit 1
fi
echo "Unpacking NDK to $ANDROID_NDK_ROOT"
if ! unzip -qq "$HOME/android-ndk.zip" -d "$HOME";
then
echo "Failed to unpack NDK"
exit 1
fi
if ! mv "$HOME/android-ndk-r20b" "$ANDROID_NDK_ROOT";
then
echo "Failed to move $HOME/android-ndk-r20b to $ANDROID_NDK_ROOT"
exit 1
fi
rm -f "$HOME/android-sdk.zip"
rm -f "$HOME/android-ndk.zip"
# https://stackoverflow.com/a/47028911/608639
touch "$ANDROID_SDK_ROOT/repositories.cfg"
echo "Finished installing SDK and NDK"
exit 0
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
echo "Downloading OpenSSL"
if ! curl -L -k -s -o openssl-1.1.1d.tar.gz https://www.openssl.org/source/openssl-1.1.1d.tar.gz;
then
echo "Failed to download OpenSSL"
exit 1
fi
echo "Unpacking OpenSSL"
rm -rf ./openssl-1.1.1d
if ! tar -xf openssl-1.1.1d.tar.gz;
then
echo "Failed to unpack OpenSSL"
exit 1
fi
cd openssl-1.1.1d || exit 1
if ! cp ../contrib/android/15-android.conf Configurations/; then
echo "Failed to copy OpenSSL Android config"
exit 1
fi
echo "Configuring OpenSSL"
if ! ./Configure "$OPENSSL_HOST" no-comp no-asm no-hw no-engine shared \
--prefix="$ANDROID_PREFIX" --openssldir="$ANDROID_PREFIX"; then
echo "Failed to configure OpenSSL"
exit 1
fi
echo "Building OpenSSL"
if ! make; then
echo "Failed to build OpenSSL"
exit 1
fi
echo "Installing OpenSSL"
if ! make install_sw; then
echo "Failed to install OpenSSL"
exit 1
fi
exit 0
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
# This step should install tools needed for all packages - OpenSSL, Expat and Unbound
echo "Updating tools"
sudo apt-get -qq update
sudo apt-get -qq install --no-install-recommends curl tar zip unzip perl openjdk-8-jdk autoconf automake libtool pkg-config
+203
View File
@@ -0,0 +1,203 @@
#!/usr/bin/env bash
# ====================================================================
# Sets the cross compile environment for Android
#
# Based upon OpenSSL's setenv-android.sh by TH, JW, and SM.
# Heavily modified by JWW for Crypto++.
# Updated by Skycoder42 for current recommendations for Android.
# Modified by JWW for Unbound.
# ====================================================================
#########################################
##### Some validation #####
#########################################
if [ -z "$ANDROID_API" ]; then
echo "ANDROID_API is not set. Please set it"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ -z "$ANDROID_CPU" ]; then
echo "ANDROID_CPU is not set. Please set it"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ ! -d "$ANDROID_NDK_ROOT" ]; then
echo "ERROR: ANDROID_NDK_ROOT is not a valid path. Please set it."
echo "NDK root is $ANDROID_NDK_ROOT"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# cryptest-android.sh may run this script without sourcing.
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "setenv-android.sh is usually sourced, but not this time."
fi
#####################################################################
# Need to set THIS_HOST to darwin-x86_64, linux-x86_64,
# windows, or windows-x86_64
if [[ "$(uname -s | grep -i -c darwin)" -ne 0 ]]; then
THIS_HOST=darwin-x86_64
elif [[ "$(uname -s | grep -i -c linux)" -ne 0 ]]; then
THIS_HOST=linux-x86_64
else
echo "ERROR: Unknown host"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
ANDROID_TOOLCHAIN="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$THIS_HOST/bin"
ANDROID_SYSROOT="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$THIS_HOST/sysroot"
# Error checking
if [ ! -d "$ANDROID_TOOLCHAIN" ]; then
echo "ERROR: ANDROID_TOOLCHAIN is not a valid path. Please set it."
echo "Path is $ANDROID_TOOLCHAIN"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -d "$ANDROID_SYSROOT" ]; then
echo "ERROR: ANDROID_SYSROOT is not a valid path. Please set it."
echo "Path is $ANDROID_SYSROOT"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
THE_ARCH=$(tr '[:upper:]' '[:lower:]' <<< "$ANDROID_CPU")
# https://developer.android.com/ndk/guides/abis.html
case "$THE_ARCH" in
armv7*|armeabi*)
CC="armv7a-linux-androideabi$ANDROID_API-clang"
CXX="armv7a-linux-androideabi$ANDROID_API-clang++"
LD="arm-linux-androideabi-ld"
AS="arm-linux-androideabi-as"
AR="arm-linux-androideabi-ar"
RANLIB="arm-linux-androideabi-ranlib"
STRIP="arm-linux-androideabi-strip"
CFLAGS="-march=armv7-a -mthumb -mfloat-abi=softfp -funwind-tables -fexceptions"
CXXFLAGS="-march=armv7-a -mthumb -mfloat-abi=softfp -funwind-tables -fexceptions -frtti"
;;
armv8*|aarch64|arm64*)
CC="aarch64-linux-android$ANDROID_API-clang"
CXX="aarch64-linux-android$ANDROID_API-clang++"
LD="aarch64-linux-android-ld"
AS="aarch64-linux-android-as"
AR="aarch64-linux-android-ar"
RANLIB="aarch64-linux-android-ranlib"
STRIP="aarch64-linux-android-strip"
CFLAGS="-funwind-tables -fexceptions"
CXXFLAGS="-funwind-tables -fexceptions -frtti"
;;
x86)
CC="i686-linux-android$ANDROID_API-clang"
CXX="i686-linux-android$ANDROID_API-clang++"
LD="i686-linux-android-ld"
AS="i686-linux-android-as"
AR="i686-linux-android-ar"
RANLIB="i686-linux-android-ranlib"
STRIP="i686-linux-android-strip"
CFLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions"
CXXFLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti"
;;
x86_64|x64)
CC="x86_64-linux-android$ANDROID_API-clang"
CXX="x86_64-linux-android$ANDROID_API-clang++"
LD="x86_64-linux-android-ld"
AS="x86_64-linux-android-as"
AR="x86_64-linux-android-ar"
RANLIB="x86_64-linux-android-ranlib"
STRIP="x86_64-linux-android-strip"
CFLAGS="-march=x86-64 -msse4.2 -mpopcnt -mtune=intel -funwind-tables -fexceptions"
CXXFLAGS="-march=x86-64 -msse4.2 -mpopcnt -mtune=intel -funwind-tables -fexceptions -frtti"
;;
*)
echo "ERROR: Unknown architecture $ANDROID_CPU"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
;;
esac
#####################################################################
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$CC" ]; then
echo "ERROR: Failed to find Android clang. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$CXX" ]; then
echo "ERROR: Failed to find Android clang++. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$RANLIB" ]; then
echo "ERROR: Failed to find Android ranlib. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$AR" ]; then
echo "ERROR: Failed to find Android ar. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$AS" ]; then
echo "ERROR: Failed to find Android as. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$ANDROID_TOOLCHAIN/$LD" ]; then
echo "ERROR: Failed to find Android ld. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
LENGTH=${#ANDROID_TOOLCHAIN}
SUBSTR=${PATH:0:$LENGTH}
if [ "$SUBSTR" != "$ANDROID_TOOLCHAIN" ]; then
export PATH="$ANDROID_TOOLCHAIN:$PATH"
fi
#####################################################################
export CPP CC CXX LD AS AR RANLIB STRIP
export ANDROID_SYSROOT="$AOSP_SYSROOT"
export CPPFLAGS="-D__ANDROID_API__=$ANDROID_API"
export CFLAGS="$CFLAGS --sysroot=$AOSP_SYSROOT"
export CXXFLAGS="$CXXFLAGS -stdlib=libc++ --sysroot=$AOSP_SYSROOT"
#####################################################################
echo "ANDROID_TOOLCHAIN: $ANDROID_TOOLCHAIN"
echo "CPP: $(command -v "$CPP")"
echo "CC: $(command -v "$CC")"
echo "CXX: $(command -v "$CXX")"
echo "LD: $(command -v "$LD")"
echo "AS: $(command -v "$AS")"
echo "AR: $(command -v "$AR")"
echo "ANDROID_SYSROOT: $ANDROID_SYSROOT"
echo "CPPFLAGS: $CPPFLAGS"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0
+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
+42
View File
@@ -0,0 +1,42 @@
#!/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="https://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`
TR=`which tr`
# Check Wget installed
if [ ! -f $WGET ]; then
echo "Wget not found. Exiting..."
exit 1
fi
# remove special characters with tr to protect unbound.conf
$WGET -O $work_dir/yoyo_ad_servers "$list_addr" && \
$CAT $work_dir/yoyo_ad_servers | \
$TR -d '";$\\' | \
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
#
+82
View File
@@ -0,0 +1,82 @@
diff --git a/daemon/worker.c b/daemon/worker.c
index 263fcdd..f787b70 100644
--- a/daemon/worker.c
+++ b/daemon/worker.c
@@ -1213,6 +1213,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
addr_to_str(&repinfo->addr, repinfo->addrlen, ip, sizeof(ip));
log_query_in(ip, qinfo.qname, qinfo.qtype, qinfo.qclass);
}
+
+ if(worker->env.cfg->drop_tld) {
+ int lab = dname_count_labels(qinfo.qname);
+ if (lab == 2) {
+ comm_point_drop_reply(repinfo);
+ verbose(VERB_ALGO, "Dropping one label query.");
+ return 0;
+ }
+ }
if(qinfo.qtype == LDNS_RR_TYPE_AXFR ||
qinfo.qtype == LDNS_RR_TYPE_IXFR) {
verbose(VERB_ALGO, "worker request: refused zone transfer.");
diff --git a/util/config_file.h b/util/config_file.h
index b3ef930..2791541 100644
--- a/util/config_file.h
+++ b/util/config_file.h
@@ -274,6 +274,8 @@ struct config_file {
int prefetch_key;
/** deny queries of type ANY with an empty answer */
int deny_any;
+ /** Drop TLD queries from clients **/
+ int drop_tld;
/** chrootdir, if not "" or chroot will be done */
char* chrootdir;
diff --git a/util/configlexer.lex b/util/configlexer.lex
index a86ddf5..9bbedbb 100644
--- a/util/configlexer.lex
+++ b/util/configlexer.lex
@@ -299,6 +299,7 @@ private-domain{COLON} { YDVAR(1, VAR_PRIVATE_DOMAIN) }
prefetch-key{COLON} { YDVAR(1, VAR_PREFETCH_KEY) }
prefetch{COLON} { YDVAR(1, VAR_PREFETCH) }
deny-any{COLON} { YDVAR(1, VAR_DENY_ANY) }
+drop-tld{COLON} { YDVAR(1, VAR_DROP_TLD) }
stub-zone{COLON} { YDVAR(0, VAR_STUB_ZONE) }
name{COLON} { YDVAR(1, VAR_NAME) }
stub-addr{COLON} { YDVAR(1, VAR_STUB_ADDR) }
diff --git a/util/configparser.y b/util/configparser.y
index 10227a2..567d68e 100644
--- a/util/configparser.y
+++ b/util/configparser.y
@@ -164,6 +164,7 @@ extern struct config_parser_state* cfg_parser;
%token VAR_FAST_SERVER_PERMIL VAR_FAST_SERVER_NUM
%token VAR_ALLOW_NOTIFY VAR_TLS_WIN_CERT VAR_TCP_CONNECTION_LIMIT
%token VAR_FORWARD_NO_CACHE VAR_STUB_NO_CACHE VAR_LOG_SERVFAIL VAR_DENY_ANY
+%token VAR_DROP_TLD
%token VAR_UNKNOWN_SERVER_TIME_LIMIT VAR_LOG_TAG_QUERYREPLY
%token VAR_STREAM_WAIT_SIZE VAR_TLS_CIPHERS VAR_TLS_CIPHERSUITES
%token VAR_TLS_SESSION_TICKET_KEYS
@@ -266,6 +267,7 @@ content_server: server_num_threads | server_verbosity | server_port |
server_tls_cert_bundle | server_tls_additional_port | server_low_rtt |
server_fast_server_permil | server_fast_server_num | server_tls_win_cert |
server_tcp_connection_limit | server_log_servfail | server_deny_any |
+ server_drop_tld |
server_unknown_server_time_limit | server_log_tag_queryreply |
server_stream_wait_size | server_tls_ciphers |
server_tls_ciphersuites | server_tls_session_ticket_keys
@@ -1466,6 +1468,16 @@ server_deny_any: VAR_DENY_ANY STRING_ARG
free($2);
}
;
+
+server_drop_tld: VAR_DROP_TLD STRING_ARG
+ {
+ OUTYY(("P(server_drop_tld:%s)\n", $2));
+ if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
+ yyerror("expected yes or no.");
+ else cfg_parser->cfg->drop_tld = (strcmp($2, "yes")==0);
+ free($2);
+ }
+ ;
server_unwanted_reply_threshold: VAR_UNWANTED_REPLY_THRESHOLD STRING_ARG
{
OUTYY(("P(server_unwanted_reply_threshold:%s)\n", $2));
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/perl
# usage: curl --silent https://www.spamhaus.org/drop/drop.txt | $0 > /path/to/spamhaus-drop.rpz.local
#
# unbound.conf:
# rpz:
# name: "drop.spamhaus.org.rpz.local."
# zonefile: "/path/tp/spamhaus-drop.rpz.local"
# rpz-log: yes
# rpz-log-name: "spamhaus-drop"
#
use strict;
use vars qw{$o1 $o2 $o3 $o4 $m};
# trailing dots required
my $origin = 'drop.spamhaus.org.rpz.local.';
my $mname = 'localhost.';
my $rname = 'root.localhost.';
my $ns = $mname;
my $rpz_action = '.'; # return NXDOMAIN
#my $rpz_action = '*.'; # return NODATA
#my $rpz_action = 'rpz-drop.'; # drop the query
print "$origin SOA $mname $rname 1 43200 7200 2419200 3600\n";
print "$origin NS $ns\n";
while(<>) {
if(($o1, $o2, $o3, $o4, $m) = m{(\d+)\.(\d+)\.(\d+)\.(\d+)/(\d+)}) {
print "$m.$o4.$o3.$o2.$o1.rpz-ip.$origin CNAME $rpz_action\n";
} else {
print "$_";
}
}
# add a testpoint: ask for "dns.google"
# print "32.8.8.8.8.rpz-ip.$origin CNAME $rpz_action\n";
exit;
File diff suppressed because it is too large Load Diff
+41
View File
@@ -0,0 +1,41 @@
#### iPhoneOS/iOS
#
# It takes recent enough Xcode to use following two targets. It shouldn't
# be a problem by now, but if they don't work, original targets below
# that depend on manual definition of environment variables should still
# work...
#
my %targets = (
"ios-common" => {
template => 1,
inherit_from => [ "darwin-common" ],
sys_id => "iOS",
disable => [ "engine", "async" ],
},
"ios-xcrun" => {
inherit_from => [ "ios-common", asm("armv4_asm") ],
bn_ops => [ "BN_LLONG", "RC4_CHAR" ],
perlasm_scheme => "ios32",
},
"ios64-xcrun" => {
inherit_from => [ "ios-common", asm("aarch64_asm") ],
bn_ops => [ "SIXTY_FOUR_BIT_LONG", "RC4_CHAR" ],
perlasm_scheme => "ios64",
},
"iossimulator-xcrun" => {
inherit_from => [ "ios-common" ],
},
"iphoneos-cross" => {
inherit_from => [ "ios-common" ],
cflags => add("-Wall -fno-common"),
},
"ios-cross" => {
inherit_from => [ "ios-xcrun" ],
cflags => add("-Wall -fno-common"),
},
"ios64-cross" => {
inherit_from => [ "ios64-xcrun" ],
cflags => add("-Wall -fno-common"),
},
);
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
echo "Downloading Expat"
if ! curl -L -k -s -o expat-2.2.9.tar.gz https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.gz;
then
echo "Failed to download Expat"
exit 1
fi
echo "Unpacking Expat"
rm -rf ./expat-2.2.9
if ! tar -xf expat-2.2.9.tar.gz;
then
echo "Failed to unpack Expat"
exit 1
fi
cd expat-2.2.9 || exit 1
export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig"
echo "Configuring Expat"
if ! ./configure \
--build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \
--prefix="$IOS_PREFIX" ; then
echo "Error: Failed to configure Expat"
cat config.log
exit 1
fi
# Cleanup warnings, https://github.com/libexpat/libexpat/issues/383
echo "Fixing Makefiles"
(IFS="" find "$PWD" -name 'Makefile' -print | while read -r file
do
cp -p "$file" "$file.fixed"
sed 's|-Wduplicated-cond ||g; s|-Wduplicated-branches ||g; s|-Wlogical-op ||g' "$file" > "$file.fixed"
mv "$file.fixed" "$file"
cp -p "$file" "$file.fixed"
sed 's|-Wrestrict ||g; s|-Wjump-misses-init ||g; s|-Wmisleading-indentation ||g' "$file" > "$file.fixed"
mv "$file.fixed" "$file"
done)
echo "Building Expat"
if ! make; then
echo "Failed to build Expat"
exit 1
fi
echo "Installing Expat"
if ! make install; then
echo "Failed to install Expat"
exit 1
fi
exit 0
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
echo "Downloading OpenSSL"
if ! curl -L -k -s -o openssl-1.1.1d.tar.gz https://www.openssl.org/source/openssl-1.1.1d.tar.gz;
then
echo "Failed to download OpenSSL"
exit 1
fi
echo "Unpacking OpenSSL"
rm -rf ./openssl-1.1.1d
if ! tar -xf openssl-1.1.1d.tar.gz;
then
echo "Failed to unpack OpenSSL"
exit 1
fi
cd openssl-1.1.1d || exit 1
if ! cp ../contrib/ios/15-ios.conf Configurations/; then
echo "Failed to copy OpenSSL ios config"
exit 1
fi
# OpenSSL 1.1.1d patch. OK to remove once OpenSSL version is bumped.
# ocsp.c:947:23: error: 'fork' is unavailable: not available on tvOS and watchOS.
# Also see https://github.com/openssl/openssl/issues/7607.
if ! patch -u -p0 < ../contrib/ios/openssl.patch; then
echo "Failed to patch OpenSSL"
exit 1
fi
echo "Configuring OpenSSL"
if ! ./Configure "$OPENSSL_HOST" -DNO_FORK no-comp no-asm no-hw no-engine no-tests no-unit-test \
--prefix="$IOS_PREFIX" --openssldir="$IOS_PREFIX"; then
echo "Failed to configure OpenSSL"
exit 1
fi
echo "Building OpenSSL"
if ! make; then
echo "Failed to build OpenSSL"
exit 1
fi
echo "Installing OpenSSL"
if ! make install_sw; then
echo "Failed to install OpenSSL"
exit 1
fi
exit 0
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# This step should install tools needed for all packages - OpenSSL, Expat and Unbound
# brew update hangs, so we try to skip that step.
#echo "Updating tools"
#brew update 1>/dev/null
echo "Installing tools"
# already installed are: autoconf automake libtool pkg-config
#brew install curl perl 1>/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install curl perl 1>/dev/null
+48
View File
@@ -0,0 +1,48 @@
--- apps/speed.c
+++ apps/speed.c
@@ -99,6 +99,13 @@
#endif
#include <openssl/modes.h>
+/* fork() breaks AppleTVOS, WatchOS, AppleTVSimulator and WatchSimulator */
+/* Users should configure with -DNO_FORK */
+#if defined(NO_FORK)
+# undef HAVE_FORK
+# define HAVE_FORK 0
+#endif
+
#ifndef HAVE_FORK
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VXWORKS)
# define HAVE_FORK 0
@@ -110,6 +117,7 @@
#if HAVE_FORK
# undef NO_FORK
#else
+# undef NO_FORK
# define NO_FORK
#endif
--- apps/ocsp.c
+++ apps/ocsp.c
@@ -36,6 +36,13 @@
# include <openssl/x509v3.h>
# include <openssl/rand.h>
+/* fork() breaks AppleTVOS, WatchOS, AppleTVSimulator and WatchSimulator */
+/* Users should configure with -DNO_FORK */
+#if defined(NO_FORK)
+# undef HAVE_FORK
+# define HAVE_FORK 0
+#endif
+
#ifndef HAVE_FORK
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS)
# define HAVE_FORK 0
@@ -47,6 +54,7 @@
#if HAVE_FORK
# undef NO_FORK
#else
+# undef NO_FORK
# define NO_FORK
#endif
+274
View File
@@ -0,0 +1,274 @@
#!/usr/bin/env bash
# ====================================================================
# Sets the cross compile environment for Xcode/iOS
#
# Based upon OpenSSL's setenv-ios.sh by TH, JW, and SM.
# Heavily modified by JWW for Crypto++.
# Modified by JWW for Unbound.
# ====================================================================
#########################################
##### Some validation #####
#########################################
# In the past we could mostly infer arch or cpu from the SDK (and
# mostly vice-versa). Nowadays we need it set for us because Apple
# platforms can be either 32-bit or 64-bit.
if [ -z "$IOS_SDK" ]; then
echo "IOS_SDK is not set. Please set it"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ -z "$IOS_CPU" ]; then
echo "IOS_CPU is not set. Please set it"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
# cryptest-ios.sh may run this script without sourcing.
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "setenv-ios.sh is usually sourced, but not this time."
fi
#########################################
##### Small Fixups, if needed #####
#########################################
if [[ "$IOS_SDK" == "iPhone" ]]; then
IOS_SDK=iPhoneOS
fi
if [[ "$IOS_SDK" == "iPhoneOSSimulator" ]]; then
IOS_SDK=iPhoneSimulator
fi
if [[ "$IOS_SDK" == "TV" || "$IOS_SDK" == "AppleTV" ]]; then
IOS_SDK=AppleTVOS
fi
if [[ "$IOS_SDK" == "Watch" || "$IOS_SDK" == "AppleWatch" ]]; then
IOS_SDK=WatchOS
fi
if [[ "$IOS_CPU" == "aarch64" || "$IOS_CPU" == "armv8"* ]] ; then
IOS_CPU=arm64
fi
########################################
##### Environment #####
########################################
# The flags below were tested with Xcode 8 on Travis. If
# you use downlevel versions of Xcode, then you can push
# xxx-version-min=n lower. For example, Xcode 6 can use
# -miphoneos-version-min=5.
# iPhones can be either 32-bit or 64-bit
if [[ "$IOS_SDK" == "iPhoneOS" && "$IOS_CPU" == "armv7"* ]]; then
MIN_VER=-miphoneos-version-min=6
elif [[ "$IOS_SDK" == "iPhoneOS" && "$IOS_CPU" == "arm64" ]]; then
MIN_VER=-miphoneos-version-min=6
# Fixups for convenience
elif [[ "$IOS_SDK" == "iPhoneOS" && "$IOS_CPU" == "i386" ]]; then
IOS_SDK=iPhoneSimulator
# MIN_VER=-miphoneos-version-min=6
MIN_VER=-miphonesimulator-version-min=6
elif [[ "$IOS_SDK" == "iPhoneOS" && "$IOS_CPU" == "x86_64" ]]; then
IOS_SDK=iPhoneSimulator
# MIN_VER=-miphoneos-version-min=6
MIN_VER=-miphonesimulator-version-min=6
# Simulator builds
elif [[ "$IOS_SDK" == "iPhoneSimulator" && "$IOS_CPU" == "i386" ]]; then
MIN_VER=-miphonesimulator-version-min=6
elif [[ "$IOS_SDK" == "iPhoneSimulator" && "$IOS_CPU" == "x86_64" ]]; then
MIN_VER=-miphonesimulator-version-min=6
# Apple TV can be 32-bit Intel (1st gen), 32-bit ARM (2nd, 3rd gen) or 64-bit ARM (4th gen)
elif [[ "$IOS_SDK" == "AppleTVOS" && "$IOS_CPU" == "i386" ]]; then
MIN_VER=-mappletvos-version-min=6
elif [[ "$IOS_SDK" == "AppleTVOS" && "$IOS_CPU" == "armv7"* ]]; then
MIN_VER=-mappletvos-version-min=6
elif [[ "$IOS_SDK" == "AppleTVOS" && "$IOS_CPU" == "arm64" ]]; then
MIN_VER=-mappletvos-version-min=6
# Simulator builds
elif [[ "$IOS_SDK" == "AppleTVSimulator" && "$IOS_CPU" == "i386" ]]; then
MIN_VER=-mappletvsimulator-version-min=6
elif [[ "$IOS_SDK" == "AppleTVSimulator" && "$IOS_CPU" == "x86_64" ]]; then
MIN_VER=-mappletvsimulator-version-min=6
# Watch can be either 32-bit or 64-bit ARM. TODO: figure out which
# -mwatchos-version-min=n is needed for arm64. 9 is not enough.
elif [[ "$IOS_SDK" == "WatchOS" && "$IOS_CPU" == "armv7"* ]]; then
MIN_VER=-mwatchos-version-min=6
elif [[ "$IOS_SDK" == "WatchOS" && "$IOS_CPU" == "arm64" ]]; then
MIN_VER=-mwatchos-version-min=10
# Simulator builds. TODO: figure out which -watchos-version-min=n
# is needed for arm64. 6 compiles and links, but is it correct?
elif [[ "$IOS_SDK" == "WatchSimulator" && "$IOS_CPU" == "i386" ]]; then
MIN_VER=-mwatchsimulator-version-min=6
elif [[ "$IOS_SDK" == "WatchSimulator" && "$IOS_CPU" == "x86_64" ]]; then
MIN_VER=-mwatchsimulator-version-min=6
# And the final catch-all
else
echo "IOS_SDK and IOS_CPU are not valid. Please fix them"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
#####################################################################
# Xcode 6 and below cannot handle -miphonesimulator-version-min
# Fix it so the simulator will compile as expected. This trick
# may work on other SDKs, but it was not tested.
if [ -n "$(command -v xcodebuild 2>/dev/null)" ]; then
# Output of xcodebuild is similar to "Xcode 6.2". The first cut gets
# the dotted decimal value. The second cut gets the major version.
XCODE_VERSION=$(xcodebuild -version 2>/dev/null | head -n 1 | cut -f2 -d" " | cut -f1 -d".")
if [ -z "$XCODE_VERSION" ]; then XCODE_VERSION=100; fi
if [ "$XCODE_VERSION" -le 6 ]; then
MIN_VER="${MIN_VER//iphonesimulator/iphoneos}"
fi
fi
#####################################################################
# Allow a user override? I think we should be doing this. The use case is,
# move /Applications/Xcode somewhere else for a side-by-side installation.
if [ -z "${XCODE_DEVELOPER-}" ]; then
XCODE_DEVELOPER=$(xcode-select -print-path 2>/dev/null)
fi
if [ ! -d "$XCODE_DEVELOPER" ]; then
echo "ERROR: unable to find XCODE_DEVELOPER directory."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# XCODE_DEVELOPER_SDK is the SDK location.
XCODE_DEVELOPER_SDK="$XCODE_DEVELOPER/Platforms/$IOS_SDK.platform"
if [ ! -d "$XCODE_DEVELOPER_SDK" ]; then
echo "ERROR: unable to find XCODE_DEVELOPER_SDK directory."
echo " Is the SDK supported by Xcode and installed?"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# XCODE_TOOLCHAIN is the location of the actual compiler tools.
if [ -d "$XCODE_DEVELOPER/Toolchains/XcodeDefault.xctoolchain/usr/bin/" ]; then
XCODE_TOOLCHAIN="$XCODE_DEVELOPER/Toolchains/XcodeDefault.xctoolchain/usr/bin/"
elif [ -d "$XCODE_DEVELOPER_SDK/Developer/usr/bin/" ]; then
XCODE_TOOLCHAIN="$XCODE_DEVELOPER_SDK/Developer/usr/bin/"
fi
if [ -z "$XCODE_TOOLCHAIN" ] || [ ! -d "$XCODE_TOOLCHAIN" ]; then
echo "ERROR: unable to find Xcode cross-compiler tools."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# XCODE_SDK is the SDK name/version being used - adjust the list as appropriate.
# For example, remove 4.3, 6.2, and 6.1 if they are not installed. We go back to
# the 1.0 SDKs because Apple WatchOS uses low numbers, like 2.0 and 2.1.
XCODE_SDK=
for i in $(seq -f "%.1f" 30.0 -0.1 1.0)
do
if [ -d "$XCODE_DEVELOPER_SDK/Developer/SDKs/$IOS_SDK$i.sdk" ]; then
XCODE_SDK="$IOS_SDK$i.sdk"
break
fi
done
# Error checking
if [ -z "$XCODE_SDK" ]; then
echo "ERROR: unable to find a SDK."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
IOS_SYSROOT="$XCODE_DEVELOPER_SDK/Developer/SDKs/$XCODE_SDK"
if [ -z "$IOS_SYSROOT" ] || [ ! -d "$IOS_SYSROOT" ]; then
echo "ERROR: unable to find IOS_SYSROOT directory."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
# We want to set AR=libtool and ARFLAGS="-static -o",
# but I am not sure Autotools can handle it.
CPP=cpp; CC=clang; CXX=clang++; LD=ld
AS=as; AR=ar; RANLIB=ranlib; STRIP=strip
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$CC" ]; then
echo "ERROR: Failed to find iOS clang. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$CXX" ]; then
echo "ERROR: Failed to find iOS clang++. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$RANLIB" ]; then
echo "ERROR: Failed to find iOS ranlib. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$AR" ]; then
echo "ERROR: Failed to find iOS ar. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$AS" ]; then
echo "ERROR: Failed to find iOS as. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$XCODE_TOOLCHAIN/$LD" ]; then
echo "ERROR: Failed to find iOS ld. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
LENGTH=${#XCODE_TOOLCHAIN}
SUBSTR=${PATH:0:$LENGTH}
if [ "$SUBSTR" != "$XCODE_TOOLCHAIN" ]; then
export PATH="$XCODE_TOOLCHAIN":"$PATH"
fi
#####################################################################
export CPP CC CXX LD AS AR RANLIB STRIP
export IOS_SYSROOT
export CFLAGS="-arch $IOS_CPU $MIN_VER --sysroot=$IOS_SYSROOT"
export CXXFLAGS="-arch $IOS_CPU $MIN_VER -stdlib-libc++ --sysroot=$IOS_SYSROOT"
#####################################################################
echo "XCODE_TOOLCHAIN: $XCODE_TOOLCHAIN"
echo "CPP: $(command -v "$CPP")"
echo "CC: $(command -v "$CC")"
echo "CXX: $(command -v "$CXX")"
echo "LD: $(command -v "$LD")"
echo "AS: $(command -v "$AS")"
echo "AR: $(command -v "$AR")"
echo "IOS_SYSROOT: $IOS_SYSROOT"
echo "CPPFLAGS: $CPPFLAGS"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0
+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.private: @PC_PY_DEPENDENCY@ @PC_LIBBSD_DEPENDENCY@ @PC_CRYPTO_DEPENDENCY@ @PC_LIBEVENT_DEPENDENCY@
Libs: -L${libdir} -lunbound
Libs.private: @SSLLIB@ @LIBS@
Cflags: -I${includedir}
+42
View File
@@ -0,0 +1,42 @@
# See ltrace.conf(5) for description of syntax of this file.
typedef ub_type = enum(TYPE_A=1,TYPE_NS=2,TYPE_SOA=6,TYPE_MX=15,TYPE_TXT=16,TYPE_AAAA=28,TYPE_DS=43,TYPE_DNSKEY=48,TYPE_TLSA=52,TYPE_ANY=255);
typedef ub_class = enum(CLASS_IN=1,CLASS_CH=3,CLASS_NONE=254,CLASS_ANY=255);
typedef ub_rcode = enum(RCODE_NOERROR,RCODE_FORMERR,RCODE_SERVFAIL,RCODE_NXDOMAIN,RCODE_NOTIMPL,RCODE_REFUSED,RCODE_YXDOMAIN,RCODE_YXRRSET,RCODE_NXRRSET,RCODE_NOTAUTH,RCODE_NOTZONE);
typedef ub_havedata = enum(no_data, have_data);
typedef ub_nxdomain = enum(name_exists, nxdomain);
typedef ub_secure = enum(not_secure, secure);
typedef ub_bogus = enum(not_bogus, bogus);
typedef ub_result = struct(string, ub_type, ub_class, array(void*,zero)*, array(int,zero)*, string, ub_rcode, void*, int, ub_havedata, ub_nxdomain, ub_secure, ub_bogus, string, int);
typedef ub_ctx = void;
ub_ctx* ub_ctx_create(void);
void ub_ctx_delete(ub_ctx*);
int ub_ctx_set_option(ub_ctx*, string, string);
int ub_ctx_get_option(ub_ctx*, string, +string*);
int ub_ctx_config(ub_ctx*, string);
int ub_ctx_set_fwd(ub_ctx*, string);
int ub_ctx_set_tls(ub_ctx*, bool(int));
int ub_ctx_set_stub(ub_ctx*, string, string, bool(int));
int ub_ctx_resolvconf(ub_ctx*, string);
int ub_ctx_hosts(ub_ctx*, string);
int ub_ctx_add_ta(ub_ctx*, string);
int ub_ctx_add_ta_file(ub_ctx*, string);
int ub_ctx_add_ta_autr(ub_ctx*, string);
int ub_ctx_trustedkeys(ub_ctx*, string);
int ub_ctx_debugout(ub_ctx*, void*);
int ub_ctx_debuglevel(ub_ctx*, int);
int ub_ctx_async(ub_ctx*, bool(int));
int ub_poll(ub_ctx*);
int ub_wait(ub_ctx*);
int ub_fd(ub_ctx*);
int ub_process(ub_ctx*);
int ub_resolve(ub_ctx*, string, ub_type, ub_class, +ub_result**);
int ub_resolve_async(ub_ctx*, string, ub_type, ub_class, void*, void*, +int*);
int ub_cancel(ub_ctx*, int);
void ub_resolve_free(ub_result*);
string ub_strerror(int);
int ub_ctx_print_local_zones(ub_ctx*);
int ub_ctx_zone_add(ub_ctx*, string, string);
int ub_ctx_zone_remove(ub_ctx*, string);
int ub_ctx_data_add(ub_ctx*, string);
int ub_ctx_data_remove(ub_ctx*, string);
string ub_version(void);
+181
View File
@@ -0,0 +1,181 @@
# read output of unbound-control stats
# and output prometheus metrics style output.
# use these options:
# server: extended-statistics: yes
# statistics-cumulative: no
# statistics-interval: 0
# remote-control: control-enable: yes
# Can use it like unbound-control stats | awk -f "metrics.awk"
BEGIN {
FS="=";
}
# everything like total.num.queries=value is put in val["total.num.queries"]
/^.*\..*=/ {
val[$1]=$2;
}
# print the output metrics
END {
print "# HELP unbound_hits_queries Unbound DNS traffic and cache hits"
print "# TYPE unbound_hits_queries gauge"
print "unbound_hits_queries{type=\"total.num.queries\"} " val["total.num.queries"];
for (x=0; x<99; x++) {
if(val["thread" $x ".num.queries"] != "") {
print "unbound_hits_queries{type=\"thread" $x ".num.queries\"} " val["thread" $x ".num.queries"];
}
}
print "unbound_hits_queries{type=\"total.num.cachehits\"} " val["total.num.cachehits"];
print "unbound_hits_queries{type=\"total.num.prefetch\"} " val["total.num.prefetch"];
print "unbound_hits_queries{type=\"num.query.tcp\"} " val["num.query.tcp"];
print "unbound_hits_queries{type=\"num.query.tcpout\"} " val["num.query.tcpout"];
print "unbound_hits_queries{type=\"num.query.udpout\"} " val["num.query.udpout"];
print "unbound_hits_queries{type=\"num.query.tls\"} " val["num.query.tls"];
print "unbound_hits_queries{type=\"num.query.tls.resume\"} " val["num.query.tls.resume"];
print "unbound_hits_queries{type=\"num.query.ipv6\"} " val["num.query.ipv6"];
print "unbound_hits_queries{type=\"unwanted.queries\"} " val["unwanted.queries"];
print ""
print "# HELP unbound_queue_queries Unbound requestlist size"
print "# TYPE unbound_queue_queries gauge"
print "unbound_queue_queries{type=\"total.requestlist.avg\"} " val["total.requestlist.avg"];
print "unbound_queue_queries{type=\"total.requestlist.max\"} " val["total.requestlist.max"];
print "unbound_queue_queries{type=\"total.requestlist.overwritten\"} " val["total.requestlist.overwritten"];
print "unbound_queue_queries{type=\"total.requestlist.exceeded\"} " val["total.requestlist.exceeded"];
print ""
print "# HELP unbound_memory_bytes Unbound memory usage"
print "# TYPE unbound_memory_bytes gauge"
print "unbound_memory_bytes{type=\"mem.cache.rrset\"} " val["mem.cache.rrset"];
print "unbound_memory_bytes{type=\"mem.cache.message\"} " val["mem.cache.message"];
print "unbound_memory_bytes{type=\"mem.mod.iterator\"} " val["mem.mod.iterator"];
if(val["mem.mod.validator"] != "") {
print "unbound_memory_bytes{type=\"mem.mod.validator\"} " val["mem.mod.validator"];
}
if(val["mem.mod.respip"] != "") {
print "unbound_memory_bytes{type=\"mem.mod.respip\"} " val["mem.mod.respip"];
}
if(val["mem.mod.subnet"] != "") {
print "unbound_memory_bytes{type=\"mem.mod.subnet\"} " val["mem.mod.subnet"];
}
if(val["mem.mod.ipsecmod"] != "") {
print "unbound_memory_bytes{type=\"mem.mod.ipsecmod\"} " val["mem.mod.ipsecmod"];
}
if(val["mem.mod.dynlibmod"] != "") {
print "unbound_memory_bytes{type=\"mem.mod.dynlibmod\"} " val["mem.mod.dynlibmod"];
}
print "unbound_memory_bytes{type=\"msg.cache.count\"} " val["msg.cache.count"];
print "unbound_memory_bytes{type=\"rrset.cache.count\"} " val["rrset.cache.count"];
print "unbound_memory_bytes{type=\"infra.cache.count\"} " val["infra.cache.count"];
print "unbound_memory_bytes{type=\"key.cache.count\"} " val["key.cache.count"];
print ""
print "# HELP unbound_by_type_queries Unbound DNS queries by type"
print "# TYPE unbound_by_type_queries gauge"
for(x in val) {
if(x ~ /^num.query.type./) {
if(val[x] != "") {
split(x, a, ".");
print "unbound_by_type_queries{type=\"" a[4] "\"} " val[x];
}
}
}
print ""
print "# HELP unbound_by_class_queries Unbound DNS queries by class"
print "# TYPE unbound_by_class_queries gauge"
for(x in val) {
if(x ~ /^num.query.class./) {
if(val[x] != "") {
split(x, a, ".");
print "unbound_by_class_queries{class=\"" a[4] "\"} " val[x];
}
}
}
print ""
print "# HELP unbound_by_opcode_queries Unbound DNS queries by opcode"
print "# TYPE unbound_by_opcode_queries gauge"
for(x in val) {
if(x ~ /^num.query.opcode./) {
if(val[x] != "") {
split(x, a, ".");
print "unbound_by_opcode_queries{opcode=\"" a[4] "\"} " val[x];
}
}
}
print ""
print "# HELP unbound_by_rcode_queries Unbound DNS answers by rcode"
print "# TYPE unbound_by_rcode_queries gauge"
for(x in val) {
if(x ~ /^num.answer.rcode./) {
if(val[x] != "") {
split(x, a, ".");
print "unbound_by_rcode_queries{rcode=\"" a[4] "\"} " val[x];
}
}
}
print ""
print "# HELP unbound_by_flags_queries Unbound DNS queries by flags"
print "# TYPE unbound_by_flags_queries gauge"
for(x in val) {
if(x ~ /^num.query.flags./) {
if(val[x] != "") {
split(x, a, ".");
print "unbound_by_flags_queries{flag=\"" a[4] "\"} " val[x];
}
}
}
if(val["num.query.edns.present"] != "") {
print "unbound_by_flags_queries{flag=\"num.query.edns.present\"} " val["num.query.edns.present"];
}
if(val["num.query.edns.DO"] != "") {
print "unbound_by_flags_queries{flag=\"num.query.edns.DO\"} " val["num.query.edns.DO"];
}
print ""
print "# HELP unbound_histogram_seconds Unbound DNS histogram of reply time"
print "# TYPE unbound_histogram_seconds gauge"
print "unbound_histogram_seconds{bucket=\"000000.000000.to.000000.000001\"} " val["histogram.000000.000000.to.000000.000001"];
print "unbound_histogram_seconds{bucket=\"000000.000001.to.000000.000002\"} " val["histogram.000000.000001.to.000000.000002"];
print "unbound_histogram_seconds{bucket=\"000000.000002.to.000000.000004\"} " val["histogram.000000.000002.to.000000.000004"];
print "unbound_histogram_seconds{bucket=\"000000.000004.to.000000.000008\"} " val["histogram.000000.000004.to.000000.000008"];
print "unbound_histogram_seconds{bucket=\"000000.000008.to.000000.000016\"} " val["histogram.000000.000008.to.000000.000016"];
print "unbound_histogram_seconds{bucket=\"000000.000016.to.000000.000032\"} " val["histogram.000000.000016.to.000000.000032"];
print "unbound_histogram_seconds{bucket=\"000000.000032.to.000000.000064\"} " val["histogram.000000.000032.to.000000.000064"];
print "unbound_histogram_seconds{bucket=\"000000.000064.to.000000.000128\"} " val["histogram.000000.000064.to.000000.000128"];
print "unbound_histogram_seconds{bucket=\"000000.000128.to.000000.000256\"} " val["histogram.000000.000128.to.000000.000256"];
print "unbound_histogram_seconds{bucket=\"000000.000256.to.000000.000512\"} " val["histogram.000000.000256.to.000000.000512"];
print "unbound_histogram_seconds{bucket=\"000000.000512.to.000000.001024\"} " val["histogram.000000.000512.to.000000.001024"];
print "unbound_histogram_seconds{bucket=\"000000.001024.to.000000.002048\"} " val["histogram.000000.001024.to.000000.002048"];
print "unbound_histogram_seconds{bucket=\"000000.002048.to.000000.004096\"} " val["histogram.000000.002048.to.000000.004096"];
print "unbound_histogram_seconds{bucket=\"000000.004096.to.000000.008192\"} " val["histogram.000000.004096.to.000000.008192"];
print "unbound_histogram_seconds{bucket=\"000000.008192.to.000000.016384\"} " val["histogram.000000.008192.to.000000.016384"];
print "unbound_histogram_seconds{bucket=\"000000.016384.to.000000.032768\"} " val["histogram.000000.016384.to.000000.032768"];
print "unbound_histogram_seconds{bucket=\"000000.032768.to.000000.065536\"} " val["histogram.000000.032768.to.000000.065536"];
print "unbound_histogram_seconds{bucket=\"000000.065536.to.000000.131072\"} " val["histogram.000000.065536.to.000000.131072"];
print "unbound_histogram_seconds{bucket=\"000000.131072.to.000000.262144\"} " val["histogram.000000.131072.to.000000.262144"];
print "unbound_histogram_seconds{bucket=\"000000.262144.to.000000.524288\"} " val["histogram.000000.262144.to.000000.524288"];
print "unbound_histogram_seconds{bucket=\"000000.524288.to.000001.000000\"} " val["histogram.000000.524288.to.000001.000000"];
print "unbound_histogram_seconds{bucket=\"000001.000000.to.000002.000000\"} " val["histogram.000001.000000.to.000002.000000"];
print "unbound_histogram_seconds{bucket=\"000002.000000.to.000004.000000\"} " val["histogram.000002.000000.to.000004.000000"];
print "unbound_histogram_seconds{bucket=\"000004.000000.to.000008.000000\"} " val["histogram.000004.000000.to.000008.000000"];
print "unbound_histogram_seconds{bucket=\"000008.000000.to.000016.000000\"} " val["histogram.000008.000000.to.000016.000000"];
print "unbound_histogram_seconds{bucket=\"000016.000000.to.000032.000000\"} " val["histogram.000016.000000.to.000032.000000"];
print "unbound_histogram_seconds{bucket=\"000032.000000.to.000064.000000\"} " val["histogram.000032.000000.to.000064.000000"];
print "unbound_histogram_seconds{bucket=\"000064.000000.to.000128.000000\"} " val["histogram.000064.000000.to.000128.000000"];
print "unbound_histogram_seconds{bucket=\"000128.000000.to.000256.000000\"} " val["histogram.000128.000000.to.000256.000000"];
print "unbound_histogram_seconds{bucket=\"000256.000000.to.000512.000000\"} " val["histogram.000256.000000.to.000512.000000"];
print "unbound_histogram_seconds{bucket=\"000512.000000.to.001024.000000\"} " val["histogram.000512.000000.to.001024.000000"];
print "unbound_histogram_seconds{bucket=\"001024.000000.to.002048.000000\"} " val["histogram.001024.000000.to.002048.000000"];
print "unbound_histogram_seconds{bucket=\"002048.000000.to.004096.000000\"} " val["histogram.002048.000000.to.004096.000000"];
print "unbound_histogram_seconds{bucket=\"004096.000000.to.008192.000000\"} " val["histogram.004096.000000.to.008192.000000"];
print "unbound_histogram_seconds{bucket=\"008192.000000.to.016384.000000\"} " val["histogram.008192.000000.to.016384.000000"];
print "unbound_histogram_seconds{bucket=\"016384.000000.to.032768.000000\"} " val["histogram.016384.000000.to.032768.000000"];
print "unbound_histogram_seconds{bucket=\"032768.000000.to.065536.000000\"} " val["histogram.032768.000000.to.065536.000000"];
print "unbound_histogram_seconds{bucket=\"065536.000000.to.131072.000000\"} " val["histogram.065536.000000.to.131072.000000"];
print "unbound_histogram_seconds{bucket=\"131072.000000.to.262144.000000\"} " val["histogram.131072.000000.to.262144.000000"];
print "unbound_histogram_seconds{bucket=\"262144.000000.to.524288.000000\"} " val["histogram.262144.000000.to.524288.000000"];
print ""
}
+2 -2
View File
@@ -91,7 +91,7 @@ while ( scalar keys %startstats < $numthreads || scalar keys %donestats < $numth
$allstats{$inthread}->{outstandingexc} = $4;
}
elsif ( $line =~ m/info: average recursion processing time ([0-9\.]+) sec/ ) {
$allstats{$inthread}->{recursionavg} = int($1 * 1000); # change sec to milisec.
$allstats{$inthread}->{recursionavg} = int($1 * 1000); # change sec to millisec.
}
elsif ( $line =~ m/info: histogram of recursion processing times/ ) {
next;
@@ -103,7 +103,7 @@ while ( scalar keys %startstats < $numthreads || scalar keys %donestats < $numth
}
elsif ( $line =~ m/info: lower\(secs\) upper\(secs\) recursions/ ) {
# since after this line we're unsure if we get these numbers
# at all, we sould consider this marker as the end of the
# at all, we should consider this marker as the end of the
# block. Chances that we're parsing a file halfway written
# at this stage are small. Bold statement.
$donestats{$inthread} = 1;
+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:
+344
View File
@@ -0,0 +1,344 @@
Index: daemon/worker.c
===================================================================
--- daemon/worker.c (revision 4191)
+++ daemon/worker.c (working copy)
@@ -663,8 +663,21 @@
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
goto bail_out;
- error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
- qinfo, id, flags, edns);
+ if (qinfo->qtype == LDNS_RR_TYPE_A &&
+ worker->env.cfg->redirect_bogus_ipv4) {
+ /* BAD cached */
+ fixed_address_encode(repinfo->c->buffer,
+ LDNS_RCODE_NOERROR, qinfo, id, flags, edns,
+ worker->env.cfg->redirect_bogus_ipv4);
+ } else if (qinfo->qtype == LDNS_RR_TYPE_AAAA &&
+ worker->env.cfg->redirect_bogus_ipv6) {
+ fixed_address_encode(repinfo->c->buffer,
+ LDNS_RCODE_NOERROR, qinfo, id, flags, edns,
+ worker->env.cfg->redirect_bogus_ipv6);
+ } else {
+ error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
+ qinfo, id, flags, edns);
+ }
rrset_array_unlock_touch(worker->env.rrset_cache,
worker->scratchpad, rep->ref, rep->rrset_count);
if(worker->stats.extended) {
Index: doc/unbound.conf.5.in
===================================================================
--- doc/unbound.conf.5.in (revision 4191)
+++ doc/unbound.conf.5.in (working copy)
@@ -1244,6 +1244,18 @@
This can make ordinary queries complete (if repeatedly queried for),
and enter the cache, whilst also mitigating the traffic flow by the
factor given.
+.TP 5
+.B redirect-bogus-ipv4: \fI<IPv4 address>
+Set a fixed address for DNSSEC failures that are cached
+Instead of responding to A queries with SERVFAIL, respond
+with NOERROR and the address specified here
+The TTL of the response will be 5 seconds
+.TP 5
+.B redirect-bogus-ipv6: \fI<IPv4 address>
+Set a fixed address for DNSSEC failures that are cached
+Instead of responding to AAAA queries with SERVFAIL, respond
+with NOERROR and the address specified here
+The TTL of the response will be 5 seconds
.SS "Remote Control Options"
In the
.B remote\-control:
Index: services/mesh.c
===================================================================
--- services/mesh.c (revision 4191)
+++ services/mesh.c (working copy)
@@ -1006,6 +1006,7 @@
struct timeval end_time;
struct timeval duration;
int secure;
+ int bogus_override = 0;
/* Copy the client's EDNS for later restore, to make sure the edns
* compare is with the correct edns options. */
struct edns_data edns_bak = r->edns;
@@ -1016,6 +1017,7 @@
rcode = LDNS_RCODE_SERVFAIL;
if(m->s.env->cfg->stat_extended)
m->s.env->mesh->ans_bogus++;
+ bogus_override = 1;
}
if(rep && rep->security == sec_status_secure)
secure = 1;
@@ -1047,17 +1049,34 @@
} else if(rcode) {
m->s.qinfo.qname = r->qname;
m->s.qinfo.local_alias = r->local_alias;
- if(rcode == LDNS_RCODE_SERVFAIL) {
- if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
- rep, rcode, &r->edns, m->s.region))
- r->edns.opt_list = NULL;
- } else {
- if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
- &r->edns, m->s.region))
- r->edns.opt_list = NULL;
+ if(bogus_override && m->s.qinfo.qtype == LDNS_RR_TYPE_A &&
+ m->s.env->cfg->redirect_bogus_ipv4) {
+ fixed_address_encode(r->query_reply.c->buffer,
+ LDNS_RCODE_NOERROR, &m->s.qinfo, r->qid,
+ r->qflags, &r->edns,
+ m->s.env->cfg->redirect_bogus_ipv4);
+ } else if(bogus_override &&
+ m->s.qinfo.qtype == LDNS_RR_TYPE_AAAA &&
+ m->s.env->cfg->redirect_bogus_ipv6) {
+ fixed_address_encode(r->query_reply.c->buffer,
+ LDNS_RCODE_NOERROR, &m->s.qinfo, r->qid,
+ r->qflags, &r->edns,
+ m->s.env->cfg->redirect_bogus_ipv6);
+ } else {
+ if(rcode == LDNS_RCODE_SERVFAIL) {
+ if(!inplace_cb_reply_servfail_call(m->s.env,
+ &m->s.qinfo, &m->s,
+ rep, rcode, &r->edns, m->s.region))
+ r->edns.opt_list = NULL;
+ } else {
+ if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo,
+ &m->s, rep, rcode, &r->edns,
+ m->s.region))
+ r->edns.opt_list = NULL;
+ }
+ error_encode(r->query_reply.c->buffer, rcode,
+ &m->s.qinfo, r->qid, r->qflags, &r->edns);
}
- error_encode(r->query_reply.c->buffer, rcode, &m->s.qinfo,
- r->qid, r->qflags, &r->edns);
comm_point_send_reply(&r->query_reply);
} else {
size_t udp_size = r->edns.udp_size;
Index: util/config_file.c
===================================================================
--- util/config_file.c (revision 4191)
+++ util/config_file.c (working copy)
@@ -273,6 +273,8 @@
cfg->ratelimit_factor = 10;
cfg->qname_minimisation = 0;
cfg->qname_minimisation_strict = 0;
+ cfg->redirect_bogus_ipv4 = NULL;
+ cfg->redirect_bogus_ipv6 = NULL;
cfg->shm_enable = 0;
cfg->shm_key = 11777;
cfg->dnscrypt = 0;
@@ -602,6 +604,10 @@
}
oi[cfg->num_out_ifs++] = d;
cfg->out_ifs = oi;
+ } else if (strcmp(opt, "redirect-bogus-ipv4:") == 0) {
+ cfg->redirect_bogus_ipv4 = strdup(val);
+ } else if (strcmp(opt, "redirect-bogus-ipv6:") == 0) {
+ cfg->redirect_bogus_ipv6 = strdup(val);
} else {
/* unknown or unsupported (from the set_option interface):
* interface, outgoing-interface, access-control,
@@ -1250,6 +1256,12 @@
free(cfg->dnstap_version);
config_deldblstrlist(cfg->ratelimit_for_domain);
config_deldblstrlist(cfg->ratelimit_below_domain);
+ if (cfg->redirect_bogus_ipv4) {
+ free(cfg->redirect_bogus_ipv4);
+ }
+ if (cfg->redirect_bogus_ipv6) {
+ free(cfg->redirect_bogus_ipv6);
+ }
#ifdef USE_IPSECMOD
free(cfg->ipsecmod_hook);
config_delstrlist(cfg->ipsecmod_whitelist);
Index: util/config_file.h
===================================================================
--- util/config_file.h (revision 4191)
+++ util/config_file.h (working copy)
@@ -444,6 +444,9 @@
/** minimise QNAME in strict mode, minimise according to RFC.
* Do not apply fallback */
int qname_minimisation_strict;
+ /** construct fake responses for DNSSEC failures */
+ char *redirect_bogus_ipv4;
+ char *redirect_bogus_ipv6;
/** SHM data - true if shm is enabled */
int shm_enable;
/** SHM data - key for the shm */
Index: util/configlexer.lex
===================================================================
--- util/configlexer.lex (revision 4191)
+++ util/configlexer.lex (working copy)
@@ -410,6 +410,8 @@
response-ip-tag{COLON} { YDVAR(2, VAR_RESPONSE_IP_TAG) }
response-ip{COLON} { YDVAR(2, VAR_RESPONSE_IP) }
response-ip-data{COLON} { YDVAR(2, VAR_RESPONSE_IP_DATA) }
+redirect-bogus-ipv4{COLON} { YDVAR(1, VAR_REDIRECT_BOGUS_IPV4) }
+redirect-bogus-ipv6{COLON} { YDVAR(1, VAR_REDIRECT_BOGUS_IPV6) }
dnscrypt{COLON} { YDVAR(0, VAR_DNSCRYPT) }
dnscrypt-enable{COLON} { YDVAR(1, VAR_DNSCRYPT_ENABLE) }
dnscrypt-port{COLON} { YDVAR(1, VAR_DNSCRYPT_PORT) }
Index: util/configparser.y
===================================================================
--- util/configparser.y (revision 4191)
+++ util/configparser.y (working copy)
@@ -44,6 +44,7 @@
#include <stdlib.h>
#include <assert.h>
+#include "sldns/str2wire.h"
#include "util/configyyrename.h"
#include "util/config_file.h"
#include "util/net_help.h"
@@ -141,6 +142,7 @@
%token VAR_ACCESS_CONTROL_TAG_DATA VAR_VIEW VAR_ACCESS_CONTROL_VIEW
%token VAR_VIEW_FIRST VAR_SERVE_EXPIRED VAR_FAKE_DSA VAR_FAKE_SHA1
%token VAR_LOG_IDENTITY VAR_HIDE_TRUSTANCHOR VAR_TRUST_ANCHOR_SIGNALING
+%token VAR_REDIRECT_BOGUS_IPV4 VAR_REDIRECT_BOGUS_IPV6
%token VAR_USE_SYSTEMD VAR_SHM_ENABLE VAR_SHM_KEY
%token VAR_DNSCRYPT VAR_DNSCRYPT_ENABLE VAR_DNSCRYPT_PORT VAR_DNSCRYPT_PROVIDER
%token VAR_DNSCRYPT_SECRET_KEY VAR_DNSCRYPT_PROVIDER_CERT
@@ -228,6 +230,7 @@
server_access_control_tag_data | server_access_control_view |
server_qname_minimisation_strict | server_serve_expired |
server_fake_dsa | server_log_identity | server_use_systemd |
+ server_redirect_bogus_ipv4 | server_redirect_bogus_ipv6 |
server_response_ip_tag | server_response_ip | server_response_ip_data |
server_shm_enable | server_shm_key | server_fake_sha1 |
server_hide_trustanchor | server_trust_anchor_signaling |
@@ -1873,6 +1876,34 @@
#endif
}
;
+server_redirect_bogus_ipv4: VAR_REDIRECT_BOGUS_IPV4 STRING_ARG
+ {
+ uint8_t data[4];
+ size_t data_len = 4;
+ OUTYY(("P(name:%s)\n", $2));
+ if(cfg_parser->cfg->redirect_bogus_ipv4) {
+ yyerror("redirect-bogus-ipv4, can only use one address");
+ }
+ if(sldns_str2wire_a_buf($2, data, &data_len) != LDNS_WIREPARSE_ERR_OK) {
+ yyerror("redirect-bogus-ipv4, not a valid IPv4 address");
+ }
+ free(cfg_parser->cfg->redirect_bogus_ipv4);
+ cfg_parser->cfg->redirect_bogus_ipv4 = $2;
+ }
+server_redirect_bogus_ipv6: VAR_REDIRECT_BOGUS_IPV6 STRING_ARG
+ {
+ uint8_t data[16];
+ size_t data_len = 16;
+ OUTYY(("P(name:%s)\n", $2));
+ if(cfg_parser->cfg->redirect_bogus_ipv6) {
+ yyerror("redirect-bogus-ipv6, can only use one address");
+ }
+ if(sldns_str2wire_aaaa_buf($2, data, &data_len) != LDNS_WIREPARSE_ERR_OK) {
+ yyerror("redirect-bogus-ipv6, not a valid IPv6 address");
+ }
+ free(cfg_parser->cfg->redirect_bogus_ipv6);
+ cfg_parser->cfg->redirect_bogus_ipv6 = $2;
+ }
stub_name: VAR_NAME STRING_ARG
{
OUTYY(("P(name:%s)\n", $2));
Index: util/data/msgencode.c
===================================================================
--- util/data/msgencode.c (revision 4191)
+++ util/data/msgencode.c (working copy)
@@ -48,6 +48,7 @@
#include "util/regional.h"
#include "util/net_help.h"
#include "sldns/sbuffer.h"
+#include "sldns/str2wire.h"
#include "services/localzone.h"
/** return code that means the function ran out of memory. negative so it does
@@ -914,3 +915,63 @@
attach_edns_record(buf, &es);
}
}
+
+void
+fixed_address_encode(sldns_buffer* buf, int r, struct query_info* qinfo,
+ uint16_t qid, uint16_t qflags, struct edns_data* edns, char* data)
+{
+ uint16_t flags;
+ uint8_t addr_data[16];
+ size_t addr_len = 16;
+ if (qinfo->qtype == LDNS_RR_TYPE_A) {
+ sldns_str2wire_a_buf(data, addr_data, &addr_len);
+ } else if (qinfo->qtype == LDNS_RR_TYPE_AAAA) {
+ sldns_str2wire_aaaa_buf(data, addr_data, &addr_len);
+ } else {
+ return error_encode(buf, LDNS_RCODE_NOERROR, qinfo, qid, qflags, edns);
+ }
+ sldns_buffer_clear(buf);
+ sldns_buffer_write(buf, &qid, sizeof(uint16_t));
+ flags = (uint16_t)(BIT_QR | BIT_RA | r); /* QR and retcode*/
+ flags |= (qflags & (BIT_RD|BIT_CD)); /* copy RD and CD bit */
+ sldns_buffer_write_u16(buf, flags);
+ if(qinfo) flags = 1;
+ else flags = 0;
+ sldns_buffer_write_u16(buf, flags);
+ sldns_buffer_write_u16(buf, 1);
+ flags = 0;
+ sldns_buffer_write(buf, &flags, sizeof(uint16_t));
+ sldns_buffer_write(buf, &flags, sizeof(uint16_t));
+ if(qinfo) {
+ // query
+ if(sldns_buffer_current(buf) == qinfo->qname)
+ sldns_buffer_skip(buf, (ssize_t)qinfo->qname_len);
+ else sldns_buffer_write(buf, qinfo->qname, qinfo->qname_len);
+ sldns_buffer_write_u16(buf, qinfo->qtype);
+ sldns_buffer_write_u16(buf, qinfo->qclass);
+ // faked answer
+ if(sldns_buffer_current(buf) == qinfo->qname)
+ sldns_buffer_skip(buf, (ssize_t)qinfo->qname_len);
+ else sldns_buffer_write(buf, qinfo->qname, qinfo->qname_len);
+ sldns_buffer_write_u16(buf, qinfo->qtype);
+ sldns_buffer_write_u16(buf, qinfo->qclass);
+ sldns_buffer_write_u16(buf, 0);
+ // TTL. Should we make this configurable too?
+ sldns_buffer_write_u16(buf, 5);
+ sldns_buffer_write_u16(buf, addr_len);
+ sldns_buffer_write(buf, addr_data, addr_len);
+ fflush(stderr);
+ }
+ sldns_buffer_flip(buf);
+ if(edns) {
+ struct edns_data es = *edns;
+ es.edns_version = EDNS_ADVERTISED_VERSION;
+ es.udp_size = EDNS_ADVERTISED_SIZE;
+ es.ext_rcode = 0;
+ es.bits &= EDNS_DO;
+ if(sldns_buffer_limit(buf) + calc_edns_field_size(&es) >
+ edns->udp_size)
+ return;
+ attach_edns_record(buf, &es);
+ }
+}
Index: util/data/msgencode.h
===================================================================
--- util/data/msgencode.h (revision 4191)
+++ util/data/msgencode.h (working copy)
@@ -128,4 +128,20 @@
void error_encode(struct sldns_buffer* pkt, int r, struct query_info* qinfo,
uint16_t qid, uint16_t qflags, struct edns_data* edns);
+/**
+ * Encode a fixed address response.
+ * This is a fake answer to either an A or AAA query
+ *
+ * It will answer with that address
+ *
+ * @param pkt: where to store the packet.
+ * @param r: RCODE value to encode.
+ * @param qinfo: if not NULL, the query is included.
+ * @param qid: query ID to set in packet. network order.
+ * @param qflags: original query flags (to copy RD and CD bits). host order.
+ * @param edns: if not NULL, this is the query edns info,
+ * and an edns reply is attached. Only attached if EDNS record fits reply.
+ */
+void fixed_address_encode(struct sldns_buffer* pkt, int r, struct query_info* qinfo,
+ uint16_t qid, uint16_t qflags, struct edns_data* edns, char* address);
#endif /* UTIL_DATA_MSGENCODE_H */
Binary file not shown.
+148
View File
@@ -0,0 +1,148 @@
>From cc9b927f8f29d989ddb8415fe6508a538546abca Mon Sep 17 00:00:00 2001
From: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
Date: Wed, 2 Jan 2019 22:52:51 -0800
Subject: [PATCH] Add unbound-fuzzme.
This is a small program that simply parses a packet provided on stdout,
for the purposes of fuzzing.
---
.gitignore | 1 +
Makefile.in | 22 ++++++++++++++++++++--
smallapp/unbound-fuzzme.c | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 2 deletions(-)
create mode 100644 smallapp/unbound-fuzzme.c
diff --git a/.gitignore b/.gitignore
index f4527fd8..6163f905 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@
/unbound-checkconf
/unbound-control
/unbound-control-setup
+/unbound-fuzzme
/unbound-host
/unbound.h
/asynclook
diff --git a/Makefile.in b/Makefile.in
index af5b10f6..dacf1ab5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -177,6 +177,10 @@ shm_main.lo remote.lo stats.lo unbound.lo \
worker.lo @WIN_DAEMON_OBJ@
DAEMON_OBJ_LINK=$(DAEMON_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \
$(COMPAT_OBJ) @WIN_DAEMON_OBJ_LINK@
+FUZZME_SRC=smallapp/unbound-fuzzme.c
+FUZZME_OBJ=unbound-fuzzme.lo
+FUZZME_OBJ_LINK=$(FUZZME_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \
+$(COMPAT_OBJ)
CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c
CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo
CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) $(SLDNS_OBJ) \
@@ -252,6 +256,7 @@ RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \
rsrc_unbound_checkconf.o
ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \
+ $(FUZZME_SRC) \
$(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) \
$(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \
$(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \
@@ -259,6 +264,7 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \
$(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC)\
$(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC)
ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \
+ $(FUZZME_OBJ) \
$(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \
$(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \
$(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \
@@ -274,7 +280,7 @@ LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFL
all: $(COMMON_OBJ) $(ALLTARGET)
-alltargets: unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET)
+alltargets: unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup unbound-fuzzme$(EXEEXT) $(WINAPPS) $(PYUNBOUND_TARGET)
# compat with BSD make, register suffix, and an implicit rule to actualise it.
.SUFFIXES: .lo
@@ -325,6 +331,9 @@ libunbound.la: $(LIBUNBOUND_OBJ_LINK)
unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la
$(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS)
+unbound-fuzzme$(EXEEXT): $(FUZZME_OBJ_LINK) libunbound.la
+ $(LINK) -o $@ $(FUZZME_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS)
+
unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la
$(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS)
@@ -447,7 +456,7 @@ util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y
clean:
rm -f *.o *.d *.lo *~ tags
- rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
+ rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-fuzzme$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
rm -f $(ALL_SRC:.c=.lint)
rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py
rm -rf autom4te.cache .libs build doc/html doc/xml
@@ -1183,6 +1192,15 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s
$(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \
$(srcdir)/util/rtt.h $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h \
$(srcdir)/validator/val_neg.h
+unbound-fuzzme.lo unbound-fuzzme.o: $(srcdir)/smallapp/unbound-fuzzme.c \
+ $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \
+ $(srcdir)/daemon/remote.h $(srcdir)/util/config_file.h \
+ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h \
+ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/cache/rrset.h \
+ $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \
+ $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h \
+ $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \
+ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h
unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \
$(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \
$(srcdir)/daemon/remote.h \
diff --git a/smallapp/unbound-fuzzme.c b/smallapp/unbound-fuzzme.c
new file mode 100644
index 00000000..74ae5204
--- /dev/null
+++ b/smallapp/unbound-fuzzme.c
@@ -0,0 +1,38 @@
+/*
+ * unbound-fuzzme.c - parse a packet provided on stdin (for fuzzing).
+ *
+ */
+#include "config.h"
+#include "util/regional.h"
+#include "util/fptr_wlist.h"
+#include "sldns/sbuffer.h"
+
+#define SZ 10000
+
+int main() {
+ char buffer[SZ];
+ size_t n_read = fread(buffer, 1, SZ, stdin);
+ if (n_read == SZ) {
+ printf("input too big\n");
+ return 1;
+ }
+ sldns_buffer *pkt = sldns_buffer_new(n_read);
+ sldns_buffer_init_frm_data(pkt, buffer, n_read);
+
+ struct regional *region = regional_create();
+
+ struct msg_parse* prs;
+ struct edns_data edns;
+ prs = (struct msg_parse*)malloc(sizeof(struct msg_parse));
+ if(!prs) {
+ printf("out of memory on incoming message\n");
+ return 1;
+ }
+ memset(prs, 0, sizeof(*prs));
+ memset(&edns, 0, sizeof(edns));
+ sldns_buffer_set_position(pkt, 0);
+ if(parse_packet(pkt, prs, region) != LDNS_RCODE_NOERROR) {
+ printf("parse error\n");
+ return 1;
+ }
+}
--
2.17.1
+77
View File
@@ -0,0 +1,77 @@
#!/usr/bin/env python
import hashlib
import sys
import struct
import socket
import time
from optparse import OptionParser
import dns.message
import dns.name
import dns.rdataclass
import dns.rdatatype
def _calc_hashkey(qname, secret, qtype):
qclass = 'IN' # CLASS is fixed for simplicity
hobj = hashlib.sha256()
hobj.update(dns.name.from_text(qname).to_wire())
hobj.update(struct.pack('HH',
socket.htons(dns.rdatatype.from_text(qtype)),
socket.htons(dns.rdataclass.from_text(qclass))))
hobj.update(secret)
return hobj.hexdigest().upper()
def _redis_get(options, key):
import redis
return redis.Redis(options.address, int(options.port)).get(key)
def _dump_value(options, qname, key, value):
print(';; query=%s/IN/%s' % (qname, options.qtype))
print(';; key=%s' % key)
if value is None:
print(';; no value')
return
if len(value) < 16:
print(';; broken value, short length: %d' % len(value))
return
now = int(time.time())
timestamp = struct.unpack('!Q', value[-16:-8])[0]
expire = struct.unpack('!Q', value[-8:])[0]
print(';; Now=%d, TimeStamp=%d, Expire=%d, TTL=%d' %
(now, timestamp, expire, max(expire - now, 0)))
print(dns.message.from_wire(value[:-16]))
def main():
parser = OptionParser(usage='usage: %prog [options] query_name')
parser.add_option("-a", "--address", dest="address", action="store",
default='127.0.0.1', help="backend-server address",
metavar='ADDRESS')
parser.add_option("-b", "--backend", dest="backend", action="store",
default='redis', help="backend name",
metavar='BACKEND')
parser.add_option("-p", "--port", dest="port", action="store",
default='6379', help="backend-server port",
metavar='PORT')
parser.add_option("-s", "--secret", dest="secret", action="store",
default='default', help="secret seed", metavar='SECRET')
parser.add_option("-t", "--qtype", dest="qtype", action="store",
default='A', help="query RR type", metavar='QTYPE')
(options, args) = parser.parse_args()
if len(args) < 1:
parser.error('qname is missing')
if options.backend == 'redis':
get_func = _redis_get
else:
raise Exception('unknown backend name: %s\n' % options.backend)
key = _calc_hashkey(args[0], options.secret, options.qtype)
value = get_func(options, key)
_dump_value(options, args[0], key, value)
if __name__ == '__main__':
try:
main()
except Exception as e:
sys.stderr.write('%s\n' % e)
exit(1)
+7 -7
View File
@@ -39,13 +39,13 @@ start() {
# setup root jail
if [ -s /etc/localtime ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then
if [ ! -e ${rootdir}/etc/localtime ] || ! /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then
cp -fp /etc/localtime ${rootdir}/etc/localtime
fi;
fi;
if [ -s /etc/resolv.conf ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then
if [ ! -e ${rootdir}/etc/resolv.conf ] || ! /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then
cp -fp /etc/resolv.conf ${rootdir}/etc/resolv.conf
fi;
fi;
@@ -54,10 +54,10 @@ start() {
[ -e ${rootdir}/dev/log ] || touch ${rootdir}/dev/log
mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1;
fi;
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; then
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/urandom' /proc/mounts; then
[ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ;
[ -e ${rootdir}/dev/random ] || touch ${rootdir}/dev/random
mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1;
[ -e ${rootdir}/dev/urandom ] || touch ${rootdir}/dev/urandom
mount --bind -n /dev/urandom ${rootdir}/dev/urandom >/dev/null 2>&1;
fi;
# if not running, start it up here
@@ -78,8 +78,8 @@ stop() {
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then
umount ${rootdir}/dev/log >/dev/null 2>&1
fi;
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; then
umount ${rootdir}/dev/random >/dev/null 2>&1
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/urandom' /proc/mounts; then
umount ${rootdir}/dev/urandom >/dev/null 2>&1
fi;
return $retval
}
+2 -2
View File
@@ -42,7 +42,7 @@ start() {
cp -fp /etc/localtime ${rootdir}/etc/localtime
fi;
mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1;
mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1;
mount --bind -n /dev/urandom ${rootdir}/dev/urandom >/dev/null 2>&1;
mount --bind -n /var/run/unbound ${rootdir}/var/run/unbound >/dev/null 2>&1;
# if not running, start it up here
@@ -58,7 +58,7 @@ stop() {
killproc -p $pidfile unbound
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
for mountfile in /dev/log /dev/random /etc/localtime /etc/resolv.conf /var/run/unbound
for mountfile in /dev/log /dev/urandom /etc/localtime /etc/resolv.conf /var/run/unbound
do
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}''${mountfile}'' /proc/mounts; then
umount ${rootdir}$mountfile >/dev/null 2>&1
+89
View File
@@ -0,0 +1,89 @@
; For further details about the directives used in this unit file, including
; the below, please refer to systemd's official documentation, available at
; https://www.freedesktop.org/software/systemd/man/systemd.exec.html.
;
;
; - `ProtectSystem=strict` implies we mount the entire file system hierarchy
; read-only for the processes invoked by the unit except for the API file
; system subtrees /dev, /proc and /sys (which are protected by
; PrivateDevices=, ProtectKernelTunables=, ProtectControlGroups=).
;
; - `PrivateTmp=yes` secures access to temporary files of the process, and
; makes sharing between processes via /tmp or /var/tmp impossible.
;
; - `ProtectHome=yes` makes the directories /home, /root, and /run/user
; inaccessible and empty for processes invoked by the unit.
;
; - `ProtectControlGroups=yes` makes the Linux Control Groups hierarchies
; (accessible through /sys/fs/cgroup) read-only to all processes invoked by
; the unit. It also implies `MountAPIVFS=yes`.
;
; - `RuntimeDirectory=unbound` creates a /run/unbound directory, owned by the
; unit User and Group with read-write permissions (0755) as soon as the
; unit starts. This allows unbound to store its pidfile. The directory and
; its content are automatically removed by systemd when the unit stops.
;
; - `NoNewPrivileges=yes` ensures that the service process and all its
; children can never gain new privileges through execve().
;
; - `RestrictSUIDSGID=yes` ensures that any attempts to set the set-user-ID
; (SUID) or set-group-ID (SGID) bits on files or directories will be denied.
;
; - `RestrictRealTime=yes` ensures that any attempts to enable realtime
; scheduling in a process invoked by the unit will be denied.
;
; - `RestrictNamespaces=yes` ensures that access to any kind of namespacing
; is prohibited.
;
; - `LockPersonality=yes` locks down the personality system call so that the
; kernel execution domain may not be changed from the default.
;
;
[Unit]
Description=Validating, recursive, and caching DNS resolver
Documentation=man:unbound(8)
After=network-online.target
Before=nss-lookup.target
Wants=network-online.target nss-lookup.target
[Install]
WantedBy=multi-user.target
[Service]
ExecReload=+/bin/kill -HUP $MAINPID
ExecStart=@UNBOUND_SBIN_DIR@/unbound -d -p
NotifyAccess=main
Type=notify
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_SYS_RESOURCE CAP_NET_RAW
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectHome=true
ProtectClock=true
ProtectControlGroups=true
ProtectKernelLogs=true
ProtectKernelModules=true
# This breaks using socket options like 'so-rcvbuf'. Explicitly disable for visibility.
ProtectKernelTunables=false
ProtectProc=invisible
ProtectSystem=strict
RuntimeDirectory=unbound
ConfigurationDirectory=unbound
StateDirectory=unbound
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictRealtime=true
SystemCallArchitectures=native
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module mount @obsolete @resources
RestrictNamespaces=yes
LockPersonality=yes
RestrictSUIDSGID=yes
ReadWritePaths=@UNBOUND_RUN_DIR@ @UNBOUND_CHROOT_DIR@
# Below rules are needed when chroot is enabled (usually it's enabled by default).
# If chroot is disabled like chroot: "" then they may be safely removed.
TemporaryFileSystem=@UNBOUND_CHROOT_DIR@/dev:ro
TemporaryFileSystem=@UNBOUND_CHROOT_DIR@/run:ro
BindReadOnlyPaths=-/run/systemd/notify:@UNBOUND_CHROOT_DIR@/run/systemd/notify
BindReadOnlyPaths=-/dev/urandom:@UNBOUND_CHROOT_DIR@/dev/urandom
BindPaths=-/dev/log:@UNBOUND_CHROOT_DIR@/dev/log
+6
View File
@@ -0,0 +1,6 @@
[Socket]
ListenDatagram=127.0.0.1:1153
ListenStream=127.0.0.1:1153
# ListenStream=@UNBOUND_RUN_DIR@/control
[Install]
WantedBy=sockets.target
+13 -7
View File
@@ -1,15 +1,14 @@
Summary: Validating, recursive, and caching DNS resolver
Name: unbound
Version: 1.4.8
Version: 1.13.1
Release: 1%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/unbound/
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
Source: http://www.nlnetlabs.nl/downloads/unbound/%{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, expat-devel, ldns-devel
BuildRequires: flex, openssl-devel, expat-devel
%description
Unbound is a validating, recursive, and caching DNS resolver.
@@ -42,7 +41,7 @@ install -d 0700 %{buildroot}%{_localstatedir}/%{name}
install -d 0755 %{buildroot}%{_initrddir}
install -m 0755 contrib/unbound.init %{buildroot}%{_initrddir}/unbound
# add symbolic link from /etc/unbound.conf -> /var/unbound/unbound.conf
ln -s %{_localstatedir}/unbound/unbound.conf %{buildroot}%{_sysconfdir}/unbound.conf
ln -s ../%{_localstatedir}/unbound/unbound.conf %{buildroot}%{_sysconfdir}/unbound.conf
# remove static library from install (fedora packaging guidelines)
rm -f %{buildroot}%{_libdir}/libunbound.a %{buildroot}%{_libdir}/libunbound.la
@@ -55,11 +54,12 @@ rm -rf ${RPM_BUILD_ROOT}
%attr(0755,root,root) %{_initrddir}/%{name}
%attr(0700,%{name},%{name}) %dir %{_localstatedir}/%{name}
%attr(0644,%{name},%{name}) %config(noreplace) %{_localstatedir}/%{name}/unbound.conf
%attr(0644,%{name},%{name}) %config(noreplace) %{_sysconfdir}/unbound.conf
%config(noreplace) %{_sysconfdir}/unbound.conf
%{_sbindir}/*
%{_mandir}/*/*
%{_includedir}/*
%{_libdir}/libunbound*
%{_libdir}/pkgconfig/libunbound*
%pre
getent group unbound >/dev/null || groupadd -r unbound
@@ -89,7 +89,13 @@ if [ "$1" -ge "1" ]; then
fi
%changelog
* Thu Jul 13 2011 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.4.8
* Thu Jun 10 2021 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.13.1
- ldns and ldns-devel no longer required. Fixed date. Version to 1.13.1.
- Removed symlink attr mode, made unbound.conf symlink relative.
- Added pkgconfig/libunbound.pc to the packaged files.
- fixed download url to nlnetlabs.nl download.
* Wed 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
+6 -13
View File
@@ -18,7 +18,6 @@ Source2: unbound.conf
Source3: unbound.munin
Source4: unbound_munin_
Source5: root.key
Source6: dlv.isc.org.key
Patch1: unbound-1.2-glob.patch
Group: System Environment/Daemons
@@ -140,7 +139,6 @@ rm -rf ${RPM_BUILD_ROOT}
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
%ghost %attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/root.key
%{_sbindir}/*
%{_mandir}/*/*
@@ -178,11 +176,6 @@ exit 0
%post
/sbin/chkconfig --add %{name}
# dnssec-conf used to contain our DLV key, but now we include it via unbound
# If unbound had previously been configured with dnssec-configure, we need
# to migrate the location of the DLV key file (to keep DLV enabled, and because
# unbound won't start with a bad location for a DLV key file.
sed -i "s:/etc/pki/dnssec-keys[/]*dlv:/etc/unbound:" %{_sysconfdir}/unbound/unbound.conf
%post libs -p /sbin/ldconfig
@@ -280,7 +273,7 @@ fi
- Change make/configure lines to attempt to fix -lphtread linking issue
* Thu Feb 18 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-2
- Removed dependancy for dnssec-conf
- 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]
@@ -319,7 +312,7 @@ fi
- Re-enabled glob.patch
* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-7
- unbound-iterator.patch was not commited
- 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
@@ -345,11 +338,11 @@ fi
* Wed Jan 14 2009 Paul Wouters <paul@xelerance.com - 1.2.0-1
- Updated to 1.2.0
- Added dependancy on minimum SSL for CVE-2008-5077
- Added dependancy on bc for unbound-munin
- Added 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 dependancy on selinux-policy (will get used when available)
- 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
@@ -430,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.
+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.
+146 -133
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.
#
@@ -12,7 +14,6 @@
# Run the command unbound-control-setup to generate the key files.
#
# Environment variables for this script
# statefile - where to put temporary statefile.
# unbound_conf - where the unbound.conf file is located.
# unbound_control - where to find unbound-control executable.
# spoof_warn - what level to warn about spoofing
@@ -22,7 +23,6 @@
# with:
# [unbound*]
# user root
# env.statefile /usr/local/var/munin/plugin-state/unbound-state
# env.unbound_conf /usr/local/etc/unbound/unbound.conf
# env.unbound_control /usr/local/sbin/unbound-control
# env.spoof_warn 1000
@@ -45,9 +45,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
@@ -64,7 +64,6 @@ System with unbound daemon.
[unbound*]
user root
env.statefile /usr/local/var/munin/plugin-state/unbound-state
env.unbound_conf /usr/local/etc/unbound/unbound.conf
env.unbound_control /usr/local/sbin/unbound-control
env.spoof_warn 1000
@@ -96,7 +95,8 @@ BSD
=cut
state=${statefile:-/usr/local/var/munin/plugin-state/unbound-state}
state="${MUNIN_PLUGSTATE}/unbound.state"
seentags="${MUNIN_PLUGSTATE}/unbound-seentags.state"
conf=${unbound_conf:-/usr/local/etc/unbound/unbound.conf}
ctrl=${unbound_control:-/usr/local/sbin/unbound-control}
warn=${spoof_warn:-1000}
@@ -119,12 +119,24 @@ get_value ( ) {
fi
}
# Update list of seen query types etc to seentags file. This is run while
# holding the lock, after the state file is updated.
update_seentags() {
tmplist="$(cat ${seentags} 2> /dev/null)
num.query.type.A
num.query.class.IN
num.query.opcode.QUERY
num.answer.rcode.NOERROR
"
(echo "${tmplist}"; grep ^num ${state} | sed -e 's/=.*//') | sort -u > ${seentags}
}
# download the state from the unbound server.
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
# 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
@@ -148,7 +160,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
@@ -166,17 +178,18 @@ get_state ( ) {
rm -f $lock
exit 1
fi
update_seentags
rm -f $lock
}
if test "$1" = "autoconf" ; then
if test ! -f $conf; then
echo no "($conf does not exist)"
exit 1
exit 0
fi
if test ! -d `dirname $state`; then
echo no "($state directory does not exist)"
exit 1
echo no "(`dirname $state` directory does not exist)"
exit 0
fi
echo yes
exit 0
@@ -208,6 +221,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
}
@@ -216,6 +230,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
@@ -226,20 +241,24 @@ 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_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
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
for x in `grep "^thread[0-9][0-9]*\.num\.queries=" $state |
sed -e 's/=.*//'`; do
exist_config $x "queries handled by `basename $x .num.queries`"
done
p_config "total.num.queries" "total queries from clients"
p_config "total.num.cachehits" "cache hits"
p_config "total.num.prefetch" "cache prefetch"
p_config "num.query.tcp" "TCP queries"
p_config "num.query.ipv6" "IPv6 queries"
p_config "unwanted.queries" "queries that failed acl"
p_config "unwanted.replies" "unwanted or unsolicited replies"
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.udpout" "UDP out queries" "ABSOLUTE"
p_config "num.query.tls" "TLS queries" "ABSOLUTE"
p_config "num.query.tls.resume" "TLS resumes" "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."
@@ -248,136 +267,152 @@ 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_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"
echo "graph_scale no"
echo "graph_category dns"
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)
echo "graph_title Unbound memory usage"
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"
echo "graph_category dns"
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_category DNS"
for x in `grep "^num.query.type" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
for nm in `grep "^num.query.type" $seentags`; do
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_category DNS"
for x in `grep "^num.query.class" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
for nm in `grep "^num.query.class" $seentags`; do
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_category DNS"
for x in `grep "^num.query.opcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
for nm in `grep "^num.query.opcode" $seentags`; do
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_category DNS"
for x in `grep "^num.answer.rcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
echo "graph_vlabel answer packets / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
for nm in `grep "^num.answer.rcode" $seentags`; do
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_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"
echo "graph_vlabel queries / \${graph_period}"
echo "graph_scale no"
echo "graph_category dns"
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_category DNS"
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."
@@ -398,20 +433,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 . _`
@@ -419,15 +440,24 @@ 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 \
for x in `grep "^thread[0-9][0-9]*\.num\.queries=" $state |
sed -e 's/=.*//'` total.num.queries \
total.num.cachehits total.num.prefetch num.query.tcp \
num.query.ipv6 unwanted.queries unwanted.replies; do
num.query.tcpout num.query.udpout num.query.tls num.query.tls.resume \
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
;;
@@ -438,60 +468,43 @@ queue)
done
;;
memory)
mn=`echo mem.total.sbrk | sed $ABBREV | tr . _`
get_value 'mem.total.sbrk'
if test $value -eq 0; then
chk=`echo $ctrl | sed -e 's/-control$/-checkconf/'`
pidf=`$chk -o pidfile $conf 2>&1`
pid=`cat $pidf 2>&1`
value=`ps -p "$pid" -o rss= 2>&1`
if test "`expr $value + 1 - 1 2>&1`" -eq "$value" 2>&1; then
value=`expr $value \* 1024`
else
value=0
fi
fi
echo "$mn.value" $value
for x in mem.cache.rrset mem.cache.message \
mem.mod.iterator mem.mod.validator; do
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
for nm in `grep "^num.query.type" $seentags`; do
print_value $nm
done
;;
by_class)
for x in `grep "^num.query.class" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
for nm in `grep "^num.query.class" $seentags`; do
print_value $nm
done
;;
by_opcode)
for x in `grep "^num.query.opcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
for nm in `grep "^num.query.opcode" $seentags`; do
print_value $nm
done
;;
by_rcode)
for x in `grep "^num.answer.rcode" $state`; do
nm=`echo $x | sed -e 's/=.*$//'`
print_qps_line $nm $x
for nm in `grep "^num.answer.rcode" $seentags`; do
print_value $nm
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 \
@@ -513,21 +526,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 \
@@ -548,6 +561,6 @@ histogram)
get_value $x
r=`expr $r + $value`
done
echo h16s.value `echo scale=6';' $r / $elapsed | bc `
echo h16s.value $r
;;
esac
+49
View File
@@ -0,0 +1,49 @@
; This unit file is provided to run unbound as portable service.
; https://systemd.io/PORTABLE_SERVICES/
;
; To use this unit file, please make sure you either compile unbound with the
; following options:
;
; - --with-chroot-dir=""
;
; Or put the following options in your unbound configuration file:
;
; - chroot: ""
;
;
[Unit]
Description=Validating, recursive, and caching DNS resolver
Documentation=man:unbound(8)
After=network.target
Before=network-online.target nss-lookup.target
Wants=nss-lookup.target
[Install]
WantedBy=multi-user.target
[Service]
ExecReload=+/bin/kill -HUP $MAINPID
ExecStart=@UNBOUND_SBIN_DIR@/unbound -d -p
NotifyAccess=main
Type=notify
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_SYS_RESOURCE CAP_NET_RAW
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectHome=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectSystem=strict
RuntimeDirectory=unbound
ConfigurationDirectory=unbound
StateDirectory=unbound
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
RestrictRealtime=true
SystemCallArchitectures=native
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module mount @obsolete @resources
RestrictNamespaces=yes
LockPersonality=yes
RestrictSUIDSGID=yes
BindPaths=/run/systemd/notify
BindReadOnlyPaths=/dev/log /run/systemd/journal/socket /run/systemd/journal/stdout
Binary file not shown.
+1 -1
View File
@@ -27,7 +27,7 @@ notify_cmd="nc localhost 1234"
# first the daemon itself, then the controller for the daemon.
reporter_daemon() {
trap "rm -f \"$pidfile\"" EXIT
tail -f $logfile | grep "unbound.*info: validation failure" | \
tail -F $logfile | grep --line-buffered "unbound.*info: validation failure" | \
while read x; do
echo "$x" | $notify_cmd
done
+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
+693 -46
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,8 +45,11 @@
#include "util/log.h"
#include "util/config_file.h"
#include "util/net_help.h"
#include "services/localzone.h"
#include "services/listen_dnsport.h"
#include "sldns/str2wire.h"
struct acl_list*
struct acl_list*
acl_list_create(void)
{
struct acl_list* acl = (struct acl_list*)calloc(1,
@@ -61,30 +64,55 @@ acl_list_create(void)
return acl;
}
void
void
acl_list_delete(struct acl_list* acl)
{
if(!acl)
if(!acl)
return;
regional_destroy(acl->region);
free(acl);
}
/** insert new address into acl_list structure */
static int
acl_list_insert(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen, int net, enum acl_access control,
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 node;
}
/** parse str to acl_access enum */
static int
parse_acl_access(const char* str, enum acl_access* control)
{
if(strcmp(str, "allow") == 0)
*control = acl_allow;
else if(strcmp(str, "deny") == 0)
*control = acl_deny;
else if(strcmp(str, "refuse") == 0)
*control = acl_refuse;
else if(strcmp(str, "deny_non_local") == 0)
*control = acl_deny_non_local;
else if(strcmp(str, "refuse_non_local") == 0)
*control = acl_refuse_non_local;
else if(strcmp(str, "allow_snoop") == 0)
*control = acl_allow_snoop;
else if(strcmp(str, "allow_setrd") == 0)
*control = acl_allow_setrd;
else {
log_err("access control type %s unknown", str);
return 0;
}
return 1;
}
@@ -97,23 +125,14 @@ acl_list_str_cfg(struct acl_list* acl, const char* str, const char* s2,
int net;
socklen_t addrlen;
enum acl_access control;
if(strcmp(s2, "allow") == 0)
control = acl_allow;
else if(strcmp(s2, "deny") == 0)
control = acl_deny;
else if(strcmp(s2, "refuse") == 0)
control = acl_refuse;
else if(strcmp(s2, "allow_snoop") == 0)
control = acl_allow_snoop;
else {
log_err("access control type %s unknown", str);
if(!parse_acl_access(s2, &control)) {
return 0;
}
if(!netblockstrtoaddr(str, UNBOUND_DNS_PORT, &addr, &addrlen, &net)) {
log_err("cannot parse access control: %s %s", str, s2);
return 0;
}
if(!acl_list_insert(acl, &addr, addrlen, net, control,
if(!acl_list_insert(acl, &addr, addrlen, net, control,
complain_duplicates)) {
log_err("out of memory");
return 0;
@@ -121,12 +140,281 @@ 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_str2addr(struct acl_list* acl, const char* str,
int is_interface, int port)
{
struct acl_addr* node;
struct sockaddr_storage addr;
socklen_t addrlen;
int net = (str_is_ip6(str)?128:32);
if(is_interface) {
if(!extstrtoaddr(str, &addr, &addrlen, port)) {
log_err("cannot parse interface: %s", str);
return NULL;
}
} else {
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)) && !is_interface) {
/* 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;
}
/** find or create node (NULL on error) */
static struct acl_addr*
acl_find_or_create(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen, enum acl_access control)
{
struct acl_addr* node;
int net = (addr_is_ip6(addr, addrlen)?128:32);
/* find or create node */
if(!(node=(struct acl_addr*)addr_tree_find(&acl->tree, addr,
addrlen, net))) {
/* create node;
* can override with specific access-control: cfg */
if(!(node=(struct acl_addr*)acl_list_insert(acl, addr,
addrlen, net, control, 1))) {
log_err("out of memory");
return NULL;
}
}
return node;
}
/** apply acl_interface string */
static int
acl_interface_str_cfg(struct acl_list* acl_interface, const char* iface,
const char* s2, int port)
{
struct acl_addr* node;
enum acl_access control;
if(!parse_acl_access(s2, &control)) {
return 0;
}
if(!(node=acl_find_or_create_str2addr(acl_interface, iface, 1, port))) {
log_err("cannot update ACL on non-configured interface: %s %d",
iface, port);
return 0;
}
node->control = control;
return 1;
}
struct acl_addr*
acl_interface_insert(struct acl_list* acl_interface,
struct sockaddr_storage* addr, socklen_t addrlen,
enum acl_access control)
{
return acl_find_or_create(acl_interface, addr, addrlen, control);
}
/** apply acl_tag string */
static int
acl_list_tags_cfg(struct acl_list* acl, const char* str, uint8_t* bitmap,
size_t bitmaplen, int is_interface, int port)
{
struct acl_addr* node;
if(!(node=acl_find_or_create_str2addr(acl, str, is_interface, port))) {
if(is_interface)
log_err("non-configured interface: %s", 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, int is_interface, int port)
{
struct acl_addr* node;
if(!(node=acl_find_or_create_str2addr(acl, str, is_interface, port))) {
if(is_interface)
log_err("non-configured interface: %s", 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,
int is_interface, int port)
{
struct acl_addr* node;
int tagid;
enum localzone_type t;
if(!(node=acl_find_or_create_str2addr(acl, str, is_interface, port))) {
if(is_interface)
log_err("non-configured interface: %s", 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)-2,
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,
int is_interface, int port)
{
struct acl_addr* node;
int tagid;
char* dupdata;
if(!(node=acl_find_or_create_str2addr(acl, str, is_interface, port))) {
if(is_interface)
log_err("non-configured interface: %s", 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)
static int
read_acl_list(struct acl_list* acl, struct config_str2list* acls)
{
struct config_str2list* p;
for(p = cfg->acls; p; p = p->next) {
for(p = acls; p; p = p->next) {
log_assert(p->str && p->str2);
if(!acl_list_str_cfg(acl, p->str, p->str2, 1))
return 0;
@@ -134,21 +422,124 @@ read_acl_list(struct acl_list* acl, struct config_file* cfg)
return 1;
}
int
acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg)
/** read acl view config */
static int
read_acl_view(struct acl_list* acl, struct config_str2list** acl_view,
struct views* v)
{
struct config_str2list* np, *p = *acl_view;
*acl_view = NULL;
while(p) {
log_assert(p->str && p->str2);
if(!acl_list_view_cfg(acl, p->str, p->str2, v, 0, 0)) {
config_deldblstrlist(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 tags config */
static int
read_acl_tags(struct acl_list* acl, struct config_strbytelist** acl_tags)
{
struct config_strbytelist* np, *p = *acl_tags;
*acl_tags = NULL;
while(p) {
log_assert(p->str && p->str2);
if(!acl_list_tags_cfg(acl, p->str, p->str2, p->str2len, 0, 0)) {
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 tag actions config */
static int
read_acl_tag_actions(struct acl_list* acl, struct config_file* cfg,
struct config_str3list** acl_tag_actions)
{
struct config_str3list* p, *np;
p = *acl_tag_actions;
*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, 0, 0)) {
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** acl_tag_datas)
{
struct config_str3list* p, *np;
p = *acl_tag_datas;
*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,
0, 0)) {
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,
struct views* v)
{
regional_free_all(acl->region);
addr_tree_init(&acl->tree);
if(!read_acl_list(acl, cfg))
if(!read_acl_list(acl, cfg->acls))
return 0;
if(!read_acl_view(acl, &cfg->acl_view, v))
return 0;
if(!read_acl_tags(acl, &cfg->acl_tags))
return 0;
if(!read_acl_tag_actions(acl, cfg, &cfg->acl_tag_actions))
return 0;
if(!read_acl_tag_datas(acl, cfg, &cfg->acl_tag_datas))
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;
/* the 'refuse' defaults for /0 are now done per interface instead */
if(!acl_list_str_cfg(acl, "127.0.0.0/8", "allow", 0))
return 0;
if(cfg->do_ip6) {
if(!acl_list_str_cfg(acl, "::0/0", "refuse", 0))
return 0;
if(!acl_list_str_cfg(acl, "::1", "allow", 0))
return 0;
if(!acl_list_str_cfg(acl, "::ffff:127.0.0.1", "allow", 0))
@@ -158,19 +549,275 @@ acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg)
return 1;
}
enum acl_access
acl_list_lookup(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen)
int
acl_interface_compare(const void* k1, const void* k2)
{
struct acl_addr* r = (struct acl_addr*)addr_tree_lookup(&acl->tree,
addr, addrlen);
if(r) return r->control;
struct addr_tree_node* n1 = (struct addr_tree_node*)k1;
struct addr_tree_node* n2 = (struct addr_tree_node*)k2;
return sockaddr_cmp(&n1->addr, n1->addrlen, &n2->addr,
n2->addrlen);
/* We don't care about comparing node->net. All addresses in the
* acl_interface tree have either 32 (ipv4) or 128 (ipv6). */
}
void
acl_interface_init(struct acl_list* acl_interface)
{
regional_free_all(acl_interface->region);
/* We want comparison in the tree to include only address and port.
* We don't care about comparing node->net. All addresses in the
* acl_interface->tree should have either 32 (ipv4) or 128 (ipv6).
* Initialise with the appropriate compare function but keep treating
* it as an addr_tree. */
addr_tree_addrport_init(&acl_interface->tree);
}
static int
read_acl_interface_action(struct acl_list* acl_interface,
struct config_str2list* acls, int port)
{
struct config_str2list* p;
for(p = acls; p; p = p->next) {
char** resif = NULL;
int num_resif = 0;
int i;
log_assert(p->str && p->str2);
if(!resolve_interface_names(&p->str, 1, NULL, &resif, &num_resif))
return 0;
for(i = 0; i<num_resif; i++) {
if(!acl_interface_str_cfg(acl_interface, resif[i], p->str2, port)){
config_del_strarray(resif, num_resif);
return 0;
}
}
config_del_strarray(resif, num_resif);
}
return 1;
}
/** read acl view config for interface */
static int
read_acl_interface_view(struct acl_list* acl_interface,
struct config_str2list** acl_view,
struct views* v, int port)
{
struct config_str2list* np, *p = *acl_view;
*acl_view = NULL;
while(p) {
char** resif = NULL;
int num_resif = 0;
int i;
log_assert(p->str && p->str2);
if(!resolve_interface_names(&p->str, 1, NULL, &resif, &num_resif)) {
config_deldblstrlist(p);
return 0;
}
for(i = 0; i<num_resif; i++) {
if(!acl_list_view_cfg(acl_interface, resif[i], p->str2,
v, 1, port)) {
config_del_strarray(resif, num_resif);
config_deldblstrlist(p);
return 0;
}
}
config_del_strarray(resif, num_resif);
/* 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 tags config for interface */
static int
read_acl_interface_tags(struct acl_list* acl_interface,
struct config_strbytelist** acl_tags, int port)
{
struct config_strbytelist* np, *p = *acl_tags;
*acl_tags = NULL;
while(p) {
char** resif = NULL;
int num_resif = 0;
int i;
log_assert(p->str && p->str2);
if(!resolve_interface_names(&p->str, 1, NULL, &resif, &num_resif)) {
config_del_strbytelist(p);
return 0;
}
for(i = 0; i<num_resif; i++) {
if(!acl_list_tags_cfg(acl_interface, resif[i], p->str2,
p->str2len, 1, port)) {
config_del_strbytelist(p);
config_del_strarray(resif, num_resif);
return 0;
}
}
config_del_strarray(resif, num_resif);
/* 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 for interface*/
static int
read_acl_interface_tag_actions(struct acl_list* acl_interface,
struct config_file* cfg,
struct config_str3list** acl_tag_actions, int port)
{
struct config_str3list* p, *np;
p = *acl_tag_actions;
*acl_tag_actions = NULL;
while(p) {
char** resif = NULL;
int num_resif = 0;
int i;
log_assert(p->str && p->str2 && p->str3);
if(!resolve_interface_names(&p->str, 1, NULL, &resif, &num_resif)) {
config_deltrplstrlist(p);
return 0;
}
for(i = 0; i<num_resif; i++) {
if(!acl_list_tag_action_cfg(acl_interface, cfg,
resif[i], p->str2, p->str3, 1, port)) {
config_deltrplstrlist(p);
config_del_strarray(resif, num_resif);
return 0;
}
}
config_del_strarray(resif, num_resif);
/* 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 for interface */
static int
read_acl_interface_tag_datas(struct acl_list* acl_interface,
struct config_file* cfg,
struct config_str3list** acl_tag_datas, int port)
{
struct config_str3list* p, *np;
p = *acl_tag_datas;
*acl_tag_datas = NULL;
while(p) {
char** resif = NULL;
int num_resif = 0;
int i;
log_assert(p->str && p->str2 && p->str3);
if(!resolve_interface_names(&p->str, 1, NULL, &resif, &num_resif)) {
config_deltrplstrlist(p);
return 0;
}
for(i = 0; i<num_resif; i++) {
if(!acl_list_tag_data_cfg(acl_interface, cfg,
resif[i], p->str2, p->str3, 1, port)) {
config_deltrplstrlist(p);
config_del_strarray(resif, num_resif);
return 0;
}
}
config_del_strarray(resif, num_resif);
/* 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_interface_apply_cfg(struct acl_list* acl_interface, struct config_file* cfg,
struct views* v)
{
if(!read_acl_interface_action(acl_interface, cfg->interface_actions,
cfg->port))
return 0;
if(!read_acl_interface_view(acl_interface, &cfg->interface_view, v,
cfg->port))
return 0;
if(!read_acl_interface_tags(acl_interface, &cfg->interface_tags,
cfg->port))
return 0;
if(!read_acl_interface_tag_actions(acl_interface, cfg,
&cfg->interface_tag_actions, cfg->port))
return 0;
if(!read_acl_interface_tag_datas(acl_interface, cfg,
&cfg->interface_tag_datas, cfg->port))
return 0;
addr_tree_init_parents(&acl_interface->tree);
return 1;
}
enum acl_access
acl_get_control(struct acl_addr* acl)
{
if(acl) return acl->control;
return acl_deny;
}
size_t
struct acl_addr*
acl_addr_lookup(struct acl_list* acl, struct sockaddr_storage* addr,
socklen_t addrlen)
{
return (struct acl_addr*)addr_tree_lookup(&acl->tree,
addr, addrlen);
}
size_t
acl_list_get_mem(struct acl_list* acl)
{
if(!acl) return 0;
return sizeof(*acl) + regional_get_mem(acl->region);
}
const char* acl_access_to_str(enum acl_access acl)
{
switch(acl) {
case acl_deny: return "deny";
case acl_refuse: return "refuse";
case acl_deny_non_local: return "deny_non_local";
case acl_refuse_non_local: return "refuse_non_local";
case acl_allow: return "allow";
case acl_allow_snoop: return "allow_snoop";
case acl_allow_setrd: return "allow_setrd";
default: break;
}
return "unknown";
}
void
log_acl_action(const char* action, struct sockaddr_storage* addr,
socklen_t addrlen, enum acl_access acl, struct acl_addr* acladdr)
{
char a[128], n[128];
uint16_t port;
addr_to_str(addr, addrlen, a, sizeof(a));
port = ntohs(((struct sockaddr_in*)addr)->sin_port);
if(acladdr) {
addr_to_str(&acladdr->node.addr, acladdr->node.addrlen,
n, sizeof(n));
verbose(VERB_ALGO, "%s query from %s port %d because of "
"%s/%d %s", action, a, (int)port, n, acladdr->node.net,
acl_access_to_str(acl));
} else {
verbose(VERB_ALGO, "%s query from %s port %d", action, a,
(int)port);
}
}
+96 -20
View File
@@ -21,28 +21,29 @@
* 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.
*/
/**
* \file
*
* This file keeps track of the list of clients that are allowed to
* This file keeps track of the list of clients that are allowed to
* access the server.
*/
#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,10 +56,16 @@ 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 */
acl_allow_snoop
acl_allow_snoop,
/** allow full access for recursion queries and set RD flag regardless of request */
acl_allow_setrd
};
/**
@@ -67,11 +74,11 @@ enum acl_access {
struct acl_list {
/** regional for allocation */
struct regional* region;
/**
/**
* Tree of the addresses that are allowed/blocked.
* contents of type acl_addr.
*/
rbtree_t tree;
rbtree_type tree;
};
/**
@@ -83,10 +90,25 @@ 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
* Create acl structure
* @return new structure or NULL on error.
*/
struct acl_list* acl_list_create(void);
@@ -97,23 +119,66 @@ struct acl_list* acl_list_create(void);
*/
void acl_list_delete(struct acl_list* acl);
/**
* Insert interface in the acl_list. This should happen when the listening
* interface is setup.
* @param acl_interface: acl_list to insert to.
* @param addr: interface IP.
* @param addrlen: length of the interface IP.
* @param control: acl_access.
* @return new structure or NULL on error.
*/
struct acl_addr*
acl_interface_insert(struct acl_list* acl_interface,
struct sockaddr_storage* addr, socklen_t addrlen,
enum acl_access control);
/**
* 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);
/** compare ACL interface "addr_tree" nodes (+port) */
int acl_interface_compare(const void* k1, const void* k2);
/**
* Lookup address to see its access control status.
* Initialise (also clean) the acl_interface struct.
* @param acl_interface: where to store.
*/
void acl_interface_init(struct acl_list* acl_interface);
/**
* Process interface control config.
* @param acl_interface: where to store.
* @param cfg: config options.
* @param v: views structure
* @return 0 on error.
*/
int acl_interface_apply_cfg(struct acl_list* acl_interface, struct config_file* cfg,
struct views* v);
/**
* 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.
@@ -122,4 +187,15 @@ enum acl_access acl_list_lookup(struct acl_list* acl,
*/
size_t acl_list_get_mem(struct acl_list* acl);
/*
* Get string for acl access specification
* @param acl: access type value
* @return string
*/
const char* acl_access_to_str(enum acl_access acl);
/* log acl and addr for action */
void log_acl_action(const char* action, struct sockaddr_storage* addr,
socklen_t addrlen, enum acl_access acl, struct acl_addr* acladdr);
#endif /* DAEMON_ACL_LIST_H */
+149 -229
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,118 +40,68 @@
* to text format.
*/
#include "config.h"
#include "ldns/ldns.h"
#include <openssl/ssl.h>
#include "daemon/cachedump.h"
#include "daemon/remote.h"
#include "daemon/worker.h"
#include "daemon/daemon.h"
#include "services/cache/rrset.h"
#include "services/cache/dns.h"
#include "services/cache/infra.h"
#include "services/modstack.h"
#include "services/outside_network.h"
#include "util/data/msgreply.h"
#include "util/regional.h"
#include "util/net_help.h"
#include "util/data/dname.h"
#include "util/config_file.h"
#include "iterator/iterator.h"
#include "iterator/iter_delegpt.h"
#include "iterator/iter_utils.h"
#include "iterator/iter_fwd.h"
#include "iterator/iter_hints.h"
/** convert to ldns rr */
static ldns_rr*
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 "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(RES* 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)
dump_rrset(RES* ssl, struct ub_packed_rrset_key* k,
struct packed_rrset_data* d, time_t now)
{
size_t i;
/* rd lock held by caller */
if(!k || !d) return 1;
if(k->id == 0) return 1; /* deleted */
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(RES* ssl, struct lruhash* h, time_t now)
{
struct lruhash_entry* e;
/* lruhash already locked by caller */
@@ -170,7 +120,7 @@ dump_rrset_lruhash(SSL* ssl, struct lruhash* h, uint32_t now)
/** dump rrset cache */
static int
dump_rrset_cache(SSL* ssl, struct worker* worker)
dump_rrset_cache(RES* ssl, struct worker* worker)
{
struct rrset_cache* r = worker->env.rrset_cache;
size_t slab;
@@ -189,22 +139,12 @@ dump_rrset_cache(SSL* ssl, struct worker* worker)
/** dump message to rrset reference */
static int
dump_msg_ref(SSL* ssl, struct ub_packed_rrset_key* k)
dump_msg_ref(RES* 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);
@@ -226,26 +166,17 @@ 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)
dump_msg(RES* ssl, struct query_info* k, struct reply_info* d,
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);
@@ -261,10 +192,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)) {
@@ -295,13 +226,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,
@@ -315,7 +248,7 @@ copy_msg(struct regional* region, struct lruhash_entry* e,
/** dump lruhash msg cache */
static int
dump_msg_lruhash(SSL* ssl, struct worker* worker, struct lruhash* h)
dump_msg_lruhash(RES* ssl, struct worker* worker, struct lruhash* h)
{
struct lruhash_entry* e;
struct query_info* k;
@@ -343,7 +276,7 @@ dump_msg_lruhash(SSL* ssl, struct worker* worker, struct lruhash* h)
/** dump msg cache */
static int
dump_msg_cache(SSL* ssl, struct worker* worker)
dump_msg_cache(RES* ssl, struct worker* worker)
{
struct slabhash* sh = worker->env.msg_cache;
size_t slab;
@@ -360,7 +293,7 @@ dump_msg_cache(SSL* ssl, struct worker* worker)
}
int
dump_cache(SSL* ssl, struct worker* worker)
dump_cache(RES* ssl, struct worker* worker)
{
if(!dump_rrset_cache(ssl, worker))
return 0;
@@ -371,96 +304,74 @@ 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(RES* 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(RES* 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(RES* 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;
}
status = ldns_rr_new_frm_str(&rr, (char*)ldns_buffer_begin(buf),
LDNS_DEFAULT_TTL, NULL, NULL);
if(status != LDNS_STATUS_OK) {
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",
ldns_get_errorstr_by_id(status),
(char*)ldns_buffer_begin(buf));
sldns_get_errorstr_parse(status),
(char*)sldns_buffer_begin(buf));
return 0;
}
if(is_rrsig && ldns_rr_get_type(rr) != LDNS_RR_TYPE_RRSIG) {
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*)ldns_buffer_begin(buf));
(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) {
log_warn("error cannot rr2wire: %s",
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);
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));
if(status != LDNS_STATUS_OK) {
log_warn("error cannot dname2buffer: %s",
ldns_get_errorstr_by_id(status));
ldns_rr_free(rr);
return 0;
}
ldns_buffer_flip(buf);
rk->rk.dname_len = ldns_buffer_limit(buf);
rk->rk.dname = regional_alloc_init(region,
ldns_buffer_begin(buf), ldns_buffer_limit(buf));
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) {
log_warn("error out of memory");
ldns_rr_free(rr);
return 0;
}
}
ldns_rr_free(rr);
return 1;
}
@@ -491,7 +402,7 @@ move_into_cache(struct ub_packed_rrset_key* k,
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);
@@ -507,8 +418,8 @@ move_into_cache(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];
@@ -526,13 +437,14 @@ move_into_cache(struct ub_packed_rrset_key* k,
/** load an rrset entry */
static int
load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
load_rrset(RES* 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);
@@ -554,7 +466,7 @@ 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) {
log_warn("error bad rrset spec %s", s);
return 0;
@@ -563,16 +475,20 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
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) {
@@ -605,12 +521,12 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
/** load rrset cache */
static int
load_rrset_cache(SSL* ssl, struct worker* worker)
load_rrset_cache(RES* 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;
}
@@ -619,13 +535,13 @@ 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)
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, ' ');
@@ -639,26 +555,18 @@ load_qinfo(char* str, struct query_info* qinfo, ldns_buffer* buf,
s++;
/* parse them */
status = ldns_rr_new_question_frm_str(&rr, str, NULL, NULL);
if(status != LDNS_STATUS_OK) {
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",
ldns_get_errorstr_by_id(status), str);
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) {
log_warn("error cannot dname2wire: %s",
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) {
log_warn("error out of memory");
return NULL;
@@ -669,11 +577,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(RES* 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;
@@ -686,7 +594,7 @@ load_ref(SSL* ssl, ldns_buffer* buf, struct worker* worker,
return 1;
}
s = load_qinfo(s, &qinfo, buf, region);
s = load_qinfo(s, &qinfo, region);
if(!s) {
return 0;
}
@@ -714,13 +622,14 @@ 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(RES* 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;
@@ -731,22 +640,27 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
return 0;
}
s += 4;
s = load_qinfo(s, &qinf, buf, region);
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) {
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.serve_expired_ttl = rep.ttl + SERVE_EXPIRED_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;
@@ -765,7 +679,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, 0)) {
if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL, flags,
*worker->env.now)) {
log_warn("error out of memory");
return 0;
}
@@ -774,12 +689,12 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
/** load msg cache */
static int
load_msg_cache(SSL* ssl, struct worker* worker)
load_msg_cache(RES* 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;
}
@@ -787,7 +702,7 @@ load_msg_cache(SSL* ssl, struct worker* worker)
}
int
load_cache(SSL* ssl, struct worker* worker)
load_cache(RES* ssl, struct worker* worker)
{
if(!load_rrset_cache(ssl, worker))
return 0;
@@ -798,11 +713,13 @@ load_cache(SSL* ssl, struct worker* worker)
/** print details on a delegation point */
static void
print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
print_dp_details(RES* ssl, struct worker* worker, struct delegpt* dp)
{
char buf[257];
struct delegpt_addr* a;
int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl;
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) {
@@ -814,10 +731,14 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
return;
}
/* lookup in infra cache */
delay=0;
entry_ttl = infra_get_host_rto(worker->env.infra_cache,
&a->addr, a->addrlen, &ri, &delay, *worker->env.now);
&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.\n", ri.rto))
if(!ssl_printf(ssl, "expired, rto %d msec, tA %d "
"tAAAA %d tother %d.\n", ri.rto, tA, tAAAA,
tother))
return;
continue;
}
@@ -837,18 +758,20 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
return;
continue; /* skip stuff not in infra cache */
}
if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %d, ping %d "
"var %d rtt %d",
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)))
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,
*worker->env.now, &edns_vs, &edns_lame_known, &to)) {
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"))
@@ -866,7 +789,7 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
/** print main dp info */
static void
print_dp_main(SSL* ssl, struct delegpt* dp, struct dns_msg* msg)
print_dp_main(RES* ssl, struct delegpt* dp, struct dns_msg* msg)
{
size_t i, n_ns, n_miss, n_addr, n_res, n_avail;
@@ -894,7 +817,7 @@ print_dp_main(SSL* ssl, struct delegpt* dp, struct dns_msg* msg)
return;
}
int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
int print_deleg_lookup(RES* ssl, struct worker* worker, uint8_t* nm,
size_t nmlen, int ATTR_UNUSED(nmlabs))
{
/* deep links into the iterator module */
@@ -904,18 +827,12 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
char b[260];
struct query_info qinfo;
struct iter_hints_stub* stub;
struct iter_env* ie;
regional_free_all(region);
qinfo.qname = nm;
qinfo.qname_len = nmlen;
qinfo.qtype = LDNS_RR_TYPE_A;
qinfo.qclass = LDNS_RR_CLASS_IN;
if(modstack_find(&worker->daemon->mods, "iterator") == -1) {
return ssl_printf(ssl, "error: no iterator module\n");
}
ie = (struct iter_env*)worker->env.modinfo[modstack_find(&worker->
daemon->mods, "iterator")];
qinfo.local_alias = NULL;
dname_str(nm, b);
if(!ssl_printf(ssl, "The following name servers are used for lookup "
@@ -934,13 +851,15 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
while(1) {
dp = dns_cache_find_delegation(&worker->env, nm, nmlen,
qinfo.qtype, qinfo.qclass, region, &msg,
*worker->env.now);
*worker->env.now, 0, NULL, 0);
if(!dp) {
return ssl_printf(ssl, "no delegation from "
"cache; goes to configured roots\n");
}
/* go up? */
if(iter_dp_is_useless(&qinfo, BIT_RD, dp)) {
if(iter_dp_is_useless(&qinfo, BIT_RD, dp,
(worker->env.cfg->do_ip4 && worker->back->num_ip4 != 0),
(worker->env.cfg->do_ip6 && worker->back->num_ip6 != 0))) {
print_dp_main(ssl, dp, msg);
print_dp_details(ssl, worker, dp);
if(!ssl_printf(ssl, "cache delegation was "
@@ -961,7 +880,8 @@ int print_deleg_lookup(SSL* ssl, struct worker* worker, uint8_t* nm,
continue;
}
}
stub = hints_lookup_stub(ie->hints, nm, qinfo.qclass, dp);
stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
dp);
if(stub) {
if(stub->noprime) {
if(!ssl_printf(ssl, "The noprime stub servers "

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