2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

30324 Commits

Author SHA1 Message Date
Ondřej Surý
6858ef9adc Merge branch '1119-tsan-lib/isc/tests/socket_test.c' into 'master'
Change the shared completion->done variable to atomic_bool in socket_test.c

See merge request isc-projects/bind9!2362
2019-11-17 14:55:24 +00:00
Ondřej Surý
23964dbbbc Change the shared completion->done variable to atomic_bool in socket_test.c 2019-11-17 09:38:36 +08:00
Ondřej Surý
76d1e95f4e Merge branch '1313-master-failing-to-build-on-macos-high-sierra' into 'master'
Resolve "master failing to build on MacOS High Sierra"

Closes #1313

See merge request isc-projects/bind9!2562
2019-11-16 05:22:05 +00:00
Mark Andrews
00605058b4 conditionally test based on USE_LIBTOOL or LD_WRAP 2019-11-16 11:46:06 +08:00
Mark Andrews
c7b20f3c40 specify the install name when building libwrap 2019-11-16 11:21:41 +08:00
Mark Andrews
b88faee181 MacOS portability
-Wl,-z,interpose is not supported.
-Wl,rpath=<path> is not supported use -Wl,rpath,<path> instead.
Use @SO@ for loadable extension.
Use -L <path> -l libwrap instead of libwrap.sa.
2019-11-16 11:21:41 +08:00
Evan Hunt
ac65f56774 Merge branch '622-ds-anchor' into 'master'
support "initial-ds" in managed-keys

Closes #622

See merge request isc-projects/bind9!1762
2019-11-16 02:32:12 +00:00
Evan Hunt
d97e628f81 CHANGES, release notes 2019-11-15 15:47:57 -08:00
Evan Hunt
c29ccae2a6 Document initial-ds and static-ds keywords 2019-11-15 15:47:57 -08:00
Evan Hunt
54a682ea50 use DS style trust anchors in all system tests
this adds functions in conf.sh.common to create DS-style trust anchor
files. those functions are then used to create nearly all of the trust
anchors in the system tests.

there are a few exceptions:
 - some tests in dnssec and mkeys rely on detection of unsupported
   algorithms, which only works with key-style trust anchors, so those
   are used for those tests in particular.
 - the mirror test had a problem with the use of a CSK without a
   SEP bit, which still needs addressing

in the future, some of these tests should be changed back to using
traditional trust anchors, so that both types will be exercised going
forward.
2019-11-15 15:47:57 -08:00
Evan Hunt
342cc9b168 add support for DS trust anchors in delv 2019-11-15 15:47:57 -08:00
Evan Hunt
edafbf1c0f fix root key sentinel code to send the correct key ID for DS trust anchors 2019-11-15 15:47:57 -08:00
Evan Hunt
8aaee26548 add validator support for static DS-style trust anchors 2019-11-15 15:47:56 -08:00
Evan Hunt
4d3ed3f4ea refactor create_keydata
use empty placeholder KEYDATA records for all trust anchors, not just
DS-style trust anchors.

this revealed a pre-existing bug: keyfetch_done() skips keys without
the SEP bit when populating the managed-keys zone. consequently, if a
zone only has a single ZSK which is configured as trust anchor and no
KSKs, then no KEYDATA record is ever written to the managed-keys zone
when keys are refreshed.

that was how the root server in the dnssec system test was configured.
however, previously, the KEYDATA was created when the key was
initialized; this prevented us from noticing the bug until now.

configuring a ZSK as an RFC 5011 trust anchor is not forbidden by the
spec, but it is highly unusual and not well defined.  so for the time
being, I have modified the system test to generate both a KSK and ZSK
for the root zone, enabling the test to pass.

we should consider adding code to detect this condition and allow keys
without the SEP bit to be used as trust anchors if no key with the SEP
bit is available, or at minimum, log a warning.
2019-11-15 15:47:56 -08:00
Evan Hunt
a8f89e9a9f use DS-style trust anchor to verify 5011 key refresh query
note: this also needs further refactoring.

