]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoDo not install compiledb in cppcheck job
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 3d264dbe819cd045cde72acac4222cbadf71ee15)

6 years agoInclude compiler name in all build/test job names
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 0c898084cd0f3abf82a40ad82d384952dcb3def5)

6 years agoRefactor TSAN unit test job definitions
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 84463f33bfe7777b5884696820cdf484ea9a1073)

6 years agoRun "kyua report-html" for TSAN unit test jobs
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 6ebce9425e21615bfbe2aafe3bbc0b001885e882)

6 years agoRefactor TSAN system test job definitions
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit a9aa295f1f3a5af1861d5be150f66522358da8aa)

6 years agoDrop "before_script" key from TSAN job definitions
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 8ef01c7b50d9700f81f4836657a62ccf80b91ac7)

6 years agoDefine TSAN options in a global variable
Michał Kępień [Thu, 26 Mar 2020 10:03:52 +0000 (11:03 +0100)] 
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.

(cherry picked from commit 6325c0993a4f73b7c79dea4835a98c894820f189)

6 years agoMerge branch 'ondrej/arch-ppc64le-v9_11' into 'v9_11'
Ondřej Surý [Wed, 25 Mar 2020 23:03:36 +0000 (23:03 +0000)] 
Merge branch 'ondrej/arch-ppc64le-v9_11' into 'v9_11'

Detect atomic operations support on ppc64le (v9.11)

See merge request isc-projects/bind9!3295

6 years agoDetect atomic operations support on ppc64le
Petr Menšík [Fri, 20 Mar 2020 15:35:28 +0000 (16:35 +0100)] 
Detect atomic operations support on ppc64le

Current configure detects only stdatomic operations. Fix it to detect
also ISC atomics with assembly.

6 years agoMerge branch 'ondrej/no-clang-on-debian-sid-v9_11' into 'v9_11'
Ondřej Surý [Wed, 25 Mar 2020 17:30:15 +0000 (17:30 +0000)] 
Merge branch 'ondrej/no-clang-on-debian-sid-v9_11' into 'v9_11'

Rewrite .gitlab-ci.yml to have 'base_image' and other GitLab CI improvements (v9.11)

See merge request isc-projects/bind9!3289

6 years agoAdjust the differences between v9_16 and v9_11 GitLab CI job configuration
Ondřej Surý [Wed, 25 Mar 2020 17:20:40 +0000 (18:20 +0100)] 
Adjust the differences between v9_16 and v9_11 GitLab CI job configuration

6 years agoReplace clang:stretch:amd64 build with clang:buster:amd64 build (+ add missing system...
Ondřej Surý [Wed, 25 Mar 2020 15:31:59 +0000 (16:31 +0100)] 
Replace clang:stretch:amd64 build with clang:buster:amd64 build (+ add missing system test)

(cherry picked from commit 281531d82bab6d8d6eceb0937b4ca100fd20a2ff)

6 years agoReplace bear with compiledb and drop MAKE_COMMAND because we don't need it
Ondřej Surý [Mon, 23 Mar 2020 10:48:24 +0000 (11:48 +0100)] 
Replace bear with compiledb and drop MAKE_COMMAND because we don't need it

(cherry picked from commit ec72d1100d7e86c131ab1936f91ed4da87c48a4b)

6 years agoAdjust the GitLab CI jobs to match the new images
Ondřej Surý [Tue, 24 Mar 2020 08:43:45 +0000 (09:43 +0100)] 
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

(cherry picked from commit 5f5721aa11a88cfb9d2bb65fa8b8044fcb0022ed)

6 years agoMerge branch 'ondrej/scan-build-10-fixes-v9_11' into 'v9_11'
Ondřej Surý [Wed, 25 Mar 2020 17:11:37 +0000 (17:11 +0000)] 
Merge branch 'ondrej/scan-build-10-fixes-v9_11' into 'v9_11'

Fix new warnings reported by scan-build from LLVM/Clang 10 (v9.11)

See merge request isc-projects/bind9!3287

6 years agoFix 'Dereference of null pointer' from scan-build-10
Ondřej Surý [Wed, 25 Mar 2020 16:25:45 +0000 (17:25 +0100)] 
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 2 warnings reported are:

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.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer

(cherry picked from commit ddd0d356e5922e6b1958b3050e04a160e106734a)

6 years agoFix 'Dead nested assignment's from scan-build-10
Ondřej Surý [Wed, 25 Mar 2020 16:00:07 +0000 (17:00 +0100)] 
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.

(cherry picked from commit 262f087bcff969b6eca2ae0a71be4323a3c1729d)

6 years agoMerge branch 'ondrej/remove-debian-jessie-from-gitlab-ci-v9_11' into 'v9_11'
Ondřej Surý [Wed, 25 Mar 2020 06:29:09 +0000 (06:29 +0000)] 
Merge branch 'ondrej/remove-debian-jessie-from-gitlab-ci-v9_11' into 'v9_11'

Remove Debian 8 ("Jessie") from the GitLab CI

See merge request isc-projects/bind9!3284

6 years agoRemove Debian 8 ("Jessie") from the GitLab CI
Ondřej Surý [Tue, 24 Mar 2020 12:56:29 +0000 (13:56 +0100)] 
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.

(cherry picked from commit 75f46cc3d1bac79e1e5e630a91eae76750c0f90e)

6 years agoMerge branch '4-gitlab-ci.yml-improvement-v9_11' into 'v9_11'
Ondřej Surý [Fri, 20 Mar 2020 15:14:09 +0000 (15:14 +0000)] 
Merge branch '4-gitlab-ci.yml-improvement-v9_11' into 'v9_11'

Improve GitLab CI configuration (v9.11)

See merge request isc-projects/bind9!3261

6 years agoRename MAKE environment variable to MAKE_COMMAND
Ondřej Surý [Tue, 7 Aug 2018 14:46:53 +0000 (16:46 +0200)] 
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.

(cherry picked from commit de1a637a696383583545243fdfaebcbda8392a5f)

6 years agoReplace dependencies+needs with needs+artifacts in GitLabCI config
Ondřej Surý [Tue, 7 Aug 2018 14:46:53 +0000 (16:46 +0200)] 
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).

