Commit Graph

33185 Commits

Author SHA1 Message Date
Michal Nowak
2d4448c53e Merge branch '2692-grep-from-freebsd-13-0-stumbles-on-r-in-digdelv-test' into 'v9_16'
Do not use escape codes for matching with grep

See merge request isc-projects/bind9!5023
2021-05-17 11:12:17 +00:00
Michal Nowak
253ae96bf1 Do not use escape codes for matching with grep
FreeBSD 13.0 replaced GNU grep with BSD grep and removed support for
"redundant escapes for most ordinary characters" from regex(3) library,
therefore the matching sequence in digdelv/tests.sh needs to be
rewritten otherwise it fails with:

    grep: trailing backslash (\)
2021-05-17 13:10:28 +02:00
Ondřej Surý
21f10fa8c8 Merge branch 'ondrej/remove-netmgr-quantum-v9_16' into 'v9_16'
Replace netmgr quantum with loop-preventing barrier

See merge request isc-projects/bind9!5032
2021-05-17 11:05:38 +00:00
Ondřej Surý
fb9a79ffb6 Replace netmgr quantum with loop-preventing barrier
Instead of using fixed quantum, this commit adds atomic counter for
number of items on each queue and uses the number of netievents
scheduled to run as the limit of maximum number of netievents for a
single process_queue() run.

This prevents the endless loops when the netievent would schedule more
netievents onto the same loop, but we don't have to pick "magic" number
for the quantum.

(cherry picked from commit 9e3cb396b2)
2021-05-17 12:06:07 +02:00
Michal Nowak
570c22da13 Merge branch '2693-add-py-test-to-the-list-of-tested-pytest-names-v9_16' into 'v9_16'
[v9_16] Add py.test to the list of tested pytest names

See merge request isc-projects/bind9!5030
2021-05-17 09:57:54 +00:00
Michal Nowak
cfb8cf5294 Add py.test to the list of tested pytest names
OpenBSD changed the name of the pytest script from py.test-3 in OpenBSD
6.8 to py.test in OpenBSD 6.9.

The py.test-3 name which was added in d5562a3e for the sake of OpenBSD
and CentOS is still required for CentOS.

(cherry picked from commit 510b4b70e9)
2021-05-17 11:28:31 +02:00
Michal Nowak
a06c737377 Merge branch '2386-check-correct-copyright-dates-in-man-pages-v9_16' into 'v9_16'
[v9_16] Set copyright year to the current year

See merge request isc-projects/bind9!5027
2021-05-14 13:24:39 +00:00
Michal Nowak
56cd1f041c Set copyright year to the current year
To ensure that a release with outdated copyright year is not produced at
the beginning of a year, set copyright year to the current year.

(cherry picked from commit 7eb44b05c5)
2021-05-14 14:47:35 +02:00
Ondřej Surý
a822caa3f3 Merge branch 'each-backport-netmgr' into 'v9_16'
Full backport of netmgr/taskmgr to 9.16

See merge request isc-projects/bind9!5018
2021-05-14 11:17:56 +00:00
Evan Hunt
4c9c6a8823 CHANGES, release notes 2021-05-14 12:52:48 +02:00
Ondřej Surý
4d027ab945 Remove TLSDNS, TLS and HTTP protocols from netmgr
For further stabilization of the 9.16 branch, we are removing the unused
protocols from the netmgr.
2021-05-14 12:52:48 +02:00
Ondřej Surý
6a1dba7232 Fix nanosleep and usleep
- Add POSIX nanosleep() and usleep() shim implementation for Windows
  to help implementors use less #ifdef _WIN32 in the code.
- Use uv_sleep when possible in the netmgr code and define usleep based
  shim for libuv << 1.34.0.
2021-05-14 12:52:48 +02:00
Ondřej Surý
6da96c61f8 Fix the outgoing UDP socket selection on Windows
The outgoing UDP socket selection would pick unintialized children
socket on Windows, because we have more netmgr workers than we have
listening sockets.  This commit fixes the selection by keeping the
outgoing socket the same, so it's always run on existing socket.

