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

28906 Commits

Author SHA1 Message Date
Witold Kręcicki
b57a38ae43 Fix a race in socket code when internal_{accept, send, receive} is called
from event loop on an socket and, in the meantime, someone has closed this
socket.
2019-03-06 12:56:11 -08:00
Evan Hunt
0e67a73bdf Merge branch 'michal/log-plugin-unloading-at-debug-level' into 'master'
Log plugin unloading at debug level

See merge request isc-projects/bind9!1608
2019-03-06 15:30:40 -05:00
Michał Kępień
af4b81f944 Log plugin unloading at debug level
During server reconfiguration, plugin instances set up for the old views
are unloaded very close to the end of the whole process, after new
plugin instances are set up.  As the log message announcing plugin
unloading is emitted at the default "info" level, the user might be
misled into thinking that it is the new plugin instances that are being
unloaded for some reason, particularly because all other messages logged
at the "info" level around the same time inform about setting things up
rather than tearing them down.  Since no distinction is currently made
between destroying a view due to reconfiguration and due to a shutdown
in progress, there is no easy way to vary the contents of the log
message depending on circumstances.  Since this message is not a
particularly critical one, demote it to debug level to prevent
confusion.
2019-03-06 15:19:07 -05:00
Michał Kępień
68ff5f0ebd Merge branch '905-make-nsupdate-use-os-supplied-ephemeral-port-range' into 'master'
Make nsupdate use OS-supplied ephemeral port range

Closes #905

See merge request isc-projects/bind9!1569
2019-03-06 08:27:39 -05:00
Michał Kępień
0e64948274 Add CHANGES entry
5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]
2019-03-06 14:02:12 +01:00
Michał Kępień
06f582f23e Make nsupdate use OS-supplied ephemeral port range
Make nsupdate honor the operating system's preferred ephemeral port
range instead of always using the default 1024-65535 range for outgoing
messages.
2019-03-06 14:01:24 +01:00
Evan Hunt
960ddd5381 Merge branch '878-install-named-plugins-into-a-separate-directory' into 'master'
Install named plugins into a separate directory

Closes #878

See merge request isc-projects/bind9!1512
2019-03-05 19:44:49 -05:00
Michał Kępień
d2c960cfc2 Add CHANGES entry
5161.	[func]		named plugins are now installed into a separate
			directory.  Supplying a filename (a string without path
			separators) in a "plugin" configuration stanza now
			causes named to look for that plugin in that directory.
			[GL #878]
2019-03-05 16:06:25 -08:00
Michał Kępień
cba155154b Add -c to usage message for named-checkconf
Add the -c command line option to the usage message for named-checkconf
as it is not present there despite being documented.
2019-03-05 16:06:25 -08:00
Michał Kępień
1a9fc624ca Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).
2019-03-05 16:06:25 -08:00
Michał Kępień
d181c28c60 Add ns_plugin_expandpath()
Implement a helper function which, given an input string:

  - copies it verbatim if it contains at least one path separator,
  - prepends the named plugin installation directory to it otherwise.

This function will allow configuration parsing code to conveniently
determine the full path to a plugin module given either a path or a
filename.

While other, simpler ways exist for making sure filenames passed to
dlopen() cause the latter to look for shared objects in a specific
directory, they are very platform-specific.  Using full paths is thus
likely the most portable and reliable solution.

Also added unit tests for ns_plugin_expandpath() to ensure it behaves
as expected for absolute paths, relative paths, and filenames, for
various target buffer sizes.

(Note: plugins share a directory with named on Windows; there is no
default plugin path. Therefore the source path is copied to the
destination path with no modification.)
2019-03-05 16:06:24 -08:00
Michał Kępień
c527b7fd5c Install named plugins into a separate directory
Installing named plugins into ${libdir} clutters the latter and is not
in line with common filesystem conventions.  Instead, install named
plugins into a separate directory, ${libdir}/named.
2019-03-05 15:53:04 -08:00
Evan Hunt
a1c9db1baa Merge branch '909-add-explicit-link-check-for-libatomic' into 'master'
Add explicit check for libatomic to fix configure step on NetBSD

Closes #909

See merge request isc-projects/bind9!1586
2019-03-05 18:17:26 -05:00
Ondřej Surý
9a16e0a5ae Add information about NetBSD 6 compilation on i386 2019-03-05 14:27:18 -08:00
Ondřej Surý
fcade0610f Add explicit check for libatomic 2019-03-05 14:24:18 -08:00
Evan Hunt
db7a7357a6 Merge branch '884-patches-to-review-4' into 'master'
dlz filesystem driver failed to properly detect period at end of filename.

