Commit Graph
11718 Commits
Author SHA1 Message Date
Ondřej Surý e6dc08b06c Always assume BSD4.4 msghdr version 2018-08-28 10:31:48 +02:00
Ondřej Surý 388d6db5a1 Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support 2018-08-28 10:31:48 +02:00
Ondřej Surý 3ab9c99567 Remove support for legacy systems without in6_pktinfo 2018-08-28 10:31:48 +02:00
Ondřej Surý 8c526df306 Remove support for legacy systems without sin6_scope_id 2018-08-28 10:31:48 +02:00
Ondřej Surý 4150a86046 Remove support for legacy platforms without in6addr_loopback 2018-08-28 10:31:48 +02:00
Ondřej Surý 5083a42072 Remove support for legacy systems without in6addr_any 2018-08-28 10:31:48 +02:00
Ondřej Surý b962f47d3e Remove support for pre-RFC2133 IPv6 implementation (in_addr6) 2018-08-28 10:31:48 +02:00
Ondřej Surý 7b21bbb7c1 Require IPv6 support from the OS 2018-08-28 10:31:47 +02:00
Ondřej Surý 00ca487fec We always want IPv6 2018-08-28 10:31:47 +02:00
Ondřej Surý c19713aa51 Remove support for legacy SGI IRIX 2018-08-28 10:31:47 +02:00
Ondřej Surý 9f4528c623 Remove legacy support for Compaq TruCluster 2018-08-28 10:31:47 +02:00
Ondřej Surý 02e349c051 Remove legacy support for HP-UX 2018-08-28 10:31:47 +02:00
Ondřej Surý b02de1ec30 Remove legacy support for SunOS 2018-08-28 10:31:47 +02:00
Ondřej Surý 18e3c8d232 Remove legacy support for Tru64 2018-08-28 10:31:47 +02:00
Ondřej Surý f0f71420c8 Remove legacy support for AIX 2018-08-28 10:31:47 +02:00
Ondřej Surý 9a8da1e25a Remove legacy BSD/OS support (ipv6,various hacks) 2018-08-28 10:31:47 +02:00
Ondřej Surý e53a72a649 Remove legacy UnixWare support (sigwait, ipv6) 2018-08-28 10:31:47 +02:00
Witold Kręcicki 525fd76685 Include threads.h for thread_local 2018-08-27 16:41:43 +02:00
Ondřej SurýandStephen Morris de41f0beea Cleanup couple of set-but-unused errors from Coverity 2018-08-27 10:12:19 -04:00
Ondřej SurýandStephen Morris 55361748d7 Initialize all tvresults to ISC_R_UNSET 2018-08-27 10:12:19 -04:00
Ondřej Surý 7ab228cf71 Use __declspec( thread ) for thread local storage when compiling with Visual Studio 2015 and higher 2018-08-25 13:59:26 +02:00
Witold Kręcicki 18ebcf2b30 Add runtime check on top of pthread_mutex_{lock,unlock} in rng 2018-08-25 13:26:25 +02:00
Witold Kręcicki 8c5aeb6c4c Use TLS variables to store RNG state, make RNG lockless 2018-08-25 13:26:25 +02:00
Mark Andrews 2c1d8b2e99 use sizeof(CK_SLOT_ID) 2018-08-24 11:00:39 +10:00
Mark Andrews 4742f4ecba unlink before unlock 2018-08-24 10:36:53 +10:00
Mark Andrews 1056376d10 when filter-aaaa and dns64 are both configured a assertion failure could occur 2018-08-24 09:26:54 +10:00
Ondřej Surý 31b5360943 Whitespace fixes 2018-08-23 11:39:01 +02:00
Bhargava ShastryandOndřej Surý 1c57b73e34 oss-fuzz: Improve interaction with fuzzing tools and add new tests in fuzz/ directory 2018-08-23 10:07:28 +02:00
Michał Kępień 5431583971 Fix reloading inline-signed zones
While "rndc reload" causes dns_zone_asyncload() to be called for the
signed version of an inline-signed zone, the subsequent zone_load() call
causes the raw version to be reloaded from storage.  This means that
DNS_ZONEFLG_LOADPENDING gets set for the signed version of the zone by
dns_zone_asyncload() before the reload is attempted, but zone_postload()
is only called for the raw version and thus DNS_ZONEFLG_LOADPENDING is
cleared for the raw version, but not for the signed version.  This in
turn prevents zone maintenance from happening for the signed version of
the zone.

Until commit 29b7efdd9f, this problem
remained dormant because DNS_ZONEFLG_LOADPENDING was previously
immediately, unconditionally cleared after zone loading was started
(whereas it should only be cleared when zone loading is finished or an
error occurs).  This behavior caused other issues [1] and thus had to be
changed.

Fix reloading inline-signed zones by clearing DNS_ZONEFLG_LOADPENDING
for the signed version of the zone once the raw version reload
completes.  Take care not to clear it prematurely during initial zone
load.  Also make sure that DNS_ZONEFLG_LOADPENDING gets cleared when
zone_postload() encounters an error or returns early, to prevent other
scenarios from resulting in the same problem.  Add comments aiming to
help explain code flow.