- when initializing RFC 5011 for a name, we populate the managed-keys
  zone with KEYDATA records derived from the initial-key trust anchors.

  however, with initial-ds trust anchors, there is no key. but the
  managed-keys zone still must have a KEYDATA record for the name,
  otherwise zone_refreshkeys() won't refresh that key. so, for
  initial-ds trust anchors, we now add an empty KEYDATA record and set
  the key refresh timer so that the real keys will be looked up as soon
  as possible.

- when a key refresh query is done, we verify it against the
  trust anchor; this is done in two ways, one with the DS RRset
  set up during configuration if present, or with the keys linked
  from each keynode in the list if not.  because there are two different
  verification methods, the loop structure is overly complex and should
  be simplified.

- the keyfetch_done() and sync_keyzone() functions are both too long
  and should be broken into smaller functions.
2019-11-15 15:47:56 -08:00
Evan Hunt
854af5a353 allow DS trust anchors to be set in keytable
note: this is a frankensteinian kluge which needs further refactoring.

the keytable started as an RBT where the node->data points to a list of
dns_keynode structures, each of which points to a single dst_key.
later it was modified so that the list could instead point to a single
"null" keynode structure, which does not reference a key; this means
a trust anchor has been configured but the RFC 5011 refresh failed.

in this branch it is further updated to allow the first keynode in
the list to point to an rdatalist of DS-style trust anchors.  these will
be used by the validator to populate 'val->dsset' when validating a zone
key.

a DS style trust anchor can be updated as a result of RFC 5011
processing to contain DST keys instead; this results in the DS list
being freed.  the reverse is not possible; attempting to add a DS-style
trust anchor if a key-style trust anchor is already in place results
in an error.