(cherry picked from commit 66ba808c1b69e53427d7f0bb40c7134996ca764a)

6 years agoMerge branch 'mnowak/abi-tracker-helper-v9.17.0-v9_11' into 'v9_11'
Michal Nowak [Fri, 20 Mar 2020 12:15:14 +0000 (12:15 +0000)] 
Merge branch 'mnowak/abi-tracker-helper-v9.17.0-v9_11' into 'v9_11'

[v9_11] Bump BIND baseline version for abi-check

See merge request isc-projects/bind9!3271

6 years agoBump BIND baseline version for abi-check
Michal Nowak [Tue, 10 Mar 2020 08:49:25 +0000 (09:49 +0100)] 
Bump BIND baseline version for abi-check

(cherry picked from commit 3730d59bf97b6d089cea036c42139656ad715e79)

6 years agoMerge branch 'mnowak/unit-test-debugging-enhancements-v9_11' into 'v9_11'
Michal Nowak [Fri, 20 Mar 2020 10:43:39 +0000 (10:43 +0000)] 
Merge branch 'mnowak/unit-test-debugging-enhancements-v9_11' into 'v9_11'

[v9_11] Enhance unit test debugging

See merge request isc-projects/bind9!3268

6 years agoEnhance unit test debugging
Michal Nowak [Wed, 29 Jan 2020 14:56:44 +0000 (15:56 +0100)] 
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.

(cherry picked from commit 94fa27e43f65acda115b25b45021ec0fab84d1f6)

6 years agoMerge branch 'v9_11_17-release' into 'v9_11'
Matthijs Mekking [Fri, 20 Mar 2020 10:04:46 +0000 (10:04 +0000)] 
Merge branch 'v9_11_17-release' into 'v9_11'

Apply 9.11.17 release branch

See merge request isc-projects/bind9!3264

6 years agoEnsure util/check-make-install.in is exported
Michał Kępień [Wed, 11 Mar 2020 12:03:48 +0000 (13:03 +0100)] 
Ensure util/check-make-install.in is exported

./configure needs util/check-make-install.in to be present in the source
directory in order to complete successfully.  Make sure this file is
included in source tarballs created from the repository.

6 years agoAdjust lib/isc/api version
Tinderbox User [Wed, 11 Mar 2020 10:09:04 +0000 (10:09 +0000)] 
Adjust lib/isc/api version

The libisc LIBINTERFACE bump for 9.11.17 is unnecessary.
A lot of headers were altered but the ABI tool did not report anything.
Trust the ABI tool on this and decrement LIBINTERFACE and increment
LIBREVISION.

6 years agoNote 9.11.17 in README
Tinderbox User [Wed, 11 Mar 2020 09:50:00 +0000 (09:50 +0000)] 
Note 9.11.17 in README

6 years agoregen v9_11
Tinderbox User [Wed, 11 Mar 2020 09:17:50 +0000 (09:17 +0000)] 
regen v9_11

Michal caught at the last moment that a CHANGES entry did
not have a GitLab issue/mr reference.  This check was omitted from
the release process documentation.  The wiki is updated and the
CHANGES file is updated in this commit.

6 years agoprep 9.11.17
Tinderbox User [Wed, 11 Mar 2020 09:10:17 +0000 (09:10 +0000)] 
prep 9.11.17

Bumped the version file and added release line in CHANGES.

API files:
- lib/bind9/api:
  No changes because only changes in comments.
