]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoFixed crash when querying for non existing domain in chaos class
Diego Fronza [Wed, 15 Jan 2020 17:39:38 +0000 (14:39 -0300)] 
Fixed crash when querying for non existing domain in chaos class

Function dns_view_findzonecut in view.c wasn't correctly handling
classes other than IN (chaos, hesiod, etc) whenever the name being
looked up wasn't in cache or in any of the configured zone views' database.

That resulted in a NULL fname being used in resolver.c:4900, which
in turn was triggering abort.

6 years agoMerge branch 'mnowak/prevent-failing-grep-invocations-from-interrupting-mkeys' into...
Michal Nowak [Wed, 22 Jan 2020 14:53:02 +0000 (14:53 +0000)] 
Merge branch 'mnowak/prevent-failing-grep-invocations-from-interrupting-mkeys' into 'master'

mkeys: Prevent failing grep invocations

Closes #1567

See merge request isc-projects/bind9!2933

6 years agomkeys: Prevent failing grep invocations
Michal Nowak [Wed, 22 Jan 2020 14:53:01 +0000 (14:53 +0000)] 
mkeys: Prevent failing grep invocations

Some 'grep' invocations were not guarded from interrupting the test
prematurely, e.g. when no text was matched.

6 years agoMerge branch 'wpk/pipelined-test-fix' into 'master'
Witold Krecicki [Wed, 22 Jan 2020 13:07:19 +0000 (13:07 +0000)] 
Merge branch 'wpk/pipelined-test-fix' into 'master'

Fix pipelined test

See merge request isc-projects/bind9!2927

6 years agoGet rid of the remains of -Tdelay option
Witold Kręcicki [Tue, 21 Jan 2020 09:58:42 +0000 (10:58 +0100)] 
Get rid of the remains of -Tdelay option

6 years agopipelined test: we no longer have -Tdelay option, use a python proxy that delays...
Witold Kręcicki [Tue, 21 Jan 2020 09:54:38 +0000 (10:54 +0100)] 
pipelined test: we no longer have -Tdelay option, use a python proxy that delays packets as a workaround

6 years agoMerge branch '1560-isc_httpd-and-isc_httpdmgr-structures-are-not-reference-counted...
Mark Andrews [Wed, 22 Jan 2020 01:33:02 +0000 (01:33 +0000)] 
Merge branch '1560-isc_httpd-and-isc_httpdmgr-structures-are-not-reference-counted-and-magic' into 'master'

Resolve "isc_httpd and isc_httpdmgr structures are not reference counted and magic"

Closes #1560

See merge request isc-projects/bind9!2913

6 years agoClean the ENTER/EXIT/NOTICE debugging from production code
Ondřej Surý [Tue, 21 Jan 2020 07:25:30 +0000 (08:25 +0100)] 
Clean the ENTER/EXIT/NOTICE debugging from production code

6 years agoRefactor parts of isc_httpd and isc_httpd for better readability and safety
Ondřej Surý [Mon, 20 Jan 2020 11:37:57 +0000 (12:37 +0100)] 
Refactor parts of isc_httpd and isc_httpd for better readability and safety

6 years agoadd ISC_MAGIC and reference counting to httpd and httpdmgr
Mark Andrews [Fri, 17 Jan 2020 07:24:24 +0000 (18:24 +1100)] 
add ISC_MAGIC and reference counting to httpd and httpdmgr

6 years agoMerge branch 'mnowak/enhance_unit_test_debugging' into 'master'
Michal Nowak [Tue, 21 Jan 2020 17:41:22 +0000 (17:41 +0000)] 
Merge branch 'mnowak/enhance_unit_test_debugging' into 'master'

Omit spurious string from unit test debugging efforts

See merge request isc-projects/bind9!2829

6 years agoOmit spurious string from unit test debugging efforts
Michal Nowak [Wed, 8 Jan 2020 14:07:43 +0000 (15:07 +0100)] 
Omit spurious string from unit test debugging efforts

When both 'broken' and 'failed' test cases appear in unit test output

...
===> Broken tests
lib/isc/tests/socket_test:main  ->  broken: Test case timed out  [300.022s]
===> Failed tests
lib/isc/tests/time_test:main  ->  failed: 2 of 6 tests failed  [0.006s]
===> Summary
...

spurious '===>' string gets matched, that results in the following
error:

  Usage error for command debug: '===>' is not a test case identifier (missing ':'?).

Following change makes sure the string is omitted.

