Commit Graph

32462 Commits

Author SHA1 Message Date
Evan Hunt
04ef1f730e work around perl error
some versions of perl failed to run packet.pl because the 'last'
keyword can't be used outside of a loop block. this commit changes
the packet dumping code to a function so we can use 'return' instead.
2020-09-05 00:24:10 -07:00
Evan Hunt
5866c4a3be fixup! change from isc_nmhandle_ref/unref to isc_nmhandle attach/detach 2020-09-04 23:43:38 -07:00
Evan Hunt
feddbcce10 fixup! assorted small netmgr-related changes 2020-09-04 23:27:51 -07:00
Evan Hunt
d427a20056 fixup! change from isc_nmhandle_ref/unref to isc_nmhandle attach/detach 2020-09-04 22:55:30 -07:00
Evan Hunt
6a6dd6ff0a fixup! change from isc_nmhandle_ref/unref to isc_nmhandle attach/detach 2020-09-04 14:53:20 -07:00
Evan Hunt
f7f068dc64 CHANGES 2020-09-04 14:25:15 -07:00
Witold Kręcicki
26c28bd7b5 tracing of active sockets and handles
If NETMGR_TRACE is defined, we now maintain a list of active
sockets in the netmgr object and a list of active handles in
each socket object; by walking the list and printing `backtrace`
in a debugger we can see where they were created. This will assist
in debugging reference counting errors.
2020-09-04 14:25:15 -07:00
Evan Hunt
fb852e1d31 limit the time we wait for netmgr to be destroyed
if more than 10 seconds pass while we wait for netmgr
events to finish running on shutdown, something is almost
certainly wrong and we should assert and crash.
2020-09-04 14:25:14 -07:00
Evan Hunt
b3bc26af7d add more logging to the shutdown system test 2020-09-04 14:25:14 -07:00
Evan Hunt
32a453674a change from isc_nmhandle_ref/unref to isc_nmhandle attach/detach
Attaching and detaching handle pointers will make it easier to
determine where and why reference counting errors have occurred.

A handle needs to be referenced more than once when multiple
asynchronous operations are in flight, so callers must now maintain
multiple handle pointers for each pending operation. For example,
ns_client objects now contain:

        - reqhandle:    held while waiting for a request callback (query,
                        notify, update)
        - sendhandle:   held while waiting for a send callback
        - fetchhandle:  held while waiting for a recursive fetch to
                        complete
        - updatehandle: held while waiting for an update-forwarding
                        task to complete

control channel connection objects now contain:

        - readhandle: held while waiting for a read callback
        - sendhandle: held while waiting for a send callback
        - cmdhandle:  held while an rndc command is running

httpd connections contain:

        - readhandle: held while waiting for a read callback
        - sendhandle: held while waiting for a send callback
2020-09-04 14:25:06 -07:00
Witold Kręcicki
c07df818c5 assorted small netmgr-related changes
- cancelread functions now take handles instead of sockets
- add a 'client' flag in socket objects, currently unused, to
  indicate whether it is to used as a client or server socket.
2020-09-04 14:25:06 -07:00
Witold Kręcicki
96e119cd19 rename isc_nmsocket_t->tcphandle to statichandle 2020-09-04 14:25:06 -07:00
Evan Hunt
4ed3238eac Merge branch 'each-faster-tcp-test' into 'main'
shorten the tcp system test

See merge request isc-projects/bind9!4091
2020-09-04 21:22:20 +00:00
Evan Hunt
1ceea908b6 shorten the tcp system test
the tcp system test uses the 'packet.pl' test tool to send a packet
thousands of times. this took a long time because the tool was waiting
for replies and parsing them; however, for that particular test the
replies aren't relevant.

this commit uses non-blocking sockets and moves the reply parsing
outside the send loop, which speeds the system test up substantially.
2020-09-04 13:55:01 -07:00
Michał Kępień
e5f31ce242 Merge branch '1919-include-bind-documentation-in-windows-zips' into 'main'
Include BIND documentation in Windows zips

Closes #1919

See merge request isc-projects/bind9!4085
2020-09-03 10:01:55 +00:00
Michał Kępień
549ddca256 Include BIND documentation in Windows zips
As generated documentation files are no longer stored in the BIND Git
repository, put a copy of the PDF version of the BIND ARM generated by
the "docs" GitLab CI job into the Windows zips to make it easily
available to the end users on that platform.