- lib/dns/api:
  Increment LIBINTERFACE because of the added field structure in
  dns_struct_update.
- lib/isc/api:
  Increment LIBINTERFACE because of the PKCS#11 replacement.
- lib/isccc/api:
  No changes because no source code changes.
- lib/isccfg/api:
  Increment LIBREVISION because of minor source code changes.
- lib/lwres/api:
  No changes because no source code changes.

I decided no changes to README.md or the release notes were necessary.

Perflab graphs look sane.

6 years agoMerge branch 'ondrej/remove-serve-stale-options-from-v9_11' into 'v9_11'
Ondřej Surý [Thu, 19 Mar 2020 11:18:35 +0000 (11:18 +0000)] 
Merge branch 'ondrej/remove-serve-stale-options-from-v9_11' into 'v9_11'

Remove serve stale options from v9 11

See merge request isc-projects/bind9!3265

6 years agoRevert "arm: document resolver-nonbackoff-tries and resolver-retry-interval"
Ondřej Surý [Thu, 19 Mar 2020 10:59:38 +0000 (11:59 +0100)] 
Revert "arm: document resolver-nonbackoff-tries and resolver-retry-interval"

This reverts commit bedefad22d97d6b8c834735a326bab5c8847c6f5.

6 years agoMerge branch '1679-handle-systems-with-broken-gettimeofday-system-calls' into 'v9_11'
Mark Andrews [Wed, 18 Mar 2020 07:20:37 +0000 (07:20 +0000)] 
Merge branch '1679-handle-systems-with-broken-gettimeofday-system-calls' into 'v9_11'

Resolve "Handle systems with broken gettimeofday system calls"

See merge request isc-projects/bind9!3232

6 years agoJust return tv_sec field
Mark Andrews [Mon, 16 Mar 2020 01:47:40 +0000 (12:47 +1100)] 
Just return tv_sec field

6 years agoMerge branch 'each-lgtm-fixes-v9_11' into 'v9_11'
Evan Hunt [Wed, 18 Mar 2020 00:07:39 +0000 (00:07 +0000)] 
Merge branch 'each-lgtm-fixes-v9_11' into 'v9_11'

fix LGTM warnings

See merge request isc-projects/bind9!3250

6 years agoAdd C11 localtime_r and gmtime_r shims for Windows
Ondřej Surý [Fri, 13 Mar 2020 07:38:37 +0000 (08:38 +0100)] 
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.

(cherry picked from commit 08f4c7d6c094c93ce7df093a8aa0890618959c83)

6 years agosilence a warning about unsafe snprintf() call
Evan Hunt [Tue, 10 Mar 2020 03:51:21 +0000 (20:51 -0700)] 
silence a warning about unsafe snprintf() call

(cherry picked from commit ec95b84e8d2f0e406cd15282f5b31fba7b3e84ce)

6 years agoreplace unsafe ctime() and gmtime() function calls
Evan Hunt [Tue, 10 Mar 2020 01:52:33 +0000 (18:52 -0700)] 
replace unsafe ctime() and gmtime() function calls

This silences LGTM warnings that these functions are not thread-safe.

(cherry picked from commit 5703f704273955f6c54627b6e05d8eb009b81337)

6 years agoremove or comment empty conditional branches
Evan Hunt [Tue, 10 Mar 2020 01:23:13 +0000 (18:23 -0700)] 
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.

(cherry picked from commit 735be3b816913f8fae3153366ec89e5511ff52b4)

6 years agoMerge branch '1684-timer-test-build-v9_11' into 'v9_11'
Evan Hunt [Tue, 17 Mar 2020 20:27:23 +0000 (20:27 +0000)] 
Merge branch '1684-timer-test-build-v9_11' into 'v9_11'

fix a pointer-to-int cast error

See merge request isc-projects/bind9!3248

6 years agofix a pointer-to-int cast error
Evan Hunt [Tue, 17 Mar 2020 18:18:36 +0000 (11:18 -0700)] 
fix a pointer-to-int cast error

(cherry picked from commit 6b766460375e1069bd8510bf6ea77597e421641e)

6 years agoMerge branch 'michal/update-gitlab-ci-to-freebsd-12.1-v9_11' into 'v9_11'
Michał Kępień [Mon, 16 Mar 2020 19:05:32 +0000 (19:05 +0000)] 
Merge branch 'michal/update-gitlab-ci-to-freebsd-12.1-v9_11' into 'v9_11'

[v9_11] Update GitLab CI to FreeBSD 12.1

See merge request isc-projects/bind9!3241

6 years agoMove FreeBSD CI jobs to libvirt-based executors
Michał Kępień [Mon, 16 Mar 2020 10:32:46 +0000 (11:32 +0100)] 
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.

(cherry picked from commit 80618b53782f9bdd105b05f17496c86938a6657f)

