Commit Graph

33764 Commits

Author SHA1 Message Date
Evan Hunt
c2f7b2e7d2 Fix digdelv test error
The digdelv system test has a test case in which stderr was
included in the dig output. When trace logging was in use,
this confused the grep and caused a spurious test failure.

(cherry picked from commit 2143120636)
2021-10-27 12:08:12 -07:00
Mark Andrews
563c0be633 Merge branch '2947-unexpected-deletion-of-configured-catalog-zone-v9_16' into 'v9_16'
Prevent existing catalog zone entries being incorrectly deleted

See merge request isc-projects/bind9!5533
2021-10-27 13:26:56 +00:00
Mark Andrews
e1490496a6 Check that existing catalog zone entries are preserved
Update the 'catz' system test by adding tests that update an
catalog zone (catalog1.example) while preserving existing entries
(increase SOA serial) then check that catalog zone has transferred
and that the existing entries have not accidentally been removed
as a consequence (can return updated zone content).

(cherry picked from commit bf9c569852)
2021-10-28 00:04:44 +11:00
Mark Andrews
d329d47bae Prevent existing catalog zone entries being incorrectly deleted
After receiving a new version of a catalog zone it is required
to merge it with the old version.

The algorithm walks through the new version's hash table and applies
the following logic:

1. If an entry from the new version does not exist in the old
   version, then it's a new entry, add the entry to the `toadd` hash
   table.
2. If the zone does not exist in the set of configured zones, because
   it was deleted via rndc delzone or it was removed from another
   catalog zone instance, then add into to the `toadd` hash table to
   be reinstantiated.
3. If an entry from the new version also exists in the old version,
   but is modified, then add the entry to the `tomod` hash table, then
   remove it from the old version's hash table.
4. If an entry from the new version also exists in the old version and
   is the same (unmodified) then just remove it from the old version's
   hash table.

The algorithm then deletes all the remaining zones which still exist
in the old version's hash table (because only the ones that don't
exist in the new version should now remain there), then adds the ones
that were added to the `toadd`, and modifies the ones that were added
to the `tomod`, completing the merge.

During a recent refactoring, the part when the entry should be
removed from the old version's hash table on condition (4.) above
was accidentally omitted, so the unmodified zones were remaining
in the old version's hash table and consequently being deleted.

(cherry picked from commit 63145fb1d3)
2021-10-28 00:04:44 +11:00
Michal Nowak
b0f9c75c03 Merge branch '2458-run-asan-and-tsan-with-latest-stable-gcc-v9_16' into 'v9_16'
[v9_16] Use Fedora image for GCC ASAN and TSAN CI jobs

See merge request isc-projects/bind9!5527
2021-10-22 13:22:12 +00:00
Michal Nowak
b7c2870c4b Drop GCC ThreadSanitizer suppresion of fstrm-originated calls
With custom fstrm library in the Fedora image which uses mutexes instead
of barriers ThreadSanitizer suppression with GCC is not necessary
anymore.

(cherry picked from commit 6179011a50)
2021-10-22 13:06:40 +02:00
Michal Nowak
bbc39801ae Rename ASAN_OPTIONS_COMMON to ASAN_OPTIONS
Renaming the variable removes some of the complexity.

(cherry picked from commit 1f4a56cb3e)
2021-10-22 13:06:10 +02:00
Michal Nowak
5f1c9c28e9 Use Fedora image for GCC ASAN and TSAN CI jobs
For the sake of running ASAN and TSAN jobs with the latest stable GCC,
replace "base image" (Debian Buster with GCC 8.3.0) with Fedora 34 image
with GCC 11.

(cherry picked from commit 6ab2d89686)
2021-10-22 13:03:13 +02:00
Michal Nowak
9dbcd636e8 Merge branch 'mnowak/debian-11-bullseye-v9_16' into 'v9_16'
[v9_16] Add Debian 11 (bullseye)

