2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

31402 Commits

Author SHA1 Message Date
Ondřej Surý
1f1ecdecc9 Fix the ecdsa system test to allow parallel run
The ecdsa test was not adapted to dynamic ports, so we had to run it in
sequence.  This commit adds support for dynamic ports, and also makes
all the scripts shellcheck clean.
2020-03-19 17:31:31 +01:00
Ondřej Surý
bde35220cd Merge branch '1679-remove-workaround-for-systems-with-broken-gettimeofday-system-calls' into 'master'
Remove Solaris 2.8 broken gettimeofday() workaround

Closes #1679

See merge request isc-projects/bind9!3238
2020-03-19 08:34:49 +00:00
Ondřej Surý
e691b89a9a Use clock_gettime() instead of gettimeofday() for isc_stdtime function
This also removes Solaris 2.8 broken gettimeofday() workaround
2020-03-18 16:02:24 +01:00
Ondřej Surý
af26de6370 Merge branch '4-gitlab-ci.yml-improvement' into 'master'
Improve GitLab CI configuration

See merge request isc-projects/bind9!3254
2020-03-18 11:51:59 +00:00
Ondřej Surý
de1a637a69 Rename MAKE environment variable to MAKE_COMMAND
The environment variable MAKE has been replaced with MAKE_COMMAND,
because overriding MAKE variable also changed the definition of the MAKE
inside the Makefiles, and we want only a single wrapper around the whole
build process.

Previously, setting `MAKE` to `bear make` meant that `bear make` would
be run at every nested make invocation, which messed up the upcoming
automake transition as compile_commands.json would be generated in every
subdirectory instead of just having one central file at the top of the
build tree.
2020-03-18 12:51:08 +01:00
Ondřej Surý
99f9e2c53e Remove cppcheck arm64 job
All *:sid:amd64 jobs were errorneously copied to *:sid:arm64 including
the extra cppcheck run.  Remove the extra definitions from arm64 jobs.
2020-03-18 12:51:08 +01:00
Ondřej Surý
66ba808c1b Replace dependencies+needs with needs+artifacts in GitLabCI config
All jobs now use solely the newer needs configuration to declare
dependencies between jobs:

    needs:
      - job: <foo>
        artifacts: true

instead of combination of dependencies and needs which is deprecated.
This change completely unbundles the stages (alas the stages still needs
to stay because the job graph has to stay acyclic between the stages).
2020-03-18 12:51:08 +01:00
Ondřej Surý
d7348a2b96 Merge branch '1675-logfileconfig-system-test-crashes-occasionally-rwlock' into 'master'
Use isc_rwlock to lock .logconfig member of isc_log_t

Closes #1675

See merge request isc-projects/bind9!3229
2020-03-18 11:50:39 +00:00
Ondřej Surý
4d58856ff7 Use isc_rwlock to lock .logconfig member of isc_log_t
In isc_log_woudlog() the .logconfig member of isc_log_t structure was
accessed unlocked on the merit that there could be just a race when
.logconfig would be NULL, so the message would not be logged.  This
turned not to be true, as there's also data race deeper.  The accessed
isc_logconfig_t object could be in the middle of destruction, so the
pointer would be still non-NULL, but the structure members could point
to a chunk of memory no longer belonging to the object.  Since we are
only accessing integer types (the log level), this would never lead to
a crash, it leads to memory access to memory area no longer belonging to
the object and this a) wrong, b) raises a red flag in thread-safety tools.
2020-03-18 11:52:14 +01:00
Ondřej Surý
ed2ee2dffa Merge branch 'marka-memget-cannot-fail-logging' into 'master'
Cleanup logging API now that isc_mem_get cannot fail.

See merge request isc-projects/bind9!3252
2020-03-18 10:34:28 +00:00
Mark Andrews
0b793166d0 Refactor the isc_log API so it cannot fail on memory failures
The isc_mem API now crashes on memory allocation failure, and this is
the next commit in series to cleanup the code that could fail before,
but cannot fail now, e.g. isc_result_t return type has been changed to
void for the isc_log API functions that could only return ISC_R_SUCCESS.
2020-03-18 09:05:59 +01:00
Evan Hunt
e6deefd03f Merge branch 'each-lgtm-fixes' into 'master'
fix LGTM warnings

See merge request isc-projects/bind9!3200
2020-03-17 22:18:10 +00:00
Ondřej Surý
08f4c7d6c0 Add C11 localtime_r and gmtime_r shims for Windows
On Windows, C11 localtime_r() and gmtime_r() functions are not
available.  While localtime() and gmtime() functions are already thread
safe because they use Thread Local Storage, it's quite ugly to #ifdef
around every localtime_r() and gmtime_r() usage to make the usage also
thread-safe on POSIX platforms.