I checked on FreeBSD and OpenBSD that the AWK construct is supported.

6 years agoMerge branch 'wpk/fix-inline-test' into 'master'
Witold Krecicki [Tue, 21 Jan 2020 14:23:41 +0000 (14:23 +0000)] 
Merge branch 'wpk/fix-inline-test' into 'master'

tests: add a missing log nextpart in inline test

Closes #1568

See merge request isc-projects/bind9!2928

6 years agotests: add a missing log nextpart in inline test
Witold Kręcicki [Tue, 21 Jan 2020 10:56:25 +0000 (11:56 +0100)] 
tests: add a missing log nextpart in inline test

6 years agoMerge branch 'wpk/dnssec-test-fixes' into 'master'
Witold Krecicki [Tue, 21 Jan 2020 14:00:51 +0000 (14:00 +0000)] 
Merge branch 'wpk/dnssec-test-fixes' into 'master'

dnssec: use less-or-equal when looking at SyncPublish time

See merge request isc-projects/bind9!2929

6 years agodnssec: use less-or-equal when looking at SyncPublish time
Witold Kręcicki [Tue, 21 Jan 2020 13:20:19 +0000 (14:20 +0100)] 
dnssec: use less-or-equal when looking at SyncPublish time

If we created a key, mark its SyncPublish time as 'now' and started
bind the key might not be published if the SyncPublish time is in
the same second as the time the zone is loaded. This is mostly
for dnssec system test, as this kind of scenario is very unlikely
in a real world environment.

6 years agoMerge branch 'ondrej/lower-the-artifact-expiration-time-to-just-12-hours' into 'master'
Ondřej Surý [Tue, 21 Jan 2020 12:06:24 +0000 (12:06 +0000)] 
Merge branch 'ondrej/lower-the-artifact-expiration-time-to-just-12-hours' into 'master'

Lower the artifact expiration time to just 1 day

See merge request isc-projects/bind9!2930

6 years agoLower the artifact expiration time to just 1 day
Ondřej Surý [Tue, 21 Jan 2020 11:51:54 +0000 (12:51 +0100)] 
Lower the artifact expiration time to just 1 day

6 years agoMerge branch 'wpk/fix-taskmgr-pause-unpause-detach-race' into 'master'
Witold Krecicki [Tue, 21 Jan 2020 10:04:07 +0000 (10:04 +0000)] 
Merge branch 'wpk/fix-taskmgr-pause-unpause-detach-race' into 'master'

Fix a race in taskmgr between worker and task pausing/unpausing.

Closes #1571

See merge request isc-projects/bind9!2918

6 years agoCHANGES note
Witold Kręcicki [Mon, 20 Jan 2020 21:34:10 +0000 (22:34 +0100)] 
CHANGES note

6 years agoUnit test for the taskmgr pause/unpause race
Witold Kręcicki [Mon, 20 Jan 2020 11:12:29 +0000 (12:12 +0100)] 
Unit test for the taskmgr pause/unpause race

6 years agoFix a race in taskmgr between worker and task pausing/unpausing.
Witold Kręcicki [Mon, 20 Jan 2020 10:39:14 +0000 (11:39 +0100)] 
Fix a race in taskmgr between worker and task pausing/unpausing.

To reproduce the race - create a task, send two events to it, first one
must take some time. Then, from the outside, pause(), unpause() and detach()
the task.
When the long-running event is processed by the task it is in
task_state_running state. When we called pause() the state changed to
task_state_paused, on unpause we checked that there are events in the task
queue, changed the state to task_state_ready and enqueued the task on the
workers readyq. We then detach the task.
The dispatch() is done with processing the event, it processes the second
event in the queue, and then shuts down the task and frees it (as it's not
referenced anymore). Dispatcher then takes the, already freed, task from
the queue where it was wrongly put, causing an use-after free and,
subsequently, either an assertion failure or a segmentation fault.
The probability of this happening is very slim, yet it might happen under a
very high load, more probably on a recursive resolver than on an
authoritative.
The fix introduces a new 'task_state_pausing' state - to which tasks
are moved if they're being paused while still running. They are moved
to task_state_paused state when dispatcher is done with them, and
if we unpause a task in paused state it's moved back to task_state_running
and not requeued.

6 years agoMerge branch 'marka-Psync-future' into 'master'
Mark Andrews [Tue, 21 Jan 2020 06:11:15 +0000 (06:11 +0000)] 
Merge branch 'marka-Psync-future' into 'master'

