]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoCheck tests for core files regardless of test status
Michal Nowak [Mon, 22 Jun 2020 17:55:40 +0000 (19:55 +0200)] 
Check tests for core files regardless of test status

Failed test should be checked for core files et al. and have
backtrace generated.

5 years agoRationalize backtrace logging
Michal Nowak [Mon, 22 Jun 2020 13:56:50 +0000 (15:56 +0200)] 
Rationalize backtrace logging

GDB backtrace generated via "thread apply all bt full" is too long for
standard output, lets save them to .txt file among other log files.

5 years agoEnsure various test issues are treated as failures
Michal Nowak [Mon, 22 Jun 2020 12:13:46 +0000 (14:13 +0200)] 
Ensure various test issues are treated as failures

Make sure bin/tests/system/run.sh returns a non-zero exit code if any of
the following happens:

  - the test being run produces a core dump,
  - assertion failures are found in the test's logs,
  - ThreadSanitizer reports are found after the test completes,
  - the servers started by the test fail to shut down cleanly.

This change is necessary to always fail a test in such cases (before the
migration to Automake, test failures were determined based on the
presence of "R:<test-name>:FAIL" lines in the test suite output and thus
it was not necessary for bin/tests/system/run.sh to return a non-zero
exit code).

5 years agoMerge branch 'michal/update-release-checklist' into 'main'
Michał Kępień [Thu, 16 Jul 2020 09:31:09 +0000 (09:31 +0000)] 
Merge branch 'michal/update-release-checklist' into 'main'

Update release checklist

See merge request isc-projects/bind9!3864

5 years agoUpdate release checklist
Michał Kępień [Thu, 16 Jul 2020 09:28:09 +0000 (11:28 +0200)] 
Update release checklist

Add an item to the release checklist to make sure confidential issues
assigned to the relevant milestone are made public after the BIND
versions addressing them are released.

5 years agoMerge branch '2022-stats-netmgr' into 'main'
Evan Hunt [Thu, 16 Jul 2020 06:04:21 +0000 (06:04 +0000)] 
Merge branch '2022-stats-netmgr' into 'main'

Resolve "use netmgr for statschannel"

Closes #2022

See merge request isc-projects/bind9!3847

5 years agoCHANGES, release note
Evan Hunt [Mon, 13 Jul 2020 21:05:55 +0000 (14:05 -0700)] 
CHANGES, release note

5 years agorewrite statschannel to use netmgr
Evan Hunt [Fri, 10 Jul 2020 02:36:10 +0000 (19:36 -0700)] 
rewrite statschannel to use netmgr

modify isc_httpd to use the network manager instead of the
isc_socket API.

also cleaned up bin/named/statschannel.c to use CHECK.

5 years agoMerge branch 'v9_17_3-release' into 'main'
Michał Kępień [Wed, 15 Jul 2020 21:09:46 +0000 (21:09 +0000)] 
Merge branch 'v9_17_3-release' into 'main'

Merge 9.17.3 release branch

See merge request isc-projects/bind9!3860

5 years agoSet up release notes for BIND 9.17.4
Michał Kępień [Wed, 15 Jul 2020 21:06:25 +0000 (23:06 +0200)] 
Set up release notes for BIND 9.17.4

5 years agoBump BIND_BASELINE_VERSION for ABI checks
Michał Kępień [Wed, 15 Jul 2020 21:06:25 +0000 (23:06 +0200)] 
Bump BIND_BASELINE_VERSION for ABI checks

5 years agoFix "make dist"
Michał Kępień [Fri, 3 Jul 2020 08:36:15 +0000 (10:36 +0200)] 
Fix "make dist"

5 years agoUpdate BIND version to 9.17.3
Michał Kępień [Fri, 3 Jul 2020 08:02:14 +0000 (10:02 +0200)] 
Update BIND version to 9.17.3

5 years agoAdd a CHANGES marker
Michał Kępień [Fri, 3 Jul 2020 08:02:14 +0000 (10:02 +0200)] 
Add a CHANGES marker

5 years agoUpdate library API versions
Michał Kępień [Fri, 3 Jul 2020 08:02:14 +0000 (10:02 +0200)] 
Update library API versions

5 years agoMerge branch 'michal/prepare-release-notes-for-bind-9.17.3' into v9_17_3-release
Michał Kępień [Fri, 3 Jul 2020 07:44:07 +0000 (09:44 +0200)] 
Merge branch 'michal/prepare-release-notes-for-bind-9.17.3' into v9_17_3-release

5 years agoReorder release notes
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Reorder release notes

5 years agoAdd release note for #1958
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Add release note for #1958