See merge request isc-projects/bind9!5525
2021-10-22 09:05:34 +00:00
Michal Nowak
376712cd12 Do not spawn Debian 9 CI jobs in merge requests
(cherry picked from commit 1b9a9c2829)
2021-10-22 10:44:41 +02:00
Michal Nowak
3b95ecbd47 Add Debian 11 (bullseye)
(cherry picked from commit 2b5dfae5de)
2021-10-22 10:35:40 +02:00
Michal Nowak
74d2abdfc3 Merge branch 'mnowak/openbsd-7.0-v9_16' into 'v9_16'
[v9_16] Add OpenBSD 7.0

See merge request isc-projects/bind9!5523
2021-10-22 07:50:17 +00:00
Michal Nowak
85a37ee002 Add OpenBSD 7.0
(cherry picked from commit 75e873ed98)
2021-10-22 09:40:00 +02:00
Ondřej Surý
bbcd772b16 Merge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime-v9_16' into 'v9_16'
Add missing DNS_ZONEFLG_DUMPING to setmodtime()

See merge request isc-projects/bind9!5520
2021-10-21 10:52:44 +00:00
Ondřej Surý
40fa423fd3 Add missing DNS_ZONEFLG_DUMPING to setmodtime()
It was found, that the original commit adding the setmodtime() was
incompletely squashed and there was double check for
DNS_ZONEFLG_NEEDDUMP instead of check for DNS_ZONEFLG_NEEDDUMP and
DNS_ZONEFLG_DUMPING.

Change the duplicate check to DNS_ZONEFLG_DUMPING.

(cherry picked from commit 55ac6b7394)
2021-10-21 12:33:24 +02:00
Ondřej Surý
9d47109b2b Merge branch 'ondrej/fix-isc_time_add-overflow-v9_16' into 'v9_16'
Fix isc_time_add() overflow

See merge request isc-projects/bind9!5517
2021-10-21 08:17:22 +00:00
Ondřej Surý
3d4ec2f244 Add isc_time_add and isc_time_subtract unit test
The isc_time_add() and isc_time_subtract() didn't have a unit test, add
the unit test with couple of edge case vectors to check whether overflow
and underflow is correctly handled.

(cherry picked from commit 04511736a0)
2021-10-21 09:51:53 +02:00
Ondřej Surý
b58611a08b Fix isc_time_add() overflow
The isc_time_add() could overflow when t.seconds + i.seconds == UINT_MAX
and t.nanoseconds + i.nanoseconds >= NS_PER_S.

Fix the overflow in isc_time_add(), and simplify the ISC_R_RANGE checks
both in isc_time_add() and isc_time_subtract() functions.

(cherry picked from commit 8c05f12bc8)
2021-10-21 09:51:48 +02:00
Evan Hunt
68ee77ae42 Merge branch 'each-cleanup-qmin-test-v9_16' into 'v9_16'
fix qmin system test

See merge request isc-projects/bind9!5510
2021-10-20 08:56:22 +00:00
Evan Hunt
9456be2225 fix qmin system test
The qmin system test was printing spurious output.  On investigation,
the test case turned out to be both broken and ineffective: its
expectations were wrong, and it was printing the output because its
wrong expectations were not met, and those failed expectations were
not causing a test failure. All of this has been corrected.

(cherry picked from commit ac3eb921fc)
2021-10-20 01:36:53 -07:00
Michał Kępień
c144134532 Merge branch 'compat/main/arm-sphinx-v9_16' into 'v9_16'
[v9_16] Enable building documentation with Sphinx < 2.0.0

See merge request isc-projects/bind9!5507
2021-10-19 11:55:38 +00:00
Petr Mensik
7101192301 Enable building documentation with Sphinx < 2.0.0
The ReferenceRole class is only available in Sphinx >= 2.0.0, which
makes building BIND 9 documentation impossible with older Sphinx
versions:

    Running Sphinx v1.7.6

    Configuration error:
    There is a programable error in your configuration file:

    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/sphinx/config.py", line 161, in __init__
        execfile_(filename, config)
      File "/usr/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
        exec_(code, _globals)
      File "conf.py", line 21, in <module>
        from sphinx.util.docutils import ReferenceRole
    ImportError: cannot import name 'ReferenceRole'