later, this should be refactored to use rdatalists for both DS-style
and key-style trust anchors, but we're keeping the existing code for
old-style trust anchors for now.
2019-11-15 15:47:56 -08:00
Evan Hunt
1a8348e2b4 disallow use of DS- and key-style trust anchors for the same name 2019-11-15 15:47:41 -08:00
Evan Hunt
feba480527 read DS trust anchors in named.conf
(but they aren't used for anything yet)
2019-11-15 15:47:17 -08:00
Evan Hunt
3fede8a7e9 add "static-ds" and "initial-ds" keywords to config parser 2019-11-15 15:47:17 -08:00
Evan Hunt
ac0d3c21c6 add a global function to match a DS rdata to a DNSKEY 2019-11-15 15:47:17 -08:00
Evan Hunt
f75328b178 Merge branch '622-validator-refactoring' into 'master'
preliminary validator refactoring

See merge request isc-projects/bind9!2346
2019-11-15 23:46:36 +00:00
Evan Hunt
11cd9d86e4 CHANGES, release note 2019-11-15 14:26:08 -08:00
Evan Hunt
692c879e3c remove unneeded members from dns_validator
- val->keynode and val->seensig were set but never used.
- val->nearest, val->soaset, val->soaname, val->nsecset and val->nsec3set
  were never used at all.
2019-11-15 14:26:08 -08:00
Evan Hunt
3a4334636b simplify validate_dnskey and seek_ds
- pull out the code that checks whether a key was signed by a trust
  anchor into a separate function, anchor_signed().
- pull out the code that looks up a DS while validating a zone key
  into a separate function, get_dsset().
- check in create_validator() whether the sigrdataset is bound, so that
  we can always pass in &val->fsigrdataset during an insecurity proof;
  this will allow a reduction of code duplication.
2019-11-15 14:26:08 -08:00
Evan Hunt
9119dc25fe continue renaming functions for clarity
- also simplified some calls: don't pass siginfo where val->siginfo
  is sufficient, don't INSIST where returning false is sufficient.
- also added header comments to several local functions.
2019-11-15 14:26:07 -08:00
Evan Hunt
22aa668b7d convert if to switch in get_key 2019-11-15 14:26:07 -08:00
Evan Hunt
9150688efd rename fetch/validator callback functions for consistency and clarity 2019-11-15 14:26:07 -08:00
Evan Hunt
edc9c79c9c reorder switch in validatezonekey to similar order as seek_ds 2019-11-15 14:26:07 -08:00
Evan Hunt
d0f8c50618 convert if statement to switch 2019-11-15 14:26:07 -08:00
Evan Hunt
ea1d4d11fc refactor dsfetched/dsfetched2 into a common function 2019-11-15 14:26:06 -08:00
Evan Hunt
3659cca624 rename some functions for better clarity 2019-11-15 14:26:06 -08:00
Evan Hunt
54710873a7 move some duplicate code into validate_neg_rrset() 2019-11-15 14:26:06 -08:00
Evan Hunt
6dc5343d6d move the 'mustbesecure' checks into markanswer() 2019-11-15 14:26:06 -08:00
Evan Hunt
61456d886e split proveunsecure() 2019-11-15 14:26:06 -08:00
Evan Hunt
34d7776f14 reduce redundant code 2019-11-15 14:10:56 -08:00
Evan Hunt
32d1cc1562 style, braces, whitespace 2019-11-15 14:10:56 -08:00
Mark Andrews
95817d8bbb Merge branch '1323-reenable-lib-ns-unittests' into 'master'
Properly disable lib/ns tests when run under ASAN

Closes #1323

See merge request isc-projects/bind9!2568
2019-11-15 05:50:14 +00:00
Ondřej Surý
d50322ed95 Properly disable lib/ns tests when run under ASAN 2019-11-15 05:09:52 +00:00
Mark Andrews
abe8fa5253 Merge branch '1327-update-solution-dependencies-host-and-nslookup-depend-on-libirs' into 'master'
Resolve "Update solution dependencies: 'dig', 'host' and 'nslookup' depend on libirs."

Closes #1327

See merge request isc-projects/bind9!2573
2019-11-15 01:09:16 +00:00
Mark Andrews
72ca05c966 Add dependancy on libirs to dig, host, and nslookup. 2019-11-15 11:22:35 +11:00
Ondřej Surý
7101eae6f4 Merge branch 'ondrej/fix-timer-test' into 'master'
Fix the crash in the timer test

See merge request isc-projects/bind9!2557
2019-11-13 14:29:49 +00:00
Evan Hunt
bd9f5c3c19 fix netmgr setup/teardown issues; setup and teardown only once in timer_test
- the netmgr was not correctly being specified when creating the task
  manager, and was cleaned up in the wrong order when shutting down.
- on freebsd, timer_test appears to be prone to failure if the
  netmgr is set up and torn down before and after ever test case, but
  less so if it's only set up once at the beginning and once at the
  end.
2019-11-13 14:47:47 +01:00
Ondřej Surý
aca0f88750 Remove the assertions from subthreads and use global errcnt to record errors 2019-11-13 14:47:47 +01:00
Ondřej Surý
2c3589e22a Lock the lasttime variable that's concurrently accessed between threads 2019-11-13 14:47:47 +01:00
Ondřej Surý
b9cb4c94fa Directly embed ../timer.c in timer_test.c for better assertion testing 2019-11-13 14:47:47 +01:00
Ondřej Surý
8de64964a3 Refactor the way we use memory context from isctest.c
This commit renames isctest {mctx,lctx} to test_{mctx,lctx} and cleans
up their usage in the individual unit tests.  This allows embedding
library .c files directly into the unit tests.
2019-11-13 14:47:47 +01:00
Witold Krecicki
229b7d85e8 Merge branch 'wpk/fix-accidental-task-unpause' into 'master'
Fix implicit task unpause when going from 'running' to 'idle'.

See merge request isc-projects/bind9!2571
2019-11-13 13:45:09 +00:00
Witold Kręcicki
5ce4b04b50 If a task is running and we call isc_task_pause it can
be implicitly unpaused when we switch from 'running' to
'idle' state. Fix it by not switching to 'idle' when paused.
2019-11-13 12:32:17 +00:00
Michał Kępień
3d92f5e95a Merge branch 'fix-url-in-readme' into 'master'
updated a broken link for newer release notes.

See merge request isc-projects/bind9!2567
2019-11-13 11:59:11 +00:00
Vicky Risk
c830a9116d Update broken release notes link 2019-11-13 12:56:05 +01:00