(cherry picked from commit cd413234f7)
2021-05-14 12:52:48 +02:00
Evan Hunt
e4c9652382 hacks to get dyndb working without libtool
- memory tracing failed if the driver didn't have access
  to the isc_mem_debugging variable.
- remove RTLD_DEEPBIND from dlopen() flags as it causes
  shared libraries to be unable to access thread-local storage,
  which is needed when enqueuing tasks.
2021-05-14 12:52:48 +02:00
Evan Hunt
ef1d909fa9 backport of netmgr/taskmgr to 9.16
this rolls up numerous changes that have been applied to the
main branch, including moving isc_task operations into the
netmgr event loops, and other general stabilization.
2021-05-14 12:52:48 +02:00
Ondřej Surý
d98ad30c0d Merge branch 'ondrej/add-nanosleep-and-usleep-windows-shims-v9_16' into 'v9_16'
Add nanosleep and usleep Windows shims

See merge request isc-projects/bind9!5026
2021-05-14 10:21:36 +00:00
Ondřej Surý
a09822b624 Add nanosleep and usleep Windows shims
This commit adds POSIX nanosleep() and usleep() shim implementation for
Windows to help implementors use less #ifdef _WIN32 in the code.

(cherry picked from commit c37ff5d188)
2021-05-14 12:19:48 +02:00
Ondřej Surý
906cca09dc Merge branch 'ondrej/replace-CreateThreads-with-isc_thread_create-v9_16' into 'v9_16'
Add trampoline around iocompletionport_createthreads()

See merge request isc-projects/bind9!5025
2021-05-14 10:16:00 +00:00
Ondřej Surý
7e8f4b1df6 Add trampoline around iocompletionport_createthreads()
On Windows, the iocompletionport_createthreads() didn't use
isc_thread_create() to create new threads for processing IO, but just a
simple CreateThread() function that completely circumvent the
isc_trampoline mechanism to initialize global isc_tid_v.  This lead to
segmentation fault in isc_hp API because '-1' isn't valid index to the
hazard pointer array.

This commit changes the iocompletionport_createthreads() to use
isc_thread_create() instead of CreateThread() to properly initialize
isc_tid_v.

(cherry picked from commit cd54bbbd9a)
2021-05-14 12:14:23 +02:00
Mark Andrews
5feb6f79b8 Merge branch '2528-check-soa-rdata-v9_16' into 'v9_16'
Check that the first and last SOA of an AXFR are consistent

See merge request isc-projects/bind9!5015
2021-05-13 13:35:48 +00:00
Evan Hunt
6f6ac57cb5 system test
Attempt a zone transfer with mismatched SOA records.