5 years agoAdd release note for #1938
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Add release note for #1938

5 years agoAdd release note for #1937
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Add release note for #1937

5 years agoTweak and reword release notes
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Tweak and reword release notes

5 years agoPrepare release notes for BIND 9.17.3
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Prepare release notes for BIND 9.17.3

5 years agoTweak and reword recent CHANGES entries
Michał Kępień [Fri, 3 Jul 2020 07:36:17 +0000 (09:36 +0200)] 
Tweak and reword recent CHANGES entries

5 years agoMerge branch '2006-coverity-checked-return-keymgr' into 'main'
Matthijs Mekking [Tue, 14 Jul 2020 15:46:56 +0000 (15:46 +0000)] 
Merge branch '2006-coverity-checked-return-keymgr' into 'main'

Fix Coverity keymgr reports

Closes #2006

See merge request isc-projects/bind9!3808

5 years agoCheck return value of dst_key_getbool()
Matthijs Mekking [Mon, 6 Jul 2020 10:07:24 +0000 (12:07 +0200)] 
Check return value of dst_key_getbool()

Fix Coverity CHECKED_RETURN reports for dst_key_getbool().  In most
cases we do not really care about its return value, but it is prudent
to check it.

In one case, where a dst_key_getbool() error should be treated
identically as success, cast the return value to void and add a relevant
comment.

5 years agoMerge branch 'michal/use-image-key-in-qemu-based-ci-job-templates' into 'main'
Michał Kępień [Tue, 14 Jul 2020 08:24:42 +0000 (08:24 +0000)] 
Merge branch 'michal/use-image-key-in-qemu-based-ci-job-templates' into 'main'

Use "image" key in QEMU-based CI job templates

See merge request isc-projects/bind9!3855

5 years agoUse "image" key in QEMU-based CI job templates
Michał Kępień [Tue, 14 Jul 2020 07:58:04 +0000 (09:58 +0200)] 
Use "image" key in QEMU-based CI job templates

Our GitLab Runner Custom executor scripts now use the "image" key
instead of the job name for determining the QCOW2 image to use for a
given CI job.  Update .gitlab-ci.yml to reflect that change.

5 years agoMerge branch 'u/fanf2/fix-signing' into 'main'
Mark Andrews [Tue, 14 Jul 2020 02:07:28 +0000 (02:07 +0000)] 
Merge branch 'u/fanf2/fix-signing' into 'main'

Fix re-signing when `sig-validity-interval` has two arguments

See merge request isc-projects/bind9!3735

5 years agoAdd release note for [GL !3735]
Mark Andrews [Thu, 25 Jun 2020 04:51:19 +0000 (14:51 +1000)] 
Add release note for [GL !3735]

5 years agoAdd CHANGES note for [GL !3735]
Mark Andrews [Thu, 25 Jun 2020 04:50:16 +0000 (14:50 +1000)] 
Add CHANGES note for [GL !3735]

5 years agoAdd regression test for [GL !3735]
Mark Andrews [Thu, 25 Jun 2020 11:27:29 +0000 (21:27 +1000)] 
Add regression test for [GL !3735]

Check that resign interval is actually in days rather than hours
by checking that RRSIGs are all within the allowed day range.

5 years agoFix re-signing when `sig-validity-interval` has two arguments
Tony Finch [Mon, 22 Jun 2020 19:23:29 +0000 (20:23 +0100)] 
Fix re-signing when `sig-validity-interval` has two arguments

Since October 2019 I have had complaints from `dnssec-cds` reporting
that the signatures on some of my test zones had expired. These were
zones signed by BIND 9.15 or 9.17, with a DNSKEY TTL of 24h and
`sig-validity-interval 10 8`.

This is the same setup we have used for our production zones since
2015, which is intended to re-sign the zones every 2 days, keeping
at least 8 days signature validity. The SOA expire interval is 7
days, so even in the presence of zone transfer problems, no-one
should ever see expired signatures. (These timers are a bit too
tight to be completely correct, because I should have increased
the expiry timers when I increased the DNSKEY TTLs from 1h to 24h.
But that should only matter when zone transfers are broken, which
was not the case for the error reports that led to this patch.)

For example, this morning my test zone contained:

        dev.dns.cam.ac.uk. 86400 IN RRSIG DNSKEY 13 5 86400 (
                                20200701221418 20200621213022 ...)

But one of my resolvers had cached:

        dev.dns.cam.ac.uk. 21424 IN RRSIG DNSKEY 13 5 86400 (
                                20200622063022 20200612061136 ...)

