Commit Graph
27084 Commits
Author SHA1 Message Date
Michał Kępień 8053e6fa95 Add CHANGES entry
5047.	[bug]		Messages logged for certain query processing failures
			now include a more specific error description if it is
			available. [GL #572]

(cherry picked from commit dc531dc340)
2018-10-08 12:50:14 +02:00
Michał Kępień 2bc4c92ed4 Do not set qctx->result to DNS_R_SERVFAIL unless necessary
In some cases, setting qctx->result to DNS_R_SERVFAIL causes the value
of a 'result' variable containing a more specific failure reason to be
effectively discarded.  This may cause certain query error log messages
to lack specificity despite a more accurate problem cause being
determined during query processing.

In other cases, qctx->result is set to DNS_R_SERVFAIL even though a more
specific error (e.g. ISC_R_NOMEMORY) could be explicitly indicated.

Since the response message's RCODE is derived from qctx->result using
dns_result_torcode(), which handles a number of possible isc_result_t
values and returns SERVFAIL for anything not explicitly listed, it is
fine to set qctx->result to something more specific than DNS_R_SERVFAIL
(in fact, this is already being done in a few cases).  Modify most
QUERY_ERROR() calls so that qctx->result is set to a more specific error
code when possible.  Adjust query_error() so that statistics are still
calculated properly.  Remove the RECURSE_ERROR() macro which was
introduced exactly because qctx->result could be set to DNS_R_SERVFAIL
instead of DNS_R_DUPLICATE or DNS_R_DROP, which need special handling.
Modify dns_sdlz_putrr() so that it returns DNS_R_SERVFAIL when a DLZ
driver returns invalid RDATA, in order to prevent setting RCODE to
FORMERR (which is what dns_result_torcode() translates e.g. DNS_R_SYNTAX
to) while responding authoritatively.

(cherry picked from commit ba91243542)
2018-10-08 12:50:14 +02:00
Michał Kępień 3d0cde3fe8 Remove the 'want_stale' field from struct query_ctx
As the previous commit makes the 'want_stale' field of struct query_ctx
redundant, remove it.

(cherry picked from commit b3cd868c4b)
2018-10-08 12:50:14 +02:00
Michał Kępień 6736b08c13 Set up stale response lookup before query_done() is called
When something goes wrong while recursing for an answer to a query,
query_gotanswer() sets a flag (qctx->want_stale) in the query context.
query_done() is subsequently called and it can either set up a stale
response lookup (if serve-stale is enabled) or conclude that a SERVFAIL
response should be sent.  This may cause confusion when looking at query
error logs since the QUERY_ERROR() line responsible for setting the
response's RCODE to SERVFAIL is not in a catch-all branch of a switch
statement inside query_gotanswer() (like it is for authoritative
responses) but rather in a code branch which appears to have something
to do with serve-stale, even when the latter is not enabled.

Extract the part of query_done() responsible for checking serve-stale
configuration and optionally setting up a stale response lookup into a
separate function, query_usestale(), shifting the responsibility for
setting the response's RCODE to SERVFAIL to the same QUERY_ERROR() line
in query_gotanswer() which is evaluated for authoritative responses.

(cherry picked from commit cb48d410d8)
2018-10-08 12:50:14 +02:00
Evan Hunt e34900f6e9 Merge branch 'rpz-shutdown-crash-v9_12' into 'v9_12'
Fix crash at shutdown during an RPZ reload. [RT

See merge request isc-projects/bind9!848
2018-10-05 14:21:29 -04:00
Tony FinchandEvan Hunt b895e7eaaf Fix crash at shutdown during an RPZ reload. [RT #46210]
(cherry picked from commit 7a2b0ac92a)
2018-10-05 11:12:17 -07:00
Mark Andrews 6d028f0f75 Merge branch '578-make-the-chained-delegations-in-reclimit-behave-like-they-would-in-a-regular-name-server-v9_12' into 'v9_12'
Resolve "Make the chained delegations in reclimit behave like they would in a regular name server."

See merge request isc-projects/bind9!841
2018-10-03 23:32:01 -04:00
Mark Andrews 466f550c5c add CHANGES
(cherry picked from commit f1308ef186)
2018-10-04 13:22:06 +10:00
Mark Andrews 2a54fefea8 add bin/tests/system/reclimit/ans4/ans.pl
(cherry picked from commit ae77468e63)
2018-10-04 13:22:06 +10:00
Mark Andrews 39914dd221 reclimit: delegate to ans4 so that ans2 can behave like a real name server
(cherry picked from commit a216135a15)
2018-10-04 13:22:06 +10:00
Mark Andrews 7dbae0246c Merge branch '568-the-chain-system-test-is-missing-a-delegation-v9_12' into 'v9_12'
Resolve "the chain system test is missing a delegation."

See merge request isc-projects/bind9!838
2018-10-03 22:38:42 -04:00
Mark Andrews c3899d9b73 add CHANGES note
(cherry picked from commit e97199b0d0)
2018-10-04 12:29:35 +10:00
Mark Andrews 732521e993 chain: change nameserver name so that the delegation matches
(cherry picked from commit 848e42227e)
2018-10-04 12:29:15 +10:00
Mark Andrews 298db257c2 chain: add 'start test' messages to named.run
(cherry picked from commit 524c1317f7)
2018-10-04 12:29:15 +10:00
Mark Andrews 7b49de3a79 Merge branch 'update-log-fix-v9_12' into 'v9_12'
make update_log() work if zone is not set

See merge request isc-projects/bind9!834
2018-10-03 03:00:36 -04:00
Evan HuntandMark Andrews d67b5cd65b make update_log() work if zone is not set
- update_log() is called to log update errors, but if those errors
  occur before the zone is set (for example, when returning NOTAUTH)
  it returns without logging anything.

(cherry picked from commit 395f6a1474)
2018-10-03 02:39:02 -04:00
Mark Andrews f0cedee039 Merge branch 'irs_buflen_socklen' into 'v9_12'
Fix arch-dependent getnameinfo types

See merge request isc-projects/bind9!787
2018-10-03 02:32:52 -04:00
Petr MenšíkandMark Andrews b427dcce83 Fix arch-dependent getnameinfo types
getnameinfo() parameters are detected by configure. Current glibc uses
socklen_t for BUFLEN and int for flags. Because that parameters are
tested only as fallback, it does detect it different way on 32-bit
system. socklen_t is compatible with size_t type on these systems.
Try all variants with int flags, use unsigned flags as last resort.
2018-10-03 02:16:41 -04:00
Mark Andrews e18bb6f569 Merge branch '569-zero-system-test-failed-to-set-ret-0-and-send-output-to-dev-null-v9_12' into 'v9_12'
Resolve "zero system test failed to set ret=0 and send output to /dev/null"

See merge request isc-projects/bind9!832
2018-10-03 01:48:13 -04:00
Mark Andrews 8a0ccb54cd zero: send grep output to /dev/null; set ret=0 at start of 'check repeated recursive lookups of non recurring TTL=0 responses get new values' test so the failed subtest count is correct
(cherry picked from commit a6507af9e3)
2018-10-03 15:38:37 +10:00
Evan Hunt ff67ad06dd Merge branch '543-couple-more-windows-build-fixes-v9_12' into 'v9_12'
Couple additional Windows build fixes in VCX files

See merge request isc-projects/bind9!827
2018-10-02 13:38:59 -04:00
Thomas JachandEvan Hunt b39bd2816e Couple additional Windows build fixes in VCX files
(cherry picked from commit f2d6b1b859)
2018-10-02 13:37:03 -04:00
Mark Andrews d794576f11 Merge branch '420-reading-from-master-files-could-sometime-fail-to-preserve-the-case-of-the-owner-name-v9_12' into 'v9_12'
Resolve "reading from master files could sometime fail to preserve the case of the owner name."

See merge request isc-projects/bind9!822
2018-10-02 01:46:02 -04:00
Mark Andrews 2fc1411bfd Add CHANGES note.
(cherry picked from commit 4fcdad292d)
2018-10-02 15:22:29 +10:00
Mark Andrews 90fdf40bda improve case presevation
(cherry picked from commit 0fc1b1bffa)
2018-10-02 15:21:22 +10:00
Tinderbox User 75193660a0 Merge branch 'prep-release' into v9_12 2018-09-29 04:21:37 +00:00
Tinderbox User 7f5e4faed8 prep 9.12.3rc1 2018-09-29 04:21:11 +00:00
Evan Hunt 63d61454a9 Merge branch 'example-domain-v9_12' into 'v9_12'
use an example domain

See merge request isc-projects/bind9!820
2018-09-28 12:59:52 -04:00
Evan Hunt 1bce1f052a use an example domain
(cherry picked from commit b026663c62)
2018-09-28 09:59:28 -07:00
Evan Hunt b5e5c4b0cb Merge branch '562-chaos-addresses-v9_12' into 'v9_12'
fix chaosnet address comparison

See merge request isc-projects/bind9!817
2018-09-28 12:06:12 -04:00
Evan Hunt 6452c017f5 fix chaosnet address comparison
(cherry picked from commit b4dca44ad2)
2018-09-28 08:58:45 -07:00
Evan Hunt 7b6202dd85 Merge branch 'rpz-synth-dnssec-v9_12' into 'v9_12'
RPZ now treats covering NSEC records the same as negative answers

See merge request isc-projects/bind9!812
2018-09-27 18:31:47 -04:00
Tony FinchandEvan Hunt 98f9c5fb26 RPZ now treats covering NSEC records the same as negative answers
(cherry picked from commit 9407d9e266)
2018-09-27 15:22:43 -07:00
Evan Hunt b78cd6ed17 Merge branch '540-tsig-has-two-consecutive-spaces-when-maclen-is-0-v9_12' into 'v9_12'
Resolve "TSIG has two consecutive spaces when MACLEN is 0"

See merge request isc-projects/bind9!809
2018-09-27 17:36:51 -04:00
Mark AndrewsandEvan Hunt 3992a37c06 only emit a single space between mac length and the orginal id if the mac length is zero
(cherry picked from commit ac1c3aaa27)
2018-09-27 14:28:47 -07:00
Evan Hunt 382c3c20b3 Merge branch '503-fix-rpz-test-v9_12' into 'v9_12'
Resolve "dnsrps test no longer runs"

See merge request isc-projects/bind9!808
2018-09-27 16:40:43 -04:00
Evan Hunt 258fea16a2 CHANGES note
(cherry picked from commit b04c7bbd60)
2018-09-27 13:33:08 -07:00
Evan Hunt bd7084909b fix problems running dnsrps tests in rpz and rpzrecurse
- set up server correctly when running the second test pass
- reset stats counters before the second pass
- clean up test output

(cherry picked from commit 6d05ec7dc1)
2018-09-27 13:33:05 -07:00
Evan Hunt f181957c23 Merge branch '556-race-condition-in-timer-creation-v9_12' into 'v9_12'
Fix crash caused by race condition in timer creation

See merge request isc-projects/bind9!806
2018-09-27 16:09:03 -04:00
Zhaolong ZhangandEvan Hunt 811c5ebf92 Fix crash caused by race condition in timer creation
The race condition is the timer elapses before isc__timer_create()
returns the pointer to the caller.  Assigning the return pointer before
enabling the timer will fix it.

(cherry picked from commit 21966423cd)
2018-09-27 12:59:51 -07:00
Evan Hunt cb7420f48f Merge branch '542-prevent-a-race-after-zone-load-v9_12' into 'v9_12'
Prevent a race after zone load

See merge request isc-projects/bind9!803
2018-09-26 22:56:11 -04:00
Michał KępieńandEvan Hunt 725397cc8b Add CHANGES entry
5034.	[bug]		A race between threads could prevent zone maintenance
			scheduled immediately after zone load from being
			performed. [GL #542]

(cherry picked from commit feb2a41b7c)
2018-09-26 19:46:10 -07:00
Michał KępieńandEvan Hunt 3c43ba5fec Prevent a race after zone load
Zone loading happens in a different task (zone->loadtask) than other
zone actions (zone->task).  Thus, when zone_postload() is called in the
context of zone->loadtask, it may cause zone maintenance to be queued in
zone->task and another thread can then execute zone_maintenance() before
zone_postload() gets a chance to finish its work in the first thread.
This would not be a problem if zone_maintenance() accounted for this
possibility by locking the zone before checking the state of its
DNS_ZONEFLG_LOADPENDING flag.  However, the zone is currently not locked
before the state of that flag is checked, which may prevent zone
maintenance from happening despite zone_postload() scheduling it.  Fix
by locking the zone in zone_maintenance() before checking the state of
the zone's DNS_ZONEFLG_LOADPENDING flag.

(cherry picked from commit 56003e9f9f)
2018-09-26 19:46:09 -07:00
Evan Hunt 68ec582265 Merge branch 'fix-typo-v9_12' into 'v9_12'
fix a typo in usage output

See merge request isc-projects/bind9!797
2018-09-24 18:41:23 -04:00
Evan Hunt 5bf0e4f52d fix a typo in usage output
(cherry picked from commit e7c99e42f3)
2018-09-24 15:32:10 -07:00
Evan Hunt 974a7ccf39 Merge branch '539-shell-style-fixes-v9_12' into 'v9_12'
Resolve "rrsetorder test not portable"

See merge request isc-projects/bind9!785
2018-09-11 16:11:09 -04:00
Evan Hunt 9967c9d2b4 don't use $() in system tests
(cherry picked from commit bf9c60078a)
2018-09-11 13:03:34 -07:00
Evan Hunt 3baa05e818 Merge branch '105-nta-all-v9_12' into 'v9_12'
Resolve "[RT#44623] RNDC NTA option to add NTA to all views"

See merge request isc-projects/bind9!781
2018-09-10 16:25:28 -04:00
Evan Hunt d06a1eed7a CHANGES, release notes
(cherry picked from commit 2f6ba87ab9)
2018-09-10 13:17:19 -07:00
Evan Hunt 990f0f8a73 add -class option to rndc nta
(cherry picked from commit cc0abf62a1)
2018-09-10 13:14:21 -07:00