Closes #884

See merge request isc-projects/bind9!1533
2019-03-05 17:18:47 -05:00
Mark Andrews
c9dc59eb90 properly detect period as last character in filename 2019-03-05 13:50:22 -08:00
Evan Hunt
648aef129d Merge branch 'michal/disable-servfail-cache-for-ns5-in-the-mkeys-system-test' into 'master'
Disable SERVFAIL cache for ns5 in the "mkeys" system test

See merge request isc-projects/bind9!1585
2019-03-05 16:23:59 -05:00
Michał Kępień
7c6bff3c4e Disable SERVFAIL cache for ns5 in the "mkeys" system test
The "check key refreshes are resumed after root servers become
available" check may trigger a false positive for the "mkeys" system
test if the second example/TXT query sent by dig is received by ns5 less
than a second after it receives a REFUSED response to the upstream query
it sends to ns1 in order to resolve the first example/TXT query sent by
dig.  Since that REFUSED response from ns1 causes ns5 to return a
SERVFAIL answer to dig, example/TXT is added to the SERVFAIL cache,
which is enabled by default with a TTL of 1 second.  This in turn may
cause ns5 to return a cached SERVFAIL response to the second example/TXT
query sent by dig, i.e. make ns5 not perform full query processing as
expected by the check.

Since the primary purpose of the check in question is to ensure that key
refreshes are resumed once initially unavailable root servers become
available, the optimal solution appears to be disabling SERVFAIL cache
for ns5 as doing that still allows the check to fulfill its purpose and
it is arguably more prudent than always sleeping for 1 second.
2019-03-05 11:48:26 -08:00
Evan Hunt
ea95d85091 Merge branch '889-improve-clang-cmocka-interaction' into 'master'
Resolve "Improve clang/cmocka interaction."

Closes #889

See merge request isc-projects/bind9!1542
2019-03-05 13:34:30 -05:00
Mark Andrews
cb913177ae improve clang / cmocka integration 2019-03-05 10:20:29 -08:00
Mark Andrews
12a8574aea Merge branch '919-add-win32util-configure-file-list-check-to-ci' into 'master'
Resolve "Add win32util/Configure file list check to CI"

Closes #919

See merge request isc-projects/bind9!1594
2019-03-05 01:28:46 -05:00
Mark Andrews
442421906b remove '..\\bin\\tests\\system\\dlz\\prereq.sh' from win32util/Configure 2019-03-05 17:11:20 +11:00
Mark Andrews
c3dd8bb9f0 add util/check-win32util-configure to precheck 2019-03-05 17:11:20 +11:00
Matthijs Mekking
bbeff24049 Merge branch 'matthijs/more-clean.sh-related-cleanups' into 'master'
More clean.sh-related cleanups

See merge request isc-projects/bind9!1579
2019-03-04 10:54:16 -05:00
Matthijs Mekking
e410803919 Ensure all system tests run clean.sh from setup.sh
For consistency between all system tests, add missing setup.sh scripts
for tests which do not have one yet and ensure every setup.sh script
calls its respective clean.sh script.
2019-03-04 16:26:06 +01:00
Matthijs Mekking
c64ed484c8 Only perform test cleanups in clean.sh scripts
Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.
2019-03-04 16:26:06 +01:00
Mark Andrews
7f6cc1b405 Merge branch 'feature/featuretest-dlz' into 'master'
Test dlz support in feature-test

See merge request isc-projects/bind9!1587
2019-03-03 22:04:37 -05:00
Mark Andrews
5f125df462 add CHANGES 2019-03-04 14:03:23 +11:00
Mark Andrews
4988367b53 run autoheader and autoconf 2019-03-04 09:37:42 +11:00
Petr Menšík
759a7b4ce3 Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.
2019-03-01 17:41:06 +01:00
Michał Kępień
03dcdb88a2 Merge branch 'michal/fix-ip-regex-used-in-the-resolver-system-test' into 'master'
Fix IP regex used in the "resolver" system test

See merge request isc-projects/bind9!1568
2019-03-01 01:55:42 -05:00
Michał Kępień
70ae48e5cb Fix IP regex used in the "resolver" system test
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.
2019-03-01 01:32:54 -05:00
Evan Hunt
ccdeacf45e Merge branch '901-empty-any' into 'master'
handle empty ANY query responses

Closes #901