6 years agoUpdate GitLab CI to FreeBSD 12.1
Michał Kępień [Mon, 16 Mar 2020 10:32:46 +0000 (11:32 +0100)] 
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.

(cherry picked from commit 4c68b56246608383fe8acf27c2cc71fb4754ffb0)

6 years agoMerge branch '1681-compile-error-geoip_test-c-maxminddb-h-file-not-found-v9_11' into...
Mark Andrews [Mon, 16 Mar 2020 10:02:33 +0000 (10:02 +0000)] 
Merge branch '1681-compile-error-geoip_test-c-maxminddb-h-file-not-found-v9_11' into 'v9_11'

Add MAXMINDDB_CFLAGS to CINCLUDES

See merge request isc-projects/bind9!3237

6 years agoAdd MAXMINDDB_CFLAGS to CINCLUDES
Mark Andrews [Mon, 16 Mar 2020 05:15:03 +0000 (16:15 +1100)] 
Add MAXMINDDB_CFLAGS to CINCLUDES

(cherry picked from commit 81a80274bd2f23392ee76fcc56ee09088d80e02a)

6 years agoMerge branch '1676-address-timing-issue-in-forward-system-test-v9_11' into 'v9_11'
Mark Andrews [Mon, 16 Mar 2020 00:15:37 +0000 (00:15 +0000)] 
Merge branch '1676-address-timing-issue-in-forward-system-test-v9_11' into 'v9_11'

wait for the reply message before checking to avoid false negative.

See merge request isc-projects/bind9!3231

6 years agowait for the reply message before checking to avoid false negative.
Mark Andrews [Fri, 13 Mar 2020 00:23:40 +0000 (11:23 +1100)] 
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.

(cherry picked from commit a38a3244424c593c7b65bb729683c9d953c2cf87)

6 years agoMerge branch '1655-bind-9-11-5-writes-syntax-errors-to-its-zone-cache-v9_11' into...
Mark Andrews [Fri, 13 Mar 2020 05:11:15 +0000 (05:11 +0000)] 
Merge branch '1655-bind-9-11-5-writes-syntax-errors-to-its-zone-cache-v9_11' into 'v9_11'

Resolve "BIND 9.11.5 writes syntax errors to its zone cache"

See merge request isc-projects/bind9!3227

6 years agoAdd CHANGES note
Mark Andrews [Wed, 4 Mar 2020 02:09:54 +0000 (13:09 +1100)] 
Add CHANGES note

(cherry picked from commit c9c59db5b3cc4a14aa13d6c198f4302736741ab0)

6 years agoQuote zone name so that specials are handled
Mark Andrews [Wed, 4 Mar 2020 02:04:15 +0000 (13:04 +1100)] 
Quote zone name so that specials are handled

(cherry picked from commit 59498ce17f3ced8e0046384cfef12d361760b66c)

6 years agoPass NUL terminated buffer name to cfg_parse_buffer
Mark Andrews [Wed, 4 Mar 2020 02:02:50 +0000 (13:02 +1100)] 
Pass NUL terminated buffer name to cfg_parse_buffer

(cherry picked from commit 91efc587b22339e70cd2a4a11b6198a460b66a35)

6 years agoTest reloading of zones with special
Mark Andrews [Wed, 4 Mar 2020 01:58:55 +0000 (12:58 +1100)] 
Test reloading of zones with special

(cherry picked from commit ad030332bdb14b5c0a0aacee2f89cedbd98ec041)

6 years agoMerge branch 'marka-maybe-silence-missing-unlock-v9_11' into 'v9_11'
Mark Andrews [Fri, 13 Mar 2020 03:05:33 +0000 (03:05 +0000)] 
Merge branch 'marka-maybe-silence-missing-unlock-v9_11' into 'v9_11'

Silence missing unlock from Coverity.

See merge request isc-projects/bind9!3225

6 years agoSilence missing unlock from Coverity.
Mark Andrews [Mon, 9 Mar 2020 00:33:05 +0000 (11:33 +1100)] 
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'.

(cherry picked from commit 8dd8d48c9f679b58c244cbe09637404905a00af6)

6 years agoMerge branch '1652-nslookup-assertion-at-soa_6-c-302-require-rdata-length-0-failed...
Mark Andrews [Fri, 13 Mar 2020 01:32:54 +0000 (01:32 +0000)] 
Merge branch '1652-nslookup-assertion-at-soa_6-c-302-require-rdata-length-0-failed-back-trace-v9_11' into 'v9_11'

Resolve "nslookup: assertion at soa_6.c:302: REQUIRE(rdata->length != 0) failed, back trace"

See merge request isc-projects/bind9!3223

6 years agoCheck that dig/host/nslookup handle a UPDATE response.
Mark Andrews [Wed, 11 Mar 2020 04:15:08 +0000 (15:15 +1100)] 
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.

