]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoMerge branch '2916-duplicate-catalog-zones-is-fatal' into 'main'
Mark Andrews [Tue, 26 Oct 2021 14:54:03 +0000 (14:54 +0000)] 
Merge branch '2916-duplicate-catalog-zones-is-fatal' into 'main'

Resolve "duplicate catalog-zones is fatal"

Closes #2916

See merge request isc-projects/bind9!5432

4 years agoAdd CHANGES note for [GL #2916]
Mark Andrews [Wed, 22 Sep 2021 05:29:58 +0000 (15:29 +1000)] 
Add CHANGES note for [GL #2916]

4 years agoHandle duplicate catalog zone entries gracefully
Mark Andrews [Wed, 22 Sep 2021 05:21:45 +0000 (15:21 +1000)] 
Handle duplicate catalog zone entries gracefully

Duplicate catalog zone entries caused an assertion failure
in named during configuration.  This is now a soft error
that is detected earlier by named and also by named-checkconf.

4 years agoMerge branch '1542-silent-failure-of-build-when-creating-a-new-rr-type-if-code-is...
Mark Andrews [Mon, 25 Oct 2021 21:52:34 +0000 (21:52 +0000)] 
Merge branch '1542-silent-failure-of-build-when-creating-a-new-rr-type-if-code-is-out-of-range' into 'main'

Resolve "Silent failure of build when creating a new RR Type if CODE is out of range"

Closes #1542

See merge request isc-projects/bind9!2895

4 years agoDocument typenumber and classnumber format
Matthijs Mekking [Thu, 21 Oct 2021 13:22:57 +0000 (15:22 +0200)] 
Document typenumber and classnumber format

Document the typenumber and classnumber in doc/dev/rdata so that it
is clear what the expected format is.

4 years agoError out if gen finds a type or class that is greater than 65535
Mark Andrews [Wed, 15 Jan 2020 02:54:05 +0000 (13:54 +1100)] 
Error out if gen finds a type or class that is greater than 65535

4 years agoMerge branch '2956-nsec3param-no-salt-n-pepa' into 'main'
Matthijs Mekking [Mon, 25 Oct 2021 10:08:30 +0000 (10:08 +0000)] 
Merge branch '2956-nsec3param-no-salt-n-pepa' into 'main'

Change nsec3param default to iter 0 salt-length 0

Closes #2956

See merge request isc-projects/bind9!5513

4 years agoAdd release note and CHANGES for #2956
Matthijs Mekking [Thu, 21 Oct 2021 08:12:21 +0000 (10:12 +0200)] 
Add release note and CHANGES for #2956

Feature change.

4 years agoUpdate tests to match new nsec3param default
Matthijs Mekking [Wed, 20 Oct 2021 14:38:37 +0000 (16:38 +0200)] 
Update tests to match new nsec3param default

Update the nsec3 system tests to use the new default values. Change
the policy for "nsec3-other" so that we still have a test case for
non-zero salt length.

4 years agoChange nsec3param default to iter 0 salt-length 0
Matthijs Mekking [Wed, 20 Oct 2021 14:36:11 +0000 (16:36 +0200)] 
Change nsec3param default to iter 0 salt-length 0

When using 'nsec3param' in 'dnssec-policy' and no specific parameters
are provided, default to zero additional iterations and no salt, as
recommended by draft-ietf-dnsop-nsec3-guidance.

4 years agoMerge branch '2742-serve-stale-is-confusing' into 'main'
Matthijs Mekking [Mon, 25 Oct 2021 09:26:33 +0000 (09:26 +0000)] 
Merge branch '2742-serve-stale-is-confusing' into 'main'

Update rndc serve-stale status output

Closes #2742

See merge request isc-projects/bind9!5521

4 years agoAdd release note and CHANGES for #2742
Matthijs Mekking [Thu, 21 Oct 2021 14:48:38 +0000 (16:48 +0200)] 
Add release note and CHANGES for #2742

Feature change.

4 years agoUpdate rndc serve-stale status output
Matthijs Mekking [Thu, 21 Oct 2021 14:46:15 +0000 (16:46 +0200)] 
Update rndc serve-stale status output

Explicitly show if cache is enabled or disabled, and if answering stale
data is enabled or disabled.

4 years agoMerge branch '2458-run-asan-and-tsan-with-latest-stable-gcc' into 'main'
Michal Nowak [Fri, 22 Oct 2021 13:13:30 +0000 (13:13 +0000)] 
Merge branch '2458-run-asan-and-tsan-with-latest-stable-gcc' into 'main'

Use Fedora image for ASAN and TSAN CI jobs; drop TSan suppressions

Closes #2458

See merge request isc-projects/bind9!4709

4 years agoDrop GCC ThreadSanitizer suppresion of fstrm-originated calls
Michal Nowak [Wed, 20 Oct 2021 17:47:17 +0000 (19:47 +0200)] 
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.

4 years agoRename ASAN_OPTIONS_COMMON to ASAN_OPTIONS
Michal Nowak [Wed, 20 Oct 2021 14:06:45 +0000 (16:06 +0200)] 
Rename ASAN_OPTIONS_COMMON to ASAN_OPTIONS

Renaming the variable removes some of the complexity.

4 years agoUse Fedora image for GCC ASAN and TSAN CI jobs
Michal Nowak [Thu, 18 Feb 2021 15:19:57 +0000 (16:19 +0100)] 
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.

4 years agoMerge branch 'mnowak/debian-11-bullseye' into 'main'
Michal Nowak [Fri, 22 Oct 2021 08:33:39 +0000 (08:33 +0000)] 
Merge branch 'mnowak/debian-11-bullseye' into 'main'

Add Debian 11 (bullseye)

See merge request isc-projects/bind9!5330

4 years agoDo not spawn Debian 9 CI jobs in merge requests
Michal Nowak [Thu, 21 Oct 2021 11:43:42 +0000 (13:43 +0200)] 
Do not spawn Debian 9 CI jobs in merge requests

4 years agoAdd Debian 11 (bullseye)
Michal Nowak [Tue, 17 Aug 2021 08:38:14 +0000 (10:38 +0200)] 
Add Debian 11 (bullseye)

4 years agoMerge branch 'mnowak/openbsd-7.0' into 'main'
Michal Nowak [Fri, 22 Oct 2021 07:38:06 +0000 (07:38 +0000)] 
Merge branch 'mnowak/openbsd-7.0' into 'main'

Add OpenBSD 7.0

See merge request isc-projects/bind9!5519

4 years agoAdd OpenBSD 7.0
Michal Nowak [Thu, 21 Oct 2021 09:48:21 +0000 (11:48 +0200)] 
Add OpenBSD 7.0

4 years agoMerge branch '2966-logfileconfig-system-test-is-timing-sensitive' into 'main'
Mark Andrews [Thu, 21 Oct 2021 20:46:12 +0000 (20:46 +0000)] 
Merge branch '2966-logfileconfig-system-test-is-timing-sensitive' into 'main'

Resolve "logfileconfig system test is timing sensitive"

Closes #2966

See merge request isc-projects/bind9!5516

4 years agoAccept either 2 or 3 old versions of log file
Mark Andrews [Thu, 21 Oct 2021 06:22:58 +0000 (17:22 +1100)] 
Accept either 2 or 3 old versions of log file

Depending upon when the directory is sampled there may be 2
(oldest version removed and rename / reopen is in progresss) or
3 old versions of the log file.

4 years agoMerge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime' into 'main'
Ondřej Surý [Thu, 21 Oct 2021 10:33:03 +0000 (10:33 +0000)] 
Merge branch 'ondrej/fix-missing-DNS_ZONEFLG_DUMPING-in-setmodtime' into 'main'

Add missing DNS_ZONEFLG_DUMPING to setmodtime()

See merge request isc-projects/bind9!5512

4 years agoAdd missing DNS_ZONEFLG_DUMPING to setmodtime()
Ondřej Surý [Wed, 20 Oct 2021 11:01:13 +0000 (13:01 +0200)] 
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.

4 years agoMerge branch '2927-lame-server-loop' into 'main'
Evan Hunt [Thu, 21 Oct 2021 09:26:44 +0000 (09:26 +0000)] 
Merge branch '2927-lame-server-loop' into 'main'

check for loops in ADB finds

Closes #2927

See merge request isc-projects/bind9!5474

4 years agoCHANGES and release note for [GL #2927]
Evan Hunt [Tue, 19 Oct 2021 06:20:32 +0000 (23:20 -0700)] 
CHANGES and release note for [GL #2927]

4 years agoadd a system test with an ADB loop
Evan Hunt [Tue, 19 Oct 2021 06:14:28 +0000 (23:14 -0700)] 
add a system test with an ADB loop

Add a lame delegation to lame.example.org with only an A record
in the additional section; on failure, this will trigger a retry
with AAAA, which will loop. Test that dig returns SERVFAIL, in
addition to confirming that named doesn't hang on shutdown.

4 years agocheck for loops in ADB finds
Evan Hunt [Wed, 6 Oct 2021 20:42:09 +0000 (13:42 -0700)] 
check for loops in ADB finds

If an ADB find is started on behalf of a resolver fetch, and fails to
find any addresses but has a pending resolver fetch associated with it,
then we need to check whether the fetch it's waiting on is the one
that created it. If so, it can never finish and needs to be terminated.

4 years agoincidental cleanup
Evan Hunt [Tue, 19 Oct 2021 00:57:58 +0000 (17:57 -0700)] 
incidental cleanup

The NAME_FETCH_A and NAME_FETCH_AAAA macros were meant to be
boolean, indicating whether the pointers were set or not, while
the NAME_FETCH_V4 and NAME_FETCH_V6 macros were meant to return
the pointer values. The latter were only used as booleans, so
they've been removed in favor of the former.

Also did some style cleanup and removed an unreachable code block.

4 years agoMerge branch '2963-gettcp-assert' into 'main'
Evan Hunt [Thu, 21 Oct 2021 08:39:03 +0000 (08:39 +0000)] 
Merge branch '2963-gettcp-assert' into 'main'

don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle

Closes #2963

See merge request isc-projects/bind9!5515

4 years agodon't set DNS_DISPATCHSTATE_CONNECTED until attaching handle
Evan Hunt [Wed, 20 Oct 2021 18:39:13 +0000 (11:39 -0700)] 
don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle

there was a race possible in which a dispatch was put into
the 'connected' state before it had a TCP handle attached,
which could cause an assertion failure in dns_dispatch_gettcp().

4 years agoMerge branch 'ondrej/fix-isc_time_add-overflow' into 'main'
Ondřej Surý [Thu, 21 Oct 2021 07:50:50 +0000 (07:50 +0000)] 
Merge branch 'ondrej/fix-isc_time_add-overflow' into 'main'

Fix isc_time_add() overflow

See merge request isc-projects/bind9!5511

4 years agoAdd isc_time_add and isc_time_subtract unit test
Ondřej Surý [Wed, 20 Oct 2021 10:06:09 +0000 (12:06 +0200)] 
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.

4 years agoUse __builtin_*_overflow for isc_time_{add,subtract}()
Ondřej Surý [Wed, 20 Oct 2021 09:22:52 +0000 (11:22 +0200)] 
Use __builtin_*_overflow for isc_time_{add,subtract}()

Use the __builtin_uadd_overflow() and __builtin_usub_overflow() for
overflow checks in isc_time_add() and isc_time_subtract().  This
generates more efficient and safe code.

4 years agoFix isc_time_add() overflow
Ondřej Surý [Wed, 20 Oct 2021 09:22:52 +0000 (11:22 +0200)] 
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.

4 years agoMerge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'
Mark Andrews [Wed, 20 Oct 2021 20:45:17 +0000 (20:45 +0000)] 
Merge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'

Resolve "doth system test fails with 256 file descriptors"

Closes #2944

See merge request isc-projects/bind9!5477

4 years agoIncrease the number of file descriptors for stress_http_quota.py
Mark Andrews [Fri, 8 Oct 2021 01:57:24 +0000 (12:57 +1100)] 
Increase the number of file descriptors for stress_http_quota.py

stress_http_quota.py uses more than 256 file descriptors and fails
on some platforms.  Increase the available descriptors to 1024.

4 years agoMerge branch 'each-cleanup-qmin-test' into 'main'
Evan Hunt [Wed, 20 Oct 2021 06:30:05 +0000 (06:30 +0000)] 
Merge branch 'each-cleanup-qmin-test' into 'main'

fix qmin system test

See merge request isc-projects/bind9!5509

4 years agofix qmin system test
Evan Hunt [Tue, 19 Oct 2021 18:34:52 +0000 (11:34 -0700)] 
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.

4 years agoMerge branch 'compat/main/arm-sphinx' into 'main'
Michał Kępień [Tue, 19 Oct 2021 11:46:47 +0000 (11:46 +0000)] 
Merge branch 'compat/main/arm-sphinx' into 'main'

Make backward compatibility for older python-sphinx

See merge request isc-projects/bind9!5501

4 years agoEnable building documentation with Sphinx < 2.0.0
Petr Mensik [Fri, 15 Oct 2021 20:07:53 +0000 (22:07 +0200)] 
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.

4 years agoMerge branch '2953-remove-mctx-from-fctxbucket_t' into 'main'
Ondřej Surý [Tue, 19 Oct 2021 07:43:58 +0000 (07:43 +0000)] 
Merge branch '2953-remove-mctx-from-fctxbucket_t' into 'main'

Remove isc_mem_t from fctxbucket_t

Closes #2953

See merge request isc-projects/bind9!5506

4 years agoRemove isc_mem_t from fctxbucket_t
Ondřej Surý [Tue, 19 Oct 2021 07:16:39 +0000 (09:16 +0200)] 
Remove isc_mem_t from fctxbucket_t

The fctxbucket_t properly attaches to the fetchctx_t, so it can safely
use its memory context.  Save a little bit of memory by removing own
memory context from fctxbucket_t.

4 years agoMerge branch '2953-rework-the-fetchctx_t-reference-counting' into 'main'
Evan Hunt [Mon, 18 Oct 2021 22:08:45 +0000 (22:08 +0000)] 
Merge branch '2953-rework-the-fetchctx_t-reference-counting' into 'main'

Rewrite the fetchctx_t reference counting

Closes #2953

See merge request isc-projects/bind9!5500

4 years agoCHANGES for [GL #2953]
Evan Hunt [Mon, 18 Oct 2021 20:17:33 +0000 (13:17 -0700)] 
CHANGES for [GL #2953]

4 years agoIncidental cleanup
Evan Hunt [Sun, 17 Oct 2021 19:35:49 +0000 (12:35 -0700)] 
Incidental cleanup

- there are several allocation functions in adb.c that can no
  longer return NULL.
- a macro in rbt.c was never used.

4 years agoUse fibonacci hashing for zone counter buckets
Ondřej Surý [Mon, 18 Oct 2021 08:15:50 +0000 (10:15 +0200)] 
Use fibonacci hashing for zone counter buckets

Change the 'dbuckets' hash table in resolver.c to use fibonacci
hashing like the RBT.

4 years agoSimplify fctx_unlink() and fctx_destroy()
Evan Hunt [Sun, 17 Oct 2021 05:25:21 +0000 (22:25 -0700)] 
Simplify fctx_unlink() and fctx_destroy()

These functions are always called together; this commit
combines them.

4 years agoRewrite fetchctx_t reference counting
Ondřej Surý [Fri, 15 Oct 2021 12:04:42 +0000 (14:04 +0200)] 
Rewrite fetchctx_t reference counting

Using proper attach/detach functions for the fetch context
instead of fctx_increference() and _decreference() makes
it easier to debug reference counting errors in the resolver.

Fixed several such errors that were found as a result.

4 years agoMerge branch 'each-route-socket-fixes' into 'main'
Evan Hunt [Mon, 18 Oct 2021 21:25:28 +0000 (21:25 +0000)] 
Merge branch 'each-route-socket-fixes' into 'main'

fix route socket errors

See merge request isc-projects/bind9!5505

4 years agocheck statichandle before attaching
Evan Hunt [Sun, 17 Oct 2021 20:30:47 +0000 (13:30 -0700)] 
check statichandle before attaching

it is possible for udp_recv_cb() to fire after the socket
is already shutting down and statichandle is NULL; we need to
create a temporary handle in this case.

4 years agoattach the interface manager when activating a route socket
Evan Hunt [Sun, 17 Oct 2021 23:45:22 +0000 (16:45 -0700)] 
attach the interface manager when activating a route socket

it was possible for the route socket's udp_recv() callback to fire
after the interfacemgr was detached, causing an assertion failure.
this has now been fixed by referencing the interfacemgr when setting up
the route socket, and dereferencing it when shutting it down.

4 years agoMerge branch 'each-test-fixes' into 'main'
Evan Hunt [Mon, 18 Oct 2021 21:19:58 +0000 (21:19 +0000)] 
Merge branch 'each-test-fixes' into 'main'

Fix test errors that caused intermittent failures

See merge request isc-projects/bind9!5504

4 years agoFix statistics test error
Evan Hunt [Sun, 17 Oct 2021 18:45:21 +0000 (11:45 -0700)] 
Fix statistics test error

The statistics system test sometimes needs a pause to wait for the
expected stats to be reported.

Also, the test for priming queries was ineffective; the result of
the grep was not being checked.

4 years agoFix cds test error
Evan Hunt [Sun, 17 Oct 2021 18:45:21 +0000 (11:45 -0700)] 
Fix cds test error

The margin of error (up to 2 seconds) allowed for the inception time
in the cds system test was a bit too small, and has been increased to 3
seconds.

4 years agoFix catz test error
Evan Hunt [Sun, 17 Oct 2021 18:45:21 +0000 (11:45 -0700)] 
Fix catz test error

The catz system test included a test case that was looking for a single
answer record after an update, when it should have been looking for two.
The test usually passed because of timing - the first dig usually got a
response before the update was completed - but occasionally the update
processed fast enough for the test to fail. On investigation, it turned
out to be the test that was wrong.

4 years agoFix digdelv test error
Evan Hunt [Sun, 17 Oct 2021 18:45:21 +0000 (11:45 -0700)] 
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.

4 years agoMerge branch 'each-dispatch-fixes' into 'main'
Evan Hunt [Mon, 18 Oct 2021 21:06:56 +0000 (21:06 +0000)] 
Merge branch 'each-dispatch-fixes' into 'main'

Dispatch manager fixes

Closes #2957

See merge request isc-projects/bind9!5503

4 years agosilence compiler warning
Evan Hunt [Mon, 18 Oct 2021 19:49:40 +0000 (12:49 -0700)] 
silence compiler warning

Silence a warning about a signed/unsigned integer comparison.

4 years agoLock dispatch when canceling connect
Ondřej Surý [Mon, 18 Oct 2021 09:49:56 +0000 (11:49 +0200)] 
Lock dispatch when canceling connect

When canceling pending connections, the disp->pending list
was accessed unlocked.

4 years agoMerge branch '2873-configuration-issues-on-solaris' into 'main'
Ondřej Surý [Mon, 18 Oct 2021 13:23:06 +0000 (13:23 +0000)] 
Merge branch '2873-configuration-issues-on-solaris' into 'main'

Use correct compiler version flag in the autoconf script.

Closes #2873

See merge request isc-projects/bind9!5482

4 years agoUse correct compiler version flag in the autoconf script
Ondřej Surý [Mon, 11 Oct 2021 19:18:49 +0000 (21:18 +0200)] 
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.

4 years agoMerge branch '2926-netmgr-netlink' into 'main'
Evan Hunt [Fri, 15 Oct 2021 08:27:10 +0000 (08:27 +0000)] 
Merge branch '2926-netmgr-netlink' into 'main'

Use netmgr for route sockets and remove isc_socket

Closes #2926

See merge request isc-projects/bind9!5455

4 years agoCHANGES and release note for [GL #2926]
Evan Hunt [Sun, 3 Oct 2021 08:06:46 +0000 (01:06 -0700)] 
CHANGES and release note for [GL #2926]

4 years agoDon't use route socket in unit tests
Evan Hunt [Sun, 3 Oct 2021 08:01:40 +0000 (01:01 -0700)] 
Don't use route socket in unit tests

Some of the libns unit tests override the isc_nmhandle_attach() and
_detach() functions. This causes a failure in ns_interface_create()
if a route socket is being used, so we add a parameter to disable it.

4 years agoremove all references to isc_socket and related types
Evan Hunt [Sun, 3 Oct 2021 07:27:52 +0000 (00:27 -0700)] 
remove all references to isc_socket and related types

Removed socket.c, socket.h, and all references to isc_socket_t,
isc_socketmgr_t, isc_sockevent_t, etc.

4 years agorewrite interfacemgr to use netmgr route sockets
Evan Hunt [Sun, 3 Oct 2021 00:17:54 +0000 (17:17 -0700)] 
rewrite interfacemgr to use netmgr route sockets

4 years agonetmgr: refactor isc__nm_incstats() and isc__nm_decstats()
Evan Hunt [Sat, 2 Oct 2021 23:26:43 +0000 (16:26 -0700)] 
netmgr: refactor isc__nm_incstats() and isc__nm_decstats()

route/netlink sockets don't have stats counters associated with them,
so it's now necessary to check whether socket stats exist before
incrementing or decrementing them. rather than relying on the caller
for this, we now just pass the socket and an index, and the correct
stats counter will be updated if it exists.

4 years agonetmgr: add isc_nm_routeconnect()
Evan Hunt [Sat, 2 Oct 2021 21:52:46 +0000 (14:52 -0700)] 
netmgr: add isc_nm_routeconnect()

isc_nm_routeconnect() opens a route/netlink socket, then calls a
connect callback, much like isc_nm_udpconnect(), with a handle that
can then be monitored for network changes.

Internally the socket is treated as a UDP socket, since route/netlink
sockets follow the datagram contract.

4 years agoMerge branch 'each-refactor-nm-stats' into 'main'
Evan Hunt [Fri, 15 Oct 2021 07:47:40 +0000 (07:47 +0000)] 
Merge branch 'each-refactor-nm-stats' into 'main'

netmgr: refactor isc__nm_incstats() and isc__nm_decstats()

See merge request isc-projects/bind9!5498

4 years agonetmgr: refactor isc__nm_incstats() and isc__nm_decstats()
Evan Hunt [Sat, 2 Oct 2021 23:26:43 +0000 (16:26 -0700)] 
netmgr: refactor isc__nm_incstats() and isc__nm_decstats()

After support for route/netlink sockets is merged, not all sockets
will have stats counters associated with them, so it's now necessary
to check whether socket stats exist before incrementing or decrementing
them. rather than relying on the caller for this, we now just pass the
socket and an index, and the correct stats counter will be updated if
it exists.

4 years agoMerge branch '2947-unexpected-deletion-of-configured-catalog-zone' into 'main'
Mark Andrews [Fri, 15 Oct 2021 05:24:00 +0000 (05:24 +0000)] 
Merge branch '2947-unexpected-deletion-of-configured-catalog-zone' into 'main'

Resolve "unexpected deletion of configured catalog zone"

Closes #2947

See merge request isc-projects/bind9!5491

4 years agoCheck that existing catalog zone entries are preserved
Mark Andrews [Wed, 13 Oct 2021 06:39:00 +0000 (17:39 +1100)] 
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).

4 years agoPrevent existing catalog zone entries being incorrectly deleted
Mark Andrews [Wed, 13 Oct 2021 06:06:48 +0000 (17:06 +1100)] 
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.

4 years agoMerge branch 'marka-ms-subdomain-check-srv-ptr-targets' into 'main'
Mark Andrews [Fri, 15 Oct 2021 01:14:54 +0000 (01:14 +0000)] 
Merge branch 'marka-ms-subdomain-check-srv-ptr-targets' into 'main'

Add {krb5,ms}-subdomain-self-rhs rule types

See merge request isc-projects/bind9!5499

4 years agoRelease note [GL #481]
Mark Andrews [Wed, 2 Jun 2021 22:48:14 +0000 (08:48 +1000)] 
Release note [GL #481]

4 years agoCHANGES for [GL #481]
Mark Andrews [Fri, 31 Jul 2020 06:24:00 +0000 (16:24 +1000)] 
CHANGES for [GL #481]

4 years agoDocument {krb5,ms}-subdomain-self-rhs update policy rules
Mark Andrews [Tue, 28 Aug 2018 00:19:18 +0000 (10:19 +1000)] 
Document {krb5,ms}-subdomain-self-rhs update policy rules

Add documentation for ms-subdomain-self-rhs and krb5-subdomain-self-rhs
update policy rules.

4 years agoAdd tests for {krb5,ms}-subdomain-self-rhs update policy rules
Mark Andrews [Thu, 13 Sep 2018 02:39:06 +0000 (12:39 +1000)] 
Add tests for {krb5,ms}-subdomain-self-rhs update policy rules

check that updates are accepted and rejected as expected under the
following scenarios:

* check krb5-subdomain-self-rhs match PTR
* check krb5-subdomain-self-rhs no-match PTR
* check krb5-subdomain-self-rhs match SRV
* check krb5-subdomain-self-rhs no listed types match (SRV & TXT)
* check krb5-subdomain-self-rhs no-match RDATA (SRV)
* check krb5-subdomain-self-rhs no-match TYPE (TXT)
* check krb5-subdomain-self-rhs delete PTR (matching PTR)
* check krb5-subdomain-self-rhs delete PTR (matching PTR with non-matching
  PTR)
* check krb5-subdomain-self-rhs delete ANY (matching PTR)
* check krb5-subdomain-self-rhs delete ANY (matching PTR with non-matching
  PTR)
* check krb5-subdomain-self-rhs delete SRV (matching SRV)
* check krb5-subdomain-self-rhs delete SRV (matching SRV with non-matching
  SRV)
* check krb5-subdomain-self-rhs delete ANY (matching SRV)
* check krb5-subdomain-self-rhs delete ANY (matching SRV with non-matching
  SRV)

* check ms-subdomain-self-rhs match (PTR)
* check ms-subdomain-self-rhs no-match (PTR)
* check ms-subdomain-self-rhs match (SRV)
* check ms-subdomain-self-rhs no-match (SRV)
* check ms-subdomain-self-rhs delete SRV (matching SRV)
* check ms-subdomain-self-rhs delete SRV (matching SRV with non-matching
  SRV)
* check ms-subdomain-self-rhs delete PTR (matching PTR)
* check ms-subdomain-self-rhs delete PTR (matching PTR with non-matching
  PTR)
* check ms-subdomain-self-rhs delete ANY (matching PTR)
* check ms-subdomain-self-rhs delete ANY (matching PTR with non-matching
  PTR)
* check ms-subdomain-self-rhs delete ANY (matching SRV)
* check ms-subdomain-self-rhs delete ANY (matching SRV with non-matching
  SRV)

4 years agoAdd {krb5,ms}-subdomain-self-rhs update policy rules
Mark Andrews [Thu, 23 Aug 2018 23:19:38 +0000 (09:19 +1000)] 
Add {krb5,ms}-subdomain-self-rhs update policy rules

The new rules compare the target name in PTR and SRV records against
the machine name embedded in the kerberos principal.  This can be
used to further restrict what PTR and SRV records can be added or
deleted via dynamic updates if desired.

4 years agoMerge branch 'ondrej/use-system-ephemeral-ports-in-dispatch' into 'main'
Ondřej Surý [Thu, 14 Oct 2021 16:21:31 +0000 (16:21 +0000)] 
Merge branch 'ondrej/use-system-ephemeral-ports-in-dispatch' into 'main'

Use system ephemeral ports for default portset

See merge request isc-projects/bind9!5457

4 years agoUse system ephemeral ports for default portset
Ondřej Surý [Mon, 4 Oct 2021 12:11:57 +0000 (14:11 +0200)] 
Use system ephemeral ports for default portset

In dispatch, use system ephemeral ports for default portset instead of
hardcoded <1024,65535> range.

4 years agoMerge branch '2952-remove-manual-branch-prediction-using-__builtin_expect' into ...
Ondřej Surý [Thu, 14 Oct 2021 13:25:36 +0000 (13:25 +0000)] 
Merge branch '2952-remove-manual-branch-prediction-using-__builtin_expect' into 'main'

Stop providing branch prediction information

Closes #2952

See merge request isc-projects/bind9!5496

4 years agoAdd CHANGES note for [GL #2952]
Ondřej Surý [Thu, 14 Oct 2021 08:40:07 +0000 (10:40 +0200)] 
Add CHANGES note for [GL #2952]

4 years agoRemove unused LIBRPZ_(UN)LIKELY macros
Ondřej Surý [Thu, 14 Oct 2021 12:26:07 +0000 (14:26 +0200)] 
Remove unused LIBRPZ_(UN)LIKELY macros

The librpz.h defined LIRPZ_LIKELY() and LIBRPZ_UNLIKELY() macros that
were actually unused in the code.  Remove the macros and the autoconf
check for __builtin_expect().

4 years agoStop providing branch prediction information
Ondřej Surý [Thu, 14 Oct 2021 08:33:24 +0000 (10:33 +0200)] 
Stop providing branch prediction information

The __builtin_expect() can be used to provide the compiler with branch
prediction information.  The Gcc manual says[1] on the subject:

    In general, you should prefer to use actual profile feedback for
    this (-fprofile-arcs), as programmers are notoriously bad at
    predicting how their programs actually perform.

Stop using __builtin_expect() and ISC_LIKELY() and ISC_UNLIKELY() macros
to provide the branch prediction information as the performance testing
shows that named performs better when the __builtin_expect() is not
being used.

1. https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect

4 years agoMerge branch '2326-some-of-the-statschannel-system-test-cases-fail-if-i-build-bind...
Mark Andrews [Thu, 14 Oct 2021 06:27:23 +0000 (06:27 +0000)] 
Merge branch '2326-some-of-the-statschannel-system-test-cases-fail-if-i-build-bind-9-16-9' into 'main'

Resolve "Some of the statschannel system test cases fail if I build BIND 9.16.9"

Closes #2326

See merge request isc-projects/bind9!5424

4 years agoDon't tests stats channels that haven't been configured
Mark Andrews [Fri, 17 Sep 2021 06:34:25 +0000 (16:34 +1000)] 
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.

4 years agoMerge branch 'each-silence-coverity' into 'main'
Evan Hunt [Wed, 13 Oct 2021 16:52:20 +0000 (16:52 +0000)] 
Merge branch 'each-silence-coverity' into 'main'

silence dead code warning from coverity

See merge request isc-projects/bind9!5494

4 years agoRemove dead code
Evan Hunt [Wed, 13 Oct 2021 15:43:47 +0000 (08:43 -0700)] 
Remove dead code

Remove code from dns_zone_setparentals() that cannot be reached
now that set_serverslist() returns void.

4 years agoMerge branch '828-rewrite-logfileconfig' into 'main'
Evan Hunt [Wed, 13 Oct 2021 16:26:02 +0000 (16:26 +0000)] 
Merge branch '828-rewrite-logfileconfig' into 'main'

logfileconfig fixes

Closes #828

See merge request isc-projects/bind9!5411

4 years agoCHANGES and release note for [GL #828]
Evan Hunt [Tue, 12 Oct 2021 23:39:37 +0000 (16:39 -0700)] 
CHANGES and release note for [GL #828]

4 years agofixed a bug in rolling timestamp logfiles
Evan Hunt [Tue, 12 Oct 2021 23:31:47 +0000 (16:31 -0700)] 
fixed a bug in rolling timestamp logfiles

due to comparing logfile suffixes as 32 bit rather than 64 bit
integers, logfiles with timestamp suffixes that should have been
removed when rolling could be left in place. this has been fixed.

4 years agorewrite logfileconfig system test
Evan Hunt [Thu, 16 Sep 2021 03:56:55 +0000 (20:56 -0700)] 
rewrite logfileconfig system test

the logfileconfig system test did not conform to the style of
other tests, and was difficult to read and maintain. it has
been cleaned up and simplifeid in several ways:

- named.args used when appropriate so that named can be started with
  specified command line arguments, instead of having it launched
  directly from tests.sh
- unused root zone removed from named configuration
- an existing directory used instead of using 'mkdir' to create one
- dnssec-validation disabled to stop the server sending unnecessary queries

incidental fix: removed leftover debugging printfs from logconf.c.

4 years agoMerge branch '2940-do-not-free-tlsctx-on-socket-creation-failure' into 'main'
Artem Boldariev [Wed, 13 Oct 2021 15:09:07 +0000 (15:09 +0000)] 
Merge branch '2940-do-not-free-tlsctx-on-socket-creation-failure' into 'main'

Do not call isc_tlsctx_free() on TLS listener creation failure

Closes #2940

See merge request isc-projects/bind9!5478

4 years agoDo not call isc_tlsctx_free() on TLS listener creation failure
Artem Boldariev [Fri, 8 Oct 2021 08:38:26 +0000 (11:38 +0300)] 
Do not call isc_tlsctx_free() on TLS listener creation failure

This commit removes a superfluous call to isc_tlsctx_free() which was
leading to double free() error in a case of a TLS listener creation
failure.

The call is superfluous because the TLS context object is supposed to
be destroyed in ns_listenelt_destroy() only.

4 years agoMerge branch 'ondrej/use-pragma-once-header-guards' into 'main'
Ondřej Surý [Wed, 13 Oct 2021 11:13:57 +0000 (11:13 +0000)] 
Merge branch 'ondrej/use-pragma-once-header-guards' into 'main'

Use #pragma once as header guards

See merge request isc-projects/bind9!5467

4 years agoUse "pragma once" in automatically generated header files
Evan Hunt [Wed, 13 Oct 2021 07:48:19 +0000 (00:48 -0700)] 
Use "pragma once" in automatically generated header files

Files created by gen.c were still using old-style include guards.