dnssec: do not publish CDS records when -Psync is in the future

See merge request isc-projects/bind9!2925

6 years agoadd CHANGES
Mark Andrews [Tue, 21 Jan 2020 05:42:51 +0000 (16:42 +1100)] 
add CHANGES

6 years agodnssec: do not publish CDS records when -Psync is in the future
Tony Finch [Tue, 14 Jan 2020 19:23:31 +0000 (19:23 +0000)] 
dnssec: do not publish CDS records when -Psync is in the future

This is a bug I encountered when trying to schedule an algorithm
rollover. My plan, for a zone whose maximum TTL is 48h, was to sign
with the new algorithm and schedule a change of CDS records for more
than 48 hours in the future, roughly like this:

    $ dnssec-keygen -a 13 -fk -Psync now+50h $zone
    $ dnssec-keygen -a 13 $zone
    $ dnssec-settime -Dsync now+50h $zone_ksk_old

However the algorithm 13 CDS was published immediately, which could
have made the zone bogus.

To reveal the bug using the `smartsign` test, this change just adds a
KSK with all its times in the future, so it should not affect the
existing checks at all. But the final check (that there are no CDS or
CDSNSKEY records after -Dsync) fails with the old `syncpublish()`
logic, because the future key's sync records appear early. With the
new `syncpublish()` logic the future key does not affect the test, as
expected, and it now passes.

6 years agoMerge branch 'marka-omit-spurious-newlines' into 'master'
Mark Andrews [Tue, 21 Jan 2020 05:16:25 +0000 (05:16 +0000)] 
Merge branch 'marka-omit-spurious-newlines' into 'master'

Omit spurious newlines when reporting DNSKEY changes

See merge request isc-projects/bind9!2922

6 years agoOmit spurious newlines when reporting DNSKEY changes
Tony Finch [Thu, 16 Jan 2020 15:54:12 +0000 (15:54 +0000)] 
Omit spurious newlines when reporting DNSKEY changes

These caused blank lines to appear in the logs.

6 years agoMerge branch 'marka-document-authors-bind' into 'master'
Mark Andrews [Tue, 21 Jan 2020 03:54:51 +0000 (03:54 +0000)] 
Merge branch 'marka-document-authors-bind' into 'master'

document that version also controls authors.bind

See merge request isc-projects/bind9!2919

6 years agodocument that version also controls authors.bind
Mark Andrews [Mon, 20 Jan 2020 23:11:24 +0000 (10:11 +1100)] 
document that version also controls authors.bind

6 years agoMerge branch 'fix-shutdown-issues' into 'master'
Witold Krecicki [Mon, 20 Jan 2020 22:01:44 +0000 (22:01 +0000)] 
Merge branch 'fix-shutdown-issues' into 'master'

Fix shutdown issues

See merge request isc-projects/bind9!2907

6 years agoFix possible race in socket destruction.
Witold Kręcicki [Fri, 17 Jan 2020 13:42:57 +0000 (14:42 +0100)] 
Fix possible race in socket destruction.

When two threads unreferenced handles coming from one socket while
the socket was being destructed we could get a use-after-free:
Having handle H1 coming from socket S1, H2 coming from socket S2,
S0 being a parent socket to S1 and S2:

Thread A                             Thread B
Unref handle H1                      Unref handle H2
Remove H1 from S1 active handles     Remove H2 from S2 active handles
nmsocket_maybe_destroy(S1)           nmsocket_maybe_destroy(S2)
nmsocket_maybe_destroy(S0)           nmsocket_maybe_destroy(S0)
LOCK(S0->lock)
Go through all children, figure
out that we have no more active
handles:
sum of S0->children[i]->ah == 0
UNLOCK(S0->lock)
destroy(S0)
                                     LOCK(S0->lock)
                                      - but S0 is already gone

6 years agocalling isc__nm_udp_send() on a non-udp socket is not 'unexpected', it's a critical...
Witold Kręcicki [Fri, 17 Jan 2020 11:07:34 +0000 (12:07 +0100)] 
calling isc__nm_udp_send() on a non-udp socket is not 'unexpected', it's a critical failure

6 years agoclean up some handle/client reference counting errors in error cases.
Witold Kręcicki [Fri, 17 Jan 2020 10:42:35 +0000 (11:42 +0100)] 
clean up some handle/client reference counting errors in error cases.

We weren't consistent about who should unreference the handle in
case of network error. Make it consistent so that it's always the
client code responsibility to unreference the handle - either
in the callback or right away if send function failed and the callback
will never be called.

