]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoMerge tag 'v9_16_31' into v9_16
Michal Nowak [Thu, 21 Jul 2022 12:37:36 +0000 (14:37 +0200)] 
Merge tag 'v9_16_31' into v9_16

BIND 9.16.31

3 years agoMerge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests-v9_16' into...
Michał Kępień [Mon, 18 Jul 2022 13:40:05 +0000 (13:40 +0000)] 
Merge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests-v9_16' into 'v9_16'

[v9_16] Run a short respdiff test for all merge requests

See merge request isc-projects/bind9!6591

3 years agoRun a short respdiff test for all merge requests
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Run a short respdiff test for all merge requests

Running a respdiff test for every merge request would be useful for
catching protocol-breaking changes before they are applied to the source
code.  However, the existing respdiff-based tests take a while to
complete (about half an hour with our current CI infrastructure), which
does not make them a good fit for this purpose.  Add a new GitLab CI
job, "respdiff-short", which uses a smaller query set that gets
processed within a couple of minutes on our current CI infrastructure.
Rename the existing respdiff-based jobs to make distinguishing them
easier.

(cherry picked from commit 31ee43a314f17b433909a049fafa01200bac14ca)

3 years agoExtract respdiff job definition to a YAML anchor
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Extract respdiff job definition to a YAML anchor

Ensure the common parts of all jobs using respdiff are available in the
form of a reusable YAML anchor, to reduce code duplication and to
simplify adding more respdiff-based jobs to GitLab CI.

(cherry picked from commit ca20a189f7c020e67feebcabd436a02e69272164)

3 years agoUse a pre-built executable as the reference named
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Use a pre-built executable as the reference named

The "respdiff" GitLab CI job compares DNS responses produced by the
current version of named with those produced by a reference version.
The latter is built from source in each "respdiff" job, despite the fact
that the reference version changes very rarely.  Use a pre-built named
executable as the reference version instead, assuming it is available in
the OS image used for "respdiff" tests.

(cherry picked from commit ab90a4705a13d1a5040bb361e20ff63b5d47d875)

3 years agoMerge branch '3453-cope-with-too-small-BUFSIZ-v9_16' into 'v9_16' alessio/9.16-pre-fall
Ondřej Surý [Fri, 15 Jul 2022 19:48:15 +0000 (19:48 +0000)] 
Merge branch '3453-cope-with-too-small-BUFSIZ-v9_16' into 'v9_16'

Increase the BUFSIZ-long buffers [v9.16]

See merge request isc-projects/bind9!6587

3 years agoIncrease the BUFSIZ-long buffers
Ondřej Surý [Thu, 14 Jul 2022 11:48:45 +0000 (13:48 +0200)] 
Increase the BUFSIZ-long buffers

The BUFSIZ value varies between platforms, it could be 8K on Linux and
512 bytes on mingw.  Make sure the buffers are always big enough for the
output data to prevent truncation of the output by appropriately
enlarging or sizing the buffers.

(cherry picked from commit b19d932262e84608174cb89eeed32ae0212f8a87)

3 years agoMerge branch '3443-memory-related-cleanups-v9_16' into 'v9_16'
Michał Kępień [Fri, 15 Jul 2022 09:01:03 +0000 (09:01 +0000)] 
Merge branch '3443-memory-related-cleanups-v9_16' into 'v9_16'

[v9_16] Memory-related cleanups

See merge request isc-projects/bind9!6569

3 years agoMake "named -h" output match option-handling code
Michał Kępień [Fri, 15 Jul 2022 08:23:03 +0000 (10:23 +0200)] 
Make "named -h" output match option-handling code

The usage instructions printed by "named -h" are missing the "external"
and "internal" flags that can be passed to the -M command-line option.
Add the missing flags to "named -h" output.

3 years agoUpdate documentation for named's -M option
Michał Kępień [Fri, 15 Jul 2022 08:23:03 +0000 (10:23 +0200)] 
Update documentation for named's -M option

Add "internal" to the list of legal values for the -M command-line
option (commit 1f7d2d53f0e5b86e22e1dd116868bb69eeacb1a0 added that
flag).

Make the style of the relevant paragraph more in line with the next one
and split its contents up into an unordered list of options for improved
readability.

(cherry picked from commit f0c31ceb3ba7364aa0478adf17c43ef700270a76)

3 years agoHandle ISC_MEM_DEFAULTFILL consistently
Michał Kępień [Fri, 15 Jul 2022 08:23:03 +0000 (10:23 +0200)] 
Handle ISC_MEM_DEFAULTFILL consistently

Contrary to what the documentation states, memory filling is only
enabled by --enable-developer (or by setting -DISC_MEM_DEFAULTFILL=1) if
the internal memory allocator is used.  However, the internal memory
allocator is disabled by default, so just using the --enable-developer
build-time option does not enable memory filling (passing "-M fill" on
the named command line is necessary to actually enable it).  As memory
filling is a useful tool for troubleshooting certain types of bugs, it
should also be enabled by --enable-developer when the system allocator
is used.

Furthermore, memory-related preprocessor macros are handled in two
distinct locations: lib/isc/include/isc/mem.h and bin/named/main.c.
This makes the logic hard to follow.

Move all code handling the ISC_MEM_DEFAULTFILL preprocessor macro to
lib/isc/include/isc/mem.h, ensuring memory filling is enabled by the
--enable-developer build-time switch, no matter which memory allocator
is used.

