2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

41111 Commits

Author SHA1 Message Date
Mark Andrews
ad083897cc Stop named-checkzone leaking test queries 2024-03-21 01:10:36 +00:00
Mark Andrews
c8efe7fe1d Merge branch '4580-add-resolver-arpa-to-the-built-in-empty-zones' into 'main'
Resolve "Add resolver.arpa to the built in empty zones"

Closes #4580

See merge request isc-projects/bind9!8732
2024-03-20 21:51:24 +00:00
Mark Andrews
ecb043fc7b Add release note for [GL #4580] 2024-03-21 07:45:55 +11:00
Mark Andrews
d12c238750 Add CHANGES entry for [GL #4580] 2024-03-21 07:45:55 +11:00
Mark Andrews
49561277de Add RESOLVER.ARPA to the built in empty zones
RFC 9462 adds RESOLVER.ARPA to the list of built in empty zones.
2024-03-21 07:45:55 +11:00
Michał Kępień
22591ae0a7 Merge tag 'v9.19.22' 2024-03-20 14:04:49 +01:00
Michał Kępień
13c6f25abb Merge branch 'michal/add-an-async-dns-server-for-use-in-system-tests' into 'main'
Add an async DNS server for use in system tests

See merge request isc-projects/bind9!8519
2024-03-20 09:28:43 +00:00
Tom Krizek
673387c4d5
Move conftest log initialization to conftest.py
Initializing the conftest logging upon importing the isctest package
isn't practical when there are standalone pieces which can be used
outside of the testing framework, such as the asyncdnsserver module.
2024-03-20 09:22:36 +01:00
Michał Kępień
6c010a5644
Add an async DNS server for use in system tests
Implement a new Python class, AsyncDnsServer, which can be used by
ans.py scripts placed in ansX/ system test subdirectories.  This enables
conveniently starting a feature-limited, non-standards-compliant, custom
DNS server instance.  It can read and serve zone files, but it is also
able to evaluate any user-provided query-processing logic, allowing
query responses to be changed, delayed, or dropped altogether.  These
are all actions commonly taken by custom DNS servers written in Python
that are used in BIND 9 system tests.  Having a single "base"
implementation of such a custom DNS server reduces code duplication,
improving test maintainability.

Co-authored-by: Tom Krizek <tkrizek@isc.org>
2024-03-20 09:22:36 +01:00
Mark Andrews
d3172cb47c Merge branch '4645-cid-488064-passing-null-pointer-version-to-maybe_update_recordsandsize-which-dereferences-it' into 'main'
Resolve "CID 488064: Passing null pointer "version" to "maybe_update_recordsandsize", which dereferences it"

Closes #4645 and #4646

See merge request isc-projects/bind9!8880
2024-03-19 22:41:35 +00:00
Mark Andrews
4d2d80f534 Remove remenants of cache support from qpzone.c
These where leading to Coverity errors being reported.
2024-03-19 22:04:10 +00:00
Michal Nowak
e790b0cba1 Merge branch 'mnowak/pytest_rewrite_glue' into 'main'
Rewrite glue system test to pytest

See merge request isc-projects/bind9!8846
2024-03-19 19:16:53 +00:00
Michal Nowak
69d3efed89
Use bitwise operation to remove RD from default flags 2024-03-19 19:28:55 +01:00
Michal Nowak
9950f6d651
Rewrite glue system test to pytest
Limit dnspython to version 2.0.0+
(https://github.com/rthalley/dnspython/pull/503), otherwise the test
fails with:

    E   AttributeError: module 'dns.edns' has no attribute 'OptionType'
2024-03-19 19:28:55 +01:00
Michal Nowak
c252ca2ce5 Merge branch 'mnowak/pytest_rewrite_masterfile' into 'main'
Rewrite masterfile system test to pytest

See merge request isc-projects/bind9!8791
2024-03-19 10:38:07 +00:00
Michal Nowak
7a161f615a
Rewrite masterfile system test to pytest 2024-03-19 10:51:02 +01:00
Michal Nowak
686033e48d
Add zones_equal() with optional TTL comparison 2024-03-19 10:51:02 +01:00
Michal Nowak
5af3b713af
Modify rrsets_equal() to optionally compare TTL 2024-03-19 10:51:01 +01:00
Michal Nowak
db272a4968 Merge branch 'mnowak/pytest_rewrite_limits' into 'main'
Rewrite limits system test to pytest

See merge request isc-projects/bind9!8798
2024-03-18 15:32:47 +00:00
Michal Nowak
f90a772298
Rewrite limits system test to pytest
Also, tweak the IP ranges of A RRsets so they are more easily processed
by for loops.
2024-03-18 15:59:46 +01:00
Michal Nowak
67087b6c43 Merge branch 'mnowak/freebsd-13.3' into 'main'
Add FreeBSD 13.3

See merge request isc-projects/bind9!8826
2024-03-18 14:59:33 +00:00
Michal Nowak
9019985d2d
Add FreeBSD 13.3 2024-03-18 15:36:54 +01:00
Mark Andrews
0906848ae9 Merge branch '4641-dig-ednsflags-does-not-re-enable-edns' into 'main'
Resolve "dig +ednsflags does not re-enable EDNS"

Closes #4641

See merge request isc-projects/bind9!8874
2024-03-17 03:06:22 +00:00
Mark Andrews
b41d1820d2 Add CHANGES for [GL #4641 2024-03-16 16:26:47 +11:00
Mark Andrews
8babbd09a1 Test +noedns +ednsflags=non-zero-value 2024-03-16 16:26:17 +11:00
Mark Andrews
d74bba4fae Re-enable EDNS if an EDNS flag gets set to 1 by +ednsflags
This is consistent with +dnssec and +nsid which only re-enable
EDNS if do is set to 1 or nsid is requested.
2024-03-16 16:07:55 +11:00
Michal Nowak
cbc121ce9a Merge branch 'mnowak/move-stress-tests-to-freebsd-13' into 'main'
FreeBSD "stress" tests now run on FreeBSD 13.2

See merge request isc-projects/bind9!8689
2024-03-15 11:12:11 +00:00
Michal Nowak
176bf877e1
FreeBSD "stress" tests now run on FreeBSD 13.2 2024-03-15 12:11:08 +01:00
Michal Nowak
f7f7b09d98 Merge branch 'mnowak/pytest_rewrite_rrchecker' into 'main'
Rewrite rrchecker system test to pytest

See merge request isc-projects/bind9!8832
2024-03-15 09:05:20 +00:00
Michal Nowak
6a301c1d35
Rewrite rrchecker system test to pytest 2024-03-15 09:40:01 +01:00
Mark Andrews
4be1db6e82 Merge branch '4639-add-openssl-flags-to-proxystream_test' into 'main'
Resolve "Add OpenSSL Flags to proxystream_test"

Closes #4639

See merge request isc-projects/bind9!8869
2024-03-14 23:42:25 +00:00
Mark Andrews
52b053537d Add OpenSSL libraries and flags to proxystream_test 2024-03-15 10:08:57 +11:00
Evan Hunt
120b4a9ef9 Merge branch '4614-qpdb-excess-memory' into 'main'
reduce memory consumption of QP zone and cache databases

Closes #4614

See merge request isc-projects/bind9!8849
2024-03-14 18:06:54 +00:00
Evan Hunt
1f67a3f474 CHANGES for [GL #4614] 2024-03-14 10:25:12 -07:00
Evan Hunt
17186e06bb reduce memory consumption of the remaining QP databases
use dynamically allocated names instead of fixednames in
forward.c, keytable.c, nametree.c, and nta.c
2024-03-14 10:25:07 -07:00
Evan Hunt
c0fcc2899e reduce memory consumption of rpz summary database
use dynamically allocated names instead of fixednames in rpz.c
2024-03-14 10:20:52 -07:00
Evan Hunt
8b67476249 reduce memory consumption of qpcache database
as with qpzone, use a dynamically-allocated dns_name instead
of a dns_fixedname object to store node names in the QP database.
2024-03-14 10:20:52 -07:00
Evan Hunt
f908d358c4 reduce memory consumption of qpzone database
every node of a QP database contains a copy of the nodename,
which is used as the key for the QP-trie. previously, the name
was stored as a dns_fixedname object, which has room for up to
255 characters. we can reduce the space consumed by dynamically
allocating a dns_name object that's just long enough for the name
to be stored.
2024-03-14 10:20:52 -07:00
Matthijs Mekking
78aa2fb64c Merge branch '4629-cid-487882-error-handling-issues' into 'main'
Resolve "CID 487882: Error handling issues in lib/dns/qpzone.c"

Closes #4629

See merge request isc-projects/bind9!8852
2024-03-14 14:12:57 +00:00
Matthijs Mekking
ad33a73f83 Fix Coverity CID 487882: Error handling issues
The dns_qpiter_next() was called without checking the return value. If
we cannot move the iterator forward, there is no use in calling the
step() function.

/lib/dns/qpzone.c: 2804 in activeempty()
2798     	 * of the name we were searching for. Step the iterator
2799     	 * forward, then step() will continue forward until it
2800     	 * finds a node with active data. If that node is a
2801     	 * subdomain of the one we were looking for, then we're
2802     	 * at an active empty nonterminal node.
2803     	 */
>>>     CID 487882:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "dns_qpiter_next" without checking return value (as is done elsewhere 26 out of 27 times).
2804     	dns_qpiter_next(it, NULL, NULL, NULL);
2805     	return (step(search, it, FORWARD, next) &&
2806     		dns_name_issubdomain(next, current));
2807     }
2024-03-14 14:01:23 +01:00
Matthijs Mekking
8d3f601a6b Merge branch 'matthijs-add-rfc-9460-to-arm' into 'main'
Add RFC 9460 to list of supported RFCs

See merge request isc-projects/bind9!8847
2024-03-14 12:53:23 +00:00
Matthijs Mekking
5b5f43babc Add RFC 9460 to list of supported RFCs
The specification was implemented (#1132) when it was a draft. Now that
it is RFC, add the RFC to the list of supported RFCs.
2024-03-14 12:52:42 +00:00
Matthijs Mekking
4d560d5ffd Merge branch '4631-cid-487884-dead-code-in-qpcache' into 'main'
Resolve "CID 487884: Dead code in qpcache.c"

Closes #4631

See merge request isc-projects/bind9!8853
2024-03-14 11:50:17 +00:00
Matthijs Mekking
659fa0cbc3 Fix Coverity CID 487884: Dead code in qpcache.c
Adding a changed record is zonedb related and does not belong in
the cache code. This is a leftover dead code and can be safely
removed.

/lib/dns/qpcache.c: 3459 in add()
3453     			}
3454     			newheader->next = topheader->next;
3455     			newheader->down = topheader;
3456     			topheader->next = newheader;
3457     			qpnode->dirty = 1;
3458     			if (changed != NULL) {
>>>     CID 487884:    (DEADCODE)
>>>     Execution cannot reach this statement: "changed->dirty = true;".
3459     				changed->dirty = true;
3460     			}
3461     		} else {
3462     			/*
3463     			 * No rdatasets of the given type exist at the node.
3464     			 */
/lib/dns/qpcache.c: 3409 in add()
3403     			}
3404     			newheader->next = topheader->next;
3405     			newheader->down = topheader;
3406     			topheader->next = newheader;
3407     			qpnode->dirty = 1;
3408     			if (changed != NULL) {
>>>     CID 487884:    (DEADCODE)
>>>     Execution cannot reach this statement: "changed->dirty = true;".
3409     				changed->dirty = true;
3410     			}
3411     			mark_ancient(header);
3412     			if (sigheader != NULL) {
3413     				mark_ancient(sigheader);
3414
2024-03-14 10:42:30 +00:00
Matthijs Mekking
1102c5d552 Merge branch '4624-duration-error-checking' into 'main'
Detect invalid durations

Closes #4624

See merge request isc-projects/bind9!8844
2024-03-14 10:08:43 +00:00
Matthijs Mekking
bc600ae2a1 Add CHANGES and release note for #4624 2024-03-14 09:07:44 +01:00
Matthijs Mekking
e39de45adc Detect invalid durations
Be stricter in durations that are accepted. Basically we accept ISO 8601
formats, but fail to detect garbage after the integers in such strings.

For example, 'P7.5D' will be treated as 7 days. Pass 'endptr' to
'strtoll' and check if the endptr is at the correct suffix.
2024-03-14 08:51:46 +01:00
Mark Andrews
fd49abf254 Merge branch '4608-ensure-static-stub-ns-records-are-not-returned' into 'main'
Resolve "Ensure static stub NS records are not returned"

Closes #4608

See merge request isc-projects/bind9!8790
2024-03-14 04:16:39 +00:00
Mark Andrews
6a91862ac5 Add CHANGES note for [GL #4608] 2024-03-14 11:40:10 +11:00
Mark Andrews
229bf863e2 Check static-stub synthesised NS is not returned 2024-03-14 11:39:27 +11:00