6 years agocleanup properly if we fail to initialize ns_client structure
Witold Kręcicki [Thu, 16 Jan 2020 10:53:31 +0000 (11:53 +0100)] 
cleanup properly if we fail to initialize ns_client structure

If taskmgr is shutting down ns_client_setup will fail to create
a task for the newly created client, we weren't cleaning up already
created/attached things (memory context, server, clientmgr).

6 years agonetmgr: fix a non-thread-safe access to libuv structures
Witold Kręcicki [Thu, 16 Jan 2020 11:13:28 +0000 (12:13 +0100)] 
netmgr: fix a non-thread-safe access to libuv structures

In tcp and udp stoplistening code we accessed libuv structures
from a different thread, which caused a shutdown crash when named
was under load. Also added additional DbC checks making sure we're
in a proper thread when accessing uv_ functions.

6 years agonetmgr: don't send to an inactive (closing) udp socket
Witold Kręcicki [Thu, 16 Jan 2020 10:52:58 +0000 (11:52 +0100)] 
netmgr: don't send to an inactive (closing) udp socket

We had a race in which n UDP socket could have been already closing
by libuv but we still sent data to it. Mark socket as not-active
when stopping listening and verify that socket is not active when
trying to send data to it.

6 years agoMerge branch '1537-nslookup-manual-page-needs-update-for-default-querytype-a-and...
Mark Andrews [Sun, 19 Jan 2020 23:43:47 +0000 (23:43 +0000)] 
Merge branch '1537-nslookup-manual-page-needs-update-for-default-querytype-a-and-aaaa' into 'master'

Resolve "nslookup manual page needs update for default querytype (A and AAAA)"

Closes #1537

See merge request isc-projects/bind9!2894

6 years agodocument that nslookup defaults to A + AAAA lookups
Mark Andrews [Wed, 15 Jan 2020 02:06:50 +0000 (13:06 +1100)] 
document that nslookup defaults to A + AAAA lookups

6 years agoMerge branch 'marka-check-CHANGES-SE-in-CI' into 'master'
Mark Andrews [Fri, 17 Jan 2020 21:09:16 +0000 (21:09 +0000)] 
Merge branch 'marka-check-CHANGES-SE-in-CI' into 'master'

Check CHANGES.SE in CI

See merge request isc-projects/bind9!2912

6 years agocheck that CHANGES.SE entries are correctly ordered and that whitespace is correct
Mark Andrews [Thu, 16 Jan 2020 22:25:53 +0000 (09:25 +1100)] 
check that CHANGES.SE entries are correctly ordered and that whitespace is correct

6 years agoMerge branch 'michal/fix-the-dnssec-system-test-on-windows' into 'master' v9.15.8
Michał Kępień [Thu, 16 Jan 2020 08:49:13 +0000 (08:49 +0000)] 
Merge branch 'michal/fix-the-dnssec-system-test-on-windows' into 'master'

Fix the "dnssec" system test on Windows

See merge request isc-projects/bind9!2902

6 years agoFix the "dnssec" system test on Windows
Michał Kępień [Thu, 16 Jan 2020 08:48:01 +0000 (09:48 +0100)] 
Fix the "dnssec" system test on Windows

Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

6 years agoMerge branch 'prep-v9_15_8' into 'master'
Evan Hunt [Thu, 16 Jan 2020 08:21:28 +0000 (08:21 +0000)] 
Merge branch 'prep-v9_15_8' into 'master'

prep 9.15.8

See merge request isc-projects/bind9!2901

6 years agoprep 9.15.8
Tinderbox User [Thu, 16 Jan 2020 07:53:19 +0000 (07:53 +0000)] 
prep 9.15.8

6 years agoMerge branch 'each-add-relnotes-v9_15_8' into 'master'
Evan Hunt [Thu, 16 Jan 2020 07:41:10 +0000 (07:41 +0000)] 
Merge branch 'each-add-relnotes-v9_15_8' into 'master'

add release notes for  9.15.8

See merge request isc-projects/bind9!2900

6 years agoadd release notes for 9.15.8 bugs and changes, and fix CHANGES errors
Evan Hunt [Thu, 16 Jan 2020 07:22:29 +0000 (23:22 -0800)] 
add release notes for 9.15.8 bugs and changes, and fix CHANGES errors

