2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00
Commit Graph

35505 Commits

Author SHA1 Message Date
Matthijs Mekking
f14964a1b1 Test for EDE option 18 in allow-query test
If a query is refused because of an ACL error, check that the extended
DNS error "Prohibited (18)" is set.
2021-11-19 09:44:28 +01:00
Matthijs Mekking
ca7f2fd903 Add EDE to query messages
Add extended DNS error on refused queries. All instances are related to
unauthorized clients, so set extended DNS error code 18 (Prohibited).
2021-11-19 09:44:28 +01:00
Matthijs Mekking
6c8fc2f4f0 Add method to set extended DNS error
Add a new parameter to 'ns_client_t' to store potential extended DNS
error. Reset when the client request ends, or is put back.

Add defines for all well-known info-codes.

Update the number of DNS_EDNSOPTIONS that we are willing to set.

Create a new function to set the extended error for a client reply.
2021-11-19 09:44:28 +01:00
Matthijs Mekking
36503721f2 Merge branch 'doc-fix-cookie-algorithm-desc' into 'main'
[ISC-support #19862] Update docs to reflect changes to acceptable cookie-algorithm values

See merge request isc-projects/bind9!5573
2021-11-18 12:57:52 +00:00
Dan Theisen
b29a748119 Update docs with correct cookie-algorithm values
The documentation was inconsistent with the code. The new description
for cookie-algorithm now reflects the current behavior.

The following two commits are the relevant code changes to this
section of docs: afa81ee4 a912f313
2021-11-18 13:26:12 +01:00
Michał Kępień
a814f72261 Merge branch 'v9_17_20-release' into 'main'
Merge 9.17.20 release branch

See merge request isc-projects/bind9!5581
2021-11-18 08:14:40 +00:00
Michał Kępień
d0940f87b6 Set up release notes for BIND 9.17.21 2021-11-18 09:00:07 +01:00
Michał Kępień
50ea1f5fc4 Update BIND version to 9.17.20 2021-11-18 09:00:07 +01:00
Michał Kępień
27abbbafeb Add a CHANGES marker 2021-11-18 09:00:07 +01:00
Michał Kępień
ac870ec6d6 Merge branch 'michal/prepare-documentation-for-bind-9.17.20' into 'v9_17_20-release'
Prepare documentation for BIND 9.17.20

See merge request isc-private/bind9!335
2021-11-18 09:00:07 +01:00
Michał Kępień
adf37a9d59 Prepare release notes for BIND 9.17.20 2021-11-18 09:00:07 +01:00
Michał Kępień
02b1a18db2 Reorder release notes 2021-11-18 09:00:07 +01:00
Michał Kępień
075f03d37f Tweak and reword release notes 2021-11-18 09:00:07 +01:00
Evan Hunt
00d379da8e Merge branch '2374-mdig-ephemeral' into 'main'
Make mdig use the OS-supplied ephemeral port range

Closes #2374

See merge request isc-projects/bind9!5552
2021-11-17 22:38:50 +00:00
Evan Hunt
0fecb10c17 Make mdig use the OS-supplied ephemeral port range
mdig was always using the default 1024-65535 range for outgoing
messages, instead of using the system's configured ephemeral ports.
2021-11-17 14:13:17 -08:00
Evan Hunt
f6fc9d8c61 Merge branch 'each-fix-warnings' into 'main'
address '--disable-doh' failures

See merge request isc-projects/bind9!5561
2021-11-17 22:11:36 +00:00
Evan Hunt
7f63ee3bae address '--disable-doh' failures
Change 5756 (GL #2854) introduced build errors when using
'configure --disable-doh'.  To fix this, isc_nm_is_http_handle() is
now defined in all builds, not just builds that have DoH enabled.

Missing code comments were added both for that function and for
isc_nm_is_tlsdns_handle().
2021-11-17 13:48:43 -08:00
Mark Andrews
a58859b197 Merge branch '3012-begin-end-dnssec-managed-keys-in-bin-named-config-c-are-mismatched' into 'main'
Resolve "BEGIN/END DNSSEC/MANAGED KEYS in bin/named/config.c are mismatched."

Closes #3012

See merge request isc-projects/bind9!5575
2021-11-16 21:44:21 +00:00
Mark Andrews
1d7b1f74c9 Embed NAMED_SYSCONFDIR contents in the bind.keys comment 2021-11-16 14:39:05 +11:00
Mark Andrews
43a7f3f532 Update comments around built in trust anchors
The comments now say "# BEGIN TRUST ANCHORS" and "# END TRUST ANCHORS".
2021-11-16 14:36:10 +11:00
Ondřej Surý
92823f9424 Merge branch 'ondrej/update-flycheck-configuration-on-Linux' into 'main'
Add flycheck configuration for libxml2 and json-c on Linux

See merge request isc-projects/bind9!5570
2021-11-15 11:33:37 +00:00
Ondřej Surý
41f86440c4 Add flycheck configuration for libxml2 and json-c on Linux 2021-11-15 12:31:48 +01:00
Mark Andrews
e8d1dd30bc Merge branch '3003-greedy-regular-expression-causes-intermittent-nsupdate-system-test-failures' into 'main'
Resolve "Greedy regular expression causes intermittent "nsupdate" system test failures"

Closes #3003

See merge request isc-projects/bind9!5559
2021-11-10 01:49:43 +00:00
Mark Andrews
c1df7884f0 Add CHANGES note for [GL #3003] 2021-11-10 12:13:34 +11:00
Mark Andrews
be879cda72 Replace incorrect sed expersion with awk
The sed expression could find the wrong instance of 10.
Use awk to replace the TTL field and also to specify the
server and issue the send command.
2021-11-10 12:09:51 +11:00
Petr Špaček
ed99c502b6 Merge branch 'pspacek/ci-jobs-interruptible' into 'main'
Automatically cancel CI jobs on outdated branches

See merge request isc-projects/bind9!5558
2021-11-09 10:54:39 +00:00
Petr Špaček
02b438fadf Automatically cancel CI jobs on outdated branches
Gitlab feature
https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-redundant-pipelines
can automatically cancel jobs which operate on an outdated code, i.e. on
branches which received new commits while jobs with an older set of
commits are still running. For this feature to work jobs have to be
configured with boolean interruptible: true.

I think practically all of our current CI jobs can be cancelled,
so the option is now on by default for all jobs.
2021-11-09 11:21:34 +01:00
Petr Špaček
a3ea4fec2a Merge branch 'pspacek/gitlab-ci-cleanup' into 'main'
Remove obsolete PYTHONPATH setting from .gitlab-ci.yaml

See merge request isc-projects/bind9!5563
2021-11-09 09:54:51 +00:00
Petr Špaček
310a15ac94 Remove obsolete PYTHONPATH setting from .gitlab-ci.yaml
It was leftover after removing Python tools in commit
98b3b93791.
2021-11-09 10:24:42 +01:00
Petr Špaček
05eab7cf8f Merge branch '2779-wildcard_test_property_based' into 'main'
Add property based test for wildcard expansion

See merge request isc-projects/bind9!5203
2021-11-08 13:20:50 +00:00
Petr Špaček
6495e59a4c Fix system test .status file cleanup 2021-11-08 13:23:22 +01:00
Petr Špaček
49da19c353 Add new system test for wildcard expansion
This is almost minimal prototype to show how to use python-hypothesis
library in a system test. It does not fully replace existing shell-based
system test for wildcards.
2021-11-08 13:23:05 +01:00
Petr Špaček
8ce4759c5c Use more liberal pylint for tests
Ignore wrong-import-position to enable use of pytest.importorskip.
2021-11-08 13:23:05 +01:00
Petr Špaček
1a80e641e9 Use more liberal flake8 for tests
Ignore rule W402 (wrong import order) to enable use of
pytest.importorskip.
2021-11-08 13:23:05 +01:00
Petr Špaček
b8829c801f Allow py.test system test to skip itself
Enable use of shortcuts like pytest.importorskip and other tricks
which can cause test to skip itself.
2021-11-08 13:23:03 +01:00
Artem Boldariev
4589146eb1 Merge branch '2854-cache-control-max-age' into 'main'
Resolve #2854: DoH:  Assign HTTP responses freshness lifetime according to the smallest TTL found in the Answer section

Closes #2854

See merge request isc-projects/bind9!5493
2021-11-05 13:02:52 +00:00
Artem Boldariev
2a340ee510 Modify the CHANGES file [GL #2854]
Mentions that we now assign HTTP freshness lifetime to responses sent
over DNS-over-HTTPS.
2021-11-05 14:14:59 +02:00
Evan Hunt
03564ba982 add a max-age test to doth system test
use curl, when available, to query for names that do and do not
exist; dump the response headers and check for the expected
max-age value.
2021-11-05 14:14:59 +02:00
Artem Boldariev
51a2c7aed3 DoH: Set the "max-age" "Cache-Control" HTTP header value
This commit makes BIND set the "max-age" value of the "Cache-Control"
HTTP header to the minimal TTL from the Answer section for positive
answers, as RFC 8484 advises in section 5.1.

We calculate the minimal TTL as a side effect of rendering the
response DNS message, so it does not change the code flow much, nor
should it have any measurable negative impact on the performance.

For negative answers, the "max-age" value is set using the TTL and
SOA-minimum values from an SOA record in the Authority section.
2021-11-05 14:14:59 +02:00
Artem Boldariev
80482f8d3e DoH: Add isc_nm_set_min_answer_ttl()
This commit adds an isc_nm_set_min_answer_ttl() function which is
intended to to be used to give a hint to the underlying transport
regarding the answer TTL.

The interface is intentionally kept generic because over time more
transports might benefit from this functionality, but currently it is
intended for DoH to set "max-age" value within "Cache-Control" HTTP
header (as recommended in the RFC8484, section 5.1 "Cache
Interaction").

It is no-op for other DNS transports for the time being.
2021-11-05 14:14:59 +02:00
Michał Kępień
b69dfd6a75 Merge branch 'pspacek/stats_version_fix' into 'main'
Fix incorrect version bump in statistics channels

See merge request isc-projects/bind9!5557
2021-11-05 06:42:33 +00:00
Petr Špaček
660d502c64 Fix incorrect version bump in statistics channels
The version number for the XML statistics channel was not incremented
correctly after removal of isc_socket code in
a55589f881, and the JSON version number
was not incremented at all.
2021-11-04 18:45:36 -07:00
Evan Hunt
b3aba19582 Merge branch '2973-http-buffer-fix' into 'main'
statschannel doesn't handle multiple reads correctly

Closes #2973

See merge request isc-projects/bind9!5530
2021-11-05 01:09:44 +00:00
Evan Hunt
5f05cf97c7 CHANGES for [GL #2973] 2021-11-04 17:08:53 -07:00
Mark Andrews
0b83f1495d Handle truncating the request stream in isc_httpd
If we have had to truncate the request stream, don't resume
reading from it.
2021-11-04 17:06:36 -07:00
Mark Andrews
49531e4582 Handle HTTP/1.1 pipelined requests
Check to see whether there are outstanding requests in the
httpd receive buffer after sending the response, and if so,
process them.

Test that pipelined requests are handled by sending multiple
minimal HTTP/1.1 using netcat (nc) and checking that we get
back the same number of responses.
2021-11-04 17:05:29 -07:00
Mark Andrews
e46c64bf42 Consume the HTTP headers after processing a request
Remember the amount of space consumed by the HTTP headers, then
move any trailing data to the start of the httpd->recvbuf once
we have finished processing the request.
2021-11-04 17:00:18 -07:00
Evan Hunt
cbf8c2e019 statschannel doesn't handle multiple reads correctly
if an incoming HTTP request is incomplete, but nothing else is clearly
wrong with it, the stats channel continues reading to see if there's
more coming.  the buffer length was not being processed correctly in
this case.  also, the server state was not reset correctly when the
request was complete, so that subsequent requests could be appended to
the first buffer instead of being treated as new.

in addition fixing the above problems, this commit also increases the
size of the httpd request buffer from 1024 to 4096, because some
browsers send a lot of headers.
2021-11-04 15:52:58 +11:00
Mark Andrews
76375797b5 Merge branch '2998-cid-340918-uninitialized-variables-uninit' into 'main'
Resolve "CID 340918: Uninitialized variables (UNINIT)"

Closes #2998

See merge request isc-projects/bind9!5556
2021-11-03 09:50:53 +00:00
Mark Andrews
6b6c89b3ea Silence Coverity false positive
Coverity if failing to determine that 'priv.elements[i].length' is
actually valid when 'buf[i]' is non-NULL.  Initialise 'priv' to
zeros.
2021-11-03 20:10:34 +11:00