Commit Graph

38532 Commits

Author SHA1 Message Date
Michal Nowak
983cebead1 Drop FreeBSD 12
Support for FreeBSD 12.4, the last FreeBSD 12.x release, ended on
December 31, 2023.

Link: https://www.freebsd.org/security/unsupported/

Move the --with-readline=editline ./configure option to FreeBSD 14.

(cherry picked from commit 98bfa22381)
2024-01-26 10:47:23 +01:00
Matthijs Mekking
98db8d9b4c Merge branch '4510-doc-key-lifetime-too-short-9.18' into 'bind-9.18'
[9.18] Fix ZSK lifetime minimum constraints documentation

See merge request isc-projects/bind9!8671
2024-01-25 14:09:09 +00:00
Matthijs Mekking
066b31667a Add CHANGES for #4510
(cherry picked from commit 7e903c52be)
2024-01-25 14:23:06 +01:00
Matthijs Mekking
a64197c80f Fix ZSK lifetime minimum constraints documentation
The ARM failed to mention that the ZSK lifetime minimum also depends
on the signing delay.

(cherry picked from commit 53f0541db6)
2024-01-25 14:22:37 +01:00
Michal Nowak
f132740869 Merge branch 'mnowak/pytest_rewrite_dialup-9.18' into 'bind-9.18'
[9.18] Rewrite dialup system test to pytest

See merge request isc-projects/bind9!8669
2024-01-24 13:45:55 +00:00
Michal Nowak
816d26eb0d Rewrite dialup system test to pytest
(cherry picked from commit bc4c29888b)
2024-01-24 13:48:10 +01:00
Michal Nowak
03155da31e Speed up test by lowering "heartbeat-interval" to 1
(cherry picked from commit 6c6580ea83)
2024-01-24 13:48:10 +01:00
Tom Krizek
5bc557c3bb Merge branch '4445-stop-leaking-queries-to-root-in-tests-9.18' into 'bind-9.18'
[9.18] Ensure no test queries leak to root server

See merge request isc-projects/bind9!8666
2024-01-19 15:13:02 +00:00
Tom Krizek
e5403f39c1 Delete unused config file in dnssec system test
(cherry picked from commit f69df830c6)
2024-01-19 15:24:08 +01:00
Tom Krizek
d9fd971231 Ensure tests use mock root server if configured
These tests have ns1 configured as a mock root server. Make sure it is
used in all config files of those tests, otherwise some queries could
leak to root nameservers.

(cherry picked from commit 088fcf9a61)
2024-01-19 15:24:07 +01:00
Tom Krizek
1997c36ce4 Blackhole queries to root servers in tests
Some tests don't have a mock root server configured, because they don't
need one. However, these tests might still leak queries to actual name
servers. Add a shared root hints file which can serve as a blackhole for
these queries.

(cherry picked from commit 8434e5abfc)
2024-01-19 15:24:07 +01:00
Tom Krizek
b025e8dd2d Don't use root server in addzone test
(cherry picked from commit 7037eb96d4)
2024-01-19 15:24:05 +01:00
Michal Nowak
da7e6a3286 Merge branch 'mnowak/rpz-drop-queryperf-support-9.18' into 'bind-9.18'
[9.18] Drop queryperf support from rpz system test

See merge request isc-projects/bind9!8665
2024-01-19 13:47:49 +00:00
Michal Nowak
b1fc4f7dee Drop queryperf support from rpz system test
The queryperf support in the rpz system test is not utilized in the CI,
is likely not unused at all, and should be dropped.

(cherry picked from commit eaab796310)
2024-01-19 12:08:23 +01:00
Mark Andrews
eeef5371b6 Merge branch '4541-values-of-ruletype-field-for-update-policy-statement-bind-9.18' into 'bind-9.18'
[9.18] Resolve "values of ruletype field for update-policy statement"

See merge request isc-projects/bind9!8664
2024-01-19 06:17:22 +00:00
Mark Andrews
ce5fc0e466 Fix rule count, should be 18
(cherry picked from commit 81f9bcefaf)
2024-01-19 16:20:47 +11:00
Tom Krizek
d629795f36 Merge branch 'tkrizek/split-up-dnsrps-test-cases' into 'bind-9.18'
[9.18] Split up the dnsrps and native variants of rpz system tests

See merge request isc-projects/bind9!8661
2024-01-18 17:26:57 +00:00
Tom Krizek
575728dee8 Remove extraneous dnsrps-secondary.conf from rpz tests
The contents of the dnsrps-secondary.conf file are identical to the
contents of dnsrps.conf. Remove it since it's redundant.
2024-01-18 17:05:11 +01:00
Tom Krizek
cd6c9590f1 Remove obsolete ckdnsrps.sh script
As dnsrps and native test cases have been properly split up, the
ckdnsrps.sh script is no longer used anywhere, as the logic for
selecting these test cases is handled by pytest.