6 years agoAdd empty release notes section for BIND 9.15.8
Evan Hunt [Thu, 16 Jan 2020 07:09:15 +0000 (23:09 -0800)] 
Add empty release notes section for BIND 9.15.8

6 years agoMerge branch '1561-ncache-validation-crash' into 'master'
Evan Hunt [Wed, 15 Jan 2020 22:15:36 +0000 (22:15 +0000)] 
Merge branch '1561-ncache-validation-crash' into 'master'

fix a bug when validating negative cache entries

Closes #1561

See merge request isc-projects/bind9!2899

6 years agoCHANGES
Evan Hunt [Wed, 15 Jan 2020 17:01:03 +0000 (09:01 -0800)] 
CHANGES

6 years agoadd system test of insecurity proof from negative cache
Evan Hunt [Wed, 15 Jan 2020 21:54:56 +0000 (13:54 -0800)] 
add system test of insecurity proof from negative cache

6 years agofix a bug when validating negative cache entries
Evan Hunt [Wed, 15 Jan 2020 16:19:19 +0000 (08:19 -0800)] 
fix a bug when validating negative cache entries

if validator_start() is called with validator->event->message set to
NULL, we can't use message->rcode to decide which negative proofs are
needed, so we use the rdataset attributes instead to determine whether
the rdataset was cached as NXDOMAIN or NODATA.

6 years agoMerge branch 'wpk/fix-interface-reconfig-crashes' into 'master'
Witold Krecicki [Wed, 15 Jan 2020 16:56:55 +0000 (16:56 +0000)] 
Merge branch 'wpk/fix-interface-reconfig-crashes' into 'master'

Fix interface reconfig crashes

See merge request isc-projects/bind9!2898

6 years agonetmgr: have a single source of truth for tcpdns callback
Witold Kręcicki [Wed, 15 Jan 2020 13:53:42 +0000 (14:53 +0100)] 
netmgr: have a single source of truth for tcpdns callback

We pass interface as an opaque argument to tcpdns listening socket.
If we stop listening on an interface but still have in-flight connections
the opaque 'interface' is not properly reference counted, and we might
hit a dead memory. We put just a single source of truth in a listening
socket and make the child sockets use that instead of copying the
value from listening socket. We clean the callback when we stop listening.

6 years agonetmgr: we can't uv_close(sock->timer) when in sock->timer close callback
Witold Kręcicki [Wed, 15 Jan 2020 13:53:01 +0000 (14:53 +0100)] 
netmgr: we can't uv_close(sock->timer) when in sock->timer close callback

6 years agoMerge branch 'wpk/fix-uvtransfers-on-windows' into 'master'
Ondřej Surý [Wed, 15 Jan 2020 13:50:10 +0000 (13:50 +0000)] 
Merge branch 'wpk/fix-uvtransfers-on-windows' into 'master'

Fixes for netmgr on Windows after recent TCP changes

See merge request isc-projects/bind9!2896

6 years agonetmgr:
Witold Kręcicki [Wed, 15 Jan 2020 11:29:41 +0000 (12:29 +0100)] 
netmgr:
 - isc__netievent_storage_t was to small to contain
   isc__netievent__socket_streaminfo_t on Windows
 - handle isc_uv_export and isc_uv_import errors properly
 - rewrite isc_uv_export and isc_uv_import on Windows

6 years agoMerge branch '1493-make-hazard-pointers-dynamic' into 'master'
Michał Kępień [Wed, 15 Jan 2020 07:56:58 +0000 (07:56 +0000)] 
Merge branch '1493-make-hazard-pointers-dynamic' into 'master'

Make hazard pointers max_threads configurable at runtime.

Closes #1493

See merge request isc-projects/bind9!2885

6 years agoCHANGES
Witold Kręcicki [Tue, 14 Jan 2020 20:26:52 +0000 (21:26 +0100)] 
CHANGES

6 years agoMake hazard pointers max_threads configurable at runtime.
Witold Kręcicki [Thu, 12 Dec 2019 22:41:57 +0000 (23:41 +0100)] 
Make hazard pointers max_threads configurable at runtime.

hp implementation requires an object for each thread accessing
a hazard pointer. previous implementation had a hardcoded
HP_MAX_THREAD value of 128, which failed on machines with lots of
CPU cores (named uses 3n threads). We make isc__hp_max_threads
configurable at startup, with the value set to 4*named_g_cpus.
It's also important for this value not to be too big as we do
linear searches on a list.

