Commit Graph

34525 Commits

Author SHA1 Message Date
Evan Hunt
556ffe3eea clean up dns_client API
- removed unused functions
- changed some public functions to static that are never called
  from outside client.c
- removed unused types and function prototypes
- renamed dns_client_destroy() to dns_client_detach()
2021-08-30 08:47:39 +02:00
Ondřej Surý
cdf9a1fd20 Remove support for external applications to register libisc
The previous versions of BIND 9 exported its internal libraries so that
they can be used by third-party applications more easily.  Certain
library functions were altered from specific BIND-only behavior to more
generic behavior when used by other applications.

This commit removes the function isc_lib_register() that was used by
external applications to enable the functionality.
2021-08-30 08:47:39 +02:00
Evan Hunt
5dd11a6aa4 Merge branch '2872-fix-map-zonefile-version-number' into 'main'
Fix crash while loading map zone files generated by BIND >= 9.17.0 && <= 9.17.16

Closes #2872

See merge request isc-projects/bind9!5345
2021-08-28 14:34:45 +00:00
Evan Hunt
351ed777c2 CHANGES, release note 2021-08-28 07:31:13 -07:00
Evan Hunt
4b61e74470 expand map file documentation
discuss map file compatibility issues in more detail.
2021-08-28 07:31:13 -07:00
Petr Špaček
4a68c7be22 increase MAPAPI
bump the map zonefile version number to avoid an assertion
failure when loading map files from versions of BIND prior to
the most recent change to the in-memory structure of zone
databases.
2021-08-27 21:44:04 -07:00
Evan Hunt
4ea73198c8 Merge branch '1927-fix-keepalive' into 'main'
Resolve "keepalive appears to be unused"

Closes #1927

See merge request isc-projects/bind9!4348
2021-08-27 19:55:47 +00:00
Evan Hunt
45752f9505 CHANGES 2021-08-27 10:02:46 -07:00
Evan Hunt
947e80066c add a test of the keepalive timeout
test server now has tcp-idle-timeout set to 5 seconds and
tcp-keepalive-timeout set to 7, so queries that follow a 6-second sleep
should either succeed or fail depending on whether the keepalive option
was sent.
2021-08-27 10:02:46 -07:00
Evan Hunt
fc6f751fbe replace per-protocol keepalive functions with a common one
this commit removes isc__nm_tcpdns_keepalive() and
isc__nm_tlsdns_keepalive(); keepalive for these protocols and
for TCP will now be set directly from isc_nmhandle_keepalive().

protocols that have an underlying TCP socket (i.e., TLS stream
and HTTP), now have protocol-specific routines, called by
isc_nmhandle_keeaplive(), to set the keepalive value on the
underlying socket.
2021-08-27 10:02:10 -07:00
Evan Hunt
7867b8b57d enable keepalive when the keepalive EDNS option is seen
previously, receiving a keepalive option had no effect on how
long named would keep the connection open; there was a place to
configure the keepalive timeout but it was never used. this commit
corrects that.

this also fixes an error in isc__nm_{tcp,tls}dns_keepalive()
in which the sense of a REQUIRE test was reversed; previously this
error had not been noticed because the functions were not being
used.
2021-08-27 09:56:51 -07:00
Evan Hunt
19e24e22f5 cleanup netmgr-int.h
- fix some duplicated and out-of-order prototypes declared in
  netmgr-int.h
- rename isc_nm_tcpdns_keepalive to isc__nm_tcpdns_keepalive as
  it's for internal use
2021-08-27 09:56:51 -07:00
Artem Boldariev
3f6f37c4a4 Merge branch '2858-fix-a-crash-when-closing-http-socket-with-unused-http-session' into 'main'
DoH: Fix a crash (in dig) when closing an HTTP socket with an unused HTTP/2 session

Closes #2858

