Commit Graph
26308 Commits
Author SHA1 Message Date
Michał KępieńandEvan Hunt 310377bccf Fix a zone database reference counting bug in dump_done()
A typo in commit d39ab7440e introduced a bug in zone database reference
counting which leads to a crash if dumping one version of a slave zone
is not finished by the time transferring a newer version from a master
completes.  Correct the typo to fix reference counting, thus preventing
crashes.

(cherry picked from commit fbd5658db7)
(cherry picked from commit f2838e68e8)
2018-05-01 16:02:29 -07:00
Evan Hunt b2307b2546 Merge branch 'remove-bind9-bugs-references' into 'v9_12_1_patch'
Update documentation to remove obsolete bind9-bugs@isc.org email address

See merge request isc-projects/bind9!111
v9.12.1
2018-03-08 12:56:40 -08:00
Ondřej SurýandEvan Hunt b6a5a9b29e Update documentation to remove obsolete bind9-bugs@isc.org email address
(cherry picked from commit efc9bc5d8d)
(cherry picked from commit 486e79050f)
2018-03-08 12:51:19 -08:00
Tinderbox User 77a22353b2 Merge branch 'prep-release' into v9_12_1_patch 2018-03-08 00:55:33 +00:00
Tinderbox User 71f67a0bf6 prep 9.12.1 2018-03-08 00:51:07 +00:00
Tinderbox User 44f2796dd6 Merge branch 'prep-release' into v9_12_1_patch 2018-03-02 21:57:33 +00:00
Tinderbox User 38be7f6d9b prep 9.12.1rc2 2018-03-02 21:53:26 +00:00
Evan Hunt f8efc9c0a4 Merge branch '124-revert-deadlock-check' into 'v9_12_1_patch'
revert cname loop test due to effects on apex CNAMEs under insecure delegations

See merge request isc-projects/bind9!95
2018-03-02 12:18:50 -08:00
Evan Hunt 06b52cc939 temporarily revert change #4859 2018-03-02 12:14:20 -08:00
Evan Hunt cd8d44403b [v9_12] copyrights v9.12.1rc1 2018-02-17 21:26:12 -08:00
Tinderbox User c964a71c76 regen v9_12 2018-02-18 04:13:10 +00:00
Evan Hunt 5254978eec [v9_12] re-prep 9.12.1rc1 to include needed fixes; update README 2018-02-17 19:54:52 -08:00
Michał Kępień ba787b3a57 Merge branch 'fix-dnstap-output-file-rolling-v9_12' into v9_12 2018-02-16 11:39:16 +01:00
Michał Kępień bc22789bcb Add CHANGES entry
4894.	[bug]		named could crash while rolling a dnstap output file.
			[RT #46942]
2018-02-16 09:38:48 +01:00
Michał Kępień 5f12985f0b Make dns_dt_send() call dns_dt_reopen() asynchronously
Instead of checking current dnstap output file size and potentially
synchronously calling dns_dt_reopen() upon every call to dns_dt_send():

  - call dns_dt_reopen() asynchronously by queuing an event to the task
    specified at dnstap environment creation time,

  - ensure no roll event is outstanding before checking dnstap output
    file size and potentially queuing another roll event.

This causes dnstap output files to exceed their configured size limits,
but prevents any two threads from performing the roll simultaneously
(which causes crashes).
2018-02-16 09:37:23 +01:00
Michał Kępień 2c1307f061 Make dns_dt_reopen() request task-exclusive mode on its own
Instead of relying on the caller to set up task-exclusive mode, make
dns_dt_reopen() enforce task-exclusive mode itself, using the task
specified at dnstap environment creation time.
2018-02-16 09:37:23 +01:00
Michał Kępień e26c5df16f Add dns_dt_create2()
Implement a new variant of dns_dt_create() to enable a dnstap
environment structure to hold the task in the context of which
dns_dt_reopen() will be executed.
2018-02-16 09:37:23 +01:00
Michał Kępień fba6c2e982 Merge branch 'fix-loadpending-handling-v9_12' into v9_12 2018-02-16 08:55:23 +01:00
Michał Kępień 3235c3b2e4 Add CHANGES entry
4892.	[bug]		named could leak memory when "rndc reload" was invoked
			before all zone loading actions triggered by a previous
			"rndc reload" command were completed. [RT #47076]
2018-02-16 08:48:05 +01:00
Michał Kępień 840c9348bf Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-16 08:47:40 +01:00
Michał Kępień 3395f6fac3 Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-16 08:47:40 +01:00
Michał Kępień 7c64547d95 Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-16 08:47:40 +01:00
Michał Kępień 93c176d2d6 Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-16 08:47:40 +01:00
Mark Andrews 44d995992a Merge branch 'fix-cpp-check-errors' into 'v9_12'
Fix cpp check errors v9_12

See merge request isc-projects/bind9!29
2018-02-15 22:15:49 -05:00
Mark Andrews a5ea45f9f6 s/cppchecker/cppcheck 2018-02-16 14:09:10 +11:00
Mark Andrews 171843167b add GL issue number 2018-02-16 14:09:09 +11:00
Mark Andrews 6ab800a82b add CHANGES note 2018-02-16 14:09:09 +11:00
Mark Andrews 3208b02910 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews 736cbc97d7 conditionally declare stacksize 2018-02-16 14:08:26 +11:00
Mark Andrews 58c141e9b6 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews 494a3b33a2 Clarify calculation precedence for '&' and '?' 2018-02-16 14:08:26 +11:00
Mark Andrews d6b79d3d43 add POST(tl) 2018-02-16 14:08:26 +11:00
Mark Andrews 57fbc03b11 return failure count 2018-02-16 14:08:26 +11:00
Mark Andrews 6a896a0247 conditionally declare strbuf 2018-02-16 14:08:26 +11:00
Mark Andrews 13e2a127f2 test for == 0 rather than <= as value is unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews 5aba593545 add brackets 2018-02-16 14:08:26 +11:00
Mark Andrews cf53ca27d5 reorder test to silence cppcheck 2018-02-16 14:08:26 +11:00
Mark Andrews e416b6f57c remove event which is only used for sizeof 2018-02-16 14:08:26 +11:00
Mark Andrews a87296cb7b remember the masters count 2018-02-16 14:08:26 +11:00
Mark Andrews 6fc28063f1 reorder test to silence cppcheck 2018-02-16 14:08:26 +11:00
Mark Andrews fb93276320 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 3b412a0634 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews d23375e5b3 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews e34eec79a8 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 7670515fac use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 14e5f05a5e use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 5a21fe753d use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 1e943e3f3a use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews ade6a20c56 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews cf063314f2 use %u instead of %d 2018-02-16 14:08:26 +11:00