See merge request isc-projects/bind9!1580
2019-02-28 19:05:44 -05:00
Evan Hunt
4ad0bc38e9 CHANGES, release notes 2019-02-28 15:00:38 -08:00
Evan Hunt
c6939f0bd4 test correct occlusion of DNSSEC records 2019-02-28 15:00:38 -08:00
Evan Hunt
3e74c7e5ff fix crash in query_respond_any() from all records being hidden
in query_respond_any(), the assumption had previously been made that it
was impossible to get past iterating the node with a return value of
ISC_R_NOMORE but not have found any records, unless we were searching
for RRSIG or SIG. however, it is possible for other types to exist but
be hidden, such as when the zone is transitioning from insecure to
secure and DNSSEC types are encountered, and this situation could
trigger an assertion.  removed the assertion and reorganized the code.
2019-02-28 13:55:47 -08:00
Michał Kępień
cdbae0013b Merge branch 'michal/do-not-include-conf.sh-from-ttl-clean.sh' into 'master'
Do not include conf.sh from ttl/clean.sh

See merge request isc-projects/bind9!1564
2019-02-28 07:42:42 -05:00
Michał Kępień
6602848460 Do not include conf.sh from ttl/clean.sh
Including $SYSTEMTESTTOP/conf.sh from a system test's clean.sh script is
not needed for anything while it causes an error message to be printed
out when "./configure" is run, as "make clean" is invoked at the end.
Remove the offending line to prevent the error from occurring.
2019-02-28 13:17:01 +01:00
Michał Kępień
d571b33468 Merge branch 'michal/call-clean.sh-from-all-relevant-setup.sh-scripts' into 'master'
Call clean.sh from all relevant setup.sh scripts

See merge request isc-projects/bind9!1565
2019-02-28 07:11:00 -05:00
Michał Kępień
a077a3ae8a Call clean.sh from all relevant setup.sh scripts
For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.
2019-02-28 12:34:10 +01:00
Matthijs Mekking
a111c8d739 Merge branch '813-matthijs-failure-loading-rpz' into 'master'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

Closes #813

See merge request isc-projects/bind9!1507
2019-02-22 09:05:46 -05:00
Matthijs Mekking
e5565808e4 Update CHANGES 2019-02-22 14:00:01 +01:00
Matthijs Mekking
6ed14eff25 Unregister RPZ CATZ db cbs when zone load fails
In case when a zone fails to load because the file does not exist
or is malformed, we should not run the callback that updates the
zone database when the load is done.  This is achieved by
unregistering the callbacks if at zone load end if the result
indicates something else than success.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
84700f9783 Update copyrights 2019-02-22 13:59:10 +01:00
Matthijs Mekking
ce5476acf0 Add test for rpz zone load fail 2019-02-22 13:59:10 +01:00
Matthijs Mekking
6756280242 Remove rpz->db_registered
As pointed out in !813 db_registered is sort of redundant.  It is
set to `true` only in `dns_zone_rpz_enable_db()` right before the
`dns_rpz_dbupdate_callback()` callback is registered.  It is only
required in that callback and it is the only place that the callback
is registered.  Therefore there is no path that that `REQUIRE` can
fail.

The `db_registered` variable is only set to `false` in
`dns_rpz_new_zone`, so it is not like the variable is unset again
later.

The only other place where `db_registered` is checked is in
`rpz_detach()`.  If `true`, it will call
`dns_db_updatenotify_unregister()`.  However if that happens, the
`db_registered` is not set back to `false` thus this implies that
this may happen multiple times.  If called a second time, most
likely the unregister function will return `ISC_R_NOTFOUND`, but
the return value is not checked anyway.  So it can do without the
`db_registered` check.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
2e5e429644 Add curly brackets on if statements 2019-02-22 13:59:10 +01:00
Matthijs Mekking
a490c09121 named crashes on shutdown after load rpz failed
This may happen when loading an RPZ failed and the code path skips
calling dns_db_endload().  The dns_rpz_zone_t object is still kept
marked as having registered db.  So when this object is finally
destroyed in rpz_detach(), this code will incorrectly call
`dns_db_updatenotify_unregister()`:

   if (rpz->db_registered)
     dns_db_updatenotify_unregister(rpz->db,
                                    dns_rpz_dbupdate_callback, rpz);

and trigger this assertion failure:

   REQUIRE(db != NULL);

To fix this, only call `dns_db_updatenotify_unregister()` when
`rpz->db` is not NULL.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
8d392f9093 Make RPZ tests more readable 2019-02-22 13:59:10 +01:00