Work around the problem by defining a stub version of the ReferenceRole
class if the latter cannot be imported.  This allows documentation
(without GitLab hyperlinks in release notes) to be built with older
Sphinx versions.

(cherry picked from commit 8f8bbae3fc)
2021-10-19 13:47:48 +02:00
Ondřej Surý
b2b4d8117f Merge branch '2873-configuration-issues-on-solaris-v9_16' into 'v9_16'
Use correct compiler version flag in the autoconf script

See merge request isc-projects/bind9!5502
2021-10-18 13:46:44 +00:00
Ondřej Surý
36f97713a1 Use correct compiler version flag in the autoconf script
The autoconf script prints used compiler version at the end of the
configure script.  Solaris native compiler doesn't support --version,
and -V has to be used which in turn isn't supported by Gcc/Clang.
Detect which version flag has to be used and call $CC with it.

(cherry picked from commit 7eb208005f)
2021-10-18 15:27:18 +02:00
Mark Andrews
36d2c5b741 Merge branch '2326-some-of-the-statschannel-system-test-cases-fail-if-i-build-bind-9-16-9-v9_16' into 'v9_16'
Don't tests stats channels that haven't been configured

See merge request isc-projects/bind9!5495
2021-10-14 06:52:24 +00:00
Mark Andrews
981643b19a Don't tests stats channels that haven't been configured
pytest was failing because it was testing features that had
not been configured.  test to see if those features have been
configured before running the tests.

(cherry picked from commit 10c01cba61)
2021-10-14 17:33:01 +11:00
Evan Hunt
9093cd8662 Merge branch 'each-cleanup-ancient-v9_16' into 'v9_16'
cleanup references to ancient named.conf options

See merge request isc-projects/bind9!5492
2021-10-13 16:09:34 +00:00
Evan Hunt
6836e3c071 cleanup references to ancient named.conf options
some removed options were still referenced in config.c or the ARM.

(cherry picked from commit 69e25f41ae)
2021-10-12 23:52:39 -07:00
Ondřej Surý
8522d97433 Merge branch '2933-bump-the-default-clang-version-to-13-v9_16' into 'v9_16'
Change the LLVM tools version to 13

See merge request isc-projects/bind9!5488
2021-10-12 10:00:02 +00:00
Ondřej Surý
093cd31ae2 Update the source code formatting using clang-format-13
clang-format-13 fixed some of the formatting that clang-format-12 got
wrong.  Update the formatting.

(cherry picked from commit ed95f9fba3)
2021-10-12 11:31:55 +02:00
Ondřej Surý
173675bbd0 Change the LLVM tools version to 13
LLVM 13.0.0 was released on 4. October 2021, change the default version
to the current stable.

(cherry picked from commit 16916ab3e3)
2021-10-12 11:31:10 +02:00
Mark Andrews
64786a60b7 Merge branch '2935-cid-339035-1-of-1-explicit-null-dereferenced-forward_null-v9_16' into 'v9_16'
Fix cleanup of signature buffer in dns_dnssec_signmessage