6 years agoMerge branch 'each-allow-ds-with-key' into 'master'
Evan Hunt [Tue, 14 Jan 2020 19:56:16 +0000 (19:56 +0000)] 
Merge branch 'each-allow-ds-with-key' into 'master'

allow DS with key trust anchors

See merge request isc-projects/bind9!2892

6 years agoallow both key and DS trust anchors to be used for the same name.
Evan Hunt [Tue, 14 Jan 2020 19:17:30 +0000 (11:17 -0800)] 
allow both key and DS trust anchors to be used for the same name.

6 years agoMerge branch '1237-keytable-refactoring' into 'master'
Evan Hunt [Tue, 14 Jan 2020 18:10:16 +0000 (18:10 +0000)] 
Merge branch '1237-keytable-refactoring' into 'master'

Resolve "refactor dns_keytable"

Closes #1237

See merge request isc-projects/bind9!2798

6 years agokeep the keynode attached as long as dsset is in use
Evan Hunt [Tue, 24 Dec 2019 21:59:34 +0000 (13:59 -0800)] 
keep the keynode attached as long as dsset is in use

when using the trust anchor dsset as val->dsset, keep a reference
to the keynode so dsset can't be freed.

6 years agomake dns_keytable_deletekey() work correctly
Evan Hunt [Tue, 24 Dec 2019 04:26:03 +0000 (20:26 -0800)] 
make dns_keytable_deletekey() work correctly

it now removes matching trust anchors from from the dslist while leaving
the other trust anchors in place.

also cleaned up the API to remove functions that were never being used.

6 years agofix a bug with the insertion of DS records into existing keynodes
Evan Hunt [Sat, 21 Dec 2019 00:23:25 +0000 (16:23 -0800)] 
fix a bug with the insertion of DS records into existing keynodes

NOTE: the keytable test is still failing because dns_keytable_deletekey()
is looking for exact matches in keynodes containing dst_key objects,
which no keynode has anymore.

6 years agodisable adding keys to keytable; only DS trust anchors can now be added
Evan Hunt [Fri, 20 Dec 2019 19:37:11 +0000 (11:37 -0800)] 
disable adding keys to keytable; only DS trust anchors can now be added

the internal keytable structure has not yet been changed, but
insertion of DS anchors is the only method now available.

NOTE: the keytable unit test is currently failing because of tests
that expect individual keynode objects to contain single DST key
objects.

6 years agoremove all code that uses non-DS trust anchors
Evan Hunt [Fri, 20 Dec 2019 03:39:33 +0000 (19:39 -0800)] 
remove all code that uses non-DS trust anchors

as initial-key and static-key trust anchors will now be stored as a
DS rrset, code referencing keynodes storing DNSKEY trust anchors will
no longer be reached.

6 years agorename dns_keytable_deletekeynode to dns_keytable_deletekey
Evan Hunt [Wed, 11 Dec 2019 08:09:15 +0000 (00:09 -0800)] 
rename dns_keytable_deletekeynode to dns_keytable_deletekey

this function is used by dns_view_untrust() to handle revoked keys, so
it will still be needed after the keytable/validator refactoring is
complete, even though the keytable will be storing DS trust anchors
instead of keys. to simplify the way it's called, it now takes a DNSKEY
rdata struct instead of a DST key.

6 years agoMerge branch '1396-document-bind-9-15-x-need-for-pkg-config' into 'master'
Ondřej Surý [Tue, 14 Jan 2020 13:31:17 +0000 (13:31 +0000)] 
Merge branch '1396-document-bind-9-15-x-need-for-pkg-config' into 'master'

Fail the autoconf script early if pkg-config is not present.

Closes #1396

See merge request isc-projects/bind9!2889

6 years agoFail the autoconf script early if pkg-config is not present.
Ondřej Surý [Tue, 14 Jan 2020 13:07:36 +0000 (14:07 +0100)] 
Fail the autoconf script early if pkg-config is not present.

6 years agoMerge branch 'ondrej/more-conversions-to-isc_refcount-API' into 'master'
Ondřej Surý [Tue, 14 Jan 2020 12:16:17 +0000 (12:16 +0000)] 
Merge branch 'ondrej/more-conversions-to-isc_refcount-API' into 'master'

Convert more reference counting to isc_refcount API

See merge request isc-projects/bind9!2153

6 years agoUse isc_refcount_increment0() when reusing handle or socket; remove extra DbC checks
Ondřej Surý [Tue, 14 Jan 2020 08:43:37 +0000 (09:43 +0100)] 
Use isc_refcount_increment0() when reusing handle or socket; remove extra DbC checks