This TTL was captured at 20200622105807 so the resolver cached the
RRset 64976 seconds previously (18h02m56s), at 20200621165511
only about 12h before expiry.

The other symptom of this error was incorrect `resign` times in
the output from `rndc zonestatus`.

For example, I have configured a test zone

        zone fast.dotat.at {
                file "../u/z/fast.dotat.at";
                type primary;
                auto-dnssec maintain;
                sig-validity-interval 500 499;
        };

The zone is reset to a minimal zone containing only SOA and NS
records, and when `named` starts it loads and signs the zone. After
that, `rndc zonestatus` reports:

        next resign node: fast.dotat.at/NS
        next resign time: Fri, 28 May 2021 12:48:47 GMT

The resign time should be within the next 24h, but instead it is
near the signature expiry time, which the RRSIG(NS) says is
20210618074847. (Note 499 hours is a bit more than 20 days.)
May/June 2021 is less than 500 days from now because expiry time
jitter is applied to the NS records.

Using this test I bisected this bug to 09990672d which contained a
mistake leading to the resigning interval always being calculated in
hours, when days are expected.

This bug only occurs for configurations that use the two-argument form
of `sig-validity-interval`.

5 years agoMerge branch '1994-netscope-c-23-50-error-unused-parameter-addr-when-have_if_nametoin...
Mark Andrews [Tue, 14 Jul 2020 00:51:22 +0000 (00:51 +0000)] 
Merge branch '1994-netscope-c-23-50-error-unused-parameter-addr-when-have_if_nametoindex-undefined-on-illumos' into 'main'

Resolve "netscope.c:23:50: error: unused parameter 'addr' when HAVE_IF_NAMETOINDEX undefined on illumos"

Closes #1994

See merge request isc-projects/bind9!3829

5 years agoMark 'addr' as unused if HAVE_IF_NAMETOINDEX is not defined
Mark Andrews [Thu, 9 Jul 2020 05:04:31 +0000 (15:04 +1000)] 
Mark 'addr' as unused if HAVE_IF_NAMETOINDEX is not defined

Also 'zone' should be initialised to zero.

5 years agoMerge branch '1995-gssapictx-c-681-10-error-implicit-declaration-of-function-gsskrb5_...
Mark Andrews [Tue, 14 Jul 2020 00:05:39 +0000 (00:05 +0000)] 
Merge branch '1995-gssapictx-c-681-10-error-implicit-declaration-of-function-gsskrb5_register_acceptor_identity' into 'main'

Resolve "gssapictx.c:681:10: error: implicit declaration of function 'gsskrb5_register_acceptor_identity' on illumos"

Closes #1995

See merge request isc-projects/bind9!3830

5 years agoOnly call gsskrb5_register_acceptor_identity if we have gssapi_krb5.h.
Mark Andrews [Thu, 9 Jul 2020 05:30:59 +0000 (15:30 +1000)] 
Only call gsskrb5_register_acceptor_identity if we have gssapi_krb5.h.

5 years agoMerge branch '1993-check-c-1576-37-error-expected-identifier-before-numeric-constant...
Mark Andrews [Mon, 13 Jul 2020 22:06:48 +0000 (22:06 +0000)] 
Merge branch '1993-check-c-1576-37-error-expected-identifier-before-numeric-constant-on-illumos' into 'main'

Resolve "check.c:1576:37: error: expected identifier before numeric constant on illumos"

Closes #1993

See merge request isc-projects/bind9!3828

5 years agoHandle namespace clash over 'SEC' on illumos.
Mark Andrews [Thu, 9 Jul 2020 04:49:47 +0000 (14:49 +1000)] 
Handle namespace clash over 'SEC' on illumos.

5 years agoMerge branch '2005-coverity-is-reporting-double-unlock' into 'main'
Mark Andrews [Mon, 13 Jul 2020 21:28:10 +0000 (21:28 +0000)] 
Merge branch '2005-coverity-is-reporting-double-unlock' into 'main'

Resolve "Coverity is reporting double unlock."

Closes #2005

See merge request isc-projects/bind9!3807