3 years agoFix mempool stats bug in the internal allocator
Michał Kępień [Fri, 15 Jul 2022 08:23:03 +0000 (10:23 +0200)] 
Fix mempool stats bug in the internal allocator

Commit c96b6eb5ece1d44fdfbce45da2364e3764956822 changed the way mempool
code handles freed allocations that cannot be retained for later use as
"free list" items: it no longer uses different logic depending on
whether the internal allocator is used or the system one.  However, that
commit did not update a relevant piece of code in isc_mempool_destroy(),
causing memory context statistics to always be off upon shutdown when
BIND 9 is built with -DISC_MEM_USE_INTERNAL_MALLOC=1.  This causes
assertion failures.  Update isc_mempool_destroy() accordingly in order
to prevent this issue from being triggered.

3 years agoMerge branch '3447-lib-dns-tkey-c-free_namelist-should-be-disassociating-associated...
Mark Andrews [Thu, 14 Jul 2022 01:08:57 +0000 (01:08 +0000)] 
Merge branch '3447-lib-dns-tkey-c-free_namelist-should-be-disassociating-associated-rdatatsets-v9_16' into 'v9_16'

disassociate rdatasets when cleaning up [v9_16]

See merge request isc-projects/bind9!6578

3 years agodisassociate rdatasets when cleaning up
Mark Andrews [Tue, 21 Dec 2021 01:44:17 +0000 (12:44 +1100)] 
disassociate rdatasets when cleaning up

free_namelist could be passed names with associated rdatasets
when handling errors.  These need to be disassociated before
calling dns_message_puttemprdataset.

(cherry picked from commit 745d5edc3a8ca6f232b2d700ae076c2caee2bfc5)

3 years agoMerge branch '3449-kasp-system-test-failed-to-log-some-zones-during-setup-v9_16'...
Mark Andrews [Thu, 14 Jul 2022 00:18:27 +0000 (00:18 +0000)] 
Merge branch '3449-kasp-system-test-failed-to-log-some-zones-during-setup-v9_16' into 'v9_16'

kasp: add missing logging during setup [v9_16]

See merge request isc-projects/bind9!6576

3 years agokasp: add missing logging during setup
Mark Andrews [Wed, 22 Dec 2021 04:13:27 +0000 (15:13 +1100)] 
kasp: add missing logging during setup

Some zones where not being logged when just DNSSEC keys where being
generated in system test setup phase.  Add logging for these zones.

(cherry picked from commit 04627997ebce66b92e0b284a4087bdad8770251c)

3 years agoMerge branch '3446-autosign-s-checking-revoked-key-with-duplicate-key-id-test-was...
Mark Andrews [Wed, 13 Jul 2022 01:42:56 +0000 (01:42 +0000)] 
Merge branch '3446-autosign-s-checking-revoked-key-with-duplicate-key-id-test-was-incomplete-v9_16' into 'v9_16'

Make "checking revoked key with duplicate key ID" work [v9_16]

See merge request isc-projects/bind9!6558

3 years agoMake "checking revoked key with duplicate key ID" work
Mark Andrews [Thu, 23 Jun 2022 04:22:10 +0000 (14:22 +1000)] 
Make "checking revoked key with duplicate key ID" work

There should be 2 keys with the same key id after the numerically
lower one is revoked (serial space arithmetic).  The DS points
at the non-revoked key so validation should still succeed.

(cherry picked from commit 513cb24b5539f5173b31f154fa401b356ed563b4)

3 years agoMerge branch '2683-ixfr-logging-v9_16' into 'v9_16'
Evan Hunt [Tue, 12 Jul 2022 23:52:47 +0000 (23:52 +0000)] 
Merge branch '2683-ixfr-logging-v9_16' into 'v9_16'

log the reason for falling back to AXFR from IXFR at level info

See merge request isc-projects/bind9!6552

3 years agolog the reason for falling back to AXFR from IXFR at level info
Evan Hunt [Sat, 2 Jul 2022 20:09:25 +0000 (13:09 -0700)] 
log the reason for falling back to AXFR from IXFR at level info

messages indicating the reason for a fallback to AXFR (i.e, because
the requested serial number is not present in the journal, or because
the size of the IXFR response would exceeed "max-ixfr-ratio") are now
logged at level info instead of debug(4).

(cherry picked from commit df1d81cf961b49172583e2424177b52a89caf041)

3 years agoMerge branch 'mnowak/alpine-3.16-v9_16' into 'v9_16'
Michal Nowak [Tue, 12 Jul 2022 12:01:37 +0000 (12:01 +0000)] 
Merge branch 'mnowak/alpine-3.16-v9_16' into 'v9_16'

[v9_16] Add Alpine Linux 3.16

See merge request isc-projects/bind9!6549

3 years agoAdd Alpine Linux 3.16
Michal Nowak [Thu, 26 May 2022 07:53:57 +0000 (09:53 +0200)] 
Add Alpine Linux 3.16

(cherry picked from commit 0d0ab3db10eca84faa1a7b922e0161efa7ff91a1)

3 years agoMerge branch '3438-dnssec-policy-does-not-set-inline-signing-v9_16' into 'v9_16'
Matthijs Mekking [Tue, 12 Jul 2022 11:39:42 +0000 (11:39 +0000)] 
Merge branch '3438-dnssec-policy-does-not-set-inline-signing-v9_16' into 'v9_16'

[v9_16] Fix inheritance for dnssec-policy when checking for inline-signing

See merge request isc-projects/bind9!6547