(cherry picked from commit 6593cf0b5a0f1e5064f5a0d59323968b55c2cf1b)

6 years agoReport opcode mismatch
Mark Andrews [Wed, 11 Mar 2020 02:55:14 +0000 (13:55 +1100)] 
Report opcode mismatch

(cherry picked from commit bb7576cc9bbb98c75f3783dbb6f47bdba2516c20)

6 years agoturn off best effort processing in host and add the ability to specify the port
Mark Andrews [Tue, 3 Mar 2020 02:46:32 +0000 (13:46 +1100)] 
turn off best effort processing in host and add the ability to specify the port

(cherry picked from commit 4a7b9dba61ca522f07f0ad52bc17249b6c8b5d03)

6 years agoturn off best effort processing in nslookup
Mark Andrews [Tue, 3 Mar 2020 02:46:00 +0000 (13:46 +1100)] 
turn off best effort processing in nslookup

(cherry picked from commit d1cb30e7476f008ef65815e34a593777a37a9c1e)

6 years agoMerge branch '864-zone-type-table-in-arm-needs-improvement-v9_11' into 'v9_11'
Evan Hunt [Thu, 12 Mar 2020 10:01:08 +0000 (10:01 +0000)] 
Merge branch '864-zone-type-table-in-arm-needs-improvement-v9_11' into 'v9_11'

Resolve "zone type table in ARM needs improvement"

See merge request isc-projects/bind9!3219

6 years agobuild doc
Evan Hunt [Thu, 12 Mar 2020 09:34:12 +0000 (02:34 -0700)] 
build doc

6 years agoimprove readability of bibliogrpahy
Evan Hunt [Mon, 9 Mar 2020 21:32:37 +0000 (14:32 -0700)] 
improve readability of bibliogrpahy

Change <biblioentry> and <citetitle> sections to improve the readability
of the bibliography sections. Thanks to Sun Guonian.

6 years agouse relative widths for zone table
Mark Andrews [Wed, 20 Feb 2019 03:57:32 +0000 (14:57 +1100)] 
use relative widths for zone table

6 years agoMerge branch 'mnowak/abi-tracker-helper-v9_11' into 'v9_11'
Michal Nowak [Tue, 10 Mar 2020 09:03:17 +0000 (09:03 +0000)] 
Merge branch 'mnowak/abi-tracker-helper-v9_11' into 'v9_11'

[v9_11] Add API Checker

See merge request isc-projects/bind9!3204

6 years agoAdd API Checker
Michal Nowak [Wed, 26 Feb 2020 10:24:45 +0000 (11:24 +0100)] 
Add API Checker

ABI checker tools generate HTML and TXT API compatibility reports of
BIND libraries. Comparison is being done between two bind source trees
which hold built BIND.

In the CI one version is the reference version defined by
BIND_BASELINE_VERSION variable, the latter one is the HEAD of branch
under test.

(cherry picked from commit 49bc08e612c47e988e3a6c04d1439d55057555bc)

6 years agoMerge branch '1664-double-unlock-v9_11' into 'v9_11'
Evan Hunt [Tue, 10 Mar 2020 00:23:58 +0000 (00:23 +0000)] 
Merge branch '1664-double-unlock-v9_11' into 'v9_11'

remove redundant ZONEDB_UNLOCK

See merge request isc-projects/bind9!3199

6 years agoremove redundant ZONEDB_UNLOCK
Evan Hunt [Mon, 9 Mar 2020 21:05:14 +0000 (14:05 -0700)] 
remove redundant ZONEDB_UNLOCK

(cherry picked from commit b54454b7c612e9c112e6c6ac8542991b833c3517)

6 years agoMerge branch 'michal/do-not-run-openbsd-system-test-jobs-for-tags-v9_11' into 'v9_11'
Michał Kępień [Mon, 9 Mar 2020 13:36:45 +0000 (13:36 +0000)] 
Merge branch 'michal/do-not-run-openbsd-system-test-jobs-for-tags-v9_11' into 'v9_11'

[v9_11] Do not run OpenBSD system test jobs for tags

See merge request isc-projects/bind9!3190

6 years agoDo not run OpenBSD system test jobs for tags
Michał Kępień [Mon, 9 Mar 2020 13:33:04 +0000 (14:33 +0100)] 
Do not run OpenBSD system test jobs for tags

OpenBSD virtual machines seem to affected particularly badly by other
activity happening on the host.  This causes trouble around release
time: when multiple tags are pushed to the repository, a large number of
jobs is started concurrently on all CI runners.  In extreme cases, this
causes the system test suite to run for about an hour (!) on OpenBSD
VMs, with multiple tests failing.  We investigated the test artifacts
for all such cases in the past and the outcome was always the same: test
failures were caused by extremely slow I/O on the guest.  We tried
various tricks to work around this problem, but nothing helped.

