Compare commits

..
Author SHA1 Message Date
Michał Kępień de6f1a07f7 Merge branch 'prep-release' into v9.16.43-release 2023-08-04 12:27:27 +02:00
Michał Kępień bcc0863c6a prep 9.16.43 2023-08-04 12:27:19 +02:00
Michał Kępień bec741434a Merge branch 'michal/prepare-documentation-for-bind-9.16.43' into 'v9.16.43-release'
Prepare documentation for BIND 9.16.43

See merge request isc-private/bind9!563
2023-08-04 10:26:34 +00:00
Michał Kępień d9cd815bf6 Tweak and reword release notes 2023-08-04 12:10:49 +02:00
Michał Kępień dff52546d8 Prepare release notes for BIND 9.16.43 2023-08-04 12:10:49 +02:00
Michał Kępień e743b51da9 Update sample query log excerpt in the ARM 2023-08-04 12:10:49 +02:00
Michał Kępień 8078e7de05 Temporarily disable dnstap for OL7 builds in CI
The "dnstap" system test started to fail very frequently for BIND 9.16
builds running in Oracle Linux 7 Docker containers spawned by GitLab CI.
The test used to be perfectly stable on that platform for the exact same
source tree, so the problem could not have been triggered by a bad code
change.  Temporarily disable dnstap for Oracle Linux 7 builds prepared
in GitLab CI until the issue is fixed as it virtually prevents the
relevant GitLab CI jobs from being able to succeed.

See isc-projects/bind9#4240
2023-08-04 12:10:49 +02:00
Michał Kępień f34c2bddc9 Merge branch '4059-oracle-linux-8-shell-doesn-t-always-restore-environment-variable-correctly-9.16' into 'bind-9.16'
[9.16] Use sub shell to isolate enviroment changes

See merge request isc-projects/bind9!8163
2023-08-02 09:16:45 +00:00
Mark AndrewsandMichał Kępień dc2ea03ea2 Use sub shell to isolate enviroment changes
'HOME=value command' should only change HOME for command but on
some platforms this occasionally sets HOME for the rest of the
test. Explicitly isolate the enviroment change using a sub shell.

(cherry picked from commit 96f75bba18)
2023-08-02 10:47:36 +02:00
Ondřej Surý 2086be9bca Merge branch 'stepan/fix-check-in-ecdsa-system-test-9.16' into 'bind-9.16'
[9.16] Fix ecdsa256 check in ecdsa system test setup

See merge request isc-projects/bind9!8151
2023-07-28 08:09:19 +00:00
Štěpán BalážikandOndřej Surý fa8d48ee86 Fix ecdsa256 check in ecdsa system test setup
Probably by copy-paste mistake, ecdsa384 was checked twice.

(cherry picked from commit 10194baa07)
2023-07-28 09:15:17 +02:00
Tom Krizek 8fa55680f6 Merge branch '4055-improve-the-overmem-cache-cleaning-test-9.16' into 'bind-9.16'
[9.16][CVE-2023-2828] Add test for dns_rbtdb overmem purging

See merge request isc-projects/bind9!8145
2023-07-26 14:32:05 +00:00
Ondřej SurýandTom Krizek c7d64009c2 Add test for dns_rbtdb overmem purging
Add a unit test to check if the overmem purging in the RBTDB is
effective when mixed size RR data is inserted into the database.

Co-authored-by: Ondřej Surý <ondrej@isc.org>
Co-authored-by: Jinmei Tatuya <jtatuya@infoblox.com>

(manually picked from 269c03831f)
2023-07-26 15:20:53 +02:00
Tom Krizek b8f06e61ea Merge branch 'tkrizek/disable-resolve-in-tsan-9.16' into 'bind-9.16'
[9.16] Disable resolve checks under TSAN

See merge request isc-projects/bind9!8140
2023-07-26 08:42:12 +00:00
Tom Krizek 9abdcb23a2 Disable resolve checks under TSAN
The resolve binary is affected by GL#4119 which occassionally makes it
hand during system tests when running with TSAN. This is a workaround to
avoid wasting resources caused by a CI timeout for the system test tsan
jobs.

(cherry picked from commit 774b9bc629)
2023-07-26 10:08:29 +02:00
Tom Krizek d5ac6efbc4 Merge branch '4089-stale-query-loop-test-9.16' into 'bind-9.16'
[9.16] Reproducer for CVE-2023-2911

See merge request isc-projects/bind9!8136
2023-07-25 09:05:28 +00:00
Tom Krizek 3c30f4a408 Reproducer for CVE-2023-2911
The conditions that trigger the crash:
- a stale record is in cache
- stale-answer-client-timeout is 0
- multiple clients query for the stale record, enough of them to exceed
  the recursive-clients quota
- the response from the authoritative is sufficiently delayed so that
  recursive-clients quota is exceeded first

The reproducer attempts to simulate this situation. However, it hasn't
proven to be 100 % reproducible, especially in CI. When reproducing
locally, the priming query also seems to sometimes interfere and prevent
the crash. When the reproducer is ran twice, it appears to be more
reliable in reproducing the issue.

(cherry picked from commit f617512d37)
2023-07-25 10:35:09 +02:00
Michał Kępień 35b20d6aa5 Merge branch '4215-revert-9.16' into 'bind-9.16'
Revert GL !8123

See merge request isc-projects/bind9!8129
2023-07-24 09:12:01 +00:00
Michał Kępień d3b0df51cf Revert GL !8123
This reverts commit 302d0d36f7
(7e9e96ba01 and
bd912b7bed), reversing changes made to
fc6992b3fb.
2023-07-24 11:02:37 +02:00
Mark Andrews 302d0d36f7 Merge branch '4215-add-isc_r_timedout-to-the-reasons-to-call-dns_zonemgr_unreachableadd-in-xfrin-bind-9.16' into 'bind-9.16'
[9.16] Resolve "Add ISC_R_TIMEDOUT to the reasons to call dns_zonemgr_unreachableadd in xfrin"

See merge request isc-projects/bind9!8123
2023-07-21 23:43:54 +00:00
Mark Andrews bd912b7bed Add CHANGES note for [GL #4215] 2023-07-22 09:07:15 +10:00
Mark Andrews 7e9e96ba01 Mark a primary as unreachable on timed out in xfin
When a primary server is not responding, mark it as temporarialy
unreachable.  This will prevent too many zones queuing up on a
unreachable server and allow the refresh process to move onto
the next primary sooner once it has been so marked.
2023-07-22 09:06:42 +10:00
Ondřej Surý fc6992b3fb Merge branch '4200-dont-process-next-TCP-packet-when-paused-9.16' into 'bind-9.16'
[9.16] Don't process detach and close as priority netmgr events

See merge request isc-projects/bind9!8095
2023-07-20 18:00:09 +00:00
Ondřej Surý 47cafcd8b5 Add CHANGES and release note for [GL #4200]
(cherry picked from commit 7cd1ac2fa7)
2023-07-20 19:22:30 +02:00
Ondřej Surý 36aba0db8f Don't process detach and close as priority netmgr events
The detach (and possibly close) netmgr events can cause additional
callbacks to be called when under exclusive mode.  The detach can
trigger next queued TCP query to be processed and close will call
configured close callback.

Move the detach and close netmgr events from the priority queue to the
normal queue as the detaching and closing the sockets can wait for the
exclusive mode to be over.

(cherry picked from commit c2c2ec0c96)
2023-07-20 19:21:44 +02:00
Tom Krizek b09251b2f9 Merge branch 'tkrizek/pytest-conftest-9.16' into 'bind-9.16'
[9.16] Configure pytest to properly locate conftest.py

See merge request isc-projects/bind9!8125
2023-07-20 12:41:37 +00:00
Tom Krizek 90e33052d2 Configure pytest to properly locate conftest.py
In pytest 7.4.0, there were some changes to how the configuration file
for pytest is located. In our case, this resulted in a failure to find
the conftest.py with the needed fixtures which then prevented our python
tests from being executed successfully.

Configure the --confcutdir to ensure it points to the system test
directory, where our conftest.py is located.

Related https://github.com/pytest-dev/pytest/pull/11043
2023-07-20 13:27:03 +02:00
Arаm Sаrgsyаn 4970af5398 Merge branch 'aram/tests-statschannel-fetch.pl-typo-9.16' into 'bind-9.16'
[9.16] Fix a bug in an utility script for the statschannel system test

See merge request isc-projects/bind9!8121
2023-07-19 14:25:38 +00:00
Aram Sargsyan 3a807e554f Fix a bug in an utility script for the statschannel system test
Because of a typo, the fetch.pl script tries to extract the server
address from the input parameter 'a' instead of 's'. Fix the typo.

(cherry picked from commit aa7538fd38)
2023-07-19 13:27:54 +00:00
Mark Andrews 7fc0400617 Merge branch '4203-run-gdb-not-found-bind-9.16' into 'bind-9.16'
[9.16] Resolve "run.gdb not found"

See merge request isc-projects/bind9!8113
2023-07-19 06:11:55 +00:00
Mark Andrews ce17cdf9cb Use absolute path to locate run.gdb
(cherry picked from commit 3f7723cdff)
2023-07-19 12:53:43 +10:00
Tom Krizek 1773a68e6b Merge branch 'tkrizek/readthedocs-config-9.16' into 'bind-9.16'
[9.16] Add configuration for readthedocs.org

See merge request isc-projects/bind9!8110
2023-07-18 15:00:03 +00:00
Tom Krizek 987129a3c4 Synchronize Sphinx package version on ReadTheDocs with our CI
Related: isc-projects/images!228
2023-07-18 16:17:50 +02:00
Tom Krizek 521a5d00d8 Add configuration for readthedocs.org
readthedocs.org is switching to in-repo configuration file in favor of
the deprecated web interface as it allows more flexibility.

This also fixes our recent doc build issues, as we're switching to a
newer Python which is required by Sphinx.

See https://blog.readthedocs.com/migrate-configuration-v2/

(cherry picked from commit a1a0ccda6e)
2023-07-18 15:33:56 +02:00
Matthijs Mekking ead36d331e Merge branch '2471-test-three-is-a-crowd-v9_16' into 'bind-9.16'
[9.16] Add "three is a crowd" test case

See merge request isc-projects/bind9!8087
2023-07-06 09:46:28 +00:00
Matthijs Mekking 80a20c9643 Add test for "three is a crowd" bug (GL #2375)
Add this test scenario for a bug fixed a while ago. When a third key is
introduced while the previous rollover hasn't finished yet, the keymgr
could decide to remove the first two keys, because it was not checking
for an indirect dependency on the keys.

In other words, the previous bug behavior was that the first two keys
were removed from the zone too soon.

This test case checks that all three keys stay in the zone, and no keys
are removed premature after another new key has been introduced.

(cherry picked from commit 9c40cf0566)
2023-07-06 10:30:53 +02:00
Matthijs Mekking 83dd0c85a2 Check all keys despite early failure
In the kasp script, if one expected key is not found, continue checking
the other key ids, even if there is no match for the first one.  This
provides a bit more information which keys mismatch and makes for
easier debugging test failures.

(cherry picked from commit 674249f66a)
2023-07-06 10:28:41 +02:00
Michał Kępień 681260b6cd Merge branch '4169-add-google-site-verification-tag-to-the-toc-page-9.16' into 'bind-9.16'
[9.16] Add Google Site Verification tag to the TOC page

See merge request isc-projects/bind9!8078
2023-06-29 16:50:53 +00:00
Michał Kępień b9ec370c26 Add Google Site Verification tag to the TOC page
This should allow tracking HTTP 404 errors for Read the Docs using the
Google Search Console.

(cherry picked from commit 13c35ab0b3)
2023-06-29 18:49:54 +02:00
Tom Krizek 3655c98c18 Merge branch 'tkrizek-disable-delv-in-tsan-9.16' into 'bind-9.16'
[9.16] Disable delv tests under TSAN

See merge request isc-projects/bind9!8072
2023-06-29 13:42:33 +00:00
Tom Krizek 4efef8cb54 Check for unset variables only after conf.sh is loaded
Make the cds/setup.sh compatible with the workaround which relies on
testing the TSAN_OPTIONS variable which may not be set.

(cherry picked from commit 76d9873ef6)
2023-06-29 14:40:09 +02:00
Tom Krizek 2020ce2010 Fix checking for executables in shell conditions in tests
Surround the variables which are checked whether they're executable in
double quotes. Without them, empty paths won't be properly interpreted
as not executable.

(manually picked from commit 06056c44a7)
2023-06-29 13:19:47 +02:00
Tom Krizek bd9dabc0c3 Only use delv if available in mkeys test
Check that $DELV is an executable before using it in a test.

(cherry picked from commit 384339dbba)
2023-06-29 13:16:50 +02:00
Tom Krizek a904cd9a0e Disable delv tests under TSAN
Since delv can occasionally hang in system tests when running with TSAN
(see GL#4119), disable these tests as a workaround. Otherwise, the hung
delv process will just waste CI resources and prevent any meaningful
output from the rest of the test suite.

(cherry picked from commit fbcf37f914)
2023-06-29 13:16:46 +02:00
Tom Krizek 5fcf0099fa Merge branch 'tkrizek-system-test-fixes-9.16' into 'bind-9.16'
[9.16] Fix a couple of oversights in system tests

See merge request isc-projects/bind9!8057
2023-06-26 13:44:25 +00:00
Tom Krizek 0374c27fc5 Check for proper file size output in dnstap test
Previously, the first check silently failed, as 450 is apparently (in
the CI) the minimum output size for the dnstap output, rather than
470 which the test was expecting. Effectively, the check served as a 5
second sleep rather than waiting for the proper file size.

Additionally, check the expected file sizes and fail if expectations
aren't met.

(manually picked from commit 5f809e50b6)

On main, the minimum file size seems to 454 bytes, while on some
platforms in our CI setup for the 9.16 branch, it appears to be 450
instead.
2023-06-26 14:33:43 +02:00
Tom Krizek 9cfc8da487 Check for proper log message in kasp test
The log message is supposed to contain the zone name which was
erroneously omitted, but didn't pop up during tests, since return code
was silently ignored.

Now it actually waits for the proper log message rather than being an
equivalent of 3 second sleep (which was also sufficient to make the test
pass, thus we detected no failure).

(cherry picked from commit 1dd4c2b9e2)
2023-06-26 13:08:09 +02:00
Michal Nowak 678bfc4ce0 Merge tag 'v9.16.42' into bind-9.16
BIND 9.16.42
2023-06-21 20:24:59 +02:00
Michał Kępień 3e1776ed02 Merge branch '2354-add-a-tool-for-reproducing-isc-spnego-bugs-9.16' into 'bind-9.16'
[9.16] [CVE-2020-8625] [CVE-2021-25216] Add a tool for reproducing ISC SPNEGO bugs

See merge request isc-projects/bind9!8043
2023-06-19 09:09:08 +00:00
Michał Kępień 731a736a91 Add a tool for reproducing ISC SPNEGO bugs
Extend the "tsiggss" system test with reproducers for CVE-2020-8625 and
CVE-2021-25216.

(cherry picked from commit a47dc810f7)
2023-06-19 10:36:25 +02:00
Michał Kępień 746833318b Merge branch '4150-fix-entity-renumbering-in-parse_tsan.py-9.16' into 'bind-9.16'
[9.16] Fix entity renumbering in util/parse_tsan.py

See merge request isc-projects/bind9!8040
2023-06-15 14:23:04 +00:00
Michał Kępień b4f7034074 Fix entity renumbering in util/parse_tsan.py
util/parse_tsan.py builds tables of mutexes, threads, and pointers it
finds in the TSAN report provided to it as a command-line argument and
then replaces all mentions of each of these entities so that they are
numbered sequentially in the processed report.  For example, this line:

    Cycle in lock order graph: M0 (...) => M5 (...) => M9 (...) => M0

is expected to become:

    Cycle in lock order graph: M1 (...) => M2 (...) => M3 (...) => M1

Problems arise when the gaps between mutex/thread identifiers present on
a single line are smaller than the total number of mutexes/threads found
by the script so far.  For example, the following line:

    Cycle in lock order graph: M0 (...) => M1 (...) => M2 (...) => M0

first gets turned into:

    Cycle in lock order graph: M1 (...) => M1 (...) => M2 (...) => M1

and then into:

    Cycle in lock order graph: M2 (...) => M2 (...) => M2 (...) => M2

In other words, lines like this become garbled due to information loss.

The problem stems from the fact that the numbering scheme the script
uses for identifying mutexes and threads is exactly the same as the one
used by TSAN itself.  Update util/parse_tsan.py so that it uses
zero-padded numbers instead, making the "overlapping" demonstrated above
impossible.

(cherry picked from commit 7f0790c82f)
2023-06-15 16:20:11 +02:00
Tom Krizek e96a82ac72 Merge branch 'tkrizek/respdiff-threshold-9.16' into 'bind-9.16'
Adjust the respdiff failure threshold for a new dataset

See merge request isc-projects/bind9!8032
2023-06-15 08:19:13 +00:00
Tom Krizek 999850821e Adjust the respdiff failure threshold for a new dataset
This is just a slight tweak for the respdiff CI test. The new dataset
has a different set of queries and it results in a slightly more
SERVFAILs rather than timeouts in the respdiff-long-third-party test.

In our comparison script, timeouts are not counted towards the
threshold. While the total number of differences remains roughly the
same, the different distributions of them (among SERVFAIL vs timeout)
warrants a slight bump in the threshold in order to avoid test failures.

Related isc-private/bind-qa!65
2023-06-14 11:02:39 +02:00
Tom Krizek 72394b2e38 Merge branch '4117-serve-stale-check-9.16' into 'bind-9.16'
[9.16] Avoid false positive in serve-stale system test check

See merge request isc-projects/bind9!8028
2023-06-13 12:54:30 +00:00
Tom Krizek 328d0a1d0a Avoid false positive in serve-stale system test check
The purpose of the check is to verify the server has survived the
previous barrage of queries. This is done by sending a query and
checking we get a NOERROR response back.

Previously, that query could've been affected by a servfail cache - the
server would return a SERVFAIL answer, thus failing the check, despite
being up and running. Use version.bind txt ch query to avoid the
interference of servfail cache.

(cherry picked from commit dd7bcd2855)
2023-06-13 14:16:44 +02:00
Michal Nowak a6b90215a8 Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.16.43' into 'bind-9.16'
Set up version and release notes for BIND 9.16.43

See merge request isc-projects/bind9!8023
2023-06-12 15:17:44 +00:00
Michal Nowak fdea64f057 Set up release notes for BIND 9.16.43 2023-06-12 17:06:23 +02:00
Michal Nowak 848e87150a Update BIND version to 9.16.43-dev 2023-06-12 17:05:03 +02:00
Michal Nowak a62d1bd69a prep 9.16.42 2023-06-09 16:35:17 +02:00
Michal Nowak 2832418fc3 Merge branch 'mnowak/prepare-documentation-for-bind-9.16.42' into 'security-bind-9.16'
Prepare documentation for BIND 9.16.42

See merge request isc-private/bind9!544
2023-06-09 14:32:44 +00:00
Michal Nowak 606af41ced Tweak and reword release notes 2023-06-09 16:18:38 +02:00
Michal Nowak 35a43186a6 Prepare release notes for BIND 9.16.42 2023-06-09 16:13:28 +02:00
Michal Nowak 3c8b9d8576 Merge branch '4089-confidential-stale-query-loop-bind-9.16' into 'security-bind-9.16'
[9.16] [CVE-2023-2911] Fix stale-answer-client-timeout 0 crash

See merge request isc-private/bind9!533
2023-06-09 14:01:35 +00:00
Evan HuntandMichal Nowak b226745c0f CHANGES and release notes for [GL #4089] 2023-06-09 15:53:16 +02:00
Matthijs MekkingandMichal Nowak c003c5bc3c Fix serve-stale hang at shutdown
The 'refresh_rrset' variable is used to determine if we can detach from
the client. This can cause a hang on shutdown. To fix this, move setting
of the 'nodetach' variable up to where 'refresh_rrset' is set (in
query_lookup(), and thus not in ns_query_done()), and set it to false
when actually refreshing the RRset, so that when this lookup is
completed, the client will be detached.
2023-06-09 15:53:10 +02:00
Evan HuntandMichal Nowak 0101e28f91 Stale answer lookups could loop when over recursion quota
When a query was aborted because of the recursion quota being exceeded,
but triggered a stale answer response and a stale data refresh query,
it could cause named to loop back where we are iterating and following
a delegation. Having no good answer in cache, we would fall back to
using serve-stale again, use the stale data, try to refresh the RRset,
and loop back again, without ever terminating until crashing due to
stack overflow.

This happens because in the functions 'query_notfound()' and
'query_delegation_recurse()', we check whether we can fall back to
serving stale data. We shouldn't do so if we are already refreshing
an RRset due to having prioritized stale data in cache.

In other words, we need to add an extra check to 'query_usestale()' to
disallow serving stale data if we are currently refreshing a stale
RRset.

As an additional mitigation to prevent looping, we now use the result
code ISC_R_ALREADYRUNNING rather than ISC_R_FAILURE when a recursion
loop is encountered, and we check for that condition in
'query_usestale()' as well.
2023-06-09 15:52:51 +02:00
Michal Nowak 6ab8cc0e7c Merge branch '4055-improve-the-overmem-cache-cleaning-9.16' into 'security-bind-9.16'
[9.16] Improve RBT overmem cache cleaning

See merge request isc-private/bind9!528
2023-06-09 13:49:34 +00:00
Michal Nowak 0fa9acc2c0 Set max-cache-size expectations for low values 2023-06-08 14:41:19 +02:00
Ondřej SurýandMichal Nowak a295566683 Add CHANGES and release note for [GL #4055] 2023-06-08 11:54:43 +02:00
Ondřej Surý f1d9e9ee38 Improve RBT overmem cache cleaning
When cache memory usage is over the configured cache size (overmem) and
we are cleaning unused entries, it might not be enough to clean just two
entries if the entries to be expired are smaller than the newly added
rdata.  This could be abused by an attacker to cause a remote Denial of
Service by possibly running out of the operating system memory.

Currently, the addrdataset() tries to do a single TTL-based cleaning
considering the serve-stale TTL and then optionally moves to overmem
cleaning if we are in that condition.  Then the overmem_purge() tries to
do another single TTL based cleaning from the TTL heap and then continue
with LRU-based cleaning up to 2 entries cleaned.

Squash the TTL-cleaning mechanism into single call from addrdataset(),
but ignore the serve-stale TTL if we are currently overmem.

Then instead of having a fixed number of entries to clean, pass the size
of newly added rdatasetheader to the overmem_purge() function and
cleanup at least the size of the newly added data.  This prevents the
cache going over the configured memory limit (`max-cache-size`).

Additionally, refactor the overmem_purge() function to reduce for-loop
nesting for readability.
2023-06-06 14:23:16 +02:00
Evan Hunt 81c5f12e2f Merge branch '4114-include-doc-bind-9.16' into 'bind-9.16'
remove accidentally-backported "include" doc

See merge request isc-projects/bind9!8001
2023-06-05 19:25:54 +00:00
Evan Hunt fd7f68c5a8 remove accidentally-backported "include" doc
glob-expansion of filenames in "include" statements was added
in bind 9.18 but was accidentally mentioned in the bind 9.16 ARM.
2023-06-05 12:05:35 -07:00
Michal Nowak 7795e6663e Merge branch 'mnowak/windows-disable-minimal-update-check-with-no-keys' into 'bind-9.16'
Disable minimal update check with no keys on Windows

See merge request isc-projects/bind9!7996
2023-06-01 15:43:07 +00:00
Michal Nowak ca57ddf53e Disable minimal update check with no keys on Windows
The $t1 value equals $t2 due to the time elapsed between "rndc
managed-keys status" calls being equal to the normal active refresh
period (as calculated per rules listed in RFC 5011 section 2.3) minus an
"hour" (as set using -T mkeytimers). This value equality is expected to
happen on really slow machines. On our Windows CI runner, it happens
very often.
2023-05-31 14:25:02 +02:00
Michal Nowak adb71afffe Merge branch 'mnowak/alpine-3.18-9.16' into 'bind-9.16'
[9.16] Add Alpine Linux 3.18

See merge request isc-projects/bind9!7995
2023-05-31 10:16:33 +00:00
Michal Nowak 4f825f3d4f Add Alpine Linux 3.18
(cherry picked from commit ddb846454d)
2023-05-31 12:07:37 +02:00
Michal Nowak b5d894a11d Merge branch '4034-heap-use-after-free-error-workaround' into 'bind-9.16'
Workaround heap-use-after-free error in process_sendevent()

See merge request isc-projects/bind9!7979
2023-05-31 09:41:16 +00:00
Michal Nowak a396325ae3 Workaround heap-use-after-free error in process_sendevent()
This is a workaround of a permanent CI failure after GitLab CI migration
to AWS.
2023-05-31 11:19:39 +02:00
Michal Nowak 497a2fe694 Merge branch 'mnowak/custom-userspace-rcu-library-9.16' into 'bind-9.16'
[9.16] Change images for TSAN jobs

See merge request isc-projects/bind9!7988
2023-05-30 19:27:34 +00:00
Michal Nowak 42cded2713 Change images for TSAN jobs
Fedora 38 and Debian "bullseye" images were "forked" to images used only
for TSAN CI jobs. The new images contain TSAN-aware liburcu that does
not fit well with ASAN CI jobs for which original images were also used.

liburcu is not used in this branch, but images are shared among
branches, and their use needs to be consistent in all maintained
branches.

(cherry picked from commit 04dda8661f)
2023-05-30 20:45:09 +02:00
Matthijs Mekking b933b55ead Merge branch '3950-serve-stale-strikes-again-v9.16' into 'bind-9.16'
[9.16] Fix serve-stale bug when cache has no data

See merge request isc-projects/bind9!7982
2023-05-30 15:06:51 +00:00
Matthijs Mekking 10f5d78d27 Add release note and changes for #3950
Fixing another serve-stale bug is still news.

(cherry picked from commit 23dbb6ba72)
2023-05-30 16:07:43 +02:00
Matthijs Mekking 2cce83e0d7 Fix serve-stale bug when cache has no data
We recently fixed a bug where in some cases (when following an
expired CNAME for example), named could return SERVFAIL if the target
record is still valid (see isc-projects/bind9#3678, and
isc-projects/bind9!7096). We fixed this by considering non-stale
RRsets as well during the stale lookup.

However, this triggered a new bug because despite the answer from
cache not being stale, the lookup may be triggered by serve-stale.
If the answer from database is not stale, the fix in
isc-projects/bind9!7096 erroneously skips the serve-stale logic.

Add 'answer_found' checks to the serve-stale logic to fix this issue.

(cherry picked from commit bbd163acf6)
2023-05-30 15:32:24 +02:00
Matthijs Mekking 2d5b975f3a Add serve-stale test case for GL #3950
Add a test case where when priming the cache with a slow authoritative
resolver, the stale-answer-client-timeout option should not return
a delegation to the client (it should wait until an applicable answer
is found, if no entry is found in the cache).

(cherry picked from commit c3d4fd3449)
2023-05-30 15:32:24 +02:00
Michal Nowak 1732aaccc4 Merge branch 'mnowak/gitlab-runner-autoscaling-9.16' into 'bind-9.16'
[9.16] Run most Docker CI jobs in AWS with autoscaler

See merge request isc-projects/bind9!7970
2023-05-26 10:00:37 +00:00
Michal Nowak 3096bc162d Run most Docker CI jobs in AWS with autoscaler
All but the "respdiff-long" job, for which our AWS instances do not have
enough memory, are now being spawned in the AWS by the autoscaler
executor.

(cherry picked from commit f09cf69594)
2023-05-26 11:55:54 +02:00
Michal Nowak 5e984fdbe5 Merge branch 'mnowak/get_core_dumps-fix-misplaced-tsan-line-9.16' into 'bind-9.16'
[9.16] TSAN summarising line was misplaced in run.sh

See merge request isc-projects/bind9!7950
2023-05-19 12:58:52 +00:00
Michal Nowak f00a212cb8 TSAN summarising line was misplaced in run.sh
The line summarising TSAN reports was misplaced in the ASAN territory
and thus never used.

I also made core dumps, assertion failures, and TSAN reports detection
independent of each other.

(cherry picked from commit 0c4c7ddec4)
2023-05-19 14:55:23 +02:00
Michal Nowak 0c2ef4ab80 Merge branch 'mnowak/danger-test-pairwise-hint-9.16' into 'bind-9.16'
[9.16] Add a friendly Danger plea to run the pairwise CI job

See merge request isc-projects/bind9!7954
2023-05-19 12:41:34 +00:00
Michal Nowak dd996601d0 Add a friendly Danger plea to run the pairwise CI job
Sometimes a pairwise definition for a new ./configure switch is added
but not tested in the CI.

(cherry picked from commit 96563c6020)
2023-05-19 14:34:54 +02:00
Michal Nowak f905df3b7c Merge branch 'mnowak/fedora-38-9.16' into 'bind-9.16'
[9.16] Add Fedora 38

See merge request isc-projects/bind9!7952
2023-05-19 12:10:55 +00:00
Michal Nowak f3a98ae6bd Add Fedora 38
(cherry picked from commit 2e0550970b)
2023-05-19 14:05:45 +02:00
Michal Nowak 5554e4e57d Merge branch '4076-nsupdate-disable-too-many-DNS-UPDATEs-queued-check-on-windows' into 'bind-9.16'
Disable exceeded quota check on Windows

See merge request isc-projects/bind9!7943
2023-05-18 15:13:24 +00:00
Michal Nowak 4078347d80 Disable exceeded quota check on Windows
This check is too unstable on Windows. Given the bind-9.16 branch is in
security fixes-only mode, something unlikely to be investigated before
the branch goes EOL.
2023-05-18 16:57:55 +02:00
Michał Kępień e737e2b523 Merge tag 'v9.16.41' into bind-9.16
BIND 9.16.41
2023-05-18 14:17:30 +02:00
Mark Andrews ad3c012ff2 Merge branch '4035-fuzz-mem-c-871-fatal-error-runtime_check-pthread_mutex_lock-contextslock-0-0-34-0-failed' into 'bind-9.16'
Resolve "fuzz: mem.c:871: fatal error: RUNTIME_CHECK(((pthread_mutex_lock(((&contextslock))) == 0) ? 0 : 34) == 0) failed"

See merge request isc-projects/bind9!7907
2023-05-18 04:10:46 +00:00
Mark Andrews e50c962061 Remove init and deinit from fuzz.h
Constructors and destructors for the main program are not reliable
as they may be called before constructors for shared libraries they
depend upon or be called after destructors of shared libraries they
depend upon.
2023-05-18 13:45:22 +10:00
Mark Andrews be6bf6e9a4 Merge branch '4066-resolv-conf-parsing-eats-lines-if-more-than-3-nameservers-set-bind-9.16' into 'bind-9.16'
[9.16] Resolve "resolv.conf parsing eats lines if more than 3 nameservers set"

See merge request isc-projects/bind9!7942
2023-05-17 23:36:57 +00:00
Mark Andrews 9916cbabbc Add CHANGES for [GL #4066]
(cherry picked from commit 36dab033dc)
2023-05-18 08:52:52 +10:00
Mark Andrews a01c0e175a Properly process extra nameserver lines in resolv.conf
The whole line needs to be read rather than just the token "nameserver"
otherwise the next line in resolv.conf is not properly processed.

(cherry picked from commit 864cd08052)
2023-05-18 08:52:17 +10:00
Michal Nowak 867deef895 Merge branch 'mnowak/openbsd-7.3-9.16' into 'bind-9.16'
[9.16] Add OpenBSD 7.3

See merge request isc-projects/bind9!7930
2023-05-15 18:38:03 +00:00
Michal Nowak bfe80552fd Add OpenBSD 7.3
(cherry picked from commit ff52cd9604)
2023-05-15 19:54:42 +02:00
Michal Nowak 2c9cc09729 Merge branch 'mnowak/freebsd-13.2-9.16' into 'bind-9.16'
[9.16] Add FreeBSD 13.2

See merge request isc-projects/bind9!7928
2023-05-15 16:53:54 +00:00
Michal Nowak 1e2d7c933f Add FreeBSD 13.2
(cherry picked from commit 81ad645d7d)
2023-05-15 18:37:04 +02:00
Arаm Sаrgsyаn e857952e60 Merge branch '4054-zone_resigninc-bugfix-9.16' into 'bind-9.16'
[9.16] zone_resigninc(): check whether zone->db is a valid pointer before attaching

See merge request isc-projects/bind9!7924
2023-05-15 14:00:45 +00:00
Aram Sargsyan 86a8bc180b Add a CHANGES note for [GL #4054]
(cherry picked from commit 00ed5f84a9)
2023-05-15 12:05:51 +00:00
Aram Sargsyan 537c2d2c68 Check whether zone->db is a valid pointer before attaching
The zone_resigninc() function does not check the validity of
'zone->db', which can crash named if the zone was unloaded earlier,
for example with "rndc delete".

Check that 'zone->db' is not 'NULL' before attaching to it, like
it is done in zone_sign() and zone_nsec3chain() functions, which
can similarly be called by zone maintenance.

(cherry picked from commit fae0930eb8)
2023-05-15 12:05:11 +00:00
Michal Nowak 2f890fd8c7 Merge branch 'mnowak/drop_set_key_default_values' into 'bind-9.16'
Drop set_key_default_values function

See merge request isc-projects/bind9!7910
2023-05-12 09:11:57 +00:00
Michal Nowak 8cdfde8b35 Drop set_key_default_values function
The set_key_default_values function hasn't been backported to bind-9.16
and produces a warning in the nsec3 system test:

    tests.sh: line 234: set_key_default_values: command not found
2023-05-12 10:55:08 +02:00
Michal Nowak c376d602a5 Merge branch 'mnowak/coverity-scan-2022.12-9.16' into 'bind-9.16'
[9.16] Use the latest Coverity Scan

See merge request isc-projects/bind9!7919
2023-05-12 08:54:40 +00:00
Michal Nowak 54e33e62ab Use the latest Coverity Scan
(cherry picked from commit 68dd458764)
2023-05-12 10:24:35 +02:00
Michal Nowak a9ec56b717 Merge branch 'mnowak/pytest_rewrite_ttl-9.16' into 'bind-9.16'
[9.16] Rewrite the ttl system test to pytest

See merge request isc-projects/bind9!7916
2023-05-11 15:30:45 +00:00
Michal Nowak 4cc7feee24 Rewrite the ttl system test to pytest
(cherry picked from commit 0c05c3d97b)
2023-05-11 16:53:04 +02:00
Michal Nowak cb2ef29ff2 Merge branch 'mnowak/clang-16-9.16' into 'bind-9.16'
[9.16] Update clang to version 16

See merge request isc-projects/bind9!7913
2023-05-11 13:14:00 +00:00
Michal Nowak ab9d43f814 Update sources to Clang 16 formatting 2023-05-11 14:26:14 +02:00
Michal Nowak 1a9d260424 Update clang to version 16
(cherry picked from commit 30aa258107)
2023-05-11 14:24:59 +02:00
Tom Krizek d21e2ec36e Merge branch 'tkrizek/shutdown-test-exc-handling-9.16' into 'bind-9.16'
[9.16] Ensure named always terminates in the shutdown test

See merge request isc-projects/bind9!7903
2023-05-10 14:15:24 +00:00
Tom Krizek fd1d359965 Ensure named always terminates in the shutdown test
Previously, if an exception would happen inside the `with` block, the
error handler would wait indefinitely for the process to end. That would
never happen, since the termination signal was never sent to named and
the test would get stuck.

Using the try-finally block ensures that the named process is always
killed and any exception or errors will be handled gracefully.

(cherry picked from commit 836e6ed284)
2023-05-10 13:32:55 +02:00
Tom Krizek 7bbc38da95 Refactor shutdown test into more helper functions
Improve code readability by splitting the test into more functions. Some
could be re-used later on for more general-purpose subprocess handling
or named checks.

(cherry picked from commit 9d64f1c1ed)
2023-05-10 13:32:51 +02:00
Michał Kępień eba4910923 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.42' into 'bind-9.16'
Set up version and release notes for BIND 9.16.42

See merge request isc-projects/bind9!7901
2023-05-10 08:47:58 +00:00
Michał Kępień 4246799bed Set up release notes for BIND 9.16.42 2023-05-10 10:41:42 +02:00
Michał Kępień bfb2a0c2a8 Update BIND version to 9.16.42-dev 2023-05-10 10:41:42 +02:00
Michał Kępień 4df4cecf05 Merge branch 'prep-release' into v9.16.41-release 2023-05-09 13:37:39 +02:00
Michał Kępień 0238d51f78 prep 9.16.41 2023-05-09 13:37:27 +02:00
Michał Kępień 9992868eb3 Merge branch 'michal/prepare-documentation-for-bind-9.16.41' into 'v9.16.41-release'
Prepare documentation for BIND 9.16.41

See merge request isc-private/bind9!517
2023-05-09 11:36:00 +00:00
Michał Kępień 67a9900de8 Add release note for GL #4027 2023-05-09 13:27:20 +02:00
Michał Kępień 38c1bca986 Prepare release notes for BIND 9.16.41 2023-05-09 13:27:20 +02:00
Michał Kępień 452d16e2b4 Apply minor corrections to CHANGES 2023-05-09 13:27:20 +02:00
Mark Andrews 7eb03dc29c Merge branch '2447-rbt_serialize_test-c-runtime-error-member-access-within-misaligned-address' into 'bind-9.16'
Resolve "rbt_serialize_test.c: runtime error: member access within misaligned address"

See merge request isc-projects/bind9!7852
2023-05-05 07:42:04 +00:00
Mark Andrews 300a2fb4ba Check the pointer alignments when deserialising
deserialize_corrupt_test may corrupt the pointers such that they
is no longer properly aligned.  Check that the alignment is consistent
with memory returned from isc_mem before checking the magic value.
2023-05-05 07:04:31 +00:00
Mark Andrews 9b57b81ed0 Merge branch '4027-nsec3-of-removed-empty-non-terminal-remains-in-chain-breaking-validation-tools-bind-9.16' into 'bind-9.16'
[9.16] Resolve "NSEC3 of removed empty-non-terminal remains in chain, breaking validation tools"

See merge request isc-projects/bind9!7868
2023-04-25 07:05:25 +00:00
Mark Andrews 96ebc38cd2 Add CHANGES note for [GL #4027]
(cherry picked from commit 7dbb2b877b)
2023-04-25 06:52:44 +01:00
Mark Andrews aa73fda9bf Check removal of ENT when subdomains are removed
Empty-non-terminal NSEC records where not always removed when the
delegations generating them where removed via update. Check that
they now are.

(cherry picked from commit ad91a70d15)
2023-04-25 06:51:11 +01:00
Mark Andrews 3d8a223256 Cleanup orphaned empty-non-terminal NSEC3
When OPTOUT was in use we didn't ensure that NSEC3 records
for orphaned empty-non-terminals where removed.  Check if
there are orphaned empty-non-terminal NSEC3 even if there
wasn't an NSEC3 RRset to be removed in dns_nsec3_delnsec3.

(cherry picked from commit 27160c137f)
2023-04-25 06:46:17 +01:00
Michał Kępień d94f2550fb Merge tag 'v9.16.40' into bind-9.16
BIND 9.16.40
2023-04-20 13:03:54 +02:00
Petr Špaček cd086728ad Merge branch 'pspacek/set-up-version-and-release-notes-for-bind-9.16.41' into 'bind-9.16'
Set up release notes for BIND 9.16.41

See merge request isc-projects/bind9!7829
2023-04-14 08:48:25 +00:00
Petr Špaček c3d9c2b08e Set up release notes for BIND 9.16.41 2023-04-13 10:02:03 +02:00
Petr Špaček 64de9b2f40 Update BIND version to 9.16.41-dev 2023-04-13 09:55:51 +02:00
Petr Špaček 113a865465 prep 9.16.40 2023-04-11 18:57:00 +02:00
Petr Špaček 16c1b7c273 Merge branch 'pspacek/prepare-documentation-for-bind-9.16.40' into 'v9.16.40-release'
Prepare documentation for BIND 9.16.40

See merge request isc-private/bind9!511
2023-04-11 16:53:16 +00:00
Petr Špaček 6281e82cc6 Tweak and reword release notes
The fix is incomplete as mentioned in #3991, but it is not a new issue
so let's not add separate Known Issue entry for it.
2023-04-11 18:50:35 +02:00
Petr Špaček 4b8c034b14 Prepare release notes for BIND 9.16.40 2023-04-06 19:09:47 +02:00
Michal Nowak 2e2b49dbc9 Merge branch '3916-legacy-test-no-retries-in-resolution_fails-9.16' into 'bind-9.16'
[9.16] Do not retry in resolution_fails() on timeout

See merge request isc-projects/bind9!7817
2023-04-06 10:22:49 +00:00
Michal Nowak 6d5249c50c Do not retry in resolution_fails() on timeout
At the time of test number (19), there were 10 "sending packet to
10.53.0.7" lines in the "legacy/ns1/named.run" file; usually, only seven
are present:

    I:legacy:checking recursive lookup to edns 512 + no tcp server does not cause query loops (19)
    I:legacy:ns1 sent 10 queries to ns7, expected less than 10
    I:legacy:failed

Those three can be attributed to tests "8", "10", and "18", where the
dig of "resolution_fails()" retried after a timeout to succeed with
"status: SERVFAIL" subsequently, as seen in each of
dig.out.test{8,10,18} files.

    ;; communications error to 10.53.0.1#13093: timed out

    ; <<>> DiG 9.19.12-dev <<>> -p 13093 +tcp @10.53.0.1 edns512-notcp. TXT
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5368
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

This retry is unnecessary because "resolution_fails()" considers timeout
a positive result.

(cherry picked from commit e05460c813)
2023-04-06 11:46:57 +02:00
Petr Špaček ed260e6007 Merge branch 'pspacek/log-roll-doc-nits-9.16' into 'bind-9.16'
[9.16] Log rotation doc improvements

See merge request isc-projects/bind9!7808
2023-04-05 14:13:30 +00:00
Petr Špaček f8e094bab8 Make rndc dnstap -roll docs easier to read
(cherry picked from commit 2897a45644)
2023-04-05 16:10:20 +02:00
Petr Špaček 0a401f3f8f Merge branch 'bug/main/rndc-dnstap-roll-9.16' into 'bind-9.16'
[9.16] Document that rndc dnstap -roll number is optional

See merge request isc-projects/bind9!7802
2023-04-05 12:11:35 +00:00
Petr MenšíkandPetr Špaček f316f581fd Make it obvious -roll number is optional
Manual page were updated to indicate it, but rndc -h still displays it
as required parameter. Make it look like optional.

(cherry picked from commit 0627214568)
2023-04-05 14:06:26 +02:00
Petr Špaček 4a6681ce97 Merge branch '3981-reduce-dnssec-verify-calls-9.16' into 'bind-9.16'
[9.16] Reduce dns_dnssec_verify calls made checking for revoked trust anchor

See merge request isc-projects/bind9!7778
2023-04-04 07:33:47 +00:00
Petr Špaček dc6a888ea3 Export dns_view_istrusted() on Windows 2023-04-03 18:18:43 +02:00
Petr Špaček 1fd45928a3 Add release note for [GL #3981]
(cherry picked from commit 705a9ced01)
2023-04-03 17:50:16 +02:00
Mark AndrewsandPetr Špaček 2e3588e550 Add CHANGES for [GL #3981]
(cherry picked from commit 5de552d545)
2023-04-03 17:49:28 +02:00
Mark AndrewsandPetr Špaček 489cba33bb dns_view_untrust modifies dnskey->flags when it shouldn't
Copy the structure and declare dnskey as const.

(cherry picked from commit 21d828241b)
2023-04-03 17:48:31 +02:00
Mark AndrewsandPetr Špaček f708172d87 Handle dns_rdata_fromstruct failure dns_keytable_deletekey
dns_rdata_fromstruct in dns_keytable_deletekey can potentially
fail with ISC_R_NOSPACE.  Handle the error condition.

(cherry picked from commit b5df9b8591)
2023-04-03 17:48:31 +02:00
Mark AndrewsandPetr Špaček 3cb366b1e0 Reduce the number of verifiations required
In selfsigned_dnskey only call dns_dnssec_verify if the signature's
key id matches a revoked key, the trust is pending and the key
matches a trust anchor.  Previously named was calling dns_dnssec_verify
unconditionally resulted in busy work.

(cherry picked from commit e68fecbdaa)
2023-04-03 17:48:31 +02:00
Mark AndrewsandPetr Špaček 19f8033840 Add new view method dns_view_istrusted
dns_view_istrusted determines if the given key is treated as
being trusted by the view.

(cherry picked from commit 7278fff579)
2023-04-03 17:48:31 +02:00
Ondřej Surý 5c68a45af1 Merge branch '3710-properly-document-DF-flag-on-outbound-UDP--9.16' into 'bind-9.16'
Clarify the documentation about DF-flag

See merge request isc-projects/bind9!7772
2023-04-03 10:34:54 +00:00
Ondřej Surý 3b6f5ae784 Add CHANGES note for [GL #3710]
(cherry picked from commit d5921fafed)
2023-04-03 12:31:06 +02:00
Ondřej Surý f768190acb Clarify the documentation about DF-flag
Remove the reference to setting the DF-flag as we don't do that right
now.  Rephrase the paragraph that the default value should not be
causing fragmentation.

(cherry picked from commit 61f276d5a4)
2023-04-03 12:30:46 +02:00
Matthijs Mekking 58b2b8be93 Merge branch 'matthijs-checkconf-kasp-test-bug-9.16' into 'bind-9.16'
[9.16] Fix kasp system test bug

See merge request isc-projects/bind9!7765
2023-03-31 14:00:45 +00:00
Matthijs Mekking 9e702807cb Fix kasp system test bug
This test was succeeding for the wrong reason (policy not found, rather
than bad key length).

(cherry picked from commit 106497b011)
2023-03-31 10:34:49 +02:00
Matthijs Mekking 8561c0ff4b Merge branch '3967-linkfix-dnssec-guide-9.16' into 'bind-9.16'
[9.18] linkfix in dnssec-guide/validation.rst

See merge request isc-projects/bind9!7747
2023-03-29 15:41:25 +00:00
Matthijs Mekking c154fe7fb7 Add CHANGES for #3967
(cherry picked from commit 5a879028fe)
2023-03-29 17:10:22 +02:00
Matthijs Mekking 06ae5374fa Remove dead link to resolver test
The doc file doc/dnssec-guide/validation.rst points to a resolver test
site that is now down. Remove the dead link.

(cherry picked from commit 8e78f8fc0f)
2023-03-29 17:09:50 +02:00
Matthijs Mekking db02eec371 Merge branch '3965-source-never-read-master.c-v9_16' into 'bind-9.16'
[9.16] Fix scan-build issue: initialized value never read

See merge request isc-projects/bind9!7739
2023-03-29 15:09:21 +00:00
Matthijs Mekking 56a7daf334 Add CHANGES entry for #3965
(cherry picked from commit 357b27b04f)
2023-03-29 15:08:36 +00:00
Matthijs Mekking 89c000f356 Fix scan-build issue: initialized value never read
Value stored to 'source' during its initialization is never read.

(cherry picked from commit 4c33277446)
2023-03-29 15:08:36 +00:00
Michal Nowak d0096dbb72 Merge branch 'mnowak/drop-unit-and-system-test-jobs-9.16' into 'bind-9.16'
[9.16] Drop unit and system tests on amd64cross32

See merge request isc-projects/bind9!7741
2023-03-28 14:47:04 +00:00
Michal Nowak 75d656d9b8 Drop "unstable" Debian "bullseye" unit and system jobs
"Unstable" Debian "bullseye" unit and system jobs differ from unit and
system jobs on the Debian "bullseye" image by running a few more tests
enabled by the CI_ENABLE_ALL_TESTS environmental variable.  These tests
are no less stable than the rest, and thus to have distinct jobs for
them wastes resources.

Run "unstable" unit and system tests as part of stock Debian "bullseye"
jobs.

(cherry picked from commit 2b9111b435)
2023-03-28 16:41:03 +02:00
Michal Nowak 8ed6f0a075 Drop unit and system tests on amd64cross32
amd64cross32 jobs run a cross-compiled 32-bit BIND 9 on the 64-bit
platform. This approach brings no build issues, and it is a good way to
catch 32-bit issues in BIND 9 code-base and ensure cross-compilation
keeps working.

Unfortunately, running unit and system tests is a problem:

- #3269 - doth-ns1 frequently failed to start
- #3316 - quota_test sometimes fails to create new thread
- #3956 - tcp-ns1 sometimes fails to allocate memory

There's little value in running unit and system tests on the
amd64cross32 platform, and it only means the effort spent by QA by
looking into what turns out to be 32-bit limitations.

(cherry picked from commit f86d4f3bd8)
2023-03-28 16:41:01 +02:00
Matthijs Mekking 3f015130e4 Merge branch '3959-log-purge-timestamps-bug-v9_16' into 'bind-9.16'
[9.16] Fix a bug related to rolling timestamp logifles

See merge request isc-projects/bind9!7720
2023-03-28 10:26:10 +00:00
Mark AndrewsandMatthijs Mekking c3f5ef24b2 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.

(cherry picked from commit f485bb19c0)
2023-03-28 10:03:33 +00:00
Evan HuntandMatthijs Mekking a30544d6c0 CHANGES and release note for [GL #828]
Note: added a reference to GL #3959.

(cherry picked from commit 96980adbad)
2023-03-28 10:03:33 +00:00
Evan HuntandMatthijs Mekking 6e422ae3ae 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.

(cherry picked from commit 9a9e906306)
2023-03-28 10:03:33 +00:00
Evan HuntandMatthijs Mekking e2f7f63448 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.

(manually picked from commit 76baed3343)
2023-03-28 10:03:33 +00:00
Tom Krizek 2ade339feb Merge branch 'tkrizek/gh-actions-branch-name-update-9.16' into 'bind-9.16'
[9.16] Update branch&tag name conventions

See merge request isc-projects/bind9!7735
2023-03-27 16:29:16 +00:00
Tom Krizek 6b851c87fc Update branch&tag naming convention in CONTRIBUTING
(cherry picked from commit 5248a3e7db)
2023-03-27 18:18:18 +02:00
Tom Krizek c45ad643a5 Update github actions to trigger on correct branches
The naming convention for maintanence branches was changed from `vX_Y`
to `bind-X.Y`.

(cherry picked from commit ee53e3c02d)
2023-03-27 17:46:20 +02:00
Tom Krizek 49531735a6 Merge branch '3962-doc-arm-fixes-9.16' into 'bind-9.16'
[9.16] Documentation formatting fixes in ARM

See merge request isc-projects/bind9!7733
2023-03-27 15:45:59 +00:00
Tom Krizek 098c7a80a8 Add missing newline in documentation code example
(manually picked from 1849c02606)
2023-03-27 17:15:11 +02:00
Petr Špaček 277f1edf70 Merge branch 'pspacek/qmin-docs-describe-underscore-9.16' into 'bind-9.16'
[9.16] Clarify qname-minimization relaxed in the ARM

See merge request isc-projects/bind9!7731
2023-03-27 13:25:41 +00:00
Petr Špaček 4bbe035ddf Clarify qname-minimization relaxed in the ARM
Leading underscore in qname confused some users, and it was not
documented.

(cherry picked from commit 02430a7263)
2023-03-27 15:25:24 +02:00
Michal Nowak 2956e2ac1b Merge branch 'mnowak/suppress-gitlab-clean-up-output-9.16' into 'bind-9.16'
[9.16] Suppress Git clean output in GitLab CI

See merge request isc-projects/bind9!7730
2023-03-27 13:12:29 +00:00
Michal Nowak dc5f7ef446 Suppress Git clean output in GitLab CI
Git clean in GitLab CI can take up to a thousand lines, thus cluttering
the output for no good reason.

The default GitLab GIT_CLEAN_FLAGS variable is extended with "q" as in
"quiet.

(cherry picked from commit ddb33a12fc)
2023-03-27 15:07:48 +02:00
Matthijs Mekking aa286fce21 Merge branch '3925-serve-stale-system-test-failure-v9_16' into 'bind-9.16'
[9.16] Lower chance of intermittent serve-stale system test failure

See merge request isc-projects/bind9!7663
2023-03-27 08:42:40 +00:00
Matthijs Mekking 6a97848791 Update serve-stale system test
The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.

(cherry picked from commit 0bf36da305)
2023-03-27 08:21:54 +00:00
Michal Nowak 3ed03c8287 Merge branch 'mnowak/testcrypto.sh-run-in-TMPDIR-if-possible' into 'bind-9.16'
[9.16] testcrypto.sh: run in TMPDIR if possible

See merge request isc-projects/bind9!7710
2023-03-23 16:21:49 +00:00
Tom KrizekandMichal Nowak d631ecdde7 testcrypto.sh: run in TMPDIR if possible
Avoid creating any temporary files in the current workdir.

Additional/changing files in the bin/tests/system directory are
problematic for pytest/xdist collection phase, which assumes the list of
files doesn't change between the collection phase of the main pytest
thread and the subsequent collection phase of the xdist worker threads.

Since the testcrypto.sh is also called during pytest initialization
through conf.sh.common (to detect feature support), this could
occasionally cause a race condition when the list of files would be
different for the main pytest thread and the xdist worker.

(cherry picked from commit 61330a7863)
2023-03-23 17:17:59 +01:00
Michal Nowak 44f59ef6f6 Merge branch 'mnowak/ci-docs-drop-allow_failure-false' into 'bind-9.16'
Drop no-op "allow_failure: false" of the "docs" job

See merge request isc-projects/bind9!7701
2023-03-22 14:57:22 +00:00
Michal Nowak 1aee83e906 Drop no-op "allow_failure: false" of the "docs" job
"allow_failure: false" is the default for all but manual jobs, thus a
no-op in this context.
2023-03-22 15:53:33 +01:00
Tom Krizek 5fea9c8e9a Merge branch '3665-dupsigs-test-stability-9.16' into 'bind-9.16'
[9.16] Improve dupsigs test stability

See merge request isc-projects/bind9!7707
2023-03-22 13:49:30 +00:00
Tom Krizek 4d31ebf088 Lighten the CI load during the dupsigs test
Previously, an AXFR request would be issued every second while waiting
for the zone to be signed. This might've been the cause of issues in CI
where many tests are running in parallel and any extra load may increase
test instability.

Instead, check for the last NSEC record to have a signature before
commencing the AXFR request to check the zone has been fully signed.

Also increase the time for the zone signing to a total of 60+10 seconds
up from the previous 30.

(cherry picked from commit 3291c891f6)
2023-03-22 14:26:10 +01:00
Tom Krizek 3f0f2a3324 End dupsigs test early if it fails
There's no point in continuing the dupsigs test if a failure is
detected. End the test early to avoid wasting time and resources.

(cherry picked from commit ad647dca13)
2023-03-22 14:26:10 +01:00
Tom Krizek de5e04fd0d Store dupsigs axfr to a file for easier debugging
(cherry picked from commit fad2eee631)
2023-03-22 14:26:10 +01:00
Tom Krizek 42987fd2d4 Redirect dupsigs test output to proper logger
Ensure messages from dupsigs system test end up in its log rather than
stdout. Previously, the output was hard to debug when running the tests
in parallel and messages wouldn't end up in the dupsigs.log.

(cherry picked from commit cbe2559f37)
2023-03-22 14:26:08 +01:00
Tom Krizek 34acd5276b Merge branch 'tkrizek/dupsigs-fully-signed-check-9.16' into 'bind-9.16'
Fix the fully signed zone check in dupsigs test

See merge request isc-projects/bind9!7708
2023-03-22 13:24:53 +00:00
Tom Krizek 303f16e16d Fix the fully signed zone check in dupsigs test
In v9.16, the number of expected signatures for the fully signed dupsigs
zone is 1009 rather than 1008, since there is one extra DNSKEY
signature. The test itself checks for the correct number, but the
barrier which waits for the zone to be fully signed doesn't.

In practice, this had the effect of always waiting the full 30 seconds
for the zone to be signed. Afterwards, the wait barrier would fail.
However, the return code isn't handled, so the test would proceed and
succeed anyway, since 30 seconds was enough time for the zone to get
fully signed.

This issue was introduced during a backport in commit
4840d6f9c9.
2023-03-22 11:56:12 +01:00
Michal Nowak 38d72541be Merge branch 'mnowak/respdiff-drop-allow_failure-9.16' into 'bind-9.16'
[9.16] respdiff jobs do not need "allow_failure: true"

See merge request isc-projects/bind9!7700
2023-03-17 10:31:22 +00:00
Michal Nowak 8691e9729e respdiff jobs do not need "allow_failure: true"
ASAN and TSAN respdiff jobs should be stable and not require
"allow_failure: true" anymore.

(cherry picked from commit dd97ddca6f)
2023-03-17 11:18:40 +01:00
Tom Krizek 4aeda47352 Merge branch 'tkrizek/ci-artifacts-1d-9.16' into 'bind-9.16'
[9.16] Use the default retention time for CI artifacts

See merge request isc-projects/bind9!7695
2023-03-16 14:17:51 +00:00
Tom Krizek 08839485af Use the default retention time for CI artifacts
The instance-wide GitLab CI artifact retention time was changed to 1 day
up from the previous value of 12 hours. Remove our explicit overrides
for 1 day artifact retention time, as it is the default now.

Previously, most of our jobs had overrides for 1 day retention, while
some of our jobs used the default 12 hours. This discrepancy could be
quite impractical at times.

(cherry picked from commit 8fef5676fa)
2023-03-16 15:16:23 +01:00
Tom Krizek c0e4596fb2 Move gitlab-ci.yml comment to its proper place
The comment refers to "interruptible" key, rather than the entire
"default" section.

(cherry picked from commit 1139907450)
2023-03-16 15:14:51 +01:00
Tom Krizek d8c68afa8a Merge tag 'v9_16_39' into v9_16
BIND 9.16.39
2023-03-15 18:53:29 +01:00
Mark Andrews 0b35e0cc8f Merge branch '3937-zone-sign-kasp-v9_16' into 'v9_16'
[9.16] Resolve "NSEC records aren't signed with both configured algorithms during NSEC3->NSEC transition"

See merge request isc-projects/bind9!7686
2023-03-14 22:30:55 +00:00
Mark Andrews 0c8eec4963 Add CHANGES for [GL #3937]
(cherry picked from commit aafcb8611c)
2023-03-15 00:30:56 +11:00
Mark Andrews 772cdf453d When signing with a new algorithm preserve NSEC/NSEC3 chains
If the zone already has existing NSEC/NSEC3 chains then zone_sign
needs to continue to use them.  If there are no chains then use
kasp setting otherwise generate an NSEC chain.

(cherry picked from commit 4b55201459)
2023-03-15 00:30:22 +11:00
Arаm Sаrgsyаn 589a203f23 Merge branch '3924-dnstap-test-timing-issue-v9_16' into 'v9_16'
[9.16] Resolve "missing messages in `dnstap` system test after query failure"

See merge request isc-projects/bind9!7678
2023-03-13 14:05:35 +00:00
Aram Sargsyan 299c023024 Improve dnstap system test reliability
The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.

(cherry picked from commit fa686fcea5)
2023-03-13 11:57:43 +00:00
Michal Nowak 58fd13ee5e Merge branch 'mnowak/stress-test-drop-parallel-build-v9_16' into 'v9_16'
[9.16] Drop parallel build from stress tests

See merge request isc-projects/bind9!7672
2023-03-09 17:42:50 +00:00
Michal Nowak 70f23b7dde Drop parallel build from stress tests
BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.

(cherry picked from commit 3fd7e7c81f)
2023-03-09 18:37:41 +01:00
Michal Nowak f7ec282168 Merge branch 'mnowak/stress-test-build-with-default-CFLAGS-v9_16' into 'v9_16'
[9.16] Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7666
2023-03-09 10:08:24 +00:00
Michal Nowak 75464c98dd Build BIND in stress test jobs with common CFLAGS
By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.

(cherry picked from commit d33bdd36b4)
2023-03-09 11:03:38 +01:00
Tom Krizek ef1cc42f0b Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.16.40' into 'v9_16'
Set up version and release notes for BIND 9.16.40

See merge request isc-projects/bind9!7652
2023-03-07 16:37:00 +00:00
Tom Krizek 8d988a6469 Set up release notes for BIND 9.19.40 2023-03-07 15:04:06 +01:00
Tom Krizek 9287b94f63 Update BIND version to 9.16.40-dev 2023-03-07 15:02:42 +01:00
Tom Krizek 83e26c215f Ensure correct release date is put to man pages
In the generated man pages, `@RELEASEDATE@` wasn't replaced since the
actual variable name is `RELEASE_DATE` with an underscore. This issue
was introduced in the recently merged !7518 (commit
18b7ba3ea3) which removed the pregenerated
man pages from the repo.
2023-03-06 14:03:49 +01:00
Tom Krizek 23aa8c2fc5 Merge branch 'prep-release' into v9_16_39-release 2023-03-03 15:30:25 +01:00
Tom Krizek 1bcdf21874 prep 9.16.39 2023-03-03 15:27:54 +01:00
Tom Krizek a9c0a9da76 Merge branch 'tkrizek/prepare-documentation-for-bind-9.16.39' into 'v9_16_39-release'
Prepare documentation for BIND 9.16.39

See merge request isc-private/bind9!502
2023-03-03 14:24:27 +00:00
Tom Krizek 7b5dedcc30 Add release note for GL #3673 2023-03-03 13:50:47 +01:00
Tom Krizek 80c4a89abc Tweak and reword release notes 2023-03-03 13:48:16 +01:00
Tom Krizek 96fcc6080d Prepare release notes for BIND 9.16.39 2023-03-03 13:47:17 +01:00
Tom Krizek 3f318921d4 Restore 9.16.38 release notes
The Known Issues section for 9.16.38 release notes was accidentally
removed during branch maintenance after release. Restore the contents to
its tagged released version.
2023-03-03 13:40:14 +01:00
Tom Krizek 41cea7ae70 Merge branch '3917-named-should-log-uv-version-when-starting-up-v9_16' into 'v9_16'
[9.16] Resolve "Named should log UV version when starting up"

See merge request isc-projects/bind9!7643
2023-03-03 08:57:34 +00:00
Mark AndrewsandTom Krizek c3efa7d3d9 Now logs UV versions when starting up
Named now logs both compile time and run time UV versions when
starting up.  This is useful information to have when debugging
network issues involving named.

(cherry picked from commit 5fd2cd8018)
2023-03-03 09:28:58 +01:00
Arаm Sаrgsyаn 3785aa8f87 Merge branch '3907-data-race-in-rbtdb-v9_16' into 'v9_16'
[9.16] Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion"

See merge request isc-projects/bind9!7641
2023-03-02 21:41:24 +00:00
Aram Sargsyan ddb67b01b2 Check if catz is active in dns_catz_update_from_db()
A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.

(cherry picked from commit 6980e3b354)
2023-03-02 19:42:16 +00:00
Aram Sargsyan 641627838b Use catzs->lock in dns_catz_prereconfig()
There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().

(cherry picked from commit 3973724d67)
2023-03-02 19:36:26 +00:00
Aram Sargsyan 4f6f84b63d Update the CHANGES note for [GL #3777]
Remove the part which is no longer true after reverting the commit
in question.

The CHANGES entry was never part of a released BIND 9 version.

(cherry picked from commit e1627e1289)
2023-03-02 19:20:36 +00:00
Aram Sargsyan 2a719e9df2 Revert "Process db callbacks in zone_loaddone() after zone_postload()"
This reverts commit 1254f37584.

The commit introduced a data race, because dns_db_endload() is called
after unfreezing the zone.

(not cherry picked from commit 593dea871a)
2023-03-02 19:19:55 +00:00
Arаm Sаrgsyаn 95939fd880 Merge branch '3911-reconfig-zone-view-revert-bugfix-v9_16' into 'v9_16'
[9.16] Fix view's zones reverting bug during reconfiguration

See merge request isc-projects/bind9!7635
2023-03-01 16:46:21 +00:00
Aram Sargsyan b7809d07f8 Add CHANGES and release notes for [GL #3911]
(cherry picked from commit e1036253db)
2023-03-01 15:50:58 +00:00
Aram Sargsyan 2fba282206 Fix view's zones reverting bug during reconfiguration
During reconfiguration, the configure_view() function reverts the
configured zones to the previous view in case if there is an error.

It uses the 'zones_configured' boolean variable to decide whether
it is required to revert the zones, i.e. the error happened after
all the zones were successfully configured.

The problem is that it does not account for the case when an error
happens during the configuration of one of the zones (not the first),
in which case there are zones that are already configured for the
new view (and they need to be reverted), and there are zones that
are not (starting from the failed one).

Since 'zones_configured' remains 'false', the configured zones are
not reverted.

Replace the 'zones_configured' variable with a pointer to the latest
successfully configured zone configuration element, and when reverting,
revert up to and including that zone.

(cherry picked from commit 84c235a4b0)
2023-03-01 15:50:26 +00:00
Aram Sargsyan 3ac0f6ee50 Add a catz system test check for [GL #3911]
The trick is to configure a duplicate zone, which comes after the
catalog zone, where the duplicate zone is an existing member zone.

In that scenario, all the zones which come before the "faulty" zone
in the configuration file will fail to be reverted to the previous
version of the view after a reconfiguration error, and in this
particular case that will result in an assertion failure when the
catalog zone update is initiated, because it will be still tied to
the new version of the view, which was dismissed.

(cherry picked from commit 93c4f382f4)
2023-03-01 15:49:21 +00:00
Arаm Sаrgsyаn 54e2c48f74 Merge branch '3777-fix-crash-after-failed-ixfr-from-differences-v9_16' into 'v9_16'
[9.16] Resolve "crash after failed ixfr-from-differences on a catalog zone"

See merge request isc-projects/bind9!7624
2023-02-28 16:53:56 +00:00
Aram Sargsyan 1d79b3142e Add a CHANGES note for [GL #3777]
(cherry picked from commit 46b1c558ce)
2023-02-28 14:40:17 +00:00
Aram Sargsyan fff49a2ffb catz: unregister the db update-notify callback before detaching from db
When detaching from the previous version of the database, make sure
that the update-notify callback is unregistered, otherwise there is
an INSIST check which can generate an assertion failure in free_rbtdb(),
which checks that there are no outstanding update listeners in the list.

There is a similar code already in place for RPZ.

(cherry picked from commit cf79692a66)
2023-02-28 14:40:17 +00:00
Aram Sargsyan 79ee7353ad Searching catzs->zones requires a read lock
Lock the catzs->lock mutex before searching in the catzs->zones
hash table.

(cherry picked from commit 0ef0c86632)
2023-02-28 14:40:17 +00:00
Aram Sargsyan 1254f37584 Process db callbacks in zone_loaddone() after zone_postload()
The zone_postload() function can fail and unregister the callbacks.

Call dns_db_endload() only after calling zone_postload() to make
sure that the registered update-notify callbacks are not called
when the zone loading has failed during zone_postload().

Also, don't ignore the return value of zone_postload().

(cherry picked from commit ed268b46f1)
2023-02-28 14:40:17 +00:00
Aram Sargsyan 561289909b Add a system test for [GL #3777]
Add the 'ixfr-from-differences yes;' option to trigger a failed
zone postload operation when a zone is updated but the serial
number is not updated, then issue two successive 'rndc reload'
commands to trigger the bug, which causes an assertion failure.

(cherry picked from commit a73b67456e)
2023-02-28 14:40:17 +00:00
Michal Nowak 6367abec5b Merge branch 'mnowak/make-openbsd-allow_failure-true-v9_16' into 'v9_16'
[9.16] Do not fail pipeline because of failed OpenBSD system test

See merge request isc-projects/bind9!7618
2023-02-28 10:49:17 +00:00
Michal Nowak b4307c983d Do not fail pipeline because of failed OpenBSD system test
System test on OpenBSD is unstable even when test parallelism is
disabled.

(cherry picked from commit fc26da6d89)
2023-02-28 11:41:36 +01:00
Michal Nowak 909f7b6f37 Revert "Disable OpenBSD system test parallelism in CI"
This reverts commit 208d49a28d.

(cherry picked from commit a9d3ec33b3)
2023-02-28 11:41:07 +01:00
Arаm Sаrgsyаn 7ea7493ffe Merge branch '3900-catz-error-path-issues-v9_16' into 'v9_16'
[9.16] Resolve "Error path cleanup issues in dns_catz_new_zones() and dns_catz_new_zone()"

See merge request isc-projects/bind9!7607
2023-02-27 15:15:34 +00:00
Aram Sargsyan 6857f5a729 Add a CHANGES note for [GL #3900]
(cherry picked from commit d96d8dc651)
2023-02-27 14:06:53 +00:00
Aram Sargsyan 466a05eaf0 Fix a cleanup bug when isc_task_create() fails in dns_catz_new_zones()
Use isc_mem_putanddetach() instead of isc_mem_put() to detach from the
memory context.

(cherry picked from commit 9050481d1f)
2023-02-27 13:55:05 +00:00
Arаm Sаrgsyаn 0260b9aeb9 Merge branch '3880-fix-rpz-assertion-failure-during-failed-reconfiguration-v9_16' into 'v9_16'
[9.16] Detach rpzs and catzs from the previous view

See merge request isc-projects/bind9!7565
2023-02-27 10:06:04 +00:00
Aram Sargsyan a48e5e94e1 Add a CHANGES note for [GL #3880]
(cherry picked from commit b086374b1d)
2023-02-27 08:42:34 +00:00
Aram Sargsyan 9d5544a4a5 Detach rpzs and catzs from the previous view
When switching to a new view during a reconfiguration (or reverting
to the old view), detach the 'rpzs' and 'catzs' from the previuos view.

The 'catzs' case was earlier solved slightly differently, by detaching
from the new view when reverting to the old view, but we can not solve
this the same way for 'rpzs', because now in BIND 9.19 and BIND 9.18
a dns_rpz_shutdown_rpzs() call was added in view's destroy() function
before detaching the 'rpzs', so we can not leave the 'rpzs' attached to
the previous view and let it be shut down when we intend to continue
using it with the new view.

Instead, "re-fix" the issue for the 'catzs' pointer the same way as
for 'rpzs' for consistency, and also because a similar shutdown call
is likely to be implemented for 'catzs' in the near future.

(cherry picked from commit 121a095a22)
2023-02-27 08:42:34 +00:00
Aram Sargsyan eeaa830ecd Add an "rpz" system test check for a failed reconfiguration
The faulty "DLZ" configuration triggers a reconfiguration failure
in such a place where view reverting code is covered.

(cherry picked from commit 95f4bac002)
2023-02-27 08:42:34 +00:00
Michal Nowak 7f90dc8d8d Merge branch 'mnowak/freebsd-12.4-v9_16' into 'v9_16'
[9.16] Add FreeBSD 12.4

See merge request isc-projects/bind9!7600
2023-02-24 13:30:44 +00:00
Michal Nowak e3a1945d3c Add FreeBSD 12.4
(cherry picked from commit 2307661b1a)
2023-02-24 14:11:49 +01:00
Michal Nowak 76ad247785 Merge branch 'mnowak/alpine-3.17-v9_16' into 'v9_16'
[9.16] Add Alpine Linux 3.17

See merge request isc-projects/bind9!7597
2023-02-24 13:09:53 +00:00
Michal Nowak 850f865856 Drop date from "Regularly Tested Platforms" section
Changing the date is easy to forget and may be outdated.

(cherry picked from commit 5783280b10)
2023-02-24 13:26:40 +01:00
Michal Nowak 1d3d73b997 Add Alpine Linux 3.17
(cherry picked from commit 345089ad23)
2023-02-24 13:25:15 +01:00
Michal Nowak cbae4704c5 Merge branch 'mnowak/set-TEST_PARALLEL_JOBS-to-four' into 'v9_16'
[9.16] Update the TEST_PARALLEL_JOBS value in CI

See merge request isc-projects/bind9!7594
2023-02-24 09:42:11 +00:00
Tom KrizekandMichal Nowak 6a975344a2 Update the TEST_PARALLEL_JOBS value in CI
The tests have been executed with four jobs for a long time because the
TEST_PARALLEL_JOBS variable was set to 4 in the project's CI/CD
Variables Settings. The variable was recently dropped in favor of
.gitlab-ci.yaml one and now needs to be streamlined with the rest of
BIND 9 maintained branches.

(cherry picked from commit 03d7b45d81)
2023-02-24 10:08:04 +01:00
Michal Nowak 7d4b21067f Merge branch 'mnowak/update_TEST_PARALLEL_JOBS_for_BSD-v9_16' into 'v9_16'
[9.16] Disable OpenBSD system test parallelism in CI

See merge request isc-projects/bind9!7593
2023-02-24 09:05:35 +00:00
Michal Nowak 208d49a28d Disable OpenBSD system test parallelism in CI
Make OpenBSD system tests more stable by disabling parallelism in CI.

Accordingly, they will run 3-4 times longer.

(cherry picked from commit d73eba57bd)
2023-02-24 09:58:38 +01:00
Michal Nowak 6a5459c9df Do not set TEST_PARALLEL_JOBS in FreeBSD system test
Setting TEST_PARALLEL_JOBS to 4 in FreeBSD system test jobs is a no-op
because it's already set to 4, one level above, on the global level.

(cherry picked from commit cf46addf51)
2023-02-24 09:58:38 +01:00
Ondřej Surý f3422838fc Merge branch 'ondrej-restore-sonarcloud-analysis-v9_16' into 'v9_16'
[9.16] Add SonarCloud GitHub Action

See merge request isc-projects/bind9!7592
2023-02-24 08:57:53 +00:00
Ondřej Surý 973f2ebdcc Add SonarCloud GitHub Action
Add new SonarCloud GitHub Action and configuration; something (maybe
the way the builds were submitted) has apparently changed and the
project got deleted and the analysis wasn't working.

(cherry picked from commit 4bfbb4ddf7)
2023-02-24 09:54:59 +01:00
Michal Nowak 9a3364df3a Merge branch 'mnowak/logfileconfig-fix-rndc_conf_does_not_exist' into 'v9_16'
Stop logfileconfig/ns1 server with TERM signal

See merge request isc-projects/bind9!7581
2023-02-23 16:06:08 +00:00
Michal Nowak e8918b1304 Stop logfileconfig/ns1 server with TERM signal
stop.pl tries to stop ns1 via rndc but fails to find rndc.conf because
the logfileconfig test code is unexpectedly executed from the
logfileconfig/ns1/ directory. Instead of stopping ns1 with rndc, it
waits for 30 seconds and then terminates ns1 with the TERM signal.

    I:logfileconfig:testing default logfile using named -L file (9)
    rndc: ../common/rndc.conf does not exist

Stopping ns1 with rndc was recently inadvertently introduced in
172826bfa8. Stop ns1 with the TERM signal
directly, as we did before.
2023-02-23 16:52:59 +01:00
Matthijs Mekking d026b020b8 Merge branch 'marka-fixup-named_zone_configure-v9_16' into 'v9_16'
[9.16] Fix dns_kasp_attach / dns_kasp_detach usage - Fix backport error

See merge request isc-projects/bind9!7583
2023-02-23 08:30:11 +00:00
Mark Andrews e4b5ca92ea Fix backport error in 84929d1cd7
Not all the RETERR's in named_zone_configure where converted to
CHECK's, as was the case in main, leading to a memory leak with
the early returns.
2023-02-23 18:13:58 +11:00
Tom Krizek 975895c05b Merge branch '3622-serve-stale-rrsig-test-v9_16' into 'v9_16'
[9.16][CVE-2022-3736] Test RRSIG queries with serve-stale enabled

See merge request isc-projects/bind9!7580
2023-02-22 13:31:49 +00:00
Mark AndrewsandTom Krizek f0cbe3ab1f Test RRSIG queries with serve-stale enabled
Make RRSIG queries where the existing tests trigger a DNS_EVENT_TRYSTALE
event.

(cherry picked from commit add40273df)
2023-02-22 14:01:56 +01:00
Tom Krizek 4af1b2f660 Merge branch '3619-serve-stale-client-timeout-crash-test-v9_16' into 'v9_16'
[9.16][CVE-2022-3924] Add a reproducer for the serve-stale crash when recursive clients soft quota is reached

See merge request isc-projects/bind9!7577
2023-02-22 12:27:24 +00:00
Aram SargsyanandTom Krizek d6568bea7c Add tests for CVE-2022-3924
Reproduce the assertion by configuring a 'named' resolver with
'recursive-clients 10;' configuration option and running 20
queries is parallel.

Also tweak the 'ans2/ans.pl' to simulate a 50ms network latency
when qname starts with "latency". This makes sure that queries
running in parallel don't get served immediately, thus allowing
the configured recursive clients quota limitation to be activated.

(cherry picked from commit 4b52b0b4a9)
2023-02-22 10:59:31 +01:00
Matthijs Mekking 84929d1cd7 Merge branch 'matthijs-fix-kasp-attach-detach-usage-v9_16' into 'v9_16'
[9.16] Fix dns_kasp_attach / dns_kasp_detach usage

See merge request isc-projects/bind9!7567
2023-02-22 07:26:35 +00:00
Mark AndrewsandMatthijs Mekking b49a3a56c9 Fix dns_kasp_attach / dns_kasp_detach usage
The kasp pointers in dns_zone_t should consistently be changed by
dns_kasp_attach and dns_kasp_detach so the usage is balanced.

(cherry picked from commit b41882cc75)
2023-02-21 16:58:42 +01:00
Tom Krizek e920857601 Merge branch '3874-the-7530-broke-mkeys-test-on-windows' into 'v9_16'
Resolve "The !7530 broke mkeys test on Windows"

See merge request isc-projects/bind9!7550
2023-02-20 13:32:27 +00:00
Mark Andrews 552b5152a0 Source conf.sh the v9_16 way 2023-02-19 10:59:08 +00:00
Mark Andrews 7279c3826e Merge branch '3879-hmac_createctx-fails-to-free-context-on-isc_hmac_init-failure-v9_16' into 'v9_16'
[9.16] Resolve "hmac_createctx fails to free context on isc_hmac_init failure"

See merge request isc-projects/bind9!7557
2023-02-18 00:49:48 +00:00
Mark Andrews d0c92a31a9 In hmac_createctx free ctx on isc_hmac_init failure
(cherry picked from commit d22257a370)
2023-02-18 10:27:11 +11:00
Michal Nowak 4b64ccf50e Merge branch 'mnowak/qa-tools-update-v9_16' into 'v9_16'
[9.16] Python formatting updates

See merge request isc-projects/bind9!7554
2023-02-17 17:59:14 +00:00
Michal Nowak e0158ab2b5 Adapt to Python scripts to black 23.1.0
(cherry picked from commit 3cd2cc6254)
2023-02-17 16:55:47 +01:00
Michal Nowak 596918c57a Fix unnecessary "else" after "raise" with pylint 2.16.2
bin/tests/system/get_algorithms.py:225:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)

(cherry picked from commit 8064ac6bec)
2023-02-17 16:55:24 +01:00
Michal Nowak 17b954141b Merge branch 'mnowak/enable-windows-system-tests-in-merge-requests' into 'v9_16'
Run system:msvc:windows:amd64 for merge requests

See merge request isc-projects/bind9!7543
2023-02-16 19:37:52 +00:00
Michal Nowak 7221221fd7 Run system:msvc:windows:amd64 for merge requests
Historically, we avoided running system tests on Windows for merge
request-triggered pipelines because we have only one limited GitLab
Runner, which would be unable to reliably sustain the CI load of merge
requests for three maintained branches, and instead, we opted for
running Windows system tests in daily pipelines. CI load should no
longer be an issue since "v9_16" is the only (and last) maintained
branch with Windows support. We are only left with the downside of
failing to run system tests for merge requests on Windows: missing
Windows-specific quirks in the review process and finding out about them
only a day later in the daily pipeline (e.g., #3865 and #3874 from this
week).
2023-02-16 20:30:43 +01:00
Michal Nowak fed8a373a3 Merge tag 'v9_16_38' into v9_16
BIND 9.16.38
2023-02-16 17:53:48 +01:00
Mark Andrews f9a1e293d2 Merge branch 'feature/main/fips-tests-v9_16' into 'v9_16'
[9.16] FIPS tests changes for RHEL

See merge request isc-projects/bind9!7541
2023-02-15 22:11:54 +00:00
Mark Andrews 1b5848aebe Add CHANGES note for [GL !7417]
(cherry picked from commit 55a6b15087)
2023-02-16 08:49:06 +11:00
Petr MenšíkandMark Andrews 3f81fbed12 FIPS tests changes for RHEL
Include MD5 feature detection in featuretest tool and use it in some
places. When RHEL distribution or Fedora ELN is in FIPS mode, then MD5
algorithm is unavailable completely and even hmac-md5 algorithm usage
will always fail. Work that around by checking MD5 works and if not,
skipping its usage.

Those changes were dragged as downstream patch bind-9.11-fips-tests.patch
in Fedora and RHEL.

(cherry picked from commit 6ad794a8cd)
2023-02-16 08:48:39 +11:00
Ondřej Surý 77fb1a4dc8 Merge branch '3865-failing-windows-system-tests-due-to-libuv-version-check' into 'v9_16'
Resolve "Failing windows system tests due to libuv version check"

See merge request isc-projects/bind9!7536
2023-02-15 11:28:08 +00:00
Ondřej Surý 100c20b470 Don't check for maximal version on Windows
The Windows doesn't have support for recvmmsg(), so we don't need to
check for maximal version on Windows (only for a minimal version).

Remove the MAXIMAL_VERSION when compiling on Windows.
2023-02-15 11:02:57 +01:00
Mark Andrews 5ce64ea878 Merge branch '3662-extend-mkeys-system-test-to-handle-islands-of-trust-v9_16' into 'v9_16'
[9.16] Resolve "Extend mkeys system test to handle islands of trust"

See merge request isc-projects/bind9!7530
2023-02-14 22:34:09 +00:00
Mark Andrews d0fd97f67c Add CHANGES note for [GL #3662]
(cherry picked from commit 2928f21733)
2023-02-14 22:09:52 +00:00
Mark Andrews 9109f38ece Add islands of trust to mkeys test
This adds an island of trust that is reachable from the root
where the trust anchors are added to island.conf.

This add an island of trust that is not reachable from the root
where the trust anchors are added to private.conf.

(cherry picked from commit 41bdb5b9fe)
2023-02-14 22:09:52 +00:00
Mark Andrews 4df6019c16 Report the key name that failed in retry_keyfetch
When there are multiple managed trust anchors we need to know the
name of the trust anchor that is failing.  Extend the error message
to include the trust anchor name.

(cherry picked from commit fb7b7ac495)
2023-02-14 22:09:52 +00:00
Evan Hunt 9507facb36 Merge branch '3673-delay-trust-anchor-management-v9_16' into 'v9_16'
[9.16] Merge branch '3673-delay-trust-anchor-management' into 'main'

See merge request isc-projects/bind9!7534
2023-02-14 19:07:10 +00:00
Evan Hunt aca10608b6 delay trust anchor management until zones are loaded
it was possible for a managed trust anchor needing to send a key
refresh query to be unable to do so because an authoritative zone
was not yet loaded. this has been corrected by delaying the
synchronization of managed-keys zones until after all zones are
loaded.

(cherry picked from commit bafbbd2465)
2023-02-14 10:23:28 -08:00
Tom Krizek 89ed0724e2 Merge branch '3848-increase-wait-time-runtime-test-v9_16' into 'v9_16'
[9.16] Increase named startup wait time for runtime test

See merge request isc-projects/bind9!7525
2023-02-13 16:02:45 +00:00
Tom Krizek 208777b74e Increase named startup wait time for runtime test
Occasionally, the allotted 10 seconds for the "running" line to appear
in log after named is started proved insufficient in CI, especially
during increased load. Give named up to 60 seconds to start up to
mitigate this issue.

(cherry picked from commit b8bb4233e8)
2023-02-13 16:11:04 +01:00
Michal Nowak 12e323dd2e Merge branch '3846-nsupdate-test-fix-v9_16' into 'v9_16'
[9.16] increase simultaneous updates for quota test

See merge request isc-projects/bind9!7522
2023-02-13 15:03:01 +00:00
Evan HuntandMichal Nowak 5d0a8996ce increase simultaneous updates for quota test
the nsupdate system test was intermittently failing due to the update
quota not being exceeded when it should have been.  this is most likely
a timing issue: the client is sending updates too slowly, or the server
is processing them too quickly, for the quota to fill. this commit
attempts to make that the failure less likely by increasing the number
of update transactions from 10 to 20.

(cherry picked from commit 06b1faf068)
2023-02-13 13:36:11 +01:00
Ondřej Surý dd0ce8e218 Merge branch 'pspacek/make-manin-on-dist-v9_16-fix2' into 'v9_16'
Use placeholders in pre-generated manpages in the tarball

See merge request isc-projects/bind9!7520
2023-02-10 17:46:02 +00:00
Ondřej Surý 0c7bd27598 Use placeholders in pre-generated manpages in the tarball
When pre-generating the manpages in the tarball-create CI job, we need
to use placeholders, and not the final values.
2023-02-10 18:40:34 +01:00
Ondřej Surý 3ff297e9fe Merge branch 'pspacek/make-manin-on-dist-v9_16' into 'v9_16'
[9.16] Remove pregenerated manpages from the repo

See merge request isc-projects/bind9!7518
2023-02-10 12:41:04 +00:00
Ondřej Surý 18b7ba3ea3 Test the pre-generated man pages in GitLab CI
Add an extra job for a build from tarball, but without sphinx-build and
enable RUN_MAKE_INSTALL to check that man pages were generated and
installed.

Disable the RUN_MAKE_INSTALL on the systems without sphinx-build (sid).

(cherry picked from commit 8f2e1e15cc)
2023-02-10 13:13:34 +01:00
Petr ŠpačekandOndřej Surý c07e8b4a65 Remove pregenerated manpages from the repo
We don't need them in the repo, it's sufficient if we pregenerate them
while preparing the tarball.  That way we don't have overhead while
modifying them but they are still available for installations without
Sphinx.

I assume that this will make rebases and cherry-picks across branches
easier, with less trial and error churn required in the CI.

It's implemented in the way that we build the manpages only when we
either have pregenerated pages available at the configure time or
sphinx-build is installed and working.

(cherry picked from commit 9110465194)
2023-02-10 13:02:24 +01:00
Michał Kępień 5e85e8e524 Merge branch '3840-avoid-libuv-with-broken-recvmmsg-v9_16' into 'v9_16'
[9.16] Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation

See merge request isc-projects/bind9!7483
2023-02-10 06:00:04 +00:00
Ondřej SurýandMichał Kępień 2709a3c962 Add CHANGES and release note for [GL #3840]
(cherry picked from commit 6fa48c963e)
2023-02-10 06:50:32 +01:00
Ondřej SurýandMichał Kępień b163ca9f97 Enforce version drift limits for libuv
libuv support for receiving multiple UDP messages in a single system
call (recvmmsg()) has been tweaked several times between libuv versions
1.35.0 and 1.40.0.  Mixing and matching libuv versions within that span
may lead to assertion failures and is therefore considered harmful, so
try to limit potential damage be preventing users from mixing libuv
versions with distinct sets of recvmmsg()-related flags.

(cherry picked from commit 735d09bffe)
2023-02-10 06:50:32 +01:00
Ondřej SurýandMichał Kępień 9309589ad0 Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation
The implementation of UDP recvmmsg in libuv 1.35 and 1.36 is
incomplete and could cause assertion failure under certain
circumstances.

Modify the configure and runtime checks to report a fatal error when
trying to compile or run with the affected versions.

(cherry picked from commit 251f411fc3)
2023-02-10 06:50:32 +01:00
Mark Andrews 7a6233a816 Merge branch '3852-follow-up-from-9-18-merge-branch-3790-use-configured-udp-port-into-main-v9_16' into 'v9_16'
[9.16] Allow some time to the root trust anchor to appear

See merge request isc-projects/bind9!7499
2023-02-07 22:26:57 +00:00
Mark Andrews 539f29d412 Allow some time to the root trust anchor to appear
Following deleting the root trust anchor and reconfiguring the
server it takes some time to for trust anchor to appear in 'rndc
managed-keys status' output.  Retry several times.

(cherry picked from commit 71dbd09796)
2023-02-08 00:46:41 +11:00
Michal Nowak 061d4e2f8b Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.16.39' into 'v9_16'
Set up release notes for BIND 9.16.39

See merge request isc-projects/bind9!7497
2023-02-07 11:03:42 +00:00
Michal Nowak ae79bfe94d Set up release notes for BIND 9.16.39 2023-02-07 11:28:48 +01:00
Michal Nowak 1d21a46e34 Update BIND version to 9.16.39-dev 2023-02-07 11:27:17 +01:00
Michal Nowak af0056a44e Merge branch 'prep-release' into v9_16_38-release 2023-02-03 18:17:35 +01:00
Michal Nowak 0f23774d87 prep 9.16.38 2023-02-03 18:13:37 +01:00
Michal Nowak 7fe7ed258a Merge branch 'michal/prepare-documentation-for-bind-9.16.38' into 'v9_16_38-release'
Prepare documentation for BIND 9.16.38

See merge request isc-private/bind9!497
2023-02-03 16:58:07 +00:00
Michał Kępień 0d63f06af7 Add release note for GL #3827 2023-02-03 13:21:19 +01:00
Michał Kępień 2abb185eca Tweak and reword release notes 2023-02-03 13:21:19 +01:00
Michał Kępień de9c8ff27f Prepare release notes for BIND 9.16.38 2023-02-03 13:21:19 +01:00
Michał Kępień c1e77063c0 Merge branch '3827-fix-dnsrps-builds-v9_16' into 'v9_16'
[9.16] Fix DNSRPS builds

See merge request isc-projects/bind9!7475
2023-02-01 11:47:27 +00:00
Michał Kępień f933650204 Add CHANGES entry for GL #3827
(cherry picked from commit 493eadd1ae)
2023-02-01 12:07:11 +01:00
Michał Kępień f7dc0a4708 Handle iterator options in rpsdb_allrdatasets()
Commit 4f3327cd41 added a new parameter,
'options', to the prototype of the 'allrdatasets' function pointer in
struct dns_dbmethods.  Handle this new parameter accordingly in
rpsdb_allrdatasets().

(cherry picked from commit f3def4e4ed)
2023-02-01 12:07:11 +01:00
Michał Kępień 29d90a95eb Add DNSRPS builds to pairwise testing
The --enable-dnsrps-dl switch for ./configure enables preparing a
DNSRPS-enabled build of BIND 9 that is not directly linked against a
DNSRPS provider library (dlopen() at runtime is used instead).  Employ
this switch to test DNSRPS-enabled builds in the pairwise testing job in
GitLab CI.

(cherry picked from commit e688ca5316)
2023-02-01 12:07:11 +01:00
Mark Andrews 4ad04b48fb Merge branch '3830-nsupdate-failed-to-handle-primary-server-address-lookup-gracefully-v9_16' into 'v9_16'
[9.16] Handle address lookup failure more gracefully

See merge request isc-projects/bind9!7459
2023-01-31 14:31:05 +00:00
Mark Andrews 1062188cd0 Add CHANGES for [GL #3830]
(cherry picked from commit fda7858e74)
2023-02-01 00:41:10 +11:00
Mark Andrews d53828b749 Handle address lookup failure more gracefully
If the address lookup of the primary server fails just abort
the current update request rather than calling exit.  This allows
nsupdate to cleanup gracefully.

(cherry picked from commit f1387514c6)
2023-02-01 00:41:09 +11:00
Mark Andrews cafc135019 Merge branch '3829-named-v-leaks-memory-when-shutting-down-v9_16' into 'v9_16'
[9.16] Call dns_lib_destroy in bin/named/main.c:printversion

See merge request isc-projects/bind9!7455
2023-01-30 23:37:56 +00:00
Mark Andrews e226b4c826 Add CHANGES for [GL #3829]
(cherry picked from commit 1d258e2fb8)
2023-01-31 10:06:15 +11:00
Mark Andrews 09fce29a9a Call dns_lib_destroy in bin/named/main.c:printversion
There were unbalanced calls to dns_lib_init and dns_lib_destroy
leading to an OpenSSL memory leak.

(cherry picked from commit 8b3c018f54)
2023-01-31 10:06:15 +11:00
Mark Andrews d76b1ad5ed Merge branch '3824-teach-danger-about-amend-v9_16' into 'v9_16'
[9.16] Teach danger about amend

See merge request isc-projects/bind9!7440
2023-01-27 22:57:27 +00:00
Mark Andrews 66da661eff Teach danger about amend
commit --fixup=amend:<hash> produces a subject starting with amend!
by default.  Have danger look for this to ensure that it is squashed
before merging.

(cherry picked from commit 9b12473292)
2023-01-28 09:18:32 +11:00
Matthijs Mekking 1feb8d4d7a Merge branch '3822-rndc-dnssec-checkds-force-ds-state-v9_16' into 'v9_16'
[9.16] Force set DS state after 'rndc dnssec -checkds'

See merge request isc-projects/bind9!7438
2023-01-27 15:43:55 +00:00
Matthijs Mekking fd5ef80b1c Add CHANGES for #3822
(cherry picked from commit 38ffe5acf3)
2023-01-27 16:09:35 +01:00
Matthijs Mekking 3ffb63e9bb Force set DS state after 'rndc dnssec -checkds'
Set the DS state after issuing 'rndc dnssec -checkds'. If the DS
was published, it should go in RUMOURED state, regardless whether it
is already safe to do so according to the state machine.

Leaving it in HIDDEN (or if it was magically already in OMNIPRESENT or
UNRETENTIVE) would allow for easy shoot in the foot situations.

Similar, if the DS was withdrawn, the state should be set to
UNRETENTIVE. Leaving it in OMNIPRESENT (or RUMOURED/HIDDEN)
would also allow for easy shoot in the foot situations.

(cherry picked from commit ee42f66fbe)
2023-01-27 16:09:06 +01:00
Tom Krizek e2eca8a8a9 Merge branch 'tkrizek/danger-improvements-v9_16' into 'v9_16'
[9.16] danger: refine existing rules

See merge request isc-projects/bind9!7436
2023-01-27 14:09:33 +00:00
Tom Krizek 1ee31187db danger: relax rules for single-line commits
The following are not also accepted as single-line commits without
generating warnings:
- CHANGES/release note may appear in the beginning of the commit message
- Release note may be capitalized
- Allow commits with "GL #" (e.g. Update documentation for [GL #XXXX])

(cherry picked from commit 79ae467973)
2023-01-27 14:50:14 +01:00
Tom Krizek 1bc4186e39 danger: update CHANGES rule to work with -S edition
When updating the -S edition, the CHANGES.SE file is modified. Make sure
danger accepts that.

(cherry picked from commit 1939e585c0)
2023-01-27 14:50:08 +01:00
Michał Kępień f469580296 Merge branch 'michal/extend-artifact-lifetime-for-release-related-jobs-v9_16' into 'v9_16'
[9.16] Extend artifact lifetime for release-related jobs

See merge request isc-projects/bind9!7434
2023-01-27 12:33:38 +00:00
Michał Kępień fc0f691c5b Extend artifact lifetime for release-related jobs
Artifacts of the "stress" jobs in GitLab CI are used for generating the
QA summary for a given set of releases.  It happened in the past that
these artifacts were purged before the QA summary was prepared,
unnecessarily prolonging the release process.  A complete set of
artifacts from all such jobs for a single pipeline should be less than 1
GB in size, so extend their lifetime from one day to one week as a more
reasonable compromise between availability and disk space usage.  (Note:
these jobs are also run in scheduled pipelines, but that is expected to
be acceptable in the context of artifact lifetime.)

Artifacts of the "release" jobs in GitLab CI are what we eventually
publish on the FTP server.  It happened in the past that these artifacts
were purged before we copied them to their destination, unnecessarily
prolonging the release process, even though we usually press the "Keep"
button for the "release" jobs manually to keep them around indefinitely
(as they are the source of what we publish in other places).  Since
there is only one "release" job per tag pipeline and its artifacts only
take up tens of megabytes of space, keep the artifacts of the "release"
jobs around indefinitely by default.

(cherry picked from commit 71c9d69145)
2023-01-27 13:30:46 +01:00
Michał Kępień 7b0e57095a Merge tag 'v9_16_37' into v9_16
BIND 9.16.37
2023-01-25 21:34:55 +01:00
Mark Andrews 1c80708561 Merge branch '3799-tsan-race-between-dns_rbtnode_t-bitfields-v9_16' into 'v9_16'
[9.16] Add missing node lock when setting node->wild in rbtdb.c

See merge request isc-projects/bind9!7415
2023-01-19 14:13:13 +00:00
Mark Andrews 89f287b538 Add CHANGES for [GL #3799]
(cherry picked from commit 5c471c5d2c)
2023-01-20 00:38:43 +11:00
Mark Andrews b548ee5815 Add missing node lock when setting node->wild in rbtdb.c
The write node lock needs to be held when setting node->wild in
add_wildcard_magic except when being called from loading_addrdataset
which is used to load the zone without locking during its initial
load.

(cherry picked from commit 81c24b8da2)
2023-01-20 00:38:43 +11:00
Ondřej Surý 6c62088347 Merge branch '3252-repair-isc_task_purgeevent-v9_16' into 'v9_16'
[9.16] Keep the list of scheduled events on the timer

See merge request isc-projects/bind9!7400
2023-01-19 10:28:38 +00:00
Ondřej Surý e5017090d7 Add CHANGES note for [GL #3252]
(cherry picked from commit a7cd0868a2)
2023-01-19 11:28:10 +01:00
Mark AndrewsandOndřej Surý 363b40b1da Unlink the timer event before trying to purge it
as far as I can determine the order of operations is not important.

    *** CID 351372:  Concurrent data access violations  (ATOMICITY)
    /lib/isc/timer.c: 227 in timer_purge()
    221     		LOCK(&timer->lock);
    222     		if (!purged) {
    223     			/*
    224     			 * The event has already been executed, but not
    225     			 * yet destroyed.
    226     			 */
    >>>     CID 351372:  Concurrent data access violations  (ATOMICITY)
    >>>     Using an unreliable value of "event" inside the second locked section. If the data that "event" depends on was changed by another thread, this use might be incorrect.
    227     			timerevent_unlink(timer, event);
    228     		}
    229     	}
    230     }
    231
    232     void

(cherry picked from commit 98718b3b4b)
2023-01-19 11:28:10 +01:00
Ondřej Surý e241a3f4db Don't use reference counting in isc_timer unit
The reference counting and isc_timer_attach()/isc_timer_detach()
semantic are actually misleading because it cannot be used under normal
conditions.  The usual conditions under which is timer used uses the
object where timer is used as argument to the "timer" itself.  This
means that when the caller is using `isc_timer_detach()` it needs the
timer to stop and the isc_timer_detach() does that only if this would be
the last reference.  Unfortunately, this also means that if the timer is
attached elsewhere and the timer is fired it will most likely be
use-after-free, because the object used in the timer no longer exists.

Remove the reference counting from the isc_timer unit, remove
isc_timer_attach() function and rename isc_timer_detach() to
isc_timer_destroy() to better reflect how the API needs to be used.

The only caveat is that the already executed event must be destroyed
before the isc_timer_destroy() is called because the timer is no longet
attached to .ev_destroy_arg.

(cherry picked from commit ae01ec2823)
2023-01-19 11:28:10 +01:00
Ondřej Surý 3cf7055286 Set quantum to infinity for the zone loading task
When we are loading the zones, set the quantum to UINT_MAX, which makes
task_run process all tasks at once.  After the zone loading is finished
the quantum will be dropped to 1 to not block server when we are loading
new zones after reconfiguration.

(cherry picked from commit 87c4c24cde)
2023-01-19 11:28:10 +01:00
Ondřej Surý 7fef8e77d6 Add isc_task_setquantum() and use it for post-init zone loading
Add isc_task_setquantum() function that modifies quantum for the future
isc_task_run() invocations.

NOTE: The current isc_task_run() caches the task->quantum into a local
variable and therefore the current event loop is not affected by any
quantum change.

(cherry picked from commit 15ea6f002f)
2023-01-19 11:28:10 +01:00
Ondřej Surý 617186d514 Keep the list of scheduled events on the timer
Instead of searching for the events to purge, keep the list of scheduled
events on the timer list and purge the events that we have scheduled.

(cherry picked from commit 3f8024b4a2f12fcd28a9dd813b6f1f3f11d506f2)
2023-01-19 11:28:10 +01:00
Ondřej Surý 76859344fe Repair isc_task_purgeevent()
The isc_task_purgerange() was walking through all events on the task to
find a matching task.  Instead use the ISC_LINK_LINKED to find whether
the event is active.

(cherry picked from commit 17aed2f895)
2023-01-19 11:28:10 +01:00
Ondřej Surý 6efd8d5faf Merge branch '3801-reduce-memory-bloat-caused-by-delayed-view-detach-lock-order-inversion-v9_16' into 'v9_16'
[9.16] Detach the zone views outside of the zone lock

See merge request isc-projects/bind9!7409
2023-01-19 10:15:40 +00:00
Ondřej Surý 4b222f154b Detach the zone views outside of the zone lock
Detaching the views in the zone_shutdown() could lead to
lock-order-inversion between adb->namelocks[bucket], adb->lock,
view->lock and zone->lock.  Detach the views outside of the section that
zone-locked.

(cherry picked from commit 978a0ef84c)
2023-01-19 10:21:27 +01:00
Ondřej Surý 93082bd010 Merge branch 'ondrej/replace-lgtm-with-codeql-add-python-ply-v9_16' into 'v9_16'
[9.16] Add python3-ply for ./configure to succeed on BIND 9.16 branch

See merge request isc-projects/bind9!7407
2023-01-19 09:17:40 +00:00
Ondřej Surý 60d43925b3 Add python3-ply to GitHub CodeQL configuration
BIND 9.16 needs Python and PLY packages for configure to succeed.
Unless we want to tweak the build script to exclude python, we need to
add python3-ply package to the CodeQL configuration.

(cherry picked from commit 0622d11366)
2023-01-19 10:12:12 +01:00
Ondřej Surý c6bb1c93a2 Merge branch 'ondrej/replace-lgtm-with-codeql-v9_16' into 'v9_16'
[9.16] Add CodeQL GitHub Action

See merge request isc-projects/bind9!7404
2023-01-19 08:46:54 +00:00
Ondřej Surý dfe2f2120a Add CodeQL GitHub Action
Replace the decommissioned LGTM service with CodeQL GitHub action.

(cherry picked from commit 77abe612a1)
2023-01-19 08:46:50 +00:00
Ondřej Surý ef27382794 Merge branch '3795-speed-up-EVP_DigestInit_ex-v9_16' into 'v9_16'
[9.16] Avoid implicit algorithm fetch for OpenSSL EVP_MD family

See merge request isc-projects/bind9!7399
2023-01-19 08:33:40 +00:00
Ondřej Surý 74b74dacd2 Add CHANGES and release note for [GL #3795]
(cherry picked from commit 401294cf60)
2023-01-18 23:26:40 +01:00
Ondřej Surý 49af3a23b9 Use OpenSSL 1.x SHA_CTX API in isc_iterated_hash()
Instead of going through another layer, use OpenSSL SHA1 API directly
in the isc_iterated_hash() implementation.

(cherry picked from commit 25db8d0103)
2023-01-18 23:26:40 +01:00
Ondřej Surý abb367615c Merge branch '3801-reduce-memory-bloat-caused-by-delayed-view-detach-v9_16' into 'v9_16'
[9.16] Detach the views in zone_shutdown(), not in zone_free()

See merge request isc-projects/bind9!7389
2023-01-17 22:23:09 +00:00
Ondřej Surý 1177891f9c Add CHANGES and release note for [GL #3801]
(cherry picked from commit b049e329ef)
2023-01-17 22:49:14 +01:00
Ondřej Surý 235ce6c888 Commit the change of view for view->managed_keys
When we change the view in the view->managed_keys, we never commit the
change, keeping the previous view possibly attached forever.

Call the dns_zone_setviewcommit() immediately after changing the view as
we are detaching the previous view anyway and there's no way to recover
from that.

(cherry picked from commit 7e8b53720d)
2023-01-17 22:48:37 +01:00
Ondřej Surý cb083876c1 Detach the views in zone_shutdown(), not in zone_free()
The .view (and possibly .prev_view) would be kept attached to the
removed zone until the zone is fully removed from the memory in
zone_free().  If this process is delayed because server is busy
something else like doing constant `rndc reconfig`, it could take
seconds to detach the view, possibly keeping multiple dead views in the
memory.  This could quickly lead to a massive memory bloat.

Release the views early in the zone_shutdown() call, and don't wait
until the zone is freed.

(cherry picked from commit 13bb821280)
2023-01-17 22:48:37 +01:00
Tom Krizek 55545b8377 Merge branch '3804-fix-feature-detection-in-pytests-v9_16' into 'v9_16'
[9.16] Fix feature detection for pytest markers in tests

See merge request isc-projects/bind9!7384
2023-01-17 14:14:49 +00:00
Tom Krizek 7139e297b2 Fix feature detection for pytest markers in tests
The condition was accidentally reversed during refactoring in
9730ac4c56 . It would result in skipped
tests on builds with proper support and false negatives on builds
without proper feature support.

Credit for reporting the issue and the fix goes to Stanislav Levin.

(cherry picked from commit 473cb530f4)
2023-01-17 14:49:38 +01:00
Ondřej Surý ff48b58a1d Merge branch 'cherry-pick-d7bcdf8b-2' into 'v9_16'
[9.16] Merge branch 'feature/main/zt-rwlock.h' into 'main'

See merge request isc-projects/bind9!7378
2023-01-16 11:10:11 +00:00
Ondřej Surý 606fc6d4aa Merge branch 'feature/main/zt-rwlock.h' into 'main'
Include isc_rwlocktype_t type definition in zt.h

See merge request isc-projects/bind9!7376

(cherry picked from commit d7bcdf8bd6)

395d6fca Include isc_rwlocktype_t type definition in zt.h
2023-01-16 11:08:43 +00:00
Michał Kępień 4a30ced1cb Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.38' into 'v9_16'
Set up version and release notes for BIND 9.16.38

See merge request isc-projects/bind9!7364
2023-01-13 14:47:09 +00:00
Michał Kępień 7db230d6bf Set up release notes for BIND 9.16.38 2023-01-13 15:41:30 +01:00
Michał Kępień 265dbeb3f2 Update BIND version to 9.16.38-dev 2023-01-13 15:41:30 +01:00
Michał Kępień 2b2afb28ab Merge branch 'prep-release' into security-v9_16 2023-01-12 23:45:02 +01:00
Michał Kępień de338feb9b prep 9.16.37 2023-01-12 23:44:53 +01:00
Michał Kępień 5aca4eb3c4 Merge branch 'michal/prepare-documentation-for-bind-9.16.37' into 'security-v9_16'
Prepare documentation for BIND 9.16.37

See merge request isc-private/bind9!494
2023-01-12 22:43:27 +00:00
Michał Kępień 0fc6b76870 Add release note for GL #3744 2023-01-12 22:34:32 +01:00
Michał Kępień d048f6d5f0 Add release note for GL #3678 2023-01-12 22:34:32 +01:00
Michał Kępień 28c04575f1 Tweak and reword release notes 2023-01-12 22:34:32 +01:00
Michał Kępień f76d95cdbb Prepare release notes for BIND 9.16.37 2023-01-12 22:34:32 +01:00
Michał Kępień 7ce861864d Fix a typo in the DNSSEC Guide 2023-01-12 22:34:32 +01:00
Michał Kępień b4a65aaea1 Merge branch '3619-security-serve-stale-client-timeout-crash-v9_16' into 'security-v9_16'
[9.16] [CVE-2022-3924] Fix the serve-stale crash when recursive clients soft quota is reached

See merge request isc-private/bind9!479
2023-01-12 12:05:11 +00:00
Aram SargsyanandMichał Kępień 8a05a6d1d7 Add CHANGES and release notes for [GL #3619]
(cherry picked from commit d08a478b42)
2023-01-12 13:00:03 +01:00
Aram SargsyanandMichał Kępień 6bebcedb80 Cancel all fetch events in dns_resolver_cancelfetch()
Although 'dns_fetch_t' fetch can have two associated events, one for
each of 'DNS_EVENT_FETCHDONE' and 'DNS_EVENT_TRYSTALE' types, the
dns_resolver_cancelfetch() function is designed in a way that it
expects only one existing event, which it must cancel, and when it
happens so that 'stale-answer-client-timeout' is enabled and there
are two events, only one of them is canceled, and it results in an
assertion in dns_resolver_destroyfetch(), when it finds a dangling
event.

Change the logic of dns_resolver_cancelfetch() function so that it
cancels both the events (if they exist), and in the right order.

(cherry picked from commit ec2098ca35)
2023-01-12 13:00:03 +01:00
Michał Kępień ea79385990 Merge branch '3622-serve-stale-rrsig-fix-security-v9_16' into 'security-v9_16'
[9.16] [CVE-2022-3736] Properly handle stale RRSIG lookups

See merge request isc-private/bind9!486
2023-01-12 11:39:34 +00:00
Mark AndrewsandMichał Kępień 8309e2656c Add release note for [GL #3622]
(cherry picked from commit 42c42be9a9)
2023-01-12 12:33:28 +01:00
Mark AndrewsandMichał Kępień fbbc91bb77 Add CHANGES note for [GL #3622]
(cherry picked from commit 8ca018b5ec)
2023-01-12 12:33:28 +01:00
Mark AndrewsandMichał Kępień 3cd0c32b0a Move the mapping of SIG and RRSIG to ANY
dns_db_findext() asserts if RRSIG is passed to it and
query_lookup_stale() failed to map RRSIG to ANY to prevent this.  To
avoid cases like this in the future, move the mapping of SIG and RRSIG
to ANY for qctx->type to qctx_init().

(cherry picked from commit 56eae06418)
2023-01-12 12:33:28 +01:00
Michał Kępień 82185f4f80 Merge branch '3523-confidential-update-quota-v9_16' into 'security-v9_16'
[9.16] [CVE-2022-3094] apply quotas to updates

See merge request isc-private/bind9!491
2023-01-12 11:22:23 +00:00
Evan HuntandMichał Kępień 9fed0e0115 CHANGES and release notes for [GL #3523]
(cherry picked from commit 991de0aa76)
2023-01-12 12:21:36 +01:00
Evan HuntandMichał Kępień 8c78511e9a test failure conditions
verify that updates are refused when the client is disallowed by
allow-query, and update forwarding is refused when the client is
is disallowed by update-forwarding.

verify that "too many DNS UPDATEs" appears in the log file when too
many simultaneous updates are processing.

(cherry picked from commit b91339b80e)
2023-01-12 12:21:36 +01:00
Evan HuntandMichał Kępień eb98d96481 move update ACL and update-policy checks before quota
check allow-update, update-policy, and allow-update-forwarding before
consuming quota slots, so that unauthorized clients can't fill the
quota.

(this moves the access check before the prerequisite check, which
violates the precise wording of RFC 2136. however, RFC co-author Paul
Vixie has stated that the RFC is mistaken on this point; it should have
said that access checking must happen *no later than* the completion of
prerequisite checks, not that it must happen exactly then.)

(cherry picked from commit 964f559edb)
2023-01-12 12:21:36 +01:00
Evan HuntandMichał Kępień 7fe2204a2e add a configuration option for the update quota
add an "update-quota" option to configure the update quota.

(cherry picked from commit f57758a730)
2023-01-12 12:21:36 +01:00
Evan HuntandMichał Kępień 35711a29e5 add an update quota
limit the number of simultaneous DNS UPDATE events that can be
processed by adding a quota for update and update forwarding.
this quota currently, arbitrarily, defaults to 100.

also add a statistics counter to record when the update quota
has been exceeded.

(cherry picked from commit 7c47254a14)
2023-01-12 12:21:36 +01:00
Ondřej Surý afc49c62e0 Merge branch '3744-catz-small-update-to-large-catz-causes-cpu-spike' into 'v9_16'
[9.16] Increase catalog zone entries hash table's bits size

See merge request isc-projects/bind9!7357
2023-01-11 18:06:11 +00:00
Aram Sargsyan 60dece8277 Increase catalog zone entries hash table's bits size
The hash table implementation in the current branch does not
support automatic resize operation, so the initial value of
the table should be chosen carefully.

Catalog zones entries hash table's size is currently only 4 bits,
which is very low for a catalog zone with thousands of entries,
and causes CPU consumption spikes when working with the hash
table to add/delete/search entries.

Use 16 bits instead, which should make working with big catalog
zones much faster at the expense of slightly higher memory usage,
i.e. 512 KiB for a 64-bit system for each catalog zone.
2023-01-11 17:26:26 +00:00
Arаm Sаrgsyаn 5823dacba8 Merge branch 'aram/dns_fwdtable_addfwd-cleanup-bugfix-v9_16' into 'v9_16'
[9.16] Fix dns_fwdtable_addfwd() error path cleanup bug

See merge request isc-projects/bind9!7353
2023-01-11 14:15:20 +00:00
Aram Sargsyan 144135415b Use sizeof(*ptr) for allocating/freeing memory in forward.c
As shown in the previous commit, using sizeof(type_t) is a little
bit more error-prone when copy-pasting code, so extracting the
size information from the pointer which is being dealt with seems
like a better alternative.

(cherry picked from commit cf4003fa58)
2023-01-11 13:42:00 +00:00
Aram Sargsyan 1950629ffa Fix dns_fwdtable_addfwd() error path cleanup bug
Free 'sizeof(dns_forwarder_t)' bytes of memory instead of
'sizeof(dns_sockaddr_t)' bytes, because `fwd` is a pointer
to a 'dns_forwarder_t' type structure.

(cherry picked from commit 0cc1b06d98)
2023-01-11 13:42:00 +00:00
Arаm Sаrgsyаn 56281e968d Merge branch '3768-dns_zonemgr-use-after-free-v9_16' into 'v9_16'
[9.16] Fix a use-after-free bug in dns_zonemgr_releasezone()

See merge request isc-projects/bind9!7352
2023-01-11 13:01:40 +00:00
Aram Sargsyan 1cab382d17 Add a CHANGES note for [GL #3768]
(cherry picked from commit d50cb1d45d)
2023-01-11 12:17:38 +00:00
Aram Sargsyan 272afcd999 Fix a use-after-free bug in dns_zonemgr_releasezone()
The dns_zonemgr_releasezone() function makes a decision to destroy
'zmgr' (based on its references count, after decreasing it) inside
a lock, and then destroys the object outside of the lock.

This causes a race with dns_zonemgr_detach(), which could destroy
the object in the meantime.

Change dns_zonemgr_releasezone() to detach from 'zmgr' and destroy
the object (if needed) using dns_zonemgr_detach(), outside of the
lock.

(cherry picked from commit c1fc212253)
2023-01-11 12:17:27 +00:00
Evan Hunt f57d21c01a Merge branch '3773-remove-dscp-v9_16' into 'v9_16'
[9.16] deprecate dscp configuration

See merge request isc-projects/bind9!7337
2023-01-10 19:46:39 +00:00
Evan Hunt 288e7332ed CHANGES and release note for [GL #3773] 2023-01-10 11:16:18 -08:00
Matthijs MekkingandEvan Hunt 0656395f25 Test deprecate dscp configuration
Add 'dscp' token and 'option' to deprecated.conf. It should trigger warnings
(except when deprecation warnings are being ignored).
2023-01-10 11:16:18 -08:00
Evan Hunt 0b40df8f8a deprecate dscp configuration
This commit deprecates the "dscp" configuration option and "dscp"
parameters to source-address configuration options (query-source,
transfer-source, etc.

(Note that the DSCP feature has not been fully operational since
the network manager was introduced in 9.16.0; outgoing DSCP values
can be configured, but incoming DSCP values are not detected.)
2023-01-10 11:16:18 -08:00
Michal Nowak e929b3b54a Merge branch 'mnowak/abort-on-ubsan-errors-v9_16' into 'v9_16'
[9.16] Abort on UBSAN errors

See merge request isc-projects/bind9!7328
2023-01-10 10:23:28 +00:00
Michal Nowak b276e76130 Abort on UBSAN errors
Previously, UBSAN errors might slip undetected.

(cherry picked from commit 1451bb7390)
2023-01-10 10:17:37 +01:00
Mark Andrews 7c51096f8b Merge branch '3787-siphash-c-105-26-runtime-error-applying-zero-offset-to-null-pointer-v9_16' into 'v9_16'
[9.16] Accept 'in=NULL' with 'inlen=0' in isc_{half}siphash24

See merge request isc-projects/bind9!7342

Backport of MR !7339
2023-01-10 08:18:01 +00:00
Mark Andrews f1c08fe93b Accept 'in=NULL' with 'inlen=0' in isc_{half}siphash24
Arthimetic on NULL pointers is undefined.  Avoid arithmetic operations
when 'in' is NULL and require 'in' to be non-NULL if 'inlen' is not zero.

(cherry picked from commit 349c23dbb7)
2023-01-10 18:36:27 +11:00
Mark Andrews cc11456017 Merge branch '3788-rbt-c-187-19-runtime-error-applying-zero-offset-to-null-pointer' into 'v9_16'
Resolve "rbt.c:187:19: runtime error: applying zero offset to null pointer"

See merge request isc-projects/bind9!7340
2023-01-10 07:19:39 +00:00
Mark Andrews 2a9300a3bc Don't perform arithmetic on NULL pointers
When node is NULL when calling getparent() et al. they return NULL
but performing arithmetic on the NULL pointer is undefined.  Check
if 'node' or 'header' is NULL and skip the adjustment.
2023-01-10 17:45:51 +11:00
Matthijs Mekking 802f700d5a Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'
[9.16] Add serve-stale CNAME check with stale-answer-client-timeout off

See merge request isc-projects/bind9!7311
2023-01-09 13:31:24 +00:00
Michał KępieńandMatthijs Mekking ba1306bfb4 Check for NULL before dereferencing qctx->rpz_st
Commit 9ffb4a7ba1 causes Clang Static
Analyzer to flag a potential NULL dereference in query_nxdomain():

    query.c:9394:26: warning: Dereference of null pointer [core.NullDereference]
            if (!qctx->nxrewrite || qctx->rpz_st->m.rpz->addsoa) {
                                    ^~~~~~~~~~~~~~~~~~~
    1 warning generated.

The warning above is for qctx->rpz_st potentially being a NULL pointer
when query_nxdomain() is called from query_resume().  This is a false
positive because none of the database lookup result codes currently
causing query_nxdomain() to be called (DNS_R_EMPTYWILD, DNS_R_NXDOMAIN)
can be returned by a database lookup following a recursive resolution
attempt.  Add a NULL check nevertheless in order to future-proof the
code and silence Clang Static Analyzer.

(cherry picked from commit 07592d1315)
(cherry picked from commit a4547a1093)
2023-01-09 13:57:44 +01:00
Aram SargsyanandMatthijs Mekking 36a439b91e Add a CHANGES note for [GL #3678]
(cherry picked from commit 40dee61a1e)
2023-01-09 13:57:44 +01:00
Matthijs Mekking 2696267b1f Consider non-stale data when in serve-stale mode
With 'stale-answer-enable yes;' and 'stale-answer-client-timeout off;',
consider the following situation:

A CNAME record and its target record are in the cache, then the CNAME
record expires, but the target record is still valid.

When a new query for the CNAME record arrives, and the query fails,
the stale record is used, and then the query "restarts" to follow
the CNAME target. The problem is that the query's multiple stale
options (like DNS_DBFIND_STALEOK) are not reset, so 'query_lookup()'
treats the restarted query as a lookup following a failed lookup,
and returns a SERVFAIL answer when there is no stale data found in the
cache, even if there is valid non-stale data there available.

With this change, query_lookup() now considers non-stale data in the
cache in the first place, and returns it if it is available.

(cherry picked from commit 91a1a8efc5)
2023-01-09 13:57:43 +01:00
Aram SargsyanandMatthijs Mekking 869abb768b Add serve-stale CNAME check with stale-answer-client-timeout off
Prime the cache with the following records:

    shortttl.cname.example.	1	IN	CNAME	longttl.target.example.
    longttl.target.example.	600	IN	A	10.53.0.2

Wait for the CNAME record to expire, disable the authoritative server,
and query 'shortttl.cname.example' again, expecting a stale answer.

(cherry picked from commit 537187bf2f)
2023-01-09 13:57:43 +01:00
Tony Finch d14a22b3d9 Merge branch '3745-delzone-catz-v9_16' into 'v9_16'
[9.16] Don't crash when rndc delzone encounters a catz member

See merge request isc-projects/bind9!7298
2023-01-04 19:32:40 +00:00
Tony FinchandTony Finch 01788b8852 Don't crash when rndc delzone encounters a catz member
Try to remove the zone from the NZF config only if it was
dynamically added but not by a catalog zone.

(cherry picked from commit 9fa20d6f6c)
2023-01-04 18:04:53 +00:00
Michał Kępień e255032a67 Merge branch 'michal/update-copyright-year-to-2023-v9_16' into 'v9_16'
[9.16] Update copyright year to 2023

See merge request isc-projects/bind9!7284
2023-01-02 13:30:04 +00:00
Michał Kępień f7bd3bd2b6 Update copyright year to 2023
(cherry picked from commit 1a5d707f52)
2023-01-02 14:24:23 +01:00
Tom Krizek 9d18a5b496 Merge branch 'tkrizek/default-alg-9.16-fixes' into 'v9_16'
[9.16] Skip test algorithm randomization in certain cases

See merge request isc-projects/bind9!7268
2022-12-23 12:07:38 +00:00
Tom Krizek 28b6171424 Don't check algorithm support during configure step
The 9.16 version of ./configure calls bin/tests/system/cleanall.sh
unless --without-make-clean is used. The cleanall.sh script then
includes bin/tests/system/conf.sh, which includes
bin/tests/system/conf.sh.common. At that point, dnssec-keygen which is
used to detect algorithm support isn't compiled, so it can't be used.

More importantly, algorithm selection for system tests during the
./configure phase is irrelevant, so it can be safely skipped.
2022-12-23 12:37:48 +01:00
Tom Krizek 6950dfe003 Disable test algorithm randomization if Python is missing
This change is motivated by the fact that our Windows CI image doesn't
have a Python interpreter.
2022-12-23 12:37:46 +01:00
Tom Krizek 9e895462d1 Merge branch 'tkrizek/dangerfile-backport-tweaks-v9_16' into 'v9_16'
[9.16] danger CI: tweak backport check and add Affects label check

See merge request isc-projects/bind9!7271
2022-12-23 08:58:39 +00:00
Tom Krizek 122c3f00e9 danger: check the Affects labels are set
Unless the MR is a backport, the Affects labels should be used to
indicate which versions are affected by the issue that prompted the MR.

(cherry picked from commit 64d71a1f5f)
2022-12-23 09:53:34 +01:00
Tom Krizek 413e94f2ca danger: check version in MR title
Enforce the version indicator to be at the start of the MR title.

(cherry picked from commit d1172e011c)
2022-12-23 09:53:31 +01:00
Tom Krizek fe08c7aa81 Merge branch 'tkrizek/default-alg-fixups-v9_16' into 'v9_16'
[9.16] Fix minor issues with DEFAULT_ALGORITHM selection in system tests

See merge request isc-projects/bind9!7267
2022-12-22 15:20:38 +00:00
Tom Krizek 527c69e2c9 Make Perl interpreter required for system tests
This change has no practical impact, as Perl was already required for
all system tests, this check only makes it more explicit.

(cherry picked from commit 084d72d1d5)

conf.sh.win32 was modified in addition of the mentioned commit.
2022-12-22 15:54:19 +01:00
Tom Krizek 2b93b47c32 Ensure test interpreters are defined before common config
Nothing from conf.sh.common is required to set these values. On the
contrary, a Python interpreter needs to be set in order to randomize the
algorithm set (which happens in conf.sh.common).

(cherry picked from commit 492992dca8)

conf.sh.win32 was modified in addition of the above mentioned commit.
2022-12-22 15:54:19 +01:00
Tom Krizek 4b32c5608a Force quiet mode when using testcrypto.sh directly
When testcrypto.sh is used as a standalone script, always use quiet mode
to avoid using undefined commands (such as echo_i) which require
inclusion of the entire conf.sh machinery.

(cherry picked from commit ba35a6df9c)
2022-12-22 15:54:17 +01:00
Tom Krizek d9471c5f3c Merge branch '3503-random-default-algorithm-in-tests2-v9_16' into 'v9_16'
[9.16] Random selection of DEFAULT_ALGORITHM in system tests at runtime

See merge request isc-projects/bind9!7265
2022-12-22 14:54:01 +00:00
Tom Krizek 0eb789efba ci: disable algorithm support checking in softhsm
The algorithm support detection script doesn't seem to work when using
the SoftHSM module. For some reason, dnssec-keygen returns 'crypto
failure'. Since the tests themselves pass, this is likely to be some
bug/definiency in the test scripts that check algorithm support that get
confused by SoftHSM.

Since this issue only happens for the system:gcc:softhsm2.6 job in the
9.16 branch, use a workaround to not introduce this new feature for
this particular problematic job.
2022-12-22 15:17:41 +01:00
Tom Krizek 7324a7b5e4 Randomize algorithm selection for mkeys test
Use the ALGORITHM_SET option to use randomly selected default algorithm
in this test. Make sure the test works by using variables instead of
hard-coding values.

(cherry picked from commit f65f276f98)
2022-12-22 15:17:41 +01:00
Tom Krizek aa5453f5e5 Set algorithms for system tests at runtime
Use the get_algorithms.py script to detect supported algorithms and
select random algorithms to use for the tests.

Make sure to load common.conf.sh after KEYGEN env var is exported.

(cherry picked from commit 69b608ee9f)
2022-12-22 15:17:41 +01:00
Tom Krizek 34497e2350 Script for random algorithm selection in system tests
Multiple algorithm sets can be defined in this script. These can be
selected via the ALGORITHM_SET environment variable. For compatibility
reasons, "stable" set contains the currently used algorithms, since our
system tests need some changes before being compatible with randomly
selected algorithms.

The script operation is similar to the get_ports.py - environment
variables are created and then printed out as `export NAME=VALUE`
commands, to be interpreted by shell. Once we support pytest runner for
system tests, this should be a fixture instead.

(cherry picked from commit 5f480c8485)
2022-12-22 15:17:41 +01:00
Tom Krizek d45aa7581e Export env variables in system tests
Certain variables have to be exported in order for the system tests to
work. It makes little sense to export the variables in one place/script
while they're defined in another place.

Since it makes no harm, export all the variables to make the behaviour
more predictable and consistent. Previously, some variables were
exported as environment variables, while others were just shell
variables which could be used once the configuration was sourced from
another script. However, they wouldn't be exposed to spawned processes.

For simplicity sake (and for the upcoming effort to run system tests
with pytest), export all variables that are used. TESTS, PARALLEL_UNIX
and SUBDIRS variables are automake-specific, aren't used anywhere else
and thus not exported.

(cherry picked from commit 37d14c69c0)

conf.sh.win32 was modified in addition of the above mentioned commit.
2022-12-22 15:17:41 +01:00
Tom Krizek 4d74430259 Support testcrypto.sh usage without including conf.sh
The only variable really needed for the script to work is the path to
the $KEYGEN binary. Allow setting this via an environment variable to
avoid loading conf.sh (and causing a chicken-egg problem). Also make
testcrypto.sh executable to allow its use from conf.sh.

(cherry picked from commit bb1c6bbdc7)
2022-12-22 15:17:41 +01:00
Tom Krizek 28815949f8 Unify indentation level in testcrypto.sh
(cherry picked from commit 01b293b055)
2022-12-22 15:17:39 +01:00
Tom Krizek 09ec13097f Merge tag 'v9_16_36' into v9_16
BIND 9.16.36
2022-12-22 09:51:08 +01:00
Tom Krizek 6770e16d8c Merge branch 'tkrizek/system-tests-conventions-v9_16' into 'v9_16'
[9.16] Unify system tests naming conventions

See merge request isc-projects/bind9!7258
2022-12-21 13:37:34 +00:00
Tom Krizek 18e2298ed3 Update tests gitignore file
The .mypy_cache was added to the system test dir gitignore, since it
should be ignored.

(cherry picked from commit 4145068bfa)
2022-12-21 13:58:24 +01:00
Tom Krizek 1283d5263b Use common name convention for pytest files
It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).

(cherry picked from commit f6409ee6ac)
2022-12-21 13:57:58 +01:00
Tom Krizek 3628613996 Merge branch 'tkrizek/danger-backports-v9_16' into 'v9_16'
Check backport workflow in danger CI [v9_16]

See merge request isc-projects/bind9!7246
2022-12-16 13:42:06 +00:00
Tom Krizek 9438051e86 danger: remove obsolete check for cherry pick msg
With proper backport commit detection, this check has been made
redundant.

(cherry picked from commit e8a5ebaee5)
2022-12-16 14:22:05 +01:00
Tom Krizek 90ce669183 danger: check backport commits for original commit IDs
A full backport must have all the commit from the original MR and the
original commit IDs must be referenced in the backport commit messages.

If the criteria above is not met, the MR should be marked as a partial
backport. In that case, any discrepencies are only logged as informative
messages rather than failures.

(cherry picked from commit c617f97784)
2022-12-16 14:22:05 +01:00
Tom Krizek d03cbcf1f5 danger: check that original MR has been merged
When checking a backport MR, ensure that the original MR has been merged
already. This is vital for followup checks that verify commit IDs from
original commits are present in backport commit messages.

(cherry picked from commit 89530f1a1c)
2022-12-16 14:22:05 +01:00
Tom Krizek dcfaba5398 danger: check backport links to the original MR
When doing archeology, it is much easier to find stuff if it's properly
linked. This check ensures that backport MR are linked to their original
MR via a "Backport of !XXXX" message.

The regular expression is fairly broad and has been tested to accept the
following variants of the message:
Backport of MR !XXXX
Backport of: !XXXX
backport of mr !XXXX
Backport of   !XXXX
Backport of https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/XXXX

(cherry picked from commit 12e0b05738)
2022-12-16 14:22:05 +01:00
Tom Krizek ef9cecb79a danger: ensure target branch is in the MR title
Having the MR title clearly marked in its title can be very useful when
looking through older issues/MRs.

This check also ensures that the version from the version label matches
the proper version branch (i.e. v9.16 must be marked with [v9_16]).

(cherry picked from commit 14b027cf83)
2022-12-16 14:22:04 +01:00
Tom Krizek 5e31882596 danger: support partial backport label
Treat the Backport::Partial label as a backport as well.

(cherry picked from commit 1c0c1ba8b9)
2022-12-16 14:22:01 +01:00
Tony Finch 0195cb6de8 Merge branch '3740-rpz-reconfig-v9_16' into 'v9_16'
A couple of RPZ options were not reconfigured as expected

See merge request isc-projects/bind9!7239
2022-12-16 10:26:47 +00:00
Tony FinchandTony Finch 2d5160a9b9 A couple of RPZ options were not reconfigured as expected
[bug]	Changes to the RPZ response-policy min-update-interval
	and add-soa options now take effect as expected when
	named is reconfigured. [GL #3740]

(cherry picked from commit d8a3d328db)
2022-12-16 09:54:47 +00:00
Arаm Sаrgsyаn 59a76a7fa0 Merge branch '3742-catz-update-log-incorrect-soa-serial-representation-v9_16' into 'v9_16'
[v9_16] Fix an incorrect SOA serial representation in catz

See merge request isc-projects/bind9!7237
2022-12-15 14:48:22 +00:00
Aram Sargsyan 18932eb635 Add a CHANGES note for [GL #3742]
(cherry picked from commit ac7149aa88)
2022-12-15 13:50:36 +00:00
Aram Sargsyan a634488a24 Fix logging a uint32_t SOA serial value in dns_catz_update_from_db()
The dns_catz_update_from_db() function prints serial number as a signed
number (with "%d" in the format string), but the `vers` variable's type
is 'uint32_t'. This breaks serials bigger than 2^31.

Use PRIu32 instead of "d" in the format string.

(cherry picked from commit 72b1760ea6)
2022-12-15 13:49:58 +00:00
Aram Sargsyan d510221f7e Add big SOA serial logging check into the catz system test
Check that the SOA serial numbers printed when updating a catalog zone
is represented correctly for numbers bigger than 2^31.

(cherry picked from commit de232ab446)
2022-12-15 13:48:30 +00:00
Tony Finch edc12bd49f Merge branch 'fanf-rsasha236-v9_16' into 'v9_16'
Fix a typo RSASHA236 -> RSASHA256

See merge request isc-projects/bind9!7225
2022-12-14 12:47:23 +00:00
Tony FinchandTony Finch f3d96ab1f1 Fix a typo RSASHA236 -> RSASHA256
Use dns_secalg_format() to avoid error-prone repetition.

(cherry picked from commit c18a9a208d)
2022-12-14 12:46:56 +00:00
Tony Finch 1adcd723b4 Merge branch 'fanf-dnssec-algorithm-loglevel-v9_16' into 'v9_16'
List supported DNSSEC algorithms at log level NOTICE

See merge request isc-projects/bind9!7227
2022-12-14 12:32:01 +00:00
Tony FinchandTony Finch bdfb06eb5a List supported DNSSEC algorithms at log level NOTICE
NOTICE matches the other startup messages. WARNING weirdly
suggests the list is a problem.

(cherry picked from commit 72f8d03cad)
2022-12-14 11:04:35 +00:00
Mark Andrews 929042cb51 Merge branch '3737-fix-initialisation-of-local-in-isdotlocal-in-dig-v9_16' into 'v9_16'
Resolve "fix initialisation of local. in isdotlocal in dig" [v9_16]

See merge request isc-projects/bind9!7222
2022-12-14 00:32:34 +00:00
Mark Andrews 7258465d28 Properly initialise local_ndata in isdotlocal in dig
Remove the trailing '\0' so that the length field of the dns_name_t
structure is correct.  The old data just happens to work with
dns_name_issubdomain but would fail with dns_name_equal.

(cherry picked from commit 8ce163bbc5)
2022-12-14 10:30:51 +11:00
Mark Andrews 219e808ff2 Merge branch '3728-v9_16-docs-can-t-retrieve-updated-man-pages' into 'v9_16'
Resolve "v9_16 docs can't retrieve updated man pages"

See merge request isc-projects/bind9!7200
2022-12-13 23:22:50 +00:00
Mark Andrews a6f41f91e1 Make docs artifacts always available 2022-12-13 22:48:34 +00:00
Tom Krizek b5a95414ae Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.16.37' into 'v9_16'
Set up version and release notes for bind 9.16.37

See merge request isc-projects/bind9!7220
2022-12-13 16:18:19 +00:00
Tom Krizek 2e76df3e09 Set up release notes for BIND 9.16.37 2022-12-13 17:05:05 +01:00
Tom Krizek fd42890e76 Update BIND version to 9.16.37-dev 2022-12-13 17:04:02 +01:00
Tom Krizek edc1615077 Merge branch 'prep-release' into v9_16_36-release 2022-12-12 15:43:23 +01:00
Tom Krizek fe86c38f6c prep 9.16.36 2022-12-12 14:18:17 +01:00
Tom Krizek ca10ac2811 Merge branch 'tkrizek/prepare-documentation-for-bind-9.16.36' into 'v9_16_36-release'
Prepare documentation for BIND 9.16.36

See merge request isc-private/bind9!489
2022-12-12 12:57:25 +00:00
Michał Kępień d5a58400de Reorder release notes 2022-12-12 13:05:36 +01:00
Michał Kępień c29739744e Tweak and reword release notes 2022-12-12 13:05:36 +01:00
Michał Kępień 2ff2ce0307 Prepare release notes for BIND 9.16.36 2022-12-12 13:05:36 +01:00
Ondřej Surý 9a61c53c71 Merge branch '3731-attach-keyfileio-to-zone-v9_16' into 'v9_16'
Implement proper reference counting for dns_keyfileio_t [v9.16]

See merge request isc-projects/bind9!7208
2022-12-09 14:53:51 +00:00
Ondřej Surý 075c7f7562 Implement proper reference counting for dns_keyfileio_t
Instead of relying on hash table search when using the keys, implement a
proper reference counting in dns_keyfileio_t objects, and attach/detach
the objects to the zone.

(cherry picked from commit 79115a0c3b)
2022-12-09 15:20:11 +01:00
Ondřej Surý 5b16afa378 Merge branch '3724-fix-doc-man-dig-v9_16' into 'v9_16'
Update the doc/man/dig.1in

See merge request isc-projects/bind9!7195
2022-12-08 10:20:07 +00:00
Ondřej Surý a5fd5482af Update the doc/man/dig.1in
The MR !7187 forgot to update the precompiled doc/man/dig.1in.  Update
the file.
2022-12-08 10:20:03 +00:00
Ondřej Surý d10351e4d1 Merge branch '3727-fix-off-by-one-reference-counting-in-zonemgr_keymgmt_delete-v9_16' into 'v9_16'
Release unused key file IO lock objects [v9.16]

See merge request isc-projects/bind9!7192
2022-12-08 09:57:28 +00:00
Ondřej Surý 1cb66e1b58 Add CHANGES and release note for [GL #3727]
(cherry picked from commit 56a997b0b5)
2022-12-08 10:32:59 +01:00
Ondřej Surý 98fca774b6 Release unused key file IO lock objects
Due to off-by-one error in zonemgr_keymgmt_delete, unused key file IO
lock objects were never freed and they were kept until the server
shutdown.  Adjust the returned value by -1 to accomodate the fact that
the atomic_fetch_*() functions return the value before the operation and
not current value after the operation.

(cherry picked from commit fb1acd6736)
2022-12-08 10:32:59 +01:00
Tom Krizek f723643bdb Merge branch 'tkrizek/revert-3678-serve-stale-servfail-v9_16' into 'v9_16'
Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'"

See merge request isc-projects/bind9!7185
2022-12-08 09:32:22 +00:00
Tom Krizek da42fa7622 Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'"
This reverts commit b2a4447af8, reversing
changes made to 8924f92956.

It also removes release note 6038, since the fix is reverted.
2022-12-08 10:23:40 +01:00
Mark Andrews b386e272b7 Merge branch '3613-redo-dumping-expired-rdatasets-v9_16' into 'v9_16'
Resolve "TTL issue with resolver's cached and expired results for qtype ANY queries" [v9_16]

See merge request isc-projects/bind9!7189
2022-12-08 00:49:45 +00:00
Mark Andrews ba020b3225 Add CHANGES note for [GL #3613]
(cherry picked from commit 485e968087)
2022-12-08 11:20:35 +11:00
Mark Andrews ea03c3d25c Remove different zero TTL handling for rdataset iterator
Zero TTL handling does not need to be different for 'rdatasetiter_first'
and 'rdatasetiter_next' and it interacts badly with 'bind_rdatadataset'
which makes different determinations.

(cherry picked from commit 1a39328feb)
2022-12-08 11:20:35 +11:00
Mark Andrews a3bc62e4cd Add dns_db_allrdatasets options
'DNS_DB_STALEOK' returns stale rdatasets as well as current rdatasets.

'DNS_DB_EXPIREDOK' returns expired rdatasets as well as current
rdatasets. This option is currently only set when DNS_DB_STALEOK is
also set.

(cherry picked from commit 85048ddeee)
2022-12-08 11:20:35 +11:00
Mark Andrews 4f3327cd41 Extend dns_db_allrdatasets to control interation results
Add an options parameter to control what rdatasets are returned when
iteratating over the node.  Specific modes will be added later.

(cherry picked from commit 7695c36a5d)
2022-12-08 11:20:35 +11:00
Mark Andrews 8b6a30f59d Properly select active rdatasets when iterating across node
Active rdatasets where not being properly selected in rdatasetiter_first
and rdatasetiter_next.

(cherry picked from commit 3bdab2d111)
2022-12-08 10:47:23 +11:00
Mark Andrews 91504c1f6e Check TTLs of mixed TTL ANY response with expired records
(cherry picked from commit e49f83499a)
2022-12-08 10:46:20 +11:00
Mark Andrews a85260fc19 Revert "Fix rndc dumpdb -expired for stuck cache contents"
This reverts commit f8d866c6ef.

(cherry picked from commit 90249e4aa5)
2022-12-08 10:46:18 +11:00
Mark Andrews 756495a826 Merge branch '3724-update-dig-tcp-documentation-v9_16' into 'v9_16'
Add reference to +tcp for +ignore [v9_16]

See merge request isc-projects/bind9!7187
2022-12-07 23:14:17 +00:00
Mark Andrews 45b4446ade Add reference to +tcp for +ignore
(cherry picked from commit b5951f0411)
2022-12-08 09:34:35 +11:00
Ondřej Surý df4a162203 Merge branch 'ondrej-fix-missing-zone_check-in-checkds-system-test-v9_16' into 'v9_16'
Fix missing zone_check() call in checkds test [v9.16]

See merge request isc-projects/bind9!7181
2022-12-07 18:46:36 +00:00
Ondřej Surý a6847fa678 Fix missing zone_check() call in checkds test
The bad2-dswithdrawn.checkds tests were missing call to the
zone_checks() contributing to intermittent timing failures of the
checkds system test.

(cherry picked from commit 718831bfcc)
2022-12-07 19:32:01 +01:00
Ondřej Surý afcb25dc60 Merge branch '3183-send-shutdown-to-ns_client-on-shutdown-v9_16' into 'v9_16'
Propagate the shutdown event to the recursing ns_client(s) [v9.16]

See merge request isc-projects/bind9!7029
2022-12-07 18:28:10 +00:00
Ondřej Surý cfa06c29e1 Add CHANGES and release notes for [GL #3183]
(cherry picked from commit d3f1639c16e7777a52d66c2dccd8b43a08a0750b)
2022-12-07 18:10:14 +01:00
Ondřej Surý 72724b258c Propagate the shutdown event to the recursing ns_client(s)
Send the ns_query_cancel() on the recursing clients when we initiate the
named shutdown for faster shutdown.

When we are shutting down the resolver, we cancel all the outstanding
fetches, and the ISC_R_CANCEL events doesn't propagate to the ns_client
callback.

In the future, the better solution how to fix this would be to look at
the shutdown paths and let them all propagate from bottom (loopmgr) to
top (f.e. ns_client).

(cherry picked from commit d861d403bb9a7912e29a06aba6caf6d502839f1b)
2022-12-07 18:09:40 +01:00
Matthijs Mekking 925b50e3e6 Merge branch 'matthijs-document-ns-minimal-responses-v9_16' into 'v9_16'
[v9_16] Document NS queries are excempt from minimal-responses

See merge request isc-projects/bind9!7177
2022-12-07 11:39:57 +00:00
Matthijs Mekking e1924126c0 Document NS queries are excempt from minimal-responses
Also document that DNSKEY, DS, CDNSKEY, and CDS never do additional
section processing.

(cherry picked from commit f7b477f6ea)
2022-12-07 12:10:06 +01:00
Michal Nowak d246a2bbe5 Merge branch 'mnowak/asan-tsan-respdiff-jobs-v9_16' into 'v9_16'
[v9_16] Add ASAN- and TSAN-enabled respdiff jobs

See merge request isc-projects/bind9!7174
2022-12-07 10:18:08 +00:00
Michal Nowak ca5e6ea008 Add ASAN- and TSAN-enabled respdiff jobs
Neither of the new CI jobs can reliably pass at the moment; hence they
are defined with "allow_failure: true" until issues in the code base are
resolved.

(cherry picked from commit 4f23de554c)
2022-12-07 10:42:28 +01:00
Michal Nowak 35ea9b6ee3 Extract TSAN parsing code
(cherry picked from commit 9856296666)
2022-12-07 10:42:13 +01:00
Mark Andrews bde0d92643 Merge branch '3683-use-after-free-in-catalog-zone-processing-v9_16' into 'v9_16'
Resolve "use after free in catalog zone processing" [v9_16]

See merge request isc-projects/bind9!7171
2022-12-07 02:16:47 +00:00
Mark Andrews e882c1f801 Add release note for [GL #3683]
(cherry picked from commit 9843da3423)
2022-12-07 12:55:42 +11:00
Mark Andrews 10926434f8 Add CHANGES note for [GL #3683]
(cherry picked from commit 72402e1710)
2022-12-07 12:55:42 +11:00
Mark Andrews 627a1e1f43 Check that restored catalog zone works
Using a restored catalog zone excercised a use-after-free bug.
The test checks that the use-after-free bug is gone and is just
a reasonable behaviour check in its own right.

(cherry picked from commit bca84c8601)
2022-12-07 12:55:42 +11:00
Mark Andrews f9845df6d6 Add missing DbC magic checks
Checking for value != NULL is not sufficient to detect use after
free errors.

(cherry picked from commit b1086a5561)
2022-12-07 09:47:39 +11:00
Mark Andrews dd73306509 Call dns_db_updatenotify_unregister earlier
dns_db_updatenotify_unregister needed to be called earlier to ensure
that listener->onupdate_arg always points to a valid object.  The
existing lazy cleanup in rbtdb_free did not ensure that.

(cherry picked from commit 35839e91d8)
2022-12-07 09:47:37 +11:00
Mark Andrews ffeda92cd8 Suppress duplicate dns_db_updatenotify_register registrations
Duplicate dns_db_updatenotify_register registrations need to be
suppressed to ensure that dns_db_updatenotify_unregister is successful.

(cherry picked from commit f13e71e551)
2022-12-07 09:46:50 +11:00
Arаm Sаrgsyаn b2a4447af8 Merge branch '3678-serve-stale-servfailing-unexpectedly-v9_16' into 'v9_16'
[v9_16] Resolve "stale-serve and RPZ put in SERVFAIL cache unexpected record"

See merge request isc-projects/bind9!7167
2022-12-06 15:01:55 +00:00
Michał KępieńandAram Sargsyan 148608c7b2 Check for NULL before dereferencing qctx->rpz_st
Commit 9ffb4a7ba1 causes Clang Static
Analyzer to flag a potential NULL dereference in query_nxdomain():

    query.c:9394:26: warning: Dereference of null pointer [core.NullDereference]
            if (!qctx->nxrewrite || qctx->rpz_st->m.rpz->addsoa) {
                                    ^~~~~~~~~~~~~~~~~~~
    1 warning generated.

The warning above is for qctx->rpz_st potentially being a NULL pointer
when query_nxdomain() is called from query_resume().  This is a false
positive because none of the database lookup result codes currently
causing query_nxdomain() to be called (DNS_R_EMPTYWILD, DNS_R_NXDOMAIN)
can be returned by a database lookup following a recursive resolution
attempt.  Add a NULL check nevertheless in order to future-proof the
code and silence Clang Static Analyzer.

(cherry picked from commit 07592d1315)
2022-12-06 13:51:30 +00:00
Aram Sargsyan c09bcdca75 Add a CHANGES note for [GL #3678]
(cherry picked from commit 5b5f3a0ea7)
2022-12-06 13:51:19 +00:00
Matthijs MekkingandAram Sargsyan e6e13c3e62 Consider non-stale data when in serve-stale mode
With 'stale-answer-enable yes;' and 'stale-answer-client-timeout off;',
consider the following situation:

A CNAME record and its target record are in the cache, then the CNAME
record expires, but the target record is still valid.

When a new query for the CNAME record arrives, and the query fails,
the stale record is used, and then the query "restarts" to follow
the CNAME target. The problem is that the query's multiple stale
options (like DNS_DBFIND_STALEOK) are not reset, so 'query_lookup()'
treats the restarted query as a lookup following a failed lookup,
and returns a SERVFAIL answer when there is no stale data found in the
cache, even if there is valid non-stale data there available.

With this change, query_lookup() now considers non-stale data in the
cache in the first place, and returns it if it is available.

(cherry picked from commit 86a80e723f)
2022-12-06 13:51:07 +00:00
Aram Sargsyan 8fcb333622 Add serve-stale CNAME check with stale-answer-client-timeout off
Prime the cache with the following records:

    shortttl.cname.example.	1	IN	CNAME	longttl.target.example.
    longttl.target.example.	600	IN	A	10.53.0.2

Wait for the CNAME record to expire, disable the authoritative server,
and query 'shortttl.cname.example' again, expecting a stale answer.

(cherry picked from commit 21faf44ef7)
2022-12-06 13:50:54 +00:00
Michal Nowak 8924f92956 Merge branch '3310-build-contrib-in-ci-v9_16' into 'v9_16'
[v9_16] Build contrib in CI & associated fixes

See merge request isc-projects/bind9!7114
2022-12-05 16:36:02 +00:00
Michal Nowak 2428add7ee Help gcovr find contrib files
(cherry picked from commit 445a90fb78)
2022-12-05 16:00:35 +01:00
Michal Nowak db231bd31f Add install target for Perl DLZ module
Perl DLZ module Makefile lacked "install" target, add it as we want to
test DLZ module installation in the CI.

(cherry picked from commit 35e44978b5)
2022-12-05 16:00:35 +01:00
Michal Nowak 7581afef4c Disable compound-token-split-by-macro warning with Clang
Perl DLZ module compilation with Clang produces the following warning:

    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:150:5: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
        ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:80:38: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
    #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                         ^~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/perl.h:666:29: note: expanded from macro 'STMT_START'
    #   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
                                  ^
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:150:5: note: '{' token is here
        ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:80:49: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
    #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                                    ^

(cherry picked from commit 69b7e4362d)
2022-12-05 16:00:35 +01:00
Michal Nowak 8f2f5c426e Build contrib dlz modules in the CI
(cherry picked from commit 4a4a91b012)
2022-12-05 16:00:35 +01:00
Michal Nowak 3999497118 Fix statement may fall through warnings in dlz_ldap_dynamic.c
dlz_ldap_dynamic.c: In function ‘dlz_create’:
    dlz_ldap_dynamic.c:971:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      971 |                 if (result != ISC_R_SUCCESS) {
          |                    ^
    dlz_ldap_dynamic.c:974:9: note: here
      974 |         case 11:
          |         ^~~~
    dlz_ldap_dynamic.c:976:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      976 |                 if (result != ISC_R_SUCCESS) {
          |                    ^
    dlz_ldap_dynamic.c:979:9: note: here
      979 |         case 10:
          |         ^~~~
    dlz_ldap_dynamic.c:980:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      980 |                 if (strlen(argv[9]) > 0) {
          |                    ^
    dlz_ldap_dynamic.c:987:9: note: here
      987 |         case 9:
          |         ^~~~

(cherry picked from commit 99912ed2f7)
2022-12-05 16:00:35 +01:00
Michal Nowak 55f2040853 Fix compilation warnings in dlz_wildcard_dynamic.c
dlz_wildcard_dynamic.c: In function ‘dlz_lookup’:
    dlz_wildcard_dynamic.c:227:14: warning: variable ‘origin’ set but not used [-Wunused-but-set-variable]
      227 |         bool origin = true;
          |              ^~~~~~
    dlz_wildcard_dynamic.c: In function ‘dlz_lookup’:
    dlz_wildcard_dynamic.c:252:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      252 |                 cd->record = "@";
          |                            ^
    dlz_wildcard_dynamic.c: In function ‘dlz_authority’:
    dlz_wildcard_dynamic.c:328:22: warning: unused variable ‘origin’ [-Wunused-variable]
      328 |                 bool origin;
          |                      ^~~~~~
    dlz_wildcard_dynamic.c:312:25: warning: unused variable ‘name’ [-Wunused-variable]
      312 |         const char *p, *name = "@";
          |                         ^~~~
    dlz_wildcard_dynamic.c: In function ‘dlz_create’:
    dlz_wildcard_dynamic.c:441:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      441 |         for (i = 4; i < argc; i += 4) {
          |                       ^

(cherry picked from commit 76c8c58d54)
2022-12-05 16:00:35 +01:00
Michal Nowak 079aeb16d2 Fix compilation warnings in dlz_sqlite3_dynamic.c
dlz_sqlite3_dynamic.c: In function ‘dlz_sqlite3_fetch_row’:
    dlz_sqlite3_dynamic.c:447:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      447 |                 if (rs->pnRow > 0U && rs->curRow < rs->pnRow) {
          |                               ^
    dlz_sqlite3_dynamic.c:447:50: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
      447 |                 if (rs->pnRow > 0U && rs->curRow < rs->pnRow) {
          |                                                  ^

(cherry picked from commit 60f68dc0d6)
2022-12-05 16:00:35 +01:00
Michal Nowak 93c518c7a5 Fix warnings in dlz_mysqldyn_mod.c
dlz_mysqldyn_mod.c: In function ‘dlz_findzonedb’:
    dlz_mysqldyn_mod.c:1079:73: warning: unused parameter ‘methods’ [-Wunused-parameter]
     1079 | dlz_findzonedb(void *dbdata, const char *name, dns_clientinfomethods_t *methods,
          |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    dlz_mysqldyn_mod.c:1080:34: warning: unused parameter ‘clientinfo’ [-Wunused-parameter]
     1080 |                dns_clientinfo_t *clientinfo) {
          |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    dlz_mysqldyn_mod.c: In function ‘dlz_lookup’:
    dlz_mysqldyn_mod.c:1111:63: warning: unused parameter ‘methods’ [-Wunused-parameter]
     1111 |            dns_sdlzlookup_t *lookup, dns_clientinfomethods_t *methods,
          |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    dlz_mysqldyn_mod.c: In function ‘build_query’:
    dlz_mysqldyn_mod.c:465:19: warning: pointer ‘item’ used after ‘free’ [-Wuse-after-free]
      465 |              item = DLZ_LIST_NEXT(item, link))
    dlz_mysqldyn_mod.c:470:17: note: call to ‘free’ here
      470 |                 free(item);
          |                 ^~~~~~~~~~

(cherry picked from commit 587ea10567)
2022-12-05 16:00:35 +01:00
Michal Nowak 3d6551e461 Fix compilation warnings in dlz_perl_driver.c
dlz_perl_driver.c: In function ‘dlz_version’:
    dlz_perl_driver.c:116:27: warning: unused parameter ‘flags’ [-Wunused-parameter]
      116 | dlz_version(unsigned int *flags) {
          |             ~~~~~~~~~~~~~~^~~~~
    In file included from /usr/lib64/perl5/CORE/perl.h:5685,
                     from dlz_perl_driver.c:33:
    dlz_perl_driver.c: In function ‘dlz_allnodes’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:151:17: note: in expansion of macro ‘POPs’
      151 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_allowzonexfr’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:251:17: note: in expansion of macro ‘POPs’
      251 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_findzonedb’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:328:17: note: in expansion of macro ‘POPs’
      328 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_lookup’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:407:17: note: in expansion of macro ‘POPs’
      407 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c:472:1: error: no previous prototype for ‘missing_perl_method’ [-Werror=missing-prototypes]
      472 | missing_perl_method(const char *perl_class_name, PerlInterpreter *my_perl)
          | ^~~~~~~~~~~~~~~~~~~
    dlz_perl_driver.c: In function ‘missing_perl_method’:
    dlz_perl_driver.c:485:9: error: ISO C90 forbids array ‘full_name’ whose size cannot be evaluated [-Werror=vla]
      485 |         char full_name[BUF_LEN];
          |         ^~~~
    dlz_perl_driver.c: In function ‘dlz_create’:
    dlz_perl_driver.c:613:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      613 |         if (missing_method_name = missing_perl_method(perl_class_name, my_perl))
          |             ^~~~~~~~~~~~~~~~~~~
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:657:17: note: in expansion of macro ‘POPs’
      657 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c:502:15: warning: unused variable ‘init_args’ [-Wunused-variable]
      502 |         char *init_args[] = { NULL, NULL };
          |               ^~~~~~~~~

(cherry picked from commit be928dbba2)
2022-12-05 16:00:34 +01:00
Tom Krizek d1176395ac Merge branch 'tkrizek/system-tests-prereqs-v9_16' into 'v9_16'
Unify system test feature detection and add missing prerequisites [v9_16]

See merge request isc-projects/bind9!7157
2022-12-02 11:34:56 +00:00
Tom Krizek 76d88b7f04 Add dnstap prerequisite for dnstap system test
(cherry picked from commit 9846c920c3)
2022-12-02 11:09:28 +01:00
Tom Krizek 7ff5b01d3c Use feature-test feature detection in pytests
Avoid using the environment variables for feature detection and use the
feature-test utility instead.

Remove the obsolete environment variables from conf.sh, since they're no
longer used anywhere.

(cherry picked from commit 9730ac4c56)
2022-12-02 11:05:46 +01:00
Tom Krizek 0b31a7c54c Use feature-test to detect feature support in system tests
Previously, there were two different ways to detect feature support.
Either through an environment variable set by configure in conf.sh, or
using the feature-test utility.

It is more simple and consistent to have only one way of detecting the
feature support. Using the feature-test utility seems superior the the
environment variables set by configure.

(cherry picked from commit d24fb1122e)
2022-12-02 10:56:54 +01:00
Tom Krizek 1054ad0164 Add missing options to feature-test utility
(cherry picked from commit e22d27da71)
2022-12-02 10:54:49 +01:00
Michał Kępień e0ce67531b Merge branch 'matthijs/update-serve-stale-test-messages-to-include-rrtype-v9_16' into 'v9_16'
[v9_16] Update serve-stale test messages to include RRtype

See merge request isc-projects/bind9!7147
2022-11-30 13:59:49 +00:00
Matthijs MekkingandMichał Kępień 8e629cc169 Update serve-stale test messages to include RRtype
(cherry picked from commit 45f7a15785)
2022-11-30 14:30:58 +01:00
Michał Kępień 939ebf8cf2 Merge branch '3707-dont-log-final-reference-detached-on-LOG_INFO-v9_16' into 'v9_16'
Don't log "final reference detached" on INFO level [v9.16]

See merge request isc-projects/bind9!7144
2022-11-30 13:27:45 +00:00
Ondřej Surý 86b43888b3 Add CHANGES and release note for [GL #3707]
(cherry picked from commit 116d1b94a9)
2022-11-30 11:51:51 +01:00
Ondřej Surý bf093e814c Don't log "final reference detached" on INFO level
The "final reference detached" message was meant to be DEBUG(1), but was
instead kept at INFO level.  Move it to the DEBUG(1) logging level, so
it's not printed under normal operations.

(cherry picked from commit 1816244725)
2022-11-30 11:51:29 +01:00
Michal Nowak dcdb4aa917 Merge branch 'mnowak/llvm-15-v9_16' into 'v9_16'
[v9_16] Update clang to version 15

See merge request isc-projects/bind9!7134
2022-11-29 11:26:02 +00:00
Michal Nowak 771fed4a14 Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
Michal Nowak 6ef2fd08e0 Update clang to version 15
(cherry picked from commit 26a42ed1ac)
2022-11-29 10:29:17 +01:00
Michal Nowak 9c165250a4 Merge branch 'mnowak/remove-unused-variable-from-resolver.c' into 'v9_16'
Remove unused variable reported by Clang 15

See merge request isc-projects/bind9!7117
2022-11-28 16:41:48 +00:00
Michal Nowak 69f00278c3 Remove unused variable reported by Clang 15
resolver.c:4776:15: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
            unsigned int count = 0;
                         ^
2022-11-28 14:35:03 +01:00
Tom Krizek 617e1c2188 Merge branch 'tkrizek/system-tests-start-stop-helpers-v9_16' into 'v9_16'
Simplify start/stop helper func in system tests [v9_16]

See merge request isc-projects/bind9!7125
2022-11-25 13:24:14 +00:00
Tom Krizek 172826bfa8 Simplify start/stop helper func in system tests
The system test should never attempt to start or stop any other server
than those that belong to that system test. Therefore, it is not
necessary to specify the system test name in function calls.

Additionally, this makes it possible to run the test inside a
differently named directory, as its name is automatically detected with
the $SYSTESTDIR variable. This enables running the system tests inside a
temporary directory.

Direct use of stop.pl was replaced with a more systematic approach to
use stop_servers helper function.

(cherry picked from commit c100308b7d)
2022-11-25 13:14:45 +01:00
Michal Nowak 7554a7ab29 Merge branch 'mnowak/gcovr-cleanup-v9_16' into 'v9_16'
[v9_16] Various gcovr clean-ups

See merge request isc-projects/bind9!7111
2022-11-23 17:10:59 +00:00
Michal Nowak 4b0d4169b2 Restructure contrib code coverage helper line 2022-11-23 18:09:06 +01:00
Michal Nowak 1ebb126621 Exclude fuzz directory from code coverage report
gcovr fails to process fuzz/old.gcda and fuzz/old.gcno files after !7045
MR with:

    (WARNING) GCOV produced the following errors processing /builds/isc-projects/bind9/fuzz/old.gcda:
    	Cannot open source file ../../fuzz/old.c
    Cannot open source file ../../lib/dns/include/dns/compress.h
    Cannot open source file ../../lib/isc/include/isc/buffer.h
    ...
    (gcovr could not infer a working directory that resolved it.)

Given that code coverage inspection is meant only for BIND 9 code and
not its tests and auxiliary tools, the "fuzz" directory should be
excluded from being included in the code coverage report.

(cherry picked from commit 3b5e9666c6)
2022-11-23 18:09:05 +01:00
Matthijs Mekking 991d7eb85a Merge branch '3667-deprecate-auto-dnssec-v9_16' into 'v9_16'
[v9_16] Deprecate auto-dnssec

See merge request isc-projects/bind9!7107
2022-11-23 16:58:06 +00:00
Matthijs Mekking ce134f3e0d Add CHANGES and release note for GL #3667
Announce deprecation of 'auto-dnssec'.

(cherry picked from commit fde1d89d03)
2022-11-23 13:32:53 +01:00
Matthijs Mekking ed8eba9180 Deprecate auto-dnssec
Deprecate auto-dnssec, add specific log warning to migrate to
dnssec-policy.

Cherry-picking triggered a lot of conflicts, so the changes
were manually picked.

(manually picked from commit f9845dd1)
2022-11-23 13:32:52 +01:00
Michal Nowak 339b51c6f3 Merge branch 'mnowak/fedora-37-v9_16' into 'v9_16'
[v9_16] Add Fedora 37

See merge request isc-projects/bind9!7102
2022-11-21 15:29:10 +00:00
Michal Nowak 33d2a173bf Add Fedora 37
(cherry picked from commit b293b2c638)
2022-11-21 14:00:22 +01:00
Matthijs Mekking 00dbaadea3 Merge branch 'matthijs-tweak-kasp-test-v9_16' into 'v9_16'
[v9_16] Tweak kasp system test script

See merge request isc-projects/bind9!7095
2022-11-17 12:07:13 +00:00
Matthijs Mekking 4ae380a7f2 Tweak kasp system test script
The retry 3 times when checking signatures did not make sense because
at this point the input file does not change.

Raise the number of retries when checking the apex DNSKEY response to
reduce the number of intermittent failures due to unexpected delays.

(cherry picked from commit 6ef0417274)
2022-11-17 12:32:18 +01:00
Mark Andrews 2f329bf696 Merge branch '3607-apex-in-name_external-may-be-invalid-when-using-dual-stack-servers-v9_16' into 'v9_16'
Resolve "apex in name_external may be invalid when using dual stack servers" [v9_16]

See merge request isc-projects/bind9!7093
2022-11-17 06:18:27 +00:00
Mark Andrews e1854ff719 Ignore contrib/dlz/modules/mysql/Makefile 2022-11-17 16:32:53 +11:00
Mark Andrews 3dcf1afee2 Address back porting issues
Add and use dig_with_opts, resolve_with_opts and rndccmd.
Use $(()) and $() instead of back ticks.
Add more double quotes around variable.
Add non back ported error corrections from v9_18 and main.
2022-11-17 15:21:58 +11:00
Mark Andrews 924d8bbe5e Add CHANGES note for [GL #3607]
(cherry picked from commit 8a2149f502)
2022-11-17 13:08:59 +11:00
Mark Andrews 9ab162b856 Add system test for dual-stack-servers with possible DNAME response
Create a zone that triggers DNAME owner name checks in a zone that
is only reachable using a dual stack server.  The answer contains
a name that is higher in the tree than the query name.

e.g.
	foo.v4only.net.	CNAME	v4only.net.
	v4only.net.	A	10.0.0.1

ns4 is serving the test zone (ipv4-only)
ns6 is the root server for this test (dual stacked)
ns7 is acting as the dual stack server (dual stacked)
ns9 is the server under test (ipv6-only)

(cherry picked from commit f946133ec9)
2022-11-17 13:08:59 +11:00
Mark Andrews 078efb1526 Support starting and stopping IPv6 only servers
Look for $testdir/$server/named.ipv6-only and use
fd92:7065:b8e:ffff::$n instead of 10.53.0.$n to
communicate with the server.

(cherry picked from commit a35c34e10f)
2022-11-17 13:08:59 +11:00
Mark Andrews 3952f01cad Select the appropriate namespace when using a dual stack server
When using dual-stack-servers the covering namespace to check whether
answers are in scope or not should be fctx->domain.  To do this we need
to be able to distingish forwarding due to forwarders clauses and
dual-stack-servers.  A new flag FCTX_ADDRINFO_DUALSTACK has been added
to signal this.

(cherry picked from commit dfbffd77f9)
2022-11-17 13:07:58 +11:00
Mark Andrews 036823bf38 Merge branch '1905-check-wildcard-in-checkconf-z-v9_16' into 'v9_16'
Fix 'named-checkconf -z' was ignoring check-wildcard settings in named.conf [v9_16]

See merge request isc-projects/bind9!7091
2022-11-17 00:30:08 +00:00
Mark Andrews 349bd74b63 Check 'named-checkconf -z' and check-wildcard
Add tests to check the behavior of 'named-checkconf -z' and
check-wildcard setting in named.conf.

(cherry picked from commit 708dadac59)
2022-11-17 11:02:18 +11:00
Mark Andrews 8aa7601a42 named-checkzone -z ignored the check-wildcard option
Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.

(cherry picked from commit dfc5c1e018)
2022-11-17 11:00:04 +11:00
Michal Nowak 4563357ab8 Merge tag 'v9_16_35' into v9_16
BIND 9.16.35
2022-11-16 16:20:31 +01:00
Michal Nowak ff5f2a787d Merge branch 'mnowak/openbsd-7.2-v9_16' into 'v9_16'
[v9_16] Add OpenBSD 7.2

See merge request isc-projects/bind9!7083
2022-11-15 11:47:19 +00:00
Michal Nowak 27b0df2124 Add OpenBSD 7.2
(cherry picked from commit b239e6870d)
2022-11-15 10:44:04 +01:00
Michal Nowak 0f690eb8c8 Merge branch '2265-fix-and-check-bashisms-v9_16' into 'v9_16'
[v9_16] Fix and check bashisms in system test

See merge request isc-projects/bind9!7081
2022-11-15 07:00:49 +00:00
Michal Nowak 0b4be3a26c In POSIX sh, RANDOM variable is undefined
possible bashism in ./bin/tests/system/system-test-driver.sh line 77 ($RANDOM):
    ./run.sh -p "$(($RANDOM%32000+32000))" "$@" "$TEST_PROGRAM"

Also see: https://www.shellcheck.net/wiki/SC3028.
2022-11-14 23:13:04 +01:00
Michal Nowak c40916dbf3 Hide sh-long-option checkbashism confusion
possible bashism in ./bin/tests/system/system-test-driver.sh line 30 (sh --long-option):
    OPTS=$(getopt --shell sh --name "$(basename "$0")" --options '' --longoptions test-name:,log-file:,trs-file:,color-tests:,expect-failure:,enable-hard-errors: -- "$@")
2022-11-14 23:13:04 +01:00
Michal Nowak 9cf52e51ab Add checkbashisms CI job
(cherry picked from commit 47a7c5123a)
2022-11-14 23:13:04 +01:00
Michal Nowak 8b9634c9ed Rename $HOSTNAME to $HOST_NAME to silence checkbashisms
checkbashisms warns about possible reliance on HOSTNAME environmental
variable which Bash sets to the name of the current host, and some
commands may leverage it:

    possible bashism in builtin/tests.sh line 199 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns1.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 221 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns2.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 228 ($HOST(TYPE|NAME)):
    grep "^; NSID: .* (\"$HOSTNAME\")$" dig.out.ns2.$n > /dev/null || ret=1

We don't use the variable this way but rename it to HOST_NAME to silence
the tool.

(cherry picked from commit ae33a8ddea)
2022-11-14 23:13:04 +01:00
Michal Nowak 0f2e25af52 Remove no-op assignment from kasp/tests.sh
"next_key_event_threshold" is assigned with
"next_key_event_threshold+i", but "i" is empty (never set, nor used
afterwards).

posh, the Policy-compliant Ordinary SHell, failed on this assignment
with:

    tests.sh:253: : unexpected `end of expression'

(cherry picked from commit 00c3b1e309)
2022-11-14 23:13:03 +01:00
Michal Nowak 9508a2ce46 Remove unused $@ array from cds/setup.sh
posh, the Policy-compliant Ordinary SHell, failed with:

    setup.sh:57: @: parameter not set

(cherry picked from commit 02a4a95395)
2022-11-14 23:13:03 +01:00
Michal Nowak a1e697c8b3 Join two rndc lines not to confuse checkbashisms
checkbashisms gets confused by the rndc command being on two lines:

    possible bashism in bin/tests/system/nzd2nzf/tests.sh line 37 (type):
    rndccmd 10.53.0.1 addzone "added.example { type primary; file \"added.db\";

(cherry picked from commit 9eb2f6b0e8)
2022-11-14 23:13:03 +01:00
Michal Nowak cf67657c71 Replace string comparisons with integer comparisons
checkbashisms reports Bash-style ("==") string comparisons inside test/[
command:

    possible bashism in bin/tests/system/checkconf/tests.sh line 105 (should be 'b = a'):
                    if [ $? == 0 ]; then echo_i "failed"; ret=1; fi
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 62 (should be 'b = a'):
                    test $ret == 0 || continue
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 79 (should be 'b = a'):
                    test $ret == 0 || continue

(cherry picked from commit 7640fc5b39)
2022-11-14 21:11:27 +01:00
Michal Nowak be1379b6e4 Add shell interpreter line where missing
The checkbashisms script reports errors like this one:

    script util/check-line-length.sh does not appear to have a #! interpreter line;
    you may get strange results

(cherry picked from commit 9e68997cbb)
2022-11-14 21:09:42 +01:00
Mark Andrews 44c51cd320 Merge branch '3468-statistics-xml-rendering-does-not-seem-to-protect-against-concurrent-changes-v9_16' into 'v9_16'
Resolve "Statistics XML rendering does not seem to protect against concurrent changes" [v9_16]

See merge request isc-projects/bind9!7077
2022-11-11 16:40:54 +00:00
Mark Andrews b70d4f5917 Add CHANGES note for [GL #3468]
(cherry picked from commit a4383c906c)
2022-11-11 16:13:55 +00:00
Mark Andrews 10083c2019 Have dns_zt_apply lock the zone table
There were a number of places where the zone table should have been
locked, but wasn't, when dns_zt_apply was called.

Added a isc_rwlocktype_t type parameter to dns_zt_apply and adjusted
all calls to using it.  Removed locks in callers.

(cherry picked from commit f053d5b414)
2022-11-11 16:13:55 +00:00
Petr Špaček d0cca7ecc9 Merge branch '3669-update-policy-external-synchronous-doc-v9_16' into 'v9_16'
Document that update-policy external is synchronous [v9_16]

See merge request isc-projects/bind9!7074
2022-11-11 10:24:04 +00:00
Petr Špaček 62a0d10014 Document that update-policy external is synchronous
(cherry picked from commit 7d352741a0)
2022-11-11 11:15:54 +01:00
Mark Andrews 0fcec7a22c Merge branch '3630-nextpart-is-not-compatible-with-set-x-v9_16' into 'v9_16'
Resolve "'nextpart' is not compatible with 'set -x'" [v9_16]

See merge request isc-projects/bind9!7061
2022-11-08 17:50:26 +00:00
Mark Andrews 8cda49f604 Use file descriptor 3 to save file.prev
If 'set -x' is in effect file.prev gets populated with debugging output.
To prevent this open descriptor 3 and redirect stderr from the awk
command to descriptor 3. Debugging output will stay directed to stderr.

(cherry picked from commit 10f67938db)
2022-11-08 16:44:05 +00:00
Tom Krizek f7ad072501 Merge branch 'tkrizek/danger-approve-v9_16' into 'v9_16'
ci: add danger checks - approve workflow & wip commits [v9_16]

See merge request isc-projects/bind9!7058
2022-11-08 13:41:55 +00:00
Tom Krizek df30dffdd1 Check for cherry pick message in backport commits in danger CI
Using the -x option for cherry pick makes it easy to link commits across
branches and it is recommended to use for all backport commits (with
exceptions -- thus a warning level rather than failure).

(cherry picked from commit 5ecb277090)
2022-11-08 14:40:14 +01:00
Tom Krizek f8ed380890 Detect work-in-progress commits in danger CI
To avoid accidentally merging unfinished work, detect prohibited
keywords at the start of the subject line. If the first word is any of
the following, fail the check:
WIP, wip, DROP, drop, TODO, todo

The only slightly controversial is the lowercase "drop" which might have
a legitimate use - seems like four commits in the history used it as a
start of a sentence. However, since people commonly use "drop" to
indicate a commit should be dropped before merging, let's prohibit it as
well. In case of false-positive, "Drop" with a capitalized first letter
can always be used.

(cherry picked from commit 402b11431c)
2022-11-08 14:40:14 +01:00
Tom Krizek 3a6e014b20 Use approve button workflow in danger CI
Since the LGTM label was deprecated in favor of using the Approve button
in gitlab, adjust the detection in danger bot.

Unfortunately, danger-python seems no longer maintained since 2020 and
MR approvals aren't available in its Python API (even though they're
supported in its Ruby/JS APIs). Going forward, let's use the more
comprehensive python-gitlab API.

It still makes sense to utilize the danger-python, since it handles the
integration with gitlab which doesn't need to be reimplemented as long
as it works - same with the other checks.

(cherry picked from commit e901342dd9)
2022-11-08 14:40:08 +01:00
Michał Kępień 04e434f113 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.36' into 'v9_16'
Set up version and release notes for BIND 9.16.36

See merge request isc-projects/bind9!7055
2022-11-08 12:30:14 +00:00
Michał Kępień cc71b0afb0 Set up release notes for BIND 9.16.36 2022-11-08 13:24:19 +01:00
Michał Kępień 74ff93af19 Update BIND version to 9.16.36-dev 2022-11-08 13:24:19 +01:00
Michał Kępień 4ce90d03a8 Merge branch 'prep-release' into v9_16_35-release 2022-11-07 23:12:59 +01:00
Michał Kępień a87c400fa8 prep 9.16.35 2022-11-07 23:12:48 +01:00
Michał Kępień 42e0859163 Merge branch 'michal/prepare-documentation-for-bind-9.16.35' into 'v9_16_35-release'
Prepare documentation for BIND 9.16.35

See merge request isc-private/bind9!473
2022-11-07 22:09:29 +00:00
Michał Kępień 619cd8d80f Add release note for GL #3603 2022-11-07 23:05:01 +01:00
Michał Kępień 472598f7ed Add release note for GL #3247 2022-11-07 23:05:01 +01:00
Michał Kępień b91a75098f Reorder release notes 2022-11-07 23:05:01 +01:00
Michał Kępień aa24942237 Tweak and reword release notes 2022-11-07 23:05:01 +01:00
Michał Kępień 20275113f5 Prepare release notes for BIND 9.16.35 2022-11-07 23:05:01 +01:00
Michał Kępień 8d15ce5ff0 Merge branch 'pspacek/doc-known-issues-reshuffle-v9_16' into 'v9_16'
[v9_16] Repeat Known Issues at the top of Release Notes page

See merge request isc-projects/bind9!7044
2022-11-07 14:10:58 +00:00
Petr ŠpačekandMichał Kępień 04cd80c0f5 Repeat Known Issues at the top of Release Notes page
From now on all per-version notes link to the global list
of Known Issues. If there is a new note it should be listed twice:
In the per-version list, and in the global list.

(cherry picked from commit c58dd2790a)
2022-11-07 15:04:23 +01:00
Michał Kępień 9b22c414ce Merge branch '3652-reference-manual-update-policies-unmatched-parenthesis-v9_16' into 'v9_16'
[v9_16] Add missing closing ')' to update-policy documentation

See merge request isc-projects/bind9!7039
2022-11-07 12:49:55 +00:00
Mark AndrewsandMichal Nowak bf3a8c7de9 Add missing closing ')' to update-policy documentation
The opening '(' before local was not being matched by a closing
')' after the closing '};'.

(cherry picked from commit 044c3b2bb8)
2022-11-07 13:08:20 +01:00
Michał Kępień a9f5cbb4da Merge branch 'each-dupsigs-test-v9_16' into 'v9_16'
make dupsigs test less timing-sensitive [v9_16]

See merge request isc-projects/bind9!7037
2022-11-07 10:56:01 +00:00
Evan HuntandTom Krizek 4840d6f9c9 make dupsigs test less timing-sensitive
the dupsigs test is prone to failing on slow CI machines
because the first test can occur before the zone is fully
signed.

instead of just waiting ten seconds arbitrarily, we now
check every second, and allow up to 30 seconds before giving
up.

(cherry picked from commit d9b85cbaae)
2022-11-07 10:29:00 +01:00
Tom Krizek 149bda2764 Merge branch 'tkrizek/revert-random-algorithm-randomization' into 'v9_16'
Revert "Merge branch '3503-random-default-algorithm-in-tests-v9_16' into 'v9_16'"

See merge request isc-projects/bind9!7019
2022-11-04 09:32:02 +00:00
Tom Krizek a1fd85ac70 Revert "Merge branch '3503-random-default-algorithm-in-tests-v9_16' into 'v9_16'"
This reverts commit a7ac1e0105, reversing
changes made to d690c55ed7.
2022-11-04 10:08:51 +01:00
Ondřej Surý 4e326b23fb Merge branch '3643-dont-use-dns_zone_attach-in-zone_refreshkeys-v9_16' into 'v9_16'
Don't use dns_zone_attach() in zone_refreshkeys() [9.16]

See merge request isc-projects/bind9!7026
2022-11-03 15:10:06 +00:00
Ondřej Surý a6e3fc20d0 Don't use dns_zone_attach() in zone_refreshkeys()
The zone_refreshkeys() could run before the zone_shutdown(), but after
the last .erefs has been "detached" causing assertion failure when doing
dns_zone_attach().  Remove the use of .erefs (dns_zone_attach/detach)
and replace it with using the .irefs and additional checks whether the
zone is exiting in the callbacks.

(cherry picked from commit 80e66fbd2d)
2022-11-03 15:35:58 +01:00
Matthijs Mekking aee91a01b4 Merge branch '3591-nsec3-crash-dynamic-to-inline-signing-v9_16' into 'v9_16'
[v9_16] Fix crash where dnssec-policy zone with NSEC3 crashes when inline-signing is turned on

See merge request isc-projects/bind9!7021
2022-11-03 14:31:24 +00:00
Matthijs Mekking 23f87f5ca7 Add release note and change for GL #3591
Breaking news.

(cherry picked from commit 1cf2f6fe68)
2022-11-03 14:45:12 +01:00
Matthijs Mekking e4808e1f5f If a zone is not reusable, trigger full sign
If after a reconfig a zone is not reusable because inline-signing
was turned on/off, trigger a full resign. This is necessary because
otherwise the zone maintenance may decide to only apply the changes
in the journal, leaving the zone in an inconsistent DNSSEC state.

(cherry picked from commit 4d143f2cc4)
2022-11-03 14:44:41 +01:00
Matthijs Mekking 949768b252 Don't allow DNSSEC records in the raw zone
There was an exception for dnssec-policy that allowed DNSSEC in the
unsigned version of the zone. This however causes a crash if the
zone switches from dynamic to inline-signing in the case of NSEC3,
because we are now trying to add an NSEC3 record to a non-NSEC3 node.
This is because BIND expects none of the records in the unsigned
version of the zone to be NSEC3.

Remove the exception for dnssec-policy when copying non DNSSEC
records, but do allow for DNSKEY as this may be a published DNSKEY
from a different provider.

(cherry picked from commit 332b98ae49)
2022-11-03 14:44:35 +01:00
Matthijs Mekking 9533b68089 Remove checks when going to dnssec-policy none
The changes in the code have the side effect that the CDNSKEY and CDS
records in the secure version of the zone are not reusable and thus
are thrashed from the zone. Remove the apex checks for this use case.
We only care about that the zone is not immediately goes bogus, but
a user really should use the built-in "insecure" policy when unsigning
a zone.

(cherry picked from commit bc703a12e7)
2022-11-03 14:41:31 +01:00
Matthijs Mekking 3656e8c967 Add nsec3 system test that transfers in NSEC3
Similar to an attempt to add NSEC through dynamic update, add a test
case that tries to add NSEC3 through zone transfer.

(cherry picked from commit ef1cb9935c)
2022-11-03 14:41:23 +01:00
Matthijs Mekking ee18cfe215 Add two more nsec3 system tests
Add one more case that tests reconfiguring a zone to turn off
inline-signing. It should still be a valid DNSSEC zone and the NSEC3
parameters should not change.

Add another test to ensure that you cannot update the zone with a
NSEC3 record.

(cherry picked from commit 4cd8e8e9c3)
2022-11-03 14:41:05 +01:00
Matthijs Mekking 8f6efb8446 Update kasp system test to work with .signed files
We no longer accept copying DNSSEC records from the raw zone to
the secure zone, so update the kasp system test that relies on this
accordingly.

Also add more debugging and store the dnssec-verify results in a file.

(cherry picked from commit 57ea9e08c6)
2022-11-03 14:39:38 +01:00
Matthijs Mekking 9bef41046f Test changing from dynamic to inline-signing
Add a kasp system test that reconfigures a dnssec-policy zone from
maintaining DNSSEC records directly to the zone to using inline-signing.

Add a similar test case to the nsec3 system test, testing the same
thing but now with NSEC3 in use.

(cherry picked from commit 9018fbb205)
2022-11-03 14:39:23 +01:00
Tom Krizek a7ac1e0105 Merge branch '3503-random-default-algorithm-in-tests-v9_16' into 'v9_16'
Random selection of DEFAULT_ALGORITHM in system tests at runtime [v9_16]

See merge request isc-projects/bind9!6994
2022-11-01 18:52:54 +00:00
Tom Krizek df436ed93b ci: disable algorithm support checking in softhsm
The algorithm support detection script doesn't seem to work when using
the SoftHSM module. For some reason, dnssec-keygen returns 'crypto
failure'. Since the tests themselves pass, this is likely to be some
bug/definiency in the test scripts that check algorithm support that get
confused by SoftHSM.

Since this issue only happens for the system:gcc:softhsm2.6 job in the
9.16 branch, use a workaround to not introduce this new feature for
this particular problematic job.
2022-11-01 19:51:52 +01:00
Tom Krizek b5946acfc9 Randomize algorithm selection for mkeys test
Use the ALGORITHM_SET option to use randomly selected default algorithm
in this test. Make sure the test works by using variables instead of
hard-coding values.

(cherry picked from commit f65f276f98)
2022-11-01 19:51:52 +01:00
Tom Krizek 8a6fc2d20e Set algorithms for system tests at runtime
Use the get_algorithms.py script to detect supported algorithms and
select random algorithms to use for the tests.

Make sure to load common.conf.sh after KEYGEN env var is exported.

(cherry picked from commit 69b608ee9f)
2022-11-01 19:51:52 +01:00
Tom Krizek 8b5a9c185a Script for random algorithm selection in system tests
Multiple algorithm sets can be defined in this script. These can be
selected via the ALGORITHM_SET environment variable. For compatibility
reasons, "stable" set contains the currently used algorithms, since our
system tests need some changes before being compatible with randomly
selected algorithms.

The script operation is similar to the get_ports.py - environment
variables are created and then printed out as `export NAME=VALUE`
commands, to be interpreted by shell. Once we support pytest runner for
system tests, this should be a fixture instead.

(cherry picked from commit 5f480c8485)
2022-11-01 19:51:52 +01:00
Tom Krizek ae86743e7b Export env variables in system tests
Certain variables have to be exported in order for the system tests to
work. It makes little sense to export the variables in one place/script
while they're defined in another place.

Since it makes no harm, export all the variables to make the behaviour
more predictable and consistent. Previously, some variables were
exported as environment variables, while others were just shell
variables which could be used once the configuration was sourced from
another script. However, they wouldn't be exposed to spawned processes.

For simplicity sake (and for the upcoming effort to run system tests
with pytest), export all variables that are used. TESTS, PARALLEL_UNIX
and SUBDIRS variables are automake-specific, aren't used anywhere else
and thus not exported.

(cherry picked from commit 37d14c69c0)
2022-11-01 19:51:52 +01:00
Tom Krizek edd923e8eb Support testcrypto.sh usage without including conf.sh
The only variable really needed for the script to work is the path to
the $KEYGEN binary. Allow setting this via an environment variable to
avoid loading conf.sh (and causing a chicken-egg problem). Also make
testcrypto.sh executable to allow its use from conf.sh.

(cherry picked from commit bb1c6bbdc7)
2022-11-01 19:51:52 +01:00
Tom Krizek a51b0ad31f Unify indentation level in testcrypto.sh
(cherry picked from commit 01b293b055)
2022-11-01 19:51:49 +01:00
Arаm Sаrgsyаn d690c55ed7 Merge branch '2895-named-can-create-unrecoverable-managed-keys-v9_16' into 'v9_16'
[v9_16] Don't trust a placeholder KEYDATA record

See merge request isc-projects/bind9!7009
2022-11-01 12:11:16 +00:00
Aram Sargsyan 854b2cf182 Add CHANGES and release notes for [GL #2895]
(cherry picked from commit 3bf4bc7336)
2022-11-01 11:20:25 +00:00
Aram Sargsyan 78e04d8d0c Don't trust a placeholder KEYDATA record
When named starts it creates an empty KEYDATA record in the managed-keys
zone as a placeholder, then schedules a key refresh. If key refresh
fails for some reason (e.g. connectivity problems), named will load the
placeholder key into secroots as a trusted key during the next startup,
which will break the chain of trust, and named will never recover from
that state until managed-keys.bind and managed-keys.bind.jnl files are
manually deleted before (re)starting named again.

Before calling load_secroots(), check that we are not dealing with a
placeholder.

(cherry picked from commit 354ae2d7e3)
2022-11-01 10:55:38 +00:00
Aram Sargsyan f12260c435 Test managed-keys placeholder
Add a dnssec test to make sure that named can correctly process a
managed-keys zone with a placeholder KEYDATA record.

(cherry picked from commit 8c48eabbc1)
2022-11-01 10:55:19 +00:00
Evan Hunt 946c389254 Merge branch '3617-keyfetch-race-v9_18-v9_16' into 'v9_16'
Call dns_resolver_createfetch() asynchronously in zone_refreshkeys()

See merge request isc-projects/bind9!7007
2022-11-01 09:22:52 +00:00
Evan Hunt 90c41d41d7 CHANGES for [GL #3617] 2022-11-01 01:46:39 -07:00
Evan Hunt 8010389902 Call dns_resolver_createfetch() asynchronously in zone_refreshkeys()
Because dns_resolver_createfetch() locks the view, it was necessary
to unlock the zone in zone_refreshkeys() before calling it in order
to maintain the lock order, and relock afterward. this permitted a race
with dns_zone_synckeyzone().

This commit moves the call to dns_resolver_createfetch() into a separate
function which is called asynchronously after the zone has been
unlocked.

The keyfetch object now attaches to the zone to ensure that
it won't be shut down before the asynchronous call completes.

This necessitated refactoring dns_zone_detach() so it always runs
unlocked. For managed zones it schedules zone_shutdown() to
run asynchronously; for unmanaged zones there is no task.
2022-11-01 01:46:17 -07:00
Tom Krizek 2e7f973c6e Merge branch '3517-serve-stale-cache-timeout-0-test-v9_16' into 'v9_16'
[v9_16] [CVE-2022-3080] Test serve stale cache with timeout 0 and CNAME

See merge request isc-projects/bind9!6977
2022-10-24 13:08:48 +00:00
Tom Krizek 29782e5613 Remove misleading comment from serve-stale test
The stale-answer-client-timeout option is not set to 0 in the config
neither is it the default value. This was probably caused by a
copy-paste error.
2022-10-24 14:39:48 +02:00
Tom Krizek 01293b86d9 Test serve stale cache with timeout 0 and CNAME
Add a couple of tests that verify the serve-stale behavior when
stale-answer-client-timeout is set to 0 and a (stale) CNAME record is
queried.

Related #3517
2022-10-24 14:39:46 +02:00
Michał Kępień d736356e3d Merge branch 'michal/bump-sphinx-version-to-5.3.0-v9_16' into 'v9_16'
[v9_16] Bump Sphinx version to 5.3.0

See merge request isc-projects/bind9!6974
2022-10-24 09:57:45 +00:00
Michał Kępień f93e4c160c Bump Sphinx version to 5.3.0
Make the Sphinx version listed in doc/arm/requirements.txt match the
version currently used in GitLab CI, so that Read the Docs builds the
documentation using the same Python software versions as those used in
GitLab CI.

(cherry picked from commit a8f0ab7df6)
2022-10-24 11:45:25 +02:00
Arаm Sаrgsyаn 523fa7c3a9 Merge branch '3603-resolver-prefetch-eligibility-edge-case-bug-v9_16' into 'v9_16'
[v9_16] Synchronize prefetch "trigger" and "eligibility" code and documentation

See merge request isc-projects/bind9!6970
2022-10-21 11:48:32 +00:00
Aram Sargsyan c65c6ecee5 Getting the "prefetch" setting from the configuration cannot fail
The "prefetch" setting is in "defaultconf" so it cannot fail, use
INSIST to confirm that.

The 'trigger' and 'eligible' variables are now prefixed with
'prefetch_' and their declaration moved to an upper level, because
there is no more additional code block after this change.

(cherry picked from commit 0227565cf1)
2022-10-21 10:30:56 +00:00
Aram Sargsyan ee7179f482 Fix prefetch "trigger" value's documentation in ARM
For the prefetch "trigger" parameter ARM states that when a cache
record with a lower TTL value is encountered during query processing,
it is refreshed. But in reality, the record is refreshed when the TTL
value is lower or equal to the configured "trigger" value.

Fix the documentation to make it match with with the code.

(cherry picked from commit ef344b1f52)
2022-10-21 10:30:43 +00:00
Aram Sargsyan 2f5bd9c15d Add a CHANGES note for [GL #3603]
(cherry picked from commit 041ffac0d7)
2022-10-21 10:30:37 +00:00
Aram Sargsyan 648e71b086 Match prefetch eligibility behavior with ARM
ARM states that the "eligibility" TTL is the smallest original TTL
value that is accepted for a record to be eligible for prefetching,
but the code, which implements the condition doesn't behave in that
manner for the edge case when the TTL is equal to the configured
eligibility value.

Fix the code to check that the TTL is greater than, or equal to the
configured eligibility value, instead of just greater than it.

(cherry picked from commit 863f51466e)
2022-10-21 10:30:28 +00:00
Aram Sargsyan 822dd7b8b9 Add another prefetch check in the resolver system test
The test triggers a prefetch, but fails to check if it acutally
happened, which prevented it from catching a bug when the record's
TTL value matches the configured prefetch eligibility value.

Check that prefetch happened by comparing the TTL values.

(cherry picked from commit 89fa9a6592)
2022-10-21 10:30:13 +00:00
Arаm Sаrgsyаn 64fa7d0360 Merge branch '3598-adb-quota-might-not-be-decremented-v9_16' into 'v9_16'
[v9_16] Resolve "ADB quota might not be decremented"

See merge request isc-projects/bind9!6968
2022-10-21 10:01:07 +00:00
Aram Sargsyan 16a06d1dc3 Add CHANGES and release notes for [GL #3598]
(cherry picked from commit 6f50972e5f)
2022-10-21 09:04:13 +00:00
Aram Sargsyan c3660564ce Call dns_adb_endudpfetch() on error path, if required
For UDP queries, after calling dns_adb_beginudpfetch() in fctx_query(),
make sure that dns_adb_endudpfetch() is also called on error path, in
order to adjust the quota back.

(cherry picked from commit 5da79e2be0)
2022-10-21 08:46:43 +00:00
Artem Boldariev 5e2c20a88c Merge branch '3563-fix-named-startup-on-manycore-solaris-systems-v9-16' into 'v9_16'
[Backport to v9.16] Fix named failing to start on Solaris systems with hundreds of CPUs

See merge request isc-projects/bind9!6963
2022-10-20 13:28:36 +00:00
Artem Boldariev 425fd36162 Modify release notes [GL #3563]
Mention that a startup problem on manycore Solaris systems is fixed.

(cherry picked from commit 2c9400f116)
2022-10-20 15:23:00 +03:00
Artem Boldariev d6c0aed9df Modify CHANGES [GL #3563]
Mention that a startup problem on manycore Solaris systems is fixed.

(cherry picked from commit 03ee132e28)
2022-10-20 15:22:09 +03:00
Artem Boldariev 46664bfe5d Fix named failing to start on Solaris systems with hundreds of CPUs
This commit fixes a startup issue on Solaris systems with
many (reportedly > 510) CPUs by bumping RLIMIT_NOFILE. This appears to
be a regression from 9.11.

(cherry picked from commit fff01fe7eb)
2022-10-20 15:21:53 +03:00
Michal Nowak 1015ccf6a2 Merge tag 'v9_16_34' into v9_16
BIND 9.16.34
2022-10-20 12:51:06 +02:00
Michal Nowak c4a2ea04d0 Merge branch '3394-cve-2022-2795-test-v9_16' into 'v9_16'
[v9_16] Add tests for CVE-2022-2795

See merge request isc-projects/bind9!6956
2022-10-20 08:22:19 +00:00
Michał KępieńandMichal Nowak 67319f1004 Add tests for CVE-2022-2795
Add a test ensuring that the amount of work fctx_getaddresses() performs
for any encountered delegation is limited: delegate example.net to a set
of 1,000 name servers in the redirect.com zone, the names of which all
resolve to IP addresses that nothing listens on, and query for a name in
the example.net domain, checking the number of times the findname()
function gets executed in the process; fail if that count is excessively
large.

Since the size of the referral response sent by ans3 is about 20 kB, it
cannot be sent back over UDP (EMSGSIZE) on some operating systems in
their default configuration (e.g. FreeBSD - see the
net.inet.udp.maxdgram sysctl).  To enable reliable reproduction of
CVE-2022-2795 (retry patterns vary across BIND 9 versions) and avoid
false positives at the same time (thread scheduling - and therefore the
number of fetch context restarts - vary across operating systems and
across test runs), extend bin/tests/system/resolver/ans3/ans.pl so that
it also listens on TCP and make "ns1" in the "resolver" system test
always use TCP when communicating with "ans3".

Also add a test (foo.bar.sub.tld1/TXT) that ensures the new limitations
imposed on the resolution process by the mitigation for CVE-2022-2795 do
not prevent valid, glueless delegation chains from working properly.

(cherry picked from commit 604d8f0b96)
2022-10-20 10:19:22 +02:00
Evan Hunt 828e7f5257 Merge branch '3247-rpz-ip-cd-v9_16' into 'v9_16'
ensure RPZ lookups handle CD=1 correctly

See merge request isc-projects/bind9!6958
2022-10-20 00:31:52 +00:00
Evan Hunt 08ed9185cd CHANGES for [GL #3247] 2022-10-19 13:18:49 -07:00
Evan Hunt 2cf5fd67c0 add a test with CD=1 query for pending data
this is a regression test for [GL #3247].
2022-10-19 13:17:32 -07:00
Evan Hunt 8e4a1f3483 ensure RPZ lookups handle CD=1 correctly
RPZ rewrites called dns_db_findext() without passing through the
client database options; as as result, if the client set CD=1,
DNS_DBFIND_PENDINGOK was not used as it should have been, and
cache lookups failed, resulting in failure of the rewrite.

(cherry picked from commit 305a50dbe1)
2022-10-19 13:16:51 -07:00
Tom Krizek 8097e97d9b Merge branch 'tkrizek/system-tests-fixes-v9_16' into 'v9_16'
Update various system tests and add them to default test suite [v9_16]

See merge request isc-projects/bind9!6950
2022-10-19 14:59:23 +00:00
Tom Krizek a8f286c9a5 Remove generated controls.conf file from system tests
The controls.conf file shouldn't be used directly without templating it
first. Remove this no longer used hard-coded file to avoid confusion.

(cherry picked from commit cbd0355328)
2022-10-19 16:58:56 +02:00
Tom Krizek 456baa7f4a Revive dupsigs system test
Speed up the test from 20 minutes to 2.5 minutes and make it part of the
default test suite executed in CI.
- decrease number of records to sign from 2000 to 500
- decrease the signing interval by a factor of 6
- shorten the final part of the test after last signing (since nothing
  new happens there)

Finally, clarify misleading comments about (in)sufficient time for zone
re-signing. The time used in the test is in fact sufficient for the
re-signing to happen. If it wasn't, the previous ZSK would end up being
deleted while its signatures would still be present, which is a
situation where duplicate signatures can still happen.

(cherry picked from commit cb0a2ae1dd)
2022-10-19 16:58:56 +02:00
Tom Krizek 84d6484c5a Revive the stress system test
Ensure the port numbers are dynamically filled in with copy_setports.

Clarify test fail condition.

Make the stress test part of the default test suite since it doesn't
seem to run too long or interfere with other tests any more (the
original note claiming so is more than 20 years old).

Related !6883

(cherry picked from commit 7495deea3e)
2022-10-19 16:58:56 +02:00
Tom Krizek 81a224f418 Revive dialup system test
Properly template the port number in config files with copy_setports.

The test takes two minutes on my machine which doesn't seem like a
proper justification to exclude it from the test suite, especially
considering we run these tests in parallel nowadays. The resource usage
doesn't seems significantly increased so it shouldn't interfere with
other system tests.

There also exists a precedent for longer running system tests that are
already part of the default system test suite (e.g. serve-stale takes
almost three minutes on the same machine).

(cherry picked from commit 235ae5f344)
2022-10-19 16:58:55 +02:00
Matthijs Mekking 4c70fd2e21 Merge branch 'matthijs-fix-dnssec-signing-log-lovel-v9_16' into 'v9_16'
[v9_16] Change log level when doing rekey

See merge request isc-projects/bind9!6940
2022-10-19 14:27:58 +00:00
Matthijs Mekking cbdf23e5ec Change log level when doing rekey
This log happens when BIND checks the parental-agents if the DS has
been published. But if you don't have parental-agents set up, the list
of keys to check will be empty and the result will be ISC_R_NOTFOUND.
This is not an error, so change the log level to debug in this case.

(cherry picked from commit a1d57fc8cb)
2022-10-18 16:31:01 +02:00
Petr Špaček a6f9d0c7c4 Merge branch 'pspacek/ci-no-developer-mode-v9_16' into 'v9_16'
Add CI job with --disable-developer [v9_16]

See merge request isc-projects/bind9!6936
2022-10-18 13:48:35 +00:00
Petr Špaček b57241ddbb Allow system tests to run under root user when inside CI
https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
says variable CI_SERVER="yes" is available in all versions of Gitlab.

(cherry picked from commit ddf46056ca)

Adapted to v9_16's version of run.sh.
2022-10-18 15:18:13 +02:00
Petr Špaček 6a7ec0c01c Build gcc:oraclelinux9:amd64 CI jobs with --disable-developer
Purpose of this is to guard against tests which rely on querytrace or
other optional features enabled by --enable-developer switch.

(cherry picked from commit d6db5c5335)
2022-10-18 15:16:16 +02:00
Ondřej Surý b3cb637a67 Merge branch 'ondrej-add-ISC_LIST,LINK_INITIALIZER-v9_16' into 'v9_16'
Add ISC_{LIST,LINK}_INITIALIZER for designated initializers

See merge request isc-projects/bind9!6935
2022-10-18 13:15:29 +00:00
Ondřej Surý 7b4cf67261 Replace (void *)-1 with ISC_LINK_TOMBSTONE
Instead of having "arbitrary" (void *)-1 to define non-linked, add a
ISC_LINK_TOMBSTONE(type) macro that replaces the "magic" value with a
define.

(cherry picked from commit 5e20c2ccfb)
2022-10-18 14:30:49 +02:00
Ondřej Surý a317b2ea1c Add ISC_{LIST,LINK}_INITIALIZER for designated initializers
Since we are using designated initializers, we were missing initializers
for ISC_LIST and ISC_LINK, add them, so you can do

    *foo = (foo_t){ .list = ISC_LIST_INITIALIZER };

Instead of:

    *foo = (foo_t){ 0 };
    ISC_LIST_INIT(foo->list);

(cherry picked from commit cb3c36b8bf)
2022-10-18 14:30:49 +02:00
Arаm Sаrgsyаn 3c34c54b6c Merge branch '3584-ns_statscounter_recursclients-bug-v9_16' into 'v9_16'
[v9_16] Fix ns_statscounter_recursclients counting bug

See merge request isc-projects/bind9!6929
2022-10-18 11:26:10 +00:00
Aram Sargsyan 8dbdf6bc1b Add a release note for [GL #3584]
(cherry picked from commit d83642b3ac)
2022-10-18 10:38:04 +00:00
Aram Sargsyan f82f78d7f6 Add a CHANGES note for [GL #3584]
(cherry picked from commit 5b1ef41897)
2022-10-18 10:38:04 +00:00
Aram Sargsyan b6aeccf697 Fix ns_statscounter_recursclients counting bug
The incrementing and decrementing of 'ns_statscounter_recursclients'
were not properly balanced: for example, it would be incremented for
a prefetch query but not decremented if the query failed.

This commit ensures that the recursion quota and the recursive clients
counter are always in sync with each other.

(cherry picked from commit 82991451b4)
2022-10-18 10:38:04 +00:00
Michal Nowak b4158582fe Merge branch 'mnowak/grep-warnings-fix-ci-check' into 'v9_16'
Check systests.output for Grep warnings

See merge request isc-projects/bind9!6923
2022-10-18 09:20:31 +00:00
Michal Nowak 18b639c222 Check systests.output for Grep warnings
The v9_16 branch does not have "*.log" system test artifact BIND 9.18+
has and systests.output file needs to be checked for Grep warnings
instead.
2022-10-18 11:12:47 +02:00
Petr Špaček 816148bbce Merge branch 'pspacek/doc-nsupdate-server-gsstsig-v9_16' into 'v9_16'
Document that nsupdate ignores server command in GSS-TSIG mode [v9_16]

See merge request isc-projects/bind9!6926
2022-10-18 08:23:06 +00:00
Petr Špaček b7cae87b2b Document that nsupdate ignores server command in GSS-TSIG mode
This behavior is present since introduction of GSS-TSIG support,
commit 289ae548d5.

(cherry picked from commit c8a38d70f0)
2022-10-18 10:14:54 +02:00
Arаm Sаrgsyаn 8a6b239000 Merge branch 'aram/cfg_print_duration-uninitialized-length-v9_16' into 'v9_16'
[v9_16] Fix a logical bug in cfg_print_duration()

See merge request isc-projects/bind9!6921
2022-10-17 12:02:03 +00:00
Aram Sargsyan 790db0a344 Handle large numbers when parsing/printing a duration
The duration_fromtext() function is truncating large numbers
to 32 bits instead of capping or rejecting them, i.e. 64424509445,
which is 0xf00000005, gets parsed as 32-bit value 5 (0x00000005).

Fail parsing a duration if any of its components is bigger than
32 bits. Using those kind of big numbers has no practical use case
for a duration.

The cfg_obj_asduration() function can overflow the 32 bit
seconds variable when calculating the duration from its component
parts.

To avoid that, use 64-bit calculation and return UINT32_MAX if the
calculated value is bigger than UINT32_MAX. Again, a number this big
has no practical use case anyway.

The buffer for the generated duration string is limited to 64 bytes,
which, in theory, is smaller than the longest possible generated
duration string.

Use 80 bytes instead, calculated by the '7 x (10 + 1) + 3' formula,
where '7' is the count of the duration's parts (year, month, etc.), '10'
is their maximum length when printed as a decimal number, '1' is their
indicator character (Y, M, etc.), and 3 is two more indicators (P and T)
and the terminating NUL character.

(cherry picked from commit fddaebb285)
2022-10-17 11:09:06 +00:00
Aram Sargsyan 12560d1736 Add a CHANGES note for [GL !6880]
(cherry picked from commit 190aab84d7)
2022-10-17 11:09:06 +00:00
Aram Sargsyan d9a8c43107 Fix an off-by-one error in cfg_print_duration()
The cfg_print_duration() checks added previously in the 'duration_test'
unit test uncovered a bug in cfg_print_duration().

When calculating the current 'str' pointer of the generated text in the
buffer 'buf', it erroneously adds 1 byte to compensate for that part's
indicator character. For example, to add 12 minutes, it needs to add
2 + 1 = 3 characters, where 2 is the length of "12", and 1 is the length
of "M" (for minute). The mistake was that the length of the indicator
is already included in 'durationlen[i]', so there is no need to
calculate it again.

In the result of this mistake the current pointer can advance further
than needed and end up after the zero-byte instead of right on it, which
essentially cuts off any further generated text. For example, for a
5 minutes and 30 seconds duration, instead of having this:

    'P', 'T', '5', 'M', '3', '0', 'S', '\0'

The function generates this:

    'P', 'T', '5', 'M', '\0', '3', '0', 'S', '\0'

Fix the bug by adding to 'str' just 'durationlen[i]' instead of
'durationlen[i] + 1'.

(cherry picked from commit dc55f1ebb9)
2022-10-17 11:09:06 +00:00
Aram Sargsyan b7c5e95d6d Test cfg_print_duration() in duration_test.c
Currently the 'duration_test' unit test checks only the
cfg_obj_asduration() function.

Extend the test so it checks also the reverse operation using the
cfg_print_duration() function, which is used in named-checkconf.

(cherry picked from commit 39290bb7cd)
2022-10-17 11:09:06 +00:00
Aram Sargsyan f458f6496d Fix a logical bug in cfg_print_duration()
The cfg_print_duration() function prints a ISO 8601 duration value
converted from an array of integers, where the parts of the date and
time are stored.

durationlen[6], which holds the "seconds" part of the duration, has
a special case in cfg_print_duration() to ensure that when there are
no values in the duration, the result still can be printed as "PT0S",
instead of just "P", so it can be a valid ISO 8601 duration value.

There is a logical error in one of the two special case code paths,
when it checks that no value from the "date" part is defined, and no
"hour" or "minute" from the "time" part are defined.

Because of the error, durationlen[6] can be used uninitialized, in
which case the second parameter passed to snprintf() (which is the
maximum allowed length) can contain a garbage value.

This can not be exploited because the buffer is still big enough to
hold the maximum possible amount of characters generated by the "%u%c"
format string.

Fix the logical bug, and initialize the 'durationlen' array to zeros
to be a little safer from other similar errors.

(cherry picked from commit 9440910187)
2022-10-17 09:17:56 +00:00
Ondřej Surý cda3b93232 Merge branch 'mnowak/fix-grep-3.8-warnings-v9_16' into 'v9_16'
Fix GNU Grep 3.8 warnings [v9_16]

See merge request isc-projects/bind9!6919
2022-10-17 07:39:47 +00:00
Michal NowakandOndřej Surý e0625baf3f Add CI check for Grep warnings
(cherry picked from commit 759e8a6671)
2022-10-17 09:12:51 +02:00
Michal NowakandOndřej Surý 4be4deb740 Replace fgrep and egrep with grep -F/-E
GNU Grep 3.8 reports the following warnings:

    egrep: warning: egrep is obsolescent; using grep -E
    fgrep: warning: fgrep is obsolescent; using grep -F

(cherry picked from commit 212c4de043)
2022-10-17 09:12:02 +02:00
Michal NowakandOndřej Surý 52b86104ca Remove stray backslashes
GNU Grep 3.8 reports several instances of stray backslashes in matching
patterns:

    grep: warning: stray \ before /
    grep: warning: stray \ before :

(cherry picked from commit 65e91ef5e6)
2022-10-17 09:11:20 +02:00
Tom Krizek d3b8050793 Merge branch 'tkrizek/remove-system-test-delzone-v9_16' into 'v9_16'
Remove system test delzone [v9_16]

See merge request isc-projects/bind9!6912
2022-10-14 16:26:23 +00:00
Tom Krizek 2637043f01 Remove system test delzone
There are multiple reasons to remove this test as obsolete:

- The test may not possibly work for over 2.5 years, since
  98b3b93791 removed the rndc.py python
  tool on which this test relies.
- It isn't part of the test suite either in CI or locally unless it is
  explicitly enabled. As a result, there are many issues which prevent
  the test from being executed caused by various refactoring efforts
  accumulated over time.
- Even if the test could be executed, it has no clear failure condition.
  If the python script(s) fail, the test still passes.

(cherry picked from commit 05180154d9)
2022-10-14 16:48:38 +02:00
Michał Kępień 042c33a381 Merge branch '3592-fix-startup-detection-after-restart-in-start.pl-v9_16' into 'v9_16'
[v9_16] Fix startup detection after restart in start.pl

See merge request isc-projects/bind9!6891
2022-10-11 10:27:43 +00:00
Michał Kępień e535dc2b59 Fix startup detection after restart in start.pl
The bin/tests/system/start.pl script waits until a "running" message is
logged by a given name server instance before attempting to send a
version.bind/CH/TXT query to it.  The idea behind this was to make the
script wait until named loads all the zones it is configured to serve
before telling the system test framework that a given server is ready to
use; this prevents the need to add boilerplate code that waits for a
specific zone to be loaded to each test expecting that.

The problem is that when it looks for "running" messages, the
bin/tests/system/start.pl script assumes that the existence of any such
message in the named.run file indicates that a given named instance has
already finished loading all zones.  Meanwhile, some system tests
restart all the named instances they use throughout their lifetime (some
even do that a few times), for example to run Python-based tests.  The
bin/tests/system/start.pl script handles such a scenario incorrectly: as
soon as it finds any "running" message in the named.run file it inspects
and it gets a response to a version.bind/CH/TXT query, it tells the
system test framework that a given server is ready to use, which might
not be true - it is possible that only the "version.bind" zone is loaded
at that point and the "running" message found was logged by a
previously-shutdown named instance. This triggers intermittent failures
for Python-based tests.

Fix by improving the logic that the bin/tests/system/start.pl script
uses to detect server startup: check how many "running" lines are
present in a given named.run file before attempting to start a named
instance and only proceed with version.bind/CH/TXT queries when the
number of "running" lines found in that named.run file increases after
the server is started.

(cherry picked from commit 18e20f95f6)
2022-10-11 11:59:02 +02:00
Michał Kępień c11f286d34 Do not truncate ns2 logs in the "rrsetorder" test
In the "rrsetorder" system test, the ns2 named instance is restarted
without passing the --restart option to bin/tests/system/start.pl.  This
causes the log file for that named instance to be needlessly truncated.
Prevent this from happening by restarting the affected named instance
in the same way as all the other named instances used in system tests.

(cherry picked from commit 9146b956ae)
2022-10-11 11:59:02 +02:00
Michał Kępień 5e926b444d Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.35' into 'v9_16'
Set up version and release notes for BIND 9.16.35

See merge request isc-projects/bind9!6886
2022-10-10 21:36:43 +00:00
Michał Kępień aa85812c26 Set up release notes for BIND 9.16.35 2022-10-10 23:20:13 +02:00
Michał Kępień 6263e04544 Update BIND version to 9.16.35-dev 2022-10-10 23:20:13 +02:00
Michał Kępień 08724b7eef Merge branch 'prep-release' into v9_16_34-release 2022-10-10 10:08:17 +02:00
Michał Kępień b06081eb36 prep 9.16.34 2022-10-10 10:08:17 +02:00
Michał Kępień d31b8fe1f4 Merge branch 'michal/prepare-documentation-for-bind-9.16.34' into 'v9_16_34-release'
Prepare documentation for BIND 9.16.34

See merge request isc-private/bind9!465
2022-10-07 11:45:15 +00:00
Michał Kępień 2a00ea6305 Reorder release notes 2022-10-07 13:40:53 +02:00
Michał Kępień e392bb194c Tweak and reword release notes 2022-10-07 13:40:53 +02:00
Michał Kępień 1fbff9bc80 Prepare release notes for BIND 9.16.34 2022-10-07 13:40:53 +02:00
Michał Kępień 1a90242ce4 Fix the location of a misplaced CHANGES entry 2022-10-07 13:40:53 +02:00
Petr Špaček 6e3ca66116 Merge branch '3554-improve-dnssec-policy-inline-signing-err-msg-v9_16' into 'v9_16'
Clarify new configuration incompabitility: dnssec-policy vs. inline-signing [v9_16]

See merge request isc-projects/bind9!6872
2022-10-06 08:55:44 +00:00
Petr Špaček 21c58497e2 Add Known Issue about config incompatibility
(cherry picked from commit 5589d0a49c)

Adapted for v9_16 branch: Removed hyperlinks, removed note about 9.18.
2022-10-06 10:32:52 +02:00
Petr Špaček d63bc6af08 Clarify error message about missing inline-signing & dnssec-policy
(cherry picked from commit 058c1744ba)
2022-10-06 10:31:15 +02:00
Mark Andrews 1920c3d073 Merge branch '3577-reloads-in-ixfr-system-test-happen-too-fast-v9_16' into 'v9_16'
Add sleeps to ixfr system test [v9_16]

See merge request isc-projects/bind9!6870
2022-10-05 22:04:04 +00:00
Mark Andrews 03d363d0ee Add sleeps to ixfr system test
ensure that at least a second has passed since a zone was last loaded
to prevent it accidentally being skipped as up to date.

(cherry picked from commit 491a8cfe96)
2022-10-06 08:36:38 +11:00
Michal Nowak 2227974961 Merge branch 'mnowak/drop-flake8-ignore-lists-v9_16' into 'v9_16'
[v9_16] Drop flake8 ignore lists

See merge request isc-projects/bind9!6868
2022-10-05 16:40:05 +00:00
Michal Nowak 9f27c3f95e Drop flake8 ignore lists
flake8 is not used in BIND 9 CI and inline ignore lists are not needed
anymore.

(cherry picked from commit f5d9fa6ea4)
2022-10-05 18:33:34 +02:00
Petr Špaček 4fab54454d Merge branch 'pspacek/tsan-ci-artifacts-fix-v9_16' into 'v9_16'
Fix TSAN artifact gathering in CI [v9_16]

See merge request isc-projects/bind9!6859
2022-10-05 08:20:31 +00:00
Petr Špaček 815f89dbf9 Fix TSAN artifact gathering in CI
Fixup for 2c3b2dabe9.

We forgot to update TSAN paths when moving all the unit tests to
/tests/.  Let's remove paths from find to make it less dependent on
exact location, and store all untracked files as we do in the normal
unit test template.

Related: !6243

(cherry picked from commit 9559eb3b21)
Adapted for v9_16 branch.
2022-10-05 09:50:54 +02:00
Evan Hunt 5770858152 Merge branch '3493-clear-httpd-buffer-v9_16' into 'v9_16'
compression buffer was not cleared properly

See merge request isc-projects/bind9!6854
2022-10-05 06:06:49 +00:00
Evan Hunt 7b6140e756 compression buffer was not cleared properly
clear the compression buffer before use. this eliminates the
possibility of a latent bug that, when combined with other changes,
allowed an overread in a later version of BIND.
2022-10-04 10:12:24 -07:00
Mark Andrews 59230bb58f Merge branch '3544-add-dohpath-parsing-to-svbc-v9_16' into 'v9_16'
Add support for 'dohpath' to SVCB (and HTTPS) [v9_16]

See merge request isc-projects/bind9!6850
2022-10-04 06:24:57 +00:00
Mark Andrews 9bb5157adf Use strnstr implementation from FreeBSD if not provided by OS
(cherry picked from commit 5f07fe8cbb)
2022-10-04 17:05:18 +11:00
Mark Andrews 5568aca5a5 Add release note for [GL #3544]
(cherry picked from commit 2f3441b40a)
2022-10-04 15:34:10 +11:00
Mark Andrews 14f4dadfe5 Add CHANGES note for [GL #3544]
(cherry picked from commit 335b397e15)
2022-10-04 15:34:08 +11:00
Mark Andrews e396d5d72d Add support for 'dohpath' to SVCB (and HTTPS)
dohpath is specfied in draft-ietf-add-svcb-dns and has a value
of 7.  It must be a relative path (start with a /), be encoded
as UTF8 and contain the variable dns ({?dns}).

(cherry picked from commit 6d561d3886)
2022-10-04 15:33:49 +11:00
Michal Nowak 120077bcc2 Merge branch 'mnowak/add-oracle-linux-9-v9_16' into 'v9_16'
[v9_16] Add Oracle Linux 9

See merge request isc-projects/bind9!6808
2022-10-03 13:17:57 +00:00
Michal Nowak 7ae22392da Add Oracle Linux 9
(cherry picked from commit be08cf41d9)
2022-10-03 13:28:26 +02:00
Mark AndrewsandMichal Nowak 47e8a98240 keymgr: use DEFAULT_ALGORITHM instead of {nsec3}rsasha1 2022-10-03 13:28:26 +02:00
Michal Nowak f822943473 coverage: use $DEFAULT_ALGORITHM 2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak 21cd56b42b Fix mkeys to work with DEFAULT_ALGORITHM properly
Stop using a RSASHA1 fixed key in ns3's named.conf as the
trusted key and instead compute a broken digest from the
real digest to use in trusted-keys.

(cherry picked from commit be4cbe2b80)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak 42727aab9a kasp: stop using RSASHA1 unless necessary for the test
Moves tests from being RSASHA1 based to RSASHA256 based where possible
and split out the remaining RSASHA1 based tests so that they are not
run on OS's that don't support RSASHA1.

(cherry picked from commit db028684e5)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak 4daa3d6dae keymgr2kasp: use FIPS compliant algorithms and key sizes
migrate-nomatch-alglen: switched to RSASHA256 instead of RSASHA1
and the key size now changes from 2048 bits to 3072 bits instead
of 1024 bits to 2048 bits.

migrate-nomatch-algnum: switched to RSASHA256 instead of RSASHA1
as initial algorithm and adjusted mininum key size to 2048 bits.

rsasha256: adjusted minimum key size to 2048 bits.

(cherry picked from commit 048b015166)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak 3d642f46f2 dnssec/signer/general: Replace RSASHA1 keys with RSASHA512 keys
RSASHA1 is verify only in FIPS mode. Use RSASHA256 instead.

(cherry picked from commit 9c6de6d12d)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak c6abcefee1 Check if RSASHA1 is supported by the OS
(cherry picked from commit 1690cb7bb4)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak 77e0878444 autosign: use FIPS compatible algorithms and key sizes
The nsec-only.example zone was not converted as we use it to
test nsec-only DNSSEC algorithms to nsec3 conversion failure.
The subtest is skipped in fips mode.

Update "checking revoked key with duplicate key ID" test
to use FIPS compatible algorithm.

(cherry picked from commit 99ad09975e)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak e6d1117891 rsabigexponent: convert the test from RSASHA1 to RSASHA256
RSASHA1 is not supported on some platforms.

(cherry picked from commit 8c3c011860)
2022-10-03 13:28:25 +02:00
Mark AndrewsandMichal Nowak fe4d8ca7c7 mkeys: use $() instead of back quotes
(cherry picked from commit 0e45a2b02c)
2022-10-03 13:19:35 +02:00
Mark AndrewsandMichal Nowak 4950ab72e8 Upgrade uses of hmac-sha1 to DEFAULT_HMAC
where the test is not hmac-sha1 specific

(cherry picked from commit c533e8bc5b)
2022-10-03 13:19:35 +02:00
Mark AndrewsandMichal Nowak aafc3f8cf3 Add CHANGES not for [GL #3440]
(cherry picked from commit be88c583bd)
2022-10-03 13:19:35 +02:00
Mark AndrewsandMichal Nowak e8545ad255 zonechecks: use $DEFAULT_ALGORITHM
(cherry picked from commit 459e6980e5)
2022-10-03 13:19:35 +02:00
Mark AndrewsandMichal Nowak 864a2b127a wildcard: use $DEFAULT_ALGORITHM
(cherry picked from commit 3f65c9cf85)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 76a154d8b1 views: use $DEFAULT_ALGORITHM
(cherry picked from commit 86b29606c3)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 16c6557aa2 verify: use $DEFAULT_ALGORITHM
(cherry picked from commit 93f7c7cdcd)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 150ace9801 upforwd: use $DEFAULT_ALGORITHM
(cherry picked from commit 5585909904)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 516694cd8c unknown: use $DEFAULT_ALGORITHM
(cherry picked from commit 9970d4317d)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak b8645af516 synthfromdnssec: use $DEFAULT_ALGORITHM
(cherry picked from commit 73fd49f8bb)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak a2d8660485 staticstub: use $DEFAULT_ALGORITHM
(cherry picked from commit 32337b9dbf)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 204811ae41 smartsign: use $DEFAULT_ALGORITHM
(cherry picked from commit 941b95edb0)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 49d8978cb4 rpz: use $DEFAULT_ALGORITHM
(cherry picked from commit 1861c3e503)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak b26a89df34 rootkeysentinel: use $DEFAULT_ALGORITHM
(cherry picked from commit b0e1d9b1b3)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak e78c158ba6 resolver: use $DEFAULT_ALGORITHM
(cherry picked from commit 05ef8c81dd)
2022-10-03 13:19:34 +02:00
Mark AndrewsandMichal Nowak 52ce408f0d redirect: use $DEFAULT_ALGORITHM
(cherry picked from commit e0e03602ba)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak ce8cef8a4b pending: use $DEFAULT_ALGORITHM
(cherry picked from commit 6fd50b9fda)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 1b94de8d1f nsupdate: use $DEFAULT_ALGORITHM
(cherry picked from commit c2d18567fc)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak fd8bd94212 mkeys: use $DEFAULT_ALGORITHM
(cherry picked from commit 78fa082999)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 61cfb9a68e mirror: use $DEFAULT_ALGORITHM
(cherry picked from commit ff95bafa39)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 17a26bced4 metadata: use $DEFAULT_ALGORITHM
(cherry picked from commit 3f1dc83bfb)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 6843c764c6 inline: use $DEFAULT_ALGORITHM
(cherry picked from commit e3acddefd1)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 45c21fd5af dsdigest: use $DEFAULT_ALGORITHM
(cherry picked from commit 49de14cb9e)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 4ba58611c7 dnssec: use $DEFAULT_ALGORITHM
(cherry picked from commit d0b0139c90)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 53625cc639 dns64: use $DEFAULT_ALGORITHM
(cherry picked from commit 5cbf1e1598)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 7cf9e28924 chain: use $DEFAULT_ALGORITHM
(cherry picked from commit 3419178bd2)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 5f146c76bd cds: use $DEFAULT_ALGORITHM
(cherry picked from commit 6cf0b73ede)
2022-10-03 13:19:33 +02:00
Mark AndrewsandMichal Nowak 1bd3c49454 autosign: use $DEFAULT_ALGORITHM
(cherry picked from commit bb810b0ac9)
2022-10-03 13:19:32 +02:00
Mark Andrews 212814cb7e Merge branch '3541-have-named-v-report-supported-algorithms-v9_16' into 'v9_16'
Report supported crypto algorithms [v9_16]

See merge request isc-projects/bind9!6838
2022-09-30 14:25:28 +00:00
Petr ŠpačekandMark Andrews 85d0d86b62 Add release note for new crypto algorithm logging
(cherry picked from commit c138a8aa59)
2022-09-30 09:57:32 +10:00
Petr ŠpačekandMark Andrews 2c09403ab4 Document list of crypto algorithms in named -V output
(cherry picked from commit c648e280e4)
2022-09-30 09:57:32 +10:00
Mark Andrews e8439121ad Deduplicate string formating
(cherry picked from commit d34ecdb366)
2022-09-30 09:57:32 +10:00
Mark Andrews ffbd1ab762 Add CHANGES entry for [GL #3541]
(cherry picked from commit e876de442e)
2022-09-30 09:57:32 +10:00
Mark Andrews 21d4befe09 silence scan-build false positive
(cherry picked from commit 3156d36495)
2022-09-30 09:57:32 +10:00
Mark Andrews 3265fc496e Report algorithms supported by named at startup
(cherry picked from commit cb1515e71f)
2022-09-30 09:57:32 +10:00
Mark Andrews 989811b6d9 Have 'named -V' report supported algorithms
These cover DNSSEC, DS, HMAC and TKEY algorithms.

(cherry picked from commit b308f866c0)
2022-09-30 09:57:32 +10:00
Matthijs Mekking 07748eb298 Merge branch 'matthijs-dnssec-guide-dnssec-policy-requires-inline-signing-v9_16' into 'v9_16'
[v9_16] Add dnssec-policy inline-signing requirement to documentation

See merge request isc-projects/bind9!6833
2022-09-28 09:56:53 +00:00
Matthijs Mekking df11527a9a Add inline-signing to config examples
Add 'inline-signing yes;' to configuration examples to have working
copy paste configurations.

(cherry picked from commit b13a0c8836d2d8bc5b4de1cdfcdb2057c0bb9d93)
2022-09-28 10:54:52 +02:00
Matthijs Mekking 5c0e98410f Update inline-signing requirement to ARM
This change was made in !6403, but the appropriate documentation
changes were not applied to the ARM.

(cherry picked from commit 7231383e4cc57caac36d03055e8627b12aa4b91a)
2022-09-28 10:54:52 +02:00
Matthijs Mekking 309bf3578b Add inline-signing requirement to DNSSEC Guide
This change was made in !6403, but the appropriate documentation
changes were not applied to the DNSSEC Guide.

(cherry picked from commit 09522c8d73)
2022-09-28 10:54:52 +02:00
Mark Andrews 55faa5ab84 Merge branch '3562-assign-default-value-to-suffix-v9_16' into 'v9_16'
Suffix may be used before it is assigned a value [v9_16]

See merge request isc-projects/bind9!6837
2022-09-28 04:22:41 +00:00
Mark Andrews 7f2b46f4e5 Suffix may be used before it is assigned a value
CID 350722 (#5 of 7): Bad use of null-like value (FORWARD_NULL)
        12. invalid_operation: Invalid operation on null-like value suffix.
    145        r.authority.append(
    146            dns.rrset.from_text(
    147                "icky.ptang.zoop.boing." + suffix,
    148                1,
    149                IN,
    150                NS,
    151                "a.bit.longer.ns.name." + suffix,
    152            )
    153        )

(cherry picked from commit 432064f63c)
2022-09-28 11:19:50 +10:00
Mark Andrews c2884d1a4b Merge branch '3551-missing-rsa_free-call-in-opensslrsa_verify2-v9_16' into 'v9_16'
Free 'rsa' if 'e' is NULL in opensslrsa_verify2 [v9_16]

See merge request isc-projects/bind9!6835
2022-09-28 00:42:18 +00:00
Mark Andrews a2a06cf376 Add CHANGES note for [GL #3551]
(cherry picked from commit 1e3680193a)
2022-09-28 10:06:40 +10:00
Mark Andrews 12f902796d Check BN_dup results in rsa_check
(cherry picked from commit a47235f4f5)
2022-09-28 10:06:39 +10:00
Mark Andrews 2c8e38f359 Free 'n' on error path in rsa_check
(cherry picked from commit 483c5a1978)
2022-09-28 10:06:39 +10:00
Mark Andrews 03c5db001e Check that 'e' and 'n' are allocated in opensslrsa_fromdns
(cherry picked from commit db70c30213)
2022-09-28 10:06:39 +10:00
Mark Andrews 0b0718fba3 Check that 'e' and 'n' are non-NULL in opensslrsa_todns
(cherry picked from commit 5603cd69d1)
2022-09-28 09:56:03 +10:00
Mark Andrews 6f1e04409a Free 'rsa' if 'e' is NULL in opensslrsa_verify2
(cherry picked from commit a2b51ca6ac)
2022-09-28 09:53:27 +10:00
Mark Andrews 067dbde287 Merge branch '3557-catalog-zone-check-key-names-v9_16' into 'v9_16'
Check that primary key names have not changed [v9_16]

See merge request isc-projects/bind9!6827
2022-09-27 14:18:06 +00:00
Mark Andrews 3353529920 Add release note for [GL #3557]
(cherry picked from commit eacf41a20a)
2022-09-27 23:58:22 +10:00
Mark Andrews 034c34e634 Add CHANGES note for [GL #3557]
(cherry picked from commit 0774dacf2d)
2022-09-27 23:58:22 +10:00
Mark Andrews 4fc1975709 Check that changing the TSIG key is successful
Switch the primary to require 'next_key' for zone transfers then
update the catalog zone to say to use 'next_key'.  Next update the
zones contents then check that those changes are seen on the
secondary.

(cherry picked from commit 176e172210)
2022-09-27 23:58:22 +10:00
Mark Andrews 9524c493c9 Check that primary key names have not changed
When looking for changes in a catalog zone member zone we need to
also check if the TSIG key name associated with a primary server
has be added, removed or changed.

(cherry picked from commit 9172bd9b5a)
2022-09-27 22:20:41 +10:00
Michał Kępień e72a275606 Merge branch 'mnowak/add-fedora-36-v9_16' into 'v9_16'
[v9_16] Add Fedora 36

See merge request isc-projects/bind9!6821
2022-09-27 07:44:52 +00:00
Michal NowakandMichał Kępień 5b1ab4615a Add Fedora 36
(cherry picked from commit a313c49a3b)
2022-09-27 09:42:50 +02:00
Evan Hunt 0f68ad8830 Merge branch '3553-buffer-assertions-v9_16' into 'v9_16'
add assertions to isc_buffer macros

See merge request isc-projects/bind9!6802
2022-09-27 07:16:01 +00:00
Evan Hunt 2fdaa100c1 add assertions to isc_buffer macros
if ISC_BUFFER_USEINLINE is defined, then macros are used to implement
isc_buffer primitives (isc_buffer_init(), isc_buffer_region(), etc).
otherwise, functions are used. previously, only the functions had
DbC assertions, which made it possible for coding errors to go
undetected. this commit makes the macro versions enforce the same
requirements.
2022-09-26 23:48:21 -07:00
Petr Špaček dd8c1f9f61 Merge branch 'bug/main/doc-arm-rhel9-v9_16' into 'v9_16'
Compatibility for building ARM on older sphinx [v9_16]

See merge request isc-projects/bind9!6818
2022-09-26 15:39:32 +00:00
Petr MenšíkandPetr Špaček 8b07d457ef Simplify allowing warnings during ARM build
RHEL8 Sphinx does not support all features used in ARM building. But
with few emitted warnings it can build the documentation fine. Simplify
warnings acceptance by allowing make doc SPHINX_W=''.

(cherry picked from commit 3db7e241d2)
2022-09-26 17:30:48 +02:00
Petr MenšíkandPetr Špaček e036ac4d3d Compatibility for building ARM on older sphinx
Make documentation building successful even on RHEL9 sphinx 3.4.3. It
does not like case-insensitive matching of terms, so provide lowercase
text description with Uppercase word reference.

(cherry picked from commit bc6c6b1184)
2022-09-26 17:29:07 +02:00
Petr Špaček 81fd2d9874 Merge branch '3547-dns_message_checksig-leak-fix-v9_16' into 'v9_16'
Fix memory leak in dns_message_checksig() - SIG(0) sigs [v9_16]

See merge request isc-projects/bind9!6814
2022-09-26 11:06:42 +00:00
Mark AndrewsandPetr Špaček 2905d70ad1 Stop passing mctx to dns_rdata_tostruct as it is unnecessary for SIG
dns_rdata_tostruct doesn't need a mctx passed to it for SIG (the signer
is already expanded at this point). About the only time when mctx is
needed is when the structure is to be used after the rdata has been
destroyed.

(cherry picked from commit d6ad56bd9e)
2022-09-26 12:45:21 +02:00
Petr Špaček 3e77d6bf87 Fix memory leak in dns_message_checksig() - SIG(0) sigs
Impact should be visible only in tests or tools because named never
uses view == NULL, which is a necessary condition to trigger this leak.

(cherry picked from commit 69256b3553)
2022-09-26 12:45:17 +02:00
Michał Kępień e2448146cf Merge branch '3475-named-man-page-fix-ncpus' into 'v9_16'
Fix the description of named's -n option

See merge request isc-projects/bind9!6797
2022-09-21 17:48:25 +00:00
Michał Kępień fe0b04d8d3 Fix the description of named's -n option
Since the advent of netmgr, named no longer creates a single thread per
CPU, but rather a set of two threads per CPU.  Update the man page for
named accordingly to prevent confusion.
2022-09-21 19:47:13 +02:00
Petr Špaček 9d5e7aca9c Merge branch '3542-arm-stats-socket-caution' into 'v9_16'
Provide stronger wording about the security of statistics channel

See merge request isc-projects/bind9!6795
2022-09-21 16:06:04 +00:00
Ondřej SurýandPetr Špaček f830737c51 Provide stronger wording about the security of statistics channel
Add more text about the importance of properly securing the statistics
channel and what is and what is not considered a security vulnerability.

(cherry-picked from commit 6869c98d36)
2022-09-21 17:49:49 +02:00
Michał Kępień 69c38b5e1c Merge tag 'v9_16_33' into v9_16
BIND 9.16.33
2022-09-21 13:21:29 +02:00
Mark Andrews 6711d7d179 Merge branch '3525-key-id-clashes-across-algorithms-cause-problems-with-statistics-v9_18-v9_16' into 'v9_16'
Suppress manykeys test on duplicate key ids [v9_16]

See merge request isc-projects/bind9!6785
2022-09-16 00:21:12 +00:00
Mark Andrews ff883fd75f Suppress manykeys test on duplicate key ids
If there are duplicate key ids across multiple algorithms expected
output is no met.  We have fixed this in on main but decided to not
back port the fix as it will change the statistics channel output.

This change detects when there are duplicate key id across algorithms
as skips the sub test.

(cherry picked from commit ea1d3476a8)
2022-09-16 09:49:41 +10:00
Evan Hunt d244ff84ac Merge branch '3522-update-detach-v9_16' into 'v9_16'
fix an incorrect detach in update processing

See merge request isc-projects/bind9!6783
2022-09-15 20:14:30 +00:00
Evan Hunt 338663b1cd CHANGES for [GL #3522] 2022-09-15 11:36:37 -07:00
Evan Hunt 17924f4bdf fix an incorrect detach in update processing
when processing UDPATE requests, hold the request handle until
we either drop the request or respond to it.

(cherry picked from commit 00e0758e12)
2022-09-15 11:35:42 -07:00
Michal Nowak 97ea818086 Merge branch '3427-tcp-system-test-bump-socket.create_connection-timeout-v9_16' into 'v9_16'
[v9_16] Bump socket.create_connection() timeout to 10 seconds

See merge request isc-projects/bind9!6781
2022-09-15 12:41:03 +00:00
Michal Nowak 9b41b63607 Bump socket.create_connection() timeout to 10 seconds
The tcp Pytest on OpenBSD fairly reliably fails when receive_tcp()
on a socket is attempted:

    >           (response, rtime) = dns.query.receive_tcp(sock, timeout())

    tests-tcp.py:50:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    /usr/local/lib/python3.9/site-packages/dns/query.py:659: in receive_tcp
        ldata = _net_read(sock, 2, expiration)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    sock = <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    count = 2, expiration = 1662719959.8106785

        def _net_read(sock, count, expiration):
            """Read the specified number of bytes from sock.  Keep trying until we
            either get the desired amount, or we hit EOF.
            A Timeout exception will be raised if the operation is not completed
            by the expiration time.
            """
            s = b''
            while count > 0:
                try:
    >               n = sock.recv(count)
    E               socket.timeout: timed out

This is because the socket is already closed.

Bump the socket connection timeout to 10 seconds.

(cherry picked from commit 658cae9fad)
2022-09-15 12:36:14 +02:00
Tony Finch f3766061e7 Merge branch '3531-initialize-struct-server-v9_16' into 'v9_16'
Ensure that named_server_t is properly initialized

See merge request isc-projects/bind9!6761
2022-09-12 10:40:40 +00:00
Tony Finch dff843199f Ensure that named_server_t is properly initialized
There was a ubsan error reporting an invalid value for interface_auto
(a boolean value cannot be 190) because it was not initialized. To
avoid this problem happening again, ensure the whole of the server
structure is initialized to zero before setting the (relatively few)
non-zero elements.
2022-09-12 11:21:37 +01:00
Michał Kępień 208fc897b1 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.34' into 'v9_16'
Set up version and release notes for BIND 9.16.34

See merge request isc-projects/bind9!6760
2022-09-09 18:23:14 +00:00
Michał Kępień 666d315087 Set up release notes for BIND 9.16.34 2022-09-09 20:00:15 +02:00
Michał Kępień 990bd74104 Update BIND version to 9.16.34-dev 2022-09-09 20:00:15 +02:00
Michał Kępień 35e9c6e31d Merge branch 'prep-release' into security-v9_16 2022-09-08 15:01:23 +02:00
Michał Kępień 31fdc767f7 prep 9.16.33 2022-09-08 15:01:10 +02:00
Michał Kępień f4ad07e82d Merge branch 'michal/prepare-documentation-for-bind-9.16.33' into 'security-v9_16'
Prepare documentation for BIND 9.16.33

See merge request isc-private/bind9!460
2022-09-08 12:40:59 +00:00
Michał Kępień 907b764b2a Tweak and reword release notes 2022-09-08 14:33:43 +02:00
Michał Kępień b54ee83d50 Prepare release notes for BIND 9.16.33 2022-09-08 14:33:43 +02:00
Michał Kępień 0657c81d59 Merge branch '3487-eddsa-verify-leak-v9_16' into 'security-v9_16'
[v9_16] [CVE-2022-38178] eddsa verify leak

See merge request isc-private/bind9!440
2022-09-08 10:18:54 +00:00
Mark AndrewsandMichał Kępień ffd69ff780 Add release note for [GL #3487]
(cherry picked from commit e6cb1de20b)
2022-09-08 12:16:36 +02:00
Mark AndrewsandMichał Kępień a385e884f5 Add CHANGES note for [GL #3487]
(cherry picked from commit b3277f2e10)
2022-09-08 12:16:36 +02:00
Mark AndrewsandMichał Kępień 1af23378eb Free ctx on invalid siglen
(cherry picked from commit 6ddb480a84)
2022-09-08 12:16:36 +02:00
Michał Kępień 1f1c4734fb Merge branch '3487-ecdsa-verify-leak' into 'security-v9_16'
[v9_16][CVE-2022-38177] ecdsa verify leak

See merge request isc-private/bind9!421
2022-09-08 10:14:18 +00:00
Mark AndrewsandMichał Kępień 62c45573ba Add release note for [GL #3487] 2022-09-08 12:12:36 +02:00
Mark AndrewsandMichał Kępień 21518e169a Add CHANGES note for [GL #3487] 2022-09-08 12:12:36 +02:00
Mark AndrewsandMichał Kępień 5b2282afff Free eckey on siglen mismatch 2022-09-08 12:12:36 +02:00
Michał Kępień b3abc2a844 Merge branch '3517-serve-stale-client-timeout-0-cname-crash-v9_16' into 'security-v9_16'
[v9_16] [CVE-2022-3080] Fix serve-stale-client-timeout 0 CNAME crash

See merge request isc-private/bind9!448
2022-09-08 10:10:34 +00:00
Matthijs MekkingandMichał Kępień 8ee4c3bbdc Add release notes for #3517
(cherry picked from commit 97c6c3712e)
2022-09-08 12:08:28 +02:00
Matthijs MekkingandMichał Kępień 57bf78e1ea Add CHANGES entry for 3517
(cherry picked from commit e394902965)
2022-09-08 12:08:28 +02:00
Matthijs MekkingandMichał Kępień 3f68e2ad83 Only refresh RRset once
Don't attempt to resolve DNS responses for intermediate results. This
may create multiple refreshes and can cause a crash.

One scenario is where for the query there is a CNAME and canonical
answer in cache that are both stale. This will trigger a refresh of
the RRsets because we encountered stale data and we prioritized it over
the lookup. It will trigger a refresh of both RRsets. When we start
recursing, it will detect a recursion loop because the recursion
parameters will eventually be the same. In 'dns_resolver_destroyfetch'
the sanity check fails, one of the callers did not get its event back
before trying to destroy the fetch.

Move the call to 'query_refresh_rrset' to 'ns_query_done', so that it
is only called once per client request.

Another scenario is where for the query there is a stale CNAME in the
cache that points to a record that is also in cache but not stale. This
will trigger a refresh of the RRset (because we encountered stale data
and we prioritized it over the lookup).

We mark RRsets that we add to the message with
DNS_RDATASETATTR_STALE_ADDED to prevent adding a duplicate RRset when
a stale lookup and a normal lookup conflict with each other. However,
the other non-stale RRset when following a CNAME chain will be added to
the message without setting that attribute, because it is not stale.

This is a variant of the bug in #2594. The fix covered the same crash
but for stale-answer-client-timeout > 0.

Fix this by clearing all RRsets from the message before refreshing.
This requires the refresh to happen after the query is send back to
the client.

(cherry picked from commit d939d2ecde)
2022-09-08 12:08:28 +02:00
Michał Kępień 0d5aecf3be Merge branch '3394-security-cve-2022-2795-mitigation-v9_16' into 'security-v9_16'
[CVE-2022-2795] [v9_16] Bound the amount of work performed for delegations

See merge request isc-private/bind9!453
2022-09-08 10:06:06 +00:00
Michał Kępień 315d35589a Add release note for GL #3394
(cherry picked from commit 672072812c)
2022-09-08 11:11:30 +02:00
Michał Kępień ed6aa5c503 Add CHANGES entry for GL #3394
(cherry picked from commit e802beedfc)
2022-09-08 11:11:30 +02:00
Michał Kępień bf2ea6d852 Bound the amount of work performed for delegations
Limit the amount of database lookups that can be triggered in
fctx_getaddresses() (i.e. when determining the name server addresses to
query next) by setting a hard limit on the number of NS RRs processed
for any delegation encountered.  Without any limit in place, named can
be forced to perform large amounts of database lookups per each query
received, which severely impacts resolver performance.

The limit used (20) is an arbitrary value that is considered to be big
enough for any sane DNS delegation.

(cherry picked from commit 3a44097fd6)
2022-09-08 11:11:30 +02:00
Michał Kępień 65245d8b3d Merge branch '3459-rrl-wildcard-handling-v9_16' into 'v9_16'
[v9_16] Make RRL code treat all QNAMEs subject to wildcard processing within a given zone as the same name

See merge request isc-projects/bind9!6749
2022-09-08 08:23:57 +00:00
Aram SargsyanandMichał Kępień 5b6e4465be Add CHANGES and release notes for [GL #3459]
(cherry picked from commit 0b0cf12741)
2022-09-08 09:41:15 +02:00
Aram SargsyanandMichał Kępień 6f46bfe705 Document RRL processing for wildcard names
All valid wildcard domain names are interpreted as the zone's origin
name concatenated to the "*" name.

(cherry picked from commit 89c2032421)
2022-09-08 09:41:15 +02:00
Aram SargsyanandMichał Kępień 3ad0f165ab Fix RRL responses-per-second bypass using wildcard names
It is possible to bypass Response Rate Limiting (RRL)
`responses-per-second` limitation using specially crafted wildcard
names, because the current implementation, when encountering a found
DNS name generated from a wildcard record, just strips the leftmost
label of the name before making a key for the bucket.

While that technique helps with limiting random requests like
<random>.example.com (because all those requests will be accounted
as belonging to a bucket constructed from "example.com" name), it does
not help with random names like subdomain.<random>.example.com.

The best solution would have been to strip not just the leftmost
label, but as many labels as necessary until reaching the suffix part
of the wildcard record from which the found name is generated, however,
we do not have that information readily available in the context of RRL
processing code.

Fix the issue by interpreting all valid wildcard domain names as
the zone's origin name concatenated to the "*" name, so they all will
be put into the same bucket.

(cherry picked from commit baa9698c9d)
2022-09-08 09:41:15 +02:00
Matthijs Mekking f917f9480e Merge branch 'matthijs-fix-intermittent-inline-system-test-failure-v9_16' into 'v9_16'
[v9_16] Fix intermittent inline system test failure

See merge request isc-projects/bind9!6740
2022-09-07 15:34:24 +00:00
Matthijs Mekking d1336d49b3 Update inline system test, zone 'retransfer3.'
The zone 'retransfer3.' tests whether zones that 'rndc signing
-nsec3param' requests are queued even if the zone is not loaded.

The test assumes that if 'rndc signing -list' shows that the zone is
done signing with two keys, and there are no NSEC3 chains pending, the
zone is done handling the '-nsec3param' queued requests. However, it
is possible that the 'rndc signing -list' command is received before
the corresponding privatetype records are added to the zone (the records
that are used to retrieve the signing status with 'rndc signing').

This is what happens in test failure
https://gitlab.isc.org/isc-projects/bind9/-/jobs/2722752.

The 'rndc signing -list retransfer3' is thus an unreliable check.
It is simpler to just remove the check and wait for a certain amount
of time and check whether ns3 has re-signed the zone using NSEC3.

(cherry picked from commit 8b71cbd09c)
2022-09-07 16:30:19 +02:00
Evan Hunt 559c9c2e33 Merge branch '3521-interface-cleanup' into 'v9_16'
clean up properly when interface creation fails

See merge request isc-projects/bind9!6723
2022-09-07 00:10:10 +00:00
Evan Hunt 80a8322d65 clean up properly when interface creation fails
previously, if ns_clientmgr_create() failed, the interface was not
cleaned up correctly and an assertion or segmentation fault could
follow. this has been fixed.
2022-09-06 13:53:44 -07:00
Arаm Sаrgsyаn f3e0915261 Merge branch '3518-libxml2-deprecated-functions-v9_16' into 'v9_16'
[v9_16] Do not use libxml2 deprecated functions

See merge request isc-projects/bind9!6732
2022-09-06 10:31:48 +00:00
Aram Sargsyan c1be3bda3a Add CHANGES note for [GL #3518]
(cherry picked from commit 87920661b1)
2022-09-06 09:22:42 +00:00
Aram Sargsyan 8b328f0049 Do not use libxml2 deprecated functions
The usage of xmlInitThreads() and xmlCleanupThreads() functions in
libxml2 is now marked as deprecated, and these functions will be made
private in the future.

Use xmlInitParser() and xmlCleanupParser() instead of them.

(cherry picked from commit a5d412d924)
2022-09-06 09:22:35 +00:00
Matthijs Mekking 3e041d15a1 Merge branch '3381-dnssec-policy-explicit-inline-signing-v9_16' into 'v9_16'
[v9_16] dnssec-policy now requires inline-signing

See merge request isc-projects/bind9!6730
2022-09-06 08:48:36 +00:00
Matthijs Mekking 77105a2f60 Add change and release note for #3381
Because folks want to know.

(cherry picked from commit 2b95c11905a1a5faff9efa97a4f2498aadfa467b)
2022-09-06 10:27:34 +02:00
Matthijs Mekking bc9c65f465 Remove implicit inline-signing code
Remove the code that sets implicit inline-signing on zones using
dnssec-policy.

(cherry picked from commit a6b09c9c69186e81a9be54e8b7bb413b1ac4d650)
2022-09-06 10:27:33 +02:00
Matthijs Mekking 145e888815 Update system tests
Update checkconf and kasp related system tests after requiring
inline-signing.

(cherry picked from commit 8fd75e8a4e1035ce0e81bf47d954a3f5b8a4d571)
2022-09-06 10:27:33 +02:00
Matthijs Mekking 30fceec069 dnssec-policy now requires inline-signing
Having implicit inline-signing set for dnssec-policy when there is no
update policy is confusing, so lets make this explicit.

(cherry picked from commit 5ca02fe6e7e591d1fb85936ea4dda720c3d741ef)
2022-09-06 09:06:17 +02:00
Ondřej Surý bc0c7243b1 Merge branch '3485-dig-fallback-to-idna2003-v9_16' into 'v9_16'
Allow fallback to IDNA2003 processing

See merge request isc-projects/bind9!6726
2022-09-05 09:29:59 +00:00
Ondřej Surý 561ef63e14 Add CHANGES and release note for [GL #3485]
(cherry picked from commit 0fe7acb4e6)
2022-09-05 10:22:25 +02:00
Ondřej Surý 104eaf34da Enable the IDNA2003 domain names in the idna system test
Allow the IDNA2003 tests to succeed after the fallback to IDNA2003 was
implemented.

(cherry picked from commit 87de726f5c)
2022-09-05 10:22:23 +02:00
Ondřej Surý efbdf81931 Allow fallback to IDNA2003 processing
In several cases where IDNA2008 mappings do not exist whereas IDNA2003
mappings do, dig was failing to process the suplied domain name.  Take a
backwards compatible approach, and convert the domain to IDNA2008 form,
and if that fails try the IDNA2003 conversion.

(cherry picked from commit 10923f9d87)
2022-09-05 10:21:36 +02:00
Arаm Sаrgsyаn dca244b1c1 Merge branch '3515-mctx-attach-detach-for-isc_mempool_t-v9_16' into 'v9_16'
[v9_16] Add mctx attach/detach when creating/destroying a memory pool

See merge request isc-projects/bind9!6721
2022-09-02 11:34:45 +00:00
Aram Sargsyan 5440f79cc4 Add CHANGES note for [GL #3515]
(cherry picked from commit 362ead8d85)
2022-09-02 09:05:03 +00:00
Aram Sargsyan 32779aba8a Add mctx attach/detach when creating/destroying a memory pool
This should make sure that the memory context is not destroyed
before the memory pool, which is using the context.

(cherry picked from commit e97c3eea95)
2022-09-02 09:05:03 +00:00
Evan Hunt 53fa68b39c Merge branch '3511-quote-yaml-addresses-v9_16' into 'v9_16'
quote addresses in YAML output

See merge request isc-projects/bind9!6718
2022-08-31 23:48:10 +00:00
Evan Hunt 91c61b8d2f CHANGES for [GL #3511] 2022-08-31 16:19:39 -07:00
Evan Hunt 28640e37d8 quote addresses in YAML output
YAML strings should be quoted if they contain colon characters.
Since IPv6 addresses do, we now quote the query_address and
response_address strings in all YAML output.

(cherry picked from commit 66eaf6bb73)
2022-08-31 16:18:57 -07:00
Evan Hunt b6d12e3181 Merge branch '3501-dnstap-response-v9_16' into 'v9_16'
dnstap query_message field was erroneously set with responses

See merge request isc-projects/bind9!6716
2022-08-31 23:15:57 +00:00
Evan Hunt 5efac2b4d2 CHANGES for [GL #3501] 2022-08-31 15:50:30 -07:00
Evan Hunt e1fa6cbab8 dnstap query_message field was erroneously set with responses
The dnstap query_message field was in some cases being filled in
with response messages, along with the response_message field.
The query_message field should only be used when logging requests,
and the response_message field only when logging responses.
2022-08-31 15:49:25 -07:00
Mark Andrews af8e0a2ec9 Merge branch '3505-missing-isc_mutex_destroy-v9_16' into 'v9_16'
Call isc_mutex_destroy(&lasttime_mx); [v9_16]

See merge request isc-projects/bind9!6698
2022-08-24 07:42:25 +00:00
Mark Andrews 5a66ca501b Call isc_mutex_destroy(&lasttime_mx);
(cherry picked from commit 8109f495c8b5d7c7f88d581f7905650add0c184e)
2022-08-24 17:05:00 +10:00
Matthijs Mekking e3b4794ee7 Merge branch '3500-nsec3-missing-detach-node-9_16' into 'v9_16'
[v9_16] nsec3.c: Add a missing dns_db_detachnode() call

See merge request isc-projects/bind9!6694
2022-08-23 11:10:41 +00:00
Matthijs Mekking 31ed140863 Add CHANGES entry for #3500
There is no need for a release because this case was nearly impossible
to trigger (except for when 'sig-signing-type' was set to 0).

(cherry picked from commit 545ecb64b043617ea609f4f115d280bb5990e221)
2022-08-23 12:06:06 +02:00
Matthijs Mekking 58d01b821a nsec3.c: Add a missing dns_db_detachnode() call
There is one case in 'dns_nsec3_activex()' where it returns but forgets
to detach the db node. Add the missing 'dns_db_detachnode()' call.

This case only triggers if 'sig-signing-type' (privatetype) is set to 0
(which by default is not), or if the function is called with 'complete'
is set to 'true' (which at this moment do not exist).

(cherry picked from commit 0cf6c18ccb2205a1fc81431f908c8310f6136bbb)
2022-08-23 12:05:38 +02:00
Mark Andrews 9e7c12d3b7 Merge branch 'bug/main/delv-cfg_parser_reset-v9_16' into 'v9_16'
Reset parser before parsing of internal trust anchor [v9_16]

See merge request isc-projects/bind9!6687
2022-08-19 05:40:59 +00:00
Mark Andrews 414b35aabd Add CHANGES entry for [GL !6468]
(cherry picked from commit 23a8c15cb2efd3486a4e7ea41c1581cb2ed07912)
2022-08-19 15:21:24 +10:00
Petr MenšíkandMark Andrews ba9a140e1f Reset parser before parsing of internal trust anchor
It might be reused if /etc/bind.keys exists, but failed correct parsing.
Release traces of previous parsing attempt of different data.

(cherry picked from commit dc07394c4724c1e1235af85dd8c044af70da93ae)
2022-08-19 15:20:59 +10:00
Michal Nowak 4858e4235d Merge branch 'mnowak/freebsd-13.1-v9_16' into 'v9_16'
[v9_16] Add FreeBSD 13.1

See merge request isc-projects/bind9!6684
2022-08-18 15:58:05 +00:00
Michal Nowak 87dc26e494 Add FreeBSD 13.1
(cherry picked from commit bc425be55e1736d4f2ffada5e8d76f96b08c8351)
2022-08-18 17:34:08 +02:00
Michal Nowak 16458122a8 Merge tag 'v9_16_32' into v9_16
BIND 9.16.32
2022-08-18 11:55:55 +02:00
Mark Andrews 1686b34023 Merge branch '3494-dnssec-awk-test-is-not-precise-enough-v9_16' into 'v9_16'
Improve awk tests to prevent false negatives [v9_16]

See merge request isc-projects/bind9!6677
2022-08-18 04:39:13 +00:00
Mark Andrews 69be4d3bdc Improve awk tests to prevent false negatives
The old code could incorrectly match "INSOA" in the RRSIG rdata
when looking for the SOA record.

(cherry picked from commit 2fc5f6fb2831697c79f75c50a769449ac561aad0)
2022-08-18 13:43:47 +10:00
Michal Nowak f59757d0be Merge branch 'mnowak/coverity-scan-2022.06-v9_16' into 'v9_16'
[v9_16] Use Coverity Scan 2022.06

See merge request isc-projects/bind9!6674
2022-08-17 14:04:39 +00:00
Michal Nowak 6bf3d890b5 Use Coverity Scan 2022.06
(cherry picked from commit 3d683c704e271f1c8107a5b108c93db4bde7db7f)
2022-08-17 16:02:27 +02:00
Arаm Sаrgsyаn ee28d4bd32 Merge branch '3492-fix-tkey.c-buildquery-cleanup-v9_16' into 'v9_16'
[v9_16] Fix tkey.c:buildquery() function's error handling

See merge request isc-projects/bind9!6671
2022-08-17 09:10:49 +00:00
Aram Sargsyan 30b1be4e59 Add CHANGES note for [GL #3492]
(cherry picked from commit 8dd12db505892640d885e81dc6701607da1df67f)
2022-08-17 08:46:31 +00:00
Aram Sargsyan eb72c81e6a Fix tkey.c:buildquery() function's error handling
Add the missing cleanup code.

(cherry picked from commit 4237ab9550eeaea7121e3e3392fd14c26b5150f0)
2022-08-17 08:46:31 +00:00
Michal Nowak 1c6dbb5993 Merge branch 'mnowak/openbsd-7.1-v9_16' into 'v9_16'
[v9_16] Add OpenBSD 7.1

See merge request isc-projects/bind9!6667
2022-08-16 15:21:05 +00:00
Michal Nowak 591d58be6e Add OpenBSD 7.1
(cherry picked from commit 7edf8ab47cfd0cc3a633e941b2880ee11d75d6cd)
2022-08-16 17:17:34 +02:00
Michal Nowak 88aa703c75 Merge branch 'mnowak/configure-find-newer-python-versions' into 'v9_16'
Teach configure to find Python 3.9, 3.10, and 3.11

See merge request isc-projects/bind9!6662
2022-08-15 13:50:23 +00:00
Michal Nowak d92b9a02b1 Teach configure to find Python 3.9, 3.10, and 3.11
FreeBSD does not have python3 symlink, and ./configure relies on finding
python3.X binaries instead.
2022-08-15 15:11:27 +02:00
Evan Hunt 80604b856d Merge branch '3488-prevent-adb-dump-race-v9_18-v9_16' into 'v9_16'
Lock the address entry bucket when dumping ADB namehook

See merge request isc-projects/bind9!6658
2022-08-13 00:48:17 +00:00
Evan Hunt 5aa4adc8e5 Lock the address entry bucket when dumping ADB namehook
When dumping an ADB address entry associated with a name,
the name bucket lock was held, but the entry bucket lock was
not; this could cause data races when other threads were updating
address entry info. (These races are probably not operationally
harmful, but they triggered TSAN error reports.)

(cherry picked from commit f841f545b7)
2022-08-12 17:17:43 -07:00
Michal Nowak 1c1c0e3dca Merge branch '3348-move-pkcs11-interface-test-to-debian-v9_16' into 'v9_16'
[v9_16] Move OpenSSL-based PKCS#11 interface job to Debian "bullseye"

See merge request isc-projects/bind9!6654
2022-08-12 06:50:33 +00:00
Michal Nowak b4b865aacd Move OpenSSL-based PKCS#11 interface job to Debian "bullseye"
Fedora 36 uses OpenSSL 3.0.2 by default, but the OpenSSL engine API
which we use for PKCS#11 is deprecated in OpenSSL 3.0.0. For the
keyfromlabel system test to work operating system with OpenSSL 1.1 needs
to be used.

(cherry picked from commit 2eecebdea91868be571e3c7a5fb3324505fbd2ff)
2022-08-12 08:07:22 +02:00
Matthijs Mekking cd43fa723c Merge branch '2982-servfail-servestale-duplicate-queries-v9_16' into 'v9_16'
[v9_16] Don't enable serve-stale on duplicate queries

See merge request isc-projects/bind9!6643
2022-08-09 09:02:31 +00:00
Matthijs Mekking 294431b8f8 Add release note and change entry for #2982
News worthy.

(cherry picked from commit 2bd4486766)
2022-08-09 09:38:23 +02:00
Matthijs Mekking dd7dde5743 Don't enable serve-stale on duplicate queries
When checking if we should enable serve-stale, add an early out case
when the result is an error signalling a duplicate query or a query
that would be dropped.

(cherry picked from commit 059a4c2f4d)
2022-08-09 09:37:49 +02:00
Michał Kępień 44e0164b6c Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.33' into 'v9_16'
Set up version and release notes for BIND 9.16.33

See merge request isc-projects/bind9!6634
2022-08-05 06:40:40 +00:00
Michał Kępień 571a5b7cca Set up release notes for BIND 9.16.33 2022-08-05 06:58:17 +02:00
Michał Kępień 72b16782e6 Update BIND version to 9.16.33-dev 2022-08-05 06:58:17 +02:00
Michał Kępień 56f3439263 Merge branch 'prep-release' into v9_16_32-release 2022-08-05 00:06:08 +02:00
Michał Kępień d4afcf3dfb prep 9.16.32 2022-08-05 00:06:08 +02:00
Michał Kępień 8ff8f2c1ca Merge branch 'michal/prepare-documentation-for-bind-9.16.32' into 'v9_16_32-release'
Prepare documentation for BIND 9.16.32

See merge request isc-private/bind9!420
2022-08-04 22:04:12 +00:00
Michał Kępień c2ca99b710 Tweak and reword release notes 2022-08-04 23:59:36 +02:00
Michał Kępień 814d9f7bc8 Prepare release notes for BIND 9.16.32 2022-08-04 23:59:36 +02:00
Arаm Sаrgsyаn c863061a13 Merge branch '3461-fetches-per-zone-final-log-message-v9_16' into 'v9_16'
[v9_16] Resolve "Do a better job of logging when fetches-per-zone is triggered"

See merge request isc-projects/bind9!6626
2022-08-01 14:46:29 +00:00
Aram Sargsyan 23bf8afbcb Add CHANGES and release notes for [GL #3461]
(cherry picked from commit 0d64f55f5d)
2022-08-01 14:01:37 +00:00
Aram Sargsyan c0db0d7a8e Improve fetch limit logging
When initially hitting the `fetches-per-zone` value, a log message
is being generated for the event of dropping the first fetch, then
any further log events occur only when another fetch is being dropped
and 60 seconds have been passed since the last logged message.

That logic isn't ideal because when the counter of the outstanding
fetches reaches zero, the structure holding the counters' values will
get deleted, and the information about the dropped fetches accumulated
during the last minute will not be logged.

Improve the fcount_logspill() function to makie sure that the final
values are getting logged before the counter object gets destroyed.

(cherry picked from commit 039871ceb7)
2022-08-01 14:01:26 +00:00
Mark Andrews 6a866e30f5 Merge branch 'marka-set-suffix-in-ans.py-v9_16' into 'v9_16'
Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py [v9_16]

See merge request isc-projects/bind9!6620
2022-07-27 22:06:10 +00:00
Mark Andrews 19bf98201b Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py
initalise suffix to ""

    170        r.answer.append(
    171            dns.rrset.from_text(
    172                lqname + suffix, 1, IN, NS, "a.bit.longer.ns.name." + suffix
    173            )
    174        )
    175        r.flags |= dns.flags.AA
           15. Condition endswith(lqname, "icky.ptang.zoop.boing."), taking true branch.
    176    elif endswith(lqname, "icky.ptang.zoop.boing."):
           CID 350722 (#7 of 7): Bad use of null-like value (FORWARD_NULL)
           16. invalid_operation: Invalid operation on null-like value suffix.
    177        r.authority.append(
    178            dns.rrset.from_text(
    179                "icky.ptang.zoop.boing." + suffix,
    180                1,
    181                IN,
    182                SOA,
    183                "ns2." + suffix + " hostmaster.arpa. 2018050100 1 1 1 1",
    184            )
    185        )

(cherry picked from commit eb798d0478)
2022-07-27 14:27:26 -04:00
Matthijs Mekking 40c5816814 Merge branch '3462-rndc-dumpdb-expired-doesnt-always-work-v9_16' into 'v9_16'
[v9_16] Fix destination port extraction for client queries

See merge request isc-projects/bind9!6613
2022-07-26 08:43:39 +00:00
Matthijs Mekking 3c2f517415 Add change entry and release note for #3462
News worthy.

(cherry picked from commit 44bbc0175c)
2022-07-26 10:02:26 +02:00
Matthijs Mekking f8ad7501dc Fix rndc dumpdb -expired for stuck cache contents
The command 'rndc dumpdb -expired' will include expired RRsets in the
output, but only for the RBTDB_VIRTUAL time (of 5 minutes). This means
that if there is a cache cleaning problem and contents are not cleaned
up, the rndc command has little diagnostic value. Fix this by including
all RRsets in the dumpdb output if the '-expired' flag is set.

(cherry picked from commit 930ba2c914)
2022-07-26 10:02:15 +02:00
Mark Andrews 24bb1d109c Merge branch '3469-auto-disable-rsasha1-and-nsec3rsasha1-when-not-supported-by-the-os-v9_16' into 'v9_16'
Check that we can verify a signature at initialisation time [v9_16]

See merge request isc-projects/bind9!6615
2022-07-25 15:59:21 +00:00
Mark Andrews 8be8257914 Add release note for [GL #3469]
(cherry picked from commit 16b133af40)
2022-07-25 11:37:49 -04:00
Mark Andrews cbd2403633 CHANGES note for [GL #3469]
(cherry picked from commit c549249cb9)
2022-07-25 11:37:49 -04:00
Mark Andrews a1452c32ab Check that we can verify a signature at initialisation time
Fedora 33 doesn't support RSASHA1 in future mode.  There is no easy
check for this other than by attempting to perform a verification
using known good signatures.  We don't attempt to sign with RSASHA1
as that would not work in FIPS mode.  RSASHA1 is verify only.

The test vectors were generated using OpenSSL 3.0 and
util/gen-rsa-sha-vectors.c.  Rerunning will generate a new set of
test vectors as the private key is not preserved.

e.g.
	cc util/gen-rsa-sha-vectors.c -I /opt/local/include \
		-L /opt/local/lib -lcrypto

(cherry picked from commit cd3f00874f)
2022-07-25 11:37:49 -04:00
Evan Hunt 5503d9aa68 Merge branch '2918-deprecate-max-zone-ttl-v9_16' into 'v9_16'
Test dnssec-policy max-zone-ttl rejects zone with too high TTL

See merge request isc-projects/bind9!6611
2022-07-22 22:57:00 +00:00
Evan Hunt a20584dcf8 CHANGES and release note for [GL #2918] 2022-07-22 15:24:34 -07:00
Evan Hunt fb8f102ffc warn about zones with both dnssec-policy and max-zone-ttl
max-zone-ttl in zone/view/options is a no-op if dnssec-policy
is in use, so generate a warning.
2022-07-22 15:24:34 -07:00
Evan Hunt 1ed5eb38e4 clarify "max-zone-ttl" documentation
The "max-zone-ttl" option should now be configured as part of
dnssec-policy. Use of this option in zone/view/options will be ignored
in any zone that also has dnssec-policy configured.
2022-07-22 15:24:29 -07:00
Matthijs MekkingandEvan Hunt 111b215987 Reject zones with TTL higher than dnssec-policy max-zone-ttl
Reject loading of zones with TTL higher than the max-zone-ttl
from the dnssec-policy.

With this change, any zone with a dnssec-policy in use will ignore
the max-zone-ttl option in zone/view/options.
2022-07-22 13:40:12 -07:00
Matthijs MekkingandEvan Hunt 2022384b8d Test dnssec-policy max-zone-ttl rejects zone with too high TTL
Similar to the 'max-zone-ttl' zone option, the 'dnssec-policy' option
should reject zones with TTLs that are out of range.
2022-07-22 13:39:17 -07:00
Petr Špaček 04c76d0055 Merge branch 'pspacek/minor-arm-tweaks-and-fixes-v9_16' into 'v9_16'
Fix dnssec-signzone examples in DNSSEC Guide [v9_16]

See merge request isc-projects/bind9!6604
2022-07-21 13:20:02 +00:00
Petr Špaček a94c063c19 Avoid opt-out flag in dnssec-signzone examples
Since !6413 we discourage opt-out, so we should not be advertising it in
the examples. Even worse, it was just thrown into the command line
without even mentioning its meaning in the surrounding text.

Related: !6413
(cherry picked from commit beae857288)
2022-07-21 15:19:38 +02:00
Petr Špaček 445863c9fd Remove errorneous shell output redirection from dnssec-signzone example
The > looked like shell output redirection. It was present since we
imported DNSSEC Guide into the ARM.

(cherry picked from commit 1ab564d605)
2022-07-21 15:19:38 +02:00
Michal Nowak a0e7b05aba Merge tag 'v9_16_31' into v9_16
BIND 9.16.31
2022-07-21 14:37:36 +02:00
Michał Kępień 55edba1dc6 Merge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests-v9_16' into 'v9_16'
[v9_16] Run a short respdiff test for all merge requests

See merge request isc-projects/bind9!6591
2022-07-18 13:40:05 +00:00
Michał Kępień 1faaefd134 Run a short respdiff test for all merge requests
Running a respdiff test for every merge request would be useful for
catching protocol-breaking changes before they are applied to the source
code.  However, the existing respdiff-based tests take a while to
complete (about half an hour with our current CI infrastructure), which
does not make them a good fit for this purpose.  Add a new GitLab CI
job, "respdiff-short", which uses a smaller query set that gets
processed within a couple of minutes on our current CI infrastructure.
Rename the existing respdiff-based jobs to make distinguishing them
easier.

(cherry picked from commit 31ee43a314)
2022-07-18 15:28:21 +02:00
Michał Kępień 6b03f8bbfc Extract respdiff job definition to a YAML anchor
Ensure the common parts of all jobs using respdiff are available in the
form of a reusable YAML anchor, to reduce code duplication and to
simplify adding more respdiff-based jobs to GitLab CI.

(cherry picked from commit ca20a189f7)
2022-07-18 15:28:21 +02:00
Michał Kępień d02d5b97f5 Use a pre-built executable as the reference named
The "respdiff" GitLab CI job compares DNS responses produced by the
current version of named with those produced by a reference version.
The latter is built from source in each "respdiff" job, despite the fact
that the reference version changes very rarely.  Use a pre-built named
executable as the reference version instead, assuming it is available in
the OS image used for "respdiff" tests.

(cherry picked from commit ab90a4705a)
2022-07-18 15:28:21 +02:00
Ondřej Surý 2e7e47f88d Merge branch '3453-cope-with-too-small-BUFSIZ-v9_16' into 'v9_16'
Increase the BUFSIZ-long buffers [v9.16]

See merge request isc-projects/bind9!6587
2022-07-15 19:48:15 +00:00
Ondřej Surý c1b8f5f30c Increase the BUFSIZ-long buffers
The BUFSIZ value varies between platforms, it could be 8K on Linux and
512 bytes on mingw.  Make sure the buffers are always big enough for the
output data to prevent truncation of the output by appropriately
enlarging or sizing the buffers.

(cherry picked from commit b19d932262)
2022-07-15 21:21:03 +02:00
Michał Kępień cacca9bdf9 Merge branch '3443-memory-related-cleanups-v9_16' into 'v9_16'
[v9_16] Memory-related cleanups

See merge request isc-projects/bind9!6569
2022-07-15 09:01:03 +00:00
Michał Kępień b68851773c Make "named -h" output match option-handling code
The usage instructions printed by "named -h" are missing the "external"
and "internal" flags that can be passed to the -M command-line option.
Add the missing flags to "named -h" output.
2022-07-15 10:45:34 +02:00
Michał Kępień 31012c1c0d Update documentation for named's -M option
Add "internal" to the list of legal values for the -M command-line
option (commit 1f7d2d53f0 added that
flag).

Make the style of the relevant paragraph more in line with the next one
and split its contents up into an unordered list of options for improved
readability.

(cherry picked from commit f0c31ceb3b)
2022-07-15 10:45:34 +02:00
Michał Kępień 4d1986ebcb Handle ISC_MEM_DEFAULTFILL consistently
Contrary to what the documentation states, memory filling is only
enabled by --enable-developer (or by setting -DISC_MEM_DEFAULTFILL=1) if
the internal memory allocator is used.  However, the internal memory
allocator is disabled by default, so just using the --enable-developer
build-time option does not enable memory filling (passing "-M fill" on
the named command line is necessary to actually enable it).  As memory
filling is a useful tool for troubleshooting certain types of bugs, it
should also be enabled by --enable-developer when the system allocator
is used.

Furthermore, memory-related preprocessor macros are handled in two
distinct locations: lib/isc/include/isc/mem.h and bin/named/main.c.
This makes the logic hard to follow.

Move all code handling the ISC_MEM_DEFAULTFILL preprocessor macro to
lib/isc/include/isc/mem.h, ensuring memory filling is enabled by the
--enable-developer build-time switch, no matter which memory allocator
is used.
2022-07-15 10:45:34 +02:00
Michał Kępień 7df6070c02 Fix mempool stats bug in the internal allocator
Commit c96b6eb5ec changed the way mempool
code handles freed allocations that cannot be retained for later use as
"free list" items: it no longer uses different logic depending on
whether the internal allocator is used or the system one.  However, that
commit did not update a relevant piece of code in isc_mempool_destroy(),
causing memory context statistics to always be off upon shutdown when
BIND 9 is built with -DISC_MEM_USE_INTERNAL_MALLOC=1.  This causes
assertion failures.  Update isc_mempool_destroy() accordingly in order
to prevent this issue from being triggered.
2022-07-15 10:45:34 +02:00
Mark Andrews 5338fc9e19 Merge branch '3447-lib-dns-tkey-c-free_namelist-should-be-disassociating-associated-rdatatsets-v9_16' into 'v9_16'
disassociate rdatasets when cleaning up [v9_16]

See merge request isc-projects/bind9!6578
2022-07-14 01:08:57 +00:00
Mark Andrews f2855facbe disassociate rdatasets when cleaning up
free_namelist could be passed names with associated rdatasets
when handling errors.  These need to be disassociated before
calling dns_message_puttemprdataset.

(cherry picked from commit 745d5edc3a)
2022-07-14 10:21:47 +10:00
Mark Andrews 29f0ac40f3 Merge branch '3449-kasp-system-test-failed-to-log-some-zones-during-setup-v9_16' into 'v9_16'
kasp: add missing logging during setup [v9_16]

See merge request isc-projects/bind9!6576
2022-07-14 00:18:27 +00:00
Mark Andrews 9980c7be8d kasp: add missing logging during setup
Some zones where not being logged when just DNSSEC keys where being
generated in system test setup phase.  Add logging for these zones.

(cherry picked from commit 04627997eb)
2022-07-14 09:46:16 +10:00
Mark Andrews 5e5232aa5b Merge branch '3446-autosign-s-checking-revoked-key-with-duplicate-key-id-test-was-incomplete-v9_16' into 'v9_16'
Make "checking revoked key with duplicate key ID" work [v9_16]

See merge request isc-projects/bind9!6558
2022-07-13 01:42:56 +00:00
Mark Andrews 5fec2fcbe7 Make "checking revoked key with duplicate key ID" work
There should be 2 keys with the same key id after the numerically
lower one is revoked (serial space arithmetic).  The DS points
at the non-revoked key so validation should still succeed.

(cherry picked from commit 513cb24b55)
2022-07-13 10:58:41 +10:00
Evan Hunt 492f614d0e Merge branch '2683-ixfr-logging-v9_16' into 'v9_16'
log the reason for falling back to AXFR from IXFR at level info

See merge request isc-projects/bind9!6552
2022-07-12 23:52:47 +00:00
Evan Hunt 0849fd2211 log the reason for falling back to AXFR from IXFR at level info
messages indicating the reason for a fallback to AXFR (i.e, because
the requested serial number is not present in the journal, or because
the size of the IXFR response would exceeed "max-ixfr-ratio") are now
logged at level info instead of debug(4).

(cherry picked from commit df1d81cf96)
2022-07-12 16:27:01 -07:00
Michal Nowak d0bf87eab5 Merge branch 'mnowak/alpine-3.16-v9_16' into 'v9_16'
[v9_16] Add Alpine Linux 3.16

See merge request isc-projects/bind9!6549
2022-07-12 12:01:37 +00:00
Michal Nowak 0043999f54 Add Alpine Linux 3.16
(cherry picked from commit 0d0ab3db10)
2022-07-12 13:59:30 +02:00
Matthijs Mekking 77ee0f87b5 Merge branch '3438-dnssec-policy-does-not-set-inline-signing-v9_16' into 'v9_16'
[v9_16] Fix inheritance for dnssec-policy when checking for inline-signing

See merge request isc-projects/bind9!6547
2022-07-12 11:39:42 +00:00
Matthijs Mekking 60c297d717 Add release note and change entry for #3438
Bug worth mentioning.

(cherry picked from commit 689215a675)
2022-07-12 12:48:57 +02:00
Matthijs Mekking 0d5e0867df Inherit dnssec-policy in check for inline-signing
When dnssec-policy is used, and the zone is not dynamic, BIND will
assume that the zone is inline-signed. But the function responsible
for this did not inherit the dnssec-policy option from the view or
options level, and thus never enabled inline-signing, while the zone
should have been.

This is fixed by this commit.

(cherry picked from commit 576b21b168)
2022-07-12 12:48:21 +02:00
Matthijs Mekking eb7d65b84d Test setting of inline-signing with dnssec-policy
When dnssec-policy is used, and the zone is not dynamic, BIND will
assume that the zone is inline-signed. Add test cases to verify this.

(cherry picked from commit efa8a4e88d)
2022-07-12 12:48:16 +02:00
Matthijs Mekking 2db23e475b Fix kasp system test bugs
Fix a comment, ensuring the right parameters are used (zone is
parameter $3, not $2) and add view and policy parameters to the comment.

Fix the view tests and test the correct view (example3 instead of
example2).

Fix placement of "n=$((n+1)" for two test cases.

(cherry picked from commit ff65f07779)
2022-07-12 12:48:08 +02:00
Mark Andrews 474bac53ba Merge branch '3389-unexpected-badkey-in-upforwd-system-test-v9_16' into 'v9_16'
Clone the message buffer before forwarding UPDATE messages [v9_16]

See merge request isc-projects/bind9!6545
2022-07-12 09:28:23 +00:00
Mark Andrews 17b2dc015e Add CHANGES note for [GL #3389]
(cherry picked from commit 09d8ed3970)
2022-07-12 19:02:00 +10:00
Mark Andrews b485d95c66 Clone the message buffer before forwarding UPDATE messages
this prevents named forwarding a buffer that may have been over
written.

(cherry picked from commit 7a42417d61)
2022-07-12 19:01:32 +10:00
Michał Kępień 0e59965d6a Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.32' into 'v9_16'
Set up version and release notes for BIND 9.16.32

See merge request isc-projects/bind9!6540
2022-07-11 07:05:57 +00:00
Michał Kępień c660730ea3 Set up release notes for BIND 9.16.32 2022-07-11 08:52:51 +02:00
Michał Kępień c4e010ebaa Update BIND version to 9.16.32-dev 2022-07-11 08:52:51 +02:00
Tinderbox User 1c4b350ca2 Merge branch 'prep-release' into v9_16_31-release 2022-07-11 04:55:00 +00:00
Tinderbox User a2bd0075bb prep 9.16.31 2022-07-11 04:49:15 +00:00
Michał Kępień 163c0b8089 Merge branch 'michal/prepare-documentation-for-bind-9.16.31' into 'v9_16_31-release'
Prepare documentation for BIND 9.16.31

See merge request isc-private/bind9!414
2022-07-11 04:40:29 +00:00
Michał Kępień 5cbf8d3c18 Tweak and reword release notes 2022-07-11 06:32:55 +02:00
Michał Kępień 59da803e86 Prepare release notes for BIND 9.16.31 2022-07-11 06:32:55 +02:00
Michał Kępień 7b1d377562 Merge branch '3441-fix-fetch-context-use-after-free-bugs' into 'v9_16'
Fix fetch context use-after-free bugs

See merge request isc-projects/bind9!6537
2022-07-11 04:18:04 +00:00
Michał Kępień 6505056267 Fix fetch context use-after-free bugs
fctx_decreference() may call fctx_destroy(), which in turn may free the
fetch context by calling isc_mem_putanddetach().  This means that
whenever fctx_decreference() is called, the fetch context pointer should
be assumed to point to garbage after that call.  Meanwhile, the
following pattern is used in several places in lib/dns/resolver.c:

    LOCK(&res->buckets[fctx->bucketnum].lock);
    bucket_empty = fctx_decreference(fctx);
    UNLOCK(&res->buckets[fctx->bucketnum].lock);

Given that 'fctx' may be freed by the fctx_decreference() call, there is
no guarantee that the value of fctx->bucketnum will be the same before
and after the fctx_decreference() call.  This can cause all kinds of
locking issues as LOCK() calls no longer match up with their UNLOCK()
counterparts.

Fix by always using a helper variable to hold the bucket number when the
pattern above is used.

Note that fctx_try() still uses 'fctx' after calling fctx_decreference()
(it calls fctx_done()).  This is safe to do because the reference count
for 'fctx' is increased a few lines earlier and it also cannot be zero
right before that increase happens, so the fctx_decreference() call in
that particular location never invokes fctx_destroy().  Nevertheless,
use a helper variable for that call site as well, to retain consistency
and to prevent copy-pasted code from causing similar problems in the
future.
2022-07-08 11:26:34 +02:00
Petr Špaček bf2ea74622 Merge branch '3320-rewrite-arm-dnssec-chapter-v9_16' into 'v9_16'
Rewrite DNSSEC ARM Chapter [v9_16]

See merge request isc-projects/bind9!6536
2022-07-07 11:25:11 +00:00
Petr Špaček 4caaff0afa Deduplicate Manual Signing between DNSSEC chapter and DNSSEC Guide
The two procedures were essentially the same, but each instance was
missing some details from the other. They are now combined into one text
in the DNSSEC Guide and linked from DNSSEC chapter.

(cherry picked from commit 7d25027898)
2022-07-07 12:04:39 +02:00
Suzanne GoldlustandPetr Špaček 71f3d521cb Minor grammar improvements in the Signing chapter of the DNSSEC Guide
(cherry picked from commit 6b1ad4dcfb)
2022-07-07 11:48:33 +02:00
Petr Špaček dd46af7f59 Deduplicate key filename description in the DNSSEC Guide
Third time ...

(cherry picked from commit 7e96801841)
2022-07-07 11:40:45 +02:00
Petr Špaček 6c1b34e9b5 Use ECDSAP256SHA256 in DNSSEC signing examples
(cherry picked from commit 3eb6898a14)
2022-07-07 11:39:32 +02:00
Matthijs MekkingandPetr Špaček 0a13a85dff Add a section about key rollover
Describe how to do key rollovers with dnssec-policy. Update the
revert to unsigned recipe in the DNSSEC guide.

(cherry picked from commit f721986589)
2022-07-07 11:37:25 +02:00
Petr Špaček 75854c5e6b Rewrite DNSSEC Validation subchapter in the ARM
Mostly deduplicating and linking information across the ARM.
Generally people should not touch it unless they what they are doing, so
let's try to discourage them a bit.

(cherry picked from commit bffa3063f0)
2022-07-07 11:07:32 +02:00
Petr Špaček c9e52437ca Resynchronize DNSSEC chapter with the main branch
This is essentially a backport of !6296.

Replace DNSSEC chapter with version from the main branch, commit
901b6425d2.

There were structural changes to the ARM in the main branch, and
replacing the whole file with a new version is an order of magniture
easier than attempting to cherry-pick individual changes which should, in
the end, produce the same file under a different name.

File names in the main branch and v9_16 are now in sync (for the DNSSEC
chapter).

Fixes: #3320
2022-07-07 10:34:06 +02:00
Mark Andrews 339668b2e4 Merge branch '3433-support-default-hmac-v9_18-v9_16' into 'v9_16'
Add DEFAULT_HMAC to conf.sh.common [v9_16]

See merge request isc-projects/bind9!6534
2022-07-07 05:29:39 +00:00
Mark Andrews 40c7096caf Add DEFAULT_HMAC to conf.sh.common
(cherry picked from commit 972d7fd682)
(cherry picked from commit ba45075acb)
2022-07-07 15:11:33 +10:00
Mark Andrews 19970f720d Merge branch '3061-ifconfig-sh-down-messes-up-loopback-interfaces-v9_16' into 'v9_16'
update ifconfig.sh [v9_16]

See merge request isc-projects/bind9!6531
2022-07-07 00:53:08 +00:00
Mark Andrews e1b3d3d259 Add CHANGES note for [GL #3061]
(cherry picked from commit e0708c8950)
2022-07-07 10:16:07 +10:00
Mark Andrews 76ed6f32e8 update ifconfig.sh
* make it harder to get the interface numbers wrong by using 'max'
to specify the upper bound of the sequence of interfaces and use 'max'
when calculating the interface number
* extract the platform specific instruction into 'up' and 'down'
and call them from the inner loop so that the interface number is
calculated in one place.
* calculate the A and AAAA address in a single place rather than
in each command
* use /sbin/ipadm on Solaris 2.11 and greater

(cherry picked from commit abfb5b1173)
2022-07-07 10:15:35 +10:00
Mark Andrews abf9a59b1a Merge branch '3429-detect-overflow-in-generate-directive-v9_16' into 'v9_16'
Check for overflow in $GENERATE computations [v9_16]

See merge request isc-projects/bind9!6527
2022-07-06 01:55:41 +00:00
Mark Andrews 3433983407 Add CHANGES note for [GL #3429]
(cherry picked from commit d935ead14b)
2022-07-06 11:36:10 +10:00
Evan HuntandMark Andrews 4897f3ccc0 Improve $GENERATE documentation
Clarify the documentation of $GENERATE modifiers and add an example.

(cherry picked from commit 13fb2faf7a)
2022-07-06 11:35:16 +10:00
Mark Andrews d10e20da0d Tighten $GENERATE directive parsing
The original sscanf processing allowed for a number of syntax errors
to be accepted.  This included missing the closing brace in
${modifiers}

Look for both comma and right brace as intermediate seperators as
well as consuming the final right brace in the sscanf processing
for ${modifiers}.  Check when we got right brace to determine if
the sscanf consumed more input than expected and if so behave as
if it had stopped at the first right brace.

(cherry picked from commit 7be64c0e94)
2022-07-06 11:26:24 +10:00
Mark Andrews 16ac79a8f7 Check for overflow in $GENERATE computations
$GENERATE uses 'int' for its computations and some constructions
can overflow values that can be represented by an 'int' resulting
in undefined behaviour.  Detect these conditions and return a
range error.

(cherry picked from commit 5327b9708f)
2022-07-06 11:26:24 +10:00
Mark Andrews 357ac87986 Merge branch '3437-cds-error-window-too-small-v9_16' into 'v9_16'
Only report not matching stderr content when we look for it [v9_16]

See merge request isc-projects/bind9!6524
2022-07-05 18:33:05 +00:00
Mark Andrews 7cd7f7d2cb Increase the amount of time allowed for signing to occur in
On slow systems we have seen this take 9 seconds.  Increased the
allowance from 3 seconds to 10 seconds to reduce the probabilty of
a false negative from the system test.

(cherry picked from commit 4db847e80e)
2022-07-05 23:12:22 +10:00
Mark Andrews 351aa3d3b5 Only report not matching stderr content when we look for it
The previous test code could emit "D:cds:stderr did not match ''" rather
that just showing the contents of stderr.  Moved the debug line inside
the if/else block.

Replaced backquotes with $() and $(()) as approriate.

(cherry picked from commit 304d33fb32)
2022-07-05 23:12:22 +10:00
Michał Kępień a9407704e6 Merge branch '3357-test_send_timeout-add-code-comment' into 'v9_16'
Add code comment to test_send_timeout test

See merge request isc-projects/bind9!6503
2022-07-04 21:12:33 +00:00
Michał Kępień 8ebc9c76a9 Add a code comment to the test_send_timeout() test 2022-07-04 23:10:59 +02:00
Petr Špaček 269ecb6f63 Merge branch 'marka-cobertura-replaced-by-coverage_report-v9_16' into 'v9_16'
Fix for GitLab 15.0: cobertura replaced by coverage_report [v9_16]

See merge request isc-projects/bind9!6514
2022-07-04 05:50:40 +00:00
Mark AndrewsandPetr Špaček 7680a12431 Fix for GitLab 15.0: cobertura replaced by coverage_report
From Gitlab 15.0 release notes:

   artifacts:reports:cobertura keyword

   As of GitLab 15.0, the artifacts:reports:cobertura keyword has
   been replaced by artifacts:reports:coverage_report. Cobertura
   is the only supported report file, but this is the first step
   towards GitLab supporting other report types.

(cherry picked from commit 008032d268)
2022-07-04 07:15:53 +02:00
Arаm Sаrgsyаn d50036114e Merge branch '3398-race-resolver-query-timeout-and-validation-v9_16' into 'v9_16'
Fix a race between resolver query timeout and validation

See merge request isc-projects/bind9!6419
2022-07-01 09:20:29 +00:00
Aram Sargsyan d31223d477 Add CHANGES and release note for [GL #3398] 2022-07-01 08:42:28 +00:00
Aram Sargsyan 61d77affdd Remove resolver.c:maybe_destroy()
After refactoring of `validated()`, the `maybe_destroy()` function is
no longer expected to actually destroy the fetch context when it is
being called, so effectively it only ensures that the validators are
canceled when the context has no more queries and pending events, but
that is redundant, because `maybe_destroy()` `REQUIRE`s that the context
should be in the shutting down state, and the function which sets that
state is already canceling the validators in its own turn.

As a failsafe, to make sure that no validators will be created after
`fctx_doshutdown()` is called, add an early return from `valcreate()` if
the context is in the shutting down state.
2022-06-30 19:12:17 +00:00
Aram Sargsyan 058a2e7d44 Fix a race between resolver query timeout and validation
The `resolver.c:validated()` function unlinks the current validator from
the fetch's validators list, which can leave it empty, then unlocks
the bucket lock. If, by a chance, the fetch was timed out just before
the `validated()` call, the final timeout callback running in parallel
with `validated()` can find the fetch context with no active fetches
and with an empty validators list and destroy it, which is unexpected
for the `validated()` function and can lead to a crash.

Increase the fetch context's reference count in the beginning of
`validated()` and decrease it when it finishes its work to avoid the
unexpected destruction of the fetch context.
2022-06-30 18:58:58 +00:00
Michal Nowak b56317fc56 Merge branch '2371-add-stress-testing-with-rpz-v9_16' into 'v9_16'
[v9_16] Add stress testing with RPZ

See merge request isc-projects/bind9!6498
2022-06-28 22:06:34 +00:00
Michal Nowak 49f96e6287 Add stress testing with RPZ
(cherry picked from commit d272574653)
2022-06-28 20:43:15 +02:00
Petr Špaček 54609a00be Merge branch '3408-drop-debian-9-stretch-v9_16' into 'v9_16'
Drop support for Debian 9 (Stretch) [v9_16]

See merge request isc-projects/bind9!6496
2022-06-28 16:00:34 +00:00
Petr Špaček 561f2a3930 Declare Debian 9 (Stretch) community-maintained
(cherry picked from commit 4ce1f25210)
2022-06-28 17:59:21 +02:00
Petr Špaček a6496edf7e Drop Debian 9 (Stretch) from CI
(cherry picked from commit aa86a8bcf0)
2022-06-28 17:59:20 +02:00
Matthijs Mekking 0420302a8a Merge branch '3422-dnssec-policy-clarifications-v9_16' into 'v9_16'
[v9_16] Add some clarifications wrt dynamic zones

See merge request isc-projects/bind9!6490
2022-06-27 12:38:18 +00:00
Matthijs Mekking 68105e66cf Add some clarifications wrt dynamic zones
These were suggested by GitLab user @elmaimbo.

(cherry picked from commit fb517eb52a)
2022-06-27 11:56:59 +02:00
Mark Andrews 0fbf59d6f8 Merge branch '3420-rrsetorder-update-status-v9_16' into 'v9_16'
Add missing update of status variable in rrsetorder system test [v9_16]

See merge request isc-projects/bind9!6481
2022-06-23 07:56:14 +00:00
Mark Andrews c978785be6 Replace expr's with $((expression)) shell constucts
Also make indenting consistent.

(cherry picked from commit 669c42cd95)
2022-06-23 17:35:51 +10:00
Mark Andrews 9786a785f3 Add missing update of status variable in rrsetorder system test
(cherry picked from commit da63e63c41)
2022-06-23 17:28:58 +10:00
Michal Nowak d29b7b2601 Merge branch 'mnowak/add-system_gcc_bullseye_unstable_amd64-ci-job-v9_16' into 'v9_16'
[v9_16] Add system:gcc:bullseye:unstable:amd64 CI job

See merge request isc-projects/bind9!6477
2022-06-22 13:52:21 +00:00
Michal Nowak 805fa06cc8 Put default-triggering-rules anchor in alphabetical order
(cherry picked from commit db1a72d581)
2022-06-22 15:06:10 +02:00
Michal Nowak 0f4623f717 Rename schedules_tags_web_triggering_rules anchor
The schedules_tags_web_triggering_rules anchor name should match it's
content, hence api_schedules_tags_triggers_web_triggering_rules anchor
name.

(cherry picked from commit 0629f53431)
2022-06-22 15:06:10 +02:00
Michal Nowak 4f3dc87d81 Extract API, schedules, triggers, and web triggering rules
(cherry picked from commit fbc1345dd7)
2022-06-22 14:58:54 +02:00
Michal Nowak daadd8ebcd Add system:gcc:bullseye:unstable:amd64 CI job
Without this CI job long pytest jobs are not being run in the CI.

(cherry picked from commit d606f39022)
2022-06-22 14:58:42 +02:00
Michał Kępień 83dadbc75e Merge branch '3309-fix-destination-port-extraction-for-client-queries-v9_16' into 'v9_16'
[v9_16] Fix destination port extraction for client queries

See merge request isc-projects/bind9!6475
2022-06-22 12:28:13 +00:00
Michał Kępień 89aa97c455 Add CHANGES entry for GL #3309
(cherry picked from commit 58c3513fa6)
2022-06-22 13:52:08 +02:00
Mark AndrewsandMichał Kępień f271667a1b Check that the UDP destination port is logged via dnstap
(cherry picked from commit 8d8396c3a7)
2022-06-22 13:52:08 +02:00
Michał Kępień cbfb93e1c7 Fix destination port extraction for client queries
The current logic for determining the address of the socket to which a
client sent its query is:

 1. Get the address:port tuple from the netmgr handle using
    isc_nmhandle_localaddr() or from the ns_interface_t structure.

 2. Convert the address:port tuple from step 1 into an isc_netaddr_t
    using isc_netaddr_fromsockaddr().

 3. Convert the address from step 2 back into a socket address with the
    port set to 0 using isc_sockaddr_fromnetaddr().

Note that the port number (readily available in the netmgr handle or in
the ns_interface_t structure) is needlessly lost in the process,
preventing it from being recorded in dnstap captures of client traffic
produced by named.

Fix by first storing the address:port tuple in client->destsockaddr and
then creating an isc_netaddr_t from that structure.  This allows the
port number to be retained in client->destsockaddr, which is what
subsequently gets passed to dns_dt_send().

Remove an outdated code comment.

(cherry picked from commit 2f945703f2)
2022-06-22 13:52:08 +02:00
Michal Nowak 4b9c2066b1 Merge branch 'mnowak/ubuntu-22.04-jammy-jellyfish-v9_16' into 'v9_16'
[v9_16] Add Ubuntu 22.04 LTS (Jammy Jellyfish)

See merge request isc-projects/bind9!6471
2022-06-22 11:05:49 +00:00
Michal Nowak ce2e4c59d9 Do not run Ubuntu 18.04 jobs in MR-triggered pipelines
With the addition of Ubuntu 22.04 three more CI jobs were added. To
compensate for that, move Ubuntu 18.04 jobs out of MR-triggered
pipelines to schedule-triggered ones.

Also, move --disable-geoip ./configure options from Ubuntu 18.04 to
Ubuntu 20.04 jobs to keep these options in the more frequent
MR-triggered pipelines.

(cherry picked from commit 06c591667e)
2022-06-22 12:04:40 +02:00
Michal Nowak 009c7871ec Add Ubuntu 22.04 LTS (Jammy Jellyfish)
(cherry picked from commit 4c2af3bdfa)
2022-06-22 12:04:13 +02:00
Matthijs Mekking 7ebf6e5c59 Merge branch '3397-document-interaction-dnssec-update-config-options-v9_16' into 'v9_16'
[v9_16] Document where updates and DNSSEC records are stored

See merge request isc-projects/bind9!6464
2022-06-21 14:49:58 +00:00
Matthijs Mekking 3d2126cc82 Add comment on DNSSEC signing zone configuration
I was slightly confused here, so IMO it can use a comment.

(cherry picked from commit c80531758c)
2022-06-20 16:50:51 +02:00
Matthijs Mekking e1f0acc3e7 Document where updates and DNSSEC records are stored
Make clear that inline-signing stores DNSSEC records in a signed
version of the zone, using the zone's filename plus ".signed" extension.

Tell that dynamic zones store updates in the zone's filename.

DNSSEC records for dynamic zones also go in the zone's filename, unless
inline-signing is enabled.

Then, dnssec-policy assumes inline-signing, but only if the zone is
not dynamic.

(cherry picked from commit 8860f6b4ff)
2022-06-20 16:50:42 +02:00
Michal Nowak e75a1d4206 Merge branch 'mnowak/bump-clang-to-version-14-v9_16' into 'v9_16'
[v9_16] Update clang to version 14

See merge request isc-projects/bind9!6456
2022-06-17 06:36:39 +00:00
Michal Nowak 676dac06b6 Extract Clang version to $CLANG_VERSION
Extracting Clang version helps with updating Clang version in one place
and not missing one of its instances.

(cherry picked from commit bd17dec045)
2022-06-16 18:11:03 +02:00
Michal Nowak 08c89b2002 Fix external_symbolizer_path on Fedora
The external_symbolizer_path was wrong on Fedora since moving gcc:tsan
jobs from Debian to Fedora.

(cherry picked from commit e98b9c5009)
2022-06-16 18:11:03 +02:00
Michal Nowak a584a8f88f Update clang to version 14
(cherry picked from commit 1c45a9885a)
2022-06-16 18:11:03 +02:00
Michal Nowak 8408f7d01e Merge branch 'mnowak/checkds-pylint-implicit-str-concat-fixes-v9_16' into 'v9_16'
[v9_16] Fix implicit string concatenation in tests-checkds.py

See merge request isc-projects/bind9!6454
2022-06-16 11:56:10 +00:00
Michal Nowak 84d2d25921 Fix implicit string concatenation in tests-checkds.py
pylint 2.14.2 reports the following warnings:

    bin/tests/system/checkds/tests-checkds.py:265:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
    bin/tests/system/checkds/tests-checkds.py:273:0: W1404: Implicit string concatenation found in call (implicit-str-concat)

(cherry picked from commit 831ac8add1)
2022-06-16 13:45:30 +02:00
Tom Krizek b7fc9e43df Merge branch 'tkrizek/pytest-skipped-reason-v9_16' into 'v9_16'
Report reasons for skipped/xfailed system pytests [v9_16]

See merge request isc-projects/bind9!6450
2022-06-16 07:53:23 +00:00
Tom Krizek dc5acad543 Report reasons for skipped/xfailed system pytests
If skip/xfail is used in pytest, it can have a reason string associated
with it. When evaluating these tests, it can be useful to be able to
differentiate the reason why the test was skipped/xfailed/xpassed,
because there might be multiple possible reasons for that.

The extra options passed to pytest ensure that the string with the
reason appears in the test summary and thus we're able to find the
string with the reason in the log output.

See https://docs.pytest.org/en/7.1.x/how-to/skipping.html for more info

(cherry picked from commit f6d368167a)
2022-06-16 09:18:32 +02:00
Petr Špaček 84a9ce2d87 Merge branch 'pspacek/nsec3-doc-update-v9_16' into 'v9_16'
Update NSEC3 guidance to match draft-ietf-dnsop-nsec3-guidance-10 [v9_16]

See merge request isc-projects/bind9!6448
2022-06-15 16:16:50 +00:00
Petr Špaček 3eae58207a Update NSEC3 guidance to match draft-ietf-dnsop-nsec3-guidance-10
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-nsec3-guidance-10
is on it's way to become RFC, so let's update our recommendations in the
docs to be in line with it.

The default values for dnssec-policy and dnssec-signzone were adapted to
match v9_16 branch.

(cherry picked from commit 2ee3f4e6c8)
2022-06-15 18:10:50 +02:00
Michał Kępień 68fadd52c1 Merge tag 'v9_16_30' into v9_16
BIND 9.16.30
2022-06-15 16:02:06 +02:00
Petr Špaček f4db2c69fa Merge branch 'pspacek/doc-cleanup-dnssec-prereq-v9_16' into 'v9_16'
Update intro texts in the DNSSEC Guide [v9_16]

See merge request isc-projects/bind9!6435
2022-06-14 16:22:46 +00:00
Petr Špaček b14b29b969 Update FAQ in the DNSSEC Guide
Mention DoT/DoH, update stats, remove mentions of early stages of
deployment.

(cherry picked from commit fd3a2c7854)
2022-06-14 18:18:54 +02:00
Petr Špaček 308c7f7c5c Update Authoritative Server Hardware requirements in DNSSEC Guide
Based on measurements done on BIND v9_19_2 using bank. TLD and a
synthetitc fullly signed zone, using RSASHA256 and ECDSAP256SHA256
algorithms with NSEC and NSEC3 without opt-out.

(cherry picked from commit 635885afe6)
2022-06-14 18:18:36 +02:00
Petr Špaček 0efc93ce1a Update DNSSEC validation deployment stats in DNSSEC Guide
(cherry picked from commit 832c172985)
2022-06-14 18:18:36 +02:00
Petr Špaček b64c8459f7 Rewrite Recursive Server Hardware requirements in DNSSEC Guide
This section was completely out of date. Current measurements on dataset
Telco EU 2022-02 and BIND 9.19.1 indicate absolutely different results
than described in the old version of the text.

(cherry picked from commit 6cf8066b9c)
2022-06-14 18:18:36 +02:00
Petr Špaček 4319b776f8 Remove outdated software requirements from DNSSEC Guide
Guide in this repo is tied to latest version anyway, so let's not even
mention ancient versions of BIND.

This also solves the OpenSSL question because it is now mandatory for
build, which subsequently removes the entropy problem - so let's not
mention it either.

(cherry picked from commit 6e79877759)
2022-06-14 18:18:35 +02:00
Michal Nowak 4e840e7d59 Merge branch '3138-capture-scripts-to-coverity-scan-v9_16' into 'v9_16'
[v9_16] Capture scripts for Coverity Scan analysis

See merge request isc-projects/bind9!6431
2022-06-14 12:38:07 +00:00
Michal Nowak a95ced4d51 Capture scripts for Coverity Scan analysis
With the recent Coverity Scan 2021.12 version, Python 3 scripts are
being analyzed in addition to C files. The --fs-capture-search option
scripts for Coverity Scan analysis should be added to leverage this
feature.

(cherry picked from commit b4a2674d98)
2022-06-14 14:25:04 +02:00
Michal Nowak f1ae1eb6f3 Download Coverity Scan analysis tool to /tmp
Downloading and unpacking Coverity Scan analysis tool tarball
(cov-analysis-linux64.tgz) to $CI_PROJECT_DIR interferes with the
execution of the analysis tool when the --fs-capture-search option is
used because the tool starts to analyze some of its Javascript files.
(There's the --fs-capture-search-exclude-regex <path> option, but I
failed to find a way to make it work.)

(cherry picked from commit 1333bdf67e)
2022-06-14 14:25:04 +02:00
Michal Nowak b2b329af32 Drop coverity cache feature
The coverity CI job cache feature is used to ensure that the 1 GB
cov-analysis-linux64.tgz file is being cached on GitLab CI runner, where
it was downloaded in the past. This feature does not seem to work
anymore; given that the proper solution to creating distributed cache is
complicated, better to drop the feature altogether.

(cherry picked from commit c966304e90)
2022-06-14 14:25:04 +02:00
Ondřej Surý dbda0b4ac2 Merge branch '3400-gracefully-handle-the-errors-from-uv_start_read-v9_16' into 'v9_16'
Gracefully handle uv_read_start() failures [v9.16]

See merge request isc-projects/bind9!6427
2022-06-14 10:45:13 +00:00
Ondřej Surý 5cd2acb374 Add CHANGES and release note for [GL #3400]
(cherry picked from commit 646df5cbbc)
2022-06-14 11:55:03 +02:00
Ondřej Surý 6cfab7e4f7 Gracefully handle uv_read_start() failures
Under specific rare timing circumstances the uv_read_start() could
fail with UV_EINVAL when the connection is reset between the connect (or
accept) and the uv_read_start() call on the nmworker loop.  Handle such
situation gracefully by propagating the errors from uv_read_start() into
upper layers, so the socket can be internally closed().

(cherry picked from commit b432d5d3bc)
2022-06-14 11:55:03 +02:00
Mark Andrews 0e90fa4234 Merge branch 'typo-in-log-on-update-forward-opcode-mismatch-v9_16' into 'v9_16'
corrected the opcode param to opcode_totext

See merge request isc-projects/bind9!6422
2022-06-14 02:57:46 +00:00
Mark Andrews 1e155f4fc4 Add CHANGES note for [GL !6420]
(cherry picked from commit bd508194be)
2022-06-14 12:08:02 +10:00
JINMEI TatuyaandMark Andrews 673211492c make the fix more complete
(cherry picked from commit a58647df6a)
2022-06-14 12:07:39 +10:00
JINMEI TatuyaandMark Andrews 66cfaf0fb0 corrected the opcode param to opcode_totext
(cherry picked from commit 2b81a69659)
2022-06-14 12:07:39 +10:00
Petr Špaček 5c327f209b Merge branch 'pspacek/keyfromlabel-doc-alg-clarif-v9_16' into 'v9_16'
Clarify dnssec-keyfromlabel -a in man page [v9_16]

See merge request isc-projects/bind9!6415
2022-06-10 06:06:28 +00:00
Petr Špaček f01f316268 Clarify dnssec-keyfromlabel -a in man page
(cherry picked from commit 5f53003dae)
2022-06-10 08:02:33 +02:00
Tom Krizek 27f383182b Merge branch 'tkrizek/python-codestyle-v9_16' into 'v9_16'
Enforce Python codestyle with black [v9_16]

See merge request isc-projects/bind9!6406
2022-06-08 12:03:50 +00:00
Tom Krizek 883b6c8c1e Remove flake8 linter for Python from CI
Python codestyle is now handled by black and other issues are checked by
pylint. Flake8 checking has been made redundant and is thus removed as
obsolete.

(cherry picked from commit dae340a4a5)
2022-06-08 13:44:23 +02:00
Tom Krizek b3c7bd1c04 Auto-format Python files with black
This patch is strictly the result of:
$ black $(git ls-files '*.py' '*.py.in')

There have been no manual changes.
2022-06-08 13:34:19 +02:00
Tom Krizek cf92d05908 Enforce Python codestyle with black
Black is an opinionated tool for auto-formatting Python code so we no
longer have to worry about the codestyle.

For the codestyle decisions and discussion, refer to the upstream
documentation [1].

[1] https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html
2022-06-08 13:29:01 +02:00
Tom Krizek 8668c8c061 Remove trailing whitespace
My editor doesn't like that!

(cherry picked from commit 5d64d05be9)
2022-06-08 13:24:30 +02:00
Arаm Sаrgsyаn 983bd242b6 Merge branch '3380-catz-dont-cancel-processing-when-encountering-an-unexpected-rrtype-v9_16' into 'v9_16'
Resolve "member zones are deleted if RRsig appears in the catalog zone"

See merge request isc-projects/bind9!6355
2022-06-07 11:05:42 +00:00
Aram Sargsyan 87b3ced5fe Do not cancel processing record datasets in catalog zone after an error
When there are multiple record datasets in a database node of a catalog
zone, and BIND encounters a soft error during processing of a dataset,
it breaks from the loop and doesn't process the other datasets in the
node.

There are cases when this is not desired. For example, the catalog zones
draft version 5 states that there must be a TXT RRset named
`version.$CATZ` with exactly one RR, but it doesn't set a limitation
on possible non-TXT RRsets named `version.$CATZ` existing alongside
with the TXT one. In case when one exists, we will get a processing
error and will not continue the loop to process the TXT RRset coming
next.

Remove the "break" statement to continue processing all record datasets.

(cherry picked from commit 0b2d5490cd)
2022-06-07 09:59:32 +00:00
Matthijs Mekking a0e05074fd Merge branch '3362-kasp-system-test-timing-issue-v9_16' into 'v9_16'
[v9_16] Fix another kasp test timing issue

See merge request isc-projects/bind9!6401
2022-06-07 09:11:07 +00:00
Matthijs Mekking 1dc36e2961 Retry quiet to deal with kasp test timing issue
In the cases where we test SOA serial updates and TTL updates, we check
if for "all zones loaded" to ensure the new zone content is loaded. But
this is the unsigned zone, the signed zone still needs to be produced.

There is thus a timing issue where the dig request comes in before
the signing process has finished.

Add a retry quiet to mitigate against it.

(cherry picked from commit 827bba05a0)
2022-06-07 09:38:06 +02:00
Petr Špaček 8f0682ecad Merge branch 'pspacek/danger-log-level-v9_16' into 'v9_16'
Flag new user-visible log messages for manual review [v9_16]

See merge request isc-projects/bind9!6393
2022-06-03 10:13:17 +00:00
Petr Špaček ef8e3c72c6 Flag new user-visible log messages for review
Messages with log levels INFO or higher are flagged for manual review.
Purpose of this check is to prevent debug logs to being released with
too-high log level.

(cherry picked from commit b0f59cb5cb)
2022-06-03 12:12:37 +02:00
Michał Kępień 5636eca562 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.31' into 'v9_16'
Set up version and release notes for BIND 9.16.31

See merge request isc-projects/bind9!6391
2022-06-03 09:27:05 +00:00
Michał Kępień 913c0b833c Set up release notes for BIND 9.16.31 2022-06-03 11:05:47 +02:00
Michał Kępień 531323877c Update BIND version to 9.16.31-dev 2022-06-03 11:05:47 +02:00
Tinderbox User 61fdb40fb2 Merge branch 'prep-release' into v9_16_30-release 2022-06-02 19:34:02 +00:00
Tinderbox User 0842c032fd prep 9.16.30 2022-06-02 19:30:41 +00:00
Michał Kępień 609dde6e69 Merge branch 'michal/prepare-documentation-for-bind-9.16.30' into 'v9_16_30-release'
Prepare documentation for BIND 9.16.30

See merge request isc-private/bind9!408
2022-06-02 19:17:47 +00:00
Michał Kępień e012953aea Add release note for GL #3327 2022-06-02 20:57:12 +02:00
Michał Kępień 35aaf41516 Reorder release notes 2022-06-02 20:57:12 +02:00
Michał Kępień ee8b00bdf2 Tweak and reword release notes 2022-06-02 20:57:12 +02:00
Michał Kępień 501ac73a7c Prepare release notes for BIND 9.16.30 2022-06-02 20:57:12 +02:00
Petr Špaček 6fcc7bfe80 Merge branch 'pspacek/rtd-style-changes-v9_16' into 'v9_16'
ReadTheDocs style changes [v9_16]

See merge request isc-projects/bind9!6387
2022-06-02 15:30:26 +00:00
Petr Špaček cc1599e454 ARM style change: render literals in black color
After enormous amount of bikesheding about colors we decided to override
ReadTheDocs default style for literals (``literal`` in the RST markup).

Justification:
- The default RTD "light red literal on white background" is hard to
  read.  https://webaim.org/resources/contrastchecker/ reports that text
  colored as rgb(231, 76, 60) on white background has insufficient
  contrast.
- The ARM has enormous amount of literals all over the place and thus
  one sentence can contain several black/red/black color changes. This
  is distracting. As a consequence, the ARM looks like a Geronimo
  Stilton book.

What we experimented with as replacements for red:
- Green - way too distracting
- Blue - too similar to "usual clickable link"
- Violet - too Geronimo Stilton style
- Brown - better but still distracting

After all the bikesheding we settled on black, i.e. the same as all
"normal" text. I.e. the color is now the same and literals are denoted
by monospaced font and a box around the literal. This has best contrast
and is way less distracting than it used to be.

This lead to a new problem: Internal references to "term definitions"
defined using directives like .. option:: were rendered almost the same
as literals:
- References: monospaced + box + bold + clickable
- Literals: monospaced + box To distinguish these two we added black
  dotted underline to clickable references.

I hereby declare the bikeshed painted.

(cherry picked from commit 833af31e7b)
2022-06-02 17:24:41 +02:00
Petr Špaček dafacea24c Allow wrapping for ARM table content
RTD style default never wraps <th> and <td> elements and that just does
not work for real sentences or any other long lines.

We can reconsider styling some tables separately, but at the moment we
do not have use for tables with long but unwrappable lines so it's
easier to allow wrapping globally.

(cherry picked from commit a5dd98ac1b)
2022-06-02 17:24:39 +02:00
Arаm Sаrgsyаn 9fa26af659 Merge branch 'aram/catz-processing-skip-warnings-for-some-rrset-types-v9_16' into 'v9_16'
[v9_16] Don't process DNSSEC-related and ZONEMD records in catz

See merge request isc-projects/bind9!6384
2022-06-02 11:11:42 +00:00
Aram Sargsyan a0121f4908 Add CHANGES and release note for [GL #3380]
(cherry picked from commit b8073cbe72)
2022-06-02 10:34:05 +00:00
Aram Sargsyan 1dc7288708 Don't process DNSSEC-related and ZONEMD records in catz
When processing a catalog zone update, skip processing records with
DNSSEC-related and ZONEMD types, because we are not interested in them
in the context of a catalog zone, and processing them will fail and
produce an unnecessary warning message.

(cherry picked from commit 73d6643137)
2022-06-02 10:33:03 +00:00
Mark Andrews d34cc48045 Merge branch '3388-missing-indent-call-v9_16' into 'v9_16'
Add missing INDENT call for UPDATE messages [v9_16]

See merge request isc-projects/bind9!6381
2022-06-01 22:52:53 +00:00
Mark Andrews b318db2b7f Add missing INDENT call for UPDATE messages
Reported by Peter <pmc@citylink.dinoex.sub.org> on bind-users.

(cherry picked from commit 03132c93ca)
2022-06-02 08:29:28 +10:00
Arаm Sаrgsyаn 73a3a1ad36 Merge branch 'aram/update-top-level-gitignore-add-ide-files-v9_16' into 'v9_16'
[v9_16] Update top-level .gitignore to ignore files generated by some IDEs

See merge request isc-projects/bind9!6376
2022-06-01 11:26:43 +00:00
Aram Sargsyan 46d6039e58 Update top-level .gitignore to ignore files generated by some IDEs
(cherry picked from commit ec3bc4142b)
2022-06-01 10:45:44 +00:00
Mark Andrews 219efa9d6f Merge branch '3345-fix-keyless-example-generation-v9_16' into 'v9_16'
Make modifications to keyless.example deterministic

See merge request isc-projects/bind9!6371
2022-06-01 01:03:53 +00:00
Mark Andrews 3183de20c3 Make modifications to keyless.example deterministic
The perl modifation code for keyless.example was not deterministic
(/NXT/ matched part of signature) resulting in different error
strings being returned.  Replaced /NXT/ with /A RRSIG NSEC/ and
updated expected error string,

(cherry picked from commit 69d5e22e58)
2022-06-01 10:42:55 +10:00
Mark Andrews 5c629e8a45 Merge branch '3368-trampoline-c-fatal-error-uv-h-file-not-found-on-bsd-when-json-c-is-disabled' into 'v9_16'
Resolve "trampoline.c: fatal error: 'uv.h' file not found on BSD when JSON-C is disabled"

See merge request isc-projects/bind9!6364
2022-05-31 12:42:25 +00:00
Mark Andrews 3292a54fed Add LIBUV_CFLAGS to CLINCLUDE in lib/isc/Makefile.in 2022-05-31 16:43:48 +10:00
Ondřej Surý b9f035b8eb Merge branch 'ondrej-use-locked-queue-v9_16' into 'v9_16'
Replace netievent lock-free queue with simple locked queue [v9.16]

See merge request isc-projects/bind9!6357
2022-05-25 15:56:35 +00:00
Ondřej Surý 1c94d0ee6c Add CHANGES note for [GL #3180]
(cherry picked from commit d75b953489)
2022-05-25 16:01:58 +02:00
Ondřej Surý 32a3970b13 Replace netievent lock-free queue with simple locked queue
The current implementation of isc_queue uses Michael-Scott lock-free
queue that in turn uses hazard pointers.  It was discovered that the way
we use the isc_queue, such complicated mechanism isn't really needed,
because most of the time, we either execute the work directly when on
nmthread (in case of UDP) or schedule the work from the matching
nmthreads.

Replace the current implementation of the isc_queue with a simple locked
ISC_LIST.  There's a slight improvement - since copying the whole list
is very lightweight - we move the queue into a new list before we start
the processing and locking just for moving the queue and not for every
single item on the list.

NOTE: There's a room for future improvements - since we don't guarantee
the order in which the netievents are processed, we could have two lists
- one unlocked that would be used when scheduling the work from the
matching thread and one locked that would be used from non-matching
thread.

(cherry picked from commit 6bd025942c)
2022-05-25 16:01:58 +02:00
Ondřej Surý 5bed841c1c Merge branch '2801-unittest-isc-netmgr-s390x-v9_16' into 'v9_16'
Fix failures in isc netmgr_test on big endian machines

See merge request isc-projects/bind9!6354
2022-05-24 18:29:07 +00:00
Petr MenšíkandOndřej Surý 1feb389f80 Fix failures in isc netmgr_test on big endian machines
Typing from libuv structure to isc_region_t is not possible, because
their sizes differ on 64 bit architectures. Little endian machines seems
to be lucky and still result in test passed. But big endian machine such
as s390x fails the test reliably.

Fix by directly creating the buffer as isc_region_t and skipping the
type conversion. More readable and still more correct.

(cherry picked from commit 057438cb45)
2022-05-24 20:23:04 +02:00
Matthijs Mekking 66ecde5b27 Merge branch '3354-cid-352776-missing_lock-v9_16' into 'v9_16'
[v9_16] Fix CID 352776: Concurrent data access violations

See merge request isc-projects/bind9!6345
2022-05-23 12:18:49 +00:00
Matthijs Mekking d3147417c5 Require valid key for dst_key functions
Make sure that the key structure is valid when calling the following
functions:
- dst_key_setexternal
- dst_key_isexternal
- dst_key_setmodified
- dst_key_ismodified

This commit is adapted because 9.16 has a different approach
of deconsting the variable.

(cherry picked from commit 888ec4e0d4)
2022-05-23 12:31:23 +02:00
Matthijs Mekking 7c42c04f3f Fix CID 352776: Concurrent data access violations
*** CID 352776:  Concurrent data access violations  (MISSING_LOCK)
/lib/dns/dst_api.c: 474 in dst_key_setmodified()
468     dst_key_isexternal(dst_key_t *key) {
469		return (key->external);
470     }
471
472     void
473     dst_key_setmodified(dst_key_t *key, bool value) {
>>>     CID 352776:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "key->modified" without holding lock
>>>	"dst_key.mdlock". Elsewhere, "dst_key.modified" is accessed with
>>>	"dst_key.mdlock" held 8 out of 11 times (8 of these accesses
>>>	strongly imply that it is necessary).
474		key->modified = value;
475     }
476
477     bool
478     dst_key_ismodified(dst_key_t *key) {
479		return (key->modified);

(cherry picked from commit 1fa24d0afb)
2022-05-23 12:03:56 +02:00
Ondřej Surý 56adb30e23 Merge branch '3344-threadsanitizer-data-race-in-isc__nm_tcpdns_send-v9_16' into 'v9_16'
Move setting the sock->write_timeout to the async_*send [v9.16]

See merge request isc-projects/bind9!6342
2022-05-19 20:53:01 +00:00
Ondřej Surý ed4eda5ebc Move setting the sock->write_timeout to the async_*send
Setting the sock->write_timeout from the TCP, TCPDNS, and TLSDNS send
functions could lead to (harmless) data race when setting the value for
the first time when the isc_nm_send() function would be called from
thread not-matching the socket we are sending to.  Move the setting the
sock->write_timeout to the matching async function which is always
called from the matching thread.

(cherry picked from commit 61117840c1)
2022-05-19 22:38:47 +02:00
Ondřej Surý 598c93f2b2 Merge branch '3371-check-for-__attribute__-fallthrough-support-is-sometimes-incorrect-v9_16' into 'v9_16'
Use C2x [[fallthrough]] when supported by LLVM/clang [v9.16]

See merge request isc-projects/bind9!6340
2022-05-19 20:35:26 +00:00
Ondřej Surý 4657b0f0c4 Use C2x [[fallthrough]] when supported by LLVM/clang
Clang added support for the gcc-style fallthrough
attribute (i.e. __attribute__((fallthrough))) in version 10.  However,
__has_attribute(fallthrough) will return 1 in C mode in older versions,
even though they only support the C++11 fallthrough attribute. At best,
the unsupported attribute is simply ignored; at worst, it causes errors.

The C2x fallthrough attribute has the advantages of being supported in
the broadest range of clang versions (added in version 9) and being easy
to check for support. Use C2x [[fallthrough]] attribute if possible, and
fall back to not using an attribute for clang versions that don't have
it.

Courtesy of Joshua Root

(cherry picked from commit 14c8d43863)
2022-05-19 22:02:07 +02:00
Michal Nowak db5f8ebb6f Merge tag 'v9_16_29' into v9_16
BIND 9.16.29
2022-05-19 13:14:59 +02:00
Evan Hunt 17fd11edaf Merge branch '3350-rndc-dnssec-checkds-doc-v9_16' into 'v9_16'
specify time format in the documentation for 'rdnc dnssec -checkds'

See merge request isc-projects/bind9!6332
2022-05-18 22:49:56 +00:00
Evan Hunt 9aa68d0dd7 specify time format in the documentation for 'rdnc dnssec -checkds'
also clarified the writing in the surrounding paragraph.

(cherry picked from commit 83f9466d61)
2022-05-18 15:37:13 -07:00
Ondřej Surý 38b3d37475 Merge branch '3366-configure-fails-to-find-uv-h-on-bsd-v9_16' into 'v9_16'
Use libuv CFLAGS and LIBS when checking for features [v9.16]

See merge request isc-projects/bind9!6330
2022-05-18 19:55:03 +00:00
Ondřej Surý b9e5b319db Use libuv CFLAGS and LIBS when checking for features
When autoconf was checking for libuv features, the LIBUV_CFLAGS was not
added to CFLAGS and LIBUV_LIBS to LIBS which resulted in false
negatives.

Use AX_SAVE_FLAGS and AX_RESTORE_FLAGS to temporarily add LIBUV_CFLAGS
and LIBUV_LIBS to their respective variables.

(cherry picked from commit f063ee276e)
2022-05-18 21:18:51 +02:00
Michal Nowak 3b6afee83b Merge branch 'mnowak/fix-typo-in-ednscompliance-test-v9_16' into 'v9_16'
[v9_16] Fix typo in ednscompliance test

See merge request isc-projects/bind9!6328
2022-05-18 17:30:20 +00:00
Michal Nowak 70c41c60b5 Fix typo in ednscompliance test
Caused by ba0313e649, an incomplete fix of
spelling errors.

(cherry picked from commit 9de2c06a21)
2022-05-18 19:19:48 +02:00
Mark Andrews 7204082bb6 Merge branch '3356-wrong-path-for-geoip-directory-v9_16' into 'v9_16'
Remove extraneous '$' in AS_VAR_COPY([MAXMINDDB_PREFIX], [with_maxminddb])

See merge request isc-projects/bind9!6319
2022-05-17 20:02:12 +00:00
Mark Andrews ea54e39cdb Remove extraneous '$' in AS_VAR_COPY([MAXMINDDB_PREFIX], [with_maxminddb])
(cherry picked from commit 686d691fa9)
2022-05-18 05:38:46 +10:00
Matthijs Mekking 5b8d120d59 Merge branch '3352-kasp-test-broken-on-freebsd-v9_16' into 'v9_16'
[v9_16] Fix "kasp test broken on freebsd"

See merge request isc-projects/bind9!6313
2022-05-17 03:01:45 +00:00
Matthijs Mekking f922dd3e70 Replace stat with PERL stat in kasp system test
7249bad7 introduced the -c option to stat(1) command, but BSD systems
do not know about it. Replace the stat(1) command with a PERL script
that achieves the same.

Why PERL? For consistency purposes, there are more places in the
system test where we use the same method.

(cherry picked from commit fe601c5915)
2022-05-16 18:53:17 +02:00
Matthijs Mekking 6eb3feb07f Merge branch '3302-keymgr-updates-key-files-each-run-v9_16' into 'v9_16'
[v9_16] Fix "keymgr updates key files each run"

See merge request isc-projects/bind9!6301
2022-05-16 16:51:42 +00:00
Matthijs Mekking 296cb390b6 Add new functions to lib/dns/win32/libdns.def.in
Missing from lib/dns/win32/libdns.def.in:
dst_key_setmodified
dst_key_ismodified
2022-05-16 18:31:55 +02:00
Matthijs Mekking e8bcf3de5b Add changes and release notes for #3302
Add a comment to make danger happy.

(cherry picked from commit 0f89f0b134)
2022-05-16 10:35:50 +02:00
Matthijs Mekking c2e8c72298 Check if key metadata is modified before writing
Add a new parameter to the dst_key structure, mark a key modified if
dst_key_(un)set[bool,num,state,time] is called. Only write out key
files during a keymgr run if the metadata has changed.

(cherry picked from commit 1da91b3ab4)
2022-05-16 10:35:33 +02:00
Matthijs Mekking 6226ab2fa9 Add kasp test for #3302
Add a test case that triggers a keymgr run that will not trigger any
metadata changes. Ensure that the last status change of the key files
is unmodified.

(cherry picked from commit 7249bad706)
2022-05-16 10:35:33 +02:00
Evan Hunt 62a5f5b81d Merge branch '3353-dyndb-failure' into 'v9_16'
dont run isc__trampoline_initialize() in dlopen library

See merge request isc-projects/bind9!6309
2022-05-15 19:54:47 +00:00
Evan Hunt adeddfa8ff dont run isc__trampoline_initialize() in dlopen library
when built without libtool, the sample driver in the dyndb
system test runs library intializers that have already been
run, causing the value for isc__trampoline_min to be reset.
wrap the trampoline initialize and shutdown routines under
isc_once_do() to ensure that they are only run once.
2022-05-15 00:25:32 -07:00
Evan Hunt 7a1ae6255a Merge branch '3327-fetches-per-server-quota-v9_16' into 'v9_16'
fix the fetches-per-server quota calculation

See merge request isc-projects/bind9!6308
2022-05-14 08:28:12 +00:00
Evan Hunt cd0e13f876 Add CHANGES note for [GL #3327]
(cherry picked from commit 3f478a3bed)
2022-05-14 00:58:29 -07:00
Evan Hunt 6edbe8452c Add lower bound checks to fetchlimit test
Check that the recursing client count is above a reasonable
minimum, as well as below a maximum, so that we can detect
bugs that cause recursion to fail too early or too often.

(cherry picked from commit 8834c44683)
2022-05-14 00:58:29 -07:00
Evan Hunt 82c197d93b Cleanup: always count ns_statscounter_recursclients
The ns_statscounter_recursclients counter was previously only
incremented or decremented if client->recursionquota was non-NULL.
This was harmless, because that value should always be non-NULL if
recursion is enabled, but it made the code slightly confusing.

(cherry picked from commit 0201eab655)
2022-05-14 00:58:26 -07:00
Evan Hunt 9582d05683 Disable EDNS for the fetchlimit test server
The fetchlimit test depends on a resolver continuing to try UDP
and timing out while the client waits for resolution to succeed.
but since commit bb990030 (flag day 2020), a fetch will always
switch to TCP after two timeouts, unless EDNS was disabled for
the query.

This commit adds "edns no;" to server statements in the fetchlimit
resolver, to restore the behavior expected by the test.

(cherry picked from commit 81deb24deb)
2022-05-14 00:52:22 -07:00
Evan Hunt 8516efa4fd Fix the fetches-per-server quota calculation
Since commit bad5a523c2, when the fetches-per-server quota
was increased or decreased, instead of the value being set to
the newly calculated quota, it was set to the *minimum* of
the new quota or 1 - which effectively meant it was always set to 1.
it should instead have been the maximum, to prevent the value from
ever dropping to zero.

(cherry picked from commit 694bc50273)
2022-05-14 00:52:22 -07:00
Evan Hunt 77418a1117 Merge branch '3351-checkconf-overflow-v9_16' into 'v9_16'
prevent a possible buffer overflow in configuration check

See merge request isc-projects/bind9!6305
2022-05-14 04:21:08 +00:00
Evan Hunt b6670787d2 prevent a possible buffer overflow in configuration check
corrected code that could have allowed a buffer overfow while
parsing named.conf.

(cherry picked from commit 921043b541)
2022-05-13 20:30:41 -07:00
Ondřej Surý 45fbcb2f94 Merge branch 'ondrej-fix-trampoline-locking-v9_16' into 'v9_16'
Lock the trampoline when attaching [v9.16]

See merge request isc-projects/bind9!6299
2022-05-13 12:06:23 +00:00
Ondřej Surý be7f672fcc Lock the trampoline when attaching
When attaching to the trampoline, the isc__trampoline_max was access
unlocked.  This would not manifest under normal circumstances because we
initialize 65 trampolines by default and that's enough for most
commodity hardware, but there are ARM machines with 128+ cores where
this would be reported by ThreadSanitizer.

Add locking around the code in isc__trampoline_attach().  This also
requires the lock to leak on exit (along with memory that we already)
because a new thread might be attaching to the trampoline while we are
running the library destructor at the same time.

(cherry picked from commit 933162ae14)
2022-05-13 13:42:23 +02:00
Matthijs Mekking b2ae8ba5f8 Merge branch '3335-confusing-parental-source-documentation-v9_16' into 'v9_16'
[v9_16] Remove confusing parental-source line

See merge request isc-projects/bind9!6287
2022-05-11 15:02:32 +00:00
Matthijs Mekking 24913fc696 Remove confusing parental-source line
Remove the line "This address must appear in the secondary server’s
parental-agents zone clause". This line is a copy paste error from
notify-source.

Rewrap.

(cherry picked from commit 313f606692)
2022-05-11 15:01:35 +00:00
Michał Kępień 31abf01e04 Merge branch 'michal/drop-post-merge-pipelines-v9_16' into 'v9_16'
[v9_16] Drop post-merge pipelines

See merge request isc-projects/bind9!6294
2022-05-11 13:08:00 +00:00
Michał Kępień fc028b873d Drop post-merge pipelines
Commit 24961f6068 introduced the concept
of post-merge pipelines.  These were used to build documentation after
each merge to any of the maintained branches, to allow up-to-date
documentation to be subsequently published on the bind.isc.org
microsite.  As the latter no longer downloads documentation from GitLab,
instead linking to Read the Docs for all currently maintained branches,
post-merge pipelines have become redundant since running the
"autoreconf" and "docs" jobs after each merge is not necessary any more.
Drop the "release_branch_triggering_rules" YAML anchor and revert to
default triggering rules for the "autoconf" and "docs" jobs, effectively
preventing pipelines from being created after each merge to any of the
maintained branches.

(cherry picked from commit 7b8c9e04fc)
2022-05-11 15:06:09 +02:00
Michał Kępień 925b15024d Merge branch '565-do-not-trigger-gitlab-pages-pipelines-any-more-v9_16' into 'v9_16'
Do not trigger GitLab Pages pipelines any more

See merge request isc-projects/bind9!6291
2022-05-11 12:22:44 +00:00
Michał Kępień 8ddb6cb12c Do not trigger GitLab Pages pipelines any more
The bind.isc.org microsite no longer downloads documentation from
GitLab, instead linking to Read the Docs for all currently maintained
branches.  This makes it redundant to trigger GitLab Pages pipelines
after each merge to any of the maintained branches.  Revert changes
introduced by commit 31bde118db: remove
the "push:docs" job along with the "push" stage it is associated with
and revert artifact expiry time for the "docs" job to the default value.

(cherry picked from commit a7fccaee82)
2022-05-11 14:14:11 +02:00
Petr Špaček fb220e3652 Merge branch 'pspacek/arm-remove-solaris251-v9_16' into 'v9_16'
Remove ARM notes about Solaris 2.5.1 [v9_16]

See merge request isc-projects/bind9!6289
2022-05-11 10:54:24 +00:00
Petr Špaček 0366ff94ee Remove ARM notes about Solaris 2.5.1
It was released in May 1996 and hopefully is not used to run BIND
anymore.

(cherry picked from commit 4388656f60)
2022-05-11 12:54:01 +02:00
Michal Nowak ed266b41cb Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.16.30' into 'v9_16'
Set up version and release notes for BIND 9.16.30

See merge request isc-projects/bind9!6283
2022-05-11 09:13:53 +00:00
Michal Nowak 9b7487b2f2 Set up release notes for BIND 9.16.30 2022-05-11 11:04:21 +02:00
Michal Nowak 68fe5ac27f Update BIND version to 9.16.30-dev 2022-05-11 11:03:35 +02:00
Tinderbox User 7e23e43e14 Merge branch 'prep-release' into v9_16_29-release 2022-05-10 09:02:21 +00:00
Tinderbox User 6c8e83b8fe prep 9.16.29 2022-05-10 08:55:26 +00:00
Michal Nowak 25dbd5c2ec Merge branch 'mnowak/prepare-documentation-for-bind-9.16.29' into 'v9_16_29-release'
Prepare documentation for BIND 9.16.29

See merge request isc-private/bind9!404
2022-05-09 22:19:16 +00:00
Michal Nowak 85d1c24a90 Tweak and reword release notes 2022-05-10 00:03:20 +02:00
Michal Nowak e4f535334e Prepare release notes for BIND 9.16.29 2022-05-06 17:06:36 +02:00
Mark Andrews 3f4478f59a Merge branch '3232-rpz-rpz-nsip-rules-seem-not-to-understand-stub-and-static-stub-zones-and-don-t-handle-v9_16' into 'v9_16'
Add test cases using static and static-stub zones

See merge request isc-projects/bind9!6263
2022-05-04 14:16:44 +00:00
Mark Andrews d408b7055c Add CHANGES entry for [GL #3232]
(cherry picked from commit 63f420c89a)
2022-05-04 23:53:57 +10:00
Mark Andrews 36612dadff Allow DNS_RPZ_POLICY_ERROR to be converted to a string
(cherry picked from commit f498d2db0d)
2022-05-04 23:53:21 +10:00
Mark Andrews 8f23d56fba Check the cache as well when glue NS are returned processing RPZ
(cherry picked from commit 8fb72012e3)
2022-05-04 23:53:21 +10:00
Mark Andrews 8c2ede6edc Process learned records as well as glue
(cherry picked from commit 07c828531c)
2022-05-04 23:53:21 +10:00
Mark Andrews 13129872eb Process the delegating NS RRset when checking rpz rules
(cherry picked from commit cf97c61f48)
2022-05-04 23:53:21 +10:00
Mark Andrews 967e5e09cd Add test cases using static and static-stub zones
RPZ NSIP and NSDNAME checks were failing with "unrecognized NS
rpz_rrset_find() failed: glue" when static or static-stub zones
where used to resolve the query name.

Add tests using stub and static-stub zones that are expected to
be filtered and not-filtered against NSIP and NSDNAME rules.

stub and static-stub queries are expected to be filtered

stub-nomatch and static-stub-nomatch queries are expected to be passed

(cherry picked from commit 30cb70c826)
2022-05-04 23:53:21 +10:00
Ondřej Surý 5d4e19ae05 Merge branch 'ondrej-add-missing-void-in-named_config_default-v9_16' into 'v9_16'
Add missing void in named_config_getdefault() definition [v9.16]

See merge request isc-projects/bind9!6261
2022-05-04 11:05:53 +00:00
Ondřej Surý 7a8e6d67a5 Add missing void in named_config_getdefault() definition
The named_config_getdefault() was missing void in the function
definition.  This broke clang-15 that didn't match the declaration that
had the void in the argument with the definition that hadn't.
2022-05-04 13:03:51 +02:00
Mark Andrews c76a6349eb Merge branch '3266-rndc-system-test-fails-due-to-rate-limit-of-built-in-_bind-view-v9_16' into 'v9_16'
Improve forensics for the querylog section of rndc system test

See merge request isc-projects/bind9!6246
2022-05-02 19:54:44 +00:00
Mark Andrews 8ae4fda54a Improve forensics for the querylog section of rndc system test
The dig commands appear to be failing unexpectedly on some platforms
when rate limiting kicks in and the response is dropped.  Correct
behaviour should be for dig to retry the query.  Set +qr and capture
stdout and stderr of each of the dig commands involved.

(cherry picked from commit 614cf5a030)
2022-05-03 00:19:37 +10:00
Mark Andrews 3ad550f17a Merge branch '3307-socket-c-5111-setsockopt-20-ipv6_v6only-failed-invalid-argument-on-openbsd' into 'v9_16'
Resolve "socket.c:5111: setsockopt(20, IPV6_V6ONLY) failed: Invalid argument on OpenBSD"

See merge request isc-projects/bind9!6208
2022-05-02 04:27:49 +00:00
Mark Andrews 2a9ab8a732 Don't try to set IPV6_V6ONLY on OpenBSD
OpenBSD IPv6 sockets are always IPv6-only, so the socket option is read-only (not modifiable)
2022-05-02 14:09:31 +10:00
Matthijs Mekking fe23b6e020 Merge branch 'matthijs-kasp-system-test-failure-v9_16' into 'v9_16'
[v9_16] Fix kasp system test failures

See merge request isc-projects/bind9!6237
2022-04-29 12:26:05 +00:00
Matthijs Mekking 22f3c453f0 Fix a kasp system test bug
In '_check_apex_dnskey' we check for each key (KEY1 to KEY4) if they
are present in the DNSKEY RRset if they should be.

However, we only grep the dig output for the first seven fields (owner,
ttl, class, type, flags, protocol, algorithm). This can be the same
for different keys.

For example, KEY1 may be KSK predecessor and KEY2 a KSK successor,
both DNSKEY records for these keys are the same up to the public key
field. This can cause test failures if KEY1 needs to be present, but
KEY2 not, because when grepping for KEY2 we will falsely detect the
key to be present (because the grep matches KEY1).

Fix the function by grepping looking for the first seven fields in the
corresponding key file and retrieve the public key part. Grep for this
in the dig output.

(cherry picked from commit 3e1d09ac66)
2022-04-29 13:59:49 +02:00
Matthijs Mekking 3625cf1f63 Minor fixes in kasp system test
Fix two typos and two grep calls.

(cherry picked from commit 2b34b326fc)
2022-04-29 13:59:41 +02:00
Petr Špaček a62a672ce0 Merge branch 'feature/main/default-config-print-v9_16' into 'v9_16'
Export built-in default configuration for named binary [v9_16]

See merge request isc-projects/bind9!6235
2022-04-29 10:40:57 +00:00
Petr MenšíkandPetr Špaček c1127e3550 Export built-in default configuration for named binary
It might be useful to display built-in configuration with all its
values. It should make it easier to test what default values has changed
in a new release.

Related: #1326
(cherry picked from commit cf722d18b3)
2022-04-29 12:26:46 +02:00
Arаm Sаrgsyаn fa9db55d59 Merge branch '3278-dig-+nssearch-hang-v9_16' into 'v9_16'
Resolve "dig +nssearch sometimes hangs in BIND v9.16, with an assertion failure after "ctrl+c"

See merge request isc-projects/bind9!6125
2022-04-29 10:00:34 +00:00
Aram Sargsyan ab4ec2278e Add CHANGES note for [GL #3278] 2022-04-29 09:10:44 +00:00
Aram Sargsyan 1f2d2611ee Fix dig +nssearch race between recv_done() and send_done()
The `send_done()` callback needs to access query's `link.next` pointer
when running in `+nssearch` mode, even if the query is already canceled
or serviced, which can happen when `recv_done()` happens to be called
earlier than `send_done()`.

Keep the next query's pointer before unlinking the query from the
lookup's queries list in `clear_query()` so that `send_done()` can
use it even if the query is cleared.
2022-04-29 09:09:39 +00:00
Aram Sargsyan e3b058bbcd Print more lookup and query pointers in dighost.c debug messages
Printing the pointers makes it clear, for example, for which query
exactly a recv_done() or send_done() callback was called, which
helps investigating and debugging issues easier.
2022-04-29 09:09:39 +00:00
Arаm Sаrgsyаn 6aac98bfa0 Merge branch '3313-dlz_ldap_driver.c-fix-fallthrough-v9_16' into 'v9_16'
Add missing FALLTHROUGH macros in a switch statement

See merge request isc-projects/bind9!6222
2022-04-29 07:48:23 +00:00
Aram Sargsyan 930cfe7d0f Add missing FALLTHROUGH macros in a switch statement
dzl_ldap_driver.c was missing some FALLTHROUGH macros in a switch
statement resulting in compiler warnings and a failed build when
configured with `--with-dlz-ldap` option.
2022-04-29 07:13:53 +00:00
Mark Andrews 44b8eea09e Merge branch 'bug/main/new-zones-dir-null-v9_16' into 'v9_16'
Don't test new-zones-directory argument validity

See merge request isc-projects/bind9!6231
2022-04-29 02:08:11 +00:00
Petr MenšíkandMark Andrews c1b3862c4a Additional safety check for negative array index
inet_ntop result should always protect against empty string accepted
without an error. Make additional check to satisfy coverity scans.

(cherry picked from commit 656a0f076f)
2022-04-29 11:46:33 +10:00
Petr MenšíkandMark Andrews 1e88c0196c Initialize printed buffer
- var_decl: Declaring variable "tbuf" without initializer
- assign: Assigning: "target.base" = "tbuf", which points to
  uninitialized data
- assign: Assigning: "r.base" = "target.base", which points to
  uninitialized data

I expect it would correctly initialize length always. Add simple
initialization to silent coverity.

(cherry picked from commit 59132bd3ec)
2022-04-29 11:46:33 +10:00
Petr MenšíkandMark Andrews 1bc7552203 Ensure diff variable is not read uninitialized
Coverity detected issues:
- var_decl: Declaring variable "diff" without initializer.
- uninit_use_in_call: Using uninitialized value "diff.tuples.head" when
  calling "dns_diff_clear".

(cherry picked from commit 67e773c93c)
2022-04-29 11:46:33 +10:00
Petr MenšíkandMark Andrews cde36497ba Don't test new-zones-directory argument validity
Parser ensures new-zones-directory has qstring parameter before it can
reach this place. dir == NULL then should never happen on any
configuration. Replace silent check with insist.

(cherry picked from commit 0a7d04367a)
2022-04-29 11:46:33 +10:00
Mark Andrews a49ff2241f Merge branch '3306-undefined-macros-in-contrib-dlz-modules-wildcard-dlz_wildcard_dynamic-c-v9_16' into 'v9_16'
Define local instances of FALLTHROUGH and UNREACHABLE

See merge request isc-projects/bind9!6229
2022-04-29 01:16:30 +00:00
Mark Andrews 5e697b4f3c Add CHANGES note for [GL #3306]
(cherry picked from commit c57363fb7d)
2022-04-29 10:54:31 +10:00
Mark Andrews 13f8e879ab Define local instances of FALLTHROUGH and UNREACHABLE
FALLTHOUGH is a copy of how it is defined in <isc/util.h>

UNREACHABLE follows the model used in MacOS /usr/include/c++/v1/cstdlib
to determine if __builtin_ureachable is available

(cherry picked from commit 6d68a22954)
2022-04-29 10:53:54 +10:00
Mark Andrews 73a256f332 Merge branch '2813-build-named-with-dlz-is-broken-on-9-16-take-2' into 'v9_16'
Resolve "Build named with DLZ is broken on 9.16"

See merge request isc-projects/bind9!6227
2022-04-28 22:52:21 +00:00
Mark Andrews 4334674d93 Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB
It was discovered that MariaDB 10 didn't define LIBMARIADB leading
to compilation errors of MySQL DLZ modules on Debian stretch.

Use MARIADB_BASE_VERSION instead which is defined in all tested MariaDB
versions.
2022-04-29 07:13:57 +10:00
Ondřej Surý 9a2b1cf399 Merge branch '2813-build-named-with-dlz-is-broken-with-MariaDB-10-v9_16' into 'v9_16'
Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB [v9.16]

See merge request isc-projects/bind9!6226
2022-04-28 16:07:13 +00:00
Ondřej SurýandOndřej Surý 04c6d853c7 Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB
It was discovered that MariaDB 10 didn't define LIBMARIADB leading
to compilation errors of MySQL DLZ modules on Debian stretch.

Use MARIADB_BASE_VERSION instead which is defined in all tested MariaDB
versions.

(cherry picked from commit 5835aae694)
2022-04-28 18:05:24 +02:00
Mark Andrews 7351da4f24 Merge branch 'bug/v9_16/python3.11' into 'v9_16'
Move ignore case indication to flags passed to re

See merge request isc-projects/bind9!6157
2022-04-28 06:24:07 +00:00
Mark Andrews 236d39f20e Add CHANGES note for [GL !6157] 2022-04-28 16:05:03 +10:00
Petr MenšíkandMark Andrews 0ceba5a75a Remove universal newline mode when opening the file
It is default when open is called and obsolete. Removed in python 3.11,
where it triggers errors. Just use normal read-only text opening.
2022-04-28 05:38:42 +00:00
Petr MenšíkandMark Andrews b98658a99a Move ignore case indication to flags passed to re
Recent python does not make parsetab.py successfully, because some token
regexp is starting with ?i flag. Remove that flag from regex and pass it
as extra flags parameter instead.
2022-04-28 05:38:42 +00:00
Petr Špaček 6800f552f2 Merge branch 'pspacek/pin-sphinx-packages-for-rtd-v9_16' into 'v9_16'
Pin Sphinx related package versions to match ReadTheDocs and our CI [v9_16]

See merge request isc-projects/bind9!6193
2022-04-27 12:36:26 +00:00
Petr Špaček cf44faf6ae Pin Sphinx related package versions to match ReadTheDocs and our CI
This seems to be most appropriate way to ensure consistency between
release tarballs and public presentation on ReadTheDocs.

Previous attempt with removing docutils constraint, which relied on pip
depedency solver to pick the same packages as in CI was flawed. RTD
installs a bit different set of packages so it was inherently
unreliable.

As a result RTD pulled in sphinx-rtd-theme==0.4.3 while CI
had 1.0.0, and this inconsistency caused Table of Contents in Release
Notes to render incorrectly. Previous solution was to downgrade
docutils to < 0.17, but I think we should rather pin exact versions.

For the long history of messing with versions read also
isc-projects/bind9@2a8eda0084
isc-projects/images@d4435b97be
isc-projects/bind9@6a2daddf5b

(cherry picked from commit 6088ba3837)
2022-04-27 14:35:52 +02:00
Petr Špaček fafa477c91 Merge branch 'pspacek/rtd-requirements-update-v9_16' into 'v9_16'
Fix mismatch between docutils version in CI and ReadTheDocs [v9_16]

See merge request isc-projects/bind9!6186
2022-04-26 13:49:59 +00:00
Petr Špaček a5c06c0080 Fix mismatch between docutils version in CI and ReadTheDocs
Currently our CI images we use to build docs (which subsequently get
into release tarballs) are using docutils 0.17.1, which is latest version
which fulfills Sphinx 4.5.0 requirement for docutils < 0.18.

The old requirement for docutils < 0.17 was causing discrepancy between
the way we build release artifacts and the docs on ReadTheDocs.org which
uses doc/arm/requirements.txt from our repo.

Remove the limit for RDT with hope that it will pull latest permissible
version of docutils.

For the long history of messing with docutils version read also
isc-projects/images@d4435b97be
isc-projects/bind9@6a2daddf5b

(cherry picked from commit 2a8eda0084)
2022-04-26 15:48:46 +02:00
Ondřej Surý a7f3951579 Merge branch 'ondrej-enforce-minimal-libuv-version-v9_16' into 'v9_16'
Abort when libuv at runtime mismatches libuv at compile time [v9.16]

See merge request isc-projects/bind9!6178
2022-04-26 10:21:26 +00:00
Ondřej Surý 4f30b16d96 Abort when libuv at runtime mismatches libuv at compile time
When we compile with libuv that has some capabilities via flags passed
to f.e. uv_udp_listen() or uv_udp_bind(), the call with such flags would
fail with invalid arguments when older libuv version is linked at the
runtime that doesn't understand the flag that was available at the
compile time.

Enforce minimal libuv version when flags have been available at the
compile time, but are not available at the runtime.  This check is less
strict than enforcing the runtime libuv version to be same or higher
than compile time libuv version.
2022-04-26 11:52:02 +02:00
Petr Špaček 64fb24a354 Merge branch '3294-support-ancient-sphinx' into 'v9_16'
Support Sphinx 1.6.7 again

See merge request isc-projects/bind9!6168
2022-04-26 09:34:28 +00:00
Petr Špaček 02f5e9c505 Support Sphinx 1.6.7 again
Older versions do not have "override" parameter in add_role_to_domain()
function signature. Luckily the override is _not_ required when
overidding the built-in standard domain roles for the first time, so we
just drop the paramter.

Tested with Sphinx 1.6.7 (does not have override) and Sphinx 4.5.0
(does have override).

Fixes: #3294
Related: !6086
2022-04-25 13:31:55 +02:00
Michał Kępień 2368359fe2 Merge branch '3297-use-setuptools-instead-of-distutils-if-possible' into 'v9_16'
Use setuptools instead of distutils if possible

See merge request isc-projects/bind9!6152
2022-04-22 10:38:12 +00:00
Michał Kępień 1f4667061f Use setuptools instead of distutils if possible
According to PEP 632 [1], the distutils module is considered deprecated
in Python 3.10 and will be removed in Python 3.12.  Setup scripts
using it should be migrated to the setuptools module, which contains
drop-in replacements for distutils functions [2].  The catch is that the
setuptools module is not part of the Python Standard Library.

While this problem could be addressed by adding a hard dependency on
setuptools, it only affects BIND 9.16, which is an Extended Support
Version.  To avoid unnecessary disruptions, try importing setup() from
the setuptools module and fall back to using distutils if that fails.
Add a PyLint suppression for this specific "deprecated-module" warning.

Since the setuptools module is not part of the Python Standard Library
and therefore it is not guaranteed that it is universally available in
every Python installation, update Python-related checks in configure.ac
to ensure Python module installation does not silently fail.

[1] https://peps.python.org/pep-0632/
[2] https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html
2022-04-22 12:36:57 +02:00
Michał Kępień eedf1df1f6 Merge branch '3287-prevent-memory-bloat-caused-by-a-jemalloc-quirk-v9_16' into 'v9_16'
[v9_16] Prevent memory bloat caused by a jemalloc quirk

See merge request isc-projects/bind9!6154
2022-04-21 12:45:48 +00:00
Michał Kępień eb9a0c1fdd Add CHANGES entry for GL #3287
(cherry picked from commit e33aef4e39)
2022-04-21 14:23:59 +02:00
Michał Kępień e850946557 Prevent memory bloat caused by a jemalloc quirk
Since version 5.0.0, decay-based purging is the only available dirty
page cleanup mechanism in jemalloc.  It relies on so-called tickers,
which are simple data structures used for ensuring that certain actions
are taken "once every N times".  Ticker data (state) is stored in a
thread-specific data structure called tsd in jemalloc parlance.  Ticks
are triggered when extents are allocated and deallocated.  Once every
1000 ticks, jemalloc attempts to release some of the dirty pages hanging
around (if any).  This allows memory use to be kept in check over time.

This dirty page cleanup mechanism has a quirk.  If the first
allocator-related action for a given thread is a free(), a
minimally-initialized tsd is set up which does not include ticker data.
When that thread subsequently calls *alloc(), the tsd transitions to its
nominal state, but due to a certain flag being set during minimal tsd
initialization, ticker data remains unallocated.  This prevents
decay-based dirty page purging from working, effectively enabling memory
exhaustion over time. [1]

The quirk described above has been addressed (by moving ticker state to
a different structure) in jemalloc's development branch [2], but not in
any numbered jemalloc version released to date (the latest one being
5.2.1 as of this writing).

Work around the problem by ensuring that every thread spawned by
isc_thread_create() starts with a malloc() call.  Avoid immediately
calling free() for the dummy allocation to prevent an optimizing
compiler from stripping away the malloc() + free() pair altogether.

An alternative implementation of this workaround was considered that
used a pair of isc_mem_create() + isc_mem_destroy() calls instead of
malloc() + free(), enabling the change to be fully contained within
isc__trampoline_run() (i.e. to not touch struct isc__trampoline), as the
compiler is not allowed to strip away arbitrary function calls.
However, that solution was eventually dismissed as it triggered
ThreadSanitizer reports when tools like dig, nsupdate, or rndc exited
abruptly without waiting for all worker threads to finish their work.

[1] https://github.com/jemalloc/jemalloc/issues/2251
[2] https://github.com/jemalloc/jemalloc/commit/c259323ab3082324100c708109dbfff660d0f4b8

(cherry picked from commit 7aa7b6474b)
2022-04-21 14:23:59 +02:00
Michał Kępień d17d794722 Merge tag 'v9_16_28' into v9_16
BIND 9.16.28
2022-04-21 09:47:04 +02:00
Mark Andrews 61f86bb7b0 Merge branch '3279-lib-dns-ncache-c-rdataset_settrust-fails-to-set-trust-on-called-rdataset-v9_16' into 'v9_16'
Check that pending negative cache entries for DS can be used successfully

See merge request isc-projects/bind9!6136
2022-04-19 00:07:39 +00:00
Mark Andrews 18c479f4d5 Add CHANGES entry for [GL #3279]
(cherry picked from commit 14ca6270d3)
2022-04-19 09:45:48 +10:00
Mark Andrews cb3c29cf8e Update the rdataset->trust field in ncache.c:rdataset_settrust
Both the trust recorded in the slab stucture and the trust on
rdataset need to be updated.

(cherry picked from commit d043a41499)
2022-04-19 09:45:16 +10:00
Mark Andrews b5f2ab9cd4 Check that pending negative cache entries for DS can be used successfully
Prime the cache with a negative cache DS entry then make a query for
name beneath that entry. This will cause the DS entry to be retieved
as part of the validation process.  Each RRset in the ncache entry
will be validated and the trust level for each will be updated.

(cherry picked from commit d2d9910da2)
2022-04-19 09:45:16 +10:00
Matthijs Mekking d44585fd94 Merge branch '2931-cds-delete-removed-on-signing-v9_16' into 'v9_16'
[v9_16] Don't delete CDS DELETE after zone sign

See merge request isc-projects/bind9!6127
2022-04-13 15:19:54 +00:00
Matthijs Mekking 24f9902753 Add CDS/CDNSKEY DELETE documentation
Mention in the DNSSEC guide in the "revert to unsigned" recipe that you
can publish CDS and CDNSKEY DELETE records to remove the corresponding
DS records from the parent zone.

(cherry picked from commit f088657eb1)
2022-04-13 15:13:49 +02:00
Matthijs Mekking facf1c80a1 Add CHANGE and release note for #2931
Release note worthy.

(cherry picked from commit ebbcf4c34f)
2022-04-13 15:13:47 +02:00
Matthijs Mekking 42f43cebdd Update dns_dnssec_syncdelete() function
Update the function that synchronizes the CDS and CDNSKEY DELETE
records. It now allows for the possibility that the CDS DELETE record
is published and the CDNSKEY DELETE record is not, and vice versa.

Also update the code in zone.c how 'dns_dnssec_syncdelete()' is called.

With KASP, we still maintain the DELETE records our self. Otherwise,
we publish the CDS and CDNSKEY DELETE record only if they are added
to the zone. We do still check if these records can be signed by a KSK.

This change will allow users to add a CDS and/or CDNSKEY DELETE record
manually, without BIND removing them on the next zone sign.

Note that this commit removes the check whether the key is a KSK, this
check is redundant because this check is also made in
'dst_key_is_signing()' when the role is set to DST_BOOL_KSK.

(cherry picked from commit 3d05c99abb)
2022-04-13 15:13:12 +02:00
Matthijs Mekking e5a5b23f41 Test CDS DELETE persists after zone sign
Add a test case for a dynamically added CDS DELETE record and make
sure it is not removed when signing the zone. This happens because
BIND maintains CDS and CDNSKEY publishing and it will only allow
CDS DELETE records if the zone is transitioning to insecure. This is
a state that can be identified when using KASP through 'dnssec-policy',
but not when using 'auto-dnssec'.

(cherry picked from commit f08277f9fb)
2022-04-13 15:13:03 +02:00
Michał Kępień 493ddc15f3 Merge branch 'michal/set-up-release-notes-for-bind-9.16.29' into 'v9_16'
Set up release notes for BIND 9.16.29

See merge request isc-projects/bind9!6120
2022-04-12 12:17:18 +00:00
Michał Kępień 0fb4b6520e Set up release notes for BIND 9.16.29 2022-04-12 14:15:41 +02:00
Michał Kępień 5c4dafe354 Merge branch 'michal/update-bind-version-to-9.16.29-dev' into 'v9_16'
Update BIND version to 9.16.29-dev

See merge request isc-projects/bind9!6116
2022-04-12 11:16:00 +00:00
Michał Kępień 5e4b940c9c Update BIND version to 9.16.29-dev 2022-04-12 13:15:31 +02:00
Tinderbox User 7aea13ff14 Merge branch 'prep-release' into v9_16_28-release 2022-04-11 15:28:12 +00:00
Tinderbox User f7cbac4c36 prep 9.16.28 2022-04-11 15:21:43 +00:00
Michał Kępień 37a672467a Merge branch 'michal/prepare-documentation-for-bind-9.16.28' into 'v9_16_28-release'
Prepare documentation for BIND 9.16.28

See merge request isc-private/bind9!398
2022-04-11 15:15:04 +00:00
Michał Kępień 6810a0c055 Prepare release notes for BIND 9.16.28 2022-04-11 17:05:07 +02:00
Michał Kępień d559c8ac0c Reorder release notes 2022-04-11 17:05:07 +02:00
Michał Kępień ab0923a9ce Tweak and reword release notes 2022-04-11 17:05:07 +02:00
Michał Kępień 1c35cb1aa0 Merge branch 'michal/fix-forward-system-test-requirements-v9_16' into 'v9_16'
[v9_16] Fix "forward" system test requirements

See merge request isc-projects/bind9!6112
2022-04-11 13:33:16 +00:00
Michał Kępień 55f2457526 Fix "forward" system test requirements
Commit 59d1eb3ff8 added a Python-based
name server (bin/tests/system/forward/ans11/ans.py) to the "forward"
system test, but did not update the bin/tests/system/forward/prereq.sh
script to ensure Python is present in the test environment before the
"forward" system test is run.  Update bin/tests/system/forward/prereq.sh
to enforce that requirement.
2022-04-11 14:40:20 +02:00
Petr Špaček 7ee090be53 Merge branch '2950-cache-acceptance-rules-test-v9_16' into 'v9_16'
[CVE-2021-25220] Add tests for forwarder cache poisoning scenarios [v9_16]

See merge request isc-projects/bind9!6106
2022-04-08 08:13:15 +00:00
Mark AndrewsandPetr Špaček 59d1eb3ff8 Add tests for forwarder cache poisoning scenarios
- Check that an NS in an authority section returned from a forwarder
  which is above the name in a configured "forward first" or "forward
  only" zone (i.e., net/NS in a response from a forwarder configured for
  local.net) is not cached.
- Test that a DNAME for a parent domain will not be cached when sent
  in a response from a forwarder configured to answer for a child.
- Check that glue is rejected if its name falls below that of zone
  configured locally.
- Check that an extra out-of-bailiwick data in the answer section is
  not cached (this was already working correctly, but was not explicitly
  tested before).

(cherry picked from commit bf3fffff67)
2022-04-08 10:12:24 +02:00
Michal Nowak cc0954631d Merge branch '3112-test-lingering-tcp-sockets-in-closewait-v9_16' into 'v9_16'
[v9_16] Add system test lingering CLOSE_WAIT TCP sockets

See merge request isc-projects/bind9!6104
2022-04-08 08:03:14 +00:00
Ondřej SurýandMichal Nowak 260e0ceaf5 Add system test **/named.* modifier files to .reuse/dep5
There's couple of files that modify behaviour of named when started via
bin/tests/system/start.pl.  Add those files as CC-1.0 to .reuse/dep5 as
they are just empty placeholders.

(cherry picked from commit b6eb31a0e3)
2022-04-08 09:36:08 +02:00
Matthijs MekkingandMichal Nowak a8313a6c3c Add system test lingering CLOSE_WAIT TCP sockets
Add a test case to check for lingering TCP sockets stuck in the
CLOSE_WAIT state. This can happen if a client sends some garbage after
its first query.

The system test runs the reproducer script and then sends another TCP
query to the resolver. The resolver is configured to allow one TCP
client only. If BIND has its TCP socket stuck in CLOSE_WAIT, it does
not have the resources available to answer the second query.

Note: A better test would be to check if the named daemon does not
have a TCP socket stuck in CLOSE_WAIT for example with netstat. When
running this test locally you can examine named with netstat manually.
But since netstat is platform specific it is not a good candidate to do
this as a system test.

If you, if you could return, don't let it burn.
Do you have to let it linger?
- Cranberries

(cherry picked from commit b9ebde705b)
2022-04-08 09:36:08 +02:00
Petr ŠpačekandMichal Nowak 237d88fe22 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.

(cherry picked from commit b8829c801f)

In addition to b8829c801f,
"R:$systest:SKIPPED" is not being printed when pytests are skipped
because that leads to two `R:` lines - SKIPPED and PASS/FAIL which is
determined later based on other conditions (core files identified,
assertion failures, shell test result, ...) - which is wrong and
testsummary.sh rightfully stumbles on it:

    I:Found 106 test results, but 105 tests were run
2022-04-08 09:20:55 +02:00
Petr Špaček 7cffcce36f Merge branch 'pspacek/manpage-hyperlinks-v9_16' into 'v9_16'
Backport helpers for hyperlinks in manual pages [v9_16]

See merge request isc-projects/bind9!6086
2022-04-07 14:14:07 +00:00
Petr Špaček 148f6f20e7 Ignore :option: references in rst files to to simplify doc backports
Override Sphinx built-in :option: to act and render as `` literal.
This avoids problems with undefined :option:`target`s when merging
doc backports.
2022-04-07 15:46:55 +02:00
Petr Špaček c9a512247d Introduce new Sphinx role iscman for ISC manual pages
The new directive and role "iscman" allow to tag & reference man pages in
our source tree. Essentially it is just namespacing for ISC man pages,
but it comes with couple benefits.

Differences from .. _man_program label we formerly used:
- Does not expand :ref:`man_program` into full text of the page header.
- Generates index entry with category "manual page".
- Rendering style is closer to ubiquitous to the one produced
  by ``named`` syntax.

Differences from Sphinx built-in :manpage: role:
- Supports all builders with support for cross-references.
- Generates internal links (unlike :manpage: which generates external
  URLs).
- Checks that target exists withing our source tree.

(cherry-picked from commit 7e7a946d44)
2022-04-07 15:46:52 +02:00
Michał Kępień ecc6ec0754 Merge branch '3208-add-CHANGES-entry-v9_16' into 'v9_16'
[v9_16] Add CHANGES entry for GL #3208

See merge request isc-projects/bind9!6101
2022-04-07 13:08:10 +00:00
Michał Kępień 197e8989c9 Add CHANGES entry for GL #3208
(cherry picked from commit 059a602551)
2022-04-07 15:04:51 +02:00
Ondřej Surý 47eaecf69f Merge branch '3249-rename-configuration-option-to-reuseport-v9_16' into 'v9_16'
Rename the configuration option to load balance sockets to reuseport [v9.16]

See merge request isc-projects/bind9!6095
2022-04-06 16:07:52 +00:00
Ondřej Surý a7f893e836 Rename the configuration option to load balance sockets to reuseport
After some back and forth, it was decidede to match the configuration
option with unbound ("so-reuseport"), PowerDNS ("reuseport") and/or
nginx ("reuseport").

(cherry picked from commit 7e71c4d0cc)
2022-04-06 17:51:12 +02:00
Ondřej Surý f943504b03 Merge branch '3190-offload-rpz-updates-revert-v9_16' into 'v9_16'
Revert "Run the RPZ update as offloaded work" [v9.16]

See merge request isc-projects/bind9!6092
2022-04-06 11:43:57 +00:00
Ondřej Surý daa7d6d6db Revert "General cleanup of dns_rpz implementation"
This reverts commit 84e62cece5.
2022-04-06 10:41:49 +02:00
Ondřej Surý f5fbe2c26f Revert "Refactor the dns_rpz_add/delete to use local rpz copy"
This reverts commit 635147d01a.
2022-04-06 10:41:39 +02:00
Ondřej Surý b68ccdc48e Revert "Run the RPZ update as offloaded work"
This reverts commit 73a0bb8588.
2022-04-06 10:31:23 +02:00
Ondřej Surý be936a10b0 Revert "Add CHANGES and release note for [GL #3190]"
This reverts commit 639e0600f0.
2022-04-06 10:31:21 +02:00
Ondřej Surý d346d188ae Merge branch '3249-fix-windows-sockets-v9_16' into 'v9_16'
Fix the Windows code paths modified for load balanced sockets

See merge request isc-projects/bind9!6083
2022-04-05 14:35:22 +00:00
Ondřej Surý d836f23f79 Fix the Windows paths modified for load balanced sockets
When backporting the load balanced sockets to BIND 9.16, the Windows
specific paths were missed.  Add the #if(n)def _WIN32 back into the
appropriate places.
2022-04-05 11:53:18 +02:00
Ondřej Surý 93d61ae5d2 Merge branch '3249-add-configuration-option-to-disable-SO_REUSEPORT_LB-fix-v9_16' into 'v9_16'
Enable the load-balance-sockets configuration [v9.16]

See merge request isc-projects/bind9!6079
2022-04-05 00:35:17 +00:00
Ondřej Surý 5f27873d01 Rename shutdown() to test_shutdown() in timer_test.c
The shutdown() is part of standard library (POSIX-1), don't use such
name in the timer_test.c, but rather rename it to test_shutdown().
2022-04-05 02:17:47 +02:00
Ondřej Surý 9159837315 Enable the load-balance-sockets configuration
Previously, HAVE_SO_REUSEPORT_LB has been defined only in the private
netmgr-int.h header file, making the configuration of load balanced
sockets inoperable.

Move the missing HAVE_SO_REUSEPORT_LB define the isc/netmgr.h and add
missing isc_nm_getloadbalancesockets() implementation.

(cherry picked from commit 142c63dda8)
2022-04-05 02:17:47 +02:00
Ondřej Surý 8f16a25522 Merge branch '3249-add-configuration-option-to-disable-SO_REUSEPORT_LB-v9_16' into 'v9_16'
Add option to configure load balance sockets [v9.16]

See merge request isc-projects/bind9!6075
2022-04-04 23:52:46 +00:00
Ondřej Surý 4026c3559b Add CHANGES and release note for [GL #3249]
(cherry picked from commit 855f49cfba)
2022-04-05 01:21:50 +02:00
Ondřej Surý 8993ebc01a Add option to configure load balance sockets
Previously, the option to enable kernel load balancing of the sockets
was always enabled when supported by the operating system (SO_REUSEPORT
on Linux and SO_REUSEPORT_LB on FreeBSD).

It was reported that in scenarios where the networking threads are also
responsible for processing long-running tasks (like RPZ processing, CATZ
processing or large zone transfers), this could lead to intermitten
brownouts for some clients, because the thread assigned by the operating
system might be busy.  In such scenarious, the overall performance would
be better served by threads competing over the sockets because the idle
threads can pick up the incoming traffic.

Add new configuration option (`load-balance-sockets`) to allow enabling
or disabling the load balancing of the sockets.

(cherry picked from commit 85c6e797aa)
2022-04-05 01:21:50 +02:00
Ondřej Surý cd9dd70594 Merge branch '3190-offload-rpz-updates-v9_16' into 'v9_16'
Run the RPZ update as offloaded work [v9.16]

See merge request isc-projects/bind9!6074
2022-04-04 22:53:55 +00:00
Ondřej Surý 639e0600f0 Add CHANGES and release note for [GL #3190]
(cherry picked from commit 23a4559b34)
(cherry picked from commit f3ae14d8c3)
2022-04-05 00:30:39 +02:00
Ondřej Surý 73a0bb8588 Run the RPZ update as offloaded work
Previously, the RPZ updates ran quantized on the main nm_worker loops.
As the quantum was set to 1024, this might lead to service
interruptions when large RPZ update was processed.

Change the RPZ update process to run as the offloaded work.  The update
and cleanup loops were refactored to do as little locking of the
maintenance lock as possible for the shortest periods of time and the db
iterator is being paused for every iteration, so we don't hold the rbtdb
tree lock for prolonged periods of time.

(cherry picked from commit f106d0ed2b)
(cherry picked from commit e128b6a951)
2022-04-05 00:30:39 +02:00
Ondřej Surý 635147d01a Refactor the dns_rpz_add/delete to use local rpz copy
Previously dns_rpz_add() were passed dns_rpz_zones_t and index to .zones
array.  Because we actually attach to dns_rpz_zone_t, we should be using
the local pointer instead of passing the index and "finding" the
dns_rpz_zone_t again.

Additionally, dns_rpz_add() and dns_rpz_delete() were used only inside
rpz.c, so make them static.

(cherry picked from commit b6e885c97f)
(cherry picked from commit f4cba0784e)
2022-04-05 00:30:39 +02:00
Ondřej Surý 84e62cece5 General cleanup of dns_rpz implementation
Do a general cleanup of lib/dns/rpz.c style:

 * Removed deprecated and unused functions
 * Unified dns_rpz_zone_t naming to rpz
 * Unified dns_rpz_zones_t naming to rpzs
 * Add and use rpz_attach() and rpz_attach_rpzs() functions
 * Shuffled variables to be more local (cppcheck cleanup)

(cherry picked from commit 840179a247)
(cherry picked from commit bfee462403)
2022-04-05 00:02:35 +02:00
Tony Finch ae34c574bb Merge branch 'fanf/macos-ifconfig-v9_16' into 'v9_16'
MacOS needs more IP addresses to run the system tests (backport to 9.16)

See merge request isc-projects/bind9!6070
2022-04-04 14:29:21 +00:00
Tony Finch 3f4a63332a MacOS needs more IP addresses to run the system tests
The launchd script only counted up to 8 whereas ifconfig.sh went all
the way up to 10, and even a bit further than that.

(cherry picked from commit 29a3e77425)
2022-04-04 15:08:45 +01:00
Mark Andrews e9ff292be3 Merge branch '3191-issue-45178-in-oss-fuzz-bind9-dns_master_load_fuzzer-integer-overflow-in-generate-v9_16' into 'v9_16'
Prevent arithmetic overflow of 'i' in master.c:generate

See merge request isc-projects/bind9!6056
2022-04-01 22:24:11 +00:00
Evan HuntandMark Andrews 975a3da84e add a system test for $GENERATE with an integer overflow
the line "$GENERATE 19-28/2147483645 $ CNAME x" should generate
a single CNAME with the owner "19.example.com", but prior to the
overflow bug it generated several CNAMEs, half of them with large
negative values.

we now test for the bugfix by using "named-checkzone -D" and
grepping for a single CNAME in the output.

(cherry picked from commit bd814b79d4)
2022-04-01 21:47:24 +11:00
Evan HuntandMark Andrews fc7ed00d70 update shell syntax
clean up the shell syntax in the checkzone test prior to adding
a new test.

(cherry picked from commit 2261c853b5)
2022-04-01 21:46:33 +11:00
Mark Andrews f06c446ae8 Add test case for issue-45178
(cherry picked from commit 9039aad0f8)
2022-04-01 21:42:53 +11:00
Mark Andrews c284112bec Prevent arithmetic overflow of 'i' in master.c:generate
the value of 'i' in generate could overflow when adding 'step' to
it in the 'for' loop.  Use an unsigned int for 'i' which will give
an additional bit and prevent the overflow.  The inputs are both
less than 2^31 and and the result will be less than 2^32-1.

(cherry picked from commit 5abdee9004)
2022-04-01 21:42:53 +11:00
Tony Finch 6cb79ead4c Merge branch '3209-notauth-subdomain-v9_16' into 'v9_16'
Log "not authoritative for update zone" more clearly (v9.16)

See merge request isc-projects/bind9!6048
2022-03-30 13:24:49 +00:00
Tony Finch a5d65815bc Log "not authoritative for update zone" more clearly
Ensure the update zone name is mentioned in the NOTAUTH error message
in the server log, so that it is easier to track down problematic
update clients. There are two cases: either the update zone is
unrelated to any of the server's zones (previously no zone was
mentioned); or the update zone is a subdomain of one or more of the
server's zones (previously the name of the irrelevant parent zone was
misleadingly logged).

Closes #3209

(cherry picked from commit 84c4eb02e7)
2022-03-30 13:24:56 +01:00
Ondřej Surý 78971e9a57 Merge branch 'ondrej/cleanup-unreachable-calls-v9_16' into 'v9_16'
Consistenly use UNREACHABLE() instead of ISC_UNREACHABLE()

See merge request isc-projects/bind9!6044
2022-03-28 22:16:38 +00:00
Ondřej Surý 79b7804ce8 Consistenly use UNREACHABLE() instead of ISC_UNREACHABLE()
In couple places, we have missed INSIST(0) or ISC_UNREACHABLE()
replacement on some branches with UNREACHABLE().  Replace all
ISC_UNREACHABLE() or INSIST(0) calls with UNREACHABLE().
2022-03-28 23:28:05 +02:00
Ondřej Surý 3512e4985a Merge branch 'ondrej/dont-use-__builtin_unreachable-on-win32-v9_16' into 'v9_16'
Add win32 __builtin_unreachable() shim

See merge request isc-projects/bind9!6039
2022-03-28 21:22:23 +00:00
Ondřej Surý 4d1d91d709 Add win32 __builtin_unreachable() shim
The backport of using modern compiler features broken Windows debug
build because there's no __builtin_unreachable() in MSVC.

Define __builtin_unreachable() shim on MSVC using __assume(0).
2022-03-28 12:57:42 +02:00
Ondřej Surý 626c17af72 Merge branch '3210-dns64-errors-v9_16' into 'v9_16'
More explicit dns64 prefix errors [v9.16]

See merge request isc-projects/bind9!6031
2022-03-25 15:48:20 +00:00
Tony FinchandOndřej Surý b000f5a7c1 Add CHANGES note for [GL #3210]
(cherry picked from commit 132f30b623)
2022-03-25 16:09:34 +01:00
Tony FinchandOndřej Surý aaa923845d More explicit dns64 prefix errors
Quote the dns64 prefix in error messages that complain about
problems with it, to avoid confusion with the following ACLs.

Closes #3210

(cherry picked from commit 496c02d32a)
2022-03-25 16:09:12 +01:00
Ondřej Surý dcf562b2cf Merge branch 'ondrej/statements-following-return-break-continue-or-goto-will-never-be-executed-v9_16' into 'v9_16'
Remove UNREACHABLE() statements after exit() [v9.16]

See merge request isc-projects/bind9!6029
2022-03-25 09:20:24 +00:00
Ondřej Surý 81614b4304 Merge branch 'ondrej/use-newer-compiler-features-v9_16' into 'v9_16'
Use modern C and modern compiler features [v9.16]

See merge request isc-projects/bind9!6026
2022-03-25 09:08:58 +00:00
Ondřej Surý 888dcc6aab Remove UNREACHABLE() statements after exit()
Couple of UNREACHABLE() statements following exit() were found and
removed.

(cherry picked from commit 81fdc4a822)
2022-03-25 10:08:39 +01:00
Ondřej Surý 8b1d60933c Remove workaround for ancient clang versions (<< 3.2 and << 4.0.1)
Some ancient versions of clang reported uninitialized memory use false
positive (see https://bugs.llvm.org/show_bug.cgi?id=14461).  Since clang
4.0.1 has been long obsoleted, just remove the workarounds.

(cherry picked from commit ae508c17bc)
2022-03-25 09:37:22 +01:00
Ondřej SurýandOndřej Surý b624be2544 Remove use of the inline keyword used as suggestion to compiler
Historically, the inline keyword was a strong suggestion to the compiler
that it should inline the function marked inline.  As compilers became
better at optimising, this functionality has receded, and using inline
as a suggestion to inline a function is obsolete.  The compiler will
happily ignore it and inline something else entirely if it finds that's
a better optimisation.

Therefore, remove all the occurences of the inline keyword with static
functions inside single compilation unit and leave the decision whether
to inline a function or not entirely on the compiler

NOTE: We keep the usage the inline keyword when the purpose is to change
the linkage behaviour.

(cherry picked from commit 20f0936cf2)
2022-03-25 09:37:18 +01:00
Ondřej SurýandOndřej Surý 75f9dd8e82 Simplify way we tag unreachable code with only ISC_UNREACHABLE()
Previously, the unreachable code paths would have to be tagged with:

    INSIST(0);
    ISC_UNREACHABLE();

There was also older parts of the code that used comment annotation:

    /* NOTREACHED */

Unify the handling of unreachable code paths to just use:

    UNREACHABLE();

The UNREACHABLE() macro now asserts when reached and also uses
__builtin_unreachable(); when such builtin is available in the compiler.

(cherry picked from commit 584f0d7a7e)
2022-03-25 09:33:51 +01:00
Ondřej SurýandOndřej Surý 673e53f81d Add FALLTHROUGH macro for __attribute__((fallthrough))
Gcc 7+ and Clang 10+ have implemented __attribute__((fallthrough)) which
is explicit version of the /* FALLTHROUGH */ comment we are currently
using.

Add and apply FALLTHROUGH macro that uses the attribute if available,
but does nothing on older compilers.

In one case (lib/dns/zone.c), using the macro revealed that we were
using the /* FALLTHROUGH */ comment in wrong place, remove that comment.

(cherry picked from commit fe7ce629f4)
2022-03-25 09:30:16 +01:00
Ondřej Surý 374fe8c70e Merge branch 'ondrej-save-tsan-files-with-txt-extension-v9_16' into 'v9_16'
Save parsed tsan files with .txt extension [v9.16]

See merge request isc-projects/bind9!6021
2022-03-25 07:20:02 +00:00
Ondřej Surý f2a5ba0250 Save parsed tsan files with .txt extension
When the parse tsan files have text extension they can be viewed
directly in the GitLab web UI without downloading them locally.

(cherry picked from commit 80582073a5)
2022-03-23 20:31:50 +01:00
Ondřej Surý ae9b9ca0a1 Merge branch '3201-no-vla-v9_16' into 'v9_16'
Remove a redundant variable-length array

See merge request isc-projects/bind9!6005
2022-03-18 18:12:51 +00:00
Tony Finch afb5f59a6f Remove a redundant variable-length array
In the GSS-TSIG verification code there was an alarming
variable-length array whose size came off the network, from the
signature in the request. It turned out to be safe, because the caller
had previously checked that the signature had a reasonable size.
However, the safety checks are in the generic TSIG implementation, and
the risky VLA usage was in the GSS-specific code, and they are
separated by the DST indirection layer, so it wasn't immediately
obvious that the risky VLA was in fact safe.

In fact this risky VLA was completely unnecessary, because the GSS
signature can be verified in place without being copied to the stack,
like the message covered by the signature. The `REGION_TO_GBUFFER()`
macro backwardly assigns the region in its left argument to the GSS
buffer in its right argument; this is just a pointer and length
conversion, without copying any data. The `gss_verify_mic()` call uses
both message and signature GSS buffers in a read-only manner.
2022-03-18 17:21:57 +00:00
Ondřej Surý 865808939b Merge branch 'ondrej/remove-ATOMIC_VAR_INIT-v9_16' into 'v9_16'
Remove usage of deprecated ATOMIC_VAR_INIT() macro

See merge request isc-projects/bind9!5951
2022-03-17 21:43:13 +00:00
Ondřej Surý 2c86bd4ed9 Remove debugging implementation of stdatomic using mutexes
Upcoming LLVM/Clang 15 has marked the ATOMIC_VAR_INIT() as deprecated
breaking the build.  In the previous commit, we have removed the use of
ATOMIC_VAR_INIT(), but as that was a prerequisite to using the
--enable-mutexatomic debugging mode, we have to remove the debugging
mode.
2022-03-17 21:44:04 +01:00
Ondřej Surý 25732d818d Remove usage of deprecated ATOMIC_VAR_INIT() macro
The C17 standard deprecated ATOMIC_VAR_INIT() macro (see [1]).  Follow
the suite and remove the ATOMIC_VAR_INIT() usage in favor of simple
assignment of the value as this is what all supported stdatomic.h
implementations do anyway:

  * MacOSX.plaform: #define ATOMIC_VAR_INIT(__v) {__v}
  * Gcc stdatomic.h: #define ATOMIC_VAR_INIT(VALUE)	(VALUE)

1. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1138r0.pdf

(cherry picked from commit f251d69eba)
2022-03-17 21:44:04 +01:00
Ondřej Surý 87cd661638 Merge branch '3208-fix-xfrout-maxtimer-timer-log-message-log-level-v9_16' into 'v9_16'
Change xfer-out timer message log level to DEBUG(1)

See merge request isc-projects/bind9!5997
2022-03-17 20:41:20 +00:00
Ondřej Surý 821be88002 Change xfer-out timer message log level to DEBUG(1)
When max-transfer-*-out timeouts were reintroduced, the log message
about starting the timer was errorneously left as ISC_LOG_ERROR.
Change the log level of said message to ISC_LOG_DEBUG(1).

(cherry picked from commit 8f6e4dfa15)
2022-03-17 21:39:20 +01:00
Ondřej Surý dfb2e611de Merge branch 'ondrej/add-missing-braces-clang-format-15-v9_16' into 'v9_16'
Add couple missing braces around single-line statements [v9.16]

See merge request isc-projects/bind9!5970
2022-03-17 19:45:06 +00:00
Ondřej Surý be47b2e5e4 Add couple missing braces around single-line statements
The clang-format-15 has new option InsertBraces that could add missing
branches around single line statements.  Use that to our advantage
without switching to not-yet-released LLVM version to add missing braces
in couple of places.
2022-03-17 18:31:36 +01:00
Ondřej Surý f81b183c78 Merge branch '3200-add-per-send-timer-v9_16' into 'v9_16'
Change single write timer to per-send timers [v9.16]

See merge request isc-projects/bind9!5962
2022-03-17 16:25:04 +00:00
Ondřej Surý 96e01d40bf Add CHANGES and release note for [GL #3200]
(cherry picked from commit 8ace9e0c62)
2022-03-17 16:07:52 +01:00
Ondřej Surý 7a386256b6 On shutdown, reset the established TCP connections
Previously, the established TCP connections (both client and server)
would be gracefully closed waiting for the write timeout.

Don't wait for TCP connections to gracefully shutdown, but directly
reset them for faster shutdown.

(cherry picked from commit 6ddac2d56d)
2022-03-17 16:07:52 +01:00
Ondřej Surý d17d043499 Change single write timer to per-send timers
Previously, there was a single per-socket write timer that would get
restarted for every new write.  This turned out to be insufficient
because the other side could keep reseting the timer, and never reading
back the responses.

Change the single write timer to per-send timer which would in turn
reset the TCP connection on the first send timeout.

(cherry picked from commit a761aa59e3)
2022-03-17 16:07:52 +01:00
Michał Kępień 25382f1d2d Merge branch 'v9_16_27-release' into 'v9_16'
Merge 9.16.27 release branch

See merge request isc-projects/bind9!5991
2022-03-16 23:26:55 +00:00
Michał Kępień e82ffa9b03 Set up release notes for BIND 9.16.28 2022-03-17 00:19:11 +01:00
Tinderbox UserandMichał Kępień 0eab4dd1ae Merge branch 'prep-release' into security-v9_16 2022-03-17 00:19:11 +01:00
Michał Kępień b6c6c70e33 Merge branch 'michal/prepare-documentation-for-bind-9.16.27' into 'security-v9_16'
Prepare documentation for BIND 9.16.27

See merge request isc-private/bind9!393
2022-03-17 00:19:11 +01:00
Tinderbox UserandMichał Kępień 05e2e8c98b prep 9.16.27 2022-03-17 00:19:11 +01:00
Michał Kępień 6066c45496 Merge branch '3112-ensure-correct-ordering-in-isc__nm_process_sock_buffer-v9_16' into 'security-v9_16'
[CVE-2022-0396] [v9_16] Resolve #3112 TCP sockets stuck in CLOSE_WAIT

See merge request isc-private/bind9!376
2022-03-17 00:19:11 +01:00
Michał Kępień 3849ad19fb Prepare release notes for BIND 9.16.27 2022-03-17 00:19:11 +01:00
Michał Kępień f1bc36f193 Merge branch '2950-confidential-cache-acceptance-rules-v9_16' into 'security-v9_16'
[CVE-2021-25220] [v9_16] prevent cache poisoning from forwarder responses

See merge request isc-private/bind9!380
2022-03-17 00:19:11 +01:00
Ondřej SurýandMichał Kępień e0565c3362 Add CHANGES and release note for [GL #3112] 2022-03-17 00:19:11 +01:00
Michał Kępień 768fdcd38b Reorder release notes 2022-03-17 00:19:11 +01:00
Petr ŠpačekandMichał Kępień 6939b9f47d Add Release Note for [GL #2950] 2022-03-17 00:19:11 +01:00
Ondřej SurýandMichał Kępień afee2b5a7b Run .closehandle_cb asynchrounosly in nmhandle_detach_cb()
When sock->closehandle_cb is set, we need to run nmhandle_detach_cb()
asynchronously to ensure correct order of multiple packets processing in
the isc__nm_process_sock_buffer().  When not run asynchronously, it
would cause:

  a) out-of-order processing of the return codes from processbuffer();

  b) stack growth because the next TCP DNS message read callback will
     be called from within the current TCP DNS message read callback.

The sock->closehandle_cb is set to isc__nm_resume_processing() for TCP
sockets which calls isc__nm_process_sock_buffer().  If the read callback
(called from isc__nm_process_sock_buffer()->processbuffer()) doesn't
attach to the nmhandle (f.e. because it wants to drop the processing or
we send the response directly via uv_try_write()), the
isc__nm_resume_processing() (via .closehandle_cb) would call
isc__nm_process_sock_buffer() recursively.

The below shortened code path shows how the stack can grow:

 1: ns__client_request(handle, ...);
 2: isc_nm_tcpdns_sequential(handle);
 3: ns_query_start(client, handle);
 4:   query_lookup(qctx);
 5:     query_send(qctcx->client);
 6:       isc__nmhandle_detach(&client->reqhandle);
 7:         nmhandle_detach_cb(&handle);
 8:           sock->closehandle_cb(sock); // isc__nm_resume_processing
 9:             isc__nm_process_sock_buffer(sock);
10:               processbuffer(sock); // isc__nm_tcpdns_processbuffer
11:                 isc_nmhandle_attach(req->handle, &handle);
12:                 isc__nm_readcb(sock, req, ISC_R_SUCCESS);
13:                   isc__nm_async_readcb(NULL, ...);
14:                     uvreq->cb.recv(...); // ns__client_request

Instead, if 'sock->closehandle_cb' is set, we need to run detach the
handle asynchroniously in 'isc__nmhandle_detach', so that on line 8 in
the code flow above does not start this recursion. This ensures the
correct order when processing multiple packets in the function
'isc__nm_process_sock_buffer()' and prevents the stack growth.

When not run asynchronously, the out-of-order processing leaves the
first TCP socket open until all requests on the stream have been
processed.

If the pipelining is disabled on the TCP via `keep-response-order`
configuration option, named would keep the first socket in lingering
CLOSE_WAIT state when the client sends an incomplete packet and then
closes the connection from the client side.
2022-03-17 00:19:11 +01:00
Michał Kępień 0470bce329 Tweak and reword release notes 2022-03-17 00:19:11 +01:00
Petr ŠpačekandMichał Kępień da84b6ea4f Add CHANGES note for [GL #2950] 2022-03-17 00:19:11 +01:00
Michał Kępień b622db776c Fix typo in CHANGES 2022-03-17 00:19:11 +01:00
Mark AndrewsandMichał Kępień 71b2421054 Look for zones deeper than the current domain or forward name
When caching glue, we need to ensure that there is no closer
source of truth for the name. If the owner name for the glue
record would be answered by a locally configured zone, do not
cache.
2022-03-17 00:19:11 +01:00
Mark AndrewsandMichał Kępień ea06552a3d Check cached names for possible "forward only" clause
When caching additional and glue data *not* from a forwarder, we must
check that there is no "forward only" clause covering the owner name
that would take precedence.  Such names would normally be allowed by
baliwick rules, but a "forward only" zone introduces a new baliwick
scope.
2022-03-17 00:19:11 +01:00
Mark AndrewsandMichał Kępień 3fc7accd88 Check that the forward declaration is unchanged and not overridden
If we are using a fowarder, in addition to checking that names to
be cached are subdomains of the forwarded namespace, we must also
check that there are no subsidiary forwarded namespaces which would
take precedence. To be safe, we don't cache any responses if the
forwarding configuration has changed since the query was sent.
2022-03-17 00:19:11 +01:00
Mark AndrewsandMichał Kępień 24155213be Add additional name checks when using a forwarder
When using a forwarder, check that the owner name of response
records are within the bailiwick of the forwarded name space.
2022-03-17 00:19:11 +01:00
Michał Kępień d20a04aea8 Merge branch 'michal/tidy-setup-of-python-based-tests-v9_16' into 'v9_16'
[v9_16] Tidy setup of Python-based tests

See merge request isc-projects/bind9!5974
2022-03-14 11:44:10 +00:00
Michał Kępień eaed6c74d8 Fix broken dnspython version checks
The dns.query Python module has the send_tcp() method defined in both
dnspython 1.x and 2.x, so checking for the existence of that method to
determine the dnspython version available in the test environment does
not make any sense.  Fix by checking the dns.version.MAJOR integer
instead.
2022-03-14 09:19:03 +01:00
Michał Kępień e41c0a6b6c Rework skipping long tests
The ability to conveniently mark tests which should only be run when the
CI_ENABLE_ALL_TESTS environment variable is set seems to be useful on a
general level and therefore it should not be limited to the "timeouts"
system test, where it is currently used.

pytest documentation [1] suggests to reuse commonly used test markers by
putting them all in a single Python module which then has to be imported
by test files that want to use the markers defined therein.  Follow that
advice by creating a new bin/tests/system/pytest_custom_markers.py
Python module containing the relevant marker definitions.

Note that "import pytest_custom_markers" works from a test-specific
subdirectory because pytest modifies sys.path so that it contains the
paths to all parent directories containing a conftest.py file (and
bin/tests/system/ is one).  PyLint does not like that, though, so add a
relevant PyLint suppression.

The above changes make bin/tests/system/timeouts/conftest.py redundant,
so remove it.

[1] https://docs.pytest.org/en/7.0.x/how-to/skipping.html#id1

(cherry picked from commit 00392921f0)
2022-03-14 09:19:03 +01:00
Michał Kępień 30bbbc7aef Rework imports in dnspython-based system tests
Ensure all "import dns.*" statements are always placed after
pytest.importorskip('dns') calls, in order to allow the latter to
fulfill their purpose.  Explicitly import all dnspython modules used by
each dnspython-based test to avoid relying on nested imports.  Replace
function-scoped imports with global imports to reduce code duplication.

(cherry picked from commit 49312d6bb2)
2022-03-14 09:19:03 +01:00
Michał Kępień 45bbb518d5 Fix skipping tests requiring dnspython
The intended purpose of the @pytest.mark.dnspython{,2} decorators was to
cause dnspython-based tests to be skipped if dnspython is not available
(or not recent enough).  However, a number of system tests employing
those decorators contain global "import dns.resolver" statements which
trigger ImportError exceptions during test initialization if dnspython
is not available.  In other words, the @pytest.mark.dnspython{,2}
decorators serve no useful purpose.

Currently, whenever a Python-based test requires dnspython, that
requirement applies to all tests in a given *.py file.  Given that,
employ global pytest.importorskip() calls to ensure dnspython-based
parts of various system tests are skipped when dnspython is not
available.  Remove all occurrences of the @pytest.mark.dnspython{,2}
decorators (and all associated code) to prevent confusion.

(cherry picked from commit 05c97f2329)
2022-03-14 09:19:03 +01:00
Michał Kępień d9ae31be8c Fix skipping tests requiring the requests module
The intended purpose of the @pytest.mark.requests decorator was to cause
Python-based parts of the "statschannel" system test to be skipped if
the requests Python module is not available.  However, both
tests-json.py and tests-xml.py contain a global "import requests"
statement which triggers ImportError exceptions during test
initialization if the requests module is not available.  In other words,
the @pytest.mark.requests decorator serves no useful purpose.

Since all tests in both tests-json.py and tests-xml.py depend on the
requests Python module, employ pytest.importorskip() to ensure the
Python-based parts of the "statschannel" system test are skipped when
the requests module is not available.  Remove all occurrences of the
@pytest.mark.requests decorator (and all associated code) to prevent
confusion.

(cherry picked from commit 704ad2907f)
2022-03-14 09:19:03 +01:00
Michał Kępień 098bd03f7d Simplify skipping tests depending on libxml2
All tests in bin/tests/system/statschannel/tests-xml.py require libxml2
support to be enabled in BIND 9 at build-time.  Instead of applying the
same pytest.mark.skipif() decorator to every test in that file, set the
'pytestmark' global accordingly in order to immediately skip all tests
in tests-xml.py if libxml2 support is not compiled in.

Remove all occurrences of the @pytest.mark.xml decorator (and all
associated code) from the "statschannel" system test as the
xml.etree.ElementTree module is a part of the Python standard library
since Python 2.5 (so checking whether it is available is redundant) and
checking for libxml2 support in the tested BIND 9 build is already
handled by setting the 'pytestmark' global accordingly.

(cherry picked from commit 286b57c7f1)
2022-03-14 09:19:03 +01:00
Michał Kępień c1a0651f54 Simplify skipping tests depending on json-c
All tests in bin/tests/system/statschannel/tests-json.py require json-c
support to be enabled in BIND 9 at build-time.  Instead of applying the
same pytest.mark.skipif() decorator to every test in that file, set the
'pytestmark' global accordingly in order to immediately skip all tests
in tests-json.py if json-c support is not compiled in.

Remove all occurrences of the @pytest.mark.json decorator (and all
associated code) from the "statschannel" system test as the json module
is a part of the Python standard library since Python 2.6 (so checking
whether it is available is redundant) and checking for json-c support in
the tested BIND 9 build is already handled by setting the 'pytestmark'
global accordingly.

Also remove a related excerpt from bin/tests/system/rpzextra/conftest.py
as it is a copy-paste artifact that serves no purpose in the "rpzextra"
system test.

(cherry picked from commit 0a76f186a5)
2022-03-14 09:19:03 +01:00
Michał Kępień 14a3bb4897 Refactor "statschannel" test's helper modules
The "statschannel" system test contains two Python helper modules:

  - generic.py: test functions directly invoked by both tests-json.py
    and test-xml.py,

  - helper.py: helper functions invoked by test functions in generic.py.

The above logic for splitting helper functions into Python modules
prevents selective test skipping from working due to unconditional
import statements being present in both helper modules.  For example, if
dnspython is not available on the test host, tests-json.py imports
generic.py, which in turn imports helper.py, which in turn attempts to
import various dnspython modules, triggering ImportError exceptions
during test initialization.  Various decorators used for some tests
(like @pytest.mark.dnspython) suggest that such a scenario should be
handled gracefully, but that is not the case - modifying the test
collection in conftest.py does not prevent pytest from failing due to
import errors.

Fix by moving helper functions around to achieve a different split:

  - generic.py: helper functions only relying on the Python standard
    library,

  - generic_dnspython.py: helper functions requiring dnspython.

Only two tests in tests-{json,xml}.py need dnspython to work
(test_traffic_json(), test_traffic_xml()).  Since all
dnspython-dependent code is now present in generic_dnspython.py, employ
pytest.importorskip() in those two tests to ensure they can be
selectively skipped when dnspython is not available.  Adjust other code
to account for the revised Python helper module layout.  Remove all
occurrences of the @pytest.mark.dnspython decorator (and all associated
code) from the "statschannel" system test to prevent confusion.

(cherry picked from commit 96b7f9f9aa)
2022-03-14 09:19:03 +01:00
Michał Kępień 30d7a68129 Reuse common port-related test fixtures
Most Python-based system tests need to know which ports were assigned to
a given test by bin/tests/system/get_ports.sh.  This is currently
handled by inspecting the values of various environment variables (set
by bin/tests/system/run.sh) and passing the port numbers to Python
scripts via pytest fixtures.  However, this glue code has so far been
copy-pasted into each system test using it, rather than reused.

Since pytest also looks for conftest.py files in parent directories,
move commonly used fixtures to bin/tests/system/conftest.py.  Set the
scope of all the moved fixtures to "session" as their return values are
only based on environment variables, so there is no point in recreating
them for every test requesting them.  Adjust test code accordingly.

(cherry picked from commit 53ef8835c1)
2022-03-14 09:19:03 +01:00
Petr Špaček 049ab48776 Merge branch '2799-documentation-for-administrative-tools-is-out-of-sync-with-manual-pages-v9_16' into 'v9_16'
Fix Administrative Tools section in the ARM [v9_16]

See merge request isc-projects/bind9!5959
2022-03-10 21:10:29 +00:00
Tony FinchandPetr Špaček 1558adbcdf Refer to RFC 4592 for DNS wildcards
The named-checkzone(1) and named-compilezone(1) manual pages used to
refer to the description of wildcards in RFC 1034.

(cherry picked from commit 178aef5b8c)
2022-03-10 21:58:36 +01:00
Suzanne GoldlustandPetr Špaček da3369179f Fix Tools for Use With the Name Server Daemon in the ARM
Remove outdated command references from ARM section
3.3.1. Tools for Use With the Name Server Daemon
and replace them with links to man pages.

Fixes: #2799
(cherry picked from commit 2d2d87a615)
2022-03-10 21:58:36 +01:00
Tony FinchandPetr Špaček b8a3359d76 In the ARM appendix, sort man page sections alphabetically
(cherry picked from commit 315b3c3a1a)
2022-03-10 21:58:36 +01:00
Petr Špaček 9242f53e3d Split out named-compilezone and named-checkzone man pages
Both utilities were included as one man page, but this caused a problem:
Sphinx directive .. include was used twice on the same file, which
prevented us from using labels (or anything with unique identifier) in
the man pages. This effectivelly prevented linking to them.

Splitting man pages allows us to solve the linking problems and also
clearly make text easier to follow because it does not mention two tools
at the same time.

This change causes duplication of text, but given the frequecy of changes
to these tools I think it is acceptable. I've considered deduplication
using smaller .rst snippets which get included into both man pages,
but it would require more sed scripting to handle defaults etc. and
I think it would be way too complex solution for this problem.

Related: #2799
(cherry picked from commit 9992f7808c)
2022-03-10 21:58:35 +01:00
Petr Špaček e46322c583 Split out ddns-confgen and tsig-keygen man pages
Both utilities were included as one man page, but this caused a problem:
Sphinx directive .. include was used twice on the same file, which
prevented us from using labels (or anything with unique identifier) in
the man pages. This effectivelly prevented linking to them.

Splitting man pages allows us to solve the linking problems and also
clearly make text easier to follow because it does not mention two tools
at the same time.

This change causes duplication of text, but given the frequecy of changes
to these tools I think it is acceptable.

Related: #2799
(cherry picked from commit 2e42414522)
2022-03-10 21:56:15 +01:00
Petr Špaček e322fc3cff Remove nonexistent option -r from confgen man pages
Fixes omission in !269.

Fixes: #2826
(cherry picked from commit 473d5a8d03)
2022-03-10 20:32:37 +01:00
Ondřej Surý c2496f833a Merge branch 'ondrej/lib/isc/heap.c-cleanup-v9_16' into 'v9_16'
Make isc_heap_create() and isc_heap_insert() return void [v9.16]

See merge request isc-projects/bind9!5948
2022-03-08 20:29:36 +00:00
Ondřej SurýandOndřej Surý e7fb7c1de5 Make isc_heap_create() and isc_heap_insert() return void
Previously, the function(s) in the commit subject could fail for various
reasons - mostly allocation failures, or other functions returning
different return code than ISC_R_SUCCESS.  Now, the aforementioned
function(s) cannot ever fail and they would always return ISC_R_SUCCESS.

Change the function(s) to return void and remove the extra checks in
the code that uses them.

(cherry picked from commit bbb4cdb92d)
2022-03-08 20:49:15 +01:00
Ondřej Surý d39016b635 Merge branch 'ondrej/lib/isc/ht.c-cleanup-v9_16' into 'v9_16'
Make isc_ht_init() and isc_ht_iter_create() return void [v9.16]

See merge request isc-projects/bind9!5947
2022-03-08 19:42:25 +00:00
Ondřej Surý 848e6ee7b6 Make dns_catz_get_iterator() return void
Previously, the function(s) in the commit subject could fail for various
reasons - mostly allocation failures, or other functions returning
different return code than ISC_R_SUCCESS.  Now, the aforementioned
function(s) cannot ever fail and they would always return ISC_R_SUCCESS.

Change the function(s) to return void and remove the extra checks in
the code that uses them.

(cherry picked from commit d128656d2e)
2022-03-08 20:20:54 +01:00
Ondřej Surý ba89da052a Make isc_ht_init() and isc_ht_iter_create() return void
Previously, the function(s) in the commit subject could fail for various
reasons - mostly allocation failures, or other functions returning
different return code than ISC_R_SUCCESS.  Now, the aforementioned
function(s) cannot ever fail and they would always return ISC_R_SUCCESS.

Change the function(s) to return void and remove the extra checks in
the code that uses them.

(cherry picked from commit 8fa27365ec)
2022-03-08 20:20:52 +01:00
Mark Andrews a045febada Merge branch '3142-add-checkconf-check-for-dnssec-policy-keys-algorithm-v9_16' into 'v9_16'
Add test configurations with invalid dnssec-policy clauses

See merge request isc-projects/bind9!5945
2022-03-08 11:16:48 +00:00
Mark Andrews 9f69fc83db Add release note for [GL #3142]
(cherry picked from commit e48af36981)
2022-03-08 21:57:14 +11:00
Mark Andrews bfb7df714b Add CHANGES entry for [GL #3142]
(cherry picked from commit d4c2395fff)
2022-03-08 21:57:13 +11:00
Mark Andrews 2c7f02ca45 Check dnssec-policy key roles for validity
For each algorithm there must be a key performing the KSK and
ZSK rolls.  After reading the keys from named.conf check that
each algorithm present has both rolls.  CSK implicitly has both
rolls.

(cherry picked from commit 9bcf45f4ce)
2022-03-08 21:56:39 +11:00
Mark Andrews 38d930e5cb Add test configurations with invalid dnssec-policy clauses
bad-ksk-without-zsk.conf only has a ksk defined without a
matching zsk for the same algorithm.

bad-zsk-without-ksk.conf only has a zsk defined without a
matching ksk for the same algorithm.

bad-unpaired-keys.conf has two keys of different algorithms
one ksk only and the other zsk only

(cherry picked from commit f23e86b96b)
2022-03-08 21:56:39 +11:00
Arаm Sаrgsyаn 96b564173e Merge branch '3172-libressl-3.5.0-compat-v9_16' into 'v9_16'
[v9_16] Resolve "BIND is not compatible with LibreSSL 3.5.0"

See merge request isc-projects/bind9!5915
2022-03-02 11:40:19 +00:00
Aram Sargsyan 908fdeb4d2 Add CHANGES entry for [GL #3172]
(cherry picked from commit 0f399851d88b7958a45bfbc4f626e82bdc34c771)
2022-03-02 09:34:29 +00:00
Aram Sargsyan 73e660a806 Use autoconf check for BN_GENCB_new()
BIND unconditionally uses shims for BN_GENCB_new(), BN_GENCB_free(),
and BN_GENCB_get_arg() for all LibreSSL versions and, correctly, for
OpenSSL <1.1.0 versions.

This breaks LibreSSL compilation starting with LibreSSL 3.5.0.

Use autoconf check instead to check whether the family of the functions
are available.

(cherry picked from commit 749973f3259b7638a6af02b7da2f40ae28bdd402)
2022-03-02 09:34:29 +00:00
Aram Sargsyan 2325ed66c5 Remove EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() shims
LibreSSL 3.5.0 fails to compile with these shims. We could have just
removed the LibreSSL check from the pre-processor condition, but it
seems that these shims are no longer needed because all the supported
versions of OpenSSL and LibreSSL have those functions.

According to EVP_ENCRYPTINIT(3) manual page in LibreSSL,
EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() first appeared in
OpenSSL 0.9.8b, and have been available since OpenBSD 4.5.

(cherry picked from commit a3789053682b57a2031de8c544134f1923e76cf3)
2022-03-02 09:31:50 +00:00
Mark Andrews 4ac616bb4a Merge branch '3175-add-missing-grow-data-call-in-isc-lex-gettoken-v9_16' into 'v9_16'
Grow the lex token buffer in one more place

See merge request isc-projects/bind9!5919
2022-03-02 02:13:30 +00:00
Mark Andrews cb7511495e Add CHANGES note for [GL #3175]
(cherry picked from commit ce8703a79e)
2022-03-02 01:04:40 +00:00
Mark Andrews c1a127643f Add seed that demonstrated INSIST triggered in isc_lex_gettoken
this is similar to the input found by ClusterFuzz Issue 45027 with
the 0xff characters replaced for readability.

(cherry picked from commit d36938321e)
2022-03-02 01:04:40 +00:00
Mark Andrews 0b6af23d61 Grow the lex token buffer in one more place
when parsing key pairs, if the '=' character fell at max_token
a protective INSIST preventing buffer overrun could be triggered.
Attempt to grow the buffer immediately before the INSIST.

Also removed an unnecessary INSIST on the opening double quote
of key buffer pair.

(cherry picked from commit 4c356d2770)
2022-03-02 01:04:40 +00:00
Mark Andrews 84a96a1bb0 Merge branch '3176-issue-45110-by-clusterfuzz-external-bind9-dns_master_load_fuzzer-undefined-shift-in-soa_get-v9_16' into 'v9_16'
Use unsigned arithmetic when shifting by 24

See merge request isc-projects/bind9!5918
2022-03-02 01:01:24 +00:00
Mark Andrews a247d282bf Use unsigned arithmetic when shifting by 24
By default C promotes short unsigned values to signed int which
leads to undefined behaviour when the value is shifted by too much.
Force unsigned arithmetic to be perform by explicitly casting to a
unsigned type.

(cherry picked from commit b8b99603f1)
2022-03-02 11:06:53 +11:00
Ondřej Surý 98183ef28b Merge branch '3177-add-missing-isc_nm_tcpsocket-to-isc__nmsocket_reset-v9_16' into 'v9_16'
Handle TCP sockets in isc__nmsocket_reset()

See merge request isc-projects/bind9!5912
2022-02-28 11:14:14 +00:00
Ondřej Surý ac5952aee8 Handle TCP sockets in isc__nmsocket_reset()
The isc__nmsocket_reset() was missing a case for raw TCP sockets (used
by RNDC and DoH) which would case a assertion failure when write timeout
would be triggered.

TCP sockets are now also properly handled in isc__nmsocket_reset().

(cherry picked from commit b220fb32bd)
2022-02-28 11:44:47 +01:00
Mark Andrews 604a267054 Merge branch '3170-tiny-typo-in-doc-build-script-v9_16' into 'v9_16'
correctly exclude logging-categories.rst

See merge request isc-projects/bind9!5903
2022-02-24 22:14:26 +00:00
Mark Andrews 287df673dc correctly exclude logging-categories.rst
(cherry picked from commit 0069a689a6)
2022-02-25 01:20:54 +11:00
Ondřej Surý 9f7ddf8c18 Merge branch '3166-disable-inactivehandles-caching-with-address-sanitizer-v9_16' into 'v9_16'
Disable inactive handles caching when compiled with sanitizers

See merge request isc-projects/bind9!5897
2022-02-23 23:44:58 +00:00
Ondřej Surý fe5cd40a3a Disable inactive uvreqs caching when compiled with sanitizers
When isc__nm_uvreq_t gets deactivated, it could be just put onto array
stack to be reused later to save some initialization time.
Unfortunately, this might hide some use-after-free errors.

Disable the inactive uvreqs caching when compiled with Address or
Thread Sanitizer.

(cherry picked from commit be339b3c83)
2022-02-24 00:16:31 +01:00
Ondřej Surý 55780afdb9 Disable inactive handles caching when compiled with sanitizers
When isc_nmhandle_t gets deactivated, it could be just put onto array
stack to be reused later to safe some initialization time.
Unfortunately, this might hide some use-after-free errors.

Disable the inactive handles caching when compiled with Address or
Thread Sanitizer.

(cherry picked from commit 92cce1da65)
2022-02-24 00:10:18 +01:00
Ondřej Surý 822879f2c7 Merge branch '3167-remove-isc__nmsocket_t-ah_handles-v9_16' into 'v9_16'
Remove active handles tracking from isc__nmsocket_t

See merge request isc-projects/bind9!5895
2022-02-23 22:55:22 +00:00
Ondřej Surý 7765263e68 Remove active handles tracking from isc__nmsocket_t
The isc__nmsocket_t has locked array of isc_nmhandle_t that's not used
for anything.  The isc__nmhandle_get() adds the isc_nmhandle_t to the
locked array (and resized if necessary) and removed when
isc_nmhandle_put() finally destroys the handle.  That's all it does, so
it serves no useful purpose.

Remove the .ah_handles, .ah_size, and .ah_frees members of the
isc__nmsocket_t and .ah_pos member of the isc_nmhandle_t struct.

(cherry picked from commit e2555a306f)
2022-02-23 23:50:54 +01:00
Ondřej Surý eff10e681a Merge branch '3166-delay-isc__nm_uvreq_t-deallocation-v9_16' into 'v9_16'
Delay isc__nm_uvreq_t deallocation to connection callback

See merge request isc-projects/bind9!5893
2022-02-23 22:47:53 +00:00
Ondřej Surý 7b8e265a40 Delay isc__nm_uvreq_t deallocation to connection callback
When the TCP, TCPDNS or TLSDNS connection times out, the isc__nm_uvreq_t
would be pushed into sock->inactivereqs before the uv_tcp_connect()
callback finishes.  Because the isc__nmsocket_t keeps the list of
inactive isc__nm_uvreq_t, this would cause use-after-free only when the
sock->inactivereqs is full (which could never happen because the failure
happens in connection timeout callback) or when the sock->inactivereqs
mechanism is completely removed (f.e. when running under Address or
Thread Sanitizer).

Delay isc__nm_uvreq_t deallocation to the connection callback and only
signal the connection callback should be called by shutting down the
libuv socket from the connection timeout callback.

(cherry picked from commit 3268627916)
2022-02-23 23:36:09 +01:00
Ondřej Surý bfecb1b6f7 Merge branch 'ondrej-cleanup-nm_destroy-dequeue-v9_16' into 'v9_16'
Properly free up enqueued netievents in nm_destroy()

See merge request isc-projects/bind9!5890
2022-02-23 22:30:55 +00:00
Ondřej Surý af2bddc242 Properly free up enqueued netievents in nm_destroy()
When the isc_netmgr is being destroyed, the normal and priority queues
should be dequeued and netievents properly freed.  This wasn't the case.

(cherry picked from commit 88418c3372)
2022-02-23 22:53:41 +01:00
Michał Kępień 28e9d7d222 Merge branch '3147-fix-more-ns_statscounter_recursclients-underflows-v9_16' into 'v9_16'
[v9_16] Fix more ns_statscounter_recursclients underflows

See merge request isc-projects/bind9!5881
2022-02-23 14:03:01 +00:00
Michał Kępień ae2fa12d2d Add CHANGES entry for GL #3147
(cherry picked from commit 600f9010d2)
2022-02-23 14:45:06 +01:00
Michał Kępień 2344201385 Add release note for GL #3147
(cherry picked from commit 1c462a63ec)
2022-02-23 14:45:06 +01:00
Michał Kępień 60e82835ec Fix more ns_statscounter_recursclients underflows
Commit aab691d512 did not fix all possible
scenarios in which the ns_statscounter_recursclients counter underflows.
The solution implemented therein can be ineffective e.g. when CNAME
chaining happens with prefetching enabled.

Here is an example recursive resolution scenario in which the
ns_statscounter_recursclients counter can underflow with the current
logic in effect:

 1. Query processing starts, the answer is not found in the cache, so
    recursion is started.  The NS_CLIENTATTR_RECURSING attribute is set.
    ns_statscounter_recursclients is incremented (Δ = +1).

 2. Recursion completes, returning a CNAME.  client->recursionquota is
    non-NULL, so the NS_CLIENTATTR_RECURSING attribute remains set.
    ns_statscounter_recursclients is decremented (Δ = 0).

 3. Query processing restarts.

 4. The current QNAME (the target of the CNAME from step 2) is found in
    the cache, with a TTL low enough to trigger a prefetch.

 5. query_prefetch() attaches to client->recursionquota.
    ns_statscounter_recursclients is not incremented because
    query_prefetch() does not do that (Δ = 0).

 6. Query processing restarts.

 7. The current QNAME (the target of the CNAME from step 4) is not found
    in the cache, so recursion is started.  client->recursionquota is
    already attached to (since step 5) and the NS_CLIENTATTR_RECURSING
    attribute is set (since step 1), so ns_statscounter_recursclients is
    not incremented (Δ = 0).

 8. The prefetch from step 5 completes.  client->recursionquota is
    detached from in prefetch_done().  ns_statscounter_recursclients is
    not decremented because prefetch_done() does not do that (Δ = 0).

 9. Recursion for the current QNAME completes.  client->recursionquota
    is already detached from, i.e. set to NULL (since step 8), and the
    NS_CLIENTATTR_RECURSING attribute is set (since step 1), so
    ns_statscounter_recursclients is decremented (Δ = -1).

Another possible scenario is that after step 7, recursion for the target
of the CNAME from step 4 completes before the prefetch for the CNAME
itself.  fetch_callback() then notices that client->recursionquota is
non-NULL and decrements ns_statscounter_recursclients, even though
client->recursionquota was attached to by query_prefetch() and therefore
not accompanied by an incrementation of ns_statscounter_recursclients.
The net result is also an underflow.

Instead of trying to properly handle all possible orderings of events
set into motion by normal recursion and prefetch-triggered recursion,
adjust ns_statscounter_recursclients whenever the recursive clients
quota is successfully attached to or detached from.  Remove the
NS_CLIENTATTR_RECURSING attribute altogether as its only purpose is made
obsolete by this change.

(cherry picked from commit f7482b68b9)
2022-02-23 14:45:06 +01:00
Matthijs Mekking 2debaaddbe Merge branch '3164-fix-parental-agents-documentation-v9_16' into 'v9_16'
Fix typo in DNSSEC guide parental-agents example

See merge request isc-projects/bind9!5874
2022-02-22 13:45:34 +00:00
Matthijs Mekking ff61d74310 Fix typo in DNSSEC guide parental-agents example
The example will not load because of the typo, the comma should be a
semicolon.

(cherry picked from commit fd5e39cc76)
2022-02-22 14:07:30 +01:00
Petr Špaček 3e17e79484 Merge branch '3132-add-send-timeout-python2-fix-v9_16' into 'v9_16'
Fix timeouts system test compatibility with python2

See merge request isc-projects/bind9!5869
2022-02-18 10:54:45 +00:00
Petr Špaček 17ff0227f8 Fix timeouts system test compatibility with python2
v9_16 branch still supports Python 2.7.
Fixup for 260b4c02cf.

Related: !5856
2022-02-18 11:26:58 +01:00
Petr Špaček a30dac540e Merge branch 'v9_16_26-release' into 'v9_16'
Merge 9.16.26 release branch

See merge request isc-projects/bind9!5866
2022-02-18 09:12:00 +00:00
Petr Špaček bcd07e71d6 Prepare release notes for BIND 9.16.27 2022-02-18 10:07:48 +01:00
Petr Špaček faf800893f Merge branch 'prep-release' into v9_16_26-release 2022-02-18 10:03:25 +01:00
Petr Špaček 0229a688a9 Merge branch 'pspacek/prepare-documentation-for-bind-9.16.26' into v9_16_26-release
Prepare documentation for BIND 9.16.26

See merge request isc-private/bind9!352
2022-02-18 10:03:25 +01:00
Petr Špaček 7394e09b50 prep 9.16.26 2022-02-18 10:03:25 +01:00
Petr Špaček 69989b1320 Prepare release notes for BIND 9.16.26 2022-02-18 10:03:20 +01:00
Petr Špaček 4ba9be8005 Tweak and reword release notes 2022-02-18 09:36:16 +01:00
Ondřej Surý 5cdc832c10 Merge branch '1897-fix-max-transfer-timeouts-v9_16' into 'v9_16'
Reimplement the max-transfer-time-out and max-transfer-idle-out (v9.16)

See merge request isc-projects/bind9!5863
2022-02-17 22:38:53 +00:00
Ondřej Surý e9ad424cec Add CHANGES and release note for [GL #1897]
(cherry picked from commit 987ad32fac)
2022-02-17 22:59:24 +01:00
Ondřej Surý b3efa9f7ed Add XFR max-transfer-time-out and max-tranfer-idle-out system tests
Extend the timeouts system test to ensure that the maximum outgoing
transfer time (max-transfer-time-out) and maximum outgoing transfer idle
time (max-transfer-idle-out) works as expected.  This is done by
lowering the limits to 5/1 minutes and testing that the connection has
been dropped while sleeping between the individual XFR messages.

(cherry picked from commit 8fed1b6461)
2022-02-17 22:59:24 +01:00
Ondřej Surý cbf2bed95e Reimplement the max-transfer-time-out and max-transfer-idle-out
While refactoring the libns to use the new network manager, the
max-transfer-*-out options were not implemented and they were turned
non-operational.

Reimplement the max-transfer-idle-out functionality using the write
timer and max-transfer-time-out using the new isc_nm_timer API.

(cherry picked from commit 8643bbab84)
2022-02-17 22:59:24 +01:00
Ondřej Surý 6de1b12f59 Remove unused client->shutdown and client->shutdown_arg
While refactoring the lib/ns/xfrout.c, it was discovered that .shutdown
and .shutdown_arg members of ns_client_t structure are unused.

Remove the unused members and associated code that was using in it in
the ns_xfrout.

(cherry picked from commit 037549c405)
2022-02-17 22:59:24 +01:00
Ondřej Surý 914a7e14e2 Add network manager based timer API
This commits adds API that allows to create arbitrary timers associated
with the network manager handles.

(cherry picked from commit 3c7b04d015)
2022-02-17 22:59:24 +01:00
Evan Hunt 3ec9c711d8 Merge branch '3157-test-blackhole-v9_16' into 'v9_16'
backport regression test from GL #3157

See merge request isc-projects/bind9!5859
2022-02-17 18:15:24 +00:00
Evan Hunt d822a87804 backport regression test from GL #3157
add "blackhole { none; };" to a secondary server in the xfer system
test to ensure that the error in GL #3157 is not present in 9.16.
2022-02-17 09:38:26 -08:00
Ondřej Surý 421a1dfa82 Merge branch '3132-add-send-timeout-v9_16' into 'v9_16'
Add TCP, TCPDNS and TLSDNS write timer

See merge request isc-projects/bind9!5856
2022-02-17 11:08:19 +00:00
Ondřej Surý 132bed0014 Add CHANGES and release note for [GL #3132]
(cherry picked from commit 0c35bda762)
2022-02-17 11:26:16 +01:00
Ondřej Surý 3f24bd2bce Update writetimeout to be T_IDLE in netmgr_test.c
Use the isc_nmhandle_setwritetimeout() function in the netmgr unit test
to allow more time for writing and reading the responses because some of
the intervals that are used in the unit tests are really small leaving a
little room for any delays.

(cherry picked from commit ee359d6ffa)
2022-02-17 11:26:16 +01:00
Ondřej Surý 1d0f2eb2c4 Add isc_nmhandle_setwritetimeout() function
In some situations (unit test and forthcoming XFR timeouts MR), we need
to modify the write timeout independently of the read timeout.  Add a
isc_nmhandle_setwritetimeout() function that could be called before
isc_nm_send() to specify a custom write timeout interval.

(cherry picked from commit a89d9e0fa6)
2022-02-17 11:26:16 +01:00
Ondřej Surý 260b4c02cf Add TCP write timeout system test
Extend the timeouts system test that bursts the queries for large TXT
record and never read any responses back filling up the server TCP write
buffer.  The test should work with the default wmem_max value on
Linux (208k).

(cherry picked from commit b735182ae0)
2022-02-17 10:05:24 +01:00
Ondřej Surý 6a88131d03 Add TCP, TCPDNS and TLSDNS write timer
When the outgoing TCP write buffers are full because the other party is
not reading the data, the uv_write() could wait indefinitely on the
uv_loop and never calling the callback.  Add a new write timer that uses
the `tcp-idle-timeout` value to interrupt the TCP connection when we are
not able to send data for defined period of time.

(cherry picked from commit 408b362169)
2022-02-17 10:05:24 +01:00
Ondřej Surý 11ae4399d9 Add uv_tcp_close_reset compat
The uv_tcp_close_reset() function was added in libuv 1.32.0 and since we
support older libuv releases, we have to add a shim uv_tcp_close_reset()
implementation loosely based on libuv.

(cherry picked from commit cd3b58622c)
2022-02-17 09:50:10 +01:00
Ondřej Surý eb2463115f Rename sock->timer to sock->read_timer
Before adding the write timer, we have to remove the generic sock->timer
to sock->read_timer.  We don't touch the function names to limit the
impact of the refactoring.

(cherry picked from commit 45a73c113f)
2022-02-17 09:50:07 +01:00
Ondřej Surý 9b7a0cb778 Merge branch 'ondrej/add-UV_RUNTIME_CHECK-macro-v9_16' into 'v9_16'
Add UV_RUNTIME_CHECK() macro to print uv_strerror()

See merge request isc-projects/bind9!5846
2022-02-16 11:30:07 +00:00
Ondřej Surý cdd725f1db Add semantic patch to keep UV_RUNTIME_CHECK in sync
The UV_RUNTIME_CHECK() macro requires to keep the function name in sync
like this:

    r = func(...);
    UV_RUNTIME_CHECK(func, r);

Add semantic patch to keep the function name and return variable in sync
with the previous line.

(cherry picked from commit 62bd5cb08c)
2022-02-16 11:48:33 +01:00
Ondřej Surý 1c564b808f Use UV_RUNTIME_CHECK() as appropriate
Replace the RUNTIME_CHECK() calls for libuv API calls with
UV_RUNTIME_CHECK() to get more detailed error message when
something fails and should not.

(cherry picked from commit 8715be1e4b)
2022-02-16 11:48:30 +01:00
Ondřej Surý 88751da114 Add UV_RUNTIME_CHECK() macro to print uv_strerror()
When libuv functions fail, they return correct return value that could
be useful for more detailed debugging.  Currently, we usually just check
whether the return value is 0 and invoke assertion error if it doesn't
throwing away the details why the call has failed.  Unfortunately, this
often happen on more exotic platforms.

Add a UV_RUNTIME_CHECK() macro that can be used to print more detailed
error message (via uv_strerror() before ending the execution of the
program abruptly with the assertion.

(cherry picked from commit 62e15bb06d)
2022-02-16 11:46:10 +01:00
Matthijs Mekking cff0d3fbd0 Merge branch 'matthijs-document-dnssec-policy-keys-algorithm-match-v9_16' into 'v9_16'
Update documentation wrt key algorithms (9.16)

See merge request isc-projects/bind9!5843
2022-02-16 10:11:21 +00:00
Matthijs Mekking 483beec0fd Update documentation wrt key algorithms
Add a note to the DNSSEC guide and to the ARM reference that A ZSK/KSK
pair used for signing your zone should have the same algorithm.

This commit also updates the 'dnssec-policy/keys' example to use the
slightly more modern 'rsasha256' algorithm.

(cherry picked from commit 7365400610)
2022-02-16 10:25:30 +01:00
Michal Nowak 6917b32d6c Merge branch 'mnowak/make-cocci-parallel-v9_16' into 'v9_16'
[v9_16] Run spatch jobs in parallel

See merge request isc-projects/bind9!5833
2022-02-14 19:10:57 +00:00
Michal Nowak 2823885e1b Run spatch jobs in parallel
Also make the script more verbose to identify which patch is being
processed and check for failures in spatch standard error output.

(cherry picked from commit 48c44fe6d4)
2022-02-14 20:01:43 +01:00
Michal Nowak fb0aaa3c10 Merge branch 'mnowak/coverity-scan-2021.12-v9_16' into 'v9_16'
[v9_16] Update Coverity Scan CI job to 2021.12.1

See merge request isc-projects/bind9!5830
2022-02-14 17:59:01 +00:00
Michal Nowak d73143af51 Update Coverity Scan CI job to 2021.12.1
(cherry picked from commit f0edf07fbc)
2022-02-14 18:46:08 +01:00
Petr Špaček b1c7a94dc9 Merge branch 'pspacek/rfc-nits-v9_16' into 'v9_16'
Update and deduplicate list of RFCs in documentation [v9_16]

See merge request isc-projects/bind9!5828
2022-02-14 11:48:57 +00:00
Petr Špaček 3637ce9c7c Remove rfc-compliance list in plaintext - ARM deduplication
The plaintext version is now fully replaced by the doc/arm/general.rst.

(cherry picked from commit 63989e98ac)
2022-02-14 12:23:39 +01:00
Petr Špaček a2ebd90f30 Reorder list of supported RFCs in more user-oriented manner
For users it's not really important if a RFC is Internet Standard,
Proposed Standard, or Experimental. RFCs are now regrouped by
"Protocol", Best Current Practice, and "catch all" category FYI.

(cherry picked from commit 7fd61f9403)
2022-02-14 12:23:31 +01:00
Petr Špaček 636ea2d5bc Replace obsolete RFC2845 reference with RFC8945 (TSIG)
(cherry picked from commit 4dbad65bfd)
2022-02-14 12:21:27 +01:00
Petr Špaček f0d5e029bd Remove special chapter about IPv6 address formats from ARM
In 2022, IPv6 is not anything unusual, and it was really odd
to have it in a separate section next to a huge list of RFCs.

Fixes: #1918
(cherry picked from commit 2774b497a6)
2022-02-14 12:21:15 +01:00
Petr Špaček 519660c84a Replace obsolete RFC6944 reference with RFC8624 (DNSSEC algorithm status)
(cherry picked from commit 3c83a9d503)
2022-02-14 12:21:15 +01:00
Petr Špaček ee5d716ca7 Replace obsolete RFC5966 reference with RFC7766 (TCP)
(cherry picked from commit bd3b310eae)
2022-02-14 12:21:15 +01:00
Petr Špaček 717d218935 Replace obsolete RFC4408 reference with RFC7208 (SPF)
(cherry picked from commit f8cb0ac141)
2022-02-14 12:21:13 +01:00
Petr Špaček bc41ef8687 Replace obsolete RFC2915 reference with RFC3403 (NAPTR)
(cherry picked from commit 16dec1ff58)
2022-02-14 12:20:41 +01:00
Petr Špaček 09f562eb0d Add link to RFC8749 (DLV is historic)
(cherry picked from commit f7225db822)
2022-02-14 12:20:39 +01:00
Petr Špaček eef6134587 Add newer version of IDNA RFC to docs
(cherry picked from commit 09d6cf89df)
2022-02-14 12:20:14 +01:00
Petr Špaček d16197fe62 Remove obsolete RFCs from documentation
There is little point of listing all of the obsolete RFCs. I think it is
more likely confuse people than to do anything useful.

(cherry picked from commit 9437ea08e1)
2022-02-14 12:20:14 +01:00
Petr Špaček 8925fb2e56 Replace obsolete RFC6488 reference with RFC8659 (CAA)
(cherry picked from commit 2b5b777c07)
2022-02-14 12:20:11 +01:00
Petr Špaček d1ee57b4bd Remove obsolete book reference from ARM
(cherry picked from commit b686b5c161)
2022-02-14 12:19:29 +01:00
Petr Špaček d7ca8c4c9b Use Sphinx footnotes for DNS Reference Information
It limits risk of errors while doing updates, which are next in the
pipeline.

(cherry picked from commit f713984886)
2022-02-14 12:19:24 +01:00
Ondřej Surý 0456213334 Merge branch 'ondrej/change-bug-reporting-address-v9_16' into 'v9_16'
Change the bug reporting address from email to gitlab URI

See merge request isc-projects/bind9!5822
2022-02-11 08:26:17 +00:00
Ondřej Surý 13cc8e3109 Change the bug reporting address from email to gitlab URI
In autoconf, the AC_INIT() accepts bugreport address for reporting
issues (f.e. when the test suite fails).  Instead of providing generic
emails address, change this to the address where to report with the
default Bug template applied.

(cherry picked from commit bb60622250)
2022-02-11 08:55:17 +01:00
Ondřej Surý 5af0b34f1c Merge branch '3137-create-new-log-messages-when-entering-and-exiting-exlusive-task-mode-v9_16' into 'v9_16'
Log when starting and ending task exclusive mode

See merge request isc-projects/bind9!5820
2022-02-10 21:01:38 +00:00
Ondřej Surý 2889492865 Add CHANGES and release note for [GL #3137]
(cherry picked from commit 44aa8ef997)
2022-02-10 21:28:48 +01:00
Ondřej Surý 6b2d9dcfd9 Log when starting and ending task exclusive mode
The task exclusive mode stops all processing (tasks and networking IO)
except the designated exclusive task events.  This has impact on the
operation of the server.  Add log messages indicating when we start the
exclusive mode, and when we end exclusive task mode.

(cherry picked from commit b9cb29076f)
2022-02-10 21:22:46 +01:00
Ondřej Surý bb9cde6fb6 Merge branch '3130-cleanup-pthread-api-usage-v9_16' into 'v9_16'
Remove unused functions from isc_thread API

See merge request isc-projects/bind9!5809
2022-02-09 17:46:36 +00:00
Ondřej Surý ad5869ac6c Remove unused functions from isc_thread API
The isc_thread_setaffinity call was removed in !5265 and we are not
going to restore it because it was proven that the performance is better
without it.  Additionally, remove the already disabled cpu system test.

The isc_thread_setconcurrency function is unused and also calling
pthread_setconcurrency() on Linux has no meaning, formerly it was
added because of Solaris in 2001 and it was removed when taskmgr was
refactored to run on top of netmgr in !4918.

(cherry picked from commit 0500345513)
2022-02-09 18:09:48 +01:00
Michal Nowak 2c200922bb Merge branch '2599-run-less-stable-unit-tests-in-aws-v9_16' into 'v9_16'
[v9_16] Run unstable unit tests in CI

See merge request isc-projects/bind9!5807
2022-02-09 12:22:25 +00:00
Michal Nowak 14b0041474 Run unstable unit tests in CI
Running unstable unit tests in CI should help with making sure they
don't fail permanently without the fact being noticed in daily
pipelines.

(cherry picked from commit 1d8788464e)
2022-02-09 13:08:00 +01:00
Evan Hunt 826f744e16 Merge branch 'each-missing-relnotes-v9_16' into 'v9_16'
Release notes for [GL #3082] and [GL #3111]

See merge request isc-projects/bind9!5798
2022-02-02 20:06:30 +00:00
Evan Hunt 556f4d8870 Release notes for [GL #3082] and [GL #3111]
(cherry picked from commit d45f0e1d9e)
2022-02-02 12:04:48 -08:00
Petr Špaček e75ab60804 Merge branch '2974-improve-directory-documentation-v9_16' into 'v9_16'
Clarify effect of "directory" configuration option [v9_16]

See merge request isc-projects/bind9!5794
2022-02-02 11:39:20 +00:00
Ondřej SurýandPetr Špaček 774d82bde1 Clarify effect of "directory" configuration option
The "directory" configuration options affects the configuration listed
after the directive but not before which may affect ``include``
directive with relative file paths.

(cherry picked from commit 00ba6967b1)
2022-02-02 12:34:08 +01:00
Ondřej Surý 6107a5a932 Merge branch '3125-log-hard-quota-when-not-accepting-the-connection-v9_16' into 'v9_16'
Add log message when hard quota is reached in TCP accept

See merge request isc-projects/bind9!5790
2022-02-01 21:47:47 +00:00
Ondřej Surý 4f6f74015f Add CHANGES and release notes for [GL #3125]
(cherry picked from commit 932fc7b826703f8b0f30ed11c496f94a02e6ebbb)
2022-02-01 21:16:27 +01:00
Ondřej Surý 00e8bfcdfc Add log message when hard quota is reached in TCP accept
When isc_quota_attach_cb() API returns ISC_R_QUOTA (meaning hard quota
was reached) the accept_connection() would return without logging a
message about quota reached.

Change the connection callback to log the quota reached message.

(cherry picked from commit 2ae84702ad)
2022-02-01 21:06:43 +01:00
Petr Špaček d7d0289dd6 Merge branch '3120-recent-editions-9-17-22-onwards-of-arm-have-many-empty-grammar-descriptions-v9_16' into 'v9_16'
Fix empty grammar descriptions in the ARM [v9_16]

See merge request isc-projects/bind9!5787
2022-02-01 18:05:37 +00:00
Petr Špaček 3819f88c66 Rename parental-agents grammar file
For consistency with rest of the system, the grammar file and
the link anchors were renamed from "parentals" to "parental-agents".

Technically this is fixup for commit
90ef2b9c81.

Related: !5239
(reimplementation of commit 34a3b35b08)
2022-02-01 18:59:41 +01:00
Petr Špaček 2fd265eebe Regenerate .rst files with grammars after changes to rst generators
$ make -C doc/misc rst

(reimplementation of commit e97c35b3bc)
2022-02-01 18:59:31 +01:00
Mark AndrewsandPetr Špaček f6aa69889f Fix grammar generators to produce renderable include files in rst format
The missing `::` in the .rst files caused grammar section in docs to
render empty.

The `::` was accidentally removed in an unrelated commit
58bd26b6cf which was supposed to update
only copyright headers.

Fixes: #3120
(cherry picked from commit d975e6630f)
2022-02-01 18:29:23 +01:00
Mark AndrewsandPetr Špaček 8acbf77da0 Add missing rst-grammars.pl dependecy to config grammar build
(reimplementation of commit f5c66f311a)
2022-02-01 18:29:03 +01:00
Evan Hunt b9584ef68a Merge branch 'each-dns-clientinfo-v9_16' into 'v9_16'
allow dns_clientinfo to store client ECS data

See merge request isc-projects/bind9!5776
2022-01-28 00:31:02 +00:00
Evan Hunt 9219bc187f CHANGES for [GL #3082]
(cherry picked from commit e42f7d2722)
2022-01-27 16:20:55 -08:00
Evan Hunt ef20d189ab test ECS information is passed in dlzexternal
the dlzexternal test driver now includes ECS, if present in the
query, in the TXT record returned for QNAME "source-addr".

(cherry picked from commit 79ddedabf8)
2022-01-27 16:20:55 -08:00
Petr ŠpačekandEvan Hunt dbe0778b67 extend DLZ interface and example with ECS support
Apparently we forgot about DLZ when updating DNS_CLIENTINFO_VERSION
constant for ECS, which is at value "3" since ECS was introduced.

The code in example drivers and tests now hardcodes version numbers
2 (without ECS) and 3 (with ECS) depending on what a given code path
requires.

(cherry picked from commit f81debe1c8)
2022-01-27 16:20:55 -08:00
Evan Hunt 558b060de5 allow dns_clientinfo to store client ECS data
this brings DNS_CLIENTINFO_VERSION into line with the subscription
branch so that fixes applied to clientinfo processing can also be
applied to the main branch without diverging.

(cherry picked from commit 737e658602)
2022-01-27 16:08:57 -08:00
Ondřej Surý 952b3ffd79 Merge branch '3115-qname-wait-recurse-typo-v9_16' into 'v9_16'
Fix typo in qname-wait-recurse

See merge request isc-projects/bind9!5770
2022-01-27 11:57:07 +00:00
Ondřej Surý 4b93ec0805 Fix typo in qname-wait-recurse
In the RPZ documentation, there's a mistake where it states that the
default behavior will be disabled by setting `qname-wait-recurse yes;`
while in fact it's opposite `qname-wait-recurse no;`.

This affects only the RST documentation.

(cherry picked from commit 1e711dcccb)
2022-01-27 12:55:47 +01:00
Michał Kępień 0362d04fcc Merge branch 'michal/misc-test-framework-fixes-v9_16' into 'v9_16'
[v9_16] Miscellaneous test framework fixes

See merge request isc-projects/bind9!5764
2022-01-26 14:59:54 +00:00
Michał Kępień d995bd8dec Fix waiting for lock file removal upon exit
Commit c787a539d2 fixed a certain class of
intermittent system test failures caused by named instances unable to
restart.  The root cause was bin/tests/system/stop.pl returning without
waiting for a named instance to remove its lock file.

Later on, it turned out that the above change causes other issues on
Windows due to the way named handles signals on that platform.  Commit
761ba4514f intended to address those
issues by making the server_lock_file() subroutine in
bin/tests/system/stop.pl return an empty value on Windows, in order to
prevent the script for waiting for lock file cleanup on that platform.
Note, however, that Windows detection in that subroutine is limited to
checking whether the CYGWIN environment variable is set.

While that environment variable was not set on Unix-like systems before
commit 761ba4514f, another commit
(a33237f070, merged a few weeks later)
changed that by setting the CYGWIN environment variable to an empty
value on Unix-like systems.  This made the defined($ENV{'CYGWIN'}) check
in server_lock_file() return true, inadvertently preventing
bin/tests/system/stop.pl from waiting for lock file removal before
exiting on Unix-like systems and therefore reintroducing the original
issue.

Fix by making server_lock_file() only return an empty value when the
CYGWIN environment variable is set to a non-empty value (which is what
bin/tests/system/conf.sh.win32 does).  Adjust a similar check in the
pid_file_exists() subroutine in the same way for consistency.

(cherry picked from commit a938db2170)
2022-01-26 15:29:39 +01:00
Michał Kępień 93ad500f38 Do not strip leading whitespace from test output
The echo_*() and cat_*() functions in bin/tests/system/conf.sh.common
call the "read" builtin command without specifying the field separator
to use.  This results in leading whitespace getting stripped from each
line of the texts passed to those functions, which mangles e.g. pytest
output, hindering test failure troubleshooting.

Address by setting IFS to an empty value for the "read" calls used in
the aforementioned helper functions.

(cherry picked from commit fb87022115)
2022-01-26 15:29:39 +01:00
Michał Kępień 318adbee61 Retain all named.run files from each test run
The bin/tests/system/start.pl script truncates the named.run file for a
given named instance unless it is invoked with the --restart
command-line option.  Ever since Python-based tests were introduced,
bin/tests/system/run.sh may start named instances used by a given system
test multiple times within a single run, causing the
bin/tests/system/start.pl script to truncate some of the log files
written during the test.  This makes troubleshooting certain test
failures hard or even impossible.

Fix by calling bin/tests/system/start.pl with the --restart command-line
option for every start_servers() invocation except the first one.

(cherry picked from commit 65abbca79b)
2022-01-26 15:29:39 +01:00
Petr Špaček e9673d7cd1 Merge branch 'pspacek/misc-doc-cleanups-v9_16' into 'v9_16'
Miscellaneous documentation cleanups [v9_16]

See merge request isc-projects/bind9!5754
2022-01-26 11:14:21 +00:00
Petr Špaček 57f5a2f6e0 Fix incorrect RFC footnote about A6 RR type in RFC4033
A6 type is not mentioned anywhere in RFC4033.

(cherry-picked from commit ee3ba3cac9)
2022-01-26 12:03:35 +01:00
Petr Špaček c843c73e42 Remove RFCs not implemented in BIND from list in the ARM
This commit partially removes extra RFCs which are not listed in
file doc/misc/rfc-compliance.

Most of the removed RFCs are either outright obsolete, irrelevant,
or not implemented. Rationale:
- 974 - obsolete
- 1033 - ops info, hardly followed today
- 1464 - ops info
- 1591 - policy
- 1537 - obsolete
- 1713 - obsolete
- 1794 - notimp
- 2010 - ops info
- 2052 - obsolete
- 2065 - obsolete
- 2137 - obsolete
- 2168 - obsolete
- 2240 - obsolete
- 2345 - not dns
- 2352 - not dns
- 2540 - notimp
- 2825 - notimp, info, obsolete
- 2826 - notimp
- 2929 - obsolete
- 3071 - policy
- 3090 - obsolete
- 3258 - notimp
- 6594 - iana, SSHFP
- 7216 - not dns
- 8482 - notimp
- 8490 - notimp

Probably most notable RFCs removed are:
- 8482 for special ANY handling
- 8490 for Stateful Operations
As far as I can tell BIND does not implement those.

(cherry-picked from commit 8c82b0f2d0)
2022-01-26 12:03:35 +01:00
Petr Špaček e538995890 Reword RFC section in the ARM
Add couple links and caveant for uninitiated readers.

(cherry-picked from commit 4379e16996)
2022-01-26 12:03:35 +01:00
Petr Špaček b73623370e Add RFCs listed in doc/misc/rfc-compliance to doc/arm/general.rst
There were three RFCs listed in list of "RFCs we implement" but missing
in the ARM.

Command to compare lists in the two documents:

    diff <(grep -o '^  RFC[0-9]\+' doc/misc/rfc-compliance | sed -e 's/[^0-9]//g' | sort -n) <(grep  '^:rfc:`' doc/arm/general.rst | sed -e 's/^.*`\([0-9]*\)`.*$/\1/' | sort -n)

(cherry-picked from commit b1af79acc7)
2022-01-26 12:03:35 +01:00
Petr Špaček fc77d0e4bf Rework doc/arm/build.rst
- Revise the list of required libraries.
  - Apply miscellaneous tweaks to style, formatting, and ordering.

(cherry-picked from commit 4b1c70de90)
2022-01-26 12:03:35 +01:00
Petr Špaček 2542fdf059 Deduplicate text between Building BIND 9 / Supported Platforms in the ARM
Supported Platforms section is now really only about platforms and not
libraries. Libraries were moved to the Building BIND section.

We now have section for required libraries, and second with optional
features.  Wordy explanations were taken verbatim from the original
README.md.

(cherry-picked from commit 2c81fa9013)
2022-01-26 12:03:35 +01:00
Petr Špaček 93f782581e Replace Building BIND 9 section in README with reference to ARM
Plain-text README file was regenerated using commands from v9.16
Makefile.

(cherry-picked from commit 933ed9d537)
2022-01-26 12:03:35 +01:00
Petr Špaček d351f78709 Convert "Building BIND" section from README.md to reStructuredText
Converted using pandoc 2.14.2-14 on Arch Linux:

    $ pandoc --shift-heading-level-by=-1 -f markdown -t rst README.md > doc/arm/build.rst

Plus hand-edit to remove sections other than Building BIND 9, remove
misindentation in section headers, and add a standard copyright header.
2022-01-26 12:03:35 +01:00
Petr Špaček 5058817f5a Link to ISC KB for most up-to-date platform support statuses
(cherry-picked from commit 3bd4318fcc)
2022-01-26 12:03:35 +01:00
Petr Špaček 27cfa574dc Replace all occurences of PLATFORMS file with reference to the ARM
The conf.py exclude_patterns now includes platforms.rst to avoid
problems with redefining labels:
https://github.com/sphinx-doc/sphinx/issues/1668#issuecomment-71376208

Plain-text README file was regenerated using commands from v9.16
Makefile.

(cherry-picked from commit 920a2e730b)
2022-01-26 12:03:35 +01:00
Petr Špaček dd901b5c42 Replace duplicate Supported Operating Systems in the ARM by PLATFORMS.rst
(cherry-picked from commit f693c9b1a7)
2022-01-26 12:03:35 +01:00
Petr Špaček b13592f650 Convert PLATFORMS file from Markdown to reStructuredText
Converted using pandoc 2.14.2-14 on Arch Linux:

    $ pandoc -f markdown -t rst PLATFORMS.md > PLATFORMS.rst

The pandoc-generated copyright header was subsequently replaced with
usual one for .rst files.
2022-01-26 12:03:30 +01:00
Arаm Sаrgsyаn 5fba218bf4 Merge branch '3060-revert-view-on-failed-reconfig-v9_16' into 'v9_16'
[v9_16] Improve the view configuration error handling and reverting logic

See merge request isc-projects/bind9!5753
2022-01-26 08:43:31 +00:00
Aram Sargsyan 4ada743291 Don't use RTLD_DEEPBIND with sanitizers
dlopen(3) RTLD_DEEPBIND flag is incompatible with sanitizer runtime
(see https://github.com/google/sanitizers/issues/611 for details).
2022-01-26 08:19:02 +00:00
Aram Sargsyan 254cabb558 Fix a memory leak in dns_dlzcreate()
dns_dlzcreate() fails to free the memory allocated for dlzname
when an error occurs.

Free dlzname's memory (acquired earlier with isc_mem_strdup())
by calling isc_mem_free() before returning an error code.

(cherry picked from commit 4a6c66288f)
2022-01-26 08:19:02 +00:00
Aram Sargsyan b5735ec37a Fix invalid control port number in the catz system test
When failure is expected, the `rndc` command in the catz system test
is being called directly instead of using a function, i.e.:

    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig \
        > /dev/null 2>&1 && ret=1

... instead of:

    rndccmd 10.53.0.2 reconfig && ret=1

This is done to suppress messages like "lt-rndc: 'reconfig' failed:
failure" appearing in the message log of the test, because failure
is actually expected, and the appearance of that message can be
confusing.

The port value used in this case is not correct, making the
`rndc reload` command to fail.  This error was not detected earlier
only because the failure of the command is actually expected, but
the failure happens for a "wrong" reason, and the test still passes.

Fix the error by using the existing variable instead of the fixed
number.

(cherry picked from commit 5f9d4b5db4)
2022-01-26 08:19:02 +00:00
Aram Sargsyan 094e416fff Add a system test for view reverting after a failed reconfiguration
Test the view reverting code by introducing a faulty dlz configuration
in named.conf and using `rndc reconfig` to check if named handles the
situation correctly.

We use "dlz" because the dlz processing code is located in an ideal
place in the view configuration function for the test to cover the
view reverting code.

This test is specifically added to the catz system test to additionally
cover the catz reconfiguration during the mentioned failed
reconfiguration attempt.

(cherry picked from commit 62337d433f)
2022-01-26 08:19:02 +00:00
Aram Sargsyan acc774e4dd Add CHANGES and release notes for [GL #3060]
(cherry picked from commit d7dfa2dc4b)
2022-01-26 08:19:02 +00:00
Aram Sargsyan a663216c0e Improve the zones' view reverting logic when a zone is a catalog zone
When a zone is being configured with a new view, the catalog zones
structure will also be linked to that view. Later on, in case of some
error, should the zone be reverted to the previous view, the link
between the catalog zones structure and the view won't be reverted.

Change the dns_zone_setviewrevert() function so it calls
dns_zone_catz_enable() during a zone revert, which will reset the
link between `catzs` and view.

(cherry picked from commit 2fd967136a)
2022-01-26 08:19:02 +00:00
Aram Sargsyan 885e44650b Separate the locked parts of dns_zone_catz_enable/disable functions
Separate the locked parts of dns_zone_catz_enable() and
dns_zone_catz_disable() functions into static functions.  This will
let us perform those tasks from the other parts of the module while
the zone is locked, avoiding one pair of additional unlocking and
locking operations.

(cherry picked from commit 6b937ed5f6)
2022-01-26 08:19:02 +00:00
Aram Sargsyan f555f1d2eb Improve the view configuration error handling and reverting logic
If a view configuration error occurs during a named reconfiguration
procedure, BIND can end up having twin views (old and new), with some
zones and internal structures attached to the old one, and others
attached to the new one, which essentially creates chaos.

Implement some additional view reverting mechanisms to avoid the
situation described above:

 1. Revert rpz configuration.

 2. Revert catz configuration.

 3. Revert zones to view attachments.

(cherry picked from commit 3697560f04)
2022-01-26 08:19:02 +00:00
Evan Hunt 8e9e2d7608 Merge branch '3111-fix-dlz-pthreads' into 'v9_16'
restore missing lines in dlz_pthread.h

See merge request isc-projects/bind9!5757
2022-01-26 05:09:10 +00:00
Evan Hunt 5996c73516 restore missing lines in dlz_pthread.h
some lines were accidentally deleted during a backport that
made it imposisble to build DLZ modules.
2022-01-25 12:28:48 -08:00
Petr Špaček 7b50984350 Merge branch 'pspacek/fix-historical-relnotes' into 'v9_16'
[v9_16] Fix historical release notes

See merge request isc-projects/bind9!5722
2022-01-24 16:39:22 +00:00
Petr Špaček 675f6c6b57 Remove reference to (unavailable) nsdname-wait-recurse option from ARM
This option is available only in 9.16-S edition, but docs for it were
accidentally imported when documentation was migrated to Sphinx in
!3536.
2022-01-24 17:34:53 +01:00
Petr Špaček ea4a90a96a Fix inconsistent release note for #1807
This was an omission in !3495.
2022-01-24 17:34:53 +01:00
Petr Špaček c3a1287e1f Add missing release notes for CVE-2020-8616 and CVE-2020-8617
These release notes were lost when converting docs from XML to RST
formats. These two notes were removed by commit
5a855f6754.

Related: #1388, #1703, !3536
2022-01-24 17:34:48 +01:00
Ondřej Surý 5656609879 Merge branch 'ondrej/use-utc-for-reproducible-builds-v9_16' into 'v9_16'
Use UTC datetime for reproducible builds

See merge request isc-projects/bind9!5751
2022-01-24 15:35:09 +00:00
Ondřej Surý 7df5065c75 Use UTC datetime for reproducible builds
For reproducible builds, we use last modification time of the CHANGES
file.  This works pretty well, unless the builds are made in different
timezones.

Use UTC option to date command to make the builds reproducible.
2022-01-24 16:24:36 +01:00
Petr Špaček c4769937a5 Merge branch 'pspacek/remove-duplicate-named.conf.rst-v9_16' into 'v9_16'
Remove duplicate named.conf.rst file [v9_16]

See merge request isc-projects/bind9!5746
2022-01-21 14:43:21 +00:00
Petr Špaček da70d59f40 Remove duplicate named.conf.rst file
As far as I can tell, it is some leftover from the times when Sphinx
docs were introduced (commit 9fb6d11abb).
It seems like it is not referenced from anywhere.

(cherry picked from commit 0a5c2c23bb)
2022-01-21 15:33:40 +01:00
Michał Kępień fbb824c167 Merge branch 'v9_16_25-release' into 'v9_16'
Merge 9.16.25 release branch

See merge request isc-projects/bind9!5742
2022-01-20 10:43:21 +00:00
Michał Kępień 5111a76eb0 Prepare release notes for BIND 9.16.26 2022-01-20 11:38:18 +01:00
Tinderbox UserandMichał Kępień f4cdb2448c Merge branch 'prep-release' into v9_16_25-release 2022-01-20 11:37:08 +01:00
Michał Kępień 4a2f91272c Merge branch 'pspacek/prepare-documentation-for-bind-9.16.25' into 'v9_16_25-release'
Prepare documentation for BIND 9.16.25

See merge request isc-private/bind9!343
2022-01-20 11:37:08 +01:00
Tinderbox UserandMichał Kępień 4e0d55cdcd prep 9.16.25 2022-01-20 11:37:08 +01:00
Michał Kępień 9987ff1edf Prepare release notes for BIND 9.16.25 2022-01-20 11:37:08 +01:00
Michał Kępień c5f7ece3ad Reorder release notes 2022-01-20 11:37:08 +01:00
Petr ŠpačekandMichał Kępień 00aeba54c9 Tweak and reword release notes 2022-01-20 11:37:08 +01:00
Michał Kępień 3d1544726b Merge branch '3080-rndc-catch-canceled-v9_16' into 'v9_16'
rndc: add an extra task reference

See merge request isc-projects/bind9!5740
2022-01-20 08:06:21 +00:00
Evan Hunt 3aa529a9e0 CHANGES for [GL #3080] 2022-01-19 12:01:45 -08:00
Evan Hunt 075722f8a2 rndc: add an extra task reference
adding an extra task before launching the rndc app prevents
a use-after-free when task events fire after the app has been
shut down by a signal.
2022-01-19 11:05:00 -08:00
Ondřej Surý 65314e437f Merge branch 'each-fix-changes-v9_16' into 'v9_16'
fix CHANGES

See merge request isc-projects/bind9!5723
2022-01-17 10:59:39 +00:00
Evan HuntandOndřej Surý e437ef6d6b fix misplaced CHANGES note
Change #5676 was incorrectly placed under 9.16.24 when backporting,
but is actually in 9.16.25.
2022-01-17 11:55:46 +01:00
Ondřej Surý c7413e9f5d Merge branch 'djt-update-cookie-secret-doc-v9_16' into 'v9_16'
docs: Update ARM to reflect changes to acceptable cookie-secret values

See merge request isc-projects/bind9!5729
2022-01-17 10:53:57 +00:00
Dan TheisenandOndřej Surý 133b5c1a52 docs: Update ARM to reflect changes to acceptable cookie-secret values
(cherry picked from commit acf1d502d6)
2022-01-17 11:52:13 +01:00
Ondřej Surý 5beaf7638c Merge branch '3093-missing-libuv-code-v9_16' into 'v9_16'
add UV_ENOTSUP to isc___nm_uverr2result()

See merge request isc-projects/bind9!5728
2022-01-17 10:51:31 +00:00
Evan HuntandOndřej Surý 464b09a804 add UV_ENOTSUP to isc___nm_uverr2result()
This error code is now mapped to ISC_R_FAMILYNOSUPPORT.

(cherry picked from commit be0bc24c7f)
2022-01-17 11:47:12 +01:00
Ondřej Surý ea26c36d62 Merge branch 'ondrej/fix-missing-backtick-in-host.rst-v9_16' into 'v9_16'
Add missing backtick to host.rst

See merge request isc-projects/bind9!5725
2022-01-16 07:06:44 +00:00
Ondřej Surý 35aba6f078 Add missing backtick to host.rst
The missing backtick was causing formatting problems in the host
manpage.

(cherry picked from commit aaa31962d2)
2022-01-16 08:02:26 +01:00
Ondřej Surý c79a35294e Merge branch '3095-invalid-recvmmsg-detection-v9_16' into 'v9_16'
Fix the UDP recvmmsg support

See merge request isc-projects/bind9!5717
2022-01-13 22:26:42 +00:00
Ondřej Surý 4666cb4a4e Add CHANGES and release notes for [GL #3095]
(cherry picked from commit 8d778f758b)
2022-01-13 23:05:38 +01:00
Ondrej Sury 04eeb67d97 Instead of detecting MUSL libc, detect padding in struct msghdr
The detection of MUSL libc via autoconf $host turned out to be
not reliable.

Convert the autoconf check from $host detection to actually detect
the padding used in the struct msghdr.
2022-01-13 23:05:38 +01:00
Ondřej Surý 86f9b16fd7 Revert "Always enqueue isc__nm_tcp_resumeread()"
The commit itself is harmless, but at the same time it is also useless,
so we are reverting it.

This reverts commit 11c869a3d5.

(cherry picked from commit 0a4e91ee47)
2022-01-13 21:39:57 +01:00
Ondrej Sury de8dbcbfbc Disable udp recvmmsg support on systems with MUSL libc
The Linux kernel diverts from the POSIX specification for two members of
struct msghdr making them size_t sized (instead of int and socklen_t).
In glibc, the developers have decided to use that.  However, the MUSL
developers used padding for the struct and kept the members defined
according to the POSIX.

This creates a problem, because libuv doesn't use recvmmsg() library
call where the padding members are correctly zeroed and instead calls
the syscall directly, the struct msghdr is passed to the kernel with
enormous values in those two members (because of the random junk in the
padding members) and the syscall thus fail with EMSGSIZE.

Disable udp recvmmsg support on systems with MUSL libc until the libuv
starts zeroing the struct msghdr before passing it to the syscall.

(cherry picked from commit 287ea095f1)
2022-01-13 21:39:57 +01:00
Ondřej Surý 5b02f5a8a0 Fix the UDP recvmmsg support
Previously, the netmgr/udp.c tried to detect the recvmmsg detection in
libuv with #ifdef UV_UDP_<foo> preprocessor macros.  However, because
the UV_UDP_<foo> are not preprocessor macros, but enum members, the
detection didn't work.  Because the detection didn't work, the code
didn't have access to the information when we received the final chunk
of the recvmmsg and tried to free the uvbuf every time.  Fortunately,
the isc__nm_free_uvbuf() had a kludge that detected attempt to free in
the middle of the receive buffer, so the code worked.

However, libuv 1.37.0 changed the way the recvmmsg was enabled from
implicit to explicit, and we checked for yet another enum member
presence with preprocessor macro, so in fact libuv recvmmsg support was
never enabled with libuv >= 1.37.0.

This commit changes to the preprocessor macros to autoconf checks for
declaration, so the detection now works again.  On top of that, it's now
possible to cleanup the alloc_cb and free_uvbuf functions because now,
the information whether we can or cannot free the buffer is available to
us.

(cherry picked from commit 7370725008)
2022-01-13 21:38:43 +01:00
Ondřej Surý 570aae5b9b Merge branch 'ondrej/remove-util-copyrights-v9_16' into 'v9_16'
Remove the copyright handling via util/copyrights

See merge request isc-projects/bind9!5709
2022-01-11 12:06:11 +00:00
Ondřej Surý b62feae347 Remove util/copyrights
(cherry picked from commit e1d2e26360)
2022-01-11 12:22:09 +01:00
Ondřej Surý 2bf7921c7e Update the copyright information in all files in the repository
This commit converts the license handling to adhere to the REUSE
specification.  It specifically:

1. Adds used licnses to LICENSES/ directory

2. Add "isc" template for adding the copyright boilerplate

3. Changes all source files to include copyright and SPDX license
   header, this includes all the C sources, documentation, zone files,
   configuration files.  There are notes in the doc/dev/copyrights file
   on how to add correct headers to the new files.

4. Handle the rest that can't be modified via .reuse/dep5 file.  The
   binary (or otherwise unmodifiable) files could have license places
   next to them in <foo>.license file, but this would lead to cluttered
   repository and most of the files handled in the .reuse/dep5 file are
   system test files.

(cherry picked from commit 58bd26b6cf)
2022-01-11 12:22:09 +01:00
Ondřej Surý f27df9899b Add reuse lint CI job
Instead of checking for the licenses in the misc step, add a separate
job that uses the upstream provided image that has reuse tool installed
and run `reuse lint` from the separate job.

(cherry picked from commit dbcff56043)
2022-01-11 09:49:00 +01:00
Ondřej Surý 7b532569e3 Remove the copyright handling via util/copyrights
The copyright handling has been long obsolete, the works is covered as
whole by the COPYING/LICENSE file even if a specific file doesn't have
a copyright header.

The important thing to remember here is that any work is covered by a
copyright law and by explicitly giving it license we provide extra
rights to the users of the works.

(cherry picked from commit 09c32a8d75)
2022-01-11 09:48:58 +01:00
Mark Andrews e38a74a610 Merge branch '3025-document-how-rate-limiting-uses-dns-cookies-v9_16' into 'v9_16'
[v9_16] Document how rate limiting uses DNS cookies

See merge request isc-projects/bind9!5701
2022-01-07 08:49:37 +00:00
Björn PerssonandMark Andrews fd1d6b5d1c Document the interation of DNS COOKIE and RRL
Send back BADCOOKIE responses instead of TC=1 when slipping.

Skip rate limiting for UDP requests with valid server cookies.

(cherry picked from commit a59482b85c)
2022-01-07 19:29:26 +11:00
Ondřej Surý e1d9996222 Merge branch '3079-always-enqueue-isc__nm_tcp_resumeread-v9_16' into 'v9_16'
Always enqueue isc__nm_tcp_resumeread()

See merge request isc-projects/bind9!5699
2022-01-06 19:32:18 +00:00
Ondřej Surý 21b74b8c48 Add CHANGES and release note for [GL #3079]
(cherry picked from commit 5563d06d62)
2022-01-06 20:00:44 +01:00
Ondřej Surý 8590251f5a Always enqueue isc__nm_tcp_resumeread()
The isc__nm_tcp_resumeread() was using maybe_enqueue function to enqueue
netmgr event which could case the read callback to be executed
immediately if there was enough data waiting in the TCP queue.

If such thing would happen, the read callback would be called before the
previous read callback was finished and the worker receive buffer would
be still marked "in use" causing a assertion failure.

This would affect only raw TCP channels, e.g. rndc and http statistics.

(cherry picked from commit 11c869a3d5)
2022-01-06 20:00:44 +01:00
Ondřej Surý a06707c63e Merge branch 'ondrej/fix-taskmgr-exiting-access-v9_16' into 'v9_16'
On shutdown, return ISC_R_SHUTTINGDOWN from isc_taskmgr_excltask()

See merge request isc-projects/bind9!5698
2022-01-06 17:29:49 +00:00
Ondřej Surý 5be356760d Remove taskmgr->excl_lock, fix the locking for taskmgr->exiting
While doing code review, it was found that the taskmgr->exiting is set
under taskmgr->lock, but accessed under taskmgr->excl_lock in the
isc_task_beginexclusive().

Additionally, before the change that moved running the tasks to the
netmgr, the task_ready() subrouting of isc_task_detach() would lock
mgr->lock, requiring the mgr->excl to be protected mgr->excl_lock
to prevent deadlock in the code.  After !4918 has been merged, this is
no longer true, and we can remove taskmgr->excl_lock and use
taskmgr->lock in its stead.

Solve both issues by removing the taskmgr->excl_lock and exclusively use
taskmgr->lock to protect both taskmgr->excl and taskmgr->exiting which
now doesn't need to be atomic_bool, because it's always accessed from
within the locked section.

(cherry picked from commit e705f213ca)
2022-01-06 17:56:45 +01:00
Ondřej Surý 9ec7d78d16 On shutdown, return ISC_R_SHUTTINGDOWN from isc_taskmgr_excltask()
The isc_taskmgr_excltask() would return ISC_R_NOTFOUND either when the
exclusive task was not set (yet) or when the taskmgr is shutting down
and the exclusive task has been already cleared.

Distinguish between the two states and return ISC_R_SHUTTINGDOWN when
the taskmgr is being shut down instead of ISC_R_NOTFOUND.

(cherry picked from commit f9d90159b8)
2022-01-06 17:56:45 +01:00
Petr Špaček 39a8511084 Merge branch 'vicky-main-patch-33672-v9_16' into 'v9_16'
Update preface.rst of DNSSEC Guide with new contact info for Josh Kuo [v9_16]

See merge request isc-projects/bind9!5697
2022-01-06 15:26:30 +00:00
Vicky RiskandPetr Špaček 18322cd85b Update preface.rst of DNSSEC Guide with new contact info for Josh Kuo
(cherry picked from commit 896fa924f3)
2022-01-06 16:20:11 +01:00
Ondřej Surý ebec9c701a Merge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without-unsigned-serial-number-fix-v9_16' into 'v9_16'
Check unsigned serial number in signed zone files

See merge request isc-projects/bind9!5693
2022-01-06 11:33:11 +00:00
Ondřej SurýandOndřej Surý 721c175bf4 Add CHANGES and release note for [GL #3071]
(cherry picked from commit ff8d37cbdb)
2022-01-06 12:27:12 +01:00
Ondřej Surý 4aed6821d7 Revert "Add CHANGES and release note for [GL #3071]"
This reverts commit 7a6365d02875ca1344013ad16ae2d33a51307bec.

(cherry picked from commit 5f36948176)
2022-01-06 12:27:12 +01:00
Michał KępieńandOndřej Surý 149285168e Do not detach raw zone until dumping is complete
When the signed version of an inline-signed zone is dumped to disk, the
serial number of the unsigned version of the zone is stored in the
raw-format header so that the contents of the signed zone can be
resynchronized after named restart if the unsigned zone file is modified
while named is not running.

In order for the serial number of the unsigned zone to be determined
during the dump, zone->raw must be set to a non-NULL value.  This should
always be the case as long as the signed version of the zone is used for
anything by named.

However, a scenario exists in which the signed version of the zone has
zone->raw set to NULL while it is being dumped:

 1. Zone dump is requested; zone_dump() is invoked.

 2. Another zone dump is already in progress, so the dump gets deferred
    until I/O is available (see zonemgr_getio()).

 3. The last external reference to the zone is released.
    zone_shutdown() gets queued to the zone's task.

 4. I/O becomes available for zone dumping.  zone_gotwritehandle() gets
    queued to the zone's task.

 5. The zone's task runs zone_shutdown().  zone->raw gets set to NULL.

 6. The zone's task runs zone_gotwritehandle().  zone->raw is determined
    to be NULL, causing the serial number of the unsigned version of the
    zone to be omitted from the raw-format dump of the signed zone file.

Note that the naïve solution - deferring the dns_zone_detach() call for
zone->raw until zone_free() gets called for the secure version of the
zone - does not work because it leads to a chicken-and-egg problem when
the inline-signed zone is about to get freed: the raw zone holds a weak
reference to the secure zone and that reference does not get released
until the reference count for the raw zone reaches zero, which in turn
would not happen until all weak references to the secure zone were
released.

Defer detaching from zone->raw in zone_shutdown() if the zone is in the
process of being dumped to disk.  Ensure zone->raw gets detached from
after the dump is finished if detaching gets deferred.  Prevent zone
dumping from being requeued upon failure if the zone is in the process
of being cleaned up as it opens up possibilities for the zone->raw
reference to leak, triggering a shutdown hang.

(cherry picked from commit ef625f5f06)
2022-01-06 12:27:12 +01:00
Ondřej Surý b8e6dffdbc Revert "Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()"
This reverts commit cc1d4e1aa6.

(cherry picked from commit 1064b2fc47)
2022-01-06 12:27:12 +01:00
Michał KępieńandOndřej Surý 1904acc7ef Check unsigned serial number in signed zone files
All signed zone files present in bin/tests/system/inline/ns8 should
contain the unsigned serial number in the raw-format header.  Add a
check to ensure that is the case.  Extend the dnssec-signzone command
line in ns8/sign.sh with the -L option to allow the zones initially
signed there to pass the newly added check.  Add another zone to the
configuration for the ns8 named instance to ensure the check also passes
when multiple zones are inline-signed by a single named instance.

(cherry picked from commit ab49205af3)
2022-01-06 12:27:12 +01:00
Matthijs Mekking be1efdcf24 Merge branch '3035-dnssec-policy-stops-signing-when-removing-zsk-v9_16' into 'v9_16'
Fix autosign system test, allow expired zone signatures to be replaced with KSK RRSIGs (9.16)

See merge request isc-projects/bind9!5694
2022-01-06 08:58:44 +00:00
Matthijs Mekking 99316385d3 Replace RSASHA1 in autosign test with default alg
Change RSASHA1 to $DEFAULT_ALGORITHM to be FIPS compliant.

There is one RSASHA1 occurence left, to test that dynamically adding an
NSEC3PARAM record to an NSEC-only zone fails.

(cherry picked from commit 6e9fed2d24)
2022-01-06 09:35:53 +01:00
Matthijs Mekking b002ed569c Add CHANGES and release note for GL #3049
This is a bugfix worth mentioning.

(cherry picked from commit f3e668d630)
2022-01-06 09:35:48 +01:00
Matthijs Mekking 17ae663084 Update autosign test
Update the autosign system test with new expected behavior.

The 'nozsk.example' zone should have its expired zone signatures
deleted and replaced with signatures generated with the KSK.

The 'inaczsk.example' zone should have its expired zone signatures
deleted and replaced with signatures generated with the KSK.

In both scenarios, signatures are deleted, not retained, so the
"retaining signatures" warning should not be logged.

Furthermore, thsi commit fixex a test bug where the 'awk' command
always returned 0.

Finally, this commit adds a test case for an offline KSK, for the zone
'noksk.example'. In this case the expired signatures should be retained
(despite the zone being bogus, but resigning the DNSKEY RRset with the
ZSK won't help here).

(cherry picked from commit fbd559ad0d)
2022-01-06 09:35:42 +01:00
Matthijs Mekking bdb91e3825 Fix bug introduced by #763 related to offline keys
In some cases we want to keep expired signatures. For example, if the
KSK is offline, we don't want to fall back to signing with the ZSK.
We could remove the signatures, but in any case we end up with a broken
zone.

The change made for GL #763 prevented the behavior to sign the DNSKEY
RRset with the ZSK if the KSK was offline (and signatures were expired).

The change causes the definition of "having both keys": if one key is
offline, we still consider having both keys, so we don't fallback
signing with the ZSK if KSK is offline.

That change also works the other way, if the ZSK is offline, we don't
fallback signing with the KSK.

This commit fixes that, so we only fallback signing zone RRsets with
the KSK, not signing key RRsets with the ZSK.

(cherry picked from commit beeefe35c4)
2022-01-06 09:35:36 +01:00
Matthijs Mekking 8e31f6981a Only warn if we could not delete signature
BIND can log this warning:

    zone example.ch/IN (signed): Key example.ch/ECDSAP256SHA256/56340
      missing or inactive and has no replacement: retaining signatures.

This log can happen when BIND tries to remove signatures because the
are about to expire or to be resigned. These RRsets may be signed with
the KSK if the ZSK files has been removed from disk. When we have
created a new ZSK we can replace the signatures creeated by the KSK
with signatures from the new ZSK.

It complains about the KSK being missing or inactive, but actually it
takes the key id from the RRSIG.

The warning is logged if BIND detects the private ZSK file is missing.

The warning is logged even if we were able to delete the signature.

With the change from this commit it only logs this warning if it is not
okay to delete the signature.

(cherry picked from commit 2d2858841a)
2022-01-06 09:35:29 +01:00
Ondřej Surý 0c2e37a064 Merge branch '3074-catz-excl-task-v9_16' into 'v9_16'
Prevent a shutdown race in catz_create_chg_task()

See merge request isc-projects/bind9!5691
2022-01-05 13:01:15 +00:00
Evan HuntandOndřej Surý e243f68f00 Add CHANGES note for [GL #3074]
(cherry picked from commit 81c09b005b)
2022-01-05 13:37:47 +01:00
Evan HuntandOndřej Surý 21b0093440 Prevent a shutdown race in catz_create_chg_task()
If a catz event is scheduled while the task manager was being
shut down, task-exclusive mode is unavailable. This needs to be
handled as an error rather than triggering an assertion.

(cherry picked from commit 973ac1d891)
2022-01-05 13:37:46 +01:00
Matthijs Mekking 221adf3471 Merge branch '3023-auto-dnssec-documentation-bug-v9_16' into 'v9_16'
Update auto-dnssec documentation

See merge request isc-projects/bind9!5689
2022-01-05 11:24:37 +00:00
Matthijs Mekking ec483977e4 Add CHANGES for #3023
(cherry picked from commit 447fa2a816)
2022-01-05 11:57:14 +01:00
Matthijs Mekking 219f5ebd32 Update auto-dnssec documentation
Explain that 'auto-dnssec' may only be activated at zone level.

(cherry picked from commit aac39647f3)
2022-01-05 11:57:08 +01:00
Ondřej Surý d9b4a3d123 Merge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without-unsigned-serial-number-v9_16' into 'v9_16'
Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()

See merge request isc-projects/bind9!5688
2022-01-05 10:02:54 +00:00
Ondřej SurýandOndřej Surý 604612e5b9 Add CHANGES and release note for [GL #3071]
(cherry picked from commit 4d71a3b309)
2022-01-05 10:33:46 +01:00
Michał KępieńandOndřej Surý 7b455124d5 Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()
When the signed version of an inline-signed zone is dumped to disk, the
serial number of the unsigned version of the zone is written in the
raw-format header so that the contents of the signed zone can be
resynchronized after named restart if the unsigned zone file is
modified while named is not running (see RT #26676).

In order for the serial number of the unsigned zone to be determined
during the dump, zone->raw must be set to a non-NULL value.  This
should always be the case as long as the signed version of the zone is
used for anything by named.

However, under certain circumstances the zone->raw could be set to NULL
while the zone is being dumped.

Defer detaching from zone->raw in zone_shutdown() if the zone is in the
process of being dumped to disk.

(cherry picked from commit cc1d4e1aa6)
2022-01-05 10:32:50 +01:00
Mark Andrews e837701a36 Merge branch '3065-memory-leak-on-duplicately-named-dnssec-policy-v9_16' into 'v9_16'
Address memory leak when processing dnssec-policy clauses

See merge request isc-projects/bind9!5685
2022-01-03 22:23:36 +00:00
Mark Andrews 8b0b85828b Add CHANGES for [GL #3065]
(cherry picked from commit 6de041f19c)
2022-01-04 09:04:49 +11:00
Mark Andrews 0e0cd6bf17 Report duplicate dnssec-policy names
Duplicate dnssec-policy names were detected as an error condition
but were not logged.

(cherry picked from commit b8845454c8)
2022-01-04 09:04:07 +11:00
Mark Andrews 8dd1288dca Address memory leak when processing dnssec-policy clauses
A kasp structure was not detached when looking to see if there
was an existing kasp structure with the same name, causing memory
to be leaked.  Fixed by calling dns_kasp_detach() to release the
reference.

(cherry picked from commit 694440e614)
2022-01-04 09:04:07 +11:00
Michal Nowak 478438c1a8 Merge branch 'mnowak/year-2022-v9_16' into 'v9_16'
[v9_16] Update copyrights to 2022

See merge request isc-projects/bind9!5682
2022-01-03 15:49:10 +00:00
Michal Nowak 71d780df3c Update copyrights to 2022
(cherry picked from commit befd654e00)
2022-01-03 11:57:58 +01:00
Michał Kępień 365593be15 Merge branch '2782-set-version-and-release-variables-in-conf.py-v9_16' into 'v9_16'
[v9_16] Set version and release variables in conf.py

See merge request isc-projects/bind9!5677
2021-12-29 09:21:47 +00:00
Michał Kępień 523b38875e Remove man_SPHINXOPTS from doc/arm/Makefile.in
The man_SPHINXOPTS variable is only used in doc/man/Makefile.in.  Remove
its duplicate definition from doc/arm/Makefile.in.
2021-12-29 09:59:38 +01:00
Michał Kępień 7eac78ccc0 Clarify use of the "today" Sphinx variable
Add a comment explaining the purpose of setting the "today" variable in
Sphinx invocations to prevent confusion caused by the absence of that
variable from reStructuredText sources.

(cherry picked from commit e67cdb390a)
2021-12-29 09:59:38 +01:00
Michał Kępień 02387700ff Set version and release variables in conf.py
Some Sphinx variables used in the ARM are only set in
doc/arm/Makefile.in.  This works fine when building the ARM using
"make", but does not work with Read the Docs, which only looks at
conf.py files.

Since Read the Docs does not run ./configure, renaming conf.py to
conf.py.in and using Autoconf output variables is not a feasible
solution.

Instead, extend doc/arm/conf.py with some Python code which processes
the "version" file using regular expressions and sets the relevant
Sphinx variables accordingly.  As this solution also works fine when
building the ARM using "make", drop the relevant -D options from the
list of sphinx-build options used for building the ARM in
doc/arm/Makefile.in.

Note that the man_SPHINXOPTS counterparts of the removed -D switches are
left intact because doc/man/conf.py is a separate Sphinx project which
is only processed using "make" and duplicating the Python code added to
doc/arm/conf.py by this commit would be inelegant.

(cherry picked from commit 38d251e11b)
2021-12-29 09:59:38 +01:00
Michal Nowak 0f81ad2428 Merge branch 'mnowak/make-debian-11-bullseye-base-image-v9_16' into 'v9_16'
[v9_16] Make bullseye the base image

See merge request isc-projects/bind9!5670
2021-12-23 15:58:13 +00:00
Michal Nowak 38228927e1 Use /dev/urandom as BIND 9.11 randomness source
This prevents resolver timeouts for the reference (BIND 9.11) servers
used in respdiff tests run on Debian 11 "bullseye".

(cherry picked from commit 4d7e343813)
2021-12-23 15:45:36 +01:00
Michal Nowak f145b884a4 Make bullseye the base image
"buster" jobs are now only going to be run in scheduled pipelines.

"--without-gssapi" ./configure option of "bullseye" before it became
the base image is dropped from "bullseye"-the-base-image because it
reduces gcov coverage by 0.38 % (651 lines) and is used in Debian 9
"stretch".

(cherry picked from commit 910d595fbc)
2021-12-23 15:45:36 +01:00
Michał Kępień 37a4d0fff6 Merge branch 'rhbz/fedora/2032704-v9_16' into 'v9_16'
[v9_16] Avoid conflict with ldap_connect function of openldap

See merge request isc-projects/bind9!5668
2021-12-22 21:21:20 +00:00
Petr MensikandMichał Kępień 6ea7005d0e Change all internal functions to dlz_ldap prefix
To prevent any conflict in the future, avoid ldap_ prefix in any
internal functions. Keep it reserved for openldap only.

(cherry picked from commit 7bce3e7791)
2021-12-22 22:15:40 +01:00
Petr MensikandMichał Kępień 8408656489 Avoid conflict with ldap_connect function of openldap
ldap_connect is defined by OpenLDAP 2.6. Compiler complains there are
conflicting declarations. Use dlz_ldap prefix instead of ldap to avoid
conflict.

(cherry picked from commit 49e523e56f)
2021-12-22 22:15:40 +01:00
Michal Nowak 7baec16188 Merge branch 'mnowak/respdiff-job-dependency-fix-v9_16' into 'v9_16'
[v9_16] Execute respdiff jobs out-of-order

See merge request isc-projects/bind9!5666
2021-12-22 14:31:57 +00:00
Michal Nowak a68f482e14 Execute respdiff jobs out-of-order
Commit e8d8b43e dropped dependency of "respdiff" and
"respdiff-third-party" jobs on "tarball-create" job because these jobs
don't need to depend on in (e.g., for its artifacts). This, however,
caused that respdiff jobs weren't started out-of-order and artifacts
from all the "Build" stage jobs plus "unit:gcc:buster:amd64" job were
downloaded to project directory and caused problems with compilation:

Originally, the dependency on "tarball-create" has been added in
704eeb32 to indicate that respdiff "is meant to operate on two different
BIND versions". It seems that the intent didn't work out, and we better
make it obvious that respdiff jobs don't depend on any other job and
should be run out-of-order.

(cherry picked from commit 87578efc71)
2021-12-22 15:19:56 +01:00
Michal Nowak ac61902dfa Merge branch 'mnowak/respdiff-add-third-party-server-support-v9_16' into 'v9_16'
[v9_16] Add respdiff job with third-party recursors

See merge request isc-projects/bind9!5662
2021-12-21 16:39:59 +00:00
Michal Nowak e8d8b43e67 Add respdiff job with third-party recursors
The order of directories with reference and test BIND 9 are now reversed
for respdiff.sh.

The data.mdb file has more than 10 GB and makes artifact download take
an unnecessarily long time.

(cherry picked from commit 2ececf2c02)
2021-12-21 17:28:22 +01:00
Michal Nowak c17cf36e53 Merge branch 'mnowak/freebsd-12.3-v9_16' into 'v9_16'
[v9_16] Add FreeBSD 12.3

See merge request isc-projects/bind9!5659
2021-12-20 16:34:58 +00:00
Michal Nowak 4741135328 Add FreeBSD 12.3
(cherry picked from commit a4d8571fa2)
2021-12-20 17:00:10 +01:00
Michal Nowak c60d6b5029 Merge branch 'mnowak/add-fedora-35-v9_16' into 'v9_16'
[v9_16] Add Fedora 35

See merge request isc-projects/bind9!5657
2021-12-17 15:09:38 +00:00
Michal Nowak 344b95d8fc Add Fedora 35
(cherry picked from commit 668be42965)
2021-12-17 15:41:38 +01:00
Michal Nowak 905d51fe79 Merge branch 'mnowak/drop-freebsd-11-v9_16' into 'v9_16'
[v9_16] Drop FreeBSD 11

See merge request isc-projects/bind9!5654
2021-12-17 12:02:16 +00:00
Michal Nowak 937dcbaac8 Drop FreeBSD 11
Support for FreeBSD 11.4, the last FreeBSD 11.x release, ended on
September 30, 2021.

The "--with-readline" ./configure option has been added to gcc:sid:amd64
CI job; otherwise, it would be lost with the FreeBSD 11 removal.

Link: https://www.freebsd.org/security/unsupported/
(cherry picked from commit 981579f379)
2021-12-17 12:53:21 +01:00
Michal Nowak 765750bc39 Merge branch 'mnowak/alpine-3.15-v9_16' into 'v9_16'
[v9_16] Add Alpine Linux 3.15

See merge request isc-projects/bind9!5651
2021-12-16 16:02:46 +00:00
Michal Nowak e0a80d64c9 Add Alpine Linux 3.15
(cherry picked from commit d43127a387)
2021-12-16 16:54:37 +01:00
Petr Špaček 39fca4f220 Merge branch 'pspacek/ci-api-triggers-v9_16' into 'v9_16'
Enable regular pipeline jobs to be triggered from Gitlab API [v9_16]

See merge request isc-projects/bind9!5649
2021-12-16 15:22:05 +00:00
Petr Špaček d6fd1d7172 Enable regular pipeline jobs to be triggered from Gitlab API
(cherry picked from commit eb8c8753ad)
2021-12-16 16:20:23 +01:00
Petr Špaček b3fb70cf67 Merge branch 'v9_16_24-release' into 'v9_16'
Merge 9.16.24 release branch

See merge request isc-projects/bind9!5645
2021-12-16 12:36:10 +00:00
Petr Špaček d9d6c0ba66 Set up release notes for BIND 9.16.25 2021-12-16 13:29:31 +01:00
Petr Špaček bd3201c799 Merge branch 'prep-release' into 'v9_16_24-release'
prep 9.16.24

See merge request isc-private/bind9!340
2021-12-16 13:29:06 +01:00
Petr Špaček 8ef5147598 Merge branch 'michal/prepare-documentation-for-bind-9.16.24' into 'v9_16_24-release'
Prepare documentation for BIND 9.16.24

See merge request isc-private/bind9!339
2021-12-16 13:29:06 +01:00
Petr Špaček 0eb9e59610 prep 9.16.24 2021-12-16 13:29:06 +01:00
Michał KępieńandPetr Špaček 7a88254d2c Prepare release notes for BIND 9.16.24 2021-12-16 13:29:04 +01:00
Michał KępieńandPetr Špaček 8cbdef4591 Add release note for GL #853 2021-12-16 13:28:39 +01:00
Michał KępieńandPetr Špaček d30ad03361 Tweak and reword release notes 2021-12-16 13:27:30 +01:00
Ondřej Surý 885df6ff32 Merge branch '2398-reduce-memory-used-by-mempools-v9_16' into 'v9_16'
Replace locked mempools with memory contexts

See merge request isc-projects/bind9!5637
2021-12-15 20:42:50 +00:00
Ondřej Surý 16aabacc80 Add CHANGES and release notes for [GL #2398] 2021-12-15 21:23:25 +01:00
Ondřej Surý 1f7d2d53f0 Disable the internal memory allocator by default
For small sized allocations, the internal allocator gets the memory in
bigger blobs that gets splits into right-sized chunks.  This increases
speed of small allocations and reduced the fragmentation, but such
memory is never released back to the operating system.

Disable the internal allocator by default, and add new `-M internal`
command line option to `named`.
2021-12-15 13:29:19 +01:00
Ondřej Surý c96b6eb5ec Don't use mem freelists for isc_mempools
Previously, with BIND 9 internal allocator, when isc_mempool_put() would
return memory to the allocator, it would not be freed, but it would be
returned to the "freelists" and the memory would not be released to the
operating system.

Change the isc_mempool_get() and isc_mempool_put() to avoid the internal
allocator (mem_getunlocked() and mem_putunlocked()).
2021-12-15 13:29:19 +01:00
Ondřej Surý c5b703d1c6 Adjust the fillcount and freemax for dns_message mempools
According to the measurements (recorded on GL!5085), the fillcount of 2
for namepool and fillcount of 4 for rdspool can fit 99.99% of request
for tested scenarios.

This was discovered by perf recording the single second recursive test
using flamethrower where the initial malloc lit up like a flare.
2021-12-15 13:29:19 +01:00
Ondřej Surý 6abebaaad9 Remove locking mechanism from the isc_mempool
Now, that all the locked mempools have been replaced with simple isc_mem
context, remove unused optional locking from isc_mempool API.
2021-12-15 13:29:19 +01:00
Ondřej Surý 974f2f6ace Replace locked mempools with memory contexts
Current mempools are kind of hybrid structures - they serve two
purposes:

 1. mempool with a lock is basically static sized allocator with
    pre-allocated free items

 2. mempool without a lock is a doubly-linked list of preallocated items

The first kind of usage could be easily replaced with jemalloc small
sized arena objects and thread-local caches.

The second usage not-so-much and we need to keep this (in
libdns:message.c) for performance reasons.
2021-12-15 13:29:19 +01:00
Michal Nowak 8decad467c Merge branch '2886-drop-cppcheck-v9_16' into 'v9_16'
[v9_16] Drop cppcheck CI job

See merge request isc-projects/bind9!5640
2021-12-14 14:39:21 +00:00
Michal Nowak 4f5d0ea1a2 Drop cppcheck CI job
Every cppcheck update brings the cost of addressing new false positives
in the BIND 9 source code while not reaping any benefits in case of
identified issues with the code.

(cherry picked from commit 654cc61bb9)
2021-12-14 15:10:30 +01:00
Michal Nowak aa1f5885ab Merge branch 'mnowak/drop-debian-softhsm-ci-jobs' into 'v9_16'
Drop Debian SoftHSM v2.4 CI jobs

See merge request isc-projects/bind9!5610
2021-12-14 11:58:53 +00:00
Michal Nowak a278145a48 Drop Debian SoftHSM v2.4 CI jobs
The base image is in the process of being upgraded from Debian Buster to
Debian Bullseye, which has SoftHSM v2.6, the same SoftHSM version we
already test PKCS#11 with on Fedora. We don't need to test with two
SoftHSM 2.6 versions, drop CI jobs running on the base image.
2021-12-14 12:33:52 +01:00
Ondřej Surý a1389327aa Merge branch 'matthijs-regen-configure-after-mr-5625' into 'v9_16'
Regenerate configure file

See merge request isc-projects/bind9!5630
2021-12-09 16:51:52 +00:00
Matthijs Mekking 8dd2038f13 Regenerate configure file
Commit 3c77a51f added a configure check for OPENSSL_cleanup. The
regenerated configure file should have been added to that commit.
2021-12-09 17:03:31 +01:00
3824 changed files with 44566 additions and 39652 deletions
+55
View File
@@ -0,0 +1,55 @@
name: "CodeQL"
on:
push:
branches: [ "bind-9.16", "bind-9.18", "main" ]
schedule:
- cron: '39 8 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install build dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libuv1-dev libssl-dev libnghttp2-dev libxml2-dev liblmdb-dev libjson-c-dev pkg-config autoconf automake autotools-dev libtool-bin libjemalloc-dev libedit-dev libcap-dev libidn2-dev libkrb5-dev libmaxminddb-dev zlib1g-dev python3-ply
version: 1.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
+50
View File
@@ -0,0 +1,50 @@
name: SonarCloud
on:
push:
branches: [ "bind-9.16", "bind-9.18", "main" ]
schedule:
- cron: '39 8 * * 3'
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install build dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libuv1-dev libssl-dev libnghttp2-dev libxml2-dev liblmdb-dev libjson-c-dev pkg-config autoconf automake autotools-dev libtool-bin libjemalloc-dev libedit-dev libcap-dev libidn2-dev libkrb5-dev libmaxminddb-dev zlib1g-dev python3-ply
version: 1.0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Run build-wrapper
run: |
autoreconf -fi
./configure
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make clean all
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
+4 -2
View File
@@ -52,6 +52,7 @@ __pycache__/
/stamp-h1
/test-driver
Makefile
Makefile.user
ans.run
gen.dSYM/
kyua.log
@@ -59,7 +60,8 @@ named.memstats
named.run
timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
/tsan
/util/check-make-install
# clangd index directory
/\.cache/
/\.*_clangd/
+460 -370
View File
File diff suppressed because it is too large Load Diff
+20
View File
@@ -0,0 +1,20 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build documentation in doc/arm/ with Sphinx
sphinx:
configuration: doc/arm/conf.py
# Build all formats
formats: all
# Explicitly set the version of Python and its requirements
python:
install:
- requirements: doc/arm/requirements.txt
+233
View File
@@ -0,0 +1,233 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: BIND 9
Upstream-Contact: Internet Systems Consortium, Inc. ("ISC") <info@isc.org>
Source: https://gitlab.isc.org/isc-projects/bind9/
#
# Build system, data files from tests, and misc cruft
#
Files: **/README
**/*.after*
**/*.bad
**/*.batch
**/*.before*
**/*.ccache
**/*.good
**/*.key
**/*.pem
**/*.private
**/*.raw
**/*.saved
**/*.zonelist
**/*dig.out*
**/Makefile
**/Makefile.*
**/expect
**/testdata/*
.github/*
.gitlab/*
AUTHORS
CHANGES
COPYRIGHT
CODE_OF_CONDUCT
CONTRIBUTING
HISTORY
Kyuafile
Makefile
Makefile.*
OPTIONS
README
bin/named/bind9.xsl
bin/named/bind9.xsl.h
bin/tests/bigtest/zones
bin/tests/optional/rbt_test.out
bin/tests/system/checkdstool/dig.bat
bin/tests/system/checkdstool/*.db
bin/tests/system/checkzone/zones/bad-caa-rr.db
bin/tests/system/checkzone/zones/bad1.db
bin/tests/system/checkzone/zones/crashzone.db
bin/tests/system/dnstap/large-answer.fstrm
bin/tests/system/formerr/nametoolong
bin/tests/system/formerr/noquestions
bin/tests/system/formerr/twoquestions
bin/tests/system/journal/ns1/managed-keys.bind.in
bin/tests/system/journal/ns1/managed-keys.bind.jnl.in
bin/tests/system/journal/ns2/managed-keys.bind.in
bin/tests/system/journal/ns2/managed-keys.bind.jnl.in
bin/tests/system/keepalive/expected
bin/tests/system/legacy/ns6/edns512.db.signed
bin/tests/system/legacy/ns7/edns512-notcp.db.signed
bin/tests/system/notify/ns4/named.port.in
bin/tests/system/nsupdate/commandlist
bin/tests/system/nsupdate/verylarge.in
bin/tests/system/org.isc.bind.system.plist
bin/tests/system/pipelined/input
bin/tests/system/pipelined/inputb
bin/tests/system/pipelined/ref
bin/tests/system/pipelined/refb
bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt
bin/tests/system/pkcs11/usepkcs11
bin/tests/system/rsabigexponent/ns2/dsset-example.in
bin/tests/system/run.gdb
bin/tests/system/runtime/ctrl-chars
bin/tests/system/runtime/long-cmd-line
bin/tests/system/statschannel/traffic.expect.1
bin/tests/system/statschannel/traffic.expect.2
bin/tests/system/statschannel/traffic.expect.4
bin/tests/system/statschannel/traffic.expect.5
bin/tests/system/statschannel/traffic.expect.6
bin/tests/system/tcp/1996-alloc_dnsbuf-crash-test.pkt
bin/tests/system/tsig/badlocation
bin/tests/system/tsig/badtime
bin/tests/system/unknown/large.out
bin/tests/system/xfer/ans5/badkeydata
bin/tests/system/xfer/ans5/badmessageid
bin/tests/system/xfer/ans5/goodaxfr
bin/tests/system/xfer/ans5/partial
bin/tests/system/xfer/ans5/soamismatch
bin/tests/system/xfer/ans5/unknownkey
bin/tests/system/xfer/ans5/unsigned
bin/tests/system/xfer/ans5/wrongkey
bin/tests/system/xfer/ans5/wrongname
bin/tests/system/xfer/knowngood.mapped
bind.keys
cocci/*.cocci
cocci/*.disabled
cocci/*.spatch
doc/arm/isc-logo.pdf
doc/arm/requirements.txt
doc/man/*.1in
doc/man/*.5in
doc/man/*.8in
fuzz/*.in/*
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: MPL-2.0
#
# Libtool Files
#
Files: aclocal.m4
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/ltversion.m4
m4/lt~obsolete.m4
Copyright: Free Software Foundation, Inc.
License: GPL-3.0-or-later WITH Autoconf-exception-3.0
#
# DNSSEC Guide images
#
Files: doc/dnssec-guide/img/*.png
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: MPL-2.0
#
# DLZ Modules
#
Files: contrib/dlz/modules/*/testing/*
Copyright: Internet Systems Consortium, Inc. ("ISC")
Stichting NLnet, Netherlands
License: ISC and MPL-2.0
#
# Stuff that's basically uncopyrightable (configuration, generated files),
# use CC0-1.0 for clarity that we don't care
#
Files: **/.clang-format
**/.clang-format.headers
**/.dir-locals.el
**/.gitattributes
**/.gitignore
**/named*.args
**/named.dropedns
**/named.ednsformerr
**/named.ednsnotimp
**/named.ednsrefused
**/named.maxudp1460
**/named.maxudp512
**/named.noaa
**/named.noedns
**/named.nosoa
**/named.notcp
**/startme
.clang-format
.clang-format.headers
.dir-locals.el
.gitattributes
.gitignore
.gitlab-ci.yml
.lgtm.yml
.pylintrc
.readthedocs.yaml
.tsan-suppress
.uncrustify.cfg
config.guess
config.h.in
config.h.win32
config.threads.in
config.sub
configure
bin/tests/system/dlz/ns1/dns-root/*
doc/misc/*.zoneopt
doc/misc/options
doc/misc/options.active
install-sh
lib/dns/mapapi
mkinstalldirs
util/suppressions.txt
version
sonar-project.properties
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
#
# geoip2 test files (mmdb is generated from json)
#
Files: bin/tests/system/geoip2/data/*.json
bin/tests/system/geoip2/data/*.mmdb
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
#
# files that may be left over from other branches.
#
# in a newly cloned branch or after running "git clean", these
# files don't exist, but they can be left lying around after
# checking out an older branch. we explicitly ignore them so they
# won't clutter up the output when running "reuse lint" by hand
# in a working source tree.
#
Files: **/platform.h
bin/tests/system/*.log
bin/tests/system/*.trs
fuzz/*.log
fuzz/*.trs
lib/*/tests/*.log
lib/*/tests/*.trs
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
#
# Windows build system
#
Files: **/*.def
**/*.def.in
**/*.sln
**/*.sln.in
**/*.vcxproj.filters
**/*.vcxproj.filters.in
**/*.vcxproj
**/*.vcxproj.in
**/*.vcxproj.user
bin/win32/BINDInstall/BINDInstall.rc
bin/win32/BINDInstall/res/BINDInstall.ico
bin/win32/BINDInstall/res/BINDInstall.rc2
contrib/dlz/example/win32/dxdriver.dsp
contrib/dlz/example/win32/dxdriver.dsw
contrib/dlz/example/win32/dxdriver.mak
win32utils/GeoIP.diff
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
+16
View File
@@ -0,0 +1,16 @@
{% for copyright_line in copyright_lines %}
{{ copyright_line }}
{% endfor %}
{% for expression in spdx_expressions %}
SPDX-License-Identifier: {{ expression }}
{% endfor %}
{% if "MPL-2.0" in spdx_expressions %}
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
{% endif %}
+545
View File
@@ -1,7 +1,552 @@
--- 9.16.43 released ---
6212. [bug] Don't process detach and close netmgr events when
the netmgr has been paused. [GL #4200]
--- 9.16.42 released ---
6192. [security] A query that prioritizes stale data over lookup
triggers a fetch to refresh the stale data in cache.
If the fetch is aborted for exceeding the recursion
quota, it was possible for 'named' to enter an infinite
callback loop and crash due to stack overflow. This has
been fixed. (CVE-2023-2911) [GL #4089]
6190. [security] Improve the overmem cleaning process to prevent the
cache going over the configured limit. (CVE-2023-2828)
[GL #4055]
6183. [bug] Fix a serve-stale bug where a delegation from cache
could be returned to the client. [GL #3950]
6173. [bug] Properly process extra "nameserver" lines in
resolv.conf otherwise the next line is not properly
processed. [GL #4066]
6169. [bug] named could crash when deleting inline-signing zones
with "rndc delzone". [GL #4054]
--- 9.16.41 released ---
6157. [bug] When removing delegations in an OPTOUT range
empty-non-terminal NSEC3 records generated by
those delegations were not removed. [GL #4027]
--- 9.16.40 released ---
6142. [bug] Reduce the number of dns_dnssec_verify calls made
determining if revoked keys needs to be removed from
the trust anchors. [GL #3981]
6138. [doc] Fix the DF-flag documentation on the outgoing
UDP packets. [GL #3710]
6132. [doc] Remove a dead link in the DNSSEC guide. [GL #3967]
6129. [cleanup] Value stored to 'source' during its initialization is
never read. [GL #3965]
6124. [bug] When changing from a NSEC3 capable DNSSEC algorithm to
an NSEC3 incapable DNSSEC algorithm using KASP the zone
could sometimes be incompletely signed. [GL #3937]
5741. [bug] Log files with "timestamp" suffixes could be left in
place after rolling, even if the number of preserved
log files exceeded the configured "versions" limit.
[GL #828] [GL #3959]
--- 9.16.39 released ---
6119. [bug] Make sure to revert the reconfigured zones to the
previous version of the view, when the new view
reconfiguration fails during the configuration of
one of the configured zones. [GL #3911]
6116. [bug] Fix error path cleanup issue in the dns_catz_new_zones()
function. [GL #3900]
6115. [bug] Unregister db update notify callback before detaching
from the previous db inside the catz update notify
callback. [GL #3777]
6105. [bug] Detach 'rpzs' and 'catzs' from the previous view in
configure_rpz() and configure_catz(), respectively,
just after attaching it to the new view. [GL #3880]
6098. [test] Don't test HMAC-MD5 when not supported by libcrypto.
[GL #3871]
6095. [test] Test various 'islands of trust' configurations when
using managed keys. [GL #3662]
6094. [bug] Building against (or running with) libuv versions
1.35.0 and 1.36.0 is now a fatal error. The rules for
mixing and matching compile-time and run-time libuv
versions have been tightened for libuv versions between
1.35.0 and 1.40.0. [GL #3840]
--- 9.16.38 released ---
6083. [bug] Fix DNSRPS-enabled builds as they were inadvertently
broken by change 6042. [GL #3827]
6081. [bug] Handle primary server address lookup failures in
nsupdate more gracefully. [GL #3830]
6080. [bug] 'named -V' leaked memory. [GL #3829]
6079. [bug] Force set the DS state after a 'rdnc dnssec -checkds'
command. [GL #3822]
6075. [bug] Add missing node lock when setting node->wild in
add_wildcard_magic. [GL #3799]
6072. [bug] Avoid the OpenSSL lock contention when initializing
Message Digest Contexts by using explicit algorithm
fetching, initializing static contexts for every
supported algorithms, and initializing the new context
by copying the static copy. [GL #3795]
6069. [bug] Detach from the view in zone_shutdown() to
release the memory held by the dead view
early. [GL #3801]
--- 9.16.37 released ---
6067. [security] Fix serve-stale crash when recursive clients soft quota
is reached. (CVE-2022-3924) [GL #3619]
6066. [security] Handle RRSIG lookups when serve-stale is active.
(CVE-2022-3736) [GL #3622]
6064. [security] An UPDATE message flood could cause named to exhaust all
available memory. This flaw was addressed by adding a
new "update-quota" statement that controls the number of
simultaneous UPDATE messages that can be processed or
forwarded. The default is 100. A stats counter has been
added to record events when the update quota is
exceeded, and the XML and JSON statistics version
numbers have been updated. (CVE-2022-3094) [GL #3523]
6062. [func] The DSCP implementation, which has only been
partly operational since 9.16.0, is now marked as
deprecated. Configuring DSCP values in named.conf
will cause a warning will be logged. [GL #3773]
6060. [bug] Fix a use-after-free bug in dns_zonemgr_releasezone()
by detaching from the zone manager outside of the write
lock. [GL #3768]
6059. [bug] In some serve stale scenarios, like when following an
expired CNAME record, named could return SERVFAIL if the
previous request wasn't successful. Consider non-stale
data when in serve-stale mode. [GL #3678]
6058. [bug] Prevent named from crashing when "rndc delzone"
attempts to delete a zone added by a catalog zone.
[GL #3745]
6050. [bug] Changes to the RPZ response-policy min-update-interval
and add-soa options now take effect as expected when
named is reconfigured. [GL #3740]
6048. [bug] Fix a log message error in dns_catz_update_from_db(),
where serials with values of 2^31 or larger were logged
incorrectly as negative numbers. [GL #3742]
6045. [cleanup] The list of supported DNSSEC algorithms changed log
level from "warning" to "notice" to match named's other
startup messages. [GL !7217]
6044. [bug] There was an "RSASHA236" typo in a log message.
[GL !7206]
5845. [bug] Refactor the timer to keep track of posted events
as to use isc_task_purgeevent() instead of using
isc_task_purgerange(). The isc_task_purgeevent()
has been refactored to purge a single event instead
of walking through the list of posted events.
[GL #3252]
--- 9.16.36 released ---
6043. [bug] The key file IO locks objects would never get
deleted from the hashtable due to off-by-one error.
[GL #3727]
6042. [bug] ANY responses could sometimes have the wrong TTL.
[GL #3613]
6040. [bug] Speed up the named shutdown time by explicitly
canceling all recursing ns_client objects for
each ns_clientmgr. [GL #3183]
6039. [bug] Removing a catalog zone from catalog-zones without
also removing the referenced zone could leave a
dangling pointer. [GL #3683]
6031. [bug] Move the "final reference detached" log message
from dns_zone unit to the DEBUG(1) log level.
[GL #3707]
6024. [func] Deprecate 'auto-dnssec'. [GL #3667]
6021. [bug] Use the current domain name when checking answers from
a dual-stack-server. [GL #3607]
6020. [bug] Ensure 'named-checkconf -z' respects the check-wildcard
option when loading a zone. [GL #1905]
6017. [bug] The view's zone table was not locked when it should
have been leading to race conditions when external
extensions that manipulate the zone table where in
use. [GL #3468]
--- 9.16.35 released ---
6013. [bug] Fix a crash that could happen when you change
a dnssec-policy zone with NSEC3 to start using
inline-signing. [GL #3591]
6009. [bug] Don't trust a placeholder KEYDATA from the managed-keys
zone by adding it into secroots. [GL #2895]
6008. [bug] Fixed a race condition that could cause a crash
in dns_zone_synckeyzone(). [GL #3617]
6002. [bug] Fix a resolver prefetch bug when the record's TTL value
is equal to the configured prefetch eligibility value,
but the record was erroneously not treated as eligible
for prefetching. [GL #3603]
6001. [bug] Always call dns_adb_endudpfetch() after calling
dns_adb_beginudpfetch() for UDP queries in resolver.c,
in order to adjust back the quota. [GL #3598]
6000. [bug] Fix a startup issue on Solaris systems with many
(reportedly > 510) CPUs. Thanks to Stacey Marshall from
Oracle for deep investigation of the problem. [GL #3563]
5999. [bug] rpz-ip rules could be ineffective in some scenarios
with CD=1 queries. [GL #3247]
5998. [bug] The RecursClients statistics counter could overflow
in certain resolution scenarios. [GL #3584]
5996. [bug] Fix a couple of bugs in cfg_print_duration(), which
could result in generating incomplete duration values
when printing the configuration using named-checkconf.
[GL !6880]
--- 9.16.34 released ---
5991. [protocol] Add support for parsing and validating "dohpath" to
SVCB. [GL #3544]
5988. [bug] Some out of memory conditions in opensslrsa_link.c
could lead to memory leaks. [GL #3551]
5984. [func] 'named -V' now reports the list of supported
DNSSEC/DS/HMAC algorithms and the supported TKEY modes.
[GL #3541]
5983. [bug] Changing just the TSIG key names for primaries in
catalog zones' member zones was not effective.
[GL #3557]
5973. [bug] Fixed a possible invalid detach in UPDATE
processing. [GL #3522]
5963. [bug] Ensure struct named_server is properly initialized.
[GL #6531]
5921. [test] Convert system tests to use a default DNSKEY algorithm
where the test is not DNSKEY algorithm specific.
[GL #3440]
--- 9.16.33 released ---
5962. [security] Fix memory leak in EdDSA verify processing.
(CVE-2022-38178) [GL #3487]
5961. [security] Fix memory leak in ECDSA verify processing.
(CVE-2022-38177) [GL #3487]
5960. [security] Fix serve-stale crash that could happen when
stale-answer-client-timeout was set to 0 and there was
a stale CNAME in the cache for an incoming query.
(CVE-2022-3080) [GL #3517]
5957. [security] Prevent excessive resource use while processing large
delegations. (CVE-2022-2795) [GL #3394]
5956. [func] Make RRL code treat all QNAMEs that are subject to
wildcard processing within a given zone as the same
name. [GL #3459]
5955. [port] The libxml2 library has deprecated the usage of
xmlInitThreads() and xmlCleanupThreads() functions. Use
xmlInitParser() and xmlCleanupParser() instead.
[GL #3518]
5954. [func] Fallback to IDNA2003 processing in dig when IDNA2008
conversion fails. [GL #3485]
5953. [bug] Fix a crash on shutdown in delete_trace_entry(). Add
mctx attach/detach pair to make sure that the memory
context used by a memory pool is not destroyed before
the memory pool itself. [GL #3515]
5952. [bug] Use quotes around address strings in YAML output.
[GL #3511]
5951. [bug] In some cases, the dnstap query_message field was
erroneously set when logging response messages.
[GL #3501]
5948. [bug] Fix nsec3.c:dns_nsec3_activex() function, add a missing
dns_db_detachnode() call. [GL #3500]
5945. [bug] If parsing /etc/bind.key failed, delv could assert
when trying to parse the built in trust anchors as
the parser hadn't been reset. [GL !6468]
5942. [bug] Fix tkey.c:buildquery() function's error handling by
adding the missing cleanup code. [GL #3492]
5941. [func] Zones with dnssec-policy now require dynamic DNS or
inline-siging to be configured explicitly. [GL #3381]
5936. [bug] Don't enable serve-stale for lookups that error because
it is a duplicate query or a query that would be
dropped. [GL #2982]
--- 9.16.32 released ---
5934. [func] Improve fetches-per-zone fetch limit logging to log
the final allowed and spilled values of the fetch
counters before the counter object gets destroyed.
[GL #3461]
5933. [port] Automatically disable RSASHA1 and NSEC3RSASHA1 in
named on Fedorda 33, Oracle Linux 9 and RHEL9 when
they are disabled by the security policy. [GL #3469]
5932. [bug] Fix rndc dumpdb -expired and always include expired
RRsets, not just for RBTDB_VIRTUAL time window.
[GL #3462]
5929. [bug] The "max-zone-ttl" option in "dnssec-policy" was
not fully effective; it was used for timing key
rollovers but did not actually place an upper limit
on TTLs when loading a zone. This has been
corrected, and the documentation has been clarified
to indicate that the old "max-zone-ttl" zone option
is now ignored when "dnssec-policy" is in use.
[GL #2918]
5924. [func] When it's necessary to use AXFR to respond to an
IXFR request, a message explaining the reason
is now logged at level info. [GL #2683]
5923. [bug] Fix inheritance for dnssec-policy when checking for
inline-signing. [GL #3438]
5922. [bug] Forwarding of UPDATE message could fail with the
introduction of netmgr. This has been fixed. [GL #3389]
--- 9.16.31 released ---
5917. [bug] Update ifconfig.sh script as is miscomputed interface
identifiers when destroying interfaces. [GL #3061]
5915. [bug] Detect missing closing brace (}) and computational
overflows in $GENERATE directives. [GL #3429]
5913. [bug] Fix a race between resolver query timeout and
validation in resolver.c:validated(). Remove
resolver.c:maybe_destroy() as it is no loger needed.
[GL #3398]
5909. [bug] The server-side destination port was missing from dnstap
captures of client traffic. [GL #3309]
5905. [bug] When the TCP connection would be closed/reset between
the connect/accept and the read, the uv_read_start()
return value would be unexpected and cause an assertion
failure. [GL #3400]
5903. [bug] When named checks that the OPCODE in a response matches
that of the request, if there is a mismatch named logs
an error. Some of those error messages incorrectly
used RCODE instead of OPCODE to lookup the nemonic.
This has been corrected. [GL !6420]
--- 9.16.30 released ---
5899. [func] Don't try to process DNSSEC-related and ZONEMD records
in catz. [GL #3380]
5890. [bug] When the fetches-per-server quota was adjusted
because of an authoritative server timing out more
or less frequently, it was incorrectly set to 1
rather than the intended value. This has been
fixed. [GL #3327]
5888. [bug] Only write key files if the dnssec-policy keymgr has
changed the metadata. [GL #3302]
5823. [func] Replace hazard pointers based lock-free list with
locked-list based queue that's simpler and has no or
little performance impact. [GL #3180]
--- 9.16.29 released ---
5885. [bug] RPZ NSIP and NSDNAME rule processing didn't handle stub
and static-stub zones at or above the query name. This
has now been addressed. [GL #3232]
5881. [bug] dig +nssearch could hang in rare cases when recv_done()
callback was being called earlier than send_done().
[GL #3278]
5880. [func] Add new named command-line option -C to print built-in
defaults. [GL #1326]
5879. [contrib] dlz: Add FALLTHROUGH and UNREACHABLE macros. [GL #3306]
5874. [bug] keymgr didn't work with python 3.11. [GL !6157]
5866. [bug] Work around a jemalloc quirk which could trigger an
out-of-memory condition in named over time. [GL #3287]
5863. [bug] If there was a pending negative cache DS entry,
validations depending upon it could fail. [GL #3279]
5858. [bug] Don't remove CDS/CDNSKEY DELETE records on zone sign
when using 'auto-dnssec maintain;'. [GL #2931]
--- 9.16.28 released ---
5856. [bug] The "starting maxtime timer" message related to outgoing
zone transfers was incorrectly logged at the ERROR level
instead of DEBUG(1). [GL #3208]
5852. [func] Add new "reuseport" option to enable/disable load
balancing of sockets. [GL #3249]
5843. [bug] When an UPDATE targets a zone that is not configured,
the requested zone name is now logged in the "not
authoritative" error message, so that it is easier to
track down problematic update clients. [GL #3209]
5836. [bug] Quote the dns64 prefix in error messages that complain
about problems with it, to avoid confusion with the
following dns64 ACLs. [GL #3210]
5834. [cleanup] C99 variable-length arrays are difficult to use safely,
so avoid them except in test code. [GL #3201]
5828. [bug] Replace single TCP write timer with per-TCP write
timers. [GL #3200]
5824. [bug] Invalid dnssec-policy definitions were being accepted
where the defined keys did not cover both KSK and ZSK
roles for a given algorithm. This is now checked for
and the dnssec-policy is rejected if both roles are
not present for all algorithms in use. [GL #3142]
--- 9.16.27 released ---
5818. [security] A synchronous call to closehandle_cb() caused
isc__nm_process_sock_buffer() to be called recursively,
which in turn left TCP connections hanging in the
CLOSE_WAIT state blocking indefinitely when
out-of-order processing was disabled. (CVE-2022-0396)
[GL #3112]
5817. [security] The rules for acceptance of records into the cache
have been tightened to prevent the possibility of
poisoning if forwarders send records outside
the configured bailiwick. (CVE-2021-25220) [GL #2950]
5816. [bug] Make BIND compile with LibreSSL 3.5.0, as it was using
not very accurate pre-processor checks for using shims.
[GL #3172]
5815. [bug] If an oversized key name of a specific length was used
in the text form of an HTTP or SVBC record, an INSIST
could be triggered when parsing it. [GL #3175]
5814. [bug] The RecursClients statistics counter could underflow
in certain resolution scenarios. [GL #3147]
5811. [bug] Reimplement the maximum and idle timeouts for outgoing
zone transfers. [GL #1897]
5807. [bug] Add a TCP "write" timer, and time out writing
connections after the "tcp-idle-timeout" period
has elapsed. [GL #3132]
5804. [func] Add a debug log message when starting and ending
the task exclusive mode. [GL #3137]
--- 9.16.26 released ---
5801. [bug] Log "quota reached" message when hard quota
is reached when accepting a connection. [GL #3125]
5800. [func] Add ECS support to the DLZ interface. [GL #3082]
5797. [bug] A failed view configuration during a named
reconfiguration procedure could cause inconsistencies
in BIND internal structures, causing a crash or other
unexpected errors. [GL #3060]
5795. [bug] rndc could crash when interrupted by a signal
before receiving a response. [GL #3080]
5793. [bug] Correctly detect and enable UDP recvmmsg support
in all versions of libuv that support it. [GL #3095]
--- 9.16.25 released ---
5789. [bug] Allow replacing expired zone signatures with
signatures created by the KSK. [GL #3049]
5788. [bug] An assertion could occur if a catalog zone event was
scheduled while the task manager was being shut
down. [GL #3074]
5787. [doc] Update 'auto-dnssec' documentation, it may only be
activated at zone level. [GL #3023]
5786. [bug] Defer detaching from zone->raw in zone_shutdown() if
the zone is in the process of being dumped to disk, to
ensure that the unsigned serial number information is
always written in the raw-format header of the signed
version on an inline-signed zone. [GL #3071]
5785. [bug] named could leak memory when two dnssec-policy clauses
had the same name. named failed to log this error.
[GL #3085]
5776. [bug] Add a missing isc_condition_destroy() for nmsocket
condition variable and add missing isc_mutex_destroy()
for nmworker lock. [GL #3051]
5676. [func] Memory use in named was excessive. This has been
addressed by:
- Replacing locked memory pools with normal memory
allocations.
- Reducing the number of retained free items in
unlocked memory pools.
- Disabling the internal allocator by default.
"named -M internal" turns it back on.
[GL #2398]
--- 9.16.24 released ---
5773. [func] Change the message when accepting TCP connection has
failed to say "Accepting TCP connection failed" and
change the log level for ISC_R_NOTCONNECTED, ISC_R_QUOTA
+13
View File
@@ -1,3 +1,16 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
# BIND 9 Code of Conduct
Like the technical community as a whole, the BIND 9 team and community is made
+4 -4
View File
@@ -57,14 +57,14 @@ To clone the repository, use:
$ git clone https://gitlab.isc.org/isc-projects/bind9.git
Release branch names are of the form v9_X, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.12
Release branch names are of the form bind-9.X, where X represents the
second number in the BIND 9 version number. So, to check out the BIND 9.18
branch, use:
$ git checkout v9_12
$ git checkout bind-9.18
Whenever a branch is ready for publication, a tag is placed of the form
v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0.
v9.X.Y. The 9.18.0 release, for instance, is tagged as v9.18.0.
The branch in which the next major release is being developed is called
main.
+14 -12
View File
@@ -1,12 +1,14 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
## BIND 9 Source Access and Contributor Guidelines
*May 28, 2020*
@@ -69,14 +71,14 @@ To clone the repository, use:
> $ git clone https://gitlab.isc.org/isc-projects/bind9.git
Release branch names are of the form `v9_X`, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.12
Release branch names are of the form `bind-9.X`, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.18
branch, use:
> $ git checkout v9_12
> $ git checkout bind-9.18
Whenever a branch is ready for publication, a tag is placed of the
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
form `v9.X.Y`. The 9.18.0 release, for instance, is tagged as `v9.18.0`.
The branch in which the next major release is being developed is called
`main`.
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 1996-2021 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2023 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
+3 -3
View File
@@ -39,9 +39,9 @@ built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is no longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
removed; see the doc/arm/platforms.rst file for details of supported
platforms. In addition to OpenSSL, BIND now requires support for IPv6,
threads, and standard atomic operations provided by the C compiler.
BIND 9.12
+1 -1
View File
@@ -47,7 +47,7 @@ Cryptography is now mandatory: building BIND without DNSSEC is no
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
been removed; see the [doc/arm/platforms.rst](platforms) file for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
+11
View File
@@ -1,3 +1,14 @@
-- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
--
-- SPDX-License-Identifier: MPL-2.0
--
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, you can obtain one at https://mozilla.org/MPL/2.0/.
--
-- See the COPYRIGHT file distributed with this work for additional
-- information regarding copyright ownership.
syntax(2)
test_suite('bind9')
+1 -1
View File
@@ -346,7 +346,7 @@ Exhibit A - Source Code Form License Notice
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file,
then You may include the notice in a location (such as a LICENSE file in a
+73
View File
@@ -0,0 +1,73 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+26
View File
@@ -0,0 +1,26 @@
AUTOCONF CONFIGURE SCRIPT EXCEPTION
Version 3.0, 18 August 2009
Copyright © 2009 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This Exception is an additional permission under section 7 of the GNU General Public License, version 3 ("GPLv3"). It applies to a given file that bears a notice placed by the copyright holder of the file stating that the file is governed by GPLv3 along with this Exception.
The purpose of this Exception is to allow distribution of Autoconf's typical output under terms of the recipient's choice (including proprietary).
0. Definitions.
"Covered Code" is the source or object code of a version of Autoconf that is a covered work under this License.
"Normally Copied Code" for a version of Autoconf means all parts of its Covered Code which that version can copy from its code (i.e., not from its input file) into its minimally verbose, non-debugging and non-tracing output.
"Ineligible Code" is Covered Code that is not Normally Copied Code.
1. Grant of Additional Permission.
You have permission to propagate output of Autoconf, even if such propagation would otherwise violate the terms of GPLv3. However, if by modifying Autoconf you cause any Ineligible Code of the version you received to become Normally Copied Code of your modified version, then you void this Exception for the resulting covered work. If you convey that resulting covered work, you must remove this Exception in accordance with the second paragraph of Section 7 of GPLv3.
2. No Weakening of Autoconf Copyleft.
The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of Autoconf.
+9
View File
@@ -0,0 +1,9 @@
Copyright (c) <year> <owner> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+11
View File
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+121
View File
@@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
+1
View File
@@ -0,0 +1 @@
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
+232
View File
@@ -0,0 +1,232 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
+8
View File
@@ -0,0 +1,8 @@
ISC License:
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
Copyright (c) 1995-2003 by Internet Software Consortium
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+15
View File
@@ -0,0 +1,15 @@
---- LLVM Exceptions to the Apache 2.0 License ----
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into an Object form of such source code, you
may redistribute such embedded portions in such Object form without complying
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
In addition, if you combine or link compiled forms of this Software with
software that is licensed under the GPLv2 ("Combined Software") and if a
court of competent jurisdiction determines that the patent provision (Section
3), the indemnity provision (Section 9) or other Section of the License
conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.
+9
View File
@@ -0,0 +1,9 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+144
View File
@@ -0,0 +1,144 @@
Mozilla Public License Version 2.0
1. Definitions
1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution" means Covered Software of a particular Contributor.
1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
1.5. "Incompatible With Secondary Licenses" means
(a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.
1.6. "Executable Form" means any form of the work other than Source Code Form.
1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
1.8. "License" means this document.
1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
1.10. "Modifications" means any of the following:
(a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
(b) any new file in Source Code Form that contains any Covered Software.
1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
1.13. "Source Code Form" means the form of the work preferred for making modifications.
1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:
(a) for any code that a Contributor has removed from Covered Software; or
(b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or
(c) under Patent Claims infringed by Covered Software in the absence of its Contributions.
This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).
3.4. Notices
You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
6. Disclaimer of Warranty
Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
8. Litigation
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
+5 -8
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
@@ -21,7 +23,7 @@ SUBDIRS = make lib fuzz bin doc
TARGETS =
PREREQS = bind.keys.h
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT
MANOBJS = README HISTORY OPTIONS CONTRIBUTING CODE_OF_CONDUCT
@BIND9_MAKE_RULES@
@@ -98,11 +100,6 @@ CONTRIBUTING: CONTRIBUTING.md
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md
${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
+10 -8
View File
@@ -1,12 +1,14 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
Setting the `STD_CDEFINES` environment variable before running `configure`
can be used to enable certain compile-time options that are not explicitly
-99
View File
@@ -1,99 +0,0 @@
PLATFORMS
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C11-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, the libuv
asynchronous I/O library, and the OpenSSL cryptography library.
The following C11 features are used in BIND 9:
* Atomic operations support from the compiler is needed, either in the
form of builtin operations, C11 atomics, or the Interlocked family of
functions on Windows.
* Thread Local Storage support from the compiler is needed, either in
the form of C11 _Thread_local/thread_local, the __thread GCC
extension, or the __declspec(thread) MSVC extension on Windows.
BIND 9.16 requires a fairly recent version of libuv (at least 1.x). For
some of the older systems listed below, you will have to install an
updated libuv package from sources such as EPEL, PPA, or other native
sources for updated packages. The other option is to build and install
libuv from source.
Certain optional BIND features have additional library dependencies. These
include libxml2 and libjson-c for statistics, libmaxminddb for
geolocation, libfstrm and libprotobuf-c for DNSTAP, and libidn2 for
internationalized domain name conversion.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
Regularly tested platforms
As of Oct 2021, BIND 9.16 is fully supported and regularly tested on the
following systems:
* Debian 9, 10, 11
* Ubuntu LTS 18.04, 20.04
* Fedora 34
* Red Hat Enterprise Linux / CentOS / Oracle Linux 7, 8
* FreeBSD 11.4, 12.2, 13.0
* OpenBSD 7.0
* Alpine Linux 3.14
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run. ISC
makes every effort to fix bugs on these platforms, but may be unable to do
so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2016, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
+ Ubuntu 20.10+
+ Gentoo
+ Arch Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
Community maintained
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
* Platforms past or close to their respective EOL dates, such as:
+ Ubuntu 14.04, 16.04 (Ubuntu ESM releases are not supported)
+ CentOS 6
+ Debian Jessie
+ FreeBSD 10.x
Unsupported platforms
These are platforms on which BIND 9.16 is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
* Platforms on which libuv cannot be compiled
-105
View File
@@ -1,105 +0,0 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C11-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, the `libuv` asynchronous I/O library,
and the OpenSSL cryptography library.
The following C11 features are used in BIND 9:
* Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics, or the `Interlocked` family of functions on
Windows.
* Thread Local Storage support from the compiler is needed, either in the form
of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or
the `__declspec(thread)` MSVC extension on Windows.
BIND 9.16 requires a fairly recent version of `libuv` (at least 1.x). For
some of the older systems listed below, you will have to install an updated
`libuv` package from sources such as EPEL, PPA, or other native sources for
updated packages. The other option is to build and install `libuv` from
source.
Certain optional BIND features have additional library dependencies.
These include `libxml2` and `libjson-c` for statistics, `libmaxminddb` for
geolocation, `libfstrm` and `libprotobuf-c` for DNSTAP, and `libidn2` for
internationalized domain name conversion.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Oct 2021, BIND 9.16 is fully supported and regularly tested on the
following systems:
* Debian 9, 10, 11
* Ubuntu LTS 18.04, 20.04
* Fedora 34
* Red Hat Enterprise Linux / CentOS / Oracle Linux 7, 8
* FreeBSD 11.4, 12.2, 13.0
* OpenBSD 7.0
* Alpine Linux 3.14
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run.
ISC makes every effort to fix bugs on these platforms, but may be unable to
do so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2016, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
* Ubuntu 20.10+
* Gentoo
* Arch Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
### Community maintained
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
* Platforms past or close to their respective EOL dates, such as:
* Ubuntu 14.04, 16.04 (Ubuntu ESM releases are not supported)
* CentOS 6
* Debian Jessie
* FreeBSD 10.x
## Unsupported platforms
These are platforms on which BIND 9.16 is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
* Platforms on which `libuv` cannot be compiled
+6 -143
View File
@@ -51,7 +51,8 @@ the file CHANGES. See below for details on the CHANGES file format.
For up-to-date versions and release notes, see https://www.isc.org/
download/.
For information about supported platforms, see PLATFORMS.
For information about supported platforms, see the "Supported Platforms"
section in the BIND 9 Administrator Reference Manual.
Reporting bugs and getting help
@@ -126,148 +127,8 @@ from the 9.15 development branch, updating the previous stable branch,
Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. BIND also requires the
libuv asynchronous I/O library, and a cryptography provider library such
as OpenSSL or a hardware service module supporting PKCS#11. On Linux, BIND
requires the libcap library to set process privileges, though this
requirement can be overridden by disabling capability support at compile
time. See Compile-time options below for details on other libraries that
may be required to support optional features.
Successful builds have been observed on many versions of Linux and UNIX,
including RHEL/CentOS/Oracle Linux, Fedora, Debian, Ubuntu, SLES,
openSUSE, Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows Server 2012 R2 and higher. See
win32utils/build.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use:
$ ./configure
$ make
If you're planning on making changes to the BIND 9 source, you should run
make depend. If you're using Emacs, you might find make tags helpful.
Several environment variables that can be set before running configure
will affect compilation. Significant ones are:
Variable Description
CC The C compiler to use. configure tries to figure out the
right one for supported systems.
C compiler flags. Defaults to include -g and/or -O2 as
CFLAGS supported by the compiler. Please include '-g' if you need
to set CFLAGS.
System header file directories. Can be used to specify
STD_CINCLUDES where add-on thread or IPv6 support is, for example.
Defaults to empty string.
Any additional preprocessor symbols you want defined.
STD_CDEFINES Defaults to empty string. For a list of possible settings,
see the file OPTIONS.
LDFLAGS Linker flags. Defaults to empty string.
BUILD_CC Needed when cross-compiling: the native C compiler to use
when building for the target system.
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
BUILD_LIBS LIBS for the target system during cross-compiling.
Additional environment variables affecting the build are listed at the end
of the configure help text, which can be obtained by running the command:
$ ./configure --help
macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or,
if you have Xcode already installed, you can run xcode-select --install.
(Note that an Apple ID may be required to access the download page.)
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
argparse, ply and distutils.core modules to be available. argparse is a
standard module as of Python 2.7 and Python 3.2. ply is available from
https://pypi.python.org/pypi/ply. distutils.core is required for
installation.
Compile-time options
To see a full list of configuration options, run configure --help.
To build shared libraries, specify --with-libtool on the configure command
line.
For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location,
specify the prefix using --with-openssl=<PREFIX> on the configure command
line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
To support the HTTP statistics channel, the server must be linked with at
least one of the following libraries: libxml2 http://xmlsoft.org or json-c
https://github.com/json-c/json-c. If these are installed at a nonstandard
location, then:
* for libxml2, specify the prefix using --with-libxml2=/prefix,
* for json-c, adjust PKG_CONFIG_PATH.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using with-lmdb=/prefix.
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
with libmaxminddb. This is turned on by default if the library is found;
if the library is installed in a nonstandard location, specify the prefix
using --with-maxminddb=/prefix. GeoIP2 support can be switched off with
--disable-geoip.
For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https://
developers.google.com/protocol-buffers, and BIND must be configured with
--enable-dnstap.
Certain compiled-in constants and default settings can be decreased to
values better suited to small machines, e.g. OpenWRT boxes, by specifying
--with-tuning=small on the configure command line. This will decrease
memory usage by using smaller structures, but will degrade performance.
On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel package. Process capability support can also be disabled
by configuring with --disable-linux-caps.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
--enable-largefile on the configure command line.
Support for the "fixed" rrset-order option can be enabled or disabled by
specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
The --enable-querytrace option causes named to log every step of
processing every query. This should only be enabled when debugging,
because it has a significant negative impact on query performance.
make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure.
You may specify the option --sysconfdir to set the directory where
configuration files like named.conf go by default, and --localstatedir to
set the default parent directory of run/named.pid. --sysconfdir defaults
to $prefix/etc and --localstatedir defaults to $prefix/var.
For information about building BIND 9, see the "Building BIND 9" section
in the BIND 9 Administrator Reference Manual.
Automated testing
@@ -375,7 +236,9 @@ Acknowledgments
* This product includes software developed by the OpenSSL Project for
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
* This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com)
* This product includes software written by Tim Hudson
(tjh@cryptsoft.com)
+16 -152
View File
@@ -1,12 +1,14 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
# BIND 9
@@ -60,7 +62,9 @@ CHANGES file format.
For up-to-date versions and release notes, see
[https://www.isc.org/download/](https://www.isc.org/download/).
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
For information about supported platforms, see the
["Supported Platforms"](doc/arm/platforms.rst) section in the BIND 9
Administrator Reference Manual.
### <a name="help"/> Reporting bugs and getting help
@@ -142,149 +146,9 @@ branch, 9.14. New features include:
### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. BIND also requires the
`libuv` asynchronous I/O library, and a cryptography provider library
such as OpenSSL or a hardware service module supporting PKCS#11. On
Linux, BIND requires the `libcap` library to set process privileges,
though this requirement can be overridden by disabling capability
support at compile time. See [Compile-time options](#opts) below
for details on other libraries that may be required to support
optional features.
Successful builds have been observed on many versions of Linux and UNIX,
including RHEL/CentOS/Oracle Linux, Fedora, Debian, Ubuntu, SLES,
openSUSE, Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows Server 2012 R2 and higher. See
`win32utils/build.txt` for details on building for Windows
systems.
To build on a UNIX or Linux system, use:
$ ./configure
$ make
If you're planning on making changes to the BIND 9 source, you should run
`make depend`. If you're using Emacs, you might find `make tags` helpful.
Several environment variables that can be set before running `configure` will
affect compilation. Significant ones are:
|Variable|Description |
|--------------------|-----------------------------------------------|
|`CC`|The C compiler to use. `configure` tries to figure out the right one for supported systems.|
|`CFLAGS`|C compiler flags. Defaults to include -g and/or -O2 as supported by the compiler. Please include '-g' if you need to set `CFLAGS`. |
|`STD_CINCLUDES`|System header file directories. Can be used to specify where add-on thread or IPv6 support is, for example. Defaults to empty string.|
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
Additional environment variables affecting the build are listed at the
end of the `configure` help text, which can be obtained by running the
command:
$ ./configure --help
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from
[https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
or, if you have Xcode already installed, you can run `xcode-select
--install`. (Note that an Apple ID may be required to access the download
page.)
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the `argparse`, `ply` and `distutils.core` modules
to be available.
`argparse` is a standard module as of Python 2.7 and Python 3.2.
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
`distutils.core` is required for installation.
#### <a name="opts"/> Compile-time options
To see a full list of configuration options, run `configure --help`.
To build shared libraries, specify `--with-libtool` on the `configure`
command line.
For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix
using `--with-openssl=<PREFIX>` on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with `--enable-native-pkcs11`.
To support the HTTP statistics channel, the server must be linked with at
least one of the following libraries: `libxml2`
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
If these are installed at a nonstandard location, then:
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
* for `json-c`, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be
linked against `libzlib`. If this is installed in a nonstandard location,
specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
with `libmaxminddb`. This is turned on by default if the library is
found; if the library is installed in a nonstandard location,
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
can be switched off with `--disable-geoip`.
For DNSTAP packet logging, you must have installed `libfstrm`
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and `libprotobuf-c`
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
Certain compiled-in constants and default settings can be decreased to
values better suited to small machines, e.g. OpenWRT boxes, by specifying
`--with-tuning=small` on the `configure` command line. This will decrease
memory usage by using smaller structures, but will degrade performance.
On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` package. Process capability support can
also be disabled by configuring with `--disable-linux-caps`.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
`--enable-largefile` on the `configure` command line.
Support for the "fixed" rrset-order option can be enabled or disabled by
specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint.
The `--enable-querytrace` option causes `named` to log every step of
processing every query. This should only be enabled when debugging, because
it has a significant negative impact on query performance.
`make install` will install `named` and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
`--prefix` option when running `configure`.
You may specify the option `--sysconfdir` to set the directory where
configuration files like `named.conf` go by default, and `--localstatedir`
to set the default parent directory of `run/named.pid`. `--sysconfdir`
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`.
For information about building BIND 9, see the
["Building BIND 9"](doc/arm/build.rst) section in the BIND 9
Administrator Reference Manual.
### <a name="testing"/> Automated testing
+4 -2
View File
@@ -1,9 +1,11 @@
#!/bin/sh
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+9 -4
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -207,7 +209,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
*/
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL) {
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
@@ -409,7 +412,8 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
*/
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL) {
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
@@ -495,7 +499,8 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
*/
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL) {
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
@@ -605,7 +610,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
}
CHECK(result);
CHECK(dns_db_allrdatasets(db, node, version, 0, &rdsiter));
CHECK(dns_db_allrdatasets(db, node, version, 0, 0, &rdsiter));
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter))
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+21 -15
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -304,8 +306,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
@@ -324,8 +325,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKMX;
@@ -355,8 +355,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
@@ -375,8 +374,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
@@ -399,13 +397,23 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKSPF;
}
obj = NULL;
if (get_maps(maps, "check-wildcard", &obj)) {
if (cfg_obj_asboolean(obj)) {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
} else {
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
}
} else {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
}
obj = NULL;
if (get_checknames(maps, &obj)) {
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
@@ -418,8 +426,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKNAMES;
@@ -437,8 +444,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
}
@@ -683,7 +689,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
usage();
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+6 -4
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -144,8 +146,7 @@ main(int argc, char **argv) {
} else if (PROGCMP("named-compilezone")) {
progmode = progmode_compile;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
/* Compilation specific defaults */
@@ -423,7 +424,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
prog_name, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
usage();
@@ -472,7 +473,8 @@ main(int argc, char **argv) {
outputformat = dns_masterformat_raw;
rawversion = strtol(outputformatstr + 4, &end, 10);
if (end == outputformatstr + 4 || *end != '\0' ||
rawversion > 1U) {
rawversion > 1U)
{
fprintf(stderr, "unknown raw format version\n");
exit(1);
}
+30 -52
View File
@@ -1,38 +1,28 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also named-compilezone.rst!
.. _man_named-checkzone:
named-checkzone, named-compilezone - zone file validity checking or converting tool
-----------------------------------------------------------------------------------
named-checkzone - zone file validation tool
-------------------------------------------
Synopsis
~~~~~~~~
:program:`named-checkzone` [**-d**] [**-h**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-M** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-o** filename] [**-r** mode] [**-s** style] [**-S** mode] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {zonename} {filename}
:program:`named-compilezone` [**-d**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-C** mode] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-r** mode] [**-s** style] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {**-o** filename} {zonename} {filename}
Description
~~~~~~~~~~~
@@ -41,13 +31,6 @@ performs the same checks as ``named`` does when loading a zone. This
makes ``named-checkzone`` useful for checking zone files before
configuring them into a name server.
``named-compilezone`` is similar to ``named-checkzone``, but it always
dumps the zone contents to a specified file in a specified format.
It also applies stricter check levels by default, since the
dump output is used as an actual zone file loaded by ``named``.
When manually specified otherwise, the check levels must at least be as
strict as those specified in the ``named`` configuration file.
Options
~~~~~~~
@@ -103,8 +86,8 @@ Options
Mode ``none`` disables the checks.
``-f format``
This option specifies the format of the zone file. Possible formats are ``text``
(the default), ``raw``, and ``map``.
This option specifies the format of the zone file. Possible formats are
``text`` (the default), ``raw``, and ``map``.
``-F format``
This option specifies the format of the output file specified. For
@@ -112,17 +95,15 @@ Options
the zone contents.
Possible formats are ``text`` (the default), which is the standard
textual representation of the zone, and ``map``, ``raw``, and
``raw=N``, which store the zone in a binary format for rapid
loading by ``named``. ``raw=N`` specifies the format version of the
raw zone file: if ``N`` is 0, the raw file can be read by any version of
``named``; if N is 1, the file can only be read by release 9.9.0 or
higher. The default is 1.
textual representation of the zone, and ``map``, ``raw``, and ``raw=N``, which
store the zone in a binary format for rapid loading by ``named``.
``raw=N`` specifies the format version of the raw zone file: if ``N`` is
0, the raw file can be read by any version of ``named``; if N is 1, the
file can only be read by release 9.9.0 or higher. The default is 1.
``-k mode``
This option performs ``check-names`` checks with the specified failure mode.
Possible modes are ``fail`` (the default for ``named-compilezone``),
``warn`` (the default for ``named-checkzone``), and ``ignore``.
Possible modes are ``fail``, ``warn`` (the default), and ``ignore``.
``-l ttl``
This option sets a maximum permissible TTL for the input file. Any record with a
@@ -145,13 +126,11 @@ Options
``-n mode``
This option specifies whether NS records should be checked to see if they are
addresses. Possible modes are ``fail`` (the default for
``named-compilezone``), ``warn`` (the default for ``named-checkzone``),
and ``ignore``.
addresses. Possible modes are ``fail``, ``warn`` (the default), and ``ignore``.
``-o filename``
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
the zone output is written to standard output. This is mandatory for ``named-compilezone``.
the zone output is written to standard output.
``-r mode``
This option checks for records that are treated as different by DNSSEC but are
@@ -163,9 +142,9 @@ Options
``full`` (the default) and ``relative``. The ``full`` format is most
suitable for processing automatically by a separate script.
The relative format is more human-readable and is thus
suitable for editing by hand. For ``named-checkzone``, this does not
have any effect unless it dumps the zone contents. It also does not
have any meaning if the output format is not text.
suitable for editing by hand. This does not have any effect unless it dumps
the zone contents. It also does not have any meaning if the output format
is not text.
``-S mode``
This option checks whether an SRV record refers to a CNAME. Possible modes are
@@ -187,13 +166,12 @@ Options
``named.conf``.
``-D``
This option dumps the zone file in canonical format. This is always enabled for
``named-compilezone``.
This option dumps the zone file in canonical format.
``-W mode``
This option specifies whether to check for non-terminal wildcards. Non-terminal
wildcards are almost always the result of a failure to understand the
wildcard matching algorithm (:rfc:`1034`). Possible modes are ``warn``
wildcard matching algorithm (:rfc:`4592`). Possible modes are ``warn``
(the default) and ``ignore``.
``zonename``
@@ -211,5 +189,5 @@ and 0 otherwise.
See Also
~~~~~~~~
:manpage:`named(8)`, :manpage:`named-checkconf(8)`, :rfc:`1035`, BIND 9 Administrator Reference
Manual.
:manpage:`named(8)`, :manpage:`named-checkconf(8)`, :manpage:`named-compilezone(8)`,
:rfc:`1035`, BIND 9 Administrator Reference Manual.
+195
View File
@@ -0,0 +1,195 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also named-checkzone.rst!
.. _man_named-compilezone:
named-compilezone - zone file converting tool
---------------------------------------------
Synopsis
~~~~~~~~
:program:`named-compilezone` [**-d**] [**-h**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-M** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-r** mode] [**-s** style] [**-S** mode] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {**-o** filename} {zonename} {filename}
Description
~~~~~~~~~~~
``named-compilezone`` checks the syntax and integrity of a zone file,
and dumps the zone contents to a specified file in a specified format.
It applies strict check levels by default, since the
dump output is used as an actual zone file loaded by ``named``.
When manually specified otherwise, the check levels must at least be as
strict as those specified in the ``named`` configuration file.
Options
~~~~~~~
``-d``
This option enables debugging.
``-h``
This option prints the usage summary and exits.
``-q``
This option sets quiet mode, which only sets an exit code to indicate
successful or failed completion.
``-v``
This option prints the version of the ``named-checkzone`` program and exits.
``-j``
When loading a zone file, this option tells ``named`` to read the journal if it exists. The journal
file name is assumed to be the zone file name with the
string ``.jnl`` appended.
``-J filename``
When loading the zone file, this option tells ``named`` to read the journal from the given file, if
it exists. This implies ``-j``.
``-c class``
This option specifies the class of the zone. If not specified, ``IN`` is assumed.
``-i mode``
This option performs post-load zone integrity checks. Possible modes are
``full`` (the default), ``full-sibling``, ``local``,
``local-sibling``, and ``none``.
Mode ``full`` checks that MX records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks MX records which refer to in-zone hostnames.
Mode ``full`` checks that SRV records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks SRV records which refer to in-zone hostnames.
Mode ``full`` checks that delegation NS records refer to A or AAAA
records (both in-zone and out-of-zone hostnames). It also checks that
glue address records in the zone match those advertised by the child.
Mode ``local`` only checks NS records which refer to in-zone
hostnames or verifies that some required glue exists, i.e., when the
name server is in a child zone.
Modes ``full-sibling`` and ``local-sibling`` disable sibling glue
checks, but are otherwise the same as ``full`` and ``local``,
respectively.
Mode ``none`` disables the checks.
``-f format``
This option specifies the format of the zone file. Possible formats are
``text`` (the default), ``raw``, and ``map``.
``-F format``
This option specifies the format of the output file specified. For
``named-checkzone``, this does not have any effect unless it dumps
the zone contents.
Possible formats are ``text`` (the default), which is the standard
textual representation of the zone, and ``map``, ``raw``, and ``raw=N``, which
store the zone in a binary format for rapid loading by ``named``.
``raw=N`` specifies the format version of the raw zone file: if ``N`` is
0, the raw file can be read by any version of ``named``; if N is 1, the
file can only be read by release 9.9.0 or higher. The default is 1.
``-k mode``
This option performs ``check-names`` checks with the specified failure mode.
Possible modes are ``fail`` (the default), ``warn``, and ``ignore``.
``-l ttl``
This option sets a maximum permissible TTL for the input file. Any record with a
TTL higher than this value causes the zone to be rejected. This
is similar to using the ``max-zone-ttl`` option in ``named.conf``.
``-L serial``
When compiling a zone to ``raw`` or ``map`` format, this option sets the "source
serial" value in the header to the specified serial number. This is
expected to be used primarily for testing purposes.
``-m mode``
This option specifies whether MX records should be checked to see if they are
addresses. Possible modes are ``fail``, ``warn`` (the default), and
``ignore``.
``-M mode``
This option checks whether a MX record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
``-n mode``
This option specifies whether NS records should be checked to see if they are
addresses. Possible modes are ``fail`` (the default), ``warn``, and
``ignore``.
``-o filename``
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
the zone output is written to standard output. This is mandatory for ``named-compilezone``.
``-r mode``
This option checks for records that are treated as different by DNSSEC but are
semantically equal in plain DNS. Possible modes are ``fail``,
``warn`` (the default), and ``ignore``.
``-s style``
This option specifies the style of the dumped zone file. Possible styles are
``full`` (the default) and ``relative``. The ``full`` format is most
suitable for processing automatically by a separate script.
The relative format is more human-readable and is thus
suitable for editing by hand.
``-S mode``
This option checks whether an SRV record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
``-t directory``
This option tells ``named`` to chroot to ``directory``, so that ``include`` directives in the
configuration file are processed as if run by a similarly chrooted
``named``.
``-T mode``
This option checks whether Sender Policy Framework (SPF) records exist and issues a
warning if an SPF-formatted TXT record is not also present. Possible
modes are ``warn`` (the default) and ``ignore``.
``-w directory``
This option instructs ``named`` to chdir to ``directory``, so that relative filenames in master file
``$INCLUDE`` directives work. This is similar to the directory clause in
``named.conf``.
``-D``
This option dumps the zone file in canonical format. This is always enabled for
``named-compilezone``.
``-W mode``
This option specifies whether to check for non-terminal wildcards. Non-terminal
wildcards are almost always the result of a failure to understand the
wildcard matching algorithm (:rfc:`4592`). Possible modes are ``warn``
(the default) and ``ignore``.
``zonename``
This indicates the domain name of the zone being checked.
``filename``
This is the name of the zone file.
Return Values
~~~~~~~~~~~~~
``named-compilezone`` returns an exit status of 1 if errors were detected
and 0 otherwise.
See Also
~~~~~~~~
:manpage:`named(8)`, :manpage:`named-checkconf(8)`, :manpage:`named-checkzone(8)`,
:rfc:`1035`, BIND 9 Administrator Reference Manual.
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+5 -3
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -129,14 +131,14 @@ main(int argc, char **argv) {
} else if (PROGCMP("ddns-confgen")) {
progmode = progmode_confgen;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv, "a:hk:Mmr:qs:y:z:")) !=
-1) {
-1)
{
switch (ch) {
case 'a':
algname = isc_commandline_argument;
+39 -54
View File
@@ -1,54 +1,40 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also tsig-keygen.rst!
.. _man_ddns-confgen:
ddns-confgen - ddns key generation tool
ddns-confgen - TSIG key generation tool
---------------------------------------
Synopsis
~~~~~~~~
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [name]
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone]
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-s** name] [**-z** zone]
Description
~~~~~~~~~~~
``tsig-keygen`` and ``ddns-confgen`` are invocation methods for a
utility that generates keys for use in TSIG signing. The resulting keys
can be used, for example, to secure dynamic DNS updates to a zone or for
the ``rndc`` command channel.
``ddns-confgen`` is an utility that generates keys for use in TSIG signing.
The resulting keys can be used, for example, to secure dynamic DNS updates
to a zone, or for the ``rndc`` command channel.
When run as ``tsig-keygen``, a domain name can be specified on the
command line to be used as the name of the generated key. If no
name is specified, the default is ``tsig-key``.
When run as ``ddns-confgen``, the generated key is accompanied by
configuration text and instructions that can be used with ``nsupdate``
and ``named`` when setting up dynamic DNS, including an example
``update-policy`` statement. (This usage is similar to the ``rndc-confgen``
command for setting up command-channel security.)
The key name can specified using ``-k`` parameter and defaults to ``ddns-key``.
The generated key is accompanied by configuration text and instructions that
can be used with ``nsupdate`` and ``named`` when setting up dynamic DNS,
including an example ``update-policy`` statement.
(This usage is similar to the ``rndc-confgen`` command for setting up
command-channel security.)
Note that ``named`` itself can configure a local DDNS key for use with
``nsupdate -l``; it does this when a zone is configured with
@@ -60,37 +46,36 @@ Options
~~~~~~~
``-a algorithm``
This option specifies the algorithm to use for the TSIG key. Available choices
are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, and
hmac-sha512. The default is hmac-sha256. Options are
This option specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384,
and hmac-sha512. The default is hmac-sha256. Options are
case-insensitive, and the "hmac-" prefix may be omitted.
``-h``
This option prints a short summary of options and arguments.
``-k keyname``
This option specifies the key name of the DDNS authentication key. The default is
``ddns-key`` when neither the ``-s`` nor ``-z`` option is specified;
otherwise, the default is ``ddns-key`` as a separate label followed
by the argument of the option, e.g., ``ddns-key.example.com.`` The
key name must have the format of a valid domain name, consisting of
This option specifies the key name of the DDNS authentication key. The
default is ``ddns-key`` when neither the ``-s`` nor ``-z`` option is
specified; otherwise, the default is ``ddns-key`` as a separate label
followed by the argument of the option, e.g., ``ddns-key.example.com.``
The key name must have the format of a valid domain name, consisting of
letters, digits, hyphens, and periods.
``-q`` (``ddns-confgen`` only)
``-q``
This option enables quiet mode, which prints only the key, with no
explanatory text or usage examples. This is essentially identical to
``tsig-keygen``.
``-s name`` (``ddns-confgen`` only)
This option generates a configuration example to allow
dynamic updates of a single hostname. The example ``named.conf`` text
shows how to set an update policy for the specified name using the
"name" nametype. The default key name is ``ddns-key.name``. Note that the
"self" nametype cannot be used, since the name to be updated may
differ from the key name. This option cannot be used with the ``-z``
option.
``-s name``
This option generates a configuration example to allow dynamic updates
of a single hostname. The example ``named.conf`` text shows how to set
an update policy for the specified name using the "name" nametype. The
default key name is ``ddns-key.name``. Note that the "self" nametype
cannot be used, since the name to be updated may differ from the key
name. This option cannot be used with the ``-z`` option.
``-z zone`` (``ddns-confgen`` only)
``-z zone``
This option generates a configuration example to allow
dynamic updates of a zone. The example ``named.conf`` text shows how
to set an update policy for the specified zone using the "zonesub"
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+50
View File
@@ -0,0 +1,50 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also ddns-confgen.rst!
.. _man_tsig-keygen:
tsig-keygen - TSIG key generation tool
--------------------------------------
Synopsis
~~~~~~~~
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [name]
Description
~~~~~~~~~~~
``tsig-keygen`` is an utility that generates keys for use in TSIG signing.
The resulting keys can be used, for example, to secure dynamic DNS updates
to a zone, or for the ``rndc`` command channel.
A domain name can be specified on the command line to be used as the name
of the generated key. If no name is specified, the default is ``tsig-key``.
Options
~~~~~~~
``-a algorithm``
This option specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384,
and hmac-sha512. The default is hmac-sha256. Options are
case-insensitive, and the "hmac-" prefix may be omitted.
``-h``
This option prints a short summary of options and arguments.
See Also
~~~~~~~~
:manpage:`nsupdate(1)`, :manpage:`named.conf(5)`, :manpage:`named(8)`, BIND 9 Administrator Reference Manual.
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+3 -1
View File
@@ -1,8 +1,10 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+23 -14
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -456,7 +458,8 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
result = dns_rdataset_next(rdataset))
{
if ((rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0) {
DNS_RDATASETATTR_NEGATIVE) != 0)
{
continue;
}
@@ -480,7 +483,8 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
} else {
dns_indent_t indent = { " ", 2 };
if (!yaml && (rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0) {
DNS_RDATASETATTR_NEGATIVE) != 0)
{
isc_buffer_putstr(&target, "; ");
}
result = dns_master_rdatasettotext(
@@ -782,7 +786,8 @@ load_keys(const cfg_obj_t *keys, dns_client_t *client) {
keylist = cfg_listelt_value(elt);
for (elt2 = cfg_list_first(keylist); elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
elt2 = cfg_list_next(elt2))
{
key = cfg_listelt_value(elt2);
CHECK(key_fromconfig(key, client));
}
@@ -850,6 +855,7 @@ setup_dnsseckeys(dns_client_t *client) {
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
isc_buffer_add(&b, sizeof(anchortext) - 1);
cfg_parser_reset(parser);
result = cfg_parse_buffer(parser, &b, NULL, 0,
&cfg_type_bindkeys, 0, &bindkeys);
if (result != ISC_R_SUCCESS) {
@@ -947,7 +953,8 @@ addserver(dns_client_t *client) {
result = ISC_R_SUCCESS;
for (cur = res; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET &&
cur->ai_family != AF_INET6) {
cur->ai_family != AF_INET6)
{
continue;
}
sa = isc_mem_get(mctx, sizeof(*sa));
@@ -1330,7 +1337,6 @@ dash_option(char *option, char *next, bool *open_type_class) {
case 'h':
usage();
exit(0);
/* NOTREACHED */
case 'i':
no_sigs = true;
root_validation = false;
@@ -1341,10 +1347,8 @@ dash_option(char *option, char *next, bool *open_type_class) {
case 'v':
fputs("delv " VERSION "\n", stderr);
exit(0);
/* NOTREACHED */
default:
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
if (strlen(option) > 1U) {
option = &option[1];
@@ -1450,7 +1454,8 @@ dash_option(char *option, char *next, bool *open_type_class) {
warn("extra query type");
}
if (rdtype == dns_rdatatype_ixfr ||
rdtype == dns_rdatatype_axfr) {
rdtype == dns_rdatatype_axfr)
{
fatal("Transfer not supported");
}
qtype = rdtype;
@@ -1482,7 +1487,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
fprintf(stderr, "Invalid option: -%s\n", option);
usage();
}
/* NOTREACHED */
UNREACHABLE();
return (false);
}
@@ -1529,7 +1534,8 @@ preparse_args(int argc, char **argv) {
/* Look for dash value option. */
if (strpbrk(option, dash_opts) != &option[0] ||
strlen(option) > 1U) {
strlen(option) > 1U)
{
/* Error or value in option. */
continue;
}
@@ -1567,13 +1573,15 @@ parse_args(int argc, char **argv) {
} else if (argv[0][0] == '-') {
if (argc <= 1) {
if (dash_option(&argv[0][1], NULL,
&open_type_class)) {
&open_type_class))
{
argc--;
argv++;
}
} else {
if (dash_option(&argv[0][1], argv[1],
&open_type_class)) {
&open_type_class))
{
argc--;
argv++;
}
@@ -1592,7 +1600,8 @@ parse_args(int argc, char **argv) {
warn("extra query type");
}
if (rdtype == dns_rdatatype_ixfr ||
rdtype == dns_rdatatype_axfr) {
rdtype == dns_rdatatype_axfr)
{
fatal("Transfer not supported");
}
qtype = rdtype;
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+25 -15
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -56,7 +58,7 @@
dig_lookup_t *default_lookup = NULL;
static atomic_uintptr_t batchname = ATOMIC_VAR_INIT(0);
static atomic_uintptr_t batchname = 0;
static FILE *batchfp = NULL;
static char *argv0;
static int addresscount = 0;
@@ -512,7 +514,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags, isc_buffer_t *buf,
static bool
isdotlocal(dns_message_t *msg) {
isc_result_t result;
static unsigned char local_ndata[] = { "\005local\0" };
static unsigned char local_ndata[] = { "\005local" };
static unsigned char local_offsets[] = { 0, 6 };
static dns_name_t local = DNS_NAME_INITABSOLUTE(local_ndata,
local_offsets);
@@ -620,7 +622,8 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
flags |= DNS_MESSAGETEXTFLAG_NOCOMMENTS;
}
if (query->lookup->onesoa &&
query->lookup->rdtype == dns_rdatatype_axfr) {
query->lookup->rdtype == dns_rdatatype_axfr)
{
flags |= (query->msg_count == 0) ? DNS_MESSAGETEXTFLAG_ONESOA
: DNS_MESSAGETEXTFLAG_OMITSOA;
}
@@ -710,7 +713,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
strlcat(sockstr, "0", sizeof(sockstr));
}
printf(" response_address: %s\n", sockstr);
printf(" response_address: \"%s\"\n", sockstr);
printf(" response_port: %u\n", sport);
}
@@ -728,7 +731,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
strlcat(sockstr, "0", sizeof(sockstr));
}
printf(" query_address: %s\n", sockstr);
printf(" query_address: \"%s\"\n", sockstr);
printf(" query_port: %u\n", sport);
}
@@ -1457,7 +1460,8 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
}
for (num = 0;
num < sizeof(opcodetext) / sizeof(opcodetext[0]);
num++) {
num++)
{
if (strcasecmp(opcodetext[num], value) == 0) {
break;
}
@@ -1872,7 +1876,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
have_ipv6 = false;
} else {
fatal("can't find IPv4 networking");
/* NOTREACHED */
UNREACHABLE();
return (false);
}
break;
@@ -1882,7 +1886,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
have_ipv4 = false;
} else {
fatal("can't find IPv6 networking");
/* NOTREACHED */
UNREACHABLE();
return (false);
}
break;
@@ -2032,7 +2036,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
result = dns_rdatatype_fromtext(
&rdtype, (isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr) {
rdtype == dns_rdatatype_ixfr)
{
result = DNS_R_UNKNOWN;
}
}
@@ -2105,7 +2110,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
}
*need_clone = true;
if (get_reverse(textname, sizeof(textname), value, false) ==
ISC_R_SUCCESS) {
ISC_R_SUCCESS)
{
strlcpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
@@ -2133,7 +2139,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
fprintf(stderr, "Invalid option: -%s\n", option);
usage();
}
/* NOTREACHED */
UNREACHABLE();
return (false);
}
@@ -2287,7 +2293,8 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
}
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline), batchfp) !=
0) {
0)
{
debug("config line %s", batchline);
bargc = split_batchline(batchline, bargv, 62,
".digrc argv");
@@ -2378,7 +2385,8 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
&rdtype,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr) {
rdtype == dns_rdatatype_ixfr)
{
fprintf(stderr, ";; Warning, "
"ixfr requires "
"a "
@@ -2418,7 +2426,8 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
lookup->rdtype = rdtype;
lookup->rdtypeset = true;
if (rdtype ==
dns_rdatatype_axfr) {
dns_rdatatype_axfr)
{
lookup->section_question =
plusquest;
lookup->comments =
@@ -2426,7 +2435,8 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
}
if (rdtype ==
dns_rdatatype_any &&
!lookup->tcp_mode_set) {
!lookup->tcp_mode_set)
{
lookup->tcp_mode = true;
}
lookup->ixfr_serial = false;
+14 -22
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
@@ -505,9 +495,11 @@ abbreviation is unambiguous; for example, ``+cd`` is equivalent to
``+notcflag``. This bit is ignored by the server for QUERY.
``+[no]tcp``
This option uses [or does not use] TCP when querying name servers. The default behavior
is to use UDP unless a type ``any`` or ``ixfr=N`` query is requested,
in which case the default is TCP. AXFR queries always use TCP.
This option uses [or does not use] TCP when querying name servers.
The default behavior is to use UDP unless a type ``any`` or
``ixfr=N`` query is requested, in which case the default is TCP.
AXFR queries always use TCP. To prevent retry over TCP when TC=1
is returned from a UDP query, use ``+ignore``.
``+timeout=T``
This option sets the timeout for a query to ``T`` seconds. The default timeout is
+67 -59
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -170,7 +172,6 @@ unsigned int digestbits = 0;
isc_buffer_t *namebuf = NULL;
dns_tsigkey_t *tsigkey = NULL;
bool validated = true;
isc_mempool_t *commctx = NULL;
bool debugging = false;
bool debugtiming = false;
bool memdebugging = false;
@@ -515,7 +516,8 @@ get_server_list(irs_resconf_t *resconf) {
debug("get_server_list()");
servers = irs_resconf_getnameservers(resconf);
for (sa = ISC_LIST_HEAD(*servers); sa != NULL;
sa = ISC_LIST_NEXT(sa, link)) {
sa = ISC_LIST_NEXT(sa, link))
{
int pf = isc_sockaddr_pf(sa);
isc_netaddr_t na;
isc_result_t result;
@@ -764,7 +766,7 @@ dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, bool servers) {
dig_lookup_t *looknew;
debug("clone_lookup()");
debug("clone_lookup(%p)", lookold);
INSIST(!free_now);
@@ -876,7 +878,7 @@ dig_lookup_t *
requeue_lookup(dig_lookup_t *lookold, bool servers) {
dig_lookup_t *looknew;
debug("requeue_lookup()");
debug("requeue_lookup(%p)", lookold);
lookup_counter++;
if (lookup_counter > LOOKUP_LIMIT) {
@@ -1426,15 +1428,6 @@ setup_libs(void) {
check_result(result, "dst_lib_init");
is_dst_up = true;
isc_mempool_create(mctx, COMMSIZE, &commctx);
isc_mempool_setname(commctx, "COMMPOOL");
/*
* 6 and 2 set as reasonable parameters for 3 or 4 nameserver
* systems.
*/
isc_mempool_setfreemax(commctx, 6);
isc_mempool_setfillcount(commctx, 2);
isc_mutex_init(&lookup_lock);
}
@@ -1569,7 +1562,8 @@ check_if_done(void) {
debug("check_if_done()");
debug("list %s", ISC_LIST_EMPTY(lookup_list) ? "empty" : "full");
if (ISC_LIST_EMPTY(lookup_list) && current_lookup == NULL &&
sendcount == 0) {
sendcount == 0)
{
INSIST(sockcount == 0);
INSIST(recvcount == 0);
debug("shutting down");
@@ -1590,7 +1584,7 @@ clear_query(dig_query_t *query) {
debug("clear_query(%p)", query);
if (query->timer != NULL) {
isc_timer_detach(&query->timer);
isc_timer_destroy(&query->timer);
}
lookup = query->lookup;
@@ -1599,6 +1593,7 @@ clear_query(dig_query_t *query) {
}
if (ISC_LINK_LINKED(query, link)) {
query->saved_next = ISC_LIST_NEXT(query, link);
ISC_LIST_UNLINK(lookup->q, query, link);
}
if (ISC_LINK_LINKED(query, clink)) {
@@ -1611,12 +1606,13 @@ clear_query(dig_query_t *query) {
sockcount--;
debug("sockcount=%d", sockcount);
}
isc_mempool_put(commctx, query->recvspace);
isc_mempool_put(commctx, query->tmpsendspace);
isc_mem_put(mctx, query->recvspace, COMMSIZE);
isc_mem_put(mctx, query->tmpsendspace, COMMSIZE);
isc_buffer_invalidate(&query->recvbuf);
isc_buffer_invalidate(&query->lengthbuf);
if (query->waiting_senddone) {
debug("waiting senddone, delay freeing query");
query->pending_free = true;
} else {
query->magic = 0;
@@ -1688,7 +1684,7 @@ destroy_lookup(dig_lookup_t *lookup) {
isc_buffer_free(&lookup->querysig);
}
if (lookup->sendspace != NULL) {
isc_mempool_put(commctx, lookup->sendspace);
isc_mem_put(mctx, lookup->sendspace, COMMSIZE);
}
if (lookup->tsigctx != NULL) {
@@ -1850,7 +1846,8 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) {
dns_rdata_ns_t ns;
if (query->lookup->trace_root &&
query->lookup->nsfound >= MXSERV) {
query->lookup->nsfound >= MXSERV)
{
break;
}
@@ -1871,7 +1868,8 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) {
cancel_lookup(query->lookup);
lookup->doing_xfr = false;
if (!lookup->trace_root &&
section == DNS_SECTION_ANSWER) {
section == DNS_SECTION_ANSWER)
{
lookup->trace = false;
} else {
lookup->trace = query->lookup->trace;
@@ -1959,7 +1957,7 @@ next_origin(dig_lookup_t *oldlookup) {
INSIST(!free_now);
debug("next_origin()");
debug("next_origin(%p)", oldlookup);
debug("following up %s", oldlookup->textname);
if (!usesearch) {
@@ -2017,7 +2015,7 @@ insert_soa(dig_lookup_t *lookup) {
dns_rdataset_t *rdataset = NULL;
dns_name_t *soaname = NULL;
debug("insert_soa()");
debug("insert_soa(%p)", lookup);
soa.mctx = mctx;
soa.serial = lookup->ixfr_serial;
soa.refresh = 0;
@@ -2339,10 +2337,7 @@ setup_lookup(dig_lookup_t *lookup) {
check_result(result, "dns_message_settsigkey");
}
lookup->sendspace = isc_mempool_get(commctx);
if (lookup->sendspace == NULL) {
fatal("memory allocation failure");
}
lookup->sendspace = isc_mem_get(mctx, COMMSIZE);
result = dns_compress_init(&cctx, -1, mctx);
check_result(result, "dns_compress_init");
@@ -2439,8 +2434,7 @@ setup_lookup(dig_lookup_t *lookup) {
memmove(addr, &sin6->sin6_addr, addrl);
break;
default:
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
@@ -2578,8 +2572,8 @@ setup_lookup(dig_lookup_t *lookup) {
query->byte_count = 0;
query->ixfr_axfr = false;
query->sock = NULL;
query->recvspace = isc_mempool_get(commctx);
query->tmpsendspace = isc_mempool_get(commctx);
query->recvspace = isc_mem_get(mctx, COMMSIZE);
query->tmpsendspace = isc_mem_get(mctx, COMMSIZE);
if (query->recvspace == NULL) {
fatal("memory allocation failure");
}
@@ -2595,6 +2589,7 @@ setup_lookup(dig_lookup_t *lookup) {
ISC_LINK_INIT(query, clink);
ISC_LINK_INIT(query, link);
query->saved_next = NULL;
query->magic = DIG_QUERY_MAGIC;
@@ -2619,7 +2614,7 @@ send_done(isc_task_t *_task, isc_event_t *event) {
LOCK_LOOKUP;
debug("send_done()");
debug("send_done(%p)", event->ev_arg);
sendcount--;
debug("sendcount=%d", sendcount);
INSIST(sendcount >= 0);
@@ -2629,10 +2624,12 @@ send_done(isc_task_t *_task, isc_event_t *event) {
query->waiting_senddone = false;
l = query->lookup;
if (!query->pending_free && l->ns_search_only && !l->trace_root &&
!l->tcp_mode) {
if (l == current_lookup && l->ns_search_only && !l->trace_root &&
!l->tcp_mode)
{
debug("sending next, since searching");
next = ISC_LIST_NEXT(query, link);
next = query->pending_free ? query->saved_next
: ISC_LIST_NEXT(query, link);
if (next != NULL) {
send_udp(next);
}
@@ -2658,7 +2655,7 @@ static void
cancel_lookup(dig_lookup_t *lookup) {
dig_query_t *query, *next;
debug("cancel_lookup()");
debug("cancel_lookup(%p)", lookup);
query = ISC_LIST_HEAD(lookup->q);
while (query != NULL) {
REQUIRE(DIG_VALID_QUERY(query));
@@ -2683,7 +2680,7 @@ bringup_timer(dig_query_t *query, unsigned int default_timeout) {
isc_result_t result;
REQUIRE(DIG_VALID_QUERY(query));
debug("bringup_timer()");
debug("bringup_timer(%p)", query);
/*
* If the timer already exists, that means we're calling this
* a second time (for a retry). Don't need to recreate it,
@@ -2703,7 +2700,7 @@ bringup_timer(dig_query_t *query, unsigned int default_timeout) {
debug("have local timeout of %d", local_timeout);
isc_interval_set(&l->interval, local_timeout, 0);
if (query->timer != NULL) {
isc_timer_detach(&query->timer);
isc_timer_destroy(&query->timer);
}
result = isc_timer_create(timermgr, isc_timertype_once, NULL,
&l->interval, global_task, connect_timeout,
@@ -2715,7 +2712,7 @@ static void
force_timeout(dig_query_t *query) {
isc_event_t *event;
debug("force_timeout ()");
debug("force_timeout(%p)", query);
event = isc_event_allocate(mctx, query, ISC_TIMEREVENT_IDLE,
connect_timeout, query, sizeof(isc_event_t));
isc_task_send(global_task, &event);
@@ -2727,7 +2724,7 @@ force_timeout(dig_query_t *query) {
* ourselves due to the duplicate events.
*/
if (query->timer != NULL) {
isc_timer_detach(&query->timer);
isc_timer_destroy(&query->timer);
}
}
@@ -3007,7 +3004,7 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
debug("connect_timeout()");
debug("connect_timeout(%p)", event->ev_arg);
LOCK_LOOKUP;
query = event->ev_arg;
@@ -3117,7 +3114,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
debug("tcp_length_done()");
debug("tcp_length_done(%p)", event->ev_arg);
LOCK_LOOKUP;
sevent = (isc_socketevent_t *)event;
@@ -3200,7 +3197,7 @@ launch_next_query(dig_query_t *query, bool include_question) {
INSIST(!free_now);
debug("launch_next_query()");
debug("launch_next_query(%p)", query);
if (!query->lookup->pending) {
debug("ignoring launch_next_query because !pending");
@@ -3279,7 +3276,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
REQUIRE(event->ev_type == ISC_SOCKEVENT_CONNECT);
INSIST(!free_now);
debug("connect_done()");
debug("connect_done(%p)", event->ev_arg);
LOCK_LOOKUP;
sevent = (isc_socketevent_t *)event;
@@ -3335,7 +3332,8 @@ connect_done(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
l = query->lookup;
if ((l->current_query != NULL) &&
(ISC_LINK_LINKED(l->current_query, link))) {
(ISC_LINK_LINKED(l->current_query, link)))
{
next = ISC_LIST_NEXT(l->current_query, link);
} else {
next = NULL;
@@ -3384,7 +3382,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
axfr = query->ixfr_axfr;
}
debug("check_for_more_data()");
debug("check_for_more_data(%p)", query);
/*
* By the time we're in this routine, we know we're doing
@@ -3422,13 +3420,15 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
* it's an SOA
*/
if ((!query->first_soa_rcvd) &&
(rdata.type != dns_rdatatype_soa)) {
(rdata.type != dns_rdatatype_soa))
{
puts("; Transfer failed. "
"Didn't start with SOA answer.");
return (true);
}
if ((!query->second_rr_rcvd) &&
(rdata.type != dns_rdatatype_soa)) {
(rdata.type != dns_rdatatype_soa))
{
query->second_rr_rcvd = true;
query->second_rr_serial = 0;
debug("got the second rr as nonsoa");
@@ -3626,7 +3626,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(!free_now);
debug("recv_done()");
debug("recv_done(%p)", event->ev_arg);
LOCK_LOOKUP;
recvcount--;
@@ -3928,7 +3928,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
return;
}
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0 && !l->ignore &&
!l->tcp_mode) {
!l->tcp_mode)
{
if (l->cookie == NULL && l->sendcookie && msg->opt != NULL) {
process_opt(l, msg);
}
@@ -3993,7 +3994,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
* through to print the message.
*/
if ((ISC_LIST_HEAD(l->q) != query) ||
(ISC_LIST_NEXT(query, link) != NULL)) {
(ISC_LIST_NEXT(query, link) != NULL))
{
dighost_comments(l,
"Got %s from %s, trying next "
"server",
@@ -4076,7 +4078,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
if (!l->doing_xfr || l->xfr_q == query) {
if (msg->rcode == dns_rcode_nxdomain &&
(l->origin != NULL || l->need_search)) {
(l->origin != NULL || l->need_search))
{
if (!next_origin(query->lookup) || showsearch) {
dighost_printmessage(query, &b, msg, true);
dighost_received(isc_buffer_usedlength(&b),
@@ -4161,7 +4164,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
query->lookup->pending = false;
}
if (!query->lookup->ns_search_only ||
query->lookup->trace_root || docancel) {
query->lookup->trace_root || docancel)
{
dns_message_detach(&msg);
cancel_lookup(l);
}
@@ -4257,7 +4261,7 @@ do_lookup(dig_lookup_t *lookup) {
REQUIRE(lookup != NULL);
debug("do_lookup()");
debug("do_lookup(%p)", lookup);
lookup->pending = true;
query = ISC_LIST_HEAD(lookup->q);
if (query != NULL) {
@@ -4313,7 +4317,8 @@ cancel_all(void) {
}
}
for (q = ISC_LIST_HEAD(current_lookup->connecting); q != NULL;
q = nq) {
q = nq)
{
nq = ISC_LIST_NEXT(q, clink);
debug("canceling connecting query %p, belonging to %p",
q, current_lookup);
@@ -4378,10 +4383,6 @@ destroy_libs(void) {
check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */
if (commctx != NULL) {
debug("freeing commctx");
isc_mempool_destroy(&commctx);
}
if (socketmgr != NULL) {
debug("freeing socketmgr");
isc_socketmgr_destroy(&socketmgr);
@@ -4492,6 +4493,9 @@ idn_locale_to_ace(const char *src, char *dst, size_t dstlen) {
* valid domain name.
*/
res = idn2_to_ascii_lz(src, &ascii_src, IDN2_NONTRANSITIONAL);
if (res == IDN2_DISALLOWED) {
res = idn2_to_ascii_lz(src, &ascii_src, IDN2_TRANSITIONAL);
}
if (res != IDN2_OK) {
fatal("'%s' is not a legal IDNA2008 name (%s), use +noidnin",
src, idn2_strerror(res));
@@ -4553,9 +4557,13 @@ idn_ace_to_locale(const char *src, char **dst) {
}
/*
* Then, check whether decoded 'src' is a valid IDNA2008 name.
* Then, check whether decoded 'src' is a valid IDNA2008 name
* and if disallowed character is found, fallback to IDNA2003.
*/
res = idn2_to_ascii_8z(utf8_src, NULL, IDN2_NONTRANSITIONAL);
if (res == IDN2_DISALLOWED) {
res = idn2_to_ascii_8z(utf8_src, NULL, IDN2_TRANSITIONAL);
}
if (res != IDN2_OK) {
fatal("'%s' is not a legal IDNA2008 name (%s), use +noidnout",
src, idn2_strerror(res));
+19 -16
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -206,15 +208,9 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
isc_result_t result, loopresult;
isc_region_t r;
dns_name_t empty_name;
char tbuf[4096];
char tbuf[4096] = { 0 };
bool first;
bool no_rdata;
if (sectionid == DNS_SECTION_QUESTION) {
no_rdata = true;
} else {
no_rdata = false;
}
bool no_rdata = (sectionid == DNS_SECTION_QUESTION);
if (headers) {
printf(";; %s SECTION:\n", section_name);
@@ -534,7 +530,8 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
}
if (!ISC_LIST_EMPTY(msg->sections[DNS_SECTION_AUTHORITY]) &&
!short_form) {
!short_form)
{
printf("\n");
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
true, query);
@@ -543,7 +540,8 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
}
}
if (!ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ADDITIONAL]) &&
!short_form) {
!short_form)
{
printf("\n");
result = printsection(msg, DNS_SECTION_ADDITIONAL, "ADDITIONAL",
true, query);
@@ -597,10 +595,12 @@ pre_parse_args(int argc, char **argv) {
{
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
} else if (strcasecmp("record",
isc_commandline_argument) == 0) {
isc_commandline_argument) == 0)
{
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
} else if (strcasecmp("usage",
isc_commandline_argument) == 0) {
isc_commandline_argument) == 0)
{
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
}
break;
@@ -711,7 +711,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
break;
case 't':
if (strncasecmp(isc_commandline_argument, "ixfr=", 5) ==
0) {
0)
{
rdtype = dns_rdatatype_ixfr;
/* XXXMPA add error checking */
serial = strtoul(isc_commandline_argument + 5,
@@ -730,7 +731,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
isc_commandline_argument);
}
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) {
lookup->rdtype != dns_rdatatype_axfr)
{
lookup->rdtype = rdtype;
}
lookup->rdtypeset = true;
@@ -771,10 +773,11 @@ parse_args(bool is_batchfile, int argc, char **argv) {
break;
case 'A':
list_almost_all = true;
/* FALL THROUGH */
FALLTHROUGH;
case 'a':
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) {
lookup->rdtype != dns_rdatatype_axfr)
{
lookup->rdtype = dns_rdatatype_any;
}
list_type = dns_rdatatype_any;
+10 -20
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
@@ -77,7 +67,7 @@ Options
This option prints debugging traces, and is equivalent to the ``-v`` verbose option.
``-l``
This option tells ``named` to list the zone, meaning the ``host`` command performs a zone transfer of zone
This option tells ``named`` to list the zone, meaning the ``host`` command performs a zone transfer of zone
``name`` and prints out the NS, PTR, and address records (A/AAAA).
Together, the ``-l -a`` options print all records in the zone.
+19 -16
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -127,18 +129,18 @@ struct dig_lookup {
isc_buffer_t namebuf;
isc_buffer_t onamebuf;
isc_buffer_t renderbuf;
char *sendspace;
dns_name_t *name;
char *sendspace;
dns_name_t *name;
isc_interval_t interval;
dns_message_t *sendmsg;
dns_name_t *oname;
dns_message_t *sendmsg;
dns_name_t *oname;
ISC_LINK(dig_lookup_t) link;
ISC_LIST(dig_query_t) q;
ISC_LIST(dig_query_t) connecting;
dig_query_t *current_query;
dig_query_t *current_query;
dig_serverlist_t my_server_list;
dig_searchlist_t *origin;
dig_query_t *xfr_q;
dig_query_t *xfr_q;
uint32_t retries;
int nsfound;
int16_t udpsize;
@@ -147,13 +149,13 @@ struct dig_lookup {
uint32_t ixfr_serial;
isc_buffer_t rdatabuf;
char rdatastore[MXNAME];
dst_context_t *tsigctx;
isc_buffer_t *querysig;
dst_context_t *tsigctx;
isc_buffer_t *querysig;
uint32_t msgcounter;
dns_fixedname_t fdomain;
isc_sockaddr_t *ecs_addr;
char *cookie;
dns_ednsopt_t *ednsopts;
isc_sockaddr_t *ecs_addr;
char *cookie;
dns_ednsopt_t *ednsopts;
unsigned int ednsoptscnt;
isc_dscp_t dscp;
unsigned int ednsflags;
@@ -181,6 +183,7 @@ struct dig_query {
isc_socket_t *sock;
ISC_LINK(dig_query_t) link;
ISC_LINK(dig_query_t) clink;
dig_query_t *saved_next;
isc_sockaddr_t sockaddr;
isc_time_t time_sent;
isc_time_t time_recv;
@@ -215,7 +218,7 @@ extern bool check_ra, have_ipv4, have_ipv6, specified_source, usesearch,
showsearch, yaml;
extern in_port_t port;
extern unsigned int timeout;
extern isc_mem_t *mctx;
extern isc_mem_t *mctx;
extern int sendcount;
extern int ndots;
extern int lookup_counter;
@@ -226,10 +229,10 @@ extern char keyfile[MXNAME];
extern char keysecret[MXNAME];
extern const dns_name_t *hmacname;
extern unsigned int digestbits;
extern dns_tsigkey_t *tsigkey;
extern dns_tsigkey_t *tsigkey;
extern bool validated;
extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
extern bool free_now;
extern bool debugging, debugtiming, memdebugging;
extern bool keep_open;
@@ -337,7 +340,7 @@ set_search_domain(char *domain);
* Routines to be defined in dig.c, host.c, and nslookup.c. and
* then assigned to the appropriate function pointer
*/
extern isc_result_t (*dighost_printmessage)(dig_query_t *query,
extern isc_result_t (*dighost_printmessage)(dig_query_t *query,
const isc_buffer_t *msgbuf,
dns_message_t *msg, bool headers);
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+4 -2
View File
@@ -1,8 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+13 -6
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -635,7 +637,8 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
NULL);
if (result != ISC_R_SUCCESS &&
result != DNS_R_FROMWILDCARD) {
result != DNS_R_FROMWILDCARD)
{
vbprintf(1,
"skip RRSIG by key %d:"
" verification failed: %s\n",
@@ -851,7 +854,7 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl,
}
}
static inline int
static int
rdata_cmp(const void *rdata1, const void *rdata2) {
return (dns_rdata_compare((const dns_rdata_t *)rdata1,
(const dns_rdata_t *)rdata2));
@@ -1095,7 +1098,8 @@ main(int argc, char *argv[]) {
* so that it works just like sed(1).
*/
if (isc_commandline_argument ==
argv[isc_commandline_index - 1]) {
argv[isc_commandline_index - 1])
{
isc_commandline_index--;
inplace = "";
} else {
@@ -1187,7 +1191,8 @@ main(int argc, char *argv[]) {
fatal("missing RRSIG CDNSKEY records for %s", namestr);
}
if (dns_rdataset_isassociated(&cds_set) &&
!dns_rdataset_isassociated(&cds_sig)) {
!dns_rdataset_isassociated(&cds_sig))
{
fatal("missing RRSIG CDS records for %s", namestr);
}
@@ -1209,7 +1214,8 @@ main(int argc, char *argv[]) {
if (dns_rdataset_isassociated(&cdnskey_set)) {
vbprintf(1, "verify CDNSKEY signature(s)\n");
if (!signed_loose(matching_sigs(old_key_tbl, &cdnskey_set,
&cdnskey_sig))) {
&cdnskey_sig)))
{
fatal("could not validate child CDNSKEY RRset for %s",
namestr);
}
@@ -1217,7 +1223,8 @@ main(int argc, char *argv[]) {
if (dns_rdataset_isassociated(&cds_set)) {
vbprintf(1, "verify CDS signature(s)\n");
if (!signed_loose(
matching_sigs(old_key_tbl, &cds_set, &cds_sig))) {
matching_sigs(old_key_tbl, &cds_set, &cds_sig)))
{
fatal("could not validate child CDS RRset for %s",
namestr);
}
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+5 -3
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -439,14 +441,14 @@ main(int argc, char **argv) {
}
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+3 -1
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -391,7 +393,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+10 -6
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -330,14 +332,14 @@ main(int argc, char **argv) {
prepub = strtottl(isc_commandline_argument);
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
@@ -574,7 +576,8 @@ main(int argc, char **argv) {
flags |= DNS_KEYOWNER_ZONE;
} else if ((options & DST_TYPE_KEY) != 0) { /* KEY */
if (strcasecmp(nametype, "host") == 0 ||
strcasecmp(nametype, "entity") == 0) {
strcasecmp(nametype, "entity") == 0)
{
flags |= DNS_KEYOWNER_ENTITY;
} else if (strcasecmp(nametype, "user") == 0) {
flags |= DNS_KEYOWNER_USER;
@@ -601,7 +604,8 @@ main(int argc, char **argv) {
if (protocol == -1) {
protocol = DNS_KEYPROTO_DNSSEC;
} else if ((options & DST_TYPE_KEY) == 0 &&
protocol != DNS_KEYPROTO_DNSSEC) {
protocol != DNS_KEYPROTO_DNSSEC)
{
fatal("invalid DNSKEY protocol: %d", protocol);
}
@@ -636,7 +640,7 @@ main(int argc, char **argv) {
dns_secalg_format(alg, algstr, sizeof(algstr));
fatal("failed to get key %s/%s: %s", namestr, algstr,
isc_result_totext(ret));
/* NOTREACHED */
UNREACHABLE();
exit(-1);
}
+13 -27
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
@@ -52,20 +42,16 @@ Options
be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519, or ED448.
If no algorithm is specified, RSASHA1 is used by default
unless the ``-3`` option is specified, in which case NSEC3RSASHA1
is used instead. (If ``-3`` is used and an algorithm is
specified, that algorithm is checked for compatibility with
NSEC3.)
These values are case-insensitive. In some cases, abbreviations are
supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for
ECDSAP384SHA384. If RSASHA1 is specified along with the ``-3``
option, then NSEC3RSASHA1 is used instead.
Since BIND 9.12.0, this option is mandatory except when using the
This option is mandatory except when using the
``-S`` option, which copies the algorithm from the predecessory key.
Previously, the default for newly generated keys was RSASHA1.
.. versionchanged:: 9.12.0
The default value RSASHA1 for newly generated keys was removed.
``-3``
This option uses an NSEC3-capable algorithm to generate a DNSSEC key. If this
+15 -8
View File
@@ -1,6 +1,8 @@
/*
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -264,7 +266,8 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name,
cfg_obj_t *kconfig = cfg_listelt_value(element);
kasp = NULL;
if (strcmp(cfg_obj_asstring(cfg_tuple_get(kconfig, "name")),
name) != 0) {
name) != 0)
{
continue;
}
@@ -401,7 +404,8 @@ keygen(keygen_ctx_t *ctx, isc_mem_t *mctx, int argc, char **argv) {
if (!ctx->oldstyle && ctx->prepub > 0) {
if (ctx->setpub && ctx->setact &&
(ctx->activate - ctx->prepub) < ctx->publish) {
(ctx->activate - ctx->prepub) < ctx->publish)
{
fatal("Activation and publication dates "
"are closer together than the\n\t"
"prepublication interval.");
@@ -737,7 +741,8 @@ keygen(keygen_ctx_t *ctx, isc_mem_t *mctx, int argc, char **argv) {
if (ctx->setdel) {
if (ctx->setinact &&
ctx->deltime < ctx->inactive) {
ctx->deltime < ctx->inactive)
{
fprintf(stderr,
"%s: warning: Key is "
"scheduled to be deleted "
@@ -1002,7 +1007,8 @@ main(int argc, char **argv) {
ctx.protocol = strtol(isc_commandline_argument, &endp,
10);
if (*endp != '\0' || ctx.protocol < 0 ||
ctx.protocol > 255) {
ctx.protocol > 255)
{
fatal("-p must be followed by a number "
"[0..255]");
}
@@ -1018,7 +1024,8 @@ main(int argc, char **argv) {
ctx.signatory = strtol(isc_commandline_argument, &endp,
10);
if (*endp != '\0' || ctx.signatory < 0 ||
ctx.signatory > 15) {
ctx.signatory > 15)
{
fatal("-s must be followed by a number "
"[0..15]");
}
@@ -1129,14 +1136,14 @@ main(int argc, char **argv) {
ctx.prepub = strtottl(isc_commandline_argument);
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
+10 -20
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
@@ -56,7 +46,7 @@ Options
This option uses an NSEC3-capable algorithm to generate a DNSSEC key. If this
option is used with an algorithm that has both NSEC and NSEC3
versions, then the NSEC3 version is selected; for example,
``dnssec-keygen -3a RSASHA1`` specifies the NSEC3RSASHA1 algorithm.
``dnssec-keygen -3 -a RSASHA1`` specifies the NSEC3RSASHA1 algorithm.
``-a algorithm``
This option selects the cryptographic algorithm. For DNSSEC keys, the value of
+5 -2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -132,7 +134,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
@@ -149,7 +151,8 @@ main(int argc, char **argv) {
}
if (argc < isc_commandline_index + 1 ||
argv[isc_commandline_index] == NULL) {
argv[isc_commandline_index] == NULL)
{
fatal("The key file name was not specified");
}
if (argc > isc_commandline_index + 1) {
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+7 -3
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -358,7 +360,7 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
@@ -560,7 +562,8 @@ main(int argc, char **argv) {
}
if (argc < isc_commandline_index + 1 ||
argv[isc_commandline_index] == NULL) {
argv[isc_commandline_index] == NULL)
{
fatal("The key file name was not specified");
}
if (argc > isc_commandline_index + 1) {
@@ -568,7 +571,8 @@ main(int argc, char **argv) {
}
if ((setgoal || setds || setdnskey || setkrrsig || setzrrsig) &&
!write_state) {
!write_state)
{
fatal("Options -g, -d, -k, -r and -z require -s to be set");
}
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+71 -43
View File
@@ -1,6 +1,8 @@
/*
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -225,7 +227,7 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
return;
}
result = dns_db_allrdatasets(gdb, node, gversion, 0, &iter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &iter);
check_result(result, "dns_db_allrdatasets");
dns_rdataset_init(&rds);
@@ -325,28 +327,28 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
dns_diff_append(add, &tuple);
}
static inline bool
static bool
issigningkey(dns_dnsseckey_t *key) {
return (key->force_sign || key->hint_sign);
}
static inline bool
static bool
ispublishedkey(dns_dnsseckey_t *key) {
return ((key->force_publish || key->hint_publish) && !key->hint_remove);
}
static inline bool
static bool
iszonekey(dns_dnsseckey_t *key) {
return (dns_name_equal(dst_key_name(key->key), gorigin) &&
dst_key_iszonekey(key->key));
}
static inline bool
static bool
isksk(dns_dnsseckey_t *key) {
return (key->ksk);
}
static inline bool
static bool
iszsk(dns_dnsseckey_t *key) {
return (ignore_kskflag || !key->ksk);
}
@@ -362,7 +364,8 @@ keythatsigned_unlocked(dns_rdata_rrsig_t *rrsig) {
dns_dnsseckey_t *key;
for (key = ISC_LIST_HEAD(keylist); key != NULL;
key = ISC_LIST_NEXT(key, link)) {
key = ISC_LIST_NEXT(key, link))
{
if (rrsig->keyid == dst_key_id(key->key) &&
rrsig->algorithm == dst_key_alg(key->key) &&
dns_name_equal(&rrsig->signer, dst_key_name(key->key)))
@@ -461,11 +464,11 @@ expecttofindkey(dns_name_t *name) {
dns_name_format(name, namestr, sizeof(namestr));
fatal("failure looking for '%s DNSKEY' in database: %s", namestr,
isc_result_totext(result));
/* NOTREACHED */
UNREACHABLE();
return (false); /* removes a warning */
}
static inline bool
static bool
setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
dns_rdata_t *rrsig) {
isc_result_t result;
@@ -562,7 +565,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
"invalid validity period\n",
sigstr);
} else if (key == NULL && !future &&
expecttofindkey(&rrsig.signer)) {
expecttofindkey(&rrsig.signer))
{
/* rrsig is dropped and not replaced */
vbprintf(2,
"\trrsig by %s dropped - "
@@ -573,7 +577,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
vbprintf(2, "\trrsig by %s %s - dnskey not found\n",
keep ? "retained" : "dropped", sigstr);
} else if (!dns_dnssec_keyactive(key->key, now) &&
remove_inactkeysigs) {
remove_inactkeysigs)
{
keep = false;
vbprintf(2, "\trrsig by %s dropped - key inactive\n",
sigstr);
@@ -674,7 +679,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
}
for (key = ISC_LIST_HEAD(keylist); key != NULL;
key = ISC_LIST_NEXT(key, link)) {
key = ISC_LIST_NEXT(key, link))
{
if (nowsignedby[key->index]) {
continue;
}
@@ -696,7 +702,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
curr = ISC_LIST_NEXT(curr, link))
{
if (dst_key_alg(key->key) !=
dst_key_alg(curr->key)) {
dst_key_alg(curr->key))
{
continue;
}
if (REVOKE(curr->key)) {
@@ -707,7 +714,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
}
}
if (isksk(key) || !have_ksk ||
(iszsk(key) && !keyset_kskonly)) {
(iszsk(key) && !keyset_kskonly))
{
signwithkey(name, set, key->key, ttl, add,
"signing with dnskey");
}
@@ -748,7 +756,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
DST_NUM_SUCCESSOR,
&suc);
if (ret != ISC_R_SUCCESS ||
dst_key_id(key->key) != suc) {
dst_key_id(key->key) != suc)
{
continue;
}
@@ -1183,7 +1192,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
dns_diff_init(mctx, &del);
dns_diff_init(mctx, &add);
rdsiter = NULL;
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets()");
result = dns_rdatasetiter_first(rdsiter);
while (result == ISC_R_SUCCESS) {
@@ -1201,7 +1210,8 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
*/
if (isdelegation) {
if (rdataset.type != nsec_datatype &&
rdataset.type != dns_rdatatype_ds) {
rdataset.type != dns_rdatatype_ds)
{
goto skip;
}
} else if (rdataset.type == dns_rdatatype_ds) {
@@ -1244,7 +1254,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
* See if the node contains any non RRSIG/NSEC records and report to
* caller. Clean out extraneous RRSIG records for node.
*/
static inline bool
static bool
active_node(dns_dbnode_t *node) {
dns_rdatasetiter_t *rdsiter = NULL;
dns_rdatasetiter_t *rdsiter2 = NULL;
@@ -1256,7 +1266,7 @@ active_node(dns_dbnode_t *node) {
bool found;
dns_rdataset_init(&rdataset);
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets()");
result = dns_rdatasetiter_first(rdsiter);
while (result == ISC_R_SUCCESS) {
@@ -1302,7 +1312,8 @@ active_node(dns_dbnode_t *node) {
/*
* Delete RRSIGs for types that no longer exist.
*/
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter2);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0,
&rdsiter2);
check_result(result, "dns_db_allrdatasets()");
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
@@ -1350,7 +1361,8 @@ active_node(dns_dbnode_t *node) {
check_result(result, "dns_db_deleterdataset("
"rrsig)");
} else if (result != ISC_R_NOMORE &&
result != ISC_R_SUCCESS) {
result != ISC_R_SUCCESS)
{
fatal("rdataset iteration failed: %s",
isc_result_totext(result));
}
@@ -1431,7 +1443,8 @@ setsoaserial(uint32_t serial, dns_updatemethod_t method) {
old_serial = dns_soa_getserial(&rdata);
if (method == dns_updatemethod_date ||
method == dns_updatemethod_unixtime) {
method == dns_updatemethod_unixtime)
{
new_serial = dns_update_soaserial(old_serial, method, &used);
} else if (serial != 0 || method == dns_updatemethod_none) {
/* Set SOA serial to the value provided. */
@@ -1502,7 +1515,7 @@ cleannode(dns_db_t *db, dns_dbversion_t *dbversion, dns_dbnode_t *node) {
}
dns_rdataset_init(&set);
result = dns_db_allrdatasets(db, node, dbversion, 0, &rdsiter);
result = dns_db_allrdatasets(db, node, dbversion, 0, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets");
result = dns_rdatasetiter_first(rdsiter);
while (result == ISC_R_SUCCESS) {
@@ -1646,10 +1659,12 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
!dns_name_issubdomain(name, zonecut)))
{
if (is_delegation(gdb, gversion, gorigin, name,
node, NULL)) {
node, NULL))
{
zonecut = savezonecut(&fzonecut, name);
if (!OPTOUT(nsec3flags) ||
secure(name, node)) {
secure(name, node))
{
found = true;
}
} else if (has_dname(gdb, gversion, node)) {
@@ -1800,7 +1815,7 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which, bool checknsec) {
/*
* Delete any records of the given type at the apex.
*/
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets()");
for (result = dns_rdatasetiter_first(rdsiter); result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter))
@@ -1811,12 +1826,14 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which, bool checknsec) {
dns_rdataset_disassociate(&rdataset);
if (type == which || covers == which) {
if (which == dns_rdatatype_nsec && checknsec &&
!update_chain) {
!update_chain)
{
fatal("Zone contains NSEC records. Use -u "
"to update to NSEC3.");
}
if (which == dns_rdatatype_nsec3param && checknsec &&
!update_chain) {
!update_chain)
{
fatal("Zone contains NSEC3 chains. Use -u "
"to update to NSEC.");
}
@@ -1841,7 +1858,7 @@ remove_sigs(dns_dbnode_t *node, bool delegation, dns_rdatatype_t which) {
dns_rdataset_t rdataset;
dns_rdataset_init(&rdataset);
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets()");
for (result = dns_rdatasetiter_first(rdsiter); result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter))
@@ -1905,7 +1922,8 @@ nsecify(void) {
{
result = dns_dbiterator_current(dbiter, &node, name);
check_dns_dbiterator_current(result);
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0,
&rdsiter);
check_result(result, "dns_db_allrdatasets()");
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
@@ -2263,7 +2281,8 @@ rrset_cleanup(dns_name_t *name, dns_rdataset_t *rdataset, dns_diff_t *add,
count2++;
dns_rdataset_current(&tmprdataset, &rdata2);
if (count1 < count2 &&
dns_rdata_casecompare(&rdata1, &rdata2) == 0) {
dns_rdata_casecompare(&rdata1, &rdata2) == 0)
{
vbprintf(2, "removing duplicate at %s/%s\n",
namestr, typestr);
result = dns_difftuple_create(
@@ -2318,7 +2337,8 @@ cleanup_zone(void) {
{
result = dns_dbiterator_current(dbiter, &node, name);
check_dns_dbiterator_current(result);
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
result = dns_db_allrdatasets(gdb, node, gversion, 0, 0,
&rdsiter);
check_result(result, "dns_db_allrdatasets()");
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
@@ -2430,14 +2450,16 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
continue;
}
if (is_delegation(gdb, gversion, gorigin, nextname,
nextnode, &nsttl)) {
nextnode, &nsttl))
{
zonecut = savezonecut(&fzonecut, nextname);
remove_sigs(nextnode, true, 0);
if (generateds) {
add_ds(nextname, nextnode, nsttl);
}
if (OPTOUT(nsec3flags) &&
!secure(nextname, nextnode)) {
!secure(nextname, nextnode))
{
dns_db_detachnode(gdb, &nextnode);
result = dns_dbiterator_next(dbiter);
continue;
@@ -2571,10 +2593,12 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
continue;
}
if (is_delegation(gdb, gversion, gorigin, nextname,
nextnode, NULL)) {
nextnode, NULL))
{
zonecut = savezonecut(&fzonecut, nextname);
if (OPTOUT(nsec3flags) &&
!secure(nextname, nextnode)) {
!secure(nextname, nextnode))
{
dns_db_detachnode(gdb, &nextnode);
result = dns_dbiterator_next(dbiter);
continue;
@@ -2752,7 +2776,8 @@ loadexplicitkeys(char *keyfiles[], int n, bool setksk) {
/* Skip any duplicates */
for (key = ISC_LIST_HEAD(keylist); key != NULL;
key = ISC_LIST_NEXT(key, link)) {
key = ISC_LIST_NEXT(key, link))
{
if (dst_key_id(key->key) == dst_key_id(newkey) &&
dst_key_alg(key->key) == dst_key_alg(newkey))
{
@@ -3093,7 +3118,8 @@ writeset(const char *prefix, dns_rdatatype_t type) {
name = gorigin;
for (key = ISC_LIST_HEAD(keylist); key != NULL;
key = ISC_LIST_NEXT(key, link)) {
key = ISC_LIST_NEXT(key, link))
{
if (REVOKE(key->key)) {
continue;
}
@@ -3660,14 +3686,14 @@ main(int argc, char *argv[]) {
break;
case 'F':
/* Reserved for FIPS mode */
/* FALLTHROUGH */
/* Reserved for FIPS mode */
FALLTHROUGH;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
usage();
@@ -3792,7 +3818,8 @@ main(int argc, char *argv[]) {
outputformat = dns_masterformat_raw;
rawversion = strtol(outputformatstr + 4, &end, 10);
if (end == outputformatstr + 4 || *end != '\0' ||
rawversion > 1U) {
rawversion > 1U)
{
fprintf(stderr, "unknown raw format version\n");
exit(1);
}
@@ -3898,7 +3925,8 @@ main(int argc, char *argv[]) {
/* Now enumerate the key list */
for (key = ISC_LIST_HEAD(keylist); key != NULL;
key = ISC_LIST_NEXT(key, link)) {
key = ISC_LIST_NEXT(key, link))
{
key->index = keycount++;
}
+18 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
@@ -338,14 +328,23 @@ Options
(-) can be used to indicate that no salt is to be used when
generating the NSEC3 chain.
.. note::
``-3 -`` is the recommended configuration. Adding salt provides no practical benefits.
``-H iterations``
This option indicates that, when generating an NSEC3 chain, BIND 9 should use this many iterations. The default
is 10.
.. warning::
Values greater than 0 cause interoperability issues and also increase the risk of CPU-exhausting DoS attacks. The default value has not been changed because the best practices has changed only after BIND 9.16 reached Extended Support Version status.
``-A``
This option indicates that, when generating an NSEC3 chain, BIND 9 should set the OPTOUT flag on all NSEC3
records and should not generate NSEC3 records for insecure delegations.
.. warning::
Do not use this option unless all its implications are fully understood. This option is intended only for extremely large zones (comparable to ``com.``) with sparse secure delegations.
Using this option twice (i.e., ``-AA``) turns the OPTOUT flag off for
all records. This is useful when using the ``-u`` option to modify an
NSEC3 chain which previously had OPTOUT set.
+4 -2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -133,7 +135,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
"use -o to specify a different zone origin",
origin, file);
}
/* FALLTHROUGH */
FALLTHROUGH;
default:
fatal("failed loading zone from '%s': %s", file,
isc_result_totext(result));
@@ -277,7 +279,7 @@ main(int argc, char *argv[]) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
/* FALLTHROUGH */
FALLTHROUGH;
case 'h':
/* Does not return. */
+9 -19
View File
@@ -1,23 +1,13 @@
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
+7 -4
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -218,7 +220,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) {
default:
fatal("time value %s is invalid", str);
}
/* NOTREACHED */
UNREACHABLE();
break;
case 'W':
case 'w':
@@ -236,11 +238,11 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) {
default:
fatal("time value %s is invalid", str);
}
/* NOTREACHED */
UNREACHABLE();
return (0); /* silence compiler warning */
}
static inline bool
static bool
isnone(const char *str) {
return ((strcasecmp(str, "none") == 0) ||
(strcasecmp(str, "never") == 0));
@@ -311,7 +313,8 @@ strtotime(const char *str, int64_t now, int64_t base, bool *setp) {
*/
n = strspn(str, "0123456789");
if ((n == 8u || n == 14u) &&
(str[n] == '\0' || str[n] == '-' || str[n] == '+')) {
(str[n] == '\0' || str[n] == '-' || str[n] == '+'))
{
char timestr[15];
strlcpy(timestr, str, sizeof(timestr));
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
+3 -1
View File
@@ -1,7 +1,9 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
+3 -11
View File
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, you can obtain one at https://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="html" indent="yes" version="4.0"/>
<xsl:template match="statistics[@version=&quot;3.11&quot;]">
<!-- the version number **below** must match version in bin/named/statschannel.c -->
<!-- don't forget to update "/xml/v<STATS_XML_VERSION_MAJOR>" in the HTTP endpoints listed below -->
<xsl:template match="statistics[@version=&quot;3.11.1&quot;]">
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
+5 -13
View File
@@ -4,23 +4,15 @@
*/
static char xslmsg[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!--\n"
" - Copyright (C) Internet Systems Consortium, Inc. (\"ISC\")\n"
" -\n"
" - This Source Code Form is subject to the terms of the Mozilla "
"Public\n"
" - License, v. 2.0. If a copy of the MPL was not distributed with "
"this\n"
" - file, you can obtain one at https://mozilla.org/MPL/2.0/.\n"
" -\n"
" - See the COPYRIGHT file distributed with this work for additional\n"
" - information regarding copyright ownership.\n"
"-->\n"
"\n"
"<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" "
"xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
" <xsl:output method=\"html\" indent=\"yes\" version=\"4.0\"/>\n"
" <xsl:template match=\"statistics[@version=&quot;3.11&quot;]\">\n"
" <!-- the version number **below** must match version in "
"bin/named/statschannel.c -->\n"
" <!-- don't forget to update \"/xml/v<STATS_XML_VERSION_MAJOR>\" in "
"the HTTP endpoints listed below -->\n"
" <xsl:template match=\"statistics[@version=&quot;3.11.1&quot;]\">\n"
" <html>\n"
" <head>\n"
" <script type=\"text/javascript\" "
+4 -1
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -489,7 +491,8 @@ builtin_create(const char *zone, int argc, char **argv, void *driverdata,
} else if (strcmp(argv[0], "id") == 0) {
*dbdata = &id_builtin;
} else if (strcmp(argv[0], "empty") == 0 ||
strcmp(argv[0], "dns64") == 0) {
strcmp(argv[0], "dns64") == 0)
{
builtin_t *empty;
char *server;
char *contact;
+28 -9
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -18,6 +20,7 @@
#include <isc/buffer.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/netmgr.h>
#include <isc/parseint.h>
#include <isc/region.h>
#include <isc/result.h>
@@ -85,7 +88,15 @@ options {\n\
nta-lifetime 3600;\n\
nta-recheck 300;\n\
# pid-file \"" NAMED_LOCALSTATEDIR "/run/named/named.pid\"; \n\
port 53;\n\
port 53;\n"
#if HAVE_SO_REUSEPORT_LB
"\
reuseport yes;\n"
#else
"\
reuseport no;\n"
#endif
"\
prefetch 2 9;\n\
recursing-file \"named.recursing\";\n\
recursive-clients 1000;\n\
@@ -119,6 +130,7 @@ options {\n\
transfers-out 10;\n\
transfers-per-ns 2;\n\
trust-anchor-telemetry yes;\n\
update-quota 100;\n\
\n\
/* view */\n\
allow-new-zones no;\n\
@@ -318,6 +330,11 @@ named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
CFG_PCTX_NODEPRECATED, conf));
}
const char *
named_config_getdefault(void) {
return (defaultconf);
}
isc_result_t
named_config_get(cfg_obj_t const *const *maps, const char *name,
const cfg_obj_t **obj) {
@@ -347,7 +364,8 @@ named_checknames_get(const cfg_obj_t **maps, const char *const names[],
for (i = 0; maps[i] != NULL; i++) {
checknames = NULL;
if (cfg_map_get(maps[i], "check-names", &checknames) ==
ISC_R_SUCCESS) {
ISC_R_SUCCESS)
{
/*
* Zone map entry is not a list.
*/
@@ -363,7 +381,8 @@ named_checknames_get(const cfg_obj_t **maps, const char *const names[],
for (size_t j = 0; names[j] != NULL; j++) {
if (strcasecmp(cfg_obj_asstring(type),
names[j]) == 0) {
names[j]) == 0)
{
*obj = cfg_tuple_get(value,
"mode");
return (ISC_R_SUCCESS);
@@ -436,7 +455,8 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
if (strcasecmp(str, "primary") == 0 || strcasecmp(str, "master") == 0) {
ztype = dns_zone_primary;
} else if (strcasecmp(str, "secondary") == 0 ||
strcasecmp(str, "slave") == 0) {
strcasecmp(str, "slave") == 0)
{
ztype = dns_zone_secondary;
} else if (strcasecmp(str, "mirror") == 0) {
ztype = dns_zone_mirror;
@@ -447,8 +467,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
} else if (strcasecmp(str, "redirect") == 0) {
ztype = dns_zone_redirect;
} else {
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
return (ztype);
}
@@ -575,7 +594,8 @@ getremotesdef(const cfg_obj_t *cctx, const char *list, const char *name,
while (elt != NULL) {
obj = cfg_listelt_value(elt);
if (strcasecmp(cfg_obj_asstring(cfg_tuple_get(obj, "name")),
name) == 0) {
name) == 0)
{
*ret = obj;
return (ISC_R_SUCCESS);
}
@@ -1057,8 +1077,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
*name = dns_tsig_hmacsha512_name;
break;
default:
INSIST(0);
ISC_UNREACHABLE();
UNREACHABLE();
}
}
if (typep != NULL) {
+3 -1
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -59,7 +61,7 @@ getcommand(isc_lex_t *lex, char **cmdp) {
return (ISC_R_SUCCESS);
}
static inline bool
static bool
command_compare(const char *str, const char *command) {
return (strcasecmp(str, command) == 0);
}
+16 -10
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
@@ -175,7 +177,7 @@ maybe_free_connection(controlconnection_t *conn) {
}
if (conn->timer != NULL) {
isc_timer_detach(&conn->timer);
isc_timer_destroy(&conn->timer);
}
if (conn->ccmsg_valid) {
@@ -220,7 +222,8 @@ shutdown_listener(controllistener_t *listener) {
}
for (conn = ISC_LIST_HEAD(listener->connections); conn != NULL;
conn = next) {
conn = next)
{
next = ISC_LIST_NEXT(conn, link);
maybe_free_connection(conn);
}
@@ -318,7 +321,7 @@ control_senddone(isc_task_t *task, isc_event_t *event) {
}
}
static inline void
static void
log_invalid(isccc_ccmsg_t *ccmsg, isc_result_t result) {
char socktext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_t peeraddr;
@@ -367,7 +370,8 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
if (conn->ccmsg.result != ISC_R_SUCCESS) {
if (conn->ccmsg.result != ISC_R_CANCELED &&
conn->ccmsg.result != ISC_R_EOF) {
conn->ccmsg.result != ISC_R_EOF)
{
log_invalid(&conn->ccmsg, conn->ccmsg.result);
}
goto cleanup;
@@ -430,7 +434,8 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
* Expire messages that are too old.
*/
if (isccc_cc_lookupuint32(_ctrl, "_exp", &exp) == ISC_R_SUCCESS &&
now > exp) {
now > exp)
{
log_invalid(&conn->ccmsg, ISCCC_R_EXPIRED);
goto cleanup_request;
}
@@ -565,10 +570,10 @@ control_timeout(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
isc_timer_detach(&conn->timer);
maybe_free_connection(conn);
isc_event_free(&event);
isc_timer_destroy(&conn->timer);
maybe_free_connection(conn);
}
static isc_result_t
@@ -616,7 +621,7 @@ cleanup:
}
isccc_ccmsg_invalidate(&conn->ccmsg);
if (conn->timer != NULL) {
isc_timer_detach(&conn->timer);
isc_timer_destroy(&conn->timer);
}
isc_mem_put(listener->mctx, conn, sizeof(*conn));
#ifdef ENABLE_AFL
@@ -955,7 +960,8 @@ get_key_info(const cfg_obj_t *config, const cfg_obj_t *control,
control_keylist = cfg_tuple_get(control, "keys");
if (!cfg_obj_isvoid(control_keylist) &&
cfg_list_first(control_keylist) != NULL) {
cfg_list_first(control_keylist) != NULL)
{
result = cfg_map_get(config, "key", &global_keylist);
if (result == ISC_R_SUCCESS) {
+4 -2
View File
@@ -1,9 +1,11 @@
#!/usr/bin/env perl
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
+2
View File
@@ -1,6 +1,8 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.

Some files were not shown because too many files have changed in this diff Show More