[1] see RT #47076
2018-08-22 11:28:54 +02:00
Michał Kępień 8db550c42f Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone
When an inline-signed zone is loaded, the master file for its signed
version is loaded and then a rollforward of the journal for the signed
version of the zone is performed.  If DNS_JOURNALOPT_RESIGN is not set
during the latter phase, signatures loaded from the journal for the
signed version of the zone will not be scheduled for refresh.  Fix the
conditional expression determining which flags should be used for the
dns_journal_rollforward() call so that DNS_JOURNALOPT_RESIGN is set when
zone_postload() is called for the signed version of an inline-signed
zone.

Extend bin/tests/system/stop.pl so that it can use "rndc halt" instead
of "rndc stop" as the former allows master file flushing upon shutdown
to be suppressed.
2018-08-22 10:48:07 +02:00
Michał Kępień 24b9ec555a Do not treat a referral with a non-empty ANSWER section as an error
As part of resquery_response() refactoring [1], a goto statement was
replaced [2] with a call to a new function - originally called
rctx_delegation(), now folded into rctx_answer_none() - extracted from
existing code.  However, one call site of that refactored function does
not reset the "result" variable, causing a referral with a non-empty
ANSWER section to be inadvertently treated as an error, which prevents
resolution of names reliant on servers sending such responses.  Fix by
resetting the "result" variable to ISC_R_SUCCESS when a response
containing a non-empty ANSWER section can be treated as a delegation.

[1] see RT #45362

[2] see commit e1380a16741a3b4a57e54d7a9ce09dd12691522f
2018-08-22 10:14:37 +02:00
Mark Andrews 2bb4392bb3 fix lock order reversal 2018-08-20 22:15:18 -04:00
Ondřej SurýandWitold Kręcicki c692da2182 Improve autoconf pthread detection 2018-08-16 17:18:52 +02:00
Witold Kręcicki 5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Ondřej Surý e2c938d882 Replace "config.h" with <config.h> 2018-08-16 12:45:59 +02:00
Evan Hunt eaac2057c7 option to disable validation under specified names
- added new 'validate-except' option, which configures an NTA with
  expiry of 0xffffffff.  NTAs with that value in the expiry field do not
  expire, are are not written out when saving the NTA table and are not
  dumped by rndc secroots
2018-08-14 13:28:02 -07:00
Mark AndrewsandEvan Hunt 0ce82e9d5f add missing ATF_REQUIRE 2018-08-14 09:04:16 -07:00
Michał Kępień fe20f8fe25 Do not remove errors from the OpenSSL error queue in toresult()
dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().
2018-08-14 12:49:19 +02:00
Michał Kępień 13fe763798 Prevent rare rbt_insert_and_remove unit test failures
When two or more absolute, two-label names are added to a completely
empty RBT, an extra, empty node for the root name will be created due to
node splitting.  check_tree() expects that, but the extra node will not
be created when just one name is added to a completely empty RBT.  This
problem could be handled inside check_tree(), but that would introduce
unnecessary complexity into it since adding a single name will result in
a different node count for a completely empty RBT (node count will be 1)
and an RBT containing only an empty node for the root name, created due
to prior node splitting (node count will be 2).  Thus, first explicitly
create a node for the root name to prevent rare check_tree() failures
caused by a single name being added in the first iteration of the
insert/remove loop.
2018-08-14 10:43:51 +02:00
Mark AndrewsandEvan Hunt 5dd1beec8e mempool didn't work for sizes less than sizeof(void*) 2018-08-14 03:47:14 -04:00
Michał Kępień cb40c5229a Queue "rndc signing -nsec3param ..." requests if needed
If "rndc signing -nsec3param ..." is ran for a zone which has not yet
been loaded or transferred (i.e. its "db" field is NULL), it will be
silently ignored by named despite rndc logging an "nsec3param request
queued" message, which is misleading.  Prevent this by keeping a
per-zone queue of NSEC3PARAM change requests which arrive before a zone
is loaded or transferred and processing that queue once the raw version
of an inline-signed zone becomes available.
2018-08-14 09:22:43 +02:00
Ondřej Surý ebf3083e08 Make ENOBUFS a soft error 2018-08-13 18:51:10 +02:00
Mathieu ArnoldandOndřej Surý 4c06eb20cc Don't try to install removed int.h and boolean.h headers 2018-08-13 15:30:36 +02:00
Ondřej SurýandOndřej Surý bdc9860262 Fix !!validate typo to -> !validate 2018-08-11 04:07:46 -04:00
Evan Hunt b865fb77de mismatch between defined log modules and ns_modules[] in lib/ns/log.c 2018-08-10 15:04:39 -04:00
Ondřej Surý c5040e5c9e Add @OPENSSL_LIB@ to Windows project files as needed 2018-08-10 16:45:00 +02:00
Evan Hunt 3f907b8bee caclulate nlabels and set *chainingp correctly 2018-08-08 14:33:19 -07:00
Evan Hunt cac3978af2 explicit DNAME query could trigger a crash if deny-answer-aliases was set 2018-08-08 14:33:19 -07:00
Ondřej Surý 7351c505a0 Remove duplicate config.h 2018-08-08 09:37:30 +02:00
Ondřej Surý 994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00