Given the above, stop running OpenBSD system test jobs for pending BIND
releases to prevent the results of these jobs from affecting the
assessment of a given release's readiness for publication.  This change
does not affect OpenBSD build jobs.  OpenBSD system test jobs will still
be run for scheduled and web-requested pipelines, to make sure we catch
any severe issues with test code on that platform sooner or later.

(cherry picked from commit 7b002cea83889d69494740a660c88b52990d3259)

6 years agoMerge branch '1628-release-process-failed-to-detect-that-header-file-was-not-installe...
Mark Andrews [Fri, 6 Mar 2020 03:03:24 +0000 (03:03 +0000)] 
Merge branch '1628-release-process-failed-to-detect-that-header-file-was-not-installed-v9_11' into 'v9_11'

test installed header files

See merge request isc-projects/bind9!3177

6 years agotest installed header files
Mark Andrews [Wed, 19 Feb 2020 22:31:05 +0000 (09:31 +1100)] 
test installed header files

(cherry picked from commit a278b6bd84d8e852879521facfb3f38da6b78b7d)

6 years agoMerge branch 'marka-install-missing-header-files-v9_11' into 'v9_11'
Mark Andrews [Fri, 6 Mar 2020 02:18:42 +0000 (02:18 +0000)] 
Merge branch 'marka-install-missing-header-files-v9_11' into 'v9_11'

Fix lists of installed header files

See merge request isc-projects/bind9!3179

6 years agoFix lists of installed header files
Mark Andrews [Fri, 6 Mar 2020 01:57:00 +0000 (12:57 +1100)] 
Fix lists of installed header files

6 years agoMerge branch 'marka-sort-AC_CONFIG_FILES-v9_11' into 'v9_11'
Mark Andrews [Thu, 5 Mar 2020 22:32:53 +0000 (22:32 +0000)] 
Merge branch 'marka-sort-AC_CONFIG_FILES-v9_11' into 'v9_11'

sort AC_CONFIG_FILES

See merge request isc-projects/bind9!3170

6 years agosort AC_CONFIG_FILES
Mark Andrews [Thu, 5 Mar 2020 21:17:06 +0000 (08:17 +1100)] 
sort AC_CONFIG_FILES

(cherry picked from commit fd0d4ba9481bf26e9aef62a2776182b8419a7d88)

6 years agoMerge branch 'mnowak/respdiff-v9_11' into 'v9_11'
Michal Nowak [Thu, 5 Mar 2020 14:49:14 +0000 (14:49 +0000)] 
Merge branch 'mnowak/respdiff-v9_11' into 'v9_11'

[v9_11] Add respdiff job

See merge request isc-projects/bind9!3166

6 years agoAdd respdiff job
Michal Nowak [Thu, 6 Feb 2020 14:53:36 +0000 (15:53 +0100)] 
Add respdiff job

This job leverages respdiff test from the private bind-qa repo.

(cherry picked from commit 04f8b65a8f280b35ba7a466f5eedc99798d9eafb)

6 years agoMerge branch 'mnowak/pkcs11-test-fix-v9_11' into 'v9_11'
Michal Nowak [Thu, 5 Mar 2020 07:37:52 +0000 (07:37 +0000)] 
Merge branch 'mnowak/pkcs11-test-fix-v9_11' into 'v9_11'

[v9_11] Fix "pkcs11" system test

See merge request isc-projects/bind9!3161

6 years agoFix "pkcs11" system test
Michal Nowak [Mon, 24 Feb 2020 15:37:25 +0000 (15:37 +0000)] 
Fix "pkcs11" system test

  - Define the SLOT environment variable before starting the test.  This
    variable defaults to 0 and that does not work with SoftHSM 2.

  - The system test expects the PIN environment variable to be set to
    "1234" while bin/tests/prepare-softhsm2.sh sets it to "0000".
    Update bin/tests/prepare-softhsm2.sh so that it sets the PIN to
    "1234".

  - Move contents of bin/tests/system/pkcs11/prereq.sh to
    bin/tests/system/pkcs11/setup.sh as the former was creating a file
    called "supported" that was getting removed by the latter before
    bin/tests/system/pkcs11/tests.sh could access it.

  - Fix typo in "have_ecx".

(cherry picked from commit 100a230e80f01a777b917b135b4bae9a4ac0e8ae)

6 years agoMerge branch 'michal/fix-cppcheck-warnings' into 'v9_11'
Michał Kępień [Wed, 4 Mar 2020 11:42:43 +0000 (11:42 +0000)] 
Merge branch 'michal/fix-cppcheck-warnings' into 'v9_11'

Fix cppcheck warnings for 9.11

See merge request isc-projects/bind9!3143