See merge request isc-projects/bind9!5319
2021-08-27 09:38:30 +00:00
Artem Boldariev
5708446d85 Add changes for [GL #2858]
This commit adds information about the fix for the issue #2858 to the
CHANGES file.
2021-08-27 12:14:49 +03:00
Artem Boldariev
8a655320c8 Fix a crash (in dig) when closing HTTP socket with unused session
This commit fixes a crash (caused by an assert) when closing an HTTP/2
socket with unused HTTP/2 session.
2021-08-27 12:14:48 +03:00
Mark Andrews
d0399afd3a Merge branch '1805-save-failed-build-artifacts' into 'main'
Resolve "Save failed build artifacts."

Closes #1805

See merge request isc-projects/bind9!3458
2021-08-26 03:55:28 +00:00
Mark Andrews
221228572f always save build artifacts 2021-08-26 03:35:09 +00:00
Mark Andrews
ca0f737091 Merge branch '2880-timing-issues-with-rndc-system-test' into 'main'
Resolve "timing issues with rndc system test"

Closes #2880

See merge request isc-projects/bind9!5357
2021-08-26 03:16:21 +00:00
Mark Andrews
45b6b8199e wait for post 'rndc freeze' writes to complete 2021-08-26 10:57:08 +10:00
Evan Hunt
9a4a1bbe9b Merge branch '331-further-refactoring-of-functions-in-lib-dns-zoneverify-c' into 'main'
Resolve "Further refactoring of functions in lib/dns/zoneverify.c"

Closes #331

See merge request isc-projects/bind9!3718
2021-08-25 22:46:45 +00:00
Diego Fronza
bd0cc048d1 Replace literal 255 with a more descriptive macro name
More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12186
2021-08-25 15:10:27 -07:00
Diego Fronza
90e724af45 Avoid an empty block under if condition
This commit doesn't change the logic flow from previous code, it only
makes the code more readable and consistent.

More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12185
2021-08-25 15:10:27 -07:00
Diego Fronza
37f42d19a1 Remove redundant function 'newchain'
The removed function 'newchain(a, b)' was almost the same as calling
!chain_equal(a, b), varying only in the amount of data compared
in the non-fixed-length data portion of given chain nodes.

A third argument 'data_size' has been introduced into 'chain_equal'
function in order to allow it to know how many bytes to compare in the
variable-length data portion of the chain nodes.

A helper function 'chain_length(e)' has been introduced to allow
easy calculation of the total length of the non-fixed-length data part
of chain nodes.

Check the thread below for more details:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12184
2021-08-25 15:10:27 -07:00
Diego Fronza
6a12e37382 Use sizeof instead of arbitrary number to iterate fixed size array
More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12180
2021-08-25 15:10:27 -07:00
Diego Fronza
87e970474f Initialize buffers with { 0 } instead of memset
More details on threads:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12178
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12181
2021-08-25 14:23:26 -07:00
Diego Fronza
98d1e40143 Minor refactoring on function match_nsec3
The logic for matching a set of nsec3 objects against an nsec3param
object was moved to a specific function.

For more details check thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12176
2021-08-25 14:23:26 -07:00
Diego Fronza
966c06a9e6 Minor refactoring/cleanup
This commit moves the warning message to the logical block where it
belongs better.

For more details check thread comment:
https://gitlab.isc.org/isc-projects/bind9/merge_requests/291#note_12167
2021-08-25 14:23:26 -07:00
Artem Boldariev
e2d9faf09a Merge branch '2875-doh-do-not-assume-headers-order' into 'main'
Make no assumptions regarding HTTP headers processing order

Closes #2875

See merge request isc-projects/bind9!5350
2021-08-25 08:02:27 +00:00
Artem Boldariev
b0fc35d79c Add an entry to CHANGES [GL #2875]
Mention that we now do not rely on HTTP headers processing order in
BIND anymore.
2021-08-25 10:35:27 +03:00
Artem Boldariev
32cd4367a3 Make no assumptions regarding HTTP headers processing order
This commit changes the DoH code in such a way that it makes no
assumptions regarding which headers are expected to be processed
first. In particular, the code expected the :method: pseudo-header to
be processed early, which might not be true.
2021-08-25 10:32:56 +03:00
Mark Andrews
99f847d1e9 Merge branch '2461-named-checkconf-fails-to-detect-illegal-key-names-in-primaries-lists' into 'main'
Resolve "Named-checkconf fails to detect illegal key names in primaries lists"

Closes #2461

See merge request isc-projects/bind9!5314
2021-08-25 05:55:02 +00:00
Mark Andrews
5d2183c450 Add CHANGED for [GL #2461] 2021-08-25 15:22:25 +10:00
Mark Andrews
eb8c1ed3c5 Check that primary tls names are syntactically valid 2021-08-25 15:21:14 +10:00
Mark Andrews
4fa9d8389a Check that primary key names are syntactically valid 2021-08-25 15:21:14 +10:00
Mark Andrews
d66439b939 Merge branch '2842-clean-up-catalog-journal' into 'main'
Resolve "Clean up catalog journal"

Closes #2842

See merge request isc-projects/bind9!5313
2021-08-25 05:16:34 +00:00
Mark Andrews
53f9416176 Add CHANGES for [GL #2842] 2021-08-25 14:46:08 +10:00
Mark Andrews
0b83636648 Also delete journal file 2021-08-25 14:44:54 +10:00
Mark Andrews
1972300919 check that journal files are also removed 2021-08-25 14:44:54 +10:00
Mark Andrews
cd03e790ff Merge branch '2877-v9-17-cannot-be-compiled-on-a-system-without-libnghttp2-library' into 'main'
Resolve "v9.17 cannot be compiled on a system without libnghttp2 library"

Closes #2877

See merge request isc-projects/bind9!5353
2021-08-25 03:36:50 +00:00
Mark Andrews
aae53e2156 handle not configured with trailing flags 2021-08-25 00:14:50 +00:00
Mark Andrews
d425ee8097 Skip good-dot-*.conf when libnghttp2 is not available 2021-08-25 00:14:50 +00:00
Mark Andrews
ea80bcc41c More config element are not valid without DOH / DOT 2021-08-25 00:14:50 +00:00
Mark Andrews
71b7251009 Make doth system test conditional 2021-08-25 00:14:50 +00:00
Mark Andrews
c5ef2cc650 Protect #include <nghttp2/nghttp2.h> with #ifdef HAVE_LIBNGHTTP2 2021-08-25 00:14:50 +00:00
Matthijs Mekking
7a24c578bd Merge branch '1721-grow-shrink-dnssec-sign-stats' into 'main'
Grow and shrink dnssec-sign statistics on key rollover events

Closes #1721

See merge request isc-projects/bind9!5349
2021-08-24 07:27:26 +00:00
Matthijs Mekking
8224dc8e35 Add CHANGES for [GL #1721] 2021-08-24 09:07:54 +02:00
Matthijs Mekking
1a3c82f765 Add statschannel test case for key removal
Add a statschannel test case to confirm that when keys are removed
(in this case because of a dnssec-policy change), the corresponding
dnssec-sign stats are cleared and are no longer shown in the
statistics.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
de15e07800 Clear dnssec-sign stats for removed keys
Clear the key slots for dnssec-sign statistics for keys that are
removed. This way, the number of slots will stabilize to the maximum
key usage in a zone and will not grow every time a key rollover is
triggered.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
019a52a184 Add back the statschannel manykeys test case
Add a test case that has more than four keys (the initial number of
key slots that are created for dnssec-sign statistics). We shouldn't
be expecting weird values.

This fixes some errors in the manykeys zone configuration (keys
were created for algorithm RSASHA256, but the policy expected RSASHA1,
and the zone was not allowing dynamic updates).

This also fixes an error in the calls to 'zones-json.pl': The perl
script excepts an index number where the zone can be found, rather
than the zone name.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
d9cca81d50 Grow dnssec-sign statistics instead of rotating
We have introduced dnssec-sign statistics to the zone statistics. This
introduced an operational issue because when using zone-statistics
full, the memory usage was going through the roof. We fixed this by
by allocating just four key slots per zone. If a zone exceeds the
number of keys for example through a key rollover, the keys will be
rotated out on a FIFO basis.

This works for most cases, and fixes the immediate problem of high
memory usage, but if you sign your zone with many, many keys, or are
sign with a ZSK/KSK double algorithm strategy you may experience weird
statistics. A better strategy is to grow the number of key slots per
zone on key rollover events.

That is what this commit is doing: instead of rotating the four slots
to track sign statistics, named now grows the number of key slots
during a key rollover (or via some other method that introduces new
keys).
2021-08-24 09:07:15 +02:00