5 years agoAdd CHANGES for [GL #2005]
Mark Andrews [Tue, 7 Jul 2020 01:13:43 +0000 (11:13 +1000)] 
Add CHANGES for [GL #2005]

5 years agoAddress potential double unlock in process_fd
Mark Andrews [Tue, 7 Jul 2020 01:11:15 +0000 (11:11 +1000)] 
Address potential double unlock in process_fd

5 years agoMerge branch 'each-rndc-netmgr-pt2' into 'main'
Evan Hunt [Mon, 13 Jul 2020 20:39:49 +0000 (20:39 +0000)] 
Merge branch 'each-rndc-netmgr-pt2' into 'main'

RNDC using netmgr

See merge request isc-projects/bind9!3724

5 years agoCHANGES, release note
Evan Hunt [Wed, 1 Jul 2020 17:59:33 +0000 (10:59 -0700)] 
CHANGES, release note

5 years agoisccc: merge recv_message and recv_nonce into one function
Witold Kręcicki [Wed, 1 Jul 2020 17:07:04 +0000 (19:07 +0200)] 
isccc: merge recv_message and recv_nonce into one function

- make isccc message receiving code clearer by merging recv_nonce and
  recv_message into a single recv_data function and adding a boolean
  state field.

5 years agouse handles for isc_nm_pauseread() and isc_nm_resumeread()
Evan Hunt [Wed, 1 Jul 2020 23:17:09 +0000 (16:17 -0700)] 
use handles for isc_nm_pauseread() and isc_nm_resumeread()

by having these functions act on netmgr handles instead of socket
objects, they can be used in callback functions outside the netgmr.

5 years agopurge pending command events when shutting down
Evan Hunt [Fri, 3 Jul 2020 22:34:51 +0000 (15:34 -0700)] 
purge pending command events when shutting down

When we're shutting the system down via "rndc stop" or "rndc halt",
or reconfiguring the control channel, there are potential shutdown
races between the server task and network manager.  These are adressed by:

- purging any pending command tasks when shutting down the control channel
- adding an extra handle reference before the command handler to
  ensure the handle can't be deleted out from under us before calling
  command_respond()

5 years agouse an isc_task to execute rndc commands
Evan Hunt [Thu, 14 May 2020 21:03:37 +0000 (14:03 -0700)] 
use an isc_task to execute rndc commands

- using an isc_task to execute all rndc functions makes it relatively
  simple for them to acquire task exclusive mode when needed
- control_recvmessage() has been separated into two functions,
  control_recvmessage() and control_respond(). the respond function
  can be called immediately from control_recvmessage() when processing
  a nonce, or it can be called after returning from the task event
  that ran the rndc command function.

5 years agoconvert rndc and control channel to use netmgr
Evan Hunt [Thu, 16 Apr 2020 20:06:42 +0000 (13:06 -0700)] 
convert rndc and control channel to use netmgr

- updated libisccc to use netmgr events
- updated rndc to use isc_nm_tcpconnect() to establish connections
- updated control channel to use isc_nm_listentcp()

open issues:

- the control channel timeout was previously 60 seconds, but it is now
  overridden by the TCP idle timeout setting, which defaults to 30
  seconds. we should add a function that sets the timeout value for
  a specific listener socket, instead of always using the global value
  set in the netmgr. (for the moment, since 30 seconds is a reasonable
  timeout for the control channel, I'm not prioritizing this.)
- the netmgr currently has no support for UNIX-domain sockets; until
  this is addressed, it will not be possible to configure rndc to use
  them. we will need to either fix this or document the change in
  behavior.

5 years agodon't use exclusive mode for rndc commands that don't need it
Evan Hunt [Wed, 15 Apr 2020 21:37:47 +0000 (14:37 -0700)] 
don't use exclusive mode for rndc commands that don't need it

"showzone" and "tsig-list" both used exclusive mode unnecessarily;
changing this will simplify future refactoring a bit.

5 years agostyle cleanup
Evan Hunt [Mon, 16 Dec 2019 00:45:17 +0000 (16:45 -0800)] 
style cleanup

clean up style in rndc and the control channel in preparation for
changing them to use the new network manager.

5 years agoMerge branch 'each-lmdb-lock-fix' into 'main'
Evan Hunt [Mon, 13 Jul 2020 19:26:46 +0000 (19:26 +0000)] 
Merge branch 'each-lmdb-lock-fix' into 'main'

ensure new_zone_lock is released after count_newzones()

See merge request isc-projects/bind9!3833

5 years agomake sure new_zone_lock is locked before unlocking it
Evan Hunt [Sun, 12 Jul 2020 04:30:53 +0000 (21:30 -0700)] 
make sure new_zone_lock is locked before unlocking it

it was possible for the count_newzones() function to try to
unlock view->new_zone_lock on return before locking it, which
caused a crash on shutdown.

5 years agoMerge branch '1719-observed-stats-underflow-in-multiple-stats' into 'main'
Diego dos Santos Fronza [Mon, 13 Jul 2020 18:28:58 +0000 (18:28 +0000)] 
Merge branch '1719-observed-stats-underflow-in-multiple-stats' into 'main'

Resolve "Observed stats underflow in multiple stats"

Closes #1719

See merge request isc-projects/bind9!3818

5 years agoAdd CHANGES and release note for #1719
Diego Fronza [Mon, 13 Jul 2020 14:43:36 +0000 (11:43 -0300)] 
Add CHANGES and release note for #1719

5 years agoFix ns_statscounter_recursclients underflow
Diego Fronza [Wed, 8 Jul 2020 14:42:32 +0000 (11:42 -0300)] 
Fix ns_statscounter_recursclients underflow

The basic scenario for the problem was that in the process of
resolving a query, if any rrset was eligible for prefetching, then it
would trigger a call to query_prefetch(), this call would run in
parallel to the normal query processing.

The problem arises due to the fact that both query_prefetch(), and,
in the original thread, a call to ns_query_recurse(), try to attach
to the recursionquota, but recursing client stats counter is only
incremented if ns_query_recurse() attachs to it first.

Conversely, if fetch_callback() is called before prefetch_done(),
it would not only detach from recursionquota, but also decrement
the stats counter, if query_prefetch() attached to te quota first
that would result in a decrement not matched by an increment, as
expected.

To solve this issue an atomic bool was added, it is set once in
ns_query_recurse(), allowing fetch_callback() to check for it
and decrement stats accordingly.

For a more compreensive explanation check the thread comment below:
https://gitlab.isc.org/isc-projects/bind9/-/issues/1719#note_145857

5 years agoMerge branch '1235-system-tests-fail-with-new-etc-bind-keys-installed' into 'main'
Mark Andrews [Mon, 13 Jul 2020 05:09:10 +0000 (05:09 +0000)] 
Merge branch '1235-system-tests-fail-with-new-etc-bind-keys-installed' into 'main'

Fallback to built in trust-anchors, managed-keys, or trusted-keys

Closes #1235

See merge request isc-projects/bind9!3827

5 years agoFallback to built in trust-anchors, managed-keys, or trusted-keys
Mark Andrews [Thu, 9 Jul 2020 03:35:37 +0000 (13:35 +1000)] 
Fallback to built in trust-anchors, managed-keys, or trusted-keys

if the bind.keys file cannot be parsed.

5 years agoMerge branch '1989-rndc-dnstap-roll-with-too-big-a-argument-128-can-cause-a-buffer...
Mark Andrews [Mon, 13 Jul 2020 03:52:02 +0000 (03:52 +0000)] 
Merge branch '1989-rndc-dnstap-roll-with-too-big-a-argument-128-can-cause-a-buffer-overflow' into 'main'

Resolve "'rndc dnstap --roll' with too big a argument (>128) can cause a buffer overflow."

Closes #1989

See merge request isc-projects/bind9!3788

5 years agoAdd changes for [GL #1989]
Mark Andrews [Thu, 2 Jul 2020 03:35:27 +0000 (13:35 +1000)] 
Add changes for [GL #1989]

5 years agoAddress overrun in remove_old_tsversions
Mark Andrews [Thu, 2 Jul 2020 03:26:06 +0000 (13:26 +1000)] 
Address overrun in remove_old_tsversions

If too many versions of log / dnstap files to be saved where requests
the memory after to_keep could be overwritten.  Force the number of
versions to be saved to a save level.  Additionally the memmove length
was incorrect.

5 years agoMerge branch '2012-add-assertion-check-to-silence-dereference-before-null-check-in...
Mark Andrews [Mon, 13 Jul 2020 03:06:25 +0000 (03:06 +0000)] 
Merge branch '2012-add-assertion-check-to-silence-dereference-before-null-check-in-tsig_test-c-v9_11' into 'main'

Resolve "Add assertion check to silence dereference before NULL check in tsig_test.c"

Closes #2012

See merge request isc-projects/bind9!3814

5 years agoAssert tsigout is non-NULL
Mark Andrews [Tue, 7 Jul 2020 09:12:35 +0000 (19:12 +1000)] 
Assert tsigout is non-NULL

5 years agoMerge branch '2014-statschannel-system-test-failed-at-setup-stage' into 'main'
Mark Andrews [Mon, 13 Jul 2020 02:22:09 +0000 (02:22 +0000)] 
Merge branch '2014-statschannel-system-test-failed-at-setup-stage' into 'main'

Resolve "Statschannel system test failed at setup stage."

Closes #2014

See merge request isc-projects/bind9!3823

5 years agoDon't verify the zone when setting expire to "now+1s" as it can fail
Mark Andrews [Wed, 8 Jul 2020 03:18:31 +0000 (13:18 +1000)] 
Don't verify the zone when setting expire to "now+1s" as it can fail

as too much wall clock time may have elapsed.

Also capture signzone output for forensic analysis

5 years agoMerge branch '2013-unchecked-returns-of-inet_pton-in-geoip_test-c' into 'main'
Mark Andrews [Mon, 13 Jul 2020 01:21:52 +0000 (01:21 +0000)] 
Merge branch '2013-unchecked-returns-of-inet_pton-in-geoip_test-c' into 'main'

Resolve "Unchecked returns of inet_pton in geoip_test.c"

Closes #2013

See merge request isc-projects/bind9!3815

5 years agocheck returns from inet_pton()
Mark Andrews [Tue, 7 Jul 2020 09:52:23 +0000 (19:52 +1000)] 
check returns from inet_pton()

5 years agoMerge branch 'marka-placeholder' into 'main'
Mark Andrews [Mon, 13 Jul 2020 00:23:01 +0000 (00:23 +0000)] 
Merge branch 'marka-placeholder' into 'main'

placeholder for [GL #2010]

See merge request isc-projects/bind9!3834

5 years agoplaceholder for [GL #2010]
Mark Andrews [Mon, 13 Jul 2020 00:19:02 +0000 (10:19 +1000)] 
placeholder for [GL #2010]

5 years agoMerge branch '2003-remove-redundant-listener-null-check' into 'main'
Mark Andrews [Mon, 13 Jul 2020 00:13:52 +0000 (00:13 +0000)] 
Merge branch '2003-remove-redundant-listener-null-check' into 'main'

Resolve "Remove redundant listener != NULL check"

Closes #2003

See merge request isc-projects/bind9!3806

5 years agoRemove redundant check for listener being non-NULL
Mark Andrews [Mon, 6 Jul 2020 03:16:33 +0000 (13:16 +1000)] 
Remove redundant check for listener being non-NULL

5 years agoMerge branch '1976-fix-locking-for-lmdb-0.9.26' into 'main'
Michał Kępień [Fri, 10 Jul 2020 09:50:47 +0000 (09:50 +0000)] 
Merge branch '1976-fix-locking-for-lmdb-0.9.26' into 'main'

Fix locking for LMDB 0.9.26

Closes #1976

See merge request isc-projects/bind9!3758

5 years agoAdd CHANGES for GL #1976
Michał Kępień [Fri, 10 Jul 2020 09:29:18 +0000 (11:29 +0200)] 
Add CHANGES for GL #1976

5 years agoFix locking for LMDB 0.9.26
Michał Kępień [Fri, 10 Jul 2020 09:29:18 +0000 (11:29 +0200)] 
Fix locking for LMDB 0.9.26

When "rndc reconfig" is run, named first configures a fresh set of views
and then tears down the old views.  Consider what happens for a single
view with LMDB enabled; "envA" is the pointer to the LMDB environment
used by the original/old version of the view, "envB" is the pointer to
the same LMDB environment used by the new version of that view:

 1. mdb_env_open(envA) is called when the view is first created.
 2. "rndc reconfig" is called.
 3. mdb_env_open(envB) is called for the new instance of the view.
 4. mdb_env_close(envA) is called for the old instance of the view.

This seems to have worked so far.  However, an upstream change [1] in
LMDB which will be part of its 0.9.26 release prevents the above
sequence of calls from working as intended because the locktable mutexes
will now get destroyed by the mdb_env_close() call in step 4 above,
causing any subsequent mdb_txn_begin() calls to fail (because all of the
above steps are happening within a single named process).

Preventing the above scenario from happening would require either
redesigning the way we use LMDB in BIND, which is not something we can
easily backport, or redesigning the way BIND carries out its
reconfiguration process, which would be an even more severe change.

To work around the problem, set MDB_NOLOCK when calling mdb_env_open()
to stop LMDB from controlling concurrent access to the database and do
the necessary locking in named instead.  Reuse the view->new_zone_lock
mutex for this purpose to prevent the need for modifying struct dns_view
(which would necessitate library API version bumps).  Drop use of
MDB_NOTLS as it is made redundant by MDB_NOLOCK: MDB_NOTLS only affects
where LMDB reader locktable slots are stored while MDB_NOLOCK prevents
the reader locktable from being used altogether.

[1] https://git.openldap.org/openldap/openldap/-/commit/2fd44e325195ae81664eb5dc36e7d265927c5ebc

5 years agoMerge branch 'ondrej/update-pregenerated-manpages' into 'main'
Ondřej Surý [Wed, 8 Jul 2020 10:19:15 +0000 (10:19 +0000)] 
Merge branch 'ondrej/update-pregenerated-manpages' into 'main'

Fixup the manpages after ddns-confgen.rst -> tsig-keygen.rst rename

See merge request isc-projects/bind9!3817

5 years agoFail the build if it updates any of the files in the git repository
Ondřej Surý [Tue, 7 Jul 2020 14:15:59 +0000 (16:15 +0200)] 
Fail the build if it updates any of the files in the git repository

There are still some pregenerated files left in the git
repository (cleaned up during `make maintainer-clean`) and we currently
don't notice if any of those needs to be updated in the git repository
because we ignore changes in the repository done during the build.

This commit adds a safeguard that fails the build job if the contents of
the git repository gets modified during the build.

5 years agoFixup the manpages after ddns-confgen.rst -> tsig-keygen.rst rename
Ondřej Surý [Tue, 7 Jul 2020 14:11:24 +0000 (16:11 +0200)] 
Fixup the manpages after ddns-confgen.rst -> tsig-keygen.rst rename

There were some missing bits in the other rst files and Makefile.am(s)
that didn't reflect the rename of the main document.  Also add
ddns-confgen.8 manpage.

5 years agoMerge branch '2011-off-by-one-error-in-dns_rdatatype_attributes' into 'main'
Mark Andrews [Wed, 8 Jul 2020 03:01:05 +0000 (03:01 +0000)] 
Merge branch '2011-off-by-one-error-in-dns_rdatatype_attributes' into 'main'

Resolve "Off-by-one error in dns_rdatatype_attributes?"

Closes #2011

See merge request isc-projects/bind9!3820

5 years agoAdjust range limit of unknown meta types
Mark Andrews [Wed, 8 Jul 2020 01:11:37 +0000 (11:11 +1000)] 
Adjust range limit of unknown meta types

5 years agoMerge branch '2009-update-isc-logo-in-documentation' into 'main'
Mark Andrews [Wed, 8 Jul 2020 02:00:31 +0000 (02:00 +0000)] 
Merge branch '2009-update-isc-logo-in-documentation' into 'main'

Resolve "Update ISC logo in documentation"

Closes #2009

See merge request isc-projects/bind9!3811

5 years agoUpdate ISC logo
Mark Andrews [Tue, 7 Jul 2020 03:27:33 +0000 (13:27 +1000)] 
Update ISC logo

5 years agoMerge branch '1475-convert-header-attributes-to-atomic' into 'main'
Mark Andrews [Wed, 8 Jul 2020 01:24:10 +0000 (01:24 +0000)] 
Merge branch '1475-convert-header-attributes-to-atomic' into 'main'

Convert header->attributes to stdatomic

Closes #1475

See merge request isc-projects/bind9!3750

5 years agoAdd CHANGES note for [GL #1475]
Mark Andrews [Thu, 2 Jul 2020 05:08:05 +0000 (15:08 +1000)] 
Add CHANGES note for [GL #1475]

5 years agoUpdate STALE and ANCIENT header attributes atomically
Ondřej Surý [Thu, 25 Jun 2020 15:48:34 +0000 (17:48 +0200)] 
Update STALE and ANCIENT header attributes atomically

The ThreadSanitizer found a data race when updating the stale header.
Instead of trying to acquire the write lock and failing occasionally
which would skew the statistics, the dns_rdatasetheader_t.attributes
field has been promoted to use stdatomics.  Updating the attributes in
the mark_header_ancient() and mark_header_stale() now uses the cmpxchg
to update the attributes forfeiting the need to hold the write lock on
the tree.  Please note that mark_header_ancient() still needs to hold
the lock because .dirty is being updated in the same go.

5 years agoMerge branch 'ondrej/add-16-bit-stdatomic-shims' into 'main'
Mark Andrews [Wed, 8 Jul 2020 00:26:26 +0000 (00:26 +0000)] 
Merge branch 'ondrej/add-16-bit-stdatomic-shims' into 'main'

Make the stdatomic shim and mutexatomic type complete

See merge request isc-projects/bind9!3816

5 years agoMake the stdatomic shim and mutexatomic type complete
Mark Andrews [Wed, 1 Jul 2020 07:06:28 +0000 (17:06 +1000)] 
Make the stdatomic shim and mutexatomic type complete

The stdatomic shims for non-C11 compilers (Windows, old gcc, ...) and
mutexatomic implemented only and minimal subset of the atomic types.
This commit adds 16-bit operations for Windows and all atomic types as
defined in standard.

5 years agoMerge branch '1998-fully-rename-tsig-keygen' into 'main'
Evan Hunt [Mon, 6 Jul 2020 09:00:26 +0000 (09:00 +0000)] 
Merge branch '1998-fully-rename-tsig-keygen' into 'main'

use 'tsig-keygen' as the primary name for the tool

Closes #1998

See merge request isc-projects/bind9!3801

5 years agouse 'tsig-keygen' as the primary name for the tool
Evan Hunt [Thu, 2 Jul 2020 22:27:54 +0000 (15:27 -0700)] 
use 'tsig-keygen' as the primary name for the tool

'ddns-confgen' is now an alias for 'tsig-keygen', rather than
the other way around.

5 years agoMerge branch '1990-bad-isc_mem_put-size' into 'main'
Mark Andrews [Mon, 6 Jul 2020 00:53:13 +0000 (00:53 +0000)] 
Merge branch '1990-bad-isc_mem_put-size' into 'main'

Resolve "Bad  isc_mem_put size."

Closes #1990

See merge request isc-projects/bind9!3790

5 years agoBad isc_mem_put() size when an invalid type was specified in a ssu rule.
Mark Andrews [Thu, 2 Jul 2020 06:12:55 +0000 (16:12 +1000)] 
Bad isc_mem_put() size when an invalid type was specified in a ssu rule.

5 years agoMerge branch '1991-cleanup-redundant-non-null-check' into 'main'
Mark Andrews [Mon, 6 Jul 2020 00:14:42 +0000 (00:14 +0000)] 
Merge branch '1991-cleanup-redundant-non-null-check' into 'main'

Resolve "Cleanup redundant non-NULL check."

Closes #1991

See merge request isc-projects/bind9!3791

5 years agoremove redundant rctx != NULL check
Mark Andrews [Thu, 2 Jul 2020 06:21:20 +0000 (16:21 +1000)] 
remove redundant rctx != NULL check

5 years agoMerge branch '1988-windows-rndc-dnssec-status-bad-output' into 'main'
Matthijs Mekking [Fri, 3 Jul 2020 13:13:05 +0000 (13:13 +0000)] 
Merge branch '1988-windows-rndc-dnssec-status-bad-output' into 'main'

Increase rndc output buffer size for rndc dnssec -status

Closes #1988

See merge request isc-projects/bind9!3802

5 years agoIncrease "rndc dnssec -status" output size
Matthijs Mekking [Fri, 3 Jul 2020 07:46:13 +0000 (09:46 +0200)] 
Increase "rndc dnssec -status" output size

BUFSIZ (512 bytes on Windows) may not be enough to fit the status of a
DNSSEC policy and three DNSSEC keys.

Set the size of the relevant buffer to a hardcoded value of 4096 bytes,
which should be enough for most scenarios.

5 years agoMerge branch '1925-additional-text-edits-to-bind-arm' into 'main'
Ondřej Surý [Fri, 3 Jul 2020 07:20:48 +0000 (07:20 +0000)] 
Merge branch '1925-additional-text-edits-to-bind-arm' into 'main'

Resolve "Additional text edits to BIND ARM"

Closes #1925

See merge request isc-projects/bind9!3800

5 years agoAdd missing named.conf man page
Suzanne Goldlust [Thu, 2 Jul 2020 18:58:26 +0000 (18:58 +0000)] 
Add missing named.conf man page

5 years agoFinal text edits to BIND 9 ARM in this round of updates
Suzanne Goldlust [Thu, 2 Jul 2020 16:54:57 +0000 (16:54 +0000)] 
Final text edits to BIND 9 ARM in this round of updates

5 years agoMerge branch 'ondrej/dont-fail-system-test-on-missing-pytest' into 'main'
Ondřej Surý [Thu, 2 Jul 2020 15:14:57 +0000 (15:14 +0000)] 
Merge branch 'ondrej/dont-fail-system-test-on-missing-pytest' into 'main'

Don't fail the system tests when shutdown test is missing pytest

See merge request isc-projects/bind9!3795

5 years agoDon't fail the system tests when shutdown test is missing pytest
Ondřej Surý [Thu, 2 Jul 2020 09:12:31 +0000 (11:12 +0200)] 
Don't fail the system tests when shutdown test is missing pytest

5 years agoMerge branch '1627-add-changes-entry' into 'main'
Michał Kępień [Thu, 2 Jul 2020 09:20:21 +0000 (09:20 +0000)] 
Merge branch '1627-add-changes-entry' into 'main'

Add CHANGES entry for #1627

Closes #1627

See merge request isc-projects/bind9!3794

5 years agoAdd CHANGES entry for #1627
Michał Kępień [Thu, 2 Jul 2020 09:19:30 +0000 (11:19 +0200)] 
Add CHANGES entry for #1627