(cherry picked from commit 4d94f82232)
2021-05-13 23:17:06 +10:00
Mark Andrews
eded531bee Add CHANGES entry for [GL #2528]
(cherry picked from commit 7e54d8d2cb)
2021-05-13 16:01:51 +10:00
Mark Andrews
0ec28efe86 Check that the first and last SOA of an AXFR are consistent
(cherry picked from commit e86508708d)
2021-05-13 16:01:27 +10:00
Matthijs Mekking
43dbce7f0b Merge branch '2603-test-dnssec-policy-none-v9_16' into 'v9_16'
dnssec-policy check for duplicate writable file (9.16)

See merge request isc-projects/bind9!5000
2021-05-05 17:12:50 +00:00
Matthijs Mekking
72deed194d Use isdigit instead of checking character range
When looking for key files, we could use isdigit rather than checking
if the character is within the range [0-9].

Use (unsigned char) cast to ensure the value is representable in the
unsigned char type (as suggested by the isdigit manpage).

Change " & 0xff" occurrences to the recommended (unsigned char) type
cast.

(cherry picked from commit 1998ad6c776a9c17c27788b17765dee90d9e25df)
2021-05-05 18:23:53 +02:00
Matthijs Mekking
353161bd3c Changes and release notes for [#2603]
(cherry picked from commit 7663c17f3b3d2b1600a6864bec90bb045763a96a)
2021-05-05 18:23:51 +02:00
Matthijs Mekking
861b2a14bb Check for filename clashes /w dnssec-policy zones
Just like with dynamic and/or inline-signing zones, check if no two
or more zone configurations set the same filename. In these cases,
the zone files are not read-only and named-checkconf should catch
a configuration where multiple zone statements write to the same file.

Add some bad configuration tests where KASP zones reference the same
zone file.

Update the good-kasp test to allow for two zones configure the same
file name, dnssec-policy none.

(cherry picked from commit 0b5fc0afcfd1a0bb7c1f16b63872b7ee26fb2777)
2021-05-05 18:22:42 +02:00
Matthijs Mekking
f42234fef0 Check zonefile is untouched if dnssec-policy none
Make sure no DNSSEC contents are added to the zonefile if dnssec-policy
is set to "none" (and no .state files exist for the zone).

(cherry picked from commit 5246c16f43e6fda7587193a4dd801951cf87db14)
2021-05-05 18:22:32 +02:00
Mark Andrews
9bb1adb347 Merge branch '2670-always-set-rewrite-when-compacting-a-version-1-journal-v9_16' into 'v9_16'
Allow named-journalprint to compact journals at a given serial

See merge request isc-projects/bind9!4999
2021-05-05 13:52:52 +00:00
Mark Andrews
054c2c6490 Add release note for [GL #2670]
(cherry picked from commit a60b54e1df)
2021-05-05 23:36:06 +10:00
Mark Andrews
84dbaad15a Add CHANGES note for [GL #2670]
(cherry picked from commit 79da175a76)
2021-05-05 23:36:06 +10:00
Mark Andrews
966bcfb89d Check journal compaction
(cherry picked from commit ae1ae07b03)
2021-05-05 23:36:06 +10:00
Mark Andrews
c659fed6ad Always perform a re-write when processing a version 1 journal
version 1 journals may have a mix of type 1 and type 2 transaction
headers so always use the recovery code.

(cherry picked from commit 4a8e33b9f0)
2021-05-05 23:36:06 +10:00
Mark Andrews
f10645f21d Allow named-journalprint to compact journals at a given serial
(cherry picked from commit 71df4fb84c)
2021-05-05 23:36:06 +10:00
Matthijs Mekking
d15e4dbc6e Merge branch '2596-dnssec-policy-keys-inaccessiblev9_16' into 'v9_16'
Don't roll keys when private key is offline (9.16)

See merge request isc-projects/bind9!4998
2021-05-05 12:13:17 +00:00
Matthijs Mekking
68bdca4730 No longer need to strcmp for "none"
When we introduced "dnssec-policy insecure" we could have removed the
'strcmp' check for "none", because if it was set to "none", the 'kasp'
variable would have been set to NULL.

(cherry picked from commit 636ff1e15c)
2021-05-05 12:54:05 +02:00
Matthijs Mekking
1d16443fde Changes and release notes for [#2596]
(cherry picked from commit 366ed047dd)
2021-05-05 12:54:05 +02:00
Matthijs Mekking
bc641fc965 Add kasp tests for offline keys
Add a test for default.kasp that if we remove the private key file,
no successor key is created for it. We need to update the kasp script
to deal with a missing private key. If this is the case, skip checks
for private key files.

Add a test with a zone for which the private key of the ZSK is missing.

Add a test with a zone for which the private key of the KSK is missing.

(cherry picked from commit 4a8ad0a77f)
2021-05-05 12:50:07 +02:00
Matthijs Mekking
23b85a4679 Update smart signing when key is offline
BIND 9 is smart about when to sign with what key. If a key is offline,
BIND will delete the old signature anyway if there is another key to
sign the RRset with.

With KASP we don't want to fallback to the KSK if the ZSK is missing,
only for the SOA RRset. If the KSK is missing, but we do have a ZSK,
deleting the signature is fine. Otherwise it depends on if we use KASP
or not. Update the 'delsig_ok' function to reflect that.

(cherry picked from commit 6a60bf637d)
2021-05-05 12:50:00 +02:00
Matthijs Mekking
4e87664fef Don't roll offline keys
When checking the current DNSSEC state against the policy, consider
offline keys. If we didn't found an active key, check if the key is
offline by checking the public key list. If there is a match in the
public key list (the key data is retrieved from the .key and the
.state files), treat the key as offline and don't create a successor
key for it.

(cherry picked from commit 3e6fc49c16)
2021-05-05 12:49:49 +02:00
Matthijs Mekking
ff4930951c rndc dnssec -status should include offline keys
The rndc command 'dnssec -status' only considered keys from
'dns_dnssec_findmatchingkeys' which only includes keys with accessible
private keys. Change it so that offline keys are also listed in the
status.

(cherry picked from commit b3a5859a9b)
2021-05-05 12:49:38 +02:00
Matthijs Mekking
ebb793bfd5 Try to read state when reading keylist from rdata
The function 'dns_dnssec_keylistfromrdataset()' creates a keylist from
the DNSKEY RRset. If we attempt to read the private key, we also store
the key state. However, if the private key is offline, the key state
will not be stored. To fix this, first attempt to read the public key
file. If then reading the private key file fails, and we do have a
public key, add that to the keylist, with appropriate state. If we
also failed to read the public key file, add the DNSKEY to the keylist,
as we did before.

(cherry picked from commit 7ed089576f)
2021-05-05 12:49:30 +02:00
Matthijs Mekking
87e90f27a8 When reading public key from file, also read state
The 'dst_key_fromnamedfile()' function did not read and store the
key state from the .state file when reading a public key file.

(cherry picked from commit fa05c1b8da)
2021-05-05 12:49:22 +02:00
Matthijs Mekking
03e90aa50a Fix a kasp lock issue
The kasp lock would stay locked if 'dns_keymgr_run' failed.

(cherry picked from commit cf17698f87)
2021-05-05 12:49:12 +02:00
Ondřej Surý
4c2c75a806 Merge branch '2671-change-default-for-max-ixfr-ratio-to-unlimited-on-bind-9-16' into 'v9_16'
Change the max-ixfr-ratio default value to unlimited

See merge request isc-projects/bind9!4993
2021-05-05 09:10:34 +00:00
Ondřej Surý
ce5f036cff Add CHANGES and release note for [GL #2671] 2021-05-05 10:24:42 +02:00
Ondřej Surý
8d92112de9 Change the max-ixfr-ratio default value to unlimited
When the feature was backported, we should have leave it disabled by
default, it turns out the default `100%` is producing some unexpected
results (under investigation), so for the time being, we are going to to
disable the max-ixfr-ratio.
2021-05-05 10:24:42 +02:00
Mark Andrews
059358c494 Merge branch '2678-named-checkconf-doesn-t-catch-redefinition-of-dnssec-policy-insecure-v9_16' into 'v9_16'
named-checkconf now detects redefinition of dnssec-policy 'insecure'

See merge request isc-projects/bind9!4995
2021-05-05 07:29:44 +00:00
Mark Andrews
cb77a8efed named-checkconf now detects redefinition of dnssec-policy 'insecure'
(cherry picked from commit dba13d280a)
2021-05-05 17:05:17 +10:00
Michal Nowak
7cc68a9def Merge branch 'mnowak/use-sigabrt-from-start.pl-v9_16' into 'v9_16'
[v9_16] Use SIGABRT instead of SIGKILL to produce cores on failed start

See merge request isc-projects/bind9!4991
2021-05-04 15:54:08 +00:00