(cherry picked from commit b1d71c4d26)
2024-01-18 17:05:10 +01:00
Tom Krizek
bb5b41ad95 Split up the dnsrps and native variants of rpz system tests
Previously, dnsrps test was executed as an optional part of the rpz and
rpzrecurse system tests. This was conceptually problematic, as the test
took the responsibility of running parts of the test framework -
cleaning files and setting up servers again.

Instead, allow these tests to execute either the native variant, or the
dnsrps one. To ensure the same test coverage, trigger both of these
variants as separate test cases from pytest.

(cherry picked from commit cb55fb2cae)
2024-01-18 17:05:09 +01:00
Ondřej Surý
231dc3ff15 Merge branch '4404-add-workaround-to-force-jemalloc-linking-order-9.18' into 'bind-9.18'
[9.18] Add workaround for jemalloc linking order

See merge request isc-projects/bind9!8659
2024-01-18 10:24:16 +00:00
Ondřej Surý
e0bcda8923 Add CHANGES note for [GL #4404]
(cherry picked from commit ec12682933)
2024-01-18 10:40:46 +01:00
Aydın Mercan
3d0bfa3f28 Link jemalloc again for testing unit build order
(cherry picked from commit 6215206801)
2024-01-18 10:40:46 +01:00
Aydın Mercan
afb0b3971c Forward declare mallocx in isc/mem.h
cmocka.h and jemalloc.h/malloc_np.h has conflicting macro definitions.
While fixing them with push_macro for only malloc is done below, we only
need the non-standard mallocx interface which is easy to just define by
ourselves.

(cherry picked from commit 197de93bdc)
2024-01-18 10:40:46 +01:00
Ondřej Surý
f82f4d1d77 Add workaround for jemalloc linking order
Because we don't use jemalloc functions directly, but only via the
libisc library, the dynamic linker might pull the jemalloc library
too late when memory has been already allocated via standard libc
allocator.

Add a workaround round isc_mem_create() that makes the dynamic linker
to pull jemalloc earlier than libc.

(cherry picked from commit 41a0ee1071)
2024-01-18 10:40:46 +01:00
Tom Krizek
705924d233 Merge branch '3535-fetchlimit-test-flaky-9.18' into 'bind-9.18'
[9.18] Allow the fetchlimit test to be re-run

See merge request isc-projects/bind9!8657
2024-01-17 16:34:53 +00:00
Tom Krizek
a1af755a14 Allow the fetchlimit test to be re-run
The test is known to be unstable due to timing issues. Prevent frequent
false positives by allowing the test to be re-run by the flaky pytest
plugin.

(cherry picked from commit 10827fe96c)
2024-01-17 16:36:03 +01:00
Tom Krizek
4679bfe604 Don't type-check the flaky plugin with mypy
Since we execute mypy for bin/tests/system/isctest package, this is now
needed because the flaky package doesn't have type hints.

(cherry picked from commit a65b654a23)
2024-01-17 16:36:03 +01:00
Tom Krizek
af12ce03f3 Move custom pytest markers into isctest module
Keep our pytest code more organized by moving the shared code for custom
pytest markers into a dedicated isctest/mark.py module.

(cherry picked from commit f314f1b432)
2024-01-17 16:36:03 +01:00
Matthijs Mekking
17efc13cab Merge branch 'matthijs-fix-cds-is-published-log' into 'bind-9.18'
Fix CDS/CDNSKEY is published logging

See merge request isc-projects/bind9!8656
2024-01-17 12:31:07 +00:00
Matthijs Mekking
0daae0bdcf Fix CDS/CDNSKEY is published logging
The logs were misplaced, it was logging "CDS is published" when the
CDNSKEY is being published and vice versa.
2024-01-17 10:05:20 +01:00
Michal Nowak
db65a582fa Merge branch 'mnowak/pytest_rewrite_spf-9.18' into 'bind-9.18'
[9.18] Rewrite spf system test to pytest

See merge request isc-projects/bind9!8613
2024-01-15 17:36:12 +00:00
Michal Nowak
dfe31f7395 Rewrite spf system test to pytest
(cherry picked from commit e67d770432)
2024-01-15 17:14:06 +01:00
Michał Kępień
24fd30f7eb Add wait_for_zones_loaded fixture
The wait_for_zones_loaded fixture waits for the "all zones loaded"
message in the named log file before the test function can proceed.

(cherry picked from commit 662a88055c)
2024-01-15 17:14:06 +01:00
Michał Kępień
b09835a5d1 Ensure wait_for_line() is not called with timeout=0
(cherry picked from commit 1770b37095)
2024-01-15 17:14:06 +01:00
Michał Kępień
93b4b110a7 Refactor string matching loop for readability
(cherry picked from commit 831c5d34f9)
2024-01-15 17:14:06 +01:00
Tom Krizek
f45e777b9f Add LogFile helper
LogFile class contains a log path and has means to find a string in the
log file.

(cherry picked from commit 05b0ebac0f)
2024-01-15 17:14:06 +01:00
Michał Kępień
93d9c61464 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.24' into 'bind-9.18'
Set up version and release notes for BIND 9.18.24

See merge request isc-projects/bind9!8653
2024-01-15 14:53:32 +00:00
Michał Kępień
695b9394d1 Account for February 2024 releases in CHANGES 2024-01-15 15:46:01 +01:00
Michał Kępień
6e0dc71a12 Set up release notes for BIND 9.18.24 2024-01-15 15:46:01 +01:00
Michał Kępień
301ac411fb Update BIND version to 9.18.24-dev 2024-01-15 15:46:01 +01:00
Artem Boldariev
7fb5d5b9e7 Merge branch '4528-honor-listen-on-changes-v9.18' into 'bind-9.18'
[9.18] Recreate listeners on DNS transport change

See merge request isc-projects/bind9!8652
2024-01-15 13:07:55 +00:00
Artem Boldariev
6fe3abc1ba Update release notes [GL #4518] [GL #4528]
Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

(cherry picked from commit ad5378fad7)
2024-01-15 14:31:20 +02:00
Artem Boldariev
4d5320c540 Update CHANGES [GL #4518] [GL #4528]
Mentioned that all changes to listen-on statements are now applied on
reconfiguration.

(cherry picked from commit d1a2ad0f44)
2024-01-15 14:31:06 +02:00
Artem Boldariev
a76e304f5e Add a system test to verify listener transport change functionality
This commit adds a system test that helps to verify that changing a
listener transport by editing "listen-on" statements before
reconfiguration works as expected.

(cherry picked from commit 211f12ff85)
2024-01-15 14:31:06 +02:00
Artem Boldariev
cff69c65b5 Fix flawed logic when detecting same listener type
The older version of the code was reporting that listeners are going
to be of the same type after reconfiguration when switching from DoT
to HTTPS listener, making BIND abort its executions.

That was happening due to the flaw in logic due to which the code
could consider a current listener and a configuration for the new one
to be of the same type (DoT) even when the new listener entry is
explicitly marked as HTTP.

The checks for PROXY in between the configuration were masking that
behaviour, but when porting it to 9.18 (when there is no PROXY
support), the behaviour was exposed.

Now the code mirrors the logic in 'interface_setup()' closely (as it
was meant to).

(cherry picked from commit 8ae661048d)
2024-01-15 14:31:06 +02:00
Artem Boldariev
2be0acf3f3 Recreate listeners on DNS transport change
This commit ensures that listeners are recreated on reconfiguration in
the case when their type changes (or when PROXY protocol type changes,
too).

Previously, if a "listen-on" statement was modified to represent a
different transport, BIND would not pick-up the change on
reconfiguration if listener type changes (e.g. DoH -> DoT) for a given
interface address and port combination. This commit fixes that by
recreating the listener.

Initially, that worked for most of the new transports as we would
recreate listeners on each reconfiguration for DoH and DoT. But at
some point we changed that in such a way that listeners were not
recreated to avoid rebinding a port as on some platforms only root can
do that for port numbers <1000, making some ports binding possible
only on start-up. We chose to asynchronously update listener socket
settings (like TLS contexts, HTTP settings) instead.

Now, we both avoid recreating the sockets if unnecessary and recreate
listeners when listener type changes.

(cherry picked from commit d59cf5e0ce)
2024-01-15 14:31:06 +02:00
Štěpán Balážik
d12ff65491 Merge branch 'stepan/rndc-fixtures-for-pytest-9.18' into 'bind-9.18'
[9.18] Implement Python helpers for using RNDC in tests

See merge request isc-projects/bind9!8611
2024-01-15 12:15:13 +00:00
Michał Kępień
77b611be7c Add reconfiguration support to NamedInstance
Reconfiguring named using RNDC is a common action in BIND 9 system
tests.  It involves sending the "reconfig" RNDC command to a named
instance and waiting until it is fully processed.  Add a reconfigure()
method to the NamedInstance class in order to simplify and standardize
named reconfiguration using RNDC in Python-based system tests.

TODO:

  - full reconfiguration support (w/templating *.in files)

  - add an "rndc null" before every reconfiguration to show which file
    is used (NamedInstance.add_mark_to_log() as it may be generically
    useful?)

(cherry picked from commit fdc45c70e8)
2024-01-13 11:31:51 +01:00
Michał Kępień
3bfead4f5d Run mypy checks on Python helpers in GitLab CI
Ensure the type hints provided in helper code for Python-based system
tests are correct by continuously checking them using mypy in GitLab CI.
Check bin/tests/system/isctest.py exclusively for the time being because
it is the only Python file in the source tree which uses static typing
at the moment and working around the issues reported by mypy for other
(non-statically-typed) Python files present in the source tree would be
cumbersome.

(cherry picked from commit 989d22473d)
2024-01-13 11:31:51 +01:00