3 years agoAdd release note and change entry for #3438
Matthijs Mekking [Mon, 11 Jul 2022 08:34:24 +0000 (10:34 +0200)] 
Add release note and change entry for #3438

Bug worth mentioning.

(cherry picked from commit 689215a6759383d2e67da3a1a7f39779e10f592a)

3 years agoInherit dnssec-policy in check for inline-signing
Matthijs Mekking [Mon, 11 Jul 2022 08:30:44 +0000 (10:30 +0200)] 
Inherit dnssec-policy in check for inline-signing

When dnssec-policy is used, and the zone is not dynamic, BIND will
assume that the zone is inline-signed. But the function responsible
for this did not inherit the dnssec-policy option from the view or
options level, and thus never enabled inline-signing, while the zone
should have been.

This is fixed by this commit.

(cherry picked from commit 576b21b1682605a7d04e51c8a7721180f828b2d7)

3 years agoTest setting of inline-signing with dnssec-policy
Matthijs Mekking [Mon, 11 Jul 2022 08:25:47 +0000 (10:25 +0200)] 
Test setting of inline-signing with dnssec-policy

When dnssec-policy is used, and the zone is not dynamic, BIND will
assume that the zone is inline-signed. Add test cases to verify this.

(cherry picked from commit efa8a4e88de7715e69badd10e3ba948a50935d16)

3 years agoFix kasp system test bugs
Matthijs Mekking [Mon, 11 Jul 2022 08:18:56 +0000 (10:18 +0200)] 
Fix kasp system test bugs

Fix a comment, ensuring the right parameters are used (zone is
parameter $3, not $2) and add view and policy parameters to the comment.

Fix the view tests and test the correct view (example3 instead of
example2).

Fix placement of "n=$((n+1)" for two test cases.

(cherry picked from commit ff65f077790228ff7c5d9de9d46fbd7f7efafbc6)

3 years agoMerge branch '3389-unexpected-badkey-in-upforwd-system-test-v9_16' into 'v9_16'
Mark Andrews [Tue, 12 Jul 2022 09:28:23 +0000 (09:28 +0000)] 
Merge branch '3389-unexpected-badkey-in-upforwd-system-test-v9_16' into 'v9_16'

Clone the message buffer before forwarding UPDATE messages [v9_16]

See merge request isc-projects/bind9!6545

