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

29425 Commits

Author SHA1 Message Date
Tony Finch
24f23e7fad Use 2048 bits as the default ZSK RSA key size in dnssec-keygen 2019-06-19 19:39:21 -07:00
Evan Hunt
af7b462b30 Merge branch 'security-master' into 'master'
merge security-master

See merge request isc-projects/bind9!2061
2019-06-19 19:14:43 -04:00
Tinderbox User
14ea08c759 Merge branch 'prep-release' into security-master 2019-06-19 15:36:30 -07:00
Tinderbox User
9bb0b30bc2 prep 9.15.1 2019-06-19 15:36:28 -07:00
Evan Hunt
7dfef18b05 Merge branch '942-security-move-test-inside-lock' into security-master 2019-06-19 15:35:58 -07:00
Evan Hunt
f1b9bd6f07 CHANGES, release note 2019-06-19 15:35:57 -07:00
Mark Andrews
a78a9d37a8 move item_out test inside lock in dns_dispatch_getnext() 2019-06-19 15:35:57 -07:00
Ondřej Surý
95ecdcd762 Merge branch '161-fix-symbol-ordering-in-dns-update_test.c' into 'master'
Fix lib/dns/tests/update_test spurious errors on macOS

Closes #161

See merge request isc-projects/bind9!2050
2019-06-19 08:13:27 -04:00
Ondřej Surý
52f98c5734 Rename mctx in dnstest.c to dt_mctx to prevent any global/local name clashes
The common construct seen in the BIND 9 source is func(isc_mem_t *mctx, ...).
Unfortunately, the dnstest.{h,c} has been using mctx as a global symbol, which
in turn generated a lot of errors when update.c got included in update_test.c.

As a rule of thumb, we should avoid naming global symbols with generic names
(like mctx) and we should prefix them with "namespace" (like dt_mctx).
2019-06-19 13:52:19 +02:00
Ondřej Surý
6a1f24a863 Make CHECK() macro local by moving it from dnstest.h to respective .c files
The CHECK() macro has been defined both in dnstest.h and update.c
files.  This has created a conflict between macro definitions when
including both of the files in update_test.c.  While the CHECK() macro
is convenient for the tests, it has been really used in just two
files, so the MR moves them into those respective .c files.
2019-06-19 13:51:01 +02:00
Ondřej Surý
6713c6703e Fix spurious lib/dns/tests/update_test errors on macOS
lib/dns/tests/update_test was failing on macOS on random occasions.  It
turned out this was a linker problem - it preferred isc_stdtime_get()
from libisc instead of the local version in lib/dns/tests/update_test.c.

Fix by including the original .c file in the unit test.  This has two
benefits:

 a) linking order may no longer cause issues as symbols found in the
    same compilation unit are always preferred,

 b) it allows writing tests for static functions in lib/dns/update.c.
2019-06-19 13:31:43 +02:00
Ondřej Surý
695c997e6f Merge branch 'ondrej/autoconf-use-more-convenience-macros-from-autoconf-archive' into 'master'
Use couple more autoconf convenience macros to cleanup configure.ac

See merge request isc-projects/bind9!2054
2019-06-19 07:21:10 -04:00
Ondřej Surý
a654756c3e Use couple more autoconf convenience macros to cleanup configure.ac
Pull and use several autoconf archive convenience macros to simplify
configure.ac.

* AX_CHECK_COMPILE_FLAG(FLAG, ...) - check whether given CFLAG works
* AX_CHECK_LINK_FLAG(FLAG, ...) - check whether given LDFLAG works
* AX_CHECK_PREPROC_FLAG(FLAG, ...) - check whether give CPPFLAG works
* AX_SAVE_FLAGS/AX_RESTORE_FLAGS - save and restore *FLAGS
2019-06-19 11:35:18 +02:00
Michał Kępień
5a941fbd88 Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected' into 'master'
Always fail a system test if crashes are detected

Closes #1088

See merge request isc-projects/bind9!2041
2019-06-18 03:55:20 -04:00
Michał Kępień
7706f22924 Always fail a system test if crashes are detected
In certain situations (e.g. a named instance crashing upon shutdown in a
system test which involves shutting down a server and restarting it
afterwards), a system test may succeed despite a named crash being
triggered.  This must never be the case.  Extend run.sh to mark a test
as failed if core dumps or log lines indicating assertion failures are
detected (the latter is only an extra measure aimed at test environments
in which core dumps are not generated; note that some types of crashes,
e.g. segmentation faults, will not be detected using this method alone).
2019-06-18 09:14:07 +02:00
Michał Kępień
42cc7f5456 Merge branch 'michal/fix-transfer-statistics-extraction' into 'master'
Fix transfer statistics extraction