The commit adds wrappers around Windows localtime_s() and gmtime_s()
functions.

NOTE: The implementation of localtime_s and gmtime_s in Microsoft CRT
are incompatible with the C standard since it has reversed parameter
order and errno_t return type.
2020-03-17 13:28:15 -07:00
Evan Hunt
ec95b84e8d silence a warning about unsafe snprintf() call 2020-03-17 13:28:15 -07:00
Evan Hunt
fc5ae3192b clean up dead code
removed an if statement that always evaluated to false
2020-03-17 13:28:15 -07:00
Evan Hunt
5703f70427 replace unsafe ctime() and gmtime() function calls
This silences LGTM warnings that these functions are not thread-safe.
2020-03-17 13:28:15 -07:00
Evan Hunt
735be3b816 remove or comment empty conditional branches
some empty conditional branches which contained a semicolon were
"fixed" by clang-format to contain nothing. add comments to prevent this.
2020-03-17 13:28:15 -07:00
Evan Hunt
8915e4722d Merge branch '1684-timer-test-build' into 'master'
fix a pointer-to-int cast error

Closes #1684

See merge request isc-projects/bind9!3246
2020-03-17 20:10:02 +00:00
Evan Hunt
6b76646037 fix a pointer-to-int cast error 2020-03-17 13:00:29 -07:00
Ondřej Surý
58cc273b19 Merge branch '1672-stop-leaking-external-headers-and-symbols-to-the-public-api-isc/md.h' into 'master'
Make isc_md API to not leak OpenSSL symbols

Closes #1672

See merge request isc-projects/bind9!3218
2020-03-17 15:00:56 +00:00
Ondřej Surý
4e114f8ed6 Stop leaking OpenSSL types and defines in the isc/md.h
The <isc/md.h> header directly included <openssl/evp.h> header which
enforced all users of the libisc library to explicitly list the include
path to OpenSSL and link with -lcrypto.  By hiding the specific
implementation into the private namespace, we no longer enforce this.
In the long run, this might also allow us to switch cryptographic
library implementation without affecting the downstream users.

While making the isc_md_type_t type opaque, the API using the data type
was changed to use the pointer to isc_md_type_t instead of using the
type directly.
2020-03-17 09:11:13 +01:00
Mark Andrews
6052e254b9 Merge branch '1682-dighost-c-idn_output_filter-has-off-by-one-error' into 'master'
Resolve "dighost.c: idn_output_filter has off by one error"

Closes #1682

See merge request isc-projects/bind9!3243
2020-03-17 04:43:46 +00:00
Mark Andrews
af67acc0d0 address off by one error in idn_output_filter 2020-03-17 13:56:30 +11:00
Diego dos Santos Fronza
da64d42cd6 Merge branch '1138-from-bugs-43718-extend-nsip-wait-recurse-or-add-nsdname-wait-recurse' into 'master'
Resolve "From Bugs (#43718) : extend nsip-wait-recurse or add nsdname-wait-recurse"

Closes #1138

See merge request isc-projects/bind9!3134
2020-03-16 18:50:53 +00:00
Diego Fronza
267e2c4772 Add CHANGES and release note 2020-03-16 15:20:12 -03:00
Diego Fronza
4e8f8da661 Added nsdname-wait-recurse documentation to ARM 2020-03-16 15:18:46 -03:00
Evan Hunt
2822b01636 incidental fix: dnsrps test was failing
the test for logging of invalid prefixes doesn't work when running
with dnsrps; disable it in that case.
2020-03-16 15:18:46 -03:00
Diego Fronza
fe10111521 Added test for nsdname-wait-recurse option 2020-03-16 15:18:46 -03:00
Diego Fronza
c786c578d7 Added RPZ configuration option "nsdname-wait-recurse"
This new option was added to fill a gap in RPZ configuration
options.

It was possible to instruct BIND wheter NSIP rewritting rules would
apply or not, as long as the required data was already in cache or not,
respectively, by means of the option nsip-wait-recurse.

A value of yes (default) could incur a little processing cost, since
BIND would need to recurse to find NS addresses in case they were not in
the cache.

This behavior could be changed by setting nsip-wait-recurse value to no,
in which case BIND would promptly return some error code if the NS IP addresses
data were not in cache, then BIND would start a recursive query
in background, so future similar requests would have the required data
(NS IPs) in cache, allowing BIND to apply NSIP rules accordingly.