6 years agoFix cppcheck 1.90 warnings
Michał Kępień [Wed, 4 Mar 2020 11:41:01 +0000 (12:41 +0100)] 
Fix cppcheck 1.90 warnings

cppcheck 1.90 reports the following false positives for
lib/dns/tests/rbt_serialize_test.c:

    lib/dns/tests/rbt_serialize_test.c:412:12: warning: Either the condition 'base!=NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
      p = base + (r % filesize);
               ^
    lib/dns/tests/rbt_serialize_test.c:407:20: note: Assuming that condition 'base!=NULL' is not redundant
      assert_true(base != NULL && base != MAP_FAILED);
                       ^
    lib/dns/tests/rbt_serialize_test.c:405:14: note: Assignment 'base=mmap(NULL,filesize,PROT_READ|PROT_WRITE,0|MAP_PRIVATE,fd,0)', assigned value is 0
      base = mmap(NULL, filesize, PROT_READ|PROT_WRITE,
                 ^
    lib/dns/tests/rbt_serialize_test.c:412:12: note: Null pointer addition
      p = base + (r % filesize);
               ^
    lib/dns/tests/rbt_serialize_test.c:413:12: warning: Either the condition 'base!=NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
      q = base + filesize;
               ^
    lib/dns/tests/rbt_serialize_test.c:407:20: note: Assuming that condition 'base!=NULL' is not redundant
      assert_true(base != NULL && base != MAP_FAILED);
                       ^
    lib/dns/tests/rbt_serialize_test.c:405:14: note: Assignment 'base=mmap(NULL,filesize,PROT_READ|PROT_WRITE,0|MAP_PRIVATE,fd,0)', assigned value is 0
      base = mmap(NULL, filesize, PROT_READ|PROT_WRITE,
                 ^
    lib/dns/tests/rbt_serialize_test.c:413:12: note: Null pointer addition
      q = base + filesize;
               ^

This is caused by cppcheck not understanding how cmocka's assert_true()
macro works.  The problem being reported is a false positive: if mmap()
fails, the lines flagged by cppcheck will never be reached.  Address the
problem by suppressing nullPointerArithmeticRedundantCheck warnings for
the affected lines.

6 years agoFix cppcheck 1.90 warning
Michał Kępień [Wed, 4 Mar 2020 11:41:01 +0000 (12:41 +0100)] 
Fix cppcheck 1.90 warning

cppcheck 1.90 reports the following issue for bin/named/query.c:

    bin/named/query.c:6838:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     snprintf(mbuf, sizeof(mbuf) - 1,
     ^

Tweak the format specifier for client->query.restarts to address the
problem.

6 years agoFix cppcheck 1.90 warnings
Michał Kępień [Wed, 4 Mar 2020 11:41:01 +0000 (12:41 +0100)] 
Fix cppcheck 1.90 warnings

cppcheck 1.90 reports some false positives for lib/dns/client.c:

    lib/dns/client.c:1431:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->rdataset = rdataset;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1431:2: note: Null pointer dereference
     rctx->rdataset = rdataset;
     ^
    lib/dns/client.c:1438:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->sigrdataset = sigrdataset;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1438:2: note: Null pointer dereference
     rctx->sigrdataset = sigrdataset;
     ^
    lib/dns/client.c:1445:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->client = client;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1445:2: note: Null pointer dereference
     rctx->client = client;
     ^
    lib/dns/client.c:1827:2: warning: Either the condition 'ctx==((void*)0)' is redundant or there is possible null pointer dereference: ctx. [nullPointerRedundantCheck]
     ctx->client = client;
     ^
    lib/dns/client.c:1815:10: note: Assuming that condition 'ctx==((void*)0)' is not redundant
     if (ctx == NULL)
             ^
    lib/dns/client.c:1814:8: note: Assignment 'ctx=isc__mem_get(client->mctx,sizeof(*ctx),"lib/dns/client.c",1814)', assigned value is 0
     ctx = isc_mem_get(client->mctx, sizeof(*ctx));
           ^
    lib/dns/client.c:1827:2: note: Null pointer dereference
     ctx->client = client;
     ^

All of them are caused by cppcheck not recognizing the relationship
between isc_mem_get() returning NULL and the result variable being set
to ISC_R_NOMEMORY (with a subsequent jump to a cleanup section).

Move "goto cleanup;" statements into error handling branches to prevent
cppcheck from generating these warnings.

6 years agoFix cppcheck 1.89 warnings
Michał Kępień [Wed, 16 Oct 2019 20:06:00 +0000 (22:06 +0200)] 
Fix cppcheck 1.89 warnings

cppcheck 1.89 enabled certain value flow analysis mechanisms [1] which
trigger null pointer dereference false positives that were previously
not reported.  It seems that cppcheck no longer treats at least some
REQUIRE() assertion failures as fatal, so add extra assertion macro
definitions to lib/isc/include/isc/util.h that are only used when the
CPPCHECK preprocessor macro is defined; these definitions make cppcheck
1.89 behave as expected.

There is an important requirement for these custom definitions to work:
cppcheck must properly treat abort() as a function which does not
return.  In order for that to happen, the __GNUC__ macro must be set to
a high enough number (because system include directories are used and
system headers compile attributes away if __GNUC__ is not high enough).
__GNUC__ is thus set to the major version number of the GCC compiler
used, which is what that latter does itself during compilation.

[1] https://github.com/danmar/cppcheck/commit/aaeec462e6d96bb70c2b1cf030979d09e2d7c959

(cherry picked from commit abfde3d543576311ce5d32089d774a360b7edc9f)

6 years agoMerge branch '1656-masterformat-system-test-failed-missing-sleep-1-v9_11' into 'v9_11'
Mark Andrews [Wed, 4 Mar 2020 07:41:32 +0000 (07:41 +0000)] 
Merge branch '1656-masterformat-system-test-failed-missing-sleep-1-v9_11' into 'v9_11'

properly wait for zone to be loaded

See merge request isc-projects/bind9!3154

6 years agoproperly wait for zone to be loaded
Mark Andrews [Wed, 4 Mar 2020 04:39:08 +0000 (15:39 +1100)] 
properly wait for zone to be loaded

(cherry picked from commit 0abcface49789c5fdc28fec062cdf692c43a3e7a)

6 years agoMerge branch 'marka-check-touched-v9_11' into 'v9_11'
Mark Andrews [Tue, 3 Mar 2020 22:41:06 +0000 (22:41 +0000)] 
Merge branch 'marka-check-touched-v9_11' into 'v9_11'

Marka check touched v9 11

See merge request isc-projects/bind9!3149

6 years agoAdd CHANGES entry
Mark Andrews [Tue, 3 Mar 2020 01:31:55 +0000 (12:31 +1100)] 
Add CHANGES entry

(cherry picked from commit 64474db14e715e4b1a545406acf9fb5be8200f50)

6 years agoRestart zone maintenance if it had been stalled.
Mark Andrews [Mon, 2 Mar 2020 23:50:06 +0000 (10:50 +1100)] 
Restart zone maintenance if it had been stalled.

(cherry picked from commit f171347b5f27c1b0dfe1ef935512b20a820901c9)

6 years agoCheck inline master zones that are touched reload correctly.
Mark Andrews [Mon, 2 Mar 2020 08:38:29 +0000 (19:38 +1100)] 
Check inline master zones that are touched reload correctly.

(cherry picked from commit 50e079d6c3eea1a16b94bdb10d9e19939147bc30)

6 years agoMerge branch '1627-call-set_resigntime-and-zone_settimer-v9_11' into 'v9_11'
Mark Andrews [Tue, 3 Mar 2020 05:56:15 +0000 (05:56 +0000)] 
Merge branch '1627-call-set_resigntime-and-zone_settimer-v9_11' into 'v9_11'

Resolve "inline re-signing stops"

See merge request isc-projects/bind9!3139

6 years agoadd release note entry
Mark Andrews [Tue, 3 Mar 2020 04:37:42 +0000 (15:37 +1100)] 
add release note entry

(cherry picked from commit 23ce0f32e5a770c16a76d19e2a1c9e1322433d69)

6 years agoAdd CHANGES note
Mark Andrews [Tue, 3 Mar 2020 04:30:52 +0000 (15:30 +1100)] 
Add CHANGES note

(cherry picked from commit 905549f061dab784c533287db087d3705cfe0a1d)

6 years agoAdjust lock/unlock in zone_rekey()
Ondřej Surý [Thu, 27 Feb 2020 07:45:10 +0000 (08:45 +0100)] 
Adjust lock/unlock in zone_rekey()

(cherry picked from commit aaaa7e67fa2b0ec618ec4be1af175fd6d73b76a0)

6 years agoEnsure that resigintime and the zone timer are set
Mark Andrews [Fri, 28 Feb 2020 03:01:40 +0000 (14:01 +1100)] 
Ensure that resigintime and the zone timer are set

(cherry picked from commit a6626594aa348209eb02ec1ba8d3539821144aca)

6 years agoAdd more zone locks
Matthijs Mekking [Thu, 27 Feb 2020 10:59:12 +0000 (11:59 +0100)] 
Add more zone locks

Add more zone locks around code that touches zone timer setting
in failure modes.

(cherry picked from commit 143d1c9767e25d35dd939f43f6bae462ee9db477)

6 years agoAlways call set_resigntime with the zone lock held
Mark Andrews [Thu, 27 Feb 2020 06:48:05 +0000 (17:48 +1100)] 
Always call set_resigntime with the zone lock held

(cherry picked from commit 7212961849510f97146f815fa03f1e90de9d3201)