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
Mark Andrews
503e2dff64 add empty release notes for 9.17.1 2020-03-31 14:10:49 +11:00
Witold Krecicki
d02a58adc0 Merge branch '1700-proper-tcp-resuming' into 'master'
Deactivate the handle before sending the async close callback.

Closes #1700

See merge request isc-projects/bind9!3303
2020-03-30 10:27:01 +00:00
Witold Kręcicki
01c4c3301e Deactivate the handle before sending the async close callback.
We could have a race between handle closing and processing async
callback. Deactivate the handle before issuing the callback - we
have the socket referenced anyway so it's not a problem.
2020-03-30 10:26:05 +02:00
Witold Krecicki
2df610a882 Merge branch 'wpk/quota-callback' into 'master'
isc_quota_attach_cb - quota attach function with a callback.

See merge request isc-projects/bind9!3280
2020-03-30 08:17:31 +00:00
Witold Kręcicki
d151a10f30 Add a quota attach function with a callback, some code cleanups.
We introduce a isc_quota_attach_cb function - if ISC_R_QUOTA is returned
at the time the function is called, then a callback will be called when
there's quota available (with quota already attached). The callbacks are
organized as a LIFO queue in the quota structure.
It's needed for TCP client quota -  with old networking code we had one
single place where tcp clients quota was processed so we could resume
accepting when the we had spare slots, but it's gone with netmgr - now
we need to notify the listener/accepter that there's quota available so
that it can resume accepting.

Remove unused isc_quota_force() function.

The isc_quote_reserve and isc_quota_release were used only internally
from the quota.c and the tests.  We should not expose API we are not
using.
2020-03-30 07:43:10 +00:00
Mark Andrews
5826c85a22 Merge branch '1678-bind-fails-to-build-with-mysql-support-against-mysql8-mysql-connector-8' into 'master'
Resolve "BIND fails to build with MYSQL support against mysql8/mysql-connector-8"

Closes #1678

See merge request isc-projects/bind9!3235
2020-03-26 22:03:11 +00:00
Ondřej Surý
715b7a7cec Use compound literals in mysql_options() call
Makes use of compound literals instead of using extra my_bool
variable just to hold "true/1" value.
2020-03-26 20:36:43 +00:00
Mark Andrews
c6d5d5c88f Typedef my_bool if missing.
ORACLE MySQL 8.0 has dropped the my_bool type, so we need to reinstate
it back when compiling with that version or higher.  MariaDB is still
keeping the my_bool type.  The numbering between the two (MariaDB 5.x
jumped to MariaDB 10.x) doesn't make the life of the developer easy.
2020-03-26 20:36:43 +00:00
Mark Andrews
7af9883b48 remove unused variable 2020-03-26 20:36:43 +00:00
Michał Kępień
3377bc4b02 Merge branch 'michal/misc-gitlab-ci-yml-cleanups' into 'master'
Miscellaneous .gitlab-ci.yml cleanups

See merge request isc-projects/bind9!3298
2020-03-26 10:40:13 +00:00
Michał Kępień
3d121ede6c Remove unused YAML anchors
Some YAML anchors defined in .gitlab-ci.yml are not subsequently used.
Remove them to prevent confusion.
2020-03-26 11:03:52 +01:00
Michał Kępień
3d264dbe81 Do not install compiledb in cppcheck job
compiledb is already included in the Docker image used by the cppcheck
job.  Do not attempt installing it again.
2020-03-26 11:03:52 +01:00
Michał Kępień
0c898084cd Include compiler name in all build/test job names
Most build/test job names already contain a "clang", "gcc", or "msvc"
prefix which indicates the compiler used for a given job.  Apply that
naming convention to all build/test job names.
2020-03-26 11:03:52 +01:00
Michał Kępień
84463f33bf Refactor TSAN unit test job definitions
Multiple YAML keys have identical values for both TSAN unit test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN unit test job definitions to reduce code duplication.
2020-03-26 11:03:52 +01:00
Michał Kępień
6ebce9425e Run "kyua report-html" for TSAN unit test jobs
Definitions of jobs running unit tests under TSAN contain an
"after_script" YAML key.  Since the "unit_test_job" anchor is included
in those job definitions before "after_script" is defined, the
job-specific value of that key overrides the one defined in the included
anchor.  This prevents "kyua report-html" from being run for TSAN unit
test jobs.  Moving the invocation of "kyua report-html" to the "script"
key in the "unit_test_job" anchor is not acceptable as it would cause
the exit code of that command to determine the result of all unit test
jobs and we need that to be the exit code of "make unit".  Instead, add
"kyua report-html" invocations to the "after_script" key of TSAN unit
test job definitions to address the problem without affecting other job
definitions.
2020-03-26 11:03:52 +01:00
Michał Kępień
a9aa295f1f Refactor TSAN system test job definitions
Multiple YAML keys have identical values for both TSAN system test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN system test job definitions to reduce code duplication.
2020-03-26 11:03:52 +01:00
Michał Kępień
8ef01c7b50 Drop "before_script" key from TSAN job definitions
Both "system_test_job" and "unit_test_job" YAML anchors contain a
"before_script" key.  TSAN job definitions first specify their own value
of the "before_script" key and then include the aforementioned YAML
anchors, which results in the value of the "before_script" key being
overridden with the value specified by the included anchor.  Given this,
remove "before_script" definitions specific to TSAN jobs as they serve
no practical purpose.
2020-03-26 11:03:52 +01:00
Michał Kępień
6325c0993a Define TSAN options in a global variable
All assignments for the TSAN_OPTIONS variable are identical across the
entire .gitlab-ci.yml file.  Define a global TSAN_OPTIONS_COMMON
variable and use it in job definitions to reduce code duplication.
2020-03-26 11:03:52 +01:00
Ondřej Surý
4167eba3c3 Merge branch '1679-fix-the-typecase-to-isc_stdtime_get' into 'master'
Correct the typecast of .tv_sec in isc_stdtime_get()