3 years agoAdd CHANGES note for [GL #3389]
Mark Andrews [Fri, 3 Jun 2022 07:01:20 +0000 (17:01 +1000)] 
Add CHANGES note for [GL #3389]

(cherry picked from commit 09d8ed39708859c1a4922ecbb04077e5dd4b215a)

3 years agoClone the message buffer before forwarding UPDATE messages
Mark Andrews [Fri, 3 Jun 2022 06:55:56 +0000 (16:55 +1000)] 
Clone the message buffer before forwarding UPDATE messages

this prevents named forwarding a buffer that may have been over
written.

(cherry picked from commit 7a42417d61b4273a5819899232e4342b2ae79f03)

3 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.32' into 'v9_16'
Michał Kępień [Mon, 11 Jul 2022 07:05:57 +0000 (07:05 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.32' into 'v9_16'

Set up version and release notes for BIND 9.16.32

See merge request isc-projects/bind9!6540

3 years agoSet up release notes for BIND 9.16.32
Michał Kępień [Mon, 11 Jul 2022 06:52:51 +0000 (08:52 +0200)] 
Set up release notes for BIND 9.16.32

3 years agoUpdate BIND version to 9.16.32-dev
Michał Kępień [Mon, 11 Jul 2022 06:52:51 +0000 (08:52 +0200)] 
Update BIND version to 9.16.32-dev

3 years agoMerge branch 'prep-release' into v9_16_31-release v9.16.31
Tinderbox User [Mon, 11 Jul 2022 04:55:00 +0000 (04:55 +0000)] 
Merge branch 'prep-release' into v9_16_31-release

3 years agoprep 9.16.31
Tinderbox User [Mon, 11 Jul 2022 04:49:15 +0000 (04:49 +0000)] 
prep 9.16.31

3 years agoMerge branch 'michal/prepare-documentation-for-bind-9.16.31' into 'v9_16_31-release'
Michał Kępień [Mon, 11 Jul 2022 04:40:29 +0000 (04:40 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.16.31' into 'v9_16_31-release'

Prepare documentation for BIND 9.16.31

See merge request isc-private/bind9!414

3 years agoTweak and reword release notes
Michał Kępień [Mon, 11 Jul 2022 04:32:55 +0000 (06:32 +0200)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.16.31
Michał Kępień [Mon, 11 Jul 2022 04:32:55 +0000 (06:32 +0200)] 
Prepare release notes for BIND 9.16.31

3 years agoMerge branch '3441-fix-fetch-context-use-after-free-bugs' into 'v9_16'
Michał Kępień [Mon, 11 Jul 2022 04:18:04 +0000 (04:18 +0000)] 
Merge branch '3441-fix-fetch-context-use-after-free-bugs' into 'v9_16'

Fix fetch context use-after-free bugs

See merge request isc-projects/bind9!6537

3 years agoFix fetch context use-after-free bugs
Michał Kępień [Fri, 8 Jul 2022 09:26:34 +0000 (11:26 +0200)] 
Fix fetch context use-after-free bugs

fctx_decreference() may call fctx_destroy(), which in turn may free the
fetch context by calling isc_mem_putanddetach().  This means that
whenever fctx_decreference() is called, the fetch context pointer should
be assumed to point to garbage after that call.  Meanwhile, the
following pattern is used in several places in lib/dns/resolver.c:

    LOCK(&res->buckets[fctx->bucketnum].lock);
    bucket_empty = fctx_decreference(fctx);
    UNLOCK(&res->buckets[fctx->bucketnum].lock);

Given that 'fctx' may be freed by the fctx_decreference() call, there is
no guarantee that the value of fctx->bucketnum will be the same before
and after the fctx_decreference() call.  This can cause all kinds of
locking issues as LOCK() calls no longer match up with their UNLOCK()
counterparts.

Fix by always using a helper variable to hold the bucket number when the
pattern above is used.

Note that fctx_try() still uses 'fctx' after calling fctx_decreference()
(it calls fctx_done()).  This is safe to do because the reference count
for 'fctx' is increased a few lines earlier and it also cannot be zero
right before that increase happens, so the fctx_decreference() call in
that particular location never invokes fctx_destroy().  Nevertheless,
use a helper variable for that call site as well, to retain consistency
and to prevent copy-pasted code from causing similar problems in the
future.

3 years agoMerge branch '3320-rewrite-arm-dnssec-chapter-v9_16' into 'v9_16'
Petr Špaček [Thu, 7 Jul 2022 11:25:11 +0000 (11:25 +0000)] 
Merge branch '3320-rewrite-arm-dnssec-chapter-v9_16' into 'v9_16'

Rewrite DNSSEC ARM Chapter [v9_16]

See merge request isc-projects/bind9!6536

3 years agoDeduplicate Manual Signing between DNSSEC chapter and DNSSEC Guide
Petr Špaček [Thu, 16 Jun 2022 12:03:45 +0000 (14:03 +0200)] 
Deduplicate Manual Signing between DNSSEC chapter and DNSSEC Guide

The two procedures were essentially the same, but each instance was
missing some details from the other. They are now combined into one text
in the DNSSEC Guide and linked from DNSSEC chapter.

(cherry picked from commit 7d2502789891e69c2475140d4d14370401759594)

3 years agoMinor grammar improvements in the Signing chapter of the DNSSEC Guide
Suzanne Goldlust [Fri, 17 Jun 2022 15:06:23 +0000 (15:06 +0000)] 
Minor grammar improvements in the Signing chapter of the DNSSEC Guide

(cherry picked from commit 6b1ad4dcfba41585be42b94592ee924b7b781cf5)

3 years agoDeduplicate key filename description in the DNSSEC Guide
Petr Špaček [Thu, 16 Jun 2022 11:48:55 +0000 (13:48 +0200)] 
Deduplicate key filename description in the DNSSEC Guide

Third time ...

(cherry picked from commit 7e9680184121b19f26cf51d599a9579006c6381d)

3 years agoUse ECDSAP256SHA256 in DNSSEC signing examples
Petr Špaček [Thu, 16 Jun 2022 11:43:19 +0000 (13:43 +0200)] 
Use ECDSAP256SHA256 in DNSSEC signing examples

(cherry picked from commit 3eb6898a143328bbdc3ce4773ff8c2e9fa581c6f)

3 years agoAdd a section about key rollover
Matthijs Mekking [Thu, 16 Jun 2022 13:46:32 +0000 (15:46 +0200)] 
Add a section about key rollover

Describe how to do key rollovers with dnssec-policy. Update the
revert to unsigned recipe in the DNSSEC guide.

(cherry picked from commit f721986589e89f58385c73cc30dfac0336018a2d)

3 years agoRewrite DNSSEC Validation subchapter in the ARM
Petr Špaček [Thu, 9 Jun 2022 09:53:13 +0000 (11:53 +0200)] 
Rewrite DNSSEC Validation subchapter in the ARM

Mostly deduplicating and linking information across the ARM.
Generally people should not touch it unless they what they are doing, so
let's try to discourage them a bit.

(cherry picked from commit bffa3063f0c624ef3efcd9dfa882eac95542f3e1)

3 years agoResynchronize DNSSEC chapter with the main branch
Petr Špaček [Thu, 7 Jul 2022 08:24:02 +0000 (10:24 +0200)] 
Resynchronize DNSSEC chapter with the main branch

This is essentially a backport of !6296.

Replace DNSSEC chapter with version from the main branch, commit
901b6425d2ccbb34715d398554d2e717458768d1.

There were structural changes to the ARM in the main branch, and
replacing the whole file with a new version is an order of magniture
easier than attempting to cherry-pick individual changes which should, in
the end, produce the same file under a different name.

File names in the main branch and v9_16 are now in sync (for the DNSSEC
chapter).

Fixes: #3320
3 years agoMerge branch '3433-support-default-hmac-v9_18-v9_16' into 'v9_16'
Mark Andrews [Thu, 7 Jul 2022 05:29:39 +0000 (05:29 +0000)] 
Merge branch '3433-support-default-hmac-v9_18-v9_16' into 'v9_16'

Add DEFAULT_HMAC to conf.sh.common [v9_16]

See merge request isc-projects/bind9!6534

3 years agoAdd DEFAULT_HMAC to conf.sh.common
Mark Andrews [Fri, 1 Jul 2022 06:10:03 +0000 (16:10 +1000)] 
Add DEFAULT_HMAC to conf.sh.common

(cherry picked from commit 972d7fd6827b9eadd32352c6c45b8764fdf8439d)
(cherry picked from commit ba45075acbee7b71bed243c3f873931ccaec89dd)

3 years agoMerge branch '3061-ifconfig-sh-down-messes-up-loopback-interfaces-v9_16' into 'v9_16'
Mark Andrews [Thu, 7 Jul 2022 00:53:08 +0000 (00:53 +0000)] 
Merge branch '3061-ifconfig-sh-down-messes-up-loopback-interfaces-v9_16' into 'v9_16'

update ifconfig.sh [v9_16]

See merge request isc-projects/bind9!6531

3 years agoAdd CHANGES note for [GL #3061]
Mark Andrews [Wed, 6 Jul 2022 02:55:41 +0000 (12:55 +1000)] 
Add CHANGES note for [GL #3061]

(cherry picked from commit e0708c895030b67b64735398ae2d203f39c08274)

3 years agoupdate ifconfig.sh
Mark Andrews [Thu, 9 Jun 2022 08:13:35 +0000 (18:13 +1000)] 
update ifconfig.sh

* make it harder to get the interface numbers wrong by using 'max'
to specify the upper bound of the sequence of interfaces and use 'max'
when calculating the interface number
* extract the platform specific instruction into 'up' and 'down'
and call them from the inner loop so that the interface number is
calculated in one place.
* calculate the A and AAAA address in a single place rather than
in each command
* use /sbin/ipadm on Solaris 2.11 and greater

(cherry picked from commit abfb5b11739d64bf798516f305390cb369a69241)

3 years agoMerge branch '3429-detect-overflow-in-generate-directive-v9_16' into 'v9_16'
Mark Andrews [Wed, 6 Jul 2022 01:55:41 +0000 (01:55 +0000)] 
Merge branch '3429-detect-overflow-in-generate-directive-v9_16' into 'v9_16'

Check for overflow in $GENERATE computations [v9_16]

See merge request isc-projects/bind9!6527

3 years agoAdd CHANGES note for [GL #3429]
Mark Andrews [Fri, 1 Jul 2022 01:50:23 +0000 (11:50 +1000)] 
Add CHANGES note for [GL #3429]

(cherry picked from commit d935ead14b47200f2a572e4c7011812b0debbd6d)

3 years agoImprove $GENERATE documentation
Evan Hunt [Sat, 2 Jul 2022 04:38:11 +0000 (21:38 -0700)] 
Improve $GENERATE documentation

Clarify the documentation of $GENERATE modifiers and add an example.

(cherry picked from commit 13fb2faf7a875198e86fa134e42bb150e14ec53f)

3 years agoTighten $GENERATE directive parsing
Mark Andrews [Fri, 1 Jul 2022 01:13:51 +0000 (11:13 +1000)] 
Tighten $GENERATE directive parsing

The original sscanf processing allowed for a number of syntax errors
to be accepted.  This included missing the closing brace in
${modifiers}

Look for both comma and right brace as intermediate seperators as
well as consuming the final right brace in the sscanf processing
for ${modifiers}.  Check when we got right brace to determine if
the sscanf consumed more input than expected and if so behave as
if it had stopped at the first right brace.

(cherry picked from commit 7be64c0e94c967c0014a0b960a495c4fb05f1fc2)

3 years agoCheck for overflow in $GENERATE computations
Mark Andrews [Fri, 1 Jul 2022 01:40:37 +0000 (11:40 +1000)] 
Check for overflow in $GENERATE computations

$GENERATE uses 'int' for its computations and some constructions
can overflow values that can be represented by an 'int' resulting
in undefined behaviour.  Detect these conditions and return a
range error.

(cherry picked from commit 5327b9708fd0e5d0d6c95183cca9eafb4a1cfe05)

3 years agoMerge branch '3437-cds-error-window-too-small-v9_16' into 'v9_16'
Mark Andrews [Tue, 5 Jul 2022 18:33:05 +0000 (18:33 +0000)] 
Merge branch '3437-cds-error-window-too-small-v9_16' into 'v9_16'

Only report not matching stderr content when we look for it [v9_16]

See merge request isc-projects/bind9!6524

3 years agoIncrease the amount of time allowed for signing to occur in
Mark Andrews [Tue, 5 Jul 2022 03:05:58 +0000 (13:05 +1000)] 
Increase the amount of time allowed for signing to occur in

On slow systems we have seen this take 9 seconds.  Increased the
allowance from 3 seconds to 10 seconds to reduce the probabilty of
a false negative from the system test.

(cherry picked from commit 4db847e80e796c43d80a23e1613c246a3586ceac)

3 years agoOnly report not matching stderr content when we look for it
Mark Andrews [Tue, 5 Jul 2022 03:01:11 +0000 (13:01 +1000)] 
Only report not matching stderr content when we look for it

The previous test code could emit "D:cds:stderr did not match ''" rather
that just showing the contents of stderr.  Moved the debug line inside
the if/else block.

Replaced backquotes with $() and $(()) as approriate.

(cherry picked from commit 304d33fb32da4199e832daef027bd9228e4470a3)

3 years agoMerge branch '3357-test_send_timeout-add-code-comment' into 'v9_16'
Michał Kępień [Mon, 4 Jul 2022 21:12:33 +0000 (21:12 +0000)] 
Merge branch '3357-test_send_timeout-add-code-comment' into 'v9_16'

Add code comment to test_send_timeout test

See merge request isc-projects/bind9!6503

3 years agoAdd a code comment to the test_send_timeout() test
Michał Kępień [Mon, 4 Jul 2022 21:10:59 +0000 (23:10 +0200)] 
Add a code comment to the test_send_timeout() test

3 years agoMerge branch 'marka-cobertura-replaced-by-coverage_report-v9_16' into 'v9_16'
Petr Špaček [Mon, 4 Jul 2022 05:50:40 +0000 (05:50 +0000)] 
Merge branch 'marka-cobertura-replaced-by-coverage_report-v9_16' into 'v9_16'

Fix for GitLab 15.0: cobertura replaced by coverage_report [v9_16]

See merge request isc-projects/bind9!6514

3 years agoFix for GitLab 15.0: cobertura replaced by coverage_report
Mark Andrews [Mon, 4 Jul 2022 03:32:01 +0000 (13:32 +1000)] 
Fix for GitLab 15.0: cobertura replaced by coverage_report

   From Gitlab 15.0 release notes:

   artifacts:reports:cobertura keyword

   As of GitLab 15.0, the artifacts:reports:cobertura keyword has
   been replaced by artifacts:reports:coverage_report. Cobertura
   is the only supported report file, but this is the first step
   towards GitLab supporting other report types.

(cherry picked from commit 008032d268bd0fb4cb92897cdaefd6f6d2de9096)

3 years agoMerge branch '3398-race-resolver-query-timeout-and-validation-v9_16' into 'v9_16'
Arаm Sаrgsyаn [Fri, 1 Jul 2022 09:20:29 +0000 (09:20 +0000)] 
Merge branch '3398-race-resolver-query-timeout-and-validation-v9_16' into 'v9_16'

Fix a race between resolver query timeout and validation

See merge request isc-projects/bind9!6419

3 years agoAdd CHANGES and release note for [GL #3398]
Aram Sargsyan [Fri, 10 Jun 2022 15:19:43 +0000 (15:19 +0000)] 
Add CHANGES and release note for [GL #3398]

3 years agoRemove resolver.c:maybe_destroy()
Aram Sargsyan [Wed, 15 Jun 2022 10:27:41 +0000 (10:27 +0000)] 
Remove resolver.c:maybe_destroy()

After refactoring of `validated()`, the `maybe_destroy()` function is
no longer expected to actually destroy the fetch context when it is
being called, so effectively it only ensures that the validators are
canceled when the context has no more queries and pending events, but
that is redundant, because `maybe_destroy()` `REQUIRE`s that the context
should be in the shutting down state, and the function which sets that
state is already canceling the validators in its own turn.

As a failsafe, to make sure that no validators will be created after
`fctx_doshutdown()` is called, add an early return from `valcreate()` if
the context is in the shutting down state.

3 years agoFix a race between resolver query timeout and validation
Aram Sargsyan [Fri, 10 Jun 2022 14:44:52 +0000 (14:44 +0000)] 
Fix a race between resolver query timeout and validation

The `resolver.c:validated()` function unlinks the current validator from
the fetch's validators list, which can leave it empty, then unlocks
the bucket lock. If, by a chance, the fetch was timed out just before
the `validated()` call, the final timeout callback running in parallel
with `validated()` can find the fetch context with no active fetches
and with an empty validators list and destroy it, which is unexpected
for the `validated()` function and can lead to a crash.

Increase the fetch context's reference count in the beginning of
`validated()` and decrease it when it finishes its work to avoid the
unexpected destruction of the fetch context.

3 years agoMerge branch '2371-add-stress-testing-with-rpz-v9_16' into 'v9_16'
Michal Nowak [Tue, 28 Jun 2022 22:06:34 +0000 (22:06 +0000)] 
Merge branch '2371-add-stress-testing-with-rpz-v9_16' into 'v9_16'

[v9_16] Add stress testing with RPZ

See merge request isc-projects/bind9!6498

3 years agoAdd stress testing with RPZ
Michal Nowak [Tue, 5 Jan 2021 10:53:18 +0000 (11:53 +0100)] 
Add stress testing with RPZ

(cherry picked from commit d272574653a436055120f842cefd1525be6ea824)

3 years agoMerge branch '3408-drop-debian-9-stretch-v9_16' into 'v9_16'
Petr Špaček [Tue, 28 Jun 2022 16:00:34 +0000 (16:00 +0000)] 
Merge branch '3408-drop-debian-9-stretch-v9_16' into 'v9_16'

Drop support for Debian 9 (Stretch) [v9_16]

See merge request isc-projects/bind9!6496

3 years agoDeclare Debian 9 (Stretch) community-maintained
Petr Špaček [Thu, 23 Jun 2022 16:17:49 +0000 (18:17 +0200)] 
Declare Debian 9 (Stretch) community-maintained

(cherry picked from commit 4ce1f25210176b671363a82e68470fef4dfe00ae)

3 years agoDrop Debian 9 (Stretch) from CI
Petr Špaček [Thu, 23 Jun 2022 16:16:28 +0000 (18:16 +0200)] 
Drop Debian 9 (Stretch) from CI

(cherry picked from commit aa86a8bcf0aaa25f678cf0fcd22050e8ce084227)

3 years agoMerge branch '3422-dnssec-policy-clarifications-v9_16' into 'v9_16'
Matthijs Mekking [Mon, 27 Jun 2022 12:38:18 +0000 (12:38 +0000)] 
Merge branch '3422-dnssec-policy-clarifications-v9_16' into 'v9_16'

[v9_16] Add some clarifications wrt dynamic zones

See merge request isc-projects/bind9!6490

3 years agoAdd some clarifications wrt dynamic zones
Matthijs Mekking [Fri, 24 Jun 2022 14:36:23 +0000 (16:36 +0200)] 
Add some clarifications wrt dynamic zones

These were suggested by GitLab user @elmaimbo.

(cherry picked from commit fb517eb52a64a784cafd29ed1e046f60c34935b7)

3 years agoMerge branch '3420-rrsetorder-update-status-v9_16' into 'v9_16'
Mark Andrews [Thu, 23 Jun 2022 07:56:14 +0000 (07:56 +0000)] 
Merge branch '3420-rrsetorder-update-status-v9_16' into 'v9_16'

Add missing update of status variable in rrsetorder system test [v9_16]

See merge request isc-projects/bind9!6481

3 years agoReplace expr's with $((expression)) shell constucts
Mark Andrews [Tue, 21 Jun 2022 02:42:21 +0000 (12:42 +1000)] 
Replace expr's with $((expression)) shell constucts

Also make indenting consistent.

(cherry picked from commit 669c42cd950da295bbfc47c93c97931b3b46344e)

3 years agoAdd missing update of status variable in rrsetorder system test
Mark Andrews [Thu, 23 Jun 2022 06:55:59 +0000 (16:55 +1000)] 
Add missing update of status variable in rrsetorder system test

(cherry picked from commit da63e63c41190cfe8f5acc021c05c58585fb6e7f)

3 years agoMerge branch 'mnowak/add-system_gcc_bullseye_unstable_amd64-ci-job-v9_16' into 'v9_16'
Michal Nowak [Wed, 22 Jun 2022 13:52:21 +0000 (13:52 +0000)] 
Merge branch 'mnowak/add-system_gcc_bullseye_unstable_amd64-ci-job-v9_16' into 'v9_16'

[v9_16] Add system:gcc:bullseye:unstable:amd64 CI job

See merge request isc-projects/bind9!6477

3 years agoPut default-triggering-rules anchor in alphabetical order
Michal Nowak [Wed, 22 Jun 2022 08:49:04 +0000 (10:49 +0200)] 
Put default-triggering-rules anchor in alphabetical order

(cherry picked from commit db1a72d58155c520be37faa43861b54252235150)

3 years agoRename schedules_tags_web_triggering_rules anchor
Michal Nowak [Mon, 20 Jun 2022 10:27:26 +0000 (12:27 +0200)] 
Rename schedules_tags_web_triggering_rules anchor

The schedules_tags_web_triggering_rules anchor name should match it's
content, hence api_schedules_tags_triggers_web_triggering_rules anchor
name.

(cherry picked from commit 0629f53431e4ded22f77511fe39d429266a6d734)

3 years agoExtract API, schedules, triggers, and web triggering rules
Michal Nowak [Mon, 20 Jun 2022 10:22:09 +0000 (12:22 +0200)] 
Extract API, schedules, triggers, and web triggering rules

(cherry picked from commit fbc1345dd745726e0276c0f0fa8e5d0f3d8c3ab0)

3 years agoAdd system:gcc:bullseye:unstable:amd64 CI job
Michal Nowak [Mon, 20 Jun 2022 10:17:07 +0000 (12:17 +0200)] 
Add system:gcc:bullseye:unstable:amd64 CI job

Without this CI job long pytest jobs are not being run in the CI.

(cherry picked from commit d606f3902297308f18c9da3de7870030b5bcfc22)

3 years agoMerge branch '3309-fix-destination-port-extraction-for-client-queries-v9_16' into...
Michał Kępień [Wed, 22 Jun 2022 12:28:13 +0000 (12:28 +0000)] 
Merge branch '3309-fix-destination-port-extraction-for-client-queries-v9_16' into 'v9_16'

[v9_16] Fix destination port extraction for client queries

See merge request isc-projects/bind9!6475

3 years agoAdd CHANGES entry for GL #3309
Michał Kępień [Wed, 22 Jun 2022 11:45:46 +0000 (13:45 +0200)] 
Add CHANGES entry for GL #3309

(cherry picked from commit 58c3513fa6b53ddc0d930875a386af4244f86084)

3 years agoCheck that the UDP destination port is logged via dnstap
Mark Andrews [Wed, 22 Jun 2022 11:45:46 +0000 (13:45 +0200)] 
Check that the UDP destination port is logged via dnstap

(cherry picked from commit 8d8396c3a7d598e1e74be71bdc72a9452c0d520e)

3 years agoFix destination port extraction for client queries
Michał Kępień [Wed, 22 Jun 2022 11:45:46 +0000 (13:45 +0200)] 
Fix destination port extraction for client queries

The current logic for determining the address of the socket to which a
client sent its query is:

 1. Get the address:port tuple from the netmgr handle using
    isc_nmhandle_localaddr() or from the ns_interface_t structure.

 2. Convert the address:port tuple from step 1 into an isc_netaddr_t
    using isc_netaddr_fromsockaddr().

 3. Convert the address from step 2 back into a socket address with the
    port set to 0 using isc_sockaddr_fromnetaddr().

Note that the port number (readily available in the netmgr handle or in
the ns_interface_t structure) is needlessly lost in the process,
preventing it from being recorded in dnstap captures of client traffic
produced by named.

Fix by first storing the address:port tuple in client->destsockaddr and
then creating an isc_netaddr_t from that structure.  This allows the
port number to be retained in client->destsockaddr, which is what
subsequently gets passed to dns_dt_send().

Remove an outdated code comment.

(cherry picked from commit 2f945703f2c078db315653e6b57776e67939150e)

3 years agoMerge branch 'mnowak/ubuntu-22.04-jammy-jellyfish-v9_16' into 'v9_16'
Michal Nowak [Wed, 22 Jun 2022 11:05:49 +0000 (11:05 +0000)] 
Merge branch 'mnowak/ubuntu-22.04-jammy-jellyfish-v9_16' into 'v9_16'

[v9_16] Add Ubuntu 22.04 LTS (Jammy Jellyfish)

See merge request isc-projects/bind9!6471

3 years agoDo not run Ubuntu 18.04 jobs in MR-triggered pipelines
Michal Nowak [Wed, 15 Jun 2022 14:06:48 +0000 (16:06 +0200)] 
Do not run Ubuntu 18.04 jobs in MR-triggered pipelines

With the addition of Ubuntu 22.04 three more CI jobs were added. To
compensate for that, move Ubuntu 18.04 jobs out of MR-triggered
pipelines to schedule-triggered ones.

Also, move --disable-geoip ./configure options from Ubuntu 18.04 to
Ubuntu 20.04 jobs to keep these options in the more frequent
MR-triggered pipelines.

(cherry picked from commit 06c591667efbe8d4e2ac12c1c6a679a34e0e8158)

3 years agoAdd Ubuntu 22.04 LTS (Jammy Jellyfish)
Michal Nowak [Wed, 15 Jun 2022 14:00:35 +0000 (16:00 +0200)] 
Add Ubuntu 22.04 LTS (Jammy Jellyfish)

(cherry picked from commit 4c2af3bdfa264167243cd36d8916fb497ecf3c0c)

3 years agoMerge branch '3397-document-interaction-dnssec-update-config-options-v9_16' into...
Matthijs Mekking [Tue, 21 Jun 2022 14:49:58 +0000 (14:49 +0000)] 
Merge branch '3397-document-interaction-dnssec-update-config-options-v9_16' into 'v9_16'

[v9_16] Document where updates and DNSSEC records are stored

See merge request isc-projects/bind9!6464

3 years agoAdd comment on DNSSEC signing zone configuration
Matthijs Mekking [Fri, 17 Jun 2022 08:29:51 +0000 (10:29 +0200)] 
Add comment on DNSSEC signing zone configuration

I was slightly confused here, so IMO it can use a comment.

(cherry picked from commit c80531758cb2bfc5aa4cea14046f0daba4f87dd6)

3 years agoDocument where updates and DNSSEC records are stored
Matthijs Mekking [Fri, 17 Jun 2022 08:21:15 +0000 (10:21 +0200)] 
Document where updates and DNSSEC records are stored

Make clear that inline-signing stores DNSSEC records in a signed
version of the zone, using the zone's filename plus ".signed" extension.

Tell that dynamic zones store updates in the zone's filename.

DNSSEC records for dynamic zones also go in the zone's filename, unless
inline-signing is enabled.

Then, dnssec-policy assumes inline-signing, but only if the zone is
not dynamic.

(cherry picked from commit 8860f6b4ffbb392e8d0db05f3577184258612d1a)

3 years agoMerge branch 'mnowak/bump-clang-to-version-14-v9_16' into 'v9_16'
Michal Nowak [Fri, 17 Jun 2022 06:36:39 +0000 (06:36 +0000)] 
Merge branch 'mnowak/bump-clang-to-version-14-v9_16' into 'v9_16'

[v9_16] Update clang to version 14

See merge request isc-projects/bind9!6456

3 years agoExtract Clang version to $CLANG_VERSION
Michal Nowak [Wed, 15 Jun 2022 17:17:38 +0000 (19:17 +0200)] 
Extract Clang version to $CLANG_VERSION

Extracting Clang version helps with updating Clang version in one place
and not missing one of its instances.

(cherry picked from commit bd17dec0454415b6b5b67e204bf497e4bbdfa862)

3 years agoFix external_symbolizer_path on Fedora
Michal Nowak [Wed, 15 Jun 2022 17:05:56 +0000 (19:05 +0200)] 
Fix external_symbolizer_path on Fedora

The external_symbolizer_path was wrong on Fedora since moving gcc:tsan
jobs from Debian to Fedora.

(cherry picked from commit e98b9c500903568c3ee23a66ee0d85d86f903499)

3 years agoUpdate clang to version 14
Michal Nowak [Tue, 31 May 2022 14:55:01 +0000 (16:55 +0200)] 
Update clang to version 14

(cherry picked from commit 1c45a9885afd325ec9de81820553398597506299)

3 years agoMerge branch 'mnowak/checkds-pylint-implicit-str-concat-fixes-v9_16' into 'v9_16'
Michal Nowak [Thu, 16 Jun 2022 11:56:10 +0000 (11:56 +0000)] 
Merge branch 'mnowak/checkds-pylint-implicit-str-concat-fixes-v9_16' into 'v9_16'

[v9_16] Fix implicit string concatenation in tests-checkds.py

See merge request isc-projects/bind9!6454

3 years agoFix implicit string concatenation in tests-checkds.py
Michal Nowak [Thu, 16 Jun 2022 09:25:43 +0000 (11:25 +0200)] 
Fix implicit string concatenation in tests-checkds.py

pylint 2.14.2 reports the following warnings:

    bin/tests/system/checkds/tests-checkds.py:265:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
    bin/tests/system/checkds/tests-checkds.py:273:0: W1404: Implicit string concatenation found in call (implicit-str-concat)

(cherry picked from commit 831ac8add101cd7e73327adef672840a3465af95)