2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00
Commit Graph

31972 Commits

Author SHA1 Message Date
Evan Hunt
a8baf79e33 append "0" to IPv6 addresses ending in "::" when printing YAML
such addresses broke some YAML parsers.
2020-06-25 16:42:13 -07:00
Mark Andrews
5d3a7aadb8 Merge branch '1689-bind-stops-dnskey-lookup-in-get_dst_key-when-a-key-with-unsupported-algorithm-is-found-first' into 'main'
Resolve "BIND stops DNSKEY lookup in get_dst_key() when a key with unsupported algorithm is found first"

Closes #1689

See merge request isc-projects/bind9!3736
2020-06-25 12:40:45 +00:00
Matthijs Mekking
c6345fffe9 Add todo in dnssec system test for [GL #1689]
Add a note why we don't have a test case for the issue.

It is tricky to write a good test case for this if our tools are
not allowed to create signatures for unsupported algorithms.
2020-06-25 13:46:36 +02:00
Mark Andrews
e195d4608a Add Release Note for [GL #1689] 2020-06-25 13:46:36 +02:00
Mark Andrews
b733bd6555 Add CHANGES for [GL #1689] 2020-06-25 13:46:36 +02:00
Mark Andrews
d475f3aeed The validator could fail when select_signing_key/get_dst_key failed
to select the signing key because the algorithm was not supported
and the loop was prematurely aborted.
2020-06-25 13:43:45 +02:00
Mark Andrews
30b85fe4a8 Merge branch '1969-silence-cppcheck-warnings' into 'main'
Resolve "Silence CPPCHECK warnings"

Closes #1969

See merge request isc-projects/bind9!3741
2020-06-25 07:01:05 +00:00
Mark Andrews
abe2c84b1d Suppress cppcheck warnings:
cppcheck-suppress objectIndex
cppcheck-suppress nullPointerRedundantCheck
2020-06-25 12:04:36 +10:00
Mark Andrews
0cf25d7f38 Add INSIST's to silence cppcheck warnings 2020-06-25 12:04:36 +10:00
Mark Andrews
ee135d8946 Remove now redundant check for state != NULL 2020-06-25 12:04:36 +10:00
Mark Andrews
51f08d2095 Address potential thread issues:
Assign and then check node for NULL to address another thread
changing radix->head in the meantime.

Move 'node != NULL' check into while loop test to silence cppcheck
false positive.

Fix pointer != NULL style.
2020-06-25 12:04:36 +10:00
Mark Andrews
6d5fde62a3 Merge branch '1965-bin-named-unix-os-c-warning-s-directive-output-may-be-truncated-on-openindiana' into 'main'
Resolve "bin/named/unix/os.c warning: '%s' directive output may be truncated on OpenIndiana"

Closes #1965

See merge request isc-projects/bind9!3737
2020-06-24 23:22:08 +00:00
Mark Andrews
4bc3de070f Resize unamebuf[] to avoid warnings about snprintf() not having
enough buffer space.  Also change named_os_uname() prototype so
that it is now returning (const char *) rather than (char *).  If
uname() is not supported on a UNIX build prepopulate unamebuf[]
with "unknown architecture".
2020-06-24 23:21:36 +00:00
Michał Kępień
1844b47eb3 Merge branch '1970-fix-libtool-initialization' into 'main'
Fix libtool initialization

Closes #1970

See merge request isc-projects/bind9!3742
2020-06-24 09:28:01 +00:00
Michał Kępień
a7982d14dd Fix libtool initialization
The LT_INIT() call in configure.ac is effectively a no-op because it is
preceded by a call to AC_PROG_LIBTOOL(), which is the previous name of
LT_INIT() used in older libtool versions.  Replace AC_PROG_LIBTOOL()
with AC_PATH_PROG() to look for libtool in PATH without initializing it,
which is the originally intended behavior.

Without this change, --enable-static is used by default, which causes a
plain ./configure invocation to fail because static linking is now
disallowed.  Drop --disable-static from the ./configure invocations used
in GitLab CI to test this scenario continuously.
2020-06-24 10:07:57 +02:00
Ondřej Surý
6f9a87fdf6 Merge branch '1933-disable-static-linking' into 'main'
Disable and disallow static linking

Closes #1933

See merge request isc-projects/bind9!3697
2020-06-23 13:28:06 +00:00
Ondřej Surý
7f24d4b476 Add CHANGES and release note for #1933 2020-06-23 15:16:02 +02:00
Ondřej Surý
a7bed56845 Disable and disallow static linking
Linking BIND 9 programs and libraries statically disables several
important features:

  * dlopen() - relied on by dynamic loading of modules, dlz, and dyndb,

  * RELRO (read-only relocations) and ASLR (address space layout
    randomization) - security features which are important for any
    program interacting with the network and/or user input.

Disable and disallow linking BIND 9 binaries statically, thus enforcing
dlopen() support and allowing use of RELRO and ASLR by default.
2020-06-23 15:16:02 +02:00
Mark Andrews
789e5f4a4b Merge branch 'u/fanf2/dnstap-roll' into 'main'
Fix `rndc dnstap -roll N`

See merge request isc-projects/bind9!3728
2020-06-23 10:27:34 +00:00
Mark Andrews
81d15bc967 Add Release Note for [GL !3728] 2020-06-23 20:20:39 +10:00
Mark Andrews
ce776e79ed Add CHANGES for [GL !3728] 2020-06-23 20:20:39 +10:00
Mark Andrews
a289a57c7f Check that 'rndc dnstap -roll <value>' works 2020-06-23 20:20:39 +10:00
Tony Finch
7c07129a51 Fix rndc dnstap -roll N
The `rndc` argument was always overridden by the static configuration,
because the logic for handling the number of dnstap files to retain
was both backwards and a bit redundant.
2020-06-23 20:20:39 +10:00
Michal Nowak
e8fa9986bd Merge branch 'mnowak/do-not-build-gzip-tarball' into 'main'
Do not create gzip tarball

See merge request isc-projects/bind9!3734
2020-06-23 07:48:58 +00:00
Michal Nowak
c76c826fdb Do not create gzip tarball
'make dist' does not need to create gzip tarball as we always ship the
XZ one.
2020-06-22 21:04:18 +02:00
Ondřej Surý
b4221e2595 Merge branch 'ondrej/disable-maintainer-mode-in-ci' into 'main'
Disable rebuilding miscellaneous documentation source files when not in maintainer mode

See merge request isc-projects/bind9!3733
2020-06-22 17:01:41 +00:00
Ondřej Surý
7ff77bb676 Enable maintainer mode by default only when building from git
When maintainer mode is enabled (./configure --enable-maintainer-mode)
it enables rebuild of documentation source files that require extra
tools to be installed or compiled.  For a convenience, those files are
already committed into the repository and their rebuild is not required
to build BIND 9 from sources.
2020-06-22 14:26:07 +02:00
Ondřej Surý
5f530bd1f9 Remove the last bits of '// not configured' from doc/misc/options 2020-06-22 14:08:53 +02:00
Ondřej Surý
36e4090c70 Update pregenerated dig.1in and rndc-confgen.8in 2020-06-22 14:08:53 +02:00
Ondřej Surý
8b18d8f3bc Disable the double configure and build step in docs CI job
The documentation now can be build even when the BIND 9 source tree
hasn't been built yet allowing no-arch builds.
2020-06-22 14:08:53 +02:00
Ondřej Surý
28575abd93 Rebuild the manpages sources only when in maintainer mode
Similarly, the manpage sources will get rebuild only when in maintainer
mode because they require sphinx-build to be available locally and that
might not be always the case.
2020-06-22 14:08:53 +02:00
Ondřej Surý
b1093533ef Rebuild the file in doc/misc only when in maintainer mode
The files in doc/misc requires all the BIND 9 libraries to be built
before the documentation can be built.  One of the extra automake
features is maintainer mode that allows to conditionally build and clean
files that require special tools.  Make use of the automake maintainer
mode to not rebuild the files in doc/misc under normal circumstances.
2020-06-22 14:08:53 +02:00
Ondřej Surý
c9c84af3c9 Merge branch 'each-shorten-tests' into 'main'
reorder system tests to shorten runtime

See merge request isc-projects/bind9!3727
2020-06-22 12:06:10 +00:00
Evan Hunt
a9154f2aab reorder system tests to shorten runtime
if tests that take a particularly long time to complete
(serve-stale, dnssec, rpzrecurse) are run first, a parallel
run of the system tests can finish 1-2 minutes faster.
2020-06-22 12:05:32 +00:00
Ondřej Surý
8e4afd31e9 Merge branch '1898-doc/misc/options-should-be-independent-on-configure' into 'main'
Remove // not configured when generating doc/misc/options

Closes #1898

See merge request isc-projects/bind9!3731
2020-06-22 11:44:39 +00:00
Ondřej Surý
b82ff5b738 Remove // not configured when generating doc/misc/options
The doc/misc/options is used to generate a file describing all
configuration options. Currently, the file contents could differ
based on ./configure option which is kind of suboptimal.

We already removed the "// not configured" from the options.active, and
this time we remove generation of the string altogether.
2020-06-22 11:44:05 +00:00
Ondřej Surý
c3510ca6a3 Merge branch '1949-checknames' into 'main'
"check-names primary" and "check-names secondary" were ignored

Closes #1949

See merge request isc-projects/bind9!3702
2020-06-22 11:14:54 +00:00
Ondřej Surý
eaafae2766 Add CHANGES and release note for #1949 2020-06-22 12:33:54 +02:00
Evan Hunt
ba31b189b4 "check-names primary" and "check-names secondary" were ignored
these keywords were added to the parser as synonyms for "master"
and "slave" but were never hooked in to the configuration of named,
so they were ignored. this has been fixed and the option is now
checked for correctness.
2020-06-22 12:32:32 +02:00
Ondřej Surý
783e3f922a Merge branch '1627-address-race-in-zone-maintenance' into 'main'
address race between zone_maintenance and dns_zone_setview_helper

Closes #1627

See merge request isc-projects/bind9!3669
2020-06-22 10:26:29 +00:00
Mark Andrews
67c8f7329d Address race between zone_maintenance and dns_zone_setview_helper
There was a possible NULL dereference due to data race between accessing
zone->view and zone->view->adb.
2020-06-22 12:20:51 +02:00
Evan Hunt
5238433f78 Merge branch 'each-rndc-netmgr-pt1' into 'main'
client-side TCP

Closes #1958

See merge request isc-projects/bind9!3723
2020-06-19 22:19:10 +00:00
Evan Hunt
8b9e2d33a2 CHANGES 2020-06-19 12:33:26 -07:00
Evan Hunt
75c985c07f change the signature of recv callbacks to include a result code
this will allow recv event handlers to distinguish between cases
in which the region is NULL because of error, shutdown, or cancelation.
2020-06-19 12:33:26 -07:00
Evan Hunt
5191ec8f86 implement isc_nm_cancelread()
The isc_nm_cancelread() function cancels reading on a connected
socket and calls its read callback function with a 'result'
parameter of ISC_R_CANCELED.
2020-06-19 12:33:26 -07:00
Evan Hunt
870204fe47 shorten the sleep in isc_nm_destroy()
when isc_nm_destroy() is called, there's a loop that waits for
other references to be detached, pausing and unpausing the netmgr
to ensure that all the workers' events are run, followed by a
1-second sleep. this caused a delay on shutdown which will be
noticeable when netmgr is used in tools other than named itself,
so the delay has now been reduced to a hundredth of a second.
2020-06-19 12:32:43 -07:00
Evan Hunt
abbb79f9d1 implement isc_nm_tcpconnect()
the isc_nm_tcpconnect() function establishes a client connection via
TCP.  once the connection is esablished, a callback function will be
called with a newly created network manager handle.
2020-06-19 09:41:37 +02:00
Witold Kręcicki
cd79b49538 allow tcpdns sockets to self-reference while connected
A TCPDNS socket creates a handle for each complete DNS message.

Previously, when all the handles were disconnected, the socket
would be closed, but the wrapped TCP socket might still have
more to read.

Now, when a connection is established, the TCPDNS socket creates
a reference to itself by attaching itself to sock->self. This
reference isn't cleared until the connection is closed via
EOF, timeout, or server shutdown. This allows the socket to remain
open even when there are no active handles for it.
2020-06-19 09:39:50 +02:00
Evan Hunt
5ea26ee1f1 modify reference counting within netmgr
- isc__nmhandle_get() now attaches to the sock in the nmhandle object.
  the caller is responsible for dereferencing the original socket
  pointer when necessary.
- tcpdns listener sockets attach sock->outer to the outer tcp listener
  socket. tcpdns connected sockets attach sock->outerhandle to the handle
  for the tcp connected socket.
- only listener sockets need to be attached/detached directly. connected
  sockets should only be accessed and reference-counted via their
  associated handles.
2020-06-19 09:39:50 +02:00
Evan Hunt
9e740cad21 make isc_nmsocket_{attach,detach}{} functions private
there is no need for a caller to reference-count socket objects.
they need tto be able tto close listener sockets (i.e., those
returned by isc_nm_listen{udp,tcp,tcpdns}), and an isc_nmsocket_close()
function has been added for that. other sockets are only accessed via
handles.
2020-06-19 09:39:50 +02:00