Closes #1679

See merge request isc-projects/bind9!3294
2020-03-25 21:31:34 +00:00
Ondřej Surý
7c8179c503 Correct the typecast of .tv_sec in isc_stdtime_get() 2020-03-25 22:08:50 +01:00
Ondřej Surý
03727c1462 Merge branch '1679-fix-the-tv_nsec_check' into 'master'
Fix the tv_nsec check in isc_stdtime_get()

Closes #1679

See merge request isc-projects/bind9!3292
2020-03-25 19:28:59 +00:00
Ondřej Surý
0d06a62dd1 Fix the tv_nsec check in isc_stdtime_get() 2020-03-25 19:06:50 +01:00
Ondřej Surý
4154677f2e Merge branch 'ondrej/no-clang-on-debian-sid' into 'master'
Rewrite .gitlab-ci.yml to have 'base_image' and other GitLab CI improvements

See merge request isc-projects/bind9!3279
2020-03-25 17:05:27 +00:00
Ondřej Surý
281531d82b Replace clang:stretch:amd64 build with clang:buster:amd64 build (+ add missing system test) 2020-03-25 18:04:24 +01:00
Ondřej Surý
ec72d1100d Replace bear with compiledb and drop MAKE_COMMAND because we don't need it 2020-03-25 18:04:24 +01:00
Ondřej Surý
5f5721aa11 Adjust the GitLab CI jobs to match the new images
The custom builds (oot, asan, tsan) were mostly built using Debian sid
amd64 image.  The problem was that this image broke too easily, because
it's Debian "unstable" after all.

This commit introduces "base_image" that should be most stable with
extra bits on top (clang, coccinelle, cppcheck, ...).  Currently, that
would be Debian buster amd64.

Other changes introduced by this commit:

* Change the default clang version to 10
* Run both ASAN and TSAN with both gcc and clang compilers
* Remove Clang Debian stretch i386 job
2020-03-25 18:04:24 +01:00
Ondřej Surý
d07c3d6c8c Merge branch 'ondrej/scan-build-10-fixes' into 'master'
Fix new warnings reported by scan-build from LLVM/Clang 10

See merge request isc-projects/bind9!3285
2020-03-25 17:02:55 +00:00
Ondřej Surý
ddd0d356e5 Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:

> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.

The 4 warnings reported are:

dnssec-cds.c:781:4: warning: Access to field 'base' results in a dereference of a null pointer (loaded from variable 'buf')
                        isc_buffer_availableregion(buf, &r);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:996:36: note: expanded from macro 'isc_buffer_availableregion'
                                   ^
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:821:16: note: expanded from macro 'ISC__BUFFER_AVAILABLEREGION'
                (_r)->base = isc_buffer_used(_b);              \
                             ^~~~~~~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:152:29: note: expanded from macro 'isc_buffer_used'
        ((void *)((unsigned char *)(b)->base + (b)->used)) /*d*/
                                   ^~~~~~~~~
1 warning generated.

--

byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view')
                RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
                                               ^~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK'
                                                   ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK'
        ((void)(ISC_LIKELY(cond) ||  \
                           ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY'
                                            ^
1 warning generated.

--

./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host')
        if (*host == '/') {
            ^~~~~
1 warning generated.

--

./main.c:1254:9: warning: Access to field 'sctx' results in a dereference of a null pointer (loaded from variable 'named_g_server')
        sctx = named_g_server->sctx;
               ^~~~~~~~~~~~~~~~~~~~
1 warning generated.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer
2020-03-25 17:33:22 +01:00
Ondřej Surý
262f087bcf Fix 'Dead nested assignment's from scan-build-10
The 3 warnings reported are:

os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr'
        if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

--

rpz.c:1117:10: warning: Although the value stored to 'zbits' is used in the enclosing expression, the value is never actually read from 'zbits'
        return (zbits &= x);
                ^        ~
1 warning generated.

--

openssleddsa_link.c:532:10: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err'
        while ((err = ERR_get_error()) != 0) {
                ^     ~~~~~~~~~~~~~~~
1 warning generated.
2020-03-25 17:33:07 +01:00
Witold Krecicki
ec9f80cabc Merge branch 'wpk/tcpdns-refactoring' into 'master'
netmgr refactoring: use generic functions when operating on sockets.

See merge request isc-projects/bind9!3269
2020-03-24 20:57:21 +00:00
Witold Kręcicki
5fedd21e16 netmgr refactoring: use generic functions when operating on sockets.
tcpdns used transport-specific functions to operate on the outer socket.
Use generic ones instead, and select the proper call in netmgr.c.
Make the missing functions (e.g. isc_nm_read) generic and add type-specific
calls (isc__nm_tcp_read). This is the preparation for netmgr TLS layer.
2020-03-24 20:31:43 +00:00
Ondřej Surý
aed3927592 Merge branch 'ondrej/remove-debian-jessie-from-gitlab-ci' into 'master'
Remove Debian 8 ("jessie") from the GitLab CI

See merge request isc-projects/bind9!3281
2020-03-24 13:50:41 +00:00
Ondřej Surý
75f46cc3d1 Remove Debian 8 ("Jessie") from the GitLab CI
There are several reason why remove Debian 8 from the CI:

* Debian 8 ("jessie") has been superseded by Debian 9 ("stretch").
* Regular security support updates have been discontinued as of
  June 17th, 2018.
* Jessie LTS is supported from 17th June 2018 to June 30, 2020.

In other words, it's no longer officially supported by Debian security
team, but by the volunteer/paid contributor composed LTS team.  And the
release will be discontinued in three months from now.  We can use the
freed CI resources to bring new platforms or just to make the jobs run a
bit faster.
2020-03-24 14:24:47 +01:00
Michał Kępień
84a2ed67a1 Merge branch 'michal/update-release-checklist' into 'master'
Update release checklist (BIND_BASELINE_VERSION)

See merge request isc-projects/bind9!3278
2020-03-24 08:56:20 +00:00
Michał Kępień
b145071260 Update release checklist (BIND_BASELINE_VERSION)
The reference BIND version used in the ABI check CI job is not
determined automatically - it needs to be updated after each BIND
release.  Reflect that fact in the release checklist to make sure the
ABI check CI job is always comparing current code with the latest BIND
release on a given branch.
2020-03-24 07:36:24 +01:00
Mark Andrews
7da215f38b Merge branch '1698-converting-isc_log-to-rwlock-broke-windows' into 'master'
Resolve "Converting isc_log to RWLOCK broke Windows"

Closes #1698

See merge request isc-projects/bind9!3276
2020-03-24 04:22:43 +00:00
Mark Andrews
b7dbfd14d8 Used to the correct unlock type (read) 2020-03-24 14:50:31 +11:00
Michal Nowak
2d74d88b47 Merge branch 'mnowak/abi-tracker-helper-v9.17.0' into 'master'
Bump BIND baseline version for abi-check

See merge request isc-projects/bind9!3202
2020-03-20 12:08:23 +00:00
Michal Nowak
3730d59bf9 Bump BIND baseline version for abi-check 2020-03-20 13:06:57 +01:00
Matthijs Mekking
5efc35f517 Merge branch 'v9_17_0-release' into 'master'
Apply 9.17.0 release branch

See merge request isc-projects/bind9!3262
2020-03-20 10:22:12 +00:00
Tinderbox User
4b3b2e5dc7 Fix README related to --with-tuning 2020-03-20 10:51:32 +01:00
Tinderbox User
a972cf4360 regen master 2020-03-20 10:51:32 +01:00
Tinderbox User
50cf0e6ef8 Fix resonse typo in release notes 2020-03-20 10:51:32 +01:00
Tinderbox User
e73565ae0a regen master 2020-03-20 10:51:32 +01:00
Tinderbox User
678b8d27d6 prep 9.17.0
The files configure.ac and version are already up to date.

Updated CHANGES with 9.17.0 release line.

Fixed CHANGES by adding GitLab reference to entry 5357 and fix
grammar mistakes.

Add missing /util/check-make-install.in to .gitattributes.

The lib/*/api are already updated to match the new ranges.

I listed two new features under BIND 9.17 features that to me
seemed noteworthy.

The release notes look good to me.
2020-03-20 10:51:32 +01:00
Michal Nowak
2fafcc2c2d Merge branch 'mnowak/unit-test-debugging-enhancements' into 'master'
Enhance unit test debugging

See merge request isc-projects/bind9!2990
2020-03-20 09:40:16 +00:00
Michal Nowak
8fad74e0e5 Enhance unit test debugging
When unit test fails, core file is created. Kyua's 'debug' command can
run GDB on it and provide backtrace. Unfortunately Kyua is picky about
location of these core files we opt to use custom Kyua fork and copy
core files from Kyua working directory to source tree and make it
available in GitLab.
2020-03-20 10:37:59 +01:00
Ondřej Surý
eb26fdf701 Merge branch '4-fix-the-last-three-system-tests-parallel-run' into 'master'
Convert the last three system tests (ecdsa, eddsa and tkey) to use dynamic ports

See merge request isc-projects/bind9!3257
2020-03-19 17:23:53 +00:00
Ondřej Surý
cfbb46201f Fix the tkey system test to allow parallel run
The tkey 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ý
4124a89972 Fix the eddsa system test to allow parallel run
The eddsa 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