See merge request isc-projects/bind9!2038
2019-06-18 03:12:53 -04:00
Michał Kępień
fab67c074a Fix transfer statistics extraction
Make the get_named_xfer_stats() helper shell function more precise in
order to prevent it from matching the wrong lines as that may trigger
false positives for the "ixfr" and "xfer" system tests.  As an example,
the regular expression responsible for extracting the number of bytes
transmitted throughout an entire zone transfer could also match a line
containing the following string:

    transfer of '<zone-name>/IN': sending TCP message of <integer> bytes

However, such a line is not one summarizing a zone transfer.

Also simplify both get_dig_xfer_stats() and get_named_xfer_stats() by
eliminating the need for "echo" statements in them.
2019-06-18 08:51:50 +02:00
Mark Andrews
ea054d024a Merge branch 'marka-cleanup-builtin-config' into 'master'
remove geoip-use-ecs from default config

See merge request isc-projects/bind9!2032
2019-06-17 09:35:58 -04:00
Mark Andrews
b2026bd9e8 remove geoip-use-ecs from default config 2019-06-17 09:24:46 -04:00
Michał Kępień
47c8deee52 Merge branch 'michal/tkey-system-test-fix-key-id-processing' into 'master'
"tkey" system test: fix key ID processing

See merge request isc-projects/bind9!2033
2019-06-17 08:43:18 -04:00
Michał Kępień
0b7b1161c2 Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:

    tkey-dhkey "server" ;

Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file.  Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.
2019-06-17 14:15:18 +02:00
Witold Krecicki
fd8adb1282 Merge branch '1067-underflow-recursing-clients-stats' into 'master'
Resolve "Underflow in Stats Channel RecursClients value?"

Closes #1067

See merge request isc-projects/bind9!2030
2019-06-13 08:19:32 -04:00
Witold Kręcicki
c62a7c88b8 CHANGES note 2019-06-13 13:35:44 +10:00
Witold Kręcicki
24cfee942f Make sure that recursclient gauge is calculated correctly.
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.
2019-06-13 13:35:44 +10:00
Michał Kępień
cd3b656001 Merge branch 'michal/address-compilation-warnings-for-O3-builds' into 'master'
Address compilation warnings for -O3 builds