6 years agoMove the NO_SANITIZE attribute to a correct place (gcc is picky)
Ondřej Surý [Tue, 14 Jan 2020 08:43:37 +0000 (09:43 +0100)] 
Move the NO_SANITIZE attribute to a correct place (gcc is picky)

6 years agoATOMIC_VAR_INIT() must be used only for static variables (C17)
Ondřej Surý [Mon, 13 Jan 2020 10:38:43 +0000 (11:38 +0100)] 
ATOMIC_VAR_INIT() must be used only for static variables (C17)

6 years agoWhen compiling with MSVC, use inline functions for isc_refcount_increment/decrement
Ondřej Surý [Wed, 9 Oct 2019 06:20:16 +0000 (08:20 +0200)] 
When compiling with MSVC, use inline functions for isc_refcount_increment/decrement

6 years agoRestore DbC checks in isc_refcount API
Ondřej Surý [Mon, 15 Jul 2019 08:20:16 +0000 (10:20 +0200)] 
Restore DbC checks in isc_refcount API

The isc_refcount API that provides reference counting lost DbC checks for
overflows and underflows in the isc_refcount_{increment,decrement} functions.

The commit restores the overflow check in the isc_refcount_increment and
underflows check in the isc_refcount_decrement by checking for the previous
value to not be on the boundary.

6 years agoProtect globally accessed variables in rndc.c by making them C11 atomic
Ondřej Surý [Wed, 9 Oct 2019 10:00:34 +0000 (12:00 +0200)] 
Protect globally accessed variables in rndc.c by making them C11 atomic

6 years agoConvert global responses variable in dispatch_test to C11 atomics
Ondřej Surý [Wed, 9 Oct 2019 06:47:44 +0000 (08:47 +0200)] 
Convert global responses variable in dispatch_test to C11 atomics

6 years agoRemove duplicate INSIST checks for isc_refcount API
Ondřej Surý [Mon, 15 Jul 2019 09:19:03 +0000 (11:19 +0200)] 
Remove duplicate INSIST checks for isc_refcount API

This commits removes superfluous checks when using the isc_refcount API.

Examples of superfluous checks:

1. The isc_refcount_decrement function ensures there was not underflow,
   so this check is superfluous:

    INSIST(isc_refcount_decrement(&r) > 0);

2 .The isc_refcount_destroy() includes check whether the counter
   is zero, therefore this is superfluous:

    INSIST(isc_refcount_decrement(&r) == 1 && isc_refcount_destroy(&r));

6 years agoConvert more reference counting to isc_refcount API
Ondřej Surý [Mon, 15 Jul 2019 08:27:11 +0000 (10:27 +0200)] 
Convert more reference counting to isc_refcount API

6 years agoUse isc_refcount_increment0() where appropriate
Ondřej Surý [Tue, 23 Jul 2019 14:24:50 +0000 (10:24 -0400)] 
Use isc_refcount_increment0() where appropriate

6 years agoImprove code style when checking old references values
Ondřej Surý [Tue, 23 Jul 2019 14:24:32 +0000 (10:24 -0400)] 
Improve code style when checking old references values

6 years agoUse C11 atomics for nfctx, kill unused dns_resolver_nrunning()
Ondřej Surý [Tue, 23 Jul 2019 14:14:14 +0000 (10:14 -0400)] 
Use C11 atomics for nfctx, kill unused dns_resolver_nrunning()

6 years agoUse dns_keytable_attachkeynode() and switch to C11 atomics for .active_nodes
Ondřej Surý [Tue, 23 Jul 2019 13:52:02 +0000 (09:52 -0400)] 
Use dns_keytable_attachkeynode() and switch to C11 atomics for .active_nodes

6 years agoAdd isc_refcount_destroy() as appropriate
Ondřej Surý [Tue, 23 Jul 2019 12:27:30 +0000 (08:27 -0400)] 
Add isc_refcount_destroy() as appropriate

6 years agoMerge branch 'wpk-netmgr-tcp-error-handling' into 'master'
Witold Krecicki [Tue, 14 Jan 2020 12:05:25 +0000 (12:05 +0000)] 
Merge branch 'wpk-netmgr-tcp-error-handling' into 'master'

netmgr: handle errors properly in accept_connection.

See merge request isc-projects/bind9!2880