Make sure Windows zips also contain certain documentation files included
in source tarballs to make the contents of each release more consistent
across different platforms.
2020-09-03 10:35:37 +02:00
Mark Andrews
1d21552ed7 Merge branch 'marka-check-deny-name-with-grant-subdomain' into 'main'
Check 'deny name' + 'grant subdomain' for the same name

See merge request isc-projects/bind9!4079
2020-09-03 06:16:01 +00:00
Mark Andrews
a402ffbced Check 'deny name' + 'grant subdomain' for the same name 2020-09-03 08:16:00 +10:00
Mark Andrews
6c578e75d6 Merge branch '2115-the-load-of-huge-zone-can-take-over-100-secs-when-running-under-a-sanitiser' into 'main'
Resolve "The load of huge.zone can take over 100 secs when running under a sanitiser."

Closes #2115

See merge request isc-projects/bind9!4068
2020-09-02 21:12:02 +00:00
Mark Andrews
fd08918df5 Increase zone load timeout in the "rndc" test
The "huge.zone" zone can take longer than 100 seconds to load when
running under a sanitizer.  Increase the relevant zone load timeout to
prevent intermittent failures of the "rndc" system test.
2020-09-02 22:38:11 +02:00
Ondřej Surý
aa42c8676f Merge branch '2091-print-out-more-diagnostics-on-dns_name_issubdomain' into 'main'
Print diagnostics on dns_name_issubdomain() failure in fctx_create()

Closes #2091

See merge request isc-projects/bind9!4071
2020-09-02 16:33:19 +00:00
Ondřej Surý
0a22024c27 Print diagnostics on dns_name_issubdomain() failure in fctx_create()
Log diagnostic message when dns_name_issubdomain() in the fctx_create()
when the resolver is qname minimizing and forwarding at the same time.
2020-09-02 18:08:15 +02:00
Ondřej Surý
323be476b8 Merge branch '2054-dig-bufsize-0-sets-bufsize-to-4096-2' into 'main'
Resolve "dig +bufsize=0 sets bufsize to 4096"

Closes #2054

See merge request isc-projects/bind9!4055
2020-09-02 15:01:00 +00:00
Mark Andrews
1134f077fd Add CHANGES and release note for GL #2054 2020-09-02 16:59:10 +02:00
Mark Andrews
1d55bd943b 'dig +bufsize=0' no longer disables EDNS as a side effect.
Additionally 'dig +bufsize' restores the default EDNS buffer size.
2020-09-02 16:58:43 +02:00
Mark Andrews
fa9ba8c5f8 Merge branch '2084-9-11-data-race-in-dispatch_test-2' into 'main'
watch_fd also requires lockfd to be held. (9.16/9.17)

See merge request isc-projects/bind9!4058
2020-09-02 13:57:59 +00:00
Mark Andrews
22f499cdc4 watch_fd also requires thread->fdlock[lockid] to be held 2020-09-02 12:17:48 +00:00
Mark Andrews
e923e62f6c remove dead code 2020-09-02 12:17:48 +00:00
Ondřej Surý
c9a9bc5437 Merge branch '2037-deferred-system-test-tcp-buffers-filling-fix' into 'main'
Reorder the response reading in packet.pl to not fill TCP buffers

Closes #2037

See merge request isc-projects/bind9!4065
2020-09-02 12:16:05 +00:00
Ondřej Surý
91322d72c2 Skip the large TCP assertion failure test in the CI environment 2020-09-02 13:10:17 +02:00
Ondřej Surý
ff133ebabd Reorder the response reading in packet.pl to not fill TCP buffers 2020-09-02 12:45:56 +02:00
Matthijs Mekking
27f0d104d3 Merge branch '1748-log-cds-cdnskey-publication' into 'main'
Resolve "Logging of CDS/CDNSKEY generation for workflow"

Closes #2103 and #1748

See merge request isc-projects/bind9!4028
2020-09-02 10:03:15 +00:00
Matthijs Mekking
ff006a1730 Add change entry and release note for #1748 2020-09-02 12:01:22 +02:00
Matthijs Mekking
f9ef5120c1 Log when CDS/CDNSKEY is published in zone.
Log when named decides to add a CDS/CDNSKEY record to the zone. Now
you understand how the bug was found that was fixed in the previous
commits.
2020-09-02 12:00:16 +02:00
Matthijs Mekking
c8205bfa0e Fix CDS (non-)publication
The CDS/CDNSKEY record will be published when the DS is in the
rumoured state. However, with the introduction of the rndc '-checkds'
command, the logic in the keymgr was changed to prevent the DS
state to go in RUMOURED unless the specific command was given. Hence,
the CDS was never published before it was seen in the parent.