A similar feature wasn't available for NSDNAME triggers, so this commit
adds the option nsdname-wait-recurse to fill this gap, as it was
expected by couple BIND users.
2020-03-16 15:18:46 -03:00
Michał Kępień
be0dc3db3f Merge branch 'michal/update-gitlab-ci-to-freebsd-12.1' into 'master'
Update GitLab CI to FreeBSD 12.1

See merge request isc-projects/bind9!3180
2020-03-16 10:33:31 +00:00
Michał Kępień
80618b5378 Move FreeBSD CI jobs to libvirt-based executors
To get rid of the currently used FreeBSD-specific executor, move FreeBSD
CI jobs to libvirt-based executors.  Make the necessary tag and variable
adjustments.
2020-03-16 11:32:46 +01:00
Michał Kępień
4c68b56246 Update GitLab CI to FreeBSD 12.1
Since FreeBSD 12.1 is the current FreeBSD 12.x release, replace FreeBSD
12.0 GitLab CI jobs with their up-to-date counterparts.
2020-03-16 11:32:46 +01:00
Ondřej Surý
a3b89e7547 Merge branch '4-convert-lmdb-check-to-macro' into 'master'
Add AX_LIB_LMDB macro

See merge request isc-projects/bind9!3205
2020-03-16 09:44:49 +00:00
Ondřej Surý
6a475340cf Link with LMDB only where needed 2020-03-16 09:38:15 +01:00
Ondřej Surý
fe85568604 Convert lmdb check to m4 macro 2020-03-16 09:38:15 +01:00
Mark Andrews
020b9f7a73 Merge branch '1681-compile-error-geoip_test-c-maxminddb-h-file-not-found' into 'master'
Resolve "compile error: geoip_test.c - maxminddb.h file not found"

Closes #1681

See merge request isc-projects/bind9!3233
2020-03-16 07:50:16 +00:00
Mark Andrews
81a80274bd Add MAXMINDDB_CFLAGS to CINCLUDES 2020-03-16 16:15:03 +11:00
Mark Andrews
402c0b26f7 Merge branch '1676-address-timing-issue-in-forward-system-test' into 'master'
Resolve "Address timing issue in forward system test."

Closes #1676

See merge request isc-projects/bind9!3221
2020-03-15 23:30:46 +00:00
Mark Andrews
a38a324442 wait for the reply message before checking to avoid false negative.
Waiting for the reply message will ensure that all messages being
looked for exist in the logs at the time of checking.  When the
test was only waiting for the send message there was a race between
grep and the ns1 instance of named logging that it had seen the
request.
2020-03-16 09:50:45 +11:00
Mark Andrews
9660ec80df Merge branch '1655-bind-9-11-5-writes-syntax-errors-to-its-zone-cache' into 'master'
Resolve "BIND 9.11.5 writes syntax errors to its zone cache"

Closes #1655

See merge request isc-projects/bind9!3150
2020-03-13 04:00:26 +00:00
Mark Andrews
c9c59db5b3 Add CHANGES note 2020-03-13 13:40:15 +11:00
Mark Andrews
59498ce17f Quote zone name so that specials are handled 2020-03-13 13:38:56 +11:00
Mark Andrews
91efc587b2 Pass NUL terminated buffer name to cfg_parse_buffer 2020-03-13 13:38:56 +11:00
Mark Andrews
ad030332bd Test reloading of zones with special 2020-03-13 13:38:56 +11:00
Mark Andrews
fed5992b31 Merge branch 'marka-maybe-silence-missing-unlock' into 'master'
Silence missing unlock from Coverity.

See merge request isc-projects/bind9!3185
2020-03-13 02:14:14 +00:00
Mark Andrews
8dd8d48c9f Silence missing unlock from Coverity.
Save 'i' to 'locknum' and use that rather than using
'header->node->locknum' when performing the deferred
unlock as 'header->node->locknum' can theoretically be
different to 'i'.
2020-03-13 12:42:52 +11:00
Mark Andrews
462a46cf50 Merge branch '1652-nslookup-assertion-at-soa_6-c-302-require-rdata-length-0-failed-back-trace' into 'master'
Resolve "nslookup: assertion at soa_6.c:302: REQUIRE(rdata->length != 0) failed, back trace"

Closes #1652

See merge request isc-projects/bind9!3136
2020-03-13 00:44:24 +00:00
Mark Andrews
6593cf0b5a Check that dig/host/nslookup handle a UPDATE response.
Additionally check that "delete $qname SOA" in the update
reponse doesn't trigger a insertion in nslookup.
2020-03-13 10:29:43 +11:00
Mark Andrews
bb7576cc9b Report opcode mismatch 2020-03-13 10:28:18 +11:00
Mark Andrews
4a7b9dba61 turn off best effort processing in host and add the ability to specify the port 2020-03-13 10:28:18 +11:00