6 years agoCHANGES
Witold Krecicki [Tue, 14 Jan 2020 10:06:02 +0000 (11:06 +0100)] 
CHANGES

6 years agonetmgr: handle errors properly in accept_connection.
Witold Krecicki [Tue, 14 Jan 2020 10:00:41 +0000 (11:00 +0100)] 
netmgr: handle errors properly in accept_connection.

If a connection was closed early (right after accept()) an assertion
that assumed that the connection was still alive could be triggered
in accept_connection. Handle those errors properly and not with
assertions, free all the resources afterwards.

6 years agoMerge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test...
Mark Andrews [Tue, 14 Jan 2020 04:44:58 +0000 (04:44 +0000)] 
Merge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test-c' into 'master'

Resolve "Add calls to dns_rdata_additionaldata to lib/dns/tests/rdata_test.c"

Closes #1531

See merge request isc-projects/bind9!2795

6 years agoexercise dns_rdata_checknames
Mark Andrews [Mon, 23 Dec 2019 21:43:45 +0000 (08:43 +1100)] 
exercise dns_rdata_checknames

6 years agoexercise dns_rdata_additionaldata
Mark Andrews [Mon, 23 Dec 2019 21:19:28 +0000 (08:19 +1100)] 
exercise dns_rdata_additionaldata

6 years agocall dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire
Mark Andrews [Mon, 23 Dec 2019 06:43:15 +0000 (17:43 +1100)] 
call dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire

6 years agoMerge branch '1311-netmgr-stats' into 'master'
Evan Hunt [Tue, 14 Jan 2020 00:10:06 +0000 (00:10 +0000)] 
Merge branch '1311-netmgr-stats' into 'master'

Resolve "netmgr doesn't count networking statistics"

Closes #1311

See merge request isc-projects/bind9!2844

6 years agoCHANGES
Evan Hunt [Fri, 10 Jan 2020 01:44:19 +0000 (17:44 -0800)] 
CHANGES

6 years agocount statistics in netmgr TCP code
Evan Hunt [Tue, 7 Jan 2020 18:13:30 +0000 (10:13 -0800)] 
count statistics in netmgr TCP code

6 years agocount statistics in netmgr UDP code
Evan Hunt [Tue, 7 Jan 2020 04:26:47 +0000 (20:26 -0800)] 
count statistics in netmgr UDP code

- also restored a test in the statistics test which was changed when
  the netmgr was introduced because active sockets were not being
  counted.

6 years agoassociate socket stats counters with netmgr socket objects
Evan Hunt [Sun, 5 Jan 2020 09:02:12 +0000 (01:02 -0800)] 
associate socket stats counters with netmgr socket objects

- the socket stat counters have been moved from socket.h to stats.h.
- isc_nm_t now attaches to the same stats counter group as
  isc_socketmgr_t, so that both managers can increment the same
  set of statistics
- isc__nmsocket_init() now takes an interface as a paramter so that
  the address family can be determined when initializing the socket.
- based on the address family and socket type, a group of statistics
  counters will be associated with the socket - for example, UDP4Active
  with IPv4 UDP sockets and TCP6Active with IPv6 TCP sockets.  note
  that no counters are currently associated with TCPDNS sockets; those
  stats will be handled by the underlying TCP socket.
- the counters are not actually used by netmgr sockets yet; counter
  increment and decrement calls will be added in a later commit.

6 years agoMerge branch 'wpk-no-ipc-tcp-passing' into 'master'
Witold Krecicki [Mon, 13 Jan 2020 21:50:33 +0000 (21:50 +0000)] 
Merge branch 'wpk-no-ipc-tcp-passing' into 'master'

Pass TCP listening sockets using async channel, not IPC

Closes #1433, #1499, and #1500

See merge request isc-projects/bind9!2825

6 years agoCHANGES note
Witold Kręcicki [Fri, 10 Jan 2020 08:11:41 +0000 (09:11 +0100)] 
CHANGES note

6 years agoDisable pktinfo for ipv6 on all unices
Witold Kręcicki [Mon, 13 Jan 2020 19:22:23 +0000 (20:22 +0100)] 
Disable pktinfo for ipv6 on all unices

If pktinfo were supported then we could listen on :: for ipv6 and get
the information about the destination address from pktinfo structure passed
in recvmsg but this method is not portable and libuv doesn't support it - so
we need to listen on all interfaces.
We should verify that this doesn't impact performance (we already do it for
ipv4) and either remove all the ipv6pktinfo detection code or think of fixing
libuv.