Initially I thought this was a policy approval rule, however it is
actually a DNSSEC timing rule. Remove the restriction from
'keymgr_policy_approval' and update the 'keymgr_transition_time'
function. When looking to move the DS state to OMNIPRESENT it will
no longer calculate the state from its last change, but from when
the DS was seen in the parent, "DS Publish". If the time was not set,
default to next key event of an hour.

Similarly for moving the DS state to HIDDEN, the time to wait will
be derived from the "DS Delete" time, not from when the DS state
last changed.
2020-09-02 12:00:14 +02:00
Matthijs Mekking
2d2b8e7c02 Silence two grep calls 2020-09-02 11:59:49 +02:00
Matthijs Mekking
dd754a974c Update rndc_checkds test util
The 'rndc_checkds' utility now allows "now" as the time when the DS
has been seen in/seen removed from the parent.

Also it uses "KEYX" as the key argument, rather than key id.
The 'rndc_checkds' will retrieve the key from the "KEYX" string. This
makes the call a bit more readable.
2020-09-02 11:59:49 +02:00
Matthijs Mekking
8cb394e047 Improve kasp test readability
This commit has a lot of updates on comments, mainly to make the
system test more readable.

Also remove some redundant signing policy checks (check_keys,
check_dnssecstatus, check_keytimes).

Finally, move key time checks and expected key time settings above
'rndc_checkds' calls (with the new way of testing next key event
times there is no need to do them after 'rndc_checkds', and moving
them above 'rndc_checkds' makes the flow of testing easier to follow.
2020-09-02 11:59:49 +02:00
Matthijs Mekking
4a67cdabfe Add dnssec-settime [-P ds|-D ds] to kasp test
Add the new '-P ds' and '-D ds' calls to the kasp test setup so that
next key event times can reliably be tested.
2020-09-02 11:59:49 +02:00
Matthijs Mekking
d4c4f6a669 Add '-P ds' and '-D ds' to dnssec-settime
Add two more arguments to the dnssec-settime tool. '-P ds' sets the
time that the DS was published in the parent, '-D ds' sets the time
that the DS was removed from the parent (these times are not accurate,
but rely on the user to use them appropriately, and as long as the
time is not before actual publication/withdrawal, it is fine).

These new arguments are needed for the kasp system test. We want to
test when the next key event is once a DS is published, and now
that 'parent-registration-delay' is obsoleted, we need a different
approach to reliable test the timings.
2020-09-02 11:59:47 +02:00
Michal Nowak
1f5c47e4e6 Merge branch 'mnowak/drop-gperftools-profiler-configure-switch' into 'main'
Drop gperftools-profiler configure switch

See merge request isc-projects/bind9!4045
2020-09-02 09:34:29 +00:00
Michal Nowak
10dd78126a Add CHANGES and release note for GL !4045 2020-09-02 11:08:40 +02:00
Michal Nowak
de49699b66 Drop gperftools-profiler configure switch
This switch is believed to be unnecessary. The possibility to use
gperftools CPU profiler was kept, one needs to set 'CFLAGS' and
'LDFLAGS' accordingly.
2020-09-02 11:07:46 +02:00
Mark Andrews
57673de99e Merge branch 'marka-placeholder' into 'main'
placeholder

See merge request isc-projects/bind9!4061
2020-09-02 09:05:12 +00:00
Mark Andrews
10b2620ec5 placeholder 2020-09-02 18:46:56 +10:00
Mark Andrews
c4b8b831c0 Merge branch '2081-data-race-in-zonemgr_test' into 'main'
Resolve "data race in zonemgr_test"

Closes #2081

See merge request isc-projects/bind9!3989
2020-09-02 01:36:51 +00:00
Mark Andrews
ca1b0f1539 Add CHANGES note 2020-09-02 10:33:12 +10:00
Mark Andrews
b8e4b6d303 isc_ratelimiter needs to hold a reference to its task
to prevent the task subsystem shutting down before the
ratelimiter is freed.
2020-09-02 10:32:33 +10:00
Mark Andrews
d1d58a2e78 Merge branch '2111-restore-d-option-to-packet-pl' into 'main'
Resolve "Restore '-d' option to packet.pl"

Closes #2111

See merge request isc-projects/bind9!4054
2020-09-02 00:24:03 +00:00
Mark Andrews
c070bab169 Dump the returned packet 2020-09-02 09:40:45 +10:00