See merge request isc-projects/bind9!5483
2021-10-12 00:09:22 +00:00
Mark Andrews
8a962622f2 Add CHANGES for [GL #2935]
(cherry picked from commit c48ca52851)
2021-10-12 10:19:49 +11:00
Mark Andrews
187787c723 Fix cleanup of signature buffer in dns_dnssec_signmessage
A NULL pointer could be freed if error handling occured.

(cherry picked from commit 0378c05ba0)
2021-10-12 10:19:08 +11:00
Mark Andrews
5f07ee0da3 Merge branch '2901-large-number-of-small-zones-in-map-format-cannot-be-loaded' into 'v9_16'
Resolve "Large number of small zones in `map` format cannot be loaded"

See merge request isc-projects/bind9!5398
2021-10-06 23:41:35 +00:00
Mark Andrews
f6e66e94f0 document 'masterfile-format map' vs 'vm.max_map_count' 2021-10-06 23:22:10 +00:00
Arаm Sаrgsyаn
092284b2a8 Merge branch '2818-catz-arm-primaries-masters-fix-v9_16' into 'v9_16'
[v9_16] Fix catalog zones configuration syntax in the ARM

See merge request isc-projects/bind9!5459
2021-10-05 13:11:27 +00:00
Aram Sargsyan
72d12aff56 Fix catalog zones configuration syntax in the ARM
The 55636ab5 commit made some changes in the reference manual
regarding catalog zones which do not actually correspond to reality
for the v9_16 branch.

This commit reverts those changes.
2021-10-05 12:46:57 +00:00
Mark Andrews
b16d52c13c Merge branch '2900-listenlist_test-notify_test-and-query_test-failing-v9_16' into 'v9_16'
Increase the number of file descriptors available

See merge request isc-projects/bind9!5462
2021-10-05 09:54:32 +00:00
Mark Andrews
050e6e757a Increase the number of file descriptors available
The 'listenlist_test', 'notify_test', and 'query_test' tests failed
when the descriptor limit was 256 on MacOS 11.6 with 8 cpus. On the
test platform the limit needed to be increased to ~400.  Increase
the limit to at least 1024 to give some head room.

(cherry picked from commit 877f52b772)
2021-10-05 17:46:56 +11:00
Arаm Sаrgsyаn
9298caddf4 Merge branch '2308-catz-reload-when-missing-a-zone-v9_16' into 'v9_16'
[v9_16] Handle a missing zone when reloading a catalog zone

See merge request isc-projects/bind9!5454
2021-09-30 20:43:24 +00:00
Aram Sargsyan
b85e92f82f Add CHANGES and release notes for [GL #2308]
(cherry picked from commit 3edaa0bde6)
2021-09-30 20:16:25 +00:00
Aram Sargsyan
311074f51e Handle a missing zone when reloading a catalog zone
Previously a missing/deleted zone which was referenced by a catalog
zone was causing a crash when doing a reload.

This commit will make `named` to ignore the fact that the zone is
missing, and make sure to restore it later on.

(cherry picked from commit 94a5712801)
2021-09-30 20:15:19 +00:00
Ondřej Surý
a6741da4af Merge branch '2908-rwlock-with-reader-and-writer-both-waiting-v9_16' into 'v9_16'
Pause the dbiterator before calling dns_db_find

See merge request isc-projects/bind9!5450
2021-09-29 16:23:31 +00:00
Mark Andrews
85fd9821e5 Add CHANGES note for [GL #2908]
(cherry picked from commit c04bce278f)
2021-09-29 18:04:14 +02:00
Mark Andrews
21771f5295 Pause the dbiterator before calling dns_db_find
zone.c:integrity_checks() acquires a read lock while iterating the
zone database, and calls zone_check_mx() which acquires another
read lock. If another thread tries to acquire a write lock in the
meantime, it can deadlock. Calling dns_dbiterator_pause() to release
the first read lock prevents this.

(cherry picked from commit 4e1faa35d5)
2021-09-29 18:04:14 +02:00
Mark Andrews
b166563e06 Merge branch '2911-9-16-21-regression-legacy-check-names-configuration-does-not-work-anymore-v9_16' into 'v9_16'
Fix "check-names master" and "check-names slave"

See merge request isc-projects/bind9!5448
2021-09-29 10:11:56 +00:00
Mark Andrews
190f71f93a Add CHANGES note for [GL #2911]
(cherry picked from commit 14249ce9fe)
2021-09-29 19:52:31 +10:00
Mark Andrews
0a6ed417b5 Check that 'check-names {secondary|slave} ignore;' works
(cherry picked from commit 0b0d400d7c)
2021-09-29 19:51:53 +10:00
Mark Andrews
f72946794f Check that 'check-names master ignore;' works
(cherry picked from commit 9107c8caeb)
2021-09-29 19:51:53 +10:00