See merge request isc-projects/bind9!1994
2019-06-11 04:49:01 -04:00
Michał Kępień
ce796ac1f4 Address GCC 9.1 -O3 compilation warnings
Compiling with -O3 triggers the following warnings with GCC 9.1:

    task.c: In function ‘isc_taskmgr_create’:
    task.c:1384:43: warning: ‘%04u’ directive output may be truncated writing between 4 and 10 bytes into a region of size 6 [-Wformat-truncation=]
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                           ^~~~
    task.c:1384:32: note: directive argument in the range [0, 4294967294]
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                ^~~~~~~~~~~~~~~~
    task.c:1384:3: note: ‘snprintf’ output between 15 and 21 bytes into a destination of size 16
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    private_test.c: In function ‘private_nsec3_totext_test’:
    private_test.c:110:9: warning: array subscript 4 is outside array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
      110 |  while (*sp == '\0' && slen > 0) {
          |         ^~~
    private_test.c:103:11: note: while referencing ‘salt’
      103 |  uint32_t salt;
          |           ^~~~

Prevent these warnings from being triggered by increasing the size of
the relevant array (task.c) and reordering conditions (private_test.c).
2019-06-11 10:18:23 +02:00
Witold Kręcicki
44e6bb8b93 Address GCC 8.3 -O3 compilation warning
Compiling with -O3 triggers the following warning with GCC 8.3:

    driver.c: In function ‘dlz_findzonedb’:
    driver.c:191:29: warning: ‘%u’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                                 ^~
    driver.c:191:25: note: directive argument in the range [0, 65535]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                             ^~~~~~~
    driver.c:191:2: note: ‘snprintf’ output between 3 and 106 bytes into a destination of size 100
      snprintf(buffer, size, "%s#%u", addr_buf, port);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of the relevant array to prevent this warning from
being triggered.
2019-06-11 10:18:23 +02:00
Michał Kępień
3569487875 Make some build jobs use -O3 optimizations
Change the compiler optimization level for Debian sid build jobs from
-O2 to -O3 in order to enable triggering compilation warnings which are
not raised when -O2 is used.
2019-06-11 10:18:23 +02:00
Witold Krecicki
1eb7a9e10b Merge branch '1070-fix-zonemgr-unreachablecache' into 'master'
Resolve "Use zonemgr unreachable cache more effectively"

Closes #1070

See merge request isc-projects/bind9!2017
2019-06-11 03:58:22 -04:00
Ondřej Surý
3dcf121064 Put the items into unreachable LRU cache from first to last, not last to first 2019-06-11 09:38:59 +02:00
Witold Kręcicki
5adc0baaca Add Gitlab CI job with pthread_rwlock 2019-06-11 09:38:59 +02:00
Witold Kręcicki
68eb9a7c6a In dns_zonemgr_unreachable use atomics to avoid unnecessary
write locking.

Unreachable cache in zonemgr is realized as an static LRU list.
When we 'use' an entry we need to update the last-used time, we
can use atomics to do so without the necessity to upgrading
read-lock to write-lock.
2019-06-11 09:38:59 +02:00
Evan Hunt
34db730ee3 Merge branch '1082-fix-symtab-error' into 'master'
allocate memory for symtab keys

Closes #1082

See merge request isc-projects/bind9!2026
2019-06-10 21:56:54 -04:00
Evan Hunt
8136b09fa8 allocate memory for symtab keys
this prevents an intermittent failure when conflicts between
static and initializing keys are not detected by named-checkconf.
2019-06-10 18:39:53 -07:00
Witold Krecicki
90ff5a551a Merge branch 'wpk/git-replay-merge-worktrees' into 'master'
util/git-replay-merge.sh: make the tool compatible with git worktrees

See merge request isc-projects/bind9!1985
2019-06-10 10:51:01 -04:00
Witold Kręcicki
db87352742 util/git-replay-merge.sh: make the tool compatible with git worktrees 2019-06-10 16:32:13 +02:00
Evan Hunt
32c86e29e2 Merge branch 'each-pandoc-args' into 'master'
specify title metadata and markdown format when calling pandoc

See merge request isc-projects/bind9!2022
2019-06-10 00:29:24 -04:00
Evan Hunt
3663f61e0e specify title metadata and markdown format when calling pandoc
this change silences a warning message and prevents the unwanted
use of smart quotes when using pandoc 2.7.1 to generate human-readable
versions of README and other markdown files.
2019-06-09 21:26:55 -07:00
Evan Hunt
8975a0830b Merge branch 'michal/minor-doc-fixes' into 'master'
Minor doc fixes

See merge request isc-projects/bind9!2018
2019-06-10 00:21:21 -04:00
Stephen Morris
d47c1d5dd0 Tweak paragraph style in release notes PDF 2019-06-07 08:37:22 +02:00
Stephen Morris
644a2197f4 Fix typos in README and release notes 2019-06-07 08:37:22 +02:00
Mark Andrews
8ceaa19698 Merge branch 'marka-capture-checkconf-output' into 'master'
capture named-checkconf output

See merge request isc-projects/bind9!2014
2019-06-06 04:13:56 -04:00
Mark Andrews
36dd373ab4 capture named-checkconf output 2019-06-06 13:04:34 +10:00
Mark Andrews
0a8c47bae5 Merge branch 'marka-rndc-manpage-fix' into 'master'
add missing word 'includes'

See merge request isc-projects/bind9!2011
2019-06-05 19:20:28 -04:00
Mark Andrews
c6553eb3fc add missing word 'includes' 2019-06-06 09:07:18 +10:00
Evan Hunt
fd4e3a650d Merge branch '1064-fix-pthread-rwlock' into 'master'
Resolve "Adding --enable-pthread-rwlock broke Windows build"

Closes #1064

See merge request isc-projects/bind9!2009
2019-06-05 14:29:40 -04:00
Ondřej Surý
d45f9e413f Enforce pthread rwlock to be only enabled in developer mode 2019-06-05 11:17:19 -07:00
Ondřej Surý
ac3d9b97a3 Fix Windows build by moving #include <pthread.h> to correct #ifdef block 2019-06-05 11:17:19 -07:00
Ondřej Surý
1e2f40d01b Fixup the atomic code in pthread_rwlock branch of lib/isc/rwlock.c 2019-06-05 11:17:19 -07:00
Evan Hunt
48f16f223c Merge branch '6-deprecate-trusted-keys' into 'master'
Resolve "Merge trusted-key and managed-keys"

Closes #6

See merge request isc-projects/bind9!659
2019-06-05 11:15:43 -04:00