Compare commits

...
441 Commits
Author SHA1 Message Date
Witold Kręcicki 69ef3b5509 Add NS_CLIENT_MOCKREPLY - if defined, BIND will reply with empty
answers to each query, without doing any processing. This can
be used to test network stack performance.
2018-11-26 05:42:38 -05:00
Michał Kępień bf519a3574 Merge branch '732-fix-compilation-on-centos-6-i386' into 'master'
Fix compilation on CentOS 6 (i386)

Closes #732

See merge request isc-projects/bind9!1129
2018-11-26 05:22:36 -05:00
Michał Kępień 62ca7743ae Fix compilation on CentOS 6 (i386)
The stock toolchain available on CentOS 6 for i386 is unable to use the
_mm_pause() intrinsic.  Fix by using "rep; nop" assembly instructions on
that platform instead.
2018-11-26 10:57:14 +01:00
Ondřej Surý 7e4ed9f8ad Merge branch '674-fix-windows-build' into 'master'
Fix typo __LINE -> __LINE__ in lib/isc/win32/condition.c

See merge request isc-projects/bind9!1132
2018-11-23 18:54:26 -05:00
Ondřej Surý e24afa3088 Fix typo __LINE -> __LINE__ 2018-11-24 00:53:24 +01:00
Witold Krecicki ad0b4e9d41 Merge branch 'wpk-fix-recursive-performance' into 'master'
Bound tasks for resolver; Task quantum tweaks.

See merge request isc-projects/bind9!1117
2018-11-23 04:59:23 -05:00
Witold Kręcicki d5793ecca2 - isc_task_create_bound - create a task bound to specific task queue
If we know that we'll have a task pool doing specific thing it's better
  to use this knowledge and bind tasks to task queues, this behaves better
  than randomly choosing the task queue.

- use bound resolver tasks - we have a pool of tasks doing resolutions,
  we can spread the load evenly using isc_task_create_bound

- quantum set universally to 25
2018-11-23 04:34:02 -05:00
Ondřej Surý 54b4e4e61c Merge branch 'ondrej-shorten-job-names' into 'master'
Change the job names, so they are more useful in pipeline overview

See merge request isc-projects/bind9!1127
2018-11-23 04:08:08 -05:00
Ondřej Surý 6363652d51 Change the job names, so they are more useful in pipeline overview 2018-11-23 08:45:50 +01:00
Mark Andrews 4f075d869c Merge branch '729-init_hasreuseport-will-not-work-on-systems-w-o-ipv4' into 'master'
Resolve "init_hasreuseport will not work on systems w/o IPv4"

Closes #729

See merge request isc-projects/bind9!1126
2018-11-22 23:31:34 -05:00
Mark Andrews 509dad8737 handle systems without IPv4 2018-11-23 12:05:53 +11:00
Mark Andrews 1634592c99 Merge branch '705-negative-value-passed-to-close-on-socket-c-and-resource-leak' into 'master'
Resolve "negative value passed to close on socket.c and resource leak"

Closes #705

See merge request isc-projects/bind9!1095
2018-11-22 20:00:30 -05:00
Mark Andrews 6696a40ea9 address resource leak; don't call close() on socket error; 2018-11-23 10:34:59 +11:00
Mark Andrews 2eabc74547 Merge branch '715-side-effect-in-assertion-in-name_test-c' into 'master'
Resolve "side effect in assertion in name_test.c"

Closes #715

See merge request isc-projects/bind9!1102
2018-11-22 18:19:01 -05:00
Mark Andrews 2156a5b610 address coverity side effect in assert warning 2018-11-22 17:57:54 -05:00
Mark Andrews e9d999f6b0 Merge branch '717-bin-named-server-c-load_zones-can-leak-memory' into 'master'
Resolve "bin/named/server.c:load_zones can leak memory"

Closes #717

See merge request isc-projects/bind9!1104
2018-11-22 17:57:18 -05:00
Mark Andrews 33132406a3 decrement zl->refs on error 2018-11-22 17:22:42 -05:00
Mark Andrews 9cf529fa50 Merge branch '716-remove-logically-dead-code-try-2' into 'master'
Resolve "remove logically dead code try #2"

Closes #716

See merge request isc-projects/bind9!1103
2018-11-22 17:17:43 -05:00
Mark Andrews 29fb4faf76 remove dead code 2018-11-22 17:04:00 -05:00
Ondřej Surý d0f0298f38 Merge branch '706-remove-isc_mem_set_get_quota' into 'master'
Resolve "Unchecked isc_mem_get's in dnssec-signzone.c and socket.c"

Closes #706

See merge request isc-projects/bind9!1093
2018-11-22 11:03:37 -05:00
Ondřej Surý d1a8a3faed Memory allocations must be fatal even when default_memalloc is not used 2018-11-22 16:46:57 +01:00
Ondřej Surý 2fa857d502 Cleanup lib/isc/mem.c after failed allocations made fatal 2018-11-22 16:46:56 +01:00
Ondřej Surý 3987a146be Remove isc_mem_{set,get}quota unused functions 2018-11-22 16:46:56 +01:00
Ondřej Surý 0667fa935a Merge branch '726-fix-NetBSD-build' into 'master'
Fix the build on NetBSD due to the differences in pthread implementation.

Closes #726

See merge request isc-projects/bind9!1123
2018-11-22 09:43:56 -05:00
Håvard EidnesandOndřej Surý f6c4ed94e4 Fix the build on NetBSD due to the differences in pthread implementation.
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2018-11-22 09:43:43 -05:00
Ondřej Surý 259a4947e6 Merge branch '670-add-coccinelle-unreachable-spatch' into 'master'
Add first coccinelle based precheck test to the GitLab CI

See merge request isc-projects/bind9!1042
2018-11-22 09:28:15 -05:00
Ondřej SurýandOndřej Surý 2271e77d99 Add couple more ISC_UNREACHABLE(); found thanks to coccinelle 2018-11-22 09:28:00 -05:00
Ondřej SurýandOndřej Surý 21db43da8e Add unreachable.spatch coccinelle recipe and run it in precheck CI phase 2018-11-22 09:28:00 -05:00
Witold Krecicki e3c8a23276 Merge branch 'wpk-crash-on-mutex-init-failure' into 'master'
isc_mutex_init and isc_condition_init failures are now fatal

See merge request isc-projects/bind9!1049
2018-11-22 07:13:54 -05:00
Witold Kręcicki 929ea7c2c4 - Make isc_mutex_destroy return void
- Make isc_mutexblock_init/destroy return void
- Minor cleanups
2018-11-22 11:52:08 +00:00
Ondřej SurýandWitold Kręcicki d940e95206 isc_quota_init now returns 'void' 2018-11-22 11:52:08 +00:00
Ondřej SurýandWitold Kręcicki b7a15a5da0 Add CHANGES entry for GL #674 2018-11-22 11:52:08 +00:00
Ondřej SurýandWitold Kręcicki 2f3eee5a4f isc_mutex_init returns 'void' 2018-11-22 11:51:49 +00:00
Ondřej SurýandWitold Kręcicki 73a8999d1c isc_condition_init returns 'void' 2018-11-22 11:51:49 +00:00
Witold Kręcicki 0bed9bfc28 isc_mutex_init and isc_condition_init failures are now fatal 2018-11-22 11:51:49 +00:00
Tinderbox User ac4f8a51cc Merge branch 'prep-release' 2018-11-22 00:20:34 +00:00
Tinderbox User db1cd0d970 prep 9.13.4 2018-11-22 00:20:22 +00:00
Ondřej Surý 976881f4be Merge branch 'na-release-checklist-mods' into 'master'
release checklist mods

See merge request isc-projects/bind9!1107
2018-11-21 18:07:18 -05:00
Stephen MorrisandOndřej Surý 5c9c53e9e7 Updates to BIND release checklist. 2018-11-21 17:57:02 -05:00
Curtis Blackburn 9145bec00d Merge branch '305-fix-typo' into 'master'
Fix typo ISC_SHA256_DIGESTLENGHT -> ISC_SHA256_DIGESTLENGTH

See merge request isc-projects/bind9!1119
2018-11-21 17:54:31 -05:00
Ondřej Surý 6b65a4f86e Fix typo ISC_SHA256_DIGESTLENGHT -> ISC_SHA256_DIGESTLENGTH 2018-11-21 23:34:44 +01:00
Mark Andrews 9c4c1320e2 Merge branch '720-model-_assert_true-for-coverity' into 'master'
Resolve "model _assert_true() for coverity"

Closes #720

See merge request isc-projects/bind9!1108
2018-11-20 21:37:09 -05:00
Mark Andrews 9a4aa2aa5a model _assert_true 2018-11-21 12:56:27 +11:00
Ondřej Surý 380ab3b39f Merge branch '710-fix-socket-test' into 'master'
Use proper casting in socket unit test

Closes #710

See merge request isc-projects/bind9!1099
2018-11-19 12:02:41 -05:00
Witold KręcickiandOndřej Surý 5f81aa10bc Use proper casting in socket unit test 2018-11-19 17:40:34 +01:00
Ondřej Surý 4f7177c794 Disable internal malloc for AddressSanitizer build 2018-11-19 17:40:34 +01:00
Ondřej Surý a8649cc299 Add AddressSanitizer enabled build to GitLab CI 2018-11-19 17:40:34 +01:00
Ondřej Surý 5bc8feab45 Merge branch '712-memleak-in-delv' into 'master'
Fix a small memleak in delv

Closes #712

See merge request isc-projects/bind9!1101
2018-11-19 11:38:56 -05:00
Witold Kręcicki d00b3f47ba Fix a small memleak in delv 2018-11-19 13:31:36 +00:00
Witold Krecicki 0e555d7e01 Merge branch 'ondrej/use-strlcpy-in-wks_11.c' into 'master'
Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used

See merge request isc-projects/bind9!1097
2018-11-19 04:45:47 -05:00
Ondřej Surý 175f06949f Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used 2018-11-19 07:58:48 +01:00
Ondřej Surý aa4ac49bb8 Merge branch '711-fix-memory-leak-in-lex_test' into 'master'
Fix memory leak in lex_test.c

Closes #711

See merge request isc-projects/bind9!1098
2018-11-19 01:57:34 -05:00
Ondřej Surý 7a3eb391fa Fix memory leak in lex_test.c 2018-11-19 07:47:05 +01:00
Evan Hunt 6f09738cef Merge branch '702-unchecked-returns-in-server-c' into 'master'
Resolve "unchecked returns in server.c"

Closes #702

See merge request isc-projects/bind9!1076
2018-11-16 19:53:31 -05:00
Mark Andrews ccfd577715 address unchecked return values 2018-11-17 10:20:23 +11:00
Evan Hunt 867180e462 Merge branch '703-resource-leak-in-dlz_filesystem_driver-c' into 'master'
Resolve "resource leak in dlz_filesystem_driver.c"

Closes #703

See merge request isc-projects/bind9!1074
2018-11-16 18:16:10 -05:00
Mark AndrewsandEvan Hunt 4979d5f31f cleanup allocated memory on error 2018-11-16 18:00:36 -05:00
Evan Hunt 39ebebaaf7 Merge branch '701-opts-is-incorrectly-declared-inside-the-loop' into 'master'
Resolve "opts is incorrectly declared inside the loop"

Closes #701

See merge request isc-projects/bind9!1075
2018-11-16 17:49:11 -05:00
Mark AndrewsandEvan Hunt e75e206a3d delare opts outside of loop; cleanup; rename variable 2018-11-16 13:34:44 -08:00
Evan Hunt 4e5ac64aca Merge branch 'cmocka-silence' into 'master'
remove (or hide behind a 'verbose' flag) extra output from unit tests

See merge request isc-projects/bind9!1077
2018-11-16 15:55:41 -05:00
Evan Hunt 8f15219f36 remove (or hide behind a 'verbose' flag) extra output from system tests 2018-11-16 20:46:14 +00:00
Evan Hunt d4bad35bb0 Merge branch 'fix-debug-output' into 'master'
echo debug output (D:text) the same as informational (I:text)

See merge request isc-projects/bind9!1081
2018-11-16 14:40:25 -05:00
Evan Hunt dfa1589975 echo debug output (D:text) the same as informational (I:text) 2018-11-16 19:30:30 +00:00
Ondřej Surý 827d7f0e49 Merge branch '648-fix-Windows-build-after-OpenSSL-changes' into 'master'
Add OpenSSL 1.1.0+ defines for Windows build

Closes #648

See merge request isc-projects/bind9!1078
2018-11-16 08:56:57 -05:00
Ondřej Surý 14fa99e3b4 Add OpenSSL 1.1.0+ defines for Windows build 2018-11-16 14:41:05 +01:00
Ondřej Surý 1276cf4cd1 Merge branch '4-warn-not-fail' into 'master'
warn, rather than failing, if kyua is not present

See merge request isc-projects/bind9!1067
2018-11-16 08:40:14 -05:00
Evan HuntandOndřej Surý 6cfb2249e1 warn, rather than failing, if kyua is not present 2018-11-16 14:31:36 +01:00
Ondřej Surý 7346199a92 Merge branch '700-windows-builds-failing' into 'master'
Resolve "Windows builds failing"

Closes #700

See merge request isc-projects/bind9!1073
2018-11-16 08:13:26 -05:00
Mark Andrews bad342adab check for missing #include <isc/strerr.h> 2018-11-16 12:24:21 +11:00
Mark Andrews 1ca5920113 2018-11-16 12:24:18 +11:00
Mark Andrews 474fbe88bf add missing tasks argument 2018-11-16 11:51:05 +11:00
Evan Hunt f5d8bd0853 Merge branch 'silence-compiler-warning' into 'master'
silence "unused return value" warning

See merge request isc-projects/bind9!1066
2018-11-15 15:54:50 -05:00
Evan Hunt c2a274cc5d silence "unused return value" warning 2018-11-15 12:54:11 -08:00
Ondřej Surý de0290821a Merge branch '674-abort-when-memory-allocation-fails' into 'master'
Resolve "abort when memory allocation fails"

Closes #674

See merge request isc-projects/bind9!1025
2018-11-15 11:37:46 -05:00
Ondřej Surý 37ff7f635b Add CHANGES entry for GL #674 2018-11-15 17:24:08 +01:00
Ondřej Surý 65c084e4eb Remove the memory allocation check that made us resize 0-sized allocations to 1 [RT #2398] 2018-11-15 17:24:08 +01:00
Ondřej Surý 8de2451756 Abort on memory allocation failure 2018-11-15 17:24:08 +01:00
Ondřej Surý 436b6fb354 Merge branch '4-remove-embedded-atf' into 'master'
Remove embedded ATF and required ATF >= 0.20 + Kyua to run unittests

See merge request isc-projects/bind9!875
2018-11-15 10:40:28 -05:00
Ondřej Surý 9b0501635b Add CHANGES entry for GL !875 2018-11-15 16:29:54 +01:00
Ondřej Surý fa33b4ee23 Remove the traces of ATF from documentation 2018-11-15 16:29:51 +01:00
Ondřej Surý ed4a49122b Remove the atf_tc coverity model 2018-11-15 16:29:48 +01:00
Ondřej Surý de219b8555 Remove embedded atf-src and enforce atf >= 0.20 + kyua as execution engine 2018-11-15 16:28:20 +01:00
Ondřej Surý e31e5732fd Merge branch '623-fix-typo-in-CHANGES' into 'master'
Update CHANGES

See merge request isc-projects/bind9!1065
2018-11-15 10:03:39 -05:00
Ondřej Surý 18781c5a3d Update CHANGES 2018-11-15 09:55:33 -05:00
Witold Krecicki 9f35a59f71 Merge branch 'NG-unix-socket-mergable' into 'master'
Rewrite of unix/socket.c code

Closes #666

See merge request isc-projects/bind9!987
2018-11-15 06:35:47 -05:00
Witold Kręcicki 79afbe2966 Some comments 2018-11-15 08:21:40 +00:00
Witold Kręcicki 16d329d55b Work with assumption that isc_mem_get always succeds; Crash if isc_thread_create, isc_mutex_init or isc_condition_init fails 2018-11-15 08:21:40 +00:00
Witold Kręcicki 6be7b631ab Create named_g_cpus network threads 2018-11-15 08:21:40 +00:00
Evan HuntandWitold Kręcicki 1f0cd6606e style: one-line statement braces, line length, etc 2018-11-15 08:21:40 +00:00
Witold Kręcicki 59ac0e87f8 CHANGES and release notes 2018-11-15 08:21:39 +00:00
Witold Krecicki e55bbec66e FreeBSD fixes - proper affinity setting, don't use SO_REUSEPORT 2018-11-15 08:21:17 +00:00
Witold Krecicki 3f7d79e574 Don't doublelock fdlock on Solaris 2018-11-15 08:21:17 +00:00
Witold Kręcicki ca7b5ceee5 Synchronize Windows socket code with API changes. 2018-11-15 08:21:17 +00:00
Witold Kręcicki d960210114 Fix fetchlimit test to allow softquota to be overruled; Remove 'verifying that named checks for conflicting listeners' test from runtime 2018-11-15 08:21:17 +00:00
Witold Kręcicki c1a4f0e66a Use multiple worker queues (using isc_task_sendto()) in unix socket code 2018-11-15 08:21:17 +00:00
Witold Kręcicki 559ce1e330 use REUSEPORT only for NOLISTEN dispatchers 2018-11-15 08:21:17 +00:00
Witold Kręcicki b2b210d6d9 Make watching/unwatching sockets saner. 2018-11-15 08:21:17 +00:00
Witold Kręcicki d652551e86 Use the newly accepted FD in TCP code. 2018-11-15 08:21:17 +00:00
Witold Kręcicki 88edf8fe4d Use isc_refcount_t in socket reference counting. 2018-11-15 08:21:17 +00:00
Witold Krecicki 7223790380 Multiple network event loop threads support for Solarises /dev/poll. 2018-11-15 08:21:17 +00:00
Witold Kręcicki 9c926a5d9b Mangle fdlocks a bit.
Mutexes are slower if they're in the same cache line. Since
fd's come in herds, and usually our listen sockets will have nearby
fd numbers, we mangle fdlocks so that the locks are further away.
2018-11-15 08:21:17 +00:00
Witold Kręcicki 58d75d9d8d Fix a race between socket closing and incoming event. 2018-11-15 08:21:17 +00:00
Witold Kręcicki f94f4bc1f4 Set network threads CPU affintity. 2018-11-15 08:21:17 +00:00
Witold Kręcicki bd024eee57 Add runtime detection of SO_REUSEPORT, use it instead of dup() if available. 2018-11-15 08:21:17 +00:00
Witold Kręcicki 89b1817211 Use the same number of UDP dispatchers as CPUs. 2018-11-15 08:21:17 +00:00
Witold Krecicki 6feb688f69 Use multiple network event loop threads with separate data structures. 2018-11-15 08:21:17 +00:00
Witold Kręcicki cbc1b12311 Do IO after event directly in the network thread, don't queue an event in a separate task. 2018-11-15 08:21:17 +00:00
Witold Kręcicki 778ab8158a Remove fdwatch sockets, those are not used anywhere. 2018-11-15 08:21:17 +00:00
Evan Hunt 59171fe359 Merge branch '620-cmocka-conversions' into 'master'
Resolve "CMOCKA conversions"

Closes #620

See merge request isc-projects/bind9!886
2018-11-15 00:18:59 -05:00
Evan Hunt 32503f3b52 CHANGES 2018-11-14 20:17:18 -08:00
Evan Hunt a2013231a3 remove --with-atf from gitlab CI 2018-11-14 20:17:04 -08:00
Evan Hunt 8c4d50c6bc remove ATF source code and Atffiles 2018-11-14 20:17:04 -08:00
Evan Hunt efe3c038b1 remove ATF from configure 2018-11-14 20:17:04 -08:00
Evan Hunt d534ae5c12 remove atf-run from unittest.sh.in 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 336d5a5374 convert update_test; remove ATF from lib/dns/tests 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 92a3762cb6 convert tsig_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 2c7e6947fa convert time_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt eda6281f98 convert sigs_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt b915cdbf0b convert rsa_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 2837a821e8 convert resolver_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt dfd90dbb82 convert rbt_serialize_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 1b48e710d5 convert name_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 4ba08bb119 convert master_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt e38901154d convert keytable_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 9a464ef869 convert private_test 2018-11-14 20:17:04 -08:00
Evan Hunt 98d5abb73c convert dbversion_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt ad923f82b1 convert dst_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 005e19ad3f convert db_test 2018-11-14 20:17:04 -08:00
Evan Hunt 8d347788b0 convert dispatch_test 2018-11-14 20:17:04 -08:00
Evan Hunt 01a193ff6c convert zonemgr_test 2018-11-14 20:17:04 -08:00
Evan Hunt 0a4f6122de convert zt_test 2018-11-14 20:17:04 -08:00
Evan Hunt bb5ed5a4ac convert rdata_test
- also added code to dnstest.c to optionally suppress printing of errors
  from dns_rdata_fromtxt()
2018-11-14 20:17:04 -08:00
Evan Hunt 55465517c7 convert rbt_test 2018-11-14 20:17:04 -08:00
Evan Hunt 9f83d31e42 convert dnstap_test 2018-11-14 20:17:04 -08:00
Evan Hunt 06b4ff5fe2 convert geoip_test 2018-11-14 20:17:04 -08:00
Evan Hunt 015fda0bb4 convert nsec3_test 2018-11-14 20:17:04 -08:00
Evan Hunt 28121c248e convert rdatasetstats_test 2018-11-14 20:17:04 -08:00
Evan Hunt 79cd093cd7 convert dbiterator_test 2018-11-14 20:17:04 -08:00
Evan Hunt 6dfc868fba convert dbdiff_test 2018-11-14 20:17:04 -08:00
Evan Hunt db5eece106 convert peer_test 2018-11-14 20:17:04 -08:00
Evan Hunt cca16eccd7 convert rdataset_test 2018-11-14 20:17:04 -08:00
Evan Hunt a33bca5d55 convert acl_test 2018-11-14 20:17:04 -08:00
Evan Hunt dcf65c82ad convert dh_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 9eea00cd3c convert socket_test; remove ATF from lib/isc/tests 2018-11-14 20:17:04 -08:00
Evan Hunt bd009b34a6 convert regex_test 2018-11-14 20:17:04 -08:00
Evan Hunt 6ad7acd787 convert random_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 683094e308 convert mem_test 2018-11-14 20:17:04 -08:00
Evan Hunt 20cef35ece convert timer_test 2018-11-14 20:17:04 -08:00
Evan Hunt 3e52987229 convert task_test 2018-11-14 20:17:04 -08:00
JoeyandEvan Hunt 72f60bdd84 convert hash_test 2018-11-14 20:17:04 -08:00
Evan Hunt c701f036ea convert ht_test 2018-11-14 20:17:04 -08:00
Evan Hunt 3bf9a1e567 convert time_test 2018-11-14 20:17:04 -08:00
Evan Hunt c9ff174dce convert taskpool_test 2018-11-14 20:17:04 -08:00
Evan Hunt 4f84acb788 convert pool_test 2018-11-14 20:17:04 -08:00
Evan Hunt 231436039d convert sockaddr_test 2018-11-14 20:17:04 -08:00
Evan Hunt 7ab8c5b583 convert netaddr_test 2018-11-14 20:17:04 -08:00
Evan Hunt 5f377136be convert symtab_test 2018-11-14 20:17:04 -08:00
Evan Hunt b3db0266cb convert queue_test 2018-11-14 20:17:04 -08:00
Evan Hunt 8161be27db convert file_test 2018-11-14 20:17:04 -08:00
Evan Hunt 4133fd86f1 convert lex_test 2018-11-14 20:17:04 -08:00
Evan Hunt 049a3a7c0e convert errno_test 2018-11-14 20:17:04 -08:00
Evan Hunt c1c8d8846f convert safe_test 2018-11-14 20:17:04 -08:00
Evan Hunt 718ca3166c convert radix_test 2018-11-14 20:17:04 -08:00
Evan Hunt cc6ab2416b convert heap_test 2018-11-14 20:17:04 -08:00
Evan Hunt a7c308df9c convert parse_test 2018-11-14 20:17:04 -08:00
Evan Hunt 52b86f0abe convert counter_test 2018-11-14 20:17:04 -08:00
Evan Hunt 02a5db7631 convert buffer_test 2018-11-14 20:17:04 -08:00
Evan Hunt dc88db015b convert aes_test 2018-11-14 20:17:04 -08:00
Evan Hunt 79ac715763 convert listenlist_test; remove ATF from lib/ns/tests 2018-11-14 20:17:04 -08:00
Evan Hunt 48dc2831d7 convert notify_test 2018-11-14 20:17:04 -08:00
Evan Hunt 318b340f5e convert query_test
- also fixed a bug in openssldh_link.c that turned up in the process
2018-11-14 20:17:04 -08:00
Evan Hunt cec8c52cbe convert resconf_test; remove ATF from lib/irs/tests 2018-11-14 20:17:04 -08:00
Evan Hunt 7ec945bd41 convert parser_test; remove ATF from lib/isccfg/tests 2018-11-14 20:17:04 -08:00
Evan Hunt d8766293ab assert if {isc,dns,ns}_test_begin() is called when a prior test is running 2018-11-14 20:17:04 -08:00
Evan Hunt b434b0a4b6 remove .NOTPARALLEL so unit tests can build faster 2018-11-14 20:17:04 -08:00
Evan Hunt 2afd18a2ce add cmocka support to remaining unit test makefiles
- also cleaned up some existing test code
2018-11-14 20:17:04 -08:00
Evan Hunt f456e64736 set HAVE_CMOCKA correctly when using --with-cmocka=yes
(note: this is still broken if using --with-cmocka=path)
2018-11-14 20:17:04 -08:00
Ondřej SurýandEvan Hunt c38b145b89 Remove OPENSSL_cleanup() call as we cannot recover from that, it will be called via atexit mechanism automatically 2018-11-14 20:17:04 -08:00
Mark Andrews 1473ddcc65 Merge branch 'u/fanf2/optionally-disable-digrc' into 'master'
dig: a -r option to disable .digrc

See merge request isc-projects/bind9!970
2018-11-14 20:53:40 -05:00
Mark Andrews a5524b5fe2 add CHANGES 2018-11-15 11:09:04 +11:00
Tony FinchandMark Andrews fdb74fed9e dig: a -r option to disable .digrc 2018-11-15 11:09:04 +11:00
Mark Andrews 995bafbd72 Merge branch 'ondrej/use-static-assert' into 'master'
Use static assertions on non-Windows platforms (requires C11 or gcc-4.6+)

See merge request isc-projects/bind9!1045
2018-11-14 18:39:52 -05:00
Ondřej SurýandMark Andrews de6f43d071 Use static assertion to check for correct alignment size 2018-11-14 18:18:27 -05:00
Ondřej SurýandMark Andrews 5e44a1008f Define STATIC_ASSERT(cond, msg) to be _Static_assert(cond, msg) everywhere but on Windows where it stays to be INSIST(cond) 2018-11-14 18:18:27 -05:00
Evan Hunt 82b23ecc5e Merge branch '347-various-bind-9-bugs-in-cleanup-after-fail-scenarios' into 'master'
Resolve "Various BIND 9 bugs in cleanup-after-fail scenarios"

Closes #347

See merge request isc-projects/bind9!1007
2018-11-14 16:53:18 -05:00
Mark Andrews 4eadebe2b2 uninitalize memory read on error path 2018-11-14 15:26:27 -05:00
Mark Andrews 93776c4c81 errors initalizing badcaches were not caught or cleaned up on error paths 2018-11-14 15:26:27 -05:00
Witold Krecicki 652ce14e7f Merge branch '671-late-qmin-relaxed-warning' into 'master'
qname minimization: issue a warning only if the server is really broken

Closes #671

See merge request isc-projects/bind9!994
2018-11-14 15:14:40 -05:00
Witold Kręcicki 2639030d66 CHANGES note 2018-11-14 19:56:29 +00:00
Witold Kręcicki 9c8fead6d8 qname minimization: issue a warning only if the server is really broken 2018-11-14 19:55:10 +00:00
Evan Hunt 13e53ef38a Merge branch '558-nsupdate-leaks-memory-when-using-gss-tsig-and-receiving-sigterm-at-a-right-time' into 'master'
Resolve "nsupdate leaks memory when using GSS-TSIG and receiving SIGTERM at a "right" time"

Closes #558

See merge request isc-projects/bind9!1048
2018-11-14 14:39:09 -05:00
Mark AndrewsandEvan Hunt 50714a9b35 free tmpzonename and restart_master 2018-11-14 11:23:21 -08:00
Evan Hunt a91bf68d66 Merge branch '675-don-t-use-typename' into 'master'
Resolve "Don't use 'typename'"

Closes #675

See merge request isc-projects/bind9!1034
2018-11-14 14:03:10 -05:00
Mark AndrewsandEvan Hunt 333f718dd3 don't use 'typename' as it is reserved in C++ 2018-11-14 13:45:20 -05:00
Ondřej Surý c59f332db2 Merge branch '613-add-option-for-min-cache' into 'master'
Add min-cache-ttl and min-ncache-ttl keywords

Closes #613

See merge request isc-projects/bind9!889
2018-11-14 12:51:34 -05:00
Ondřej Surý 261230343a Add CHANGES entry for GL#613 2018-11-14 18:25:11 +01:00
Ondřej Surý 11db6dd8ff Add release notes for min-{cache,ncache}-ttl and now enforced max-ncache-ttl limit 2018-11-14 18:24:53 +01:00
Ondřej Surý 3f95f4ffbb Add documentation for min-{ncache,cache}-ttl 2018-11-14 18:24:53 +01:00
Ondřej Surý cf9c2ef305 Fix the max-ncache-ttl tests 2018-11-14 18:24:53 +01:00
Ondřej Surý f6ca532df4 Add system tests for {min,max}-{cache,ncache}-ttl 2018-11-14 18:24:53 +01:00
Ondřej Surý 02b828e63f Use @abs_top_builddir@ to define BIND 9 top build directory in conf.sh 2018-11-14 18:24:53 +01:00
Ondřej Surý 54fdd6e834 Add min-{n,}cache-ttl tests for checkconf 2018-11-14 18:24:53 +01:00
Ondřej Surý e9a939841d Add min-cache-ttl and min-ncache-ttl keywords
Sometimes it is useful to set a 'floor' on the TTL for records
to be cached.  Some sites like to use ridiculously low TTLs for
some reason, and that often is not compatible with slow links.

Signed-off-by: Michael Milligan <milli@acmeps.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
2018-11-14 18:24:53 +01:00
Mark Andrews ac2ea36fa5 Merge branch '688-prefer-kyua-over-aft-run' into 'master'
Resolve "prefer kyua over aft-run"

Closes #688

See merge request isc-projects/bind9!1030
2018-11-14 06:12:04 -05:00
Mark Andrews 590d391bbb prefer kyua over atf 2018-11-14 03:43:01 -05:00
Mark Andrews aa2c4bfdc0 Merge branch '584-dig-treats-4-6-m-after-q-argument-as-an-option-but-not-a-domain-name' into 'master'
Resolve "dig treats -4/-6/-m after -q argument as an option but not a domain name"

Closes #584

See merge request isc-projects/bind9!979
2018-11-13 19:51:06 -05:00
Evan Hunt e356d93175 style 2018-11-13 16:41:54 -08:00
Mark Andrews 77128c867c check that delv -q -m works 2018-11-14 11:38:08 +11:00
Mark Andrews f6f07fb41e check that dig -q -m works 2018-11-14 11:14:49 +11:00
Mark Andrews ba5d28dcfe add -q to dash_opts 2018-11-14 10:50:34 +11:00
Mark Andrews 75fa84b67b dig and mdig failed to properly preparse dash value pairs when value was a seperate argument and started with a dash. 2018-11-14 08:39:05 +11:00
Evan Hunt 1003ef4d67 Merge branch '587-statistics-channels-xml-v2-is-removed-but-still-documented' into 'master'
Resolve "statistics-channels /xml/v2 is removed but still documented"

Closes #587

See merge request isc-projects/bind9!1035
2018-11-13 14:07:17 -05:00
Mark AndrewsandEvan Hunt 9e1af0cef1 remove reference to obsolete xml/v2 schema 2018-11-13 11:06:23 -08:00
Michał Kępień 129e5306d0 Merge branch '433-restore-localhost-fallback-in-bin-dig-dighost.c' into 'master'
Restore localhost fallback in bin/dig/dighost.c

Closes #433

See merge request isc-projects/bind9!910
2018-11-13 08:52:43 -05:00
Michał Kępień 867bc3399b Add CHANGES entry
5089.	[bug]		Restore localhost fallback in dig and host which is
			used when no nameserver addresses present in
			/etc/resolv.conf are usable due to the requested
			address family restrictions. [GL #433]
2018-11-13 14:31:18 +01:00
Michał Kępień 18758392da Restore localhost fallback in bin/dig/dighost.c
In BIND 9.11 and earlier, dig and similar tools used liblwres for
parsing /etc/resolv.conf.  After getting a list of servers from
liblwres, a tool would check the address family of each server found and
reject those unusable.  When the resulting list of usable servers was
empty, localhost addresses were queried as a fallback.

When liblwres was removed in BIND 9.12, dig and similar tools were
updated to parse /etc/resolv.conf using libirs instead.  As part of that
process, the localhost fallback was removed from bin/dig/dighost.c since
the localhost fallback built into libirs was deemed to be sufficient.
However, libirs only falls back to localhost if it does not find any
name servers at all; if it does find any valid nameserver entry in
/etc/resolv.conf, it just returns it to the caller because it is
oblivious to whether the caller supports IPv4 and/or IPv6 or not.  The
code in bin/dig/dighost.c subsequently filters the returned list of
servers in get_server_list() according to the requested address family
restrictions.  This may result in none of the addresses returned by
libirs being usable, in which case a tool will attempt to work with an
empty server list, causing a hang and subsequently a crash upon user
interruption.

Restore the localhost fallback in bin/dig/dighost.c to prevent the
aforementioned hangs and crashes and ensure recent BIND versions behave
identically to the older ones in the circumstances described above.
2018-11-13 14:31:18 +01:00
Michał Kępień 0507658884 Merge branch '599-fix-a-shutdown-race-in-diagnostic-tools' into 'master'
Fix a shutdown race in bin/dig/dighost.c

Closes #599

See merge request isc-projects/bind9!855
2018-11-13 08:25:11 -05:00
Michał Kępień ae40e8039b Add CHANGES entry
5088.	[bug]		dig/host/nslookup could crash when interrupted close to
			a query timeout. [GL #599]
2018-11-13 13:50:47 +01:00
Michał Kępień 4621756596 Fix a shutdown race in bin/dig/dighost.c
If a tool using the routines defined in bin/dig/dighost.c is sent an
interruption signal around the time a connection timeout is scheduled to
fire, connect_timeout() may be executed after destroy_libs() detaches
from the global task (setting 'global_task' to NULL), which results in a
crash upon a UDP retry due to bringup_timer() attempting to create a
timer with 'task' set to NULL.  Fix by preventing connect_timeout() from
attempting a retry when shutdown is in progress.
2018-11-13 13:50:47 +01:00
Evan Hunt 75cc4156e9 Merge branch 'fix-rules-typo' into 'master'
fix rules.in typo

See merge request isc-projects/bind9!1036
2018-11-13 03:23:43 -05:00
Evan Hunt 9671909289 fix typo 2018-11-13 00:23:08 -08:00
Mark Andrews 582e261290 Merge branch 'autoheader' into 'master'
autoheader

See merge request isc-projects/bind9!1033
2018-11-12 19:03:14 -05:00
Mark Andrews cd0d61e0c8 autoheader 2018-11-13 10:31:50 +11:00
Mark Andrews b2dbe37538 Merge branch 'fix-test-linkages' into 'master'
Fix test linkages

See merge request isc-projects/bind9!1027
2018-11-12 15:45:04 -05:00
Mark Andrews 9024cf0c15 remove lib/isc/tests/result_test as it is now cmocka 2018-11-13 07:26:29 +11:00
Mark Andrews ba0e5ffc09 fixup 2018-11-13 07:26:29 +11:00
Mark Andrews 9a59352b4c link in lib/isccc/tests/Kyuafile 2018-11-13 07:23:36 +11:00
Ondřej Surý cc60f3a3be Merge branch '687-reduce-the-overall-files-we-consider-copyrightable' into 'master'
Resolve "Reduce the overall files we consider copyrightable"

Closes #687

See merge request isc-projects/bind9!1026
2018-11-12 10:14:33 -05:00
Ondřej Surý a1de63a2d2 Remove support for adding copyright to zone data 2018-11-12 16:11:57 +01:00
Ondřej Surý d99788042d Exclude configuration files from the copyright mumbo-jumbo 2018-11-12 16:01:37 +01:00
Mark Andrews 62a92b7784 Merge branch 'remove-duplicate-block' into 'master'
remove duplicate block

See merge request isc-projects/bind9!1022
2018-11-12 02:12:04 -05:00
Mark Andrews 5e3f20a71b remove duplicate block 2018-11-12 17:57:31 +11:00
Mark Andrews 7a7cf952ad Merge branch '676-isc_result_toid-tables-not-complete' into 'master'
Resolve "isc_result_toid tables not complete"

Closes #676

See merge request isc-projects/bind9!1010
2018-11-11 18:51:03 -05:00
Evan Hunt 471110933a convert result tests to use CMocka instead of ATF 2018-11-10 12:29:40 -08:00
Mark Andrews 4f04a79250 check result tables are complete 2018-11-10 10:30:43 +11:00
Mark Andrews 3f0aaf7a60 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1008
2018-11-09 00:34:27 -05:00
Mark Andrews baa46c3d4b placeholder 2018-11-09 16:33:29 +11:00
Mark Andrews 65ffafdc6a Merge branch '186-bind-9-12-x-potential-bug-with-dig-when-tools-installed-on-windows' into 'master'
Resolve "Bind 9.12.x: Potential bug with Dig when Tools installed on Windows"

Closes #186

See merge request isc-projects/bind9!1004
2018-11-09 00:18:15 -05:00
Mark Andrews 4f7deb348b add CHANGES note 2018-11-09 16:09:42 +11:00
Mark Andrews 6ead8c7be8 look in windows registry for nameservers, domainname and search list 2018-11-09 16:06:49 +11:00
Mark Andrews 6bac3508ec Merge branch '623-rpz-logging-to-include-qclass-and-qtype' into 'master'
Resolve "RPZ logging to include QCLASS and QTYPE"

Closes #623

See merge request isc-projects/bind9!966
2018-11-08 23:04:30 -05:00
Mark Andrews 505a1ceda4 add CHANGES note 2018-11-09 14:55:52 +11:00
Mark Andrews 28442f11f0 log RPZ type and class 2018-11-08 22:48:28 -05:00
Mark Andrews a13a0a2beb Merge branch '673-fix-windows-build-resource-discover' into 'master'
Resolve "fix windows build resource discover"

Closes #673

See merge request isc-projects/bind9!1005
2018-11-08 20:38:45 -05:00
Mark Andrews 896fb585b3 isc_resource_getlimit under windows only supports isc_resource_openfiles 2018-11-09 12:29:36 +11:00
Ondřej Surý 02be459f37 Merge branch '449-isc_stdtime_t-post-stdint-cleanup' into 'master'
Resolve "Follow-up from "Redefine ISC's int and boolean types to use <stdint.h> and <stdbool.h> types""

Closes #449

See merge request isc-projects/bind9!998
2018-11-08 14:55:55 -05:00
Ondřej Surý 6f5fe11f5a isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS 2018-11-09 02:27:06 +07:00
Ondřej Surý c355e1f38f Print isc_stdtime_t with PRIu32 2018-11-09 02:27:06 +07:00
Ondřej Surý 2a652aefe9 Merge branch '224-remove-isc-hmax-fixup-exe-bnff-from-win32utils-configure' into 'master'
Remove isc-hmac-fixup.exe remains from win32util/Configure

Closes #224

See merge request isc-projects/bind9!1000
2018-11-08 14:02:25 -05:00
Ondřej Surý f95e4593ed Remove isc-hmac-fixup.exe remains from win32util/Configure 2018-11-09 01:48:52 +07:00
Ondřej Surý c303cf5cc9 Merge branch '305-misc-fixes' into 'master'
Miscellaneous style fixes - implicit casts to bool and uninitialized variables fixes

Closes #305

See merge request isc-projects/bind9!851
2018-11-08 02:03:07 -05:00
Ondřej Surý 68ca987792 Remove dummy ISLOCKED macro 2018-11-08 12:22:26 +07:00
Ondřej Surý 23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
Ondřej Surý b992b5b811 Modify the dbversion_test.c to detect disabled assertions 2018-11-08 12:22:17 +07:00
Ondřej Surý 29c45200e7 Add extra return failure after INSIST(0) in default branch 2018-11-08 12:22:17 +07:00
Ondřej Surý 4eaf927571 Use larger buffers on snprintf buffer overflow false positives 2018-11-08 12:21:53 +07:00
Ondřej Surý e2e138a801 Don't assert on failed getrlimit call to allow called to handle this gracefully as it already does, just abort where we need to know the numbers 2018-11-08 12:21:53 +07:00
Ondřej Surý a831e0f72d When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler 2018-11-08 12:21:53 +07:00
Ondřej Surý 461ffead1f Add a GitLab CI job that runs with all assertions disabled 2018-11-08 12:21:53 +07:00
Ondřej Surý b2b43fd235 Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 12:21:53 +07:00
Ondřej Surý fbd2e47f51 Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.

This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.

The changes in this commit include:

* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)
2018-11-08 12:21:53 +07:00
Mark Andrews 8e292b3262 Merge branch 'wpk-get-rid-of-bashism-in-CDS-test' into 'master'
Small system tests fixes for Solaris

See merge request isc-projects/bind9!988
2018-11-07 19:41:30 -05:00
Witold Krecicki 82dfb77328 Remove unnecessary sed from autosign test 2018-11-08 00:07:00 +01:00
Witold Krecicki 0949b1fe2c Use 'local' variable in echo functions in tests 2018-11-07 23:15:06 +01:00
Witold Kręcicki dbf2e7928e Get rid of bashism in CDS test 2018-11-07 23:13:47 +01:00
Ondřej Surý 3317d3d2bb Merge branch '4-add-ac_posix_shell-m4-macro' into 'master'
Add AX_POSIX_SHELL autoconf macro to have POSIX-compatible shell in $SHELL

See merge request isc-projects/bind9!986
2018-11-07 15:03:44 -05:00
Ondřej Surý 601abfab30 Add CHANGES entry for AX_POSIX_SHELL 2018-11-08 02:52:19 +07:00
Ondřej Surý b1e1dd2c25 Remove m4/ files from copyright check 2018-11-08 02:52:19 +07:00
Ondřej Surý 54ff27a6bc Add and use AX_POSIX_SHELL autoconf macro, so we can rely on POSIX shell features 2018-11-08 02:52:19 +07:00
Ondřej Surý cd6c016896 Merge branch 'wpk-fix-typo-thread-c' into 'master'
Fix a typo in lib/isc/unix/thread.c

See merge request isc-projects/bind9!990
2018-11-07 14:40:08 -05:00
Witold Kręcicki ce478b4fc9 Fix a typo in lib/isc/unix/thread.c 2018-11-07 19:31:06 +00:00
Witold Krecicki 7a2248acf9 Merge branch '650-fix-race-in-dig' into 'master'
Add some DBC checks in dighost; fix race between clear_query and send_done in dighost

Closes #650

See merge request isc-projects/bind9!965
2018-11-07 13:04:13 -05:00
Witold Krecicki e9bf8e4798 Add some DBC checks in dighost; fix race between clear_query and send_done in dighost 2018-11-07 13:04:13 -05:00
Witold Krecicki 319c166a50 Merge branch 'wpk-multiple-task-queues' into 'master'
Multiple task queues

See merge request isc-projects/bind9!878
2018-11-06 04:44:34 -05:00
Witold Kręcicki b673f509d2 CHANGES note 2018-11-06 08:24:22 +00:00
Witold Kręcicki 9a903789ed Use larger quantum for network tasks 2018-11-06 08:19:50 +00:00
Witold Kręcicki 460c8038c1 Use a single wake_all_queues() function to wake all queues 2018-11-06 08:19:50 +00:00
Witold Kręcicki b3827319e0 Switch from privileged to un-privileged mode under lock 2018-11-06 08:19:50 +00:00
Witold Kręcicki f166cabcae Document isc_task_sendto properly, make sure that cpu we're sending to is always sane 2018-11-06 08:19:50 +00:00
Witold Kręcicki 025c74adee Use proper memory ordering for tasks_running/tasks_ready 2018-11-06 08:19:50 +00:00
Witold Kręcicki 8fb5bc783f Comment about taskmgr exclusive mode, fix a REQUIRE. 2018-11-06 08:19:50 +00:00
Witold Kręcicki 152c437bb8 Allow slight over-quota in'checking lame server clients are dropped at the soft limit' test 2018-11-06 08:19:50 +00:00
Witold Kręcicki 913856911a Saner exclusive task handling in taskmgr 2018-11-06 08:19:50 +00:00
Witold Kręcicki 17d46fd48b Formatting 2018-11-06 08:19:50 +00:00
Witold Kręcicki c80e25e482 Get rid of isc_taskmgr_setmode, we only use it to set privileged mode 2018-11-06 08:19:50 +00:00
Witold Kręcicki 64020dd7bc Make sure all priority tasks are done before entering normal execution 2018-11-06 08:19:50 +00:00
Witold Kręcicki 669a694d3b Post shutting down tasks always to manager 0 2018-11-06 08:19:50 +00:00
Witold Kręcicki c416389d32 Separate structure for each thread/queue; 2-phase-locking for exclusive tasks 2018-11-06 08:19:50 +00:00
Witold Kręcicki 818d63a3a1 Always restart dispatchers on empty readyq 2018-11-06 08:19:50 +00:00
Witold Kręcicki d7be8afea5 Taskmgr shutdown fixes 2018-11-06 08:19:50 +00:00
Witold Kręcicki 81a85070c5 Multiple worker queues 2018-11-06 08:19:50 +00:00
Witold Krecicki 7b6721b27f isc_thread_setaffinity() 2018-11-06 08:19:50 +00:00
Evan Hunt 151b64aa3e Merge branch 'rndc-nta-preen' into 'master'
Fixes for `rndc nta` user interface

See merge request isc-projects/bind9!845
2018-11-06 01:18:32 -05:00
Evan Hunt 6298061e24 CHANGES, release note 2018-11-05 22:10:10 -08:00
Tony FinchandEvan Hunt 1b1d63acd8 Fixes for rndc nta user interface
Tell the user explicitly about their mistakes:

* Unknown options, e.g. -list instead of -dump
  or -delete instead of -remove.

* Unknown view names.

* Excess arguments.

Include the view name in `rndc nta -dump` output, for consistency with
the NTA add and remove actions.

When removing an NTA from all views, do not abort with an error if the
NTA was not found in one of the views.
2018-11-05 22:01:28 -08:00
Mark Andrews 95e84464b7 Merge branch '653-idnout-only-on-tty' into 'master'
Enable idnout output only on tty, disable it when the stdout is not a tty

Closes #653

See merge request isc-projects/bind9!973
2018-11-06 00:58:22 -05:00
Ondřej Surý 9c0c44405c Add CHANGES entry for GL #653 2018-11-06 12:48:44 +07:00
Ondřej Surý 2a11a7dd29 Add release notes for IDN processing update 2018-11-06 12:48:08 +07:00
Ondřej Surý b659765869 Update the IDN documentation for nslookup 2018-11-06 12:48:08 +07:00
Ondřej Surý 7697923eab Change the dig documentation 2018-11-06 12:48:08 +07:00
Ondřej Surý e8c57a78aa Update the idna tests for the new non-tty defaults 2018-11-06 12:48:08 +07:00
Ondřej Surý 0e1bf7d017 Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout is not a tty 2018-11-06 12:48:08 +07:00
Mark Andrews 46dbf96bd9 Merge branch '601-build-option-with-python-should-default-to-yes' into 'master'
Resolve "Build option --with-python should default to yes"

Closes #601

See merge request isc-projects/bind9!980
2018-11-06 00:38:06 -05:00
Mark Andrews bf8746126c require python to be explicitly disabled 2018-11-06 16:10:09 +11:00
Mark Andrews 2bef7291be Merge branch 'u/fanf2/deprecate-ip6-int' into 'master'
Abolish ip6.int support in `dig` and `mdig`

See merge request isc-projects/bind9!969
2018-11-05 19:29:23 -05:00
Mark Andrews 00f377da93 add CHANGES note 2018-11-06 11:19:03 +11:00
Tony FinchandMark Andrews 3064d3d0ef Abolish ip6.int support in dig and mdig 2018-11-05 19:07:31 -05:00
Mark Andrews ae0160c33b Merge branch '617-if-rrl-is-configured-the-require-server-cookie-yes-is-ignored' into 'master'
Resolve "If RRL is configured the "require-server-cookie yes;" is ignored."

Closes #617

See merge request isc-projects/bind9!974
2018-11-05 18:18:37 -05:00
Mark Andrews a868f335d2 add CHANGES note 2018-11-06 10:10:04 +11:00
Mark Andrews 164370102a test require-server-cookie with rate-limit 2018-11-06 10:10:04 +11:00
Mark Andrews d6f6eeda9d check requireservercookie even if rrl is configured 2018-11-06 10:10:04 +11:00
Mark Andrews 56603265ee Merge branch '634-unchecked-returns-in-resolver-c' into 'master'
Resolve "Unchecked returns in resolver.c"

Closes #634

See merge request isc-projects/bind9!929
2018-11-05 18:03:05 -05:00
Mark AndrewsandEvan Hunt 99b25eb379 two dns_name_dup calls were not checked 2018-11-05 14:46:08 -08:00
Ondřej Surý ce5ac790bb Merge branch '645-fix-missing-buffer-init' into 'master'
dighost.c: after invalidating buffer we need to reinit it

Closes #645

See merge request isc-projects/bind9!976
2018-11-05 15:05:48 -05:00
Witold Kręcicki b2f8f37b80 dighost.c: after invalidating buffer we need to reinit it 2018-11-05 18:59:44 +00:00
Witold Krecicki ae5c86ba9a Merge branch '16-cleanup-finds-before-sending-final-query' into 'master'
Cleanup fctx->finds before sending 'final' query after qname minimization.

Closes #16

See merge request isc-projects/bind9!962
2018-11-05 05:06:32 -05:00
Witold Kręcicki 2d0a33208c Cleanup fctx->finds before sending 'final' query after qname minimization.
At the beginning of qname minimization we get fctx->finds filled with what's
in the cache at this point, in worst case root servers. After doing full
run querying for NSes at different levels we need to clean it and refill
it with proper values from cache.
2018-11-05 09:57:11 +00:00
Evan Hunt d88efa7e40 Merge branch 'fix-dnstap-test' into 'master'
disable QNAME minimization in the dnstap test so packet counts will be correct

See merge request isc-projects/bind9!971
2018-11-02 14:35:54 -04:00
Evan Hunt fc99651d7d disable QNAME minimization in the dnstap test so packet counts will be correct 2018-11-02 11:34:27 -07:00
Evan Hunt 9e61693210 Merge branch 'wpk-qmin-intermittent-fixes' into 'master'
Avoid a race in qmin test

See merge request isc-projects/bind9!954
2018-11-02 14:00:12 -04:00
Witold KręcickiandEvan Hunt 9163e93b9e Avoid a race in qmin test 2018-11-02 13:51:31 -04:00
Mark Andrews b4baa3e751 Merge branch 'u/fanf2/configure-backtrace' into 'master'
Correctly report backtrace support when `configure` finishes

See merge request isc-projects/bind9!967
2018-11-01 22:26:46 -04:00
Mark Andrews c94bd140e3 regen 2018-11-02 13:09:04 +11:00
Tony Finch f09c3a1189 Correctly report backtrace support when configure finishes 2018-11-01 13:45:34 +00:00
Michał Kępień 97bb9b2be9 Merge branch '611-extend-serve-stale-tests' into 'master'
Extend serve-stale tests

Closes #611

See merge request isc-projects/bind9!963
2018-10-31 09:26:42 -04:00
Michał Kępień 27cfe83a38 Check serve-stale behavior with a cold cache
Ensure that serve-stale works as expected when returning stale answers
is enabled, the authoritative server does not respond, and there is no
cached answer available.
2018-10-31 14:08:09 +01:00
Michał Kępień 893ab37ce7 Check TTL of stale answers
Make sure that stale answers returned when the serve-stale feature is
enabled have a TTL matching the value of the stale-answer-ttl setting.
2018-10-31 14:08:09 +01:00
Witold Krecicki 3290daa939 Merge branch 'wpk-get-rid-of-socket-v-functions' into 'master'
Get rid of socket *v functions

See merge request isc-projects/bind9!932
2018-10-31 08:57:08 -04:00
Michał Kępień 0e979358ee [squash] Rework code preparing a HTTP response for sending in lib/isc/httpd.c 2018-10-31 13:46:52 +01:00
Witold KręcickiandMichał Kępień 0e356d6a4a CHANGES entry 2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 54b9690a4e Remove vector socket functions from Unix socket code and library headers
Remove the following functions in order to simplify socket code:

  - isc_socket_recvv()
  - isc_socket_sendtov()
  - isc_socket_sendtov2()
  - isc_socket_sendv()
2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 76ec6861e5 Remove vector socket functions from Windows socket code
Remove the following functions in order to simplify socket code:

  - isc_socket_recvv()
  - isc_socket_sendtov()
  - isc_socket_sendtov2()
  - isc_socket_sendv()
2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 428daba5ce Do not use vector socket functions in diagnostic tools
Refactor diagnostic tools code to no longer use:

  - isc_socket_recvv()
  - isc_socket_sendtov2()
  - isc_socket_sendv()

as these functions will be removed shortly.
2018-10-31 12:12:53 +01:00
Witold KręcickiandMichał Kępień 07eebc42e4 Do not use vector socket functions in HTTP server code
Refactor code in lib/isc/httpd.c to no longer use isc_socket_sendv() as
this function will be removed shortly.
2018-10-31 12:12:50 +01:00
Mark Andrews 3b6f9db3fb Merge branch '649-resolver-test-failing' into 'master'
Resolve "resolver test failing"

Closes #649

See merge request isc-projects/bind9!959
2018-10-31 01:28:46 -04:00
Mark Andrews 280d0ca507 use new packet for response; rename variable to request and response 2018-10-31 16:14:43 +11:00
Witold Krecicki 5794c78159 Merge branch 'wpk-fix-catz-test-race' into 'master'
catz test: wait for dom8.example to be transferred before checking its availability

See merge request isc-projects/bind9!946
2018-10-30 15:17:02 -04:00
Witold Kręcicki 67f824434f Fix style in catz test 2018-10-30 19:08:11 +00:00
Witold Kręcicki ce47ca8c6b catz test: wait for dom8.example to be transferred before checking its availability 2018-10-30 19:08:11 +00:00
Evan Hunt 05bf7e4e3e Merge branch '647-config-h' into 'master'
remove config.h references

Closes #647

See merge request isc-projects/bind9!958
2018-10-30 13:51:13 -04:00
Evan Hunt b27630a130 remove config.h references 2018-10-30 10:42:41 -07:00
Evan Hunt 1ac7058a0f Merge branch 'silence-warning' into 'master'
silence warning from missing print.h

See merge request isc-projects/bind9!955
2018-10-30 11:07:53 -04:00
Evan Hunt a0de6707c0 silence warning from missing print.h 2018-10-30 08:06:34 -07:00
Ondřej Surý 29e7501bef Merge branch '84-destroy-task-first-when-destroying-rpzs' into 'master'
Destroy updater task first when destroying rpzs.

Closes #84

See merge request isc-projects/bind9!944
2018-10-30 09:02:02 -04:00
Witold KręcickiandOndřej Surý 19c4fe93c4 CHANGES entry 2018-10-30 14:01:24 +01:00
Ondřej Surý c1d111cd2e Destroy task first when destroying catzs.
When freeing catzs structures we need to kill the updater task first.
    Otherwise we might race with the updater and there might be a crash
    on shutdown.
2018-10-30 14:01:01 +01:00
Witold KręcickiandOndřej Surý 541872bf3b Destroy task first when destroying rpzs.
When freeing rpzs structures we need to kill the updater task first.
Otherwise we might race with the updater and there might be a crash
on shutdown.
2018-10-30 14:01:01 +01:00
Michał Kępień faa52a704f Merge branch '644-fix-isc_buffer_copyregion-for-auto-reallocated-buffers' into 'master'
Fix isc_buffer_copyregion() for auto-reallocated buffers

Closes #644

See merge request isc-projects/bind9!949
2018-10-30 08:52:25 -04:00
Michał Kępień 07050fb49a Add CHANGES entry
5072.	[bug]		Add unit tests for isc_buffer_copyregion() and fix its
			behavior for auto-reallocated buffers. [GL #644]
2018-10-30 13:33:25 +01:00
Michał Kępień e1f0aed034 Fix isc_buffer_copyregion() for auto-reallocated buffers
While isc_buffer_copyregion() calls isc_buffer_reserve() to ensure the
target buffer will have enough available space to append the contents of
the source region to it, the variables used for subsequently checking
available space are not updated accordingly after that call.  This
prevents isc_buffer_copyregion() from working as expected for
auto-reallocated buffers: ISC_R_NOSPACE will be returned if enough space
is not already available in the target buffer before it is reallocated.
Fix by calling isc_buffer_used() and isc_buffer_availablelength()
directly instead of assigning their return values to local variables.
2018-10-30 13:33:25 +01:00
Michał Kępień 15440d8027 Add unit tests for isc_buffer_copyregion()
Add some basic checks for isc_buffer_copyregion() to ensure it behaves
as expected for both fixed-size buffers and buffers which can be
automatically reallocated.  Adjust the list of headers included by
lib/isc/tests/buffer_test.c so that it matches what that test program
really uses.
2018-10-30 13:33:25 +01:00
Ondřej Surý 0c23a3b0c0 Merge branch 'ondrej/cleanup-leftover-fatal' into 'master'
Remove double result check leftover

See merge request isc-projects/bind9!945
2018-10-30 07:56:51 -04:00
Ondřej Surý 065ff16e40 Remove double result check leftover 2018-10-30 10:30:40 +00:00
Mark Andrews 503e9b70cf Merge branch '631-dns_rdata_compare-for-nxt-performs-case-sensitive-name-comparison' into 'master'
Resolve "dns_rdata_compare() for NXT performs case sensitive name comparison"

Closes #631

See merge request isc-projects/bind9!917
2018-10-29 23:59:52 -04:00
Mark Andrews 921bc89f59 add CHANGES note 2018-10-30 14:51:39 +11:00
Mark Andrews cf83016682 compare_nxt compared records with identical next fields case insensitively 2018-10-30 14:51:39 +11:00
Mark Andrews f2368ce181 Merge branch '638-record-types-with-empty-rdata-fields-were-not-being-handled-correctly' into 'master'
Resolve "Record types with empty rdata fields were not being handled correctly."

Closes #638

See merge request isc-projects/bind9!919
2018-10-29 20:11:22 -04:00
Mark Andrews 97a680e5ce document eol 2018-10-30 11:03:02 +11:00
Mark Andrews 2ff57d8a39 Record types which support a empty rdata field were not handling the empty rdata field case. 2018-10-30 11:03:02 +11:00
Witold Krecicki 9ff13b23f7 Merge branch 'wpk-fix-race-in-rpz-with-min-update-interval-0' into 'master'
Fix a race in RPZ with min-update-interval set to 0

Closes #643

See merge request isc-projects/bind9!907
2018-10-29 18:12:09 -04:00
Witold Kręcicki 8283cbabdc <stdlib.h> include in rpz.c for strtoul 2018-10-29 23:04:01 +01:00
Michał KępieńandWitold Kręcicki 139bc2c6ab Release all resources when shutting down an RPZ zone during an update
If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().
2018-10-29 23:04:00 +01:00
Witold Kręcicki faf2c7711a Fix a race in RPZ with min-update-interval set to 0
If another RPZ update is pending when processing the previous one nears
completion and min-update-interval is set to 0, isc_timer_reset() gets
called with 'interval' set to 0, which triggers an assertion failure.
To prevent such a scenario from causing a crash, queue the update event
directly instead of asking the timer thread to do it.
2018-10-29 23:04:00 +01:00
Witold Krecicki c3b6eaf3d2 Merge branch '361-forwarding-qname-minimization' into 'master'
Resolve "Issue With MR 253 QNAME Minimization"

Closes #361 and #583

See merge request isc-projects/bind9!933
2018-10-29 15:31:00 -04:00
Witold Kręcicki 55a12a4136 Changes 2018-10-29 19:22:31 +00:00
Witold Kręcicki 37df3ca8b6 Style nits 2018-10-29 19:22:10 +00:00
Witold Kręcicki 08460c8cb2 Don't do qname minimization when forwarding; Avoid some intermittent errors in qmin tests caused by timing 2018-10-29 19:22:10 +00:00
Witold Kręcicki b4ca282589 Test for #361 - forwarding breaks with qname minimization 2018-10-29 19:22:10 +00:00
Evan Hunt 68f1e8e940 Merge branch '642-missing-include' into 'master'
added stdatomic.h and md.h

Closes #642

See merge request isc-projects/bind9!936
2018-10-29 14:35:23 -04:00
Evan Hunt dfe5d3330c added stdatomic.h and md.h 2018-10-29 11:26:38 -07:00
Evan Hunt ea9a5e3da4 Merge branch '641-unquoted-rpz' into 'master'
allow unquoted response-policy zone names

Closes #641

See merge request isc-projects/bind9!926
2018-10-29 12:41:35 -04:00
Evan Hunt 507230aa88 allow unquoted response-policy zone names 2018-10-29 12:25:35 -04:00
Mark Andrews c6efbe5d26 Merge branch '635-unchecked-return-in-query-c' into 'master'
Resolve "unchecked return in query.c"

Closes #635

See merge request isc-projects/bind9!925
2018-10-29 03:21:26 -04:00
Mark Andrews e11cfafff2 always call RUNTIME_CHECK(result == ISC_R_SUCCESS); for dns_rdata_tostruct 2018-10-29 03:13:12 -04:00
Mark Andrews 276858d88f Merge branch '553-socket-c-2171-unexpected-error' into 'master'
Resolve "socket.c:2171: unexpected error"

Closes #553

See merge request isc-projects/bind9!924
2018-10-29 02:25:37 -04:00
Mark Andrews 561b780ba0 Only set IPV6_USE_MIN_MTU on IPv6. 2018-10-29 16:49:33 +11:00
Mark Andrews 1454665d70 Merge branch '624-lib-dns-dnstap_test-totext-does-not-work-well-with-softhsm-pkcs11' into 'master'
Resolve "lib/dns/dnstap_test:totext does not work well with SoftHSM PKCS11"

Closes #624

See merge request isc-projects/bind9!921
2018-10-29 01:25:05 -04:00
Mark Andrews 1cf1254051 Initalize TZ environment variable before calling dns_test_begin in dnstap_test. 2018-10-29 16:15:52 +11:00
Ondřej Surý 87b042a48d Merge branch '639-fix-freebsd-build' into 'master'
avoid makefile conditional

Closes #639

See merge request isc-projects/bind9!920
2018-10-28 10:18:47 -04:00
Evan Hunt ff747365db avoid makefile conditional 2018-10-26 23:34:34 -07:00
Ondřej Surý 241594299b Merge branch '22-remove-last-traces-of-already-removed-algorithms' into 'master'
Remove various leftovers for algorithms that have been already removed from BIND

See merge request isc-projects/bind9!901
2018-10-26 06:01:54 -04:00
Ondřej Surý 58cfb2a18a Convert the bin/tests/optional/sig0_test.c to use RSASHA1 instead of DSA 2018-10-26 11:50:11 +02:00
Ondřej Surý 8a6c37faa2 Remove last traces of ECCGOST algorithm 2018-10-26 11:50:11 +02:00
Ondřej Surý d6c50674bb Remove last traces of DSA and NSEC3DSA algorithm, but restore the algnumber -> name mapping 2018-10-26 11:50:11 +02:00
Ondřej Surý 83dbe04bf3 Update dst_test.c to use ECDSA256 and RSASHA256 as test algorithms 2018-10-26 11:50:11 +02:00
Ondřej Surý fbb08b30b8 Remove traces of DST_ALG_ECC which is now just Reserved in IANA registry 2018-10-26 11:50:11 +02:00
Ondřej Surý 8efd394c80 Remove last bits of PKCS#11 DH support that has been already removed 2018-10-26 11:50:11 +02:00
Witold Krecicki cc8c79bb69 Merge branch 'wpk-statschannel-test-timing' into 'master'
statschannel test fix

See merge request isc-projects/bind9!909
2018-10-26 05:12:34 -04:00
Witold Kręcicki b338e6dd21 CHANGES 2018-10-26 08:38:00 +00:00
Witold Kręcicki 5979471dc7 statschannel test: try 5 times to check if compressed and regular output of statschannel is the same - some counters can change, minimize risk of bad timing 2018-10-26 08:36:48 +00:00
Witold Krecicki 7ef2467e6a Merge branch 'wpk-non-crypto-secure-cookies' into 'master'
Cookies with non-crypto-secure random

See merge request isc-projects/bind9!887
2018-10-26 04:03:55 -04:00
Witold Kręcicki 6cd89d5e9f Use non-cryptographically-secure PRNG to generate a nonce for cookies.
Rationale: the nonce here is only used to make sure there is a low
probability of duplication, according to section B.2 of RFC7873.
It is only 32-bit, and even if an attacker knows the algorithm used
to generate nonces it won't, in any way, give him any platform to
attack the server as long as server secret used to sign the
(nonce, time) pair with HMAC-SHA1 is secure.

On the other hand, currently, each packet sent requires (unnecessarily)
a CS pseudo-random number which is ineffective.
2018-10-26 07:54:58 +00:00
Mark Andrews 9ecb0a9168 Merge branch '633-resource-leak-in-hmac_fromdns' into 'master'
Resolve "resource leak in hmac_fromdns"

Closes #633

See merge request isc-projects/bind9!918
2018-10-26 03:04:15 -04:00
Mark Andrews 3219a873a9 free hkey on error 2018-10-26 17:46:15 +11:00
Ondřej Surý bd3163578b Merge branch '632-check-for-individual-openssl-functions' into 'master'
Check for individual OpenSSL functions instead of relying on version number

Closes #632

See merge request isc-projects/bind9!916
2018-10-26 01:05:34 -04:00
Ondřej Surý eb603cb021 Check for individual OpenSSL functions instead of relying on version number 2018-10-26 06:15:51 +02:00
Mark Andrews 7e2026a50b Merge branch '632-evp_cipher_ctx_free-and-evp_cipher_ctx_new-exist-in-openssl-1-0-1' into 'master'
Resolve "EVP_CIPHER_CTX_free and EVP_CIPHER_CTX_new exist in OpenSSL 1.0.1"

Closes #632

See merge request isc-projects/bind9!915
2018-10-25 20:30:52 -04:00
Mark Andrews 632a0ae10b EVP_CIPHER_CTX_new and EVP_CIPHER_CTX_free exist in OpenSSL 1.0.1 2018-10-26 10:01:14 +11:00
Evan Hunt 826c3ddc5b Merge branch '626-implement-eid-and-nimloc' into 'master'
Resolve "Implement EID and NIMLOC"

Closes #626

See merge request isc-projects/bind9!895
2018-10-25 18:29:29 -04:00
Mark AndrewsandEvan Hunt fbab100426 Add support for EID and NIMLOC 2018-10-25 15:20:33 -07:00
Evan Hunt 343333f5c4 Merge branch '627-check-that-gid-uid-and-uinfo-can-be-loaded-using-unknown-record-format' into 'master'
Resolve "Check that GID, UID and UINFO can be loaded using unknown record format."

Closes #627

See merge request isc-projects/bind9!896
2018-10-25 16:34:09 -04:00
Mark AndrewsandEvan Hunt eb7ca65b78 GID, UID and UINFO could not be loaded using unknown record format. 2018-10-25 13:00:32 -07:00
Ondřej Surý 89b186b604 Merge branch '629-fix-isc_md-on-windows' into 'master'
Resolve "Windows Build Errors After !355 (Refactor Message Digest and HMAC API)"

Closes #629

See merge request isc-projects/bind9!908
2018-10-25 15:20:48 -04:00
Ondřej Surý c3846425f3 Don't include inet/arpa.h on Windows 2018-10-25 20:59:48 +02:00
Ondřej Surý 68b49d87b2 Add md.h and md.c to Windows build files 2018-10-25 20:59:48 +02:00
Ondřej Surý 99d919c90f Merge branch '630-dont-enable-fips-mode-on-windows' into 'master'
Disable FIPS mode on Windows

Closes #630

See merge request isc-projects/bind9!905
2018-10-25 14:58:26 -04:00
Ondřej SurýandOndřej Surý 6aae193ded Disable FIPS mode on Windows 2018-10-25 14:47:44 -04:00
Ondřej Surý 25805beb29 Merge branch 'fix-openssl-mctx' into 'master'
correctly attach and detach memory context

See merge request isc-projects/bind9!906
2018-10-25 14:47:20 -04:00
Evan Hunt c852810fbc correctly attach and detach memory context 2018-10-25 11:27:28 -07:00
Ondřej Surý cbdb69f4cc Merge branch 'update-release-checklist-merge-prep-commit' into 'master'
Update release checklist: merge prep commit

See merge request isc-projects/bind9!902
2018-10-25 08:36:44 -04:00
Michał Kępień 88f346a952 Update release checklist: merge prep commit 2018-10-25 14:00:21 +02:00
Michał Kępień 313d2b836f Merge branch '427-list-zones-in-the-web-interface' into 'master'
Display a per-view list of zones in the web interface

Closes #427

See merge request isc-projects/bind9!547
2018-10-25 04:39:26 -04:00
Michał Kępień d9c4068cc3 Add CHANGES entry
5059.	[bug]		Display a per-view list of zones in the web interface.
			[GL #427]
2018-10-25 10:03:03 +02:00
Michał Kępień aeda3f389e Display a per-view list of zones in the web interface
The XSL stylesheet used by the web interface does not currently include
any element which would cause a list of zones configured in each view to
be displayed, making the "Zones" section of the web interface empty
unless some zone has been configured with "zone-statistics full;" and
queried.  Since this can be confusing, modify the XSL stylesheet so that
a list of zones configured in each view is displayed in the web
interface.
2018-10-25 10:03:03 +02:00
Ondřej Surý 530f3dcf07 Merge branch '305-refactor-message-digest-functions' into 'master'
Refactor Message Digest and HMAC API

Closes #305

See merge request isc-projects/bind9!355
2018-10-25 02:33:31 -04:00
Ondřej Surý 189f3ae097 Add CHANGES entry for GL #305.
XXXX.   [func]          Replace old message digest and hmac APIs with more
                        generic isc_md and isc_hmac APIs, and convert their
			respective tests to cmocka. [GL #305]
2018-10-25 08:16:46 +02:00
Ondřej Surý 13888c93a4 Split isc_crc64 API test into separate unit test and convert it to cmocka 2018-10-25 08:16:24 +02:00
Ondřej Surý 7fc78e7cad Remove internal dst memory context that was used just for OpenSSL and was passthrough for malloc and free 2018-10-25 08:16:24 +02:00
Ondřej Surý af69bf5491 Add tkey_test.c with mocked isc_mem object 2018-10-25 08:16:24 +02:00
Ondřej Surý b98ac2593c Add generic hashed message authentication code API (isc_hmac) to replace specific HMAC functions hmacmd5/hmacsha1/hmacsha2... 2018-10-25 08:15:42 +02:00
Ondřej Surý 7fd3dc63de Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
Ondřej Surý 4b636bf74e Add kyua.log to .gitignore 2018-10-25 08:08:51 +02:00
Mark Andrews 0484c3a0ba Merge branch '619-implement-atma' into 'master'
Resolve "Implement ATMA"

Closes #619

See merge request isc-projects/bind9!885
2018-10-24 22:32:46 -04:00
Mark Andrews f9ceddd8ca Add support for ATMA 2018-10-25 13:21:49 +11:00
Mark Andrews a4b97b69f3 Merge branch '609-address-memory-leak-on-error' into 'master'
Resolve "Address memory leak on error"

Closes #609

See merge request isc-projects/bind9!860
2018-10-24 22:13:27 -04:00
Mark Andrews afde30fe9b expand the pool then copy over the old entries so we that failures do not break the old pool; also don't leak the new pool on error 2018-10-24 22:00:08 -04:00
Evan Hunt 3171f0dab9 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!890
2018-10-24 19:08:59 -04:00
Evan Hunt 5888c2866d placeholder 2018-10-24 16:08:16 -07:00
Ondřej Surý 7b2eaca5fe Merge branch '564-mirror-zone-configuration-tweaks-and-cleanups' into 'master'
Mirror zone configuration tweaks and cleanups

Closes #564, #375, and #342

See merge request isc-projects/bind9!815
2018-10-24 14:51:37 -04:00
Michał KępieńandOndřej Surý 5b699aaa42 Add CHANGES entry
XXXX.	[func]		A default list of primary servers for the root zone is
			now built into named, allowing the "masters" statement
			to be omitted when configuring an IANA root zone
			mirror. [GL #564]

XXXX.	[func]		Attempts to use mirror zones with recursion disabled
			are now considered a configuration error. [GL #564]

XXXX.	[func]		The only valid zone-level NOTIFY settings for mirror
			zones are now "notify no;" and "notify explicit;".
			[GL #564]

XXXX.	[func]		Mirror zones are now configured using "type mirror;"
			rather than "mirror yes;". [GL #564]
2018-10-24 20:33:41 +02:00
Michał KępieńandOndřej Surý 7bb3d000a5 Update documentation 2018-10-24 20:32:56 +02:00
Michał KępieńandOndřej Surý adbe2caf28 Test whether mirror zones can be added and removed dynamically
Extend the "mirror" zone system test to make sure mirror zones can be
added and removed dynamically using rndc.
2018-10-24 20:32:56 +02:00
Michał KępieńandOndřej Surý 2c69734bcf Define a default master server list for the root zone
To minimize the effort required to set up IANA root zone mirroring,
define a default master server list for the root zone and use it when
that zone is to be mirrored and no master server list was explicitly
specified.  Contents of that list are taken from RFC 7706 and are
subject to change in future releases.

Since the static get_masters_def() function in bin/named/config.c does
exactly what named_zone_configure() in bin/named/zoneconf.c needs to do,
make the former non-static and use it in the latter to prevent code
duplication.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý 34dc674fed Prevent mirror zones from being used when recursion is disabled
Since mirror zone data is treated as cache data for access control
purposes, configuring a mirror zone and disabling recursion at the same
time would effectively prevent mirror zone data from being used since
disabling recursion also disables cache access to all clients by
default.  Even though this behavior can be inhibited by configuration,
mirror zones are a recursive resolver feature and thus recursion is now
required to use them.

Ignore the fact that certain configurations might still trick named into
assuming recursion is enabled when it effectively is not since this
change is not meant to put a hard policy in place but rather just to
prevent accidental mirror zone misuse.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý 1d49b01cc6 Clean up handling of NOTIFY settings for mirror zones
Previous way of handling NOTIFY settings for mirror zones was a bit
tricky: any value of the "notify" option was accepted, but it was
subsequently overridden with dns_notifytype_explicit.  Given the way
zone configuration is performed, this resulted in the following
behavior:

  - if "notify yes;" was set explicitly at any configuration level or
    inherited from default configuration, it was silently changed and so
    only hosts specified in "also-notify", if any, were notified,

  - if "notify no;" was set at any configuration level, it was
    effectively honored since even though zone->notifytype was silently
    set to dns_notifytype_explicit, the "also-notify" option was never
    processed due to "notify no;" being set.

Effectively, this only allowed the hosts specified in "also-notify" to
be notified, when either "notify yes;" or "notify explicit;" was
explicitly set or inherited from default configuration.

Clean up handling of NOTIFY settings for mirror zones by:

  - reporting a configuration error when anything else than "notify no;"
    or "notify explicit;" is set for a mirror zone at the zone level,

  - overriding inherited "notify yes;" setting with "notify explicit;"
    for mirror zones,

  - informing the user when the "notify" setting is overridden, unless
    the setting in question was inherited from default configuration.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý 2cb9e8a020 Replace the "mirror" zone option with "type mirror;"
Use a zone's 'type' field instead of the value of its DNS_ZONEOPT_MIRROR
option for checking whether it is a mirror zone.  This makes said zone
option and its associated helper function, dns_zone_mirror(), redundant,
so remove them.  Remove a check specific to mirror zones from
named_zone_reusable() since another check in that function ensures that
changing a zone's type prevents it from being reused during
reconfiguration.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý e1bb8de6f0 Define a separate dns_zonetype_t for mirror zones
Rather than overloading dns_zone_slave and discerning between a slave
zone and a mirror zone using a zone option, define a separate enum
value, dns_zone_mirror, to be used exclusively by mirror zones.  Update
code handling slave zones to ensure it also handles mirror zones where
applicable.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý 4a83ccf071 Handle "type mirror;" when parsing zone configuration
Add a new zone type, CFG_ZONE_MIRROR, to libisccfg, in order to limit
the list of options which are considered valid for mirror zones.  Update
the relevant configuration checks.
2018-10-24 20:32:55 +02:00
Ondřej Surý 1ab27e3d53 Merge branch '582-fix-server-addresses-configuration-type' into 'master'
Fix the configuration type used by the "server-addresses" option

Closes #582

See merge request isc-projects/bind9!856
2018-10-24 09:39:01 -04:00
Michał KępieńandOndřej Surý 6b1c0a8e6f Add CHANGES entry
5048.	[doc]		Documentation incorrectly stated that the
			"server-addresses" static-stub zone option accepts
			custom port numbers. [GL #582]
2018-10-24 15:13:31 +02:00
Michał KępieńandOndřej Surý b324576858 Fix the configuration type used by the "server-addresses" option
Contrary to what the documentation states, the "server-addresses"
static-stub zone option does not accept custom port numbers.  Fix the
configuration type used by the "server-addresses" option to ensure
documentation matches source code.  Remove a check_zoneconf() test which
is unnecessary with this fix in place.
2018-10-24 15:13:31 +02:00
869 changed files with 20327 additions and 143451 deletions
+1 -29
View File
@@ -27,38 +27,10 @@ gen.dSYM/
.deps/
.dirstamp
.libs/
unit/atf-src/atf-c++/atf-c++.pc
unit/atf-src/atf-c/atf-c.pc
unit/atf-src/atf-c/defs.h
unit/atf-src/atf-c/detail/process_helpers
unit/atf-src/atf-config/atf-config
unit/atf-src/atf-report/atf-report
unit/atf-src/atf-report/fail_helper
unit/atf-src/atf-report/misc_helpers
unit/atf-src/atf-report/pass_helper
unit/atf-src/atf-run/atf-run
unit/atf-src/atf-run/bad_metadata_helper
unit/atf-src/atf-run/expect_helpers
unit/atf-src/atf-run/misc_helpers
unit/atf-src/atf-run/pass_helper
unit/atf-src/atf-run/several_tcs_helper
unit/atf-src/atf-run/zero_tcs_helper
unit/atf-src/atf-sh/atf-check
unit/atf-src/atf-sh/atf-sh
unit/atf-src/atf-sh/misc_helpers
unit/atf-src/atf-version/atf-version
unit/atf-src/atf-version/revision.h
unit/atf-src/atf-version/revision.h.stamp
unit/atf-src/bconfig.h
unit/atf-src/bootstrap/atconfig
unit/atf-src/doc/atf.7
unit/atf-src/stamp-h1
unit/atf-src/test-programs/c_helpers
unit/atf-src/test-programs/cpp_helpers
unit/atf-src/test-programs/sh_helpers
# ccc-analyzer store its results in .plist directories
*.plist/
*~
.project
.cproject
.settings
kyua.log
+96 -50
View File
@@ -116,7 +116,7 @@ stages:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
# - ./autogen.sh
script:
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
artifacts:
paths:
@@ -156,14 +156,13 @@ stages:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
artifacts:
paths:
- atf.out
- kyua.log
- kyua.results
- kyua_html/
expire_in: '1 week'
when: on_failure
precheck:debian:sid:amd64:
sid:amd64:precheck:
<<: *debian_sid_amd64_image
stage: precheck
script:
@@ -183,11 +182,16 @@ precheck:debian:sid:amd64:
expire_in: '1 week'
when: on_failure
docs:debian:sid:amd64:
🐞:sid:amd64:precheck:
<<: *debian_sid_amd64_image
stage: precheck
script: util/check-cocci
docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: test
dependencies:
- build:debian:sid:amd64
- sid:amd64:build
script:
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
@@ -196,7 +200,7 @@ docs:debian:sid:amd64:
- doc/arm/
expire_in: '1 month'
push:docs:
docs:push:
<<: *debian_sid_amd64_image
stage: push
dependencies: []
@@ -206,15 +210,15 @@ push:docs:
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
#build:debian:jessie:amd64:
#jessie:amd64:build:
# <<: *debian_jessie_amd64_image
# <<: *build_job
#
#build:debian:jessie:i386:
#build:jessie:i386:
# <<: *debian_jessie_i386_image
# <<: *build_job
#
#build:debian:stretch:amd64:
#build:stretch:amd64:
# <<: *debian_stretch_amd64_image
# <<: *build_job
#
@@ -230,7 +234,7 @@ push:docs:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
build:centos:centos6:amd64:
centos6:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -238,7 +242,7 @@ build:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *build_job
build:centos:centos7:amd64:
centos7:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -246,28 +250,29 @@ build:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *build_job
build:clang:debian:stretch:amd64:
clang:stretch:amd64:build:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
build:debian:jessie:amd64:
jessie:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: --without-cmocka
<<: *debian_jessie_amd64_image
<<: *build_job
build:debian:stretch:amd64:
stretch:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
build:debian:sid:amd64:
sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -275,14 +280,23 @@ build:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *build_job
build:clang:debian:stretch:i386:
asan:sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=address,undefined"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
clang:stretch:i386:build:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_i386_image
<<: *build_job
build:debian:sid:i386:
sid:i386:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -290,91 +304,103 @@ build:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *build_job
unittest:centos:centos6:amd64:
unit:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos6:amd64
- centos6:amd64:build
unittest:centos:centos7:amd64:
unit:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos7:amd64
- centos7:amd64:build
unittest:debian:jessie:amd64:
unit:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:jessie:amd64
- jessie:amd64:build
unittest:debian:stretch:amd64:
unit:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:stretch:amd64
- stretch:amd64:build
unittest:debian:sid:amd64:
unit:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:sid:amd64
- sid:amd64:build
unittest:clang:debian:stretch:amd64:
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- asan:sid:amd64:build
unit:clang:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- build:clang:debian:stretch:amd64
- clang:stretch:amd64:build
unittest:debian:sid:i386:
unit:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- build:debian:sid:i386
- sid:i386:build
systemtest:centos:centos6:amd64:
system:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos6:amd64
- centos6:amd64:build
systemtest:centos:centos7:amd64:
system:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos7:amd64
- centos7:amd64:build
systemtest:debian:jessie:amd64:
system:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- build:debian:jessie:amd64
- jessie:amd64:build
systemtest:debian:stretch:amd64:
system:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- build:debian:stretch:amd64
- stretch:amd64:build
systemtest:debian:sid:amd64:
system:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- build:debian:sid:amd64
- sid:amd64:build
systemtest:debian:sid:i386:
system:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- asan:sid:amd64:build
system:sid:i386:
<<: *debian_sid_i386_image
<<: *system_test_job
dependencies:
- build:debian:sid:i386
- sid:i386:build
install:debian:sid:amd64:
install:sid:amd64:
<<: *debian_sid_amd64_image
<<: *install_test_job
dependencies:
- build:debian:sid:amd64
- sid:amd64:build
pkcs11:build:debian:sid:amd64:
pkcs11:sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -382,14 +408,34 @@ pkcs11:build:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *build_job
pkcs11:unittest:debian:sid:amd64:
pkcs11:unit:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
- pkcs11:sid:amd64:build
pkcs11:systemtest:debian:sid:amd64:
pkcs11:system:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
- pkcs11:sid:amd64:build
noassert:sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
noassert:unit:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- noassert:sid:amd64:build
noassert:system:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- noassert:sid:amd64:build
+20 -7
View File
@@ -1,19 +1,21 @@
## Release Checklist
- [ ] (Manager) Check for the presence of a milestone for the release.
- [ ] (Manager) Check for the presence of a milestone for the release:
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist).
- [ ] (Manager) Inform Support/Marketing of impending release (and give estimated release dates).
- (SwEng) Prepare the sources for tarball generation.
- (SwEng) Prepare the sources for tarball generation:
- [ ] Check perflab to ensure there has been no unexplained drop in performance for the version being released.
- [ ] Ensure that there are no outstanding merge requests in the private repository (subscription version only).
- [ ] Update API files for libraries with new version information.
- [ ] Change software version and library versions in configure.in (new major release only).
- [ ] Ensure Kyua and ATF files are correct.
- [ ] Rebuild configure using autoconf on docs.isc.org.
- [ ] Update CHANGES.
- [ ] Update CHANGES.SE (subscription branch only).
- [ ] Update "version".
- [ ] Update "readme.md".
- [ ] Ensure the release notes are correct for this release (content, formatting, etc.).
- Check the release notes are correct:
- [ ] Compare content with merge requests for the release.
- [ ] Check formatting.
- [ ] Build documentation on docs.isc.org.
- [ ] Commit changes and make sure the gitlab-ci tests are passing.
- [ ] Push the changes and tag ("alphatag" is an optional string such as "b1", "rc1" etc.). (```git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]```)
@@ -24,8 +26,19 @@
- [ ] (QA) Request the signature on the tarballs.
- [ ] (QA) Check signatures on tarballs.
- [ ] (QA) Tell Support to handle notification of release.
- [ ] (Support) Make tarballs and signatures available to download.
- [ ] (Manager) Update [https://wiki.isc.org/bin/view/Main/BindReleaseDates](BIND release dates page) when public announcement has been made.
- [ ] (Manager) Inform marketing of the release
- [ ] (Manager) Inform Marketing of the release
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [ ] (SwEng) Update DEB and RPM packages
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
## Support
- [ ] Make tarballs and signatures available to download.
- [ ] Write release email to bind9-announce.
- [ ] Write email to bind9-users (if a major release).
- [ ] Update tickets in case of waiting support customers.
## Marketing
- [ ] Post short note to Twitter.
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
- [ ] Write blog article (if a major release).
-5
View File
@@ -1,5 +0,0 @@
Content-Type: application/X-atf-atffile; version="1"
prop: test-suite = bind9
tp: lib
+165 -1
View File
@@ -1,3 +1,167 @@
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
5099. [func] Failed mutex and conditional creations are always
fatal. [GL #674]
--- 9.13.4 released ---
5098. [func] Failed memory allocations are now fatal. [GL #674]
5097. [cleanup] Remove embedded ATF unit testing framework
from BIND source distribution. [GL !875]
5096. [func] Use multiple event loops in socket code, and
make network threads CPU-affinitive. This
significantly improves performance on large
systems. [GL #666]
5095. [test] Converted all unit tests from ATF to CMocka;
removed the source code for the ATF libraries.
Build with "configure --with-cmocka" to enable
unit testing. [GL #620]
5094. [func] Add 'dig -r' to disable reading of .digrc. [GL !970]
5093. [bug] Log lame qname-minimization servers only if they're
really lame. [GL #671]
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
GSS-TSIG. [GL #558]
5091. [func] Two new global and per-view options min-cache-ttl
and min-ncache-ttl [GL #613]
5090. [bug] dig and mdig failed to properly preparse dash value
pairs when value was a seperate argument and started
with a dash. [GL #584]
5089. [bug] Restore localhost fallback in dig and host which is
used when no nameserver addresses present in
/etc/resolv.conf are usable due to the requested
address family restrictions. [GL #433]
5088. [bug] dig/host/nslookup could crash when interrupted close to
a query timeout. [GL #599]
5087. [test] Check that result tables are complete. [GL #676]
5086. [func] Log of RPZ now includes the QTYPE and QCLASS. [GL #623]
5085. [bug] win32: Restore looking up nameservers, search list,
etc. [GL #186]
5084. [placeholder]
5083. [func] Add autoconf macro AX_POSIX_SHELL, so we
can use POSIX-compatible shell features
in the scripts.
5082. [bug] Fixed a race that could cause a crash in
dig/host/nslookup. [GL #650]
5081. [func] Use per-worker queues in task manager, make task
runners CPU-affine. [GL #659]
5080. [func] Improvements to "rndc nta" user interface:
- catch and report invalid command line options
- when removing an NTA from all views, do not
abort with an error if the NTA was not found
in one of the views
- include the view name in "rndc nta -dump"
output, for consistency with the add and remove
actions
Thanks to Tony Finch. [GL !816]
5079. [func] Disable IDN processing in dig and nslookup
when not on a tty. [GL #653]
5078. [cleanup] Require python components to be explicitly disabled if
python is not available on unix platforms. [GL #601]
5077. [cleanup] Remove ip6.int support (-i) from dig and mdig.
[GL !969]
5076. [bug] "require-server-cookie" was not effective if
"rate-limit" was configured. [GL #617]
5075. [bug] Refresh nameservers from cache when sending final
query in qname minimization. [GL #16]
5074. [cleanup] Remove vector socket functions - isc_socket_recvv(),
isc_socket_sendtov(), isc_socket_sendtov2(),
isc_socket_sendv() - in order to simplify socket code.
[GL #645]
5073. [bug] Destroy a task first when destroying rpzs and catzs.
[GL #84]
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]
5071. [bug] Comparision of NXT records was broken. [GL #631]
5070. [bug] Record types which support a empty rdata field were
not handling the empty rdata field case. [GL #638]
5069. [bug] Fix a hang on in RPZ when named is shutdown during RPZ
zone update. [GL !907]
5068. [bug] Fix a race in RPZ with min-update-interval set to 0.
[GL #643]
5067. [bug] Don't minimize qname when sending the query
to a forwarder. [GL #361]
5066. [cleanup] Allow unquoted strings to be used as a zone names
in response-policy statements. [GL #641]
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
5064. [test] Initalize TZ environment variable before calling
dns_test_begin in dnstap_test. [GL #624]
5063. [test] In statschannel test try a few times before failing
when checking if the compressed output is the same as
uncompressed. [GL !909]
5062. [func] Use non-crypto-secure PRNG to generate nonces for
cookies. [GL !887]
5061. [protocol] Add support for EID and NIMLOC. [GL #626]
5060. [bug] GID, UID and UINFO could not be loaded using unknown
record format. [GL #627]
5059. [bug] Display a per-view list of zones in the web interface.
[GL #427]
5058. [func] Replace old message digest and hmac APIs with more
generic isc_md and isc_hmac APIs, and convert their
respective tests to cmocka. [GL #305]
5057. [protocol] Add support for ATMA. [GL #619]
5056. [placeholder]
5055. [func] A default list of primary servers for the root zone is
now built into named, allowing the "masters" statement
to be omitted when configuring an IANA root zone
mirror. [GL #564]
5054. [func] Attempts to use mirror zones with recursion disabled
are now considered a configuration error. [GL #564]
5053. [func] The only valid zone-level NOTIFY settings for mirror
zones are now "notify no;" and "notify explicit;".
[GL #564]
5052. [func] Mirror zones are now configured using "type mirror;"
rather than "mirror yes;". [GL #564]
5051. [doc] Documentation incorrectly stated that the
"server-addresses" static-stub zone option accepts
custom port numbers. [GL #582]
5050. [bug] The libirs version of getaddrinfo() was unable to parse
scoped IPv6 addresses present in /etc/resolv.conf.
[GL #187]
@@ -181,7 +345,7 @@
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
[GL #261]
4998. [test] Make resolver and cacheclean tests more civilized.
+1 -1
View File
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@
SUBDIRS = make unit lib fuzz bin doc
SUBDIRS = make lib fuzz bin doc
TARGETS =
PREREQS = bind.keys.h
+28
View File
@@ -59,3 +59,31 @@ These are platforms on which BIND is known not to build or run:
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
Platform quirks
ARM
If the compilation ends with following error:
Error: selected processor does not support `yield' in ARM mode
You will need to set -march compiler option to native, so the compiler
recognizes yield assembler instruction. The proper way to set -march=
native would be to put it into CFLAGS, e.g. run ./configure like this:
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
Debian armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
recommended build option is -march=armv7-a.
* FPU should be set at VFPv3-D16 as they represent the miminum
specification of the processors to support here, therefore the
recommended build option is -mfpu=vfpv3-d16.
The configure command should look like this:
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
+5 -2
View File
@@ -104,6 +104,7 @@ BIND 9.13 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.12 and earlier releases. New features include:
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
@@ -289,8 +290,10 @@ and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using Automated Testing Framework (ATF). To run
them, use configure --with-atf, then run make test or make unit.
Unit tests are implemented using the CMocka unit testing framework. To
build them, use configure --with-cmocka. Execution of tests is done by the
Kyua test execution engine; if the kyua command is available, then unit
tests can be run via make test or make unit.
Documentation
+5 -3
View File
@@ -122,6 +122,7 @@ BIND 9.13 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
@@ -307,9 +308,10 @@ and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using Automated Testing Framework (ATF).
To run them, use `configure --with-atf`, then run `make test` or
`make unit`.
Unit tests are implemented using the CMocka unit testing framework.
To build them, use `configure --with-cmocka`. Execution of tests is done
by the Kyua test execution engine; if the `kyua` command is available,
then unit tests can be run via `make test` or `make unit`.
### <a name="doc"/> Documentation
Vendored
+1
View File
@@ -289,6 +289,7 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
+24 -10
View File
@@ -282,8 +282,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
@@ -300,8 +302,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
@@ -327,8 +331,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
@@ -345,8 +351,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
@@ -366,8 +374,10 @@ configure_zone(const char *vclass, const char *view,
zone_options |= DNS_ZONEOPT_CHECKSPF;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKSPF;
}
@@ -383,8 +393,10 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKNAMES;
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
@@ -394,14 +406,16 @@ configure_zone(const char *vclass, const char *view,
fmtobj = NULL;
if (get_maps(maps, "masterfile-format", &fmtobj)) {
const char *masterformatstr = cfg_obj_asstring(fmtobj);
if (strcasecmp(masterformatstr, "text") == 0)
if (strcasecmp(masterformatstr, "text") == 0) {
masterformat = dns_masterformat_text;
else if (strcasecmp(masterformatstr, "raw") == 0)
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
else if (strcasecmp(masterformatstr, "map") == 0)
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
+5 -3
View File
@@ -139,12 +139,14 @@ main(int argc, char **argv) {
#define PROGCMP(X) \
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
if (PROGCMP("named-checkzone"))
if (PROGCMP("named-checkzone")) {
progmode = progmode_check;
else if (PROGCMP("named-compilezone"))
} else if (PROGCMP("named-compilezone")) {
progmode = progmode_compile;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/* Compilation specific defaults */
if (progmode == progmode_compile) {
+4 -2
View File
@@ -125,10 +125,12 @@ main(int argc, char **argv) {
if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen;
quiet = true;
} else if (PROGCMP("ddns-confgen"))
} else if (PROGCMP("ddns-confgen")) {
progmode = progmode_confgen;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
isc_commandline_errprint = false;
+34 -1
View File
@@ -765,7 +765,14 @@ setup_dnsseckeys(dns_client_t *client) {
if (dlv_validation)
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
cleanup:
if (bindkeys != NULL) {
cfg_obj_destroy(parser, &bindkeys);
}
if (parser != NULL) {
cfg_parser_destroy(&parser);
}
if (result != ISC_R_SUCCESS)
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
isc_result_totext(result));
@@ -1167,6 +1174,8 @@ plus_option(char *option) {
* options: "46a:b:c:d:himp:q:t:vx:";
*/
static const char *single_dash_opts = "46himv";
static const char *dash_opts = "46abcdhimpqtvx";
static bool
dash_option(char *option, char *next, bool *open_type_class) {
char opt, *value;
@@ -1224,6 +1233,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
/* NOTREACHED */
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (strlen(option) > 1U)
option = &option[1];
@@ -1367,8 +1377,10 @@ preparse_args(int argc, char **argv) {
char *option;
for (argc--, argv++; argc > 0; argc--, argv++) {
if (argv[0][0] != '-')
if (argv[0][0] != '-') {
continue;
}
option = &argv[0][1];
while (strpbrk(option, single_dash_opts) == &option[0]) {
switch (option[0]) {
@@ -1391,6 +1403,27 @@ preparse_args(int argc, char **argv) {
}
option = &option[1];
}
if (strlen(option) == 0U) {
continue;
}
/* Look for dash value option. */
if (strpbrk(option, dash_opts) != &option[0] ||
strlen(option) > 1U)
{
/* Error or value in option. */
continue;
}
/* Dash value is next argument so we need to skip it. */
argc--;
argv++;
/* Handle missing argument */
if (argc == 0) {
break;
}
}
}
+20 -12
View File
@@ -74,7 +74,9 @@ will perform an NS query for "\&." (the root)\&.
It is possible to set per\-user defaults for
\fBdig\fR
via
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&. The
\fB\-r\fR
option disables this feature, for scripts that need predictable behaviour\&.
.PP
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
\fB\-t\fR
@@ -174,11 +176,6 @@ reads a list of lookup requests to process from the given
using the command\-line interface\&.
.RE
.PP
\-i
.RS 4
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
.RE
.PP
\-k \fIkeyfile\fR
.RS 4
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
@@ -208,6 +205,12 @@ The domain name to query\&. This is useful to distinguish the
from other arguments\&.
.RE
.PP
\-r
.RS 4
Do not read options from
${HOME}/\&.digrc\&. This is useful for scripts that need predictable behaviour\&.
.RE
.PP
\-t \fItype\fR
.RS 4
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
@@ -246,9 +249,7 @@ arguments\&.
\fBdig\fR
automatically performs a lookup for a name like
94\&.2\&.0\&.192\&.in\-addr\&.arpa
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain (but see also the
\fB\-i\fR
option)\&.
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&.
.RE
.PP
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
@@ -468,12 +469,16 @@ option is enabled\&. If short form answers are requested, the default is not to
.PP
\fB+[no]idnin\fR
.RS 4
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&.
.sp
The default is to process IDN input when standard output is a tty\&. The IDN processing on input is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
.RE
.PP
\fB+[no]idnout\fR
.RS 4
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&.
.sp
The default is to process puny code on output when standard output is a tty\&. The puny code processing on output is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
.RE
.PP
\fB+[no]ignore\fR
@@ -795,7 +800,10 @@ has been built with IDN (internationalized domain name) support, it can accept a
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
\fI+noidnin\fR
and
\fI+noidnout\fR\&.
\fI+noidnout\fR
or define the
\fBIDN_DISABLE\fR
environment variable\&.
.SH "FILES"
.PP
/etc/resolv\&.conf
+43 -11
View File
@@ -65,8 +65,8 @@ static char domainopt[DNS_NAME_MAXTEXT];
static char hexcookie[81];
static bool short_form = false, printcmd = true,
ip6_int = false, plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false;
plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false, digrc = true;
static uint32_t splitwidth = 0xffffffff;
/*% opcode text */
@@ -153,11 +153,11 @@ help(void) {
" -b address[#port] (bind to source address/port)\n"
" -c class (specify query class)\n"
" -f filename (batch mode)\n"
" -i (use IP6.INT for IPv6 reverse lookups)\n"
" -k keyfile (specify tsig key file)\n"
" -m (enable memory usage debugging)\n"
" -p port (specify port number)\n"
" -q name (specify query name)\n"
" -r (do not read ~/.digrc)\n"
" -t type (specify query type)\n"
" -u (display times in usec instead of msec)\n"
" -x dot-notation (shortcut for reverse lookups)\n"
@@ -193,8 +193,10 @@ help(void) {
" +[no]fail (Don't try next server on SERVFAIL)\n"
" +[no]header-only (Send query without a question section)\n"
" +[no]identify (ID responders in short answers)\n"
" +[no]idnin (Parse IDN names)\n"
" +[no]idnout (Convert IDN response)\n"
#ifdef HAVE_LIBIDN2
" +[no]idnin (Parse IDN names [default=on on tty])\n"
" +[no]idnout (Convert IDN response [default=on on tty])\n"
#endif
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
" +[no]keepalive (Request EDNS TCP keepalive)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
@@ -1542,8 +1544,8 @@ plus_option(char *option, bool is_batchfile,
/*%
* #true returned if value was used
*/
static const char *single_dash_opts = "46dhimnuv";
static const char *dash_opts = "46bcdfhikmnptvyx";
static const char *single_dash_opts = "46dhimnruv";
static const char *dash_opts = "46bcdfhikmnpqrtvyx";
static bool
dash_option(char *option, char *next, dig_lookup_t **lookup,
bool *open_type_class, bool *need_clone,
@@ -1606,7 +1608,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
exit(0);
break;
case 'i':
ip6_int = true;
/* deprecated */
break;
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
@@ -1614,6 +1616,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case 'n':
/* deprecated */
break;
case 'r':
debug("digrc (late)");
digrc = false;
break;
case 'u':
(*lookup)->use_usec = true;
break;
@@ -1787,13 +1793,12 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
*lookup = clone_lookup(default_lookup, true);
*need_clone = true;
if (get_reverse(textname, sizeof(textname), value,
ip6_int, false) == ISC_R_SUCCESS) {
false) == ISC_R_SUCCESS) {
strlcpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
(*lookup)->trace_root = ((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->ip6_int = ip6_int;
if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset)
@@ -1841,11 +1846,23 @@ preparse_args(int argc, char **argv) {
option = &rv[0][1];
while (strpbrk(option, single_dash_opts) == &option[0]) {
switch (option[0]) {
case 'd':
/* For debugging early startup */
debugging = true;
break;
case 'm':
memdebugging = true;
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
ISC_MEM_DEBUGRECORD;
break;
case 'r':
/*
* Must be done early, because ~/.digrc
* is read before command line parsing
*/
debug("digrc (early)");
digrc = false;
break;
case '4':
if (ipv6only)
fatal("only one of -4 and -6 allowed");
@@ -1859,6 +1876,20 @@ preparse_args(int argc, char **argv) {
}
option = &option[1];
}
if (strlen(option) == 0U) {
continue;
}
/* Look for dash value option. */
if (strpbrk(option, dash_opts) != &option[0] ||
strlen(option) > 1U) {
/* Error or value in option. */
continue;
}
/* Dash value is next argument so we need to skip it. */
rc--, rv++;
/* Handle missing argument */
if (rc == 0)
break;
}
}
@@ -1925,8 +1956,9 @@ parse_args(bool is_batchfile, bool config_only,
*/
INSIST(batchfp == NULL);
homedir = getenv("HOME");
if (homedir != NULL) {
if (homedir != NULL && digrc) {
unsigned int n;
debug("digrc (open)");
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile)) {
+29 -18
View File
@@ -131,9 +131,10 @@
<para>
It is possible to set per-user defaults for <command>dig</command> via
<filename>${HOME}/.digrc</filename>. This file is read and
any options in it
are applied before the command line arguments.
<filename>${HOME}/.digrc</filename>. This file is read and any
options in it are applied before the command line arguments.
The <option>-r</option> option disables this feature, for
scripts that need predictable behaviour.
</para>
<para>
@@ -271,17 +272,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC 2874) are not attempted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">keyfile</replaceable></term>
<listitem>
@@ -334,6 +324,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-r</term>
<listitem>
<para>
Do not read options from <filename>${HOME}/.digrc</filename>.
This is useful for scripts that need predictable behaviour.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">type</replaceable></term>
<listitem>
@@ -394,8 +394,7 @@
<literal>94.2.0.192.in-addr.arpa</literal> and sets the
query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the
IP6.ARPA domain (but see also the <option>-i</option>
option).
IP6.ARPA domain.
</para>
</listitem>
</varlistentry>
@@ -789,7 +788,13 @@
<para>
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
compile time. The default is to process IDN input.
compile time.
</para>
<para>
The default is to process IDN input when standard output
is a tty. The IDN processing on input is disabled when
dig output is redirected to files, pipes, and other
non-tty file descriptors.
</para>
</listitem>
</varlistentry>
@@ -800,7 +805,13 @@
<para>
Convert [do not convert] puny code on output.
This requires IDN SUPPORT to have been enabled at
compile time. The default is to convert output.
compile time.
</para>
<para>
The default is to process puny code on output when
standard output is a tty. The puny code processing on
output is disabled when dig output is redirected to
files, pipes, and other non-tty file descriptors.
</para>
</listitem>
</varlistentry>
+29 -16
View File
@@ -106,9 +106,10 @@
<p>
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
<code class="filename">${HOME}/.digrc</code>. This file is read and
any options in it
are applied before the command line arguments.
<code class="filename">${HOME}/.digrc</code>. This file is read and any
options in it are applied before the command line arguments.
The <code class="option">-r</code> option disables this feature, for
scripts that need predictable behaviour.
</p>
<p>
@@ -227,14 +228,6 @@
<span class="command"><strong>dig</strong></span> using the command-line interface.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC 2874) are not attempted.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
<dd>
<p>
@@ -274,6 +267,13 @@
the <em class="parameter"><code>name</code></em> from other arguments.
</p>
</dd>
<dt><span class="term">-r</span></dt>
<dd>
<p>
Do not read options from <code class="filename">${HOME}/.digrc</code>.
This is useful for scripts that need predictable behaviour.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
<dd>
<p>
@@ -324,8 +324,7 @@
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the
IP6.ARPA domain (but see also the <code class="option">-i</code>
option).
IP6.ARPA domain.
</p>
</dd>
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
@@ -631,7 +630,13 @@
<p>
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
compile time. The default is to process IDN input.
compile time.
</p>
<p>
The default is to process IDN input when standard output
is a tty. The IDN processing on input is disabled when
dig output is redirected to files, pipes, and other
non-tty file descriptors.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
@@ -639,7 +644,13 @@
<p>
Convert [do not convert] puny code on output.
This requires IDN SUPPORT to have been enabled at
compile time. The default is to convert output.
compile time.
</p>
<p>
The default is to process puny code on output when
standard output is a tty. The puny code processing on
output is disabled when dig output is redirected to
files, pipes, and other non-tty file descriptors.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
@@ -1061,7 +1072,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
reply from the server.
If you'd like to turn off the IDN support for some reason, use
parameters <em class="parameter"><code>+noidnin</code></em> and
<em class="parameter"><code>+noidnout</code></em>.
<em class="parameter"><code>+noidnout</code></em> or define
the <code class="envar">IDN_DISABLE</code> environment variable.
</p>
</div>
+138 -120
View File
@@ -312,8 +312,7 @@ reverse_octets(const char *in, char **p, char *end) {
}
isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
bool strict)
get_reverse(char *reverse, size_t len, char *value, bool strict)
{
int r;
isc_result_t result;
@@ -327,8 +326,6 @@ get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
dns_name_t *name;
unsigned int options = 0;
if (ip6_int)
options |= DNS_BYADDROPT_IPV6INT;
name = dns_fixedname_initname(&fname);
result = dns_byaddr_createptrname(&addr, options, name);
if (result != ISC_R_SUCCESS)
@@ -628,7 +625,7 @@ make_empty_lookup(void) {
looknew->ttlunits = false;
looknew->qr = false;
#ifdef HAVE_LIBIDN2
looknew->idnin = (getenv("IDN_DISABLE") == NULL);
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
looknew->idnout = looknew->idnin;
#else
looknew->idnin = false;
@@ -652,7 +649,6 @@ make_empty_lookup(void) {
looknew->nsfound = 0;
looknew->tcp_mode = false;
looknew->tcp_mode_set = false;
looknew->ip6_int = false;
looknew->comments = true;
looknew->stats = true;
looknew->section_question = true;
@@ -1231,6 +1227,19 @@ create_search_list(irs_resconf_t *resconf) {
}
}
/*%
* Append 'addr' to the list of servers to be queried. This function is only
* called when no server addresses are explicitly specified and either libirs
* returns an empty list of servers to use or none of the addresses returned by
* libirs are usable due to the specified address family restrictions.
*/
static void
add_fallback_nameserver(const char *addr) {
dig_server_t *server = make_server(addr, addr);
ISC_LINK_INIT(server, link);
ISC_LIST_APPEND(server_list, server, link);
}
/*%
* Setup the system as a whole, reading key information and resolv.conf
* settings.
@@ -1276,6 +1285,16 @@ setup_system(bool ipv4only, bool ipv6only) {
get_server_list(resconf);
}
/* If we don't find a nameserver fall back to localhost */
if (ISC_LIST_EMPTY(server_list)) {
if (have_ipv6) {
add_fallback_nameserver("::1");
}
if (have_ipv4) {
add_fallback_nameserver("127.0.0.1");
}
}
irs_resconf_destroy(&resconf);
#ifdef HAVE_SETLOCALE
@@ -1371,8 +1390,7 @@ setup_libs(void) {
isc_mempool_setfreemax(commctx, 6);
isc_mempool_setfillcount(commctx, 2);
result = isc_mutex_init(&lookup_lock);
check_result(result, "isc_mutex_init");
isc_mutex_init(&lookup_lock);
}
typedef struct dig_ednsoptname {
@@ -1523,23 +1541,21 @@ clear_query(dig_query_t *query) {
debug("clear_query(%p)", query);
if (query->timer != NULL)
if (query->timer != NULL) {
isc_timer_detach(&query->timer);
}
lookup = query->lookup;
if (lookup->current_query == query)
if (lookup->current_query == query) {
lookup->current_query = NULL;
}
if (ISC_LINK_LINKED(query, link))
if (ISC_LINK_LINKED(query, link)) {
ISC_LIST_UNLINK(lookup->q, query, link);
if (ISC_LINK_LINKED(query, clink))
}
if (ISC_LINK_LINKED(query, clink)) {
ISC_LIST_UNLINK(lookup->connecting, query, clink);
if (ISC_LINK_LINKED(&query->recvbuf, link))
ISC_LIST_DEQUEUE(query->recvlist, &query->recvbuf,
link);
if (ISC_LINK_LINKED(&query->lengthbuf, link))
ISC_LIST_DEQUEUE(query->lengthlist, &query->lengthbuf,
link);
}
INSIST(query->recvspace != NULL);
if (query->sock != NULL) {
@@ -1548,12 +1564,16 @@ clear_query(dig_query_t *query) {
debug("sockcount=%d", sockcount);
}
isc_mempool_put(commctx, query->recvspace);
isc_mempool_put(commctx, query->tmpsendspace);
isc_buffer_invalidate(&query->recvbuf);
isc_buffer_invalidate(&query->lengthbuf);
if (query->waiting_senddone)
if (query->waiting_senddone) {
query->pending_free = true;
else
} else {
query->magic = 0;
isc_mem_free(mctx, query);
}
}
/*%
@@ -2293,7 +2313,7 @@ setup_lookup(dig_lookup_t *lookup) {
if (lookup->ecs_addr != NULL) {
uint8_t addr[16];
uint16_t family;
uint16_t family = 0;
uint32_t plen;
struct sockaddr *sa;
struct sockaddr_in *sin;
@@ -2350,6 +2370,7 @@ setup_lookup(dig_lookup_t *lookup) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
@@ -2461,13 +2482,14 @@ setup_lookup(dig_lookup_t *lookup) {
for (serv = ISC_LIST_HEAD(lookup->my_server_list);
serv != NULL;
serv = ISC_LIST_NEXT(serv, link)) {
serv = ISC_LIST_NEXT(serv, link))
{
query = isc_mem_allocate(mctx, sizeof(dig_query_t));
if (query == NULL)
if (query == NULL) {
fatal("memory allocation failure in %s:%d",
__FILE__, __LINE__);
debug("create query %p linked to lookup %p",
query, lookup);
}
debug("create query %p linked to lookup %p", query, lookup);
query->lookup = lookup;
query->timer = NULL;
query->waiting_connect = false;
@@ -2488,20 +2510,24 @@ setup_lookup(dig_lookup_t *lookup) {
query->msg_count = 0;
query->byte_count = 0;
query->ixfr_axfr = false;
ISC_LIST_INIT(query->recvlist);
ISC_LIST_INIT(query->lengthlist);
query->sock = NULL;
query->recvspace = isc_mempool_get(commctx);
if (query->recvspace == NULL)
query->tmpsendspace = isc_mempool_get(commctx);
if (query->recvspace == NULL) {
fatal("memory allocation failure");
}
isc_buffer_init(&query->recvbuf, query->recvspace, COMMSIZE);
isc_buffer_init(&query->lengthbuf, query->lengthspace, 2);
isc_buffer_init(&query->slbuf, query->slspace, 2);
isc_buffer_init(&query->tmpsendbuf, query->tmpsendspace,
COMMSIZE);
query->sendbuf = lookup->renderbuf;
ISC_LINK_INIT(query, clink);
ISC_LINK_INIT(query, link);
query->magic = DIG_QUERY_MAGIC;
ISC_LIST_ENQUEUE(lookup->q, query, link);
}
@@ -2510,9 +2536,10 @@ setup_lookup(dig_lookup_t *lookup) {
extrabytes = 0;
dighost_printmessage(ISC_LIST_HEAD(lookup->q),
lookup->sendmsg, true);
if (lookup->stats)
if (lookup->stats) {
printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(&lookup->renderbuf));
}
}
return (true);
}
@@ -2523,8 +2550,6 @@ setup_lookup(dig_lookup_t *lookup) {
*/
static void
send_done(isc_task_t *_task, isc_event_t *event) {
isc_socketevent_t *sevent = (isc_socketevent_t *)event;
isc_buffer_t *b = NULL;
dig_query_t *query, *next;
dig_lookup_t *l;
@@ -2539,28 +2564,27 @@ send_done(isc_task_t *_task, isc_event_t *event) {
debug("sendcount=%d", sendcount);
INSIST(sendcount >= 0);
for (b = ISC_LIST_HEAD(sevent->bufferlist);
b != NULL;
b = ISC_LIST_HEAD(sevent->bufferlist)) {
ISC_LIST_DEQUEUE(sevent->bufferlist, b, link);
isc_mem_free(mctx, b);
}
query = event->ev_arg;
REQUIRE(DIG_VALID_QUERY(query));
query->waiting_senddone = false;
l = query->lookup;
if (l->ns_search_only && !l->trace_root && !l->tcp_mode) {
if (!query->pending_free && l->ns_search_only &&
!l->trace_root && !l->tcp_mode)
{
debug("sending next, since searching");
next = ISC_LIST_NEXT(query, link);
if (next != NULL)
if (next != NULL) {
send_udp(next);
}
}
isc_event_free(&event);
if (query->pending_free)
if (query->pending_free) {
query->magic = 0;
isc_mem_free(mctx, query);
}
check_if_done();
UNLOCK_LOOKUP;
@@ -2578,6 +2602,7 @@ cancel_lookup(dig_lookup_t *lookup) {
debug("cancel_lookup()");
query = ISC_LIST_HEAD(lookup->q);
while (query != NULL) {
REQUIRE(DIG_VALID_QUERY(query));
next = ISC_LIST_NEXT(query, link);
if (query->sock != NULL) {
isc_socket_cancel(query->sock, global_task,
@@ -2597,6 +2622,7 @@ bringup_timer(dig_query_t *query, unsigned int default_timeout) {
dig_lookup_t *l;
unsigned int local_timeout;
isc_result_t result;
REQUIRE(DIG_VALID_QUERY(query));
debug("bringup_timer()");
/*
@@ -2661,6 +2687,7 @@ send_tcp_connect(dig_query_t *query) {
isc_result_t result;
dig_query_t *next;
dig_lookup_t *l;
REQUIRE(DIG_VALID_QUERY(query));
debug("send_tcp_connect(%p)", query);
@@ -2777,17 +2804,6 @@ send_tcp_connect(dig_query_t *query) {
}
}
static isc_buffer_t *
clone_buffer(isc_buffer_t *source) {
isc_buffer_t *buffer;
buffer = isc_mem_allocate(mctx, sizeof(*buffer));
if (buffer == NULL)
fatal("memory allocation failure in %s:%d",
__FILE__, __LINE__);
*buffer = *source;
return (buffer);
}
/*%
* Send a UDP packet to the remote nameserver, possible starting the
* recv action as well. Also make sure that the timer is running and
@@ -2797,8 +2813,10 @@ static void
send_udp(dig_query_t *query) {
dig_lookup_t *l = NULL;
isc_result_t result;
isc_buffer_t *sendbuf;
dig_query_t *next;
isc_region_t r;
isc_socketevent_t *sevent;
REQUIRE(DIG_VALID_QUERY(query));
debug("send_udp(%p)", query);
@@ -2859,29 +2877,27 @@ send_udp(dig_query_t *query) {
check_result(result, "isc_socket_bind");
query->recv_made = true;
ISC_LINK_INIT(&query->recvbuf, link);
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf,
link);
isc_buffer_availableregion(&query->recvbuf, &r);
debug("recving with lookup=%p, query=%p, sock=%p",
query->lookup, query, query->sock);
result = isc_socket_recvv(query->sock, &query->recvlist, 1,
global_task, recv_done, query);
check_result(result, "isc_socket_recvv");
result = isc_socket_recv(query->sock, &r, 1,
global_task, recv_done, query);
check_result(result, "isc_socket_recv");
recvcount++;
debug("recvcount=%d", recvcount);
}
ISC_LIST_INIT(query->sendlist);
sendbuf = clone_buffer(&query->sendbuf);
ISC_LIST_ENQUEUE(query->sendlist, sendbuf, link);
isc_buffer_usedregion(&query->sendbuf, &r);
debug("sending a request");
TIME_NOW(&query->time_sent);
INSIST(query->sock != NULL);
query->waiting_senddone = true;
result = isc_socket_sendtov2(query->sock, &query->sendlist,
global_task, send_done, query,
&query->sockaddr, NULL,
ISC_SOCKFLAG_NORETRY);
check_result(result, "isc_socket_sendtov");
sevent = isc_socket_socketevent(mctx, query->sock,
ISC_SOCKEVENT_SENDDONE,
send_done, query);
result = isc_socket_sendto2(query->sock, &r,
global_task, &query->sockaddr, NULL,
sevent, ISC_SOCKFLAG_NORETRY);
check_result(result, "isc_socket_sendto2");
sendcount++;
}
@@ -2902,11 +2918,17 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
LOCK_LOOKUP;
query = event->ev_arg;
REQUIRE(DIG_VALID_QUERY(query));
l = query->lookup;
isc_event_free(&event);
INSIST(!free_now);
if (cancel_now) {
UNLOCK_LOOKUP;
return;
}
if ((query != NULL) && (query->lookup->current_query != NULL) &&
ISC_LINK_LINKED(query->lookup->current_query, link) &&
(ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
@@ -2971,7 +2993,8 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
static void
tcp_length_done(isc_task_t *task, isc_event_t *event) {
isc_socketevent_t *sevent;
isc_buffer_t *b = NULL;
isc_buffer_t b;
isc_region_t r;
isc_result_t result;
dig_query_t *query = NULL;
dig_lookup_t *l, *n;
@@ -2987,14 +3010,11 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
LOCK_LOOKUP;
sevent = (isc_socketevent_t *)event;
query = event->ev_arg;
REQUIRE(DIG_VALID_QUERY(query));
recvcount--;
INSIST(recvcount >= 0);
b = ISC_LIST_HEAD(sevent->bufferlist);
INSIST(b == &query->lengthbuf);
ISC_LIST_DEQUEUE(sevent->bufferlist, b, link);
if (sevent->result == ISC_R_CANCELED) {
isc_event_free(&event);
l = query->lookup;
@@ -3027,7 +3047,10 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
UNLOCK_LOOKUP;
return;
}
length = isc_buffer_getuint16(b);
isc_buffer_init(&b, sevent->region.base, sevent->n);
isc_buffer_add(&b, sevent->n);
length = isc_buffer_getuint16(&b);
if (length == 0) {
isc_event_free(&event);
launch_next_query(query, false);
@@ -3041,13 +3064,11 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
*/
isc_buffer_invalidate(&query->recvbuf);
isc_buffer_init(&query->recvbuf, query->recvspace, length);
ENSURE(ISC_LIST_EMPTY(query->recvlist));
ISC_LINK_INIT(&query->recvbuf, link);
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf, link);
isc_buffer_availableregion(&query->recvbuf, &r);
debug("recving with lookup=%p, query=%p", query->lookup, query);
result = isc_socket_recvv(query->sock, &query->recvlist, length, task,
recv_done, query);
check_result(result, "isc_socket_recvv");
result = isc_socket_recv(query->sock, &r, length, task,
recv_done, query);
check_result(result, "isc_socket_recv");
recvcount++;
debug("resubmitted recv request with length %d, recvcount=%d",
length, recvcount);
@@ -3063,7 +3084,8 @@ static void
launch_next_query(dig_query_t *query, bool include_question) {
isc_result_t result;
dig_lookup_t *l;
isc_buffer_t *buffer;
isc_region_t r;
REQUIRE(DIG_VALID_QUERY(query));
INSIST(!free_now);
@@ -3082,35 +3104,28 @@ launch_next_query(dig_query_t *query, bool include_question) {
return;
}
isc_buffer_clear(&query->slbuf);
isc_buffer_clear(&query->lengthbuf);
isc_buffer_putuint16(&query->slbuf, (uint16_t) query->sendbuf.used);
ISC_LIST_INIT(query->sendlist);
ISC_LINK_INIT(&query->slbuf, link);
if (!query->first_soa_rcvd) {
buffer = clone_buffer(&query->slbuf);
ISC_LIST_ENQUEUE(query->sendlist, buffer, link);
if (include_question) {
buffer = clone_buffer(&query->sendbuf);
ISC_LIST_ENQUEUE(query->sendlist, buffer, link);
}
}
ISC_LINK_INIT(&query->lengthbuf, link);
ISC_LIST_ENQUEUE(query->lengthlist, &query->lengthbuf, link);
result = isc_socket_recvv(query->sock, &query->lengthlist, 0,
global_task, tcp_length_done, query);
check_result(result, "isc_socket_recvv");
isc_buffer_availableregion(&query->lengthbuf, &r);
result = isc_socket_recv(query->sock, &r, 0,
global_task, tcp_length_done, query);
check_result(result, "isc_socket_recv");
recvcount++;
debug("recvcount=%d", recvcount);
if (!query->first_soa_rcvd) {
debug("sending a request in launch_next_query");
TIME_NOW(&query->time_sent);
query->waiting_senddone = true;
result = isc_socket_sendv(query->sock, &query->sendlist,
global_task, send_done, query);
check_result(result, "isc_socket_sendv");
isc_buffer_clear(&query->tmpsendbuf);
isc_buffer_putuint16(&query->tmpsendbuf,
isc_buffer_usedlength(&query->sendbuf));
if (include_question) {
isc_buffer_usedregion(&query->sendbuf, &r);
isc_buffer_copyregion(&query->tmpsendbuf, &r);
}
isc_buffer_usedregion(&query->tmpsendbuf, &r);
result = isc_socket_send(query->sock, &r,
global_task, send_done, query);
check_result(result, "isc_socket_send");
sendcount++;
debug("sendcount=%d", sendcount);
}
@@ -3143,6 +3158,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
LOCK_LOOKUP;
sevent = (isc_socketevent_t *)event;
query = sevent->ev_arg;
REQUIRE(DIG_VALID_QUERY(query));
INSIST(query->waiting_connect);
@@ -3460,8 +3476,9 @@ ednsvers(dns_rdataset_t *opt) {
static void
recv_done(isc_task_t *task, isc_event_t *event) {
isc_socketevent_t *sevent = NULL;
isc_region_t r;
dig_query_t *query = NULL;
isc_buffer_t *b = NULL;
isc_buffer_t b;
dns_message_t *msg = NULL;
isc_result_t result;
dig_lookup_t *n, *l;
@@ -3491,9 +3508,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
REQUIRE(event->ev_type == ISC_SOCKEVENT_RECVDONE);
sevent = (isc_socketevent_t *)event;
b = ISC_LIST_HEAD(sevent->bufferlist);
INSIST(b == &query->recvbuf);
ISC_LIST_DEQUEUE(sevent->bufferlist, &query->recvbuf, link);
isc_buffer_init(&b, sevent->region.base, sevent->n);
isc_buffer_add(&b, sevent->n);
if ((l->tcp_mode) && (query->timer != NULL))
isc_timer_touch(query->timer);
@@ -3569,7 +3585,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
}
result = dns_message_peekheader(b, &id, &msgflags);
result = dns_message_peekheader(&b, &id, &msgflags);
if (result != ISC_R_SUCCESS || l->sendmsg->id != id) {
match = false;
if (l->tcp_mode) {
@@ -3638,7 +3654,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
parseflags |= DNS_MESSAGEPARSE_BESTEFFORT;
parseflags |= DNS_MESSAGEPARSE_IGNORETRUNCATION;
}
result = dns_message_parse(msg, b, parseflags);
result = dns_message_parse(msg, &b, parseflags);
if (result == DNS_R_RECOVERABLE) {
printf(";; Warning: Message parser reports malformed "
"message packet.\n");
@@ -3646,7 +3662,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
if (result != ISC_R_SUCCESS) {
printf(";; Got bad packet: %s\n", isc_result_totext(result));
hex_dump(b);
hex_dump(&b);
query->waiting_connect = false;
dns_message_destroy(&msg);
isc_event_free(&event);
@@ -3800,7 +3816,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
if (tsigkey != NULL) {
result = dns_tsig_verify(&query->recvbuf, msg, NULL, NULL);
result = dns_tsig_verify(&b, msg, NULL, NULL);
if (result != ISC_R_SUCCESS) {
printf(";; Couldn't verify signature: %s\n",
isc_result_totext(result));
@@ -3816,7 +3832,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
check_result(result,"dns_message_getquerytsig");
}
extrabytes = isc_buffer_remaininglength(b);
extrabytes = isc_buffer_remaininglength(&b);
debug("after parse");
if (l->doing_xfr && l->xfr_q == NULL) {
@@ -3863,8 +3879,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
(l->origin != NULL || l->need_search)) {
if (!next_origin(query->lookup) || showsearch) {
dighost_printmessage(query, msg, true);
dighost_received(b->used, &sevent->address,
query);
dighost_received(isc_buffer_usedlength(&b),
&sevent->address, query);
}
} else if (!l->trace && !l->ns_search_only) {
dighost_printmessage(query, msg, true);
@@ -3931,7 +3947,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
} else {
if (msg->rcode == dns_rcode_noerror || l->origin == NULL) {
dighost_received(b->used, &sevent->address, query);
dighost_received(isc_buffer_usedlength(&b),
&sevent->address, query);
}
if (!query->lookup->ns_search_only)
@@ -3955,10 +3972,10 @@ recv_done(isc_task_t *task, isc_event_t *event) {
udp_mismatch:
isc_buffer_invalidate(&query->recvbuf);
isc_buffer_init(&query->recvbuf, query->recvspace, COMMSIZE);
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf, link);
result = isc_socket_recvv(query->sock, &query->recvlist, 1,
global_task, recv_done, query);
check_result(result, "isc_socket_recvv");
isc_buffer_availableregion(&query->recvbuf, &r);
result = isc_socket_recv(query->sock, &r, 1,
global_task, recv_done, query);
check_result(result, "isc_socket_recv");
recvcount++;
isc_event_free(&event);
UNLOCK_LOOKUP;
@@ -4033,6 +4050,7 @@ do_lookup(dig_lookup_t *lookup) {
lookup->pending = true;
query = ISC_LIST_HEAD(lookup->q);
if (query != NULL) {
REQUIRE(DIG_VALID_QUERY(query));
if (lookup->tcp_mode)
send_tcp_connect(query);
else
@@ -4180,7 +4198,7 @@ destroy_libs(void) {
}
UNLOCK_LOOKUP;
DESTROYLOCK(&lookup_lock);
isc_mutex_destroy(&lookup_lock);
debug("Removing log context");
isc_log_destroy(&lctx);
+1 -6
View File
@@ -112,11 +112,6 @@ Print debugging traces\&. Equivalent to the
verbose option\&.
.RE
.PP
\-i
.RS 4
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
.RE
.PP
\-l
.RS 4
List zone: The
@@ -257,7 +252,7 @@ If
\fBhost\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBhost\fR
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
\fBIDN_DISABLE\fR
environment variable\&. The IDN support is disabled if the variable is set when
\fBhost\fR
+3 -4
View File
@@ -143,7 +143,6 @@ show_usage(void) {
" -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n"
" -i IP6.INT reverse lookups\n"
" -l lists all hosts in a domain, using AXFR\n"
" -m set memory debugging flag (trace|record|usage)\n"
" -N changes the number of dots allowed before root lookup is done\n"
@@ -762,7 +761,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
default_lookups = false;
break;
case 'i':
lookup->ip6_int = true;
/* deprecated */
break;
case 'n':
/* deprecated */
@@ -841,8 +840,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
check_ra = true;
lookup->pending = false;
if (get_reverse(store, sizeof(store), hostname,
lookup->ip6_int, true) == ISC_R_SUCCESS) {
if (get_reverse(store, sizeof(store), hostname, true)
== ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true;
-12
View File
@@ -179,18 +179,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l</term>
<listitem>
+1 -10
View File
@@ -138,15 +138,6 @@
Equivalent to the <code class="option">-v</code> verbose option.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</p>
</dd>
<dt><span class="term">-l</span></dt>
<dd>
<p>
@@ -311,7 +302,7 @@
<span class="command"><strong>host</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, defines
If you'd like to turn off the IDN support for some reason, define
the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
<span class="command"><strong>host</strong></span> runs.
+12 -11
View File
@@ -26,6 +26,7 @@
#include <isc/formatcheck.h>
#include <isc/lang.h>
#include <isc/list.h>
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/sockaddr.h>
@@ -81,6 +82,11 @@ typedef struct dig_server dig_server_t;
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
typedef struct dig_searchlist dig_searchlist_t;
#define DIG_QUERY_MAGIC ISC_MAGIC('D','i','g','q')
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
/*% The dig_lookup structure */
struct dig_lookup {
bool
@@ -103,7 +109,6 @@ struct dig_lookup {
trace_root, /*% initial query for either +trace or +nssearch */
tcp_mode,
tcp_mode_set,
ip6_int,
comments,
stats,
section_question,
@@ -185,6 +190,7 @@ struct dig_lookup {
/*% The dig_query structure */
struct dig_query {
unsigned int magic;
dig_lookup_t *lookup;
bool waiting_connect,
pending_free,
@@ -203,15 +209,12 @@ struct dig_query {
bool ixfr_axfr;
char *servname;
char *userarg;
isc_bufferlist_t sendlist,
recvlist,
lengthlist;
isc_buffer_t recvbuf,
lengthbuf,
slbuf;
char *recvspace,
lengthspace[4],
slspace[4];
tmpsendbuf,
sendbuf;
char *recvspace, *tmpsendspace,
lengthspace[4];
isc_socket_t *sock;
ISC_LINK(dig_query_t) link;
ISC_LINK(dig_query_t) clink;
@@ -219,7 +222,6 @@ struct dig_query {
isc_time_t time_sent;
isc_time_t time_recv;
uint64_t byte_count;
isc_buffer_t sendbuf;
isc_timer_t *timer;
};
@@ -284,8 +286,7 @@ int
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
bool strict);
get_reverse(char *reverse, size_t len, char *value, bool strict);
ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...)
+11
View File
@@ -277,6 +277,17 @@ Try the next nameserver if a nameserver responds with SERVFAIL or a referral (no
.PP
\fBnslookup\fR
returns with an exit status of 1 if any query failed, and 0 otherwise\&.
.SH "IDN SUPPORT"
.PP
If
\fBnslookup\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBnslookup\fR
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
\fBIDN_DISABLE\fR
environment variable\&. The IDN support is disabled if the variable is set when
\fBnslookup\fR
runs or when the standard output is not a tty\&.
.SH "FILES"
.PP
/etc/resolv\&.conf
+1 -7
View File
@@ -772,7 +772,7 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
if (get_reverse(store, sizeof(store), opt, true)
== ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
@@ -923,12 +923,6 @@ flush_lookup_list(void) {
ISC_SOCKCANCEL_ALL);
isc_socket_detach(&q->sock);
}
if (ISC_LINK_LINKED(&q->recvbuf, link))
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
link);
if (ISC_LINK_LINKED(&q->lengthbuf, link))
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
link);
isc_buffer_invalidate(&q->recvbuf);
isc_buffer_invalidate(&q->lengthbuf);
qp = q;
+2 -1
View File
@@ -489,7 +489,8 @@ nslookup -query=hinfo -timeout=10
If you'd like to turn off the IDN support for some reason, define
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>nslookup</command> runs.
<command>nslookup</command> runs or when the standard output is not
a tty.
</para>
</refsection>
+19 -2
View File
@@ -362,14 +362,31 @@ nslookup -query=hinfo -timeout=10
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>FILES</h2>
<a name="id-1.11"></a><h2>IDN SUPPORT</h2>
<p>
If <span class="command"><strong>nslookup</strong></span> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<span class="command"><strong>nslookup</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
<span class="command"><strong>nslookup</strong></span> runs or when the standard output is not
a tty.
</p>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>FILES</h2>
<p><code class="filename">/etc/resolv.conf</code>
</p>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>SEE ALSO</h2>
<a name="id-1.13"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">dig</span>(1)
+2 -2
View File
@@ -163,8 +163,8 @@ verbose_time(int level, const char *msg, isc_stdtime_t time) {
if (verbose < 3) {
vbprintf(level, "%s %s\n", msg, timestr);
} else {
vbprintf(level, "%s %s (%lld)\n",
msg, timestr, (long long)time);
vbprintf(level, "%s %s (%" PRIu32 ")\n",
msg, timestr, time);
}
}
+3 -3
View File
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
.RS 4
Selects the cryptographic algorithm\&. The value of
\fBalgorithm\fR
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
.sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR
@@ -63,9 +63,9 @@ option is specified, in which case NSEC3RSASHA1 will be used instead\&. (If
\fB\-3\fR
is used and an algorithm is specified, that algorithm will be checked for compatibility with NSEC3\&.)
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
option, then NSEC3RSASHA1 will be used instead\&.
.sp
As of BIND 9\&.12\&.0, this option is mandatory except when using the
\fB\-S\fR
+2 -6
View File
@@ -64,8 +64,8 @@ usage(void) {
fprintf(stderr, " name: owner of the key\n");
fprintf(stderr, "Other options:\n");
fprintf(stderr, " -a algorithm: \n"
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
" NSEC3DSA | NSEC3RSASHA1 |\n"
" RSA | RSAMD5 | DH | RSASHA1 |\n"
" NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 |\n"
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
@@ -402,13 +402,9 @@ main(int argc, char **argv) {
if (use_nsec3) {
switch (alg) {
case DST_ALG_DSA:
alg = DST_ALG_NSEC3DSA;
break;
case DST_ALG_RSASHA1:
alg = DST_ALG_NSEC3RSASHA1;
break;
case DST_ALG_NSEC3DSA:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512:
+3 -3
View File
@@ -106,7 +106,7 @@
<para>
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</para>
<para>
@@ -119,9 +119,9 @@
<para>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
along with the <option>-3</option> option, then NSEC3RSASHA1
or NSEC3DSA will be used instead.
will be used instead.
</para>
<para>
As of BIND 9.12.0, this option is mandatory except when using
+3 -3
View File
@@ -90,7 +90,7 @@
<p>
Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</p>
<p>
@@ -103,9 +103,9 @@
<p>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
or NSEC3DSA will be used instead.
will be used instead.
</p>
<p>
As of BIND 9.12.0, this option is mandatory except when using
+3 -3
View File
@@ -62,13 +62,13 @@ may be preferable to direct use of
.RS 4
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
\fBalgorithm\fR
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
\fB\-T KEY\fR
option as well\&.
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
option, then NSEC3RSASHA1 will be used instead\&.
.sp
This parameter
\fImust\fR
+2 -28
View File
@@ -79,8 +79,8 @@ usage(void) {
fprintf(stderr, "Options:\n");
fprintf(stderr, " -K <directory>: write keys into directory\n");
fprintf(stderr, " -a <algorithm>:\n");
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
" | NSEC3DSA |\n");
fprintf(stderr, " RSA | RSAMD5 | RSASHA1 | NSEC3RSASHA1"
" |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH\n");
@@ -92,10 +92,6 @@ usage(void) {
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA512:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " DH:\t\t[128..4096]\n");
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
fprintf(stderr, " NSEC3DSA:\t[512..1024] and divisible "
"by 64\n");
fprintf(stderr, " ECCGOST:\tignored\n");
fprintf(stderr, " ECDSAP256SHA256:\tignored\n");
fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
fprintf(stderr, " ED25519:\tignored\n");
@@ -161,11 +157,6 @@ usage(void) {
exit (-1);
}
static bool
dsa_size_ok(int size) {
return (size >= 512 && size <= 1024 && size % 64 == 0);
}
static void
progress(int p)
{
@@ -542,17 +533,12 @@ main(int argc, char **argv) {
if (use_nsec3) {
switch (alg) {
case DST_ALG_DSA:
alg = DST_ALG_NSEC3DSA;
break;
case DST_ALG_RSASHA1:
alg = DST_ALG_NSEC3RSASHA1;
break;
case DST_ALG_NSEC3DSA:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
@@ -598,7 +584,6 @@ main(int argc, char **argv) {
" to %d\n", size);
}
break;
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
@@ -728,14 +713,6 @@ main(int argc, char **argv) {
if (size != 0 && (size < 128 || size > 4096))
fatal("DH key size %d out of range", size);
break;
case DNS_KEYALG_DSA:
case DNS_KEYALG_NSEC3DSA:
if (size != 0 && !dsa_size_ok(size))
fatal("invalid DSS key size: %d", size);
break;
case DST_ALG_ECCGOST:
size = 256;
break;
case DST_ALG_ECDSA256:
size = 256;
break;
@@ -815,9 +792,6 @@ main(int argc, char **argv) {
param = generator;
break;
case DNS_KEYALG_DSA:
case DNS_KEYALG_NSEC3DSA:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
+3 -3
View File
@@ -123,7 +123,7 @@
<para>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <option>-T KEY</option>
@@ -132,9 +132,9 @@
<para>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
along with the <option>-3</option> option, then NSEC3RSASHA1
or NSEC3DSA will be used instead.
will be used instead.
</para>
<para>
This parameter <emphasis>must</emphasis> be specified except
+3 -3
View File
@@ -100,7 +100,7 @@
<p>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <code class="option">-T KEY</code>
@@ -109,9 +109,9 @@
<p>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
or NSEC3DSA will be used instead.
will be used instead.
</p>
<p>
This parameter <span class="emphasis"><em>must</em></span> be specified except
+8 -7
View File
@@ -40,6 +40,7 @@
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/hex.h>
#include <isc/md.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/os.h>
@@ -532,8 +533,6 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
arraysize += dns_rdataset_count(&sigset);
wassignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
nowsignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
if (wassignedby == NULL || nowsignedby == NULL)
fatal("out of memory");
for (i = 0; i < arraysize; i++)
wassignedby[i] = nowsignedby[i] = false;
@@ -3875,9 +3874,11 @@ main(int argc, char *argv[]) {
isc_result_totext(result));
}
RUNTIME_CHECK(isc_mutex_init(&namelock) == ISC_R_SUCCESS);
if (printstats)
RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
isc_mutex_init(&namelock);
if (printstats) {
isc_mutex_init(&statslock);
}
presign();
TIME_NOW(&sign_start);
@@ -3935,9 +3936,9 @@ main(int argc, char *argv[]) {
check_result(result, "dns_master_dumptostream3");
}
DESTROYLOCK(&namelock);
isc_mutex_destroy(&namelock);
if (printstats)
DESTROYLOCK(&statslock);
isc_mutex_destroy(&statslock);
if (!output_stdout) {
result = isc_stdio_close(outfp);
+48
View File
@@ -198,6 +198,25 @@
background-color: #99ddff;
}
table.zones {
border: 1px solid grey;
width: 500px;
}
table.zones th {
text-align: center;
border: 1px solid grey;
}
table.zones td {
text-align: center;
font-family: monospace;
}
table.zones td:nth-child(1) {
text-align: right;
}
table.zones td:nth-child(4) {
text-align: right;
}
.totals {
background-color: rgb(1,169,206);
color: #ffffff;
@@ -705,6 +724,35 @@
</table>
<br/>
</xsl:if>
<xsl:for-each select="views/view">
<xsl:if test="zones/zone">
<h3>Zones for View <xsl:value-of select="@name"/></h3>
<table class="zones">
<tr>
<th>Name</th>
<th>Class</th>
<th>Type</th>
<th>Serial</th>
</tr>
<xsl:for-each select="zones/zone">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@rdataclass"/>
</td>
<td>
<xsl:value-of select="type"/>
</td>
<td>
<xsl:value-of select="serial"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:if>
</xsl:for-each>
<xsl:if test="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
<h2>Received QTYPES per view/zone</h2>
<xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
+48
View File
@@ -203,6 +203,25 @@ static char xslmsg[] =
" background-color: #99ddff;\n"
" }\n"
"\n"
" table.zones {\n"
" border: 1px solid grey;\n"
" width: 500px;\n"
" }\n"
" table.zones th {\n"
" text-align: center;\n"
" border: 1px solid grey;\n"
" }\n"
" table.zones td {\n"
" text-align: center;\n"
" font-family: monospace;\n"
" }\n"
" table.zones td:nth-child(1) {\n"
" text-align: right;\n"
" }\n"
" table.zones td:nth-child(4) {\n"
" text-align: right;\n"
" }\n"
"\n"
" .totals {\n"
" background-color: rgb(1,169,206);\n"
" color: #ffffff;\n"
@@ -710,6 +729,35 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:for-each select=\"views/view\">\n"
" <xsl:if test=\"zones/zone\">\n"
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
" <table class=\"zones\">\n"
" <tr>\n"
" <th>Name</th>\n"
" <th>Class</th>\n"
" <th>Type</th>\n"
" <th>Serial</th>\n"
" </tr>\n"
" <xsl:for-each select=\"zones/zone\">\n"
" <tr>\n"
" <td>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"@rdataclass\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"type\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"serial\"/>\n"
" </td>\n"
" </tr>\n"
" </xsl:for-each>\n"
" </table>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" <xsl:if test=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
" <h2>Received QTYPES per view/zone</h2>\n"
" <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
+26 -4
View File
@@ -174,6 +174,8 @@ options {\n\
max-recursion-queries 75;\n\
max-stale-ttl 604800; /* 1 week */\n\
message-compression yes;\n\
min-ncache-ttl 0; /* 0 hours */\n\
min-cache-ttl 0; /* 0 seconds */\n\
# min-roots <obsolete>;\n\
minimal-any false;\n\
minimal-responses no-auth-recursive;\n\
@@ -301,6 +303,21 @@ view \"_bind\" chaos {\n\
MANAGED_KEYS
"# END MANAGED KEYS\n\
\n\
masters " DEFAULT_IANA_ROOT_ZONE_MASTERS " {\n\
2001:500:84::b; # b.root-servers.net\n\
2001:500:2f::f; # f.root-servers.net\n\
2001:7fd::1; # k.root-servers.net\n\
2620:0:2830:202::132; # xfr.cjr.dns.icann.org\n\
2620:0:2d0:202::132; # xfr.lax.dns.icann.org\n\
192.228.79.201; # b.root-servers.net\n\
192.33.4.12; # c.root-servers.net\n\
192.5.5.241; # f.root-servers.net\n\
192.112.36.4; # g.root-servers.net\n\
193.0.14.129; # k.root-servers.net\n\
192.0.47.132; # xfr.cjr.dns.icann.org\n\
192.0.32.132; # xfr.lax.dns.icann.org\n\
};\n\
";
isc_result_t
@@ -432,6 +449,8 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
strcasecmp(str, "slave") == 0)
{
ztype = dns_zone_slave;
} else if (strcasecmp(str, "mirror") == 0) {
ztype = dns_zone_mirror;
} else if (strcasecmp(str, "stub") == 0) {
ztype = dns_zone_stub;
} else if (strcasecmp(str, "static-stub") == 0) {
@@ -440,6 +459,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
ztype = dns_zone_redirect;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
return (ztype);
}
@@ -553,9 +573,9 @@ named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
}
static isc_result_t
get_masters_def(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
isc_result_t
named_config_getmastersdef(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
{
isc_result_t result;
const cfg_obj_t *masters = NULL;
@@ -697,7 +717,8 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
break;
if (j < l)
continue;
tresult = get_masters_def(config, listname, &list);
tresult = named_config_getmastersdef(config, listname,
&list);
if (tresult == ISC_R_NOTFOUND) {
cfg_obj_log(addr, named_g_lctx, ISC_LOG_ERROR,
"masters \"%s\" not found", listname);
@@ -1011,6 +1032,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
}
if (typep != NULL)
+6
View File
@@ -22,6 +22,8 @@
#include <dns/types.h>
#include <dns/zone.h>
#define DEFAULT_IANA_ROOT_ZONE_MASTERS "_default_iana_root_zone_masters"
isc_result_t
named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
@@ -57,6 +59,10 @@ void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count);
isc_result_t
named_config_getmastersdef(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret);
isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, dns_ipkeylist_t *ipkl);
+1
View File
@@ -157,6 +157,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
type = ISC_LOG_TOFILE;
+19 -18
View File
@@ -793,10 +793,7 @@ create_managers(void) {
named_g_udpdisp = 1;
#else
if (named_g_udpdisp == 0) {
if (named_g_cpus_detected == 1)
named_g_udpdisp = 1;
else
named_g_udpdisp = named_g_cpus_detected - 1;
named_g_udpdisp = named_g_cpus_detected;
}
if (named_g_udpdisp > named_g_cpus)
named_g_udpdisp = named_g_cpus;
@@ -824,7 +821,7 @@ create_managers(void) {
}
result = isc_socketmgr_create2(named_g_mctx, &named_g_socketmgr,
maxsocks);
maxsocks, named_g_cpus);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_socketmgr_create() failed: %s",
@@ -1068,14 +1065,20 @@ setup(void) {
/*
* Get the initial resource limits.
*/
(void)isc_resource_getlimit(isc_resource_stacksize,
&named_g_initstacksize);
(void)isc_resource_getlimit(isc_resource_datasize,
&named_g_initdatasize);
(void)isc_resource_getlimit(isc_resource_coresize,
&named_g_initcoresize);
(void)isc_resource_getlimit(isc_resource_openfiles,
&named_g_initopenfiles);
#ifndef WIN32
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_stacksize,
&named_g_initstacksize)
== ISC_R_SUCCESS);
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_datasize,
&named_g_initdatasize)
== ISC_R_SUCCESS);
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_coresize,
&named_g_initcoresize)
== ISC_R_SUCCESS);
#endif
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_openfiles,
&named_g_initopenfiles)
== ISC_R_SUCCESS);
/*
* System resources cannot effectively be tuned on some systems.
@@ -1083,8 +1086,9 @@ setup(void) {
*/
old_openfiles = named_g_initopenfiles;
named_os_adjustnofile();
(void)isc_resource_getlimit(isc_resource_openfiles,
&named_g_initopenfiles);
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_openfiles,
&named_g_initopenfiles)
== ISC_R_SUCCESS);
if (old_openfiles != named_g_initopenfiles) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
@@ -1335,9 +1339,6 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
named_main_earlyfatal("program name too long");
if (result != ISC_R_SUCCESS)
named_main_earlyfatal("failed to build internal symbol table");
isc_assertion_setcallback(assertion_failed);
isc_error_setfatal(library_fatal_error);
isc_error_setunexpected(library_unexpected_error);
+23 -22
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-06-21
.\" Date: 2018-10-23
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2018\-10\-23" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -199,6 +199,7 @@ options {
] [ dscp \fIinteger\fR ];
alt\-transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR |
* ) ] [ dscp \fIinteger\fR ];
answer\-cookie \fIboolean\fR;
attach\-cache \fIstring\fR;
auth\-nxdomain \fIboolean\fR; // default changed
auto\-dnssec ( allow | maintain | off );
@@ -264,8 +265,8 @@ options {
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
response ) ]; \&.\&.\&. };
dnstap { ( all | auth | client | forwarder | resolver | update ) [
( query | response ) ]; \&.\&.\&. };
dnstap\-identity ( \fIquoted_string\fR | none | hostname );
dnstap\-output ( file | unix ) \fIquoted_string\fR [ size ( unlimited |
\fIsize\fR ) ] [ versions ( unlimited | \fIinteger\fR ) ] [ suffix (
@@ -343,6 +344,8 @@ options {
memstatistics \fIboolean\fR;
memstatistics\-file \fIquoted_string\fR;
message\-compression \fIboolean\fR;
min\-cache\-ttl \fIttlval\fR;
min\-ncache\-ttl \fIttlval\fR;
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
minimal\-any \fIboolean\fR;
@@ -632,8 +635,8 @@ view \fIstring\fR [ \fIclass\fR ] {
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
response ) ]; \&.\&.\&. };
dnstap { ( all | auth | client | forwarder | resolver | update ) [
( query | response ) ]; \&.\&.\&. };
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv4_address\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv6_address\fR [ port
@@ -884,7 +887,6 @@ view \fIstring\fR [ \fIclass\fR ] {
max\-zone\-ttl ( unlimited | \fIttlval\fR );
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
mirror \fIboolean\fR;
multi\-master \fIboolean\fR;
notify ( explicit | master\-only | \fIboolean\fR );
notify\-delay \fIinteger\fR;
@@ -899,8 +901,7 @@ view \fIstring\fR [ \fIclass\fR ] {
request\-expire \fIboolean\fR;
request\-ixfr \fIboolean\fR;
serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [
port \fIinteger\fR ]; \&.\&.\&. };
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ); \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR;
@@ -911,15 +912,15 @@ view \fIstring\fR [ \fIclass\fR ] {
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port (
\fIinteger\fR | * ) ] [ dscp \fIinteger\fR ];
try\-tcp\-refresh \fIboolean\fR;
type ( primary | master | secondary | slave |
type ( primary | master | secondary | slave | mirror |
delegation\-only | forward | hint | redirect |
static\-stub | stub );
update\-check\-ksk \fIboolean\fR;
update\-policy ( local | { ( deny | grant ) \fIstring\fR (
6to4\-self | external | krb5\-self | krb5\-subdomain |
ms\-self | ms\-subdomain | name | self | selfsub |
selfwild | subdomain | tcp\-self | wildcard | zonesub )
[ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
6to4\-self | external | krb5\-self | krb5\-selfsub |
krb5\-subdomain | ms\-self | ms\-selfsub | ms\-subdomain |
name | self | selfsub | selfwild | subdomain | tcp\-self
| wildcard | zonesub ) [ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
use\-alt\-transfer\-source \fIboolean\fR;
zero\-no\-soa\-ttl \fIboolean\fR;
zone\-statistics ( full | terse | none | \fIboolean\fR );
@@ -994,7 +995,6 @@ zone \fIstring\fR [ \fIclass\fR ] {
max\-zone\-ttl ( unlimited | \fIttlval\fR );
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
mirror \fIboolean\fR;
multi\-master \fIboolean\fR;
notify ( explicit | master\-only | \fIboolean\fR );
notify\-delay \fIinteger\fR;
@@ -1007,8 +1007,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
request\-expire \fIboolean\fR;
request\-ixfr \fIboolean\fR;
serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ port
\fIinteger\fR ]; \&.\&.\&. };
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ); \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR;
@@ -1019,13 +1018,15 @@ zone \fIstring\fR [ \fIclass\fR ] {
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * )
] [ dscp \fIinteger\fR ];
try\-tcp\-refresh \fIboolean\fR;
type ( primary | master | secondary | slave | delegation\-only |
forward | hint | redirect | static\-stub | stub );
type ( primary | master | secondary | slave | mirror |
delegation\-only | forward | hint | redirect | static\-stub |
stub );
update\-check\-ksk \fIboolean\fR;
update\-policy ( local | { ( deny | grant ) \fIstring\fR ( 6to4\-self |
external | krb5\-self | krb5\-subdomain | ms\-self | ms\-subdomain
| name | self | selfsub | selfwild | subdomain | tcp\-self |
wildcard | zonesub ) [ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
external | krb5\-self | krb5\-selfsub | krb5\-subdomain | ms\-self
| ms\-selfsub | ms\-subdomain | name | self | selfsub | selfwild
| subdomain | tcp\-self | wildcard | zonesub ) [ \fIstring\fR ]
\fIrrtypelist\fR; \&.\&.\&. };
use\-alt\-transfer\-source \fIboolean\fR;
zero\-no\-soa\-ttl \fIboolean\fR;
zone\-statistics ( full | terse | none | \fIboolean\fR );
+9 -12
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info>
<date>2018-09-04</date>
<date>2018-10-23</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -337,11 +337,12 @@ options {
memstatistics <replaceable>boolean</replaceable>;
memstatistics-file <replaceable>quoted_string</replaceable>;
message-compression <replaceable>boolean</replaceable>;
min-cache-ttl <replaceable>ttlval</replaceable>;
min-ncache-ttl <replaceable>ttlval</replaceable>;
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>;
minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> );
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>;
new-zones-directory <replaceable>quoted_string</replaceable>;
no-case-compress { <replaceable>address_match_element</replaceable>; ... };
@@ -673,7 +674,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>;
minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> );
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>;
new-zones-directory <replaceable>quoted_string</replaceable>;
no-case-compress { <replaceable>address_match_element</replaceable>; ... };
@@ -864,7 +864,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>;
notify ( explicit | master-only | <replaceable>boolean</replaceable> );
notify-delay <replaceable>integer</replaceable>;
@@ -879,8 +878,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
request-expire <replaceable>boolean</replaceable>;
request-ixfr <replaceable>boolean</replaceable>;
serial-update-method ( date | increment | unixtime );
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [
port <replaceable>integer</replaceable> ]; ... };
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ); ... };
server-names { <replaceable>string</replaceable>; ... };
sig-signing-nodes <replaceable>integer</replaceable>;
sig-signing-signatures <replaceable>integer</replaceable>;
@@ -891,7 +889,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port (
<replaceable>integer</replaceable> | * ) ] [ dscp <replaceable>integer</replaceable> ];
try-tcp-refresh <replaceable>boolean</replaceable>;
type ( primary | master | secondary | slave |
type ( primary | master | secondary | slave | mirror |
delegation-only | forward | hint | redirect |
static-stub | stub );
update-check-ksk <replaceable>boolean</replaceable>;
@@ -970,7 +968,6 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>;
notify ( explicit | master-only | <replaceable>boolean</replaceable> );
notify-delay <replaceable>integer</replaceable>;
@@ -983,8 +980,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
request-expire <replaceable>boolean</replaceable>;
request-ixfr <replaceable>boolean</replaceable>;
serial-update-method ( date | increment | unixtime );
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [ port
<replaceable>integer</replaceable> ]; ... };
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ); ... };
server-names { <replaceable>string</replaceable>; ... };
sig-signing-nodes <replaceable>integer</replaceable>;
sig-signing-signatures <replaceable>integer</replaceable>;
@@ -995,8 +991,9 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * )
] [ dscp <replaceable>integer</replaceable> ];
try-tcp-refresh <replaceable>boolean</replaceable>;
type ( primary | master | secondary | slave | delegation-only |
forward | hint | redirect | static-stub | stub );
type ( primary | master | secondary | slave | mirror |
delegation-only | forward | hint | redirect | static-stub |
stub );
update-check-ksk <replaceable>boolean</replaceable>;
update-policy ( local | { ( deny | grant ) <replaceable>string</replaceable> ( 6to4-self |
external | krb5-self | krb5-selfsub | krb5-subdomain | ms-self
+21 -20
View File
@@ -180,6 +180,7 @@ options
    ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
alt-transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> |<br>
    * ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
answer-cookie <em class="replaceable"><code>boolean</code></em>;<br>
attach-cache <em class="replaceable"><code>string</code></em>;<br>
auth-nxdomain <em class="replaceable"><code>boolean</code></em>; // default changed<br>
auto-dnssec ( allow | maintain | off );<br>
@@ -245,8 +246,8 @@ options
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
    response ) ]; ... };<br>
dnstap { ( all | auth | client | forwarder | resolver | update ) [<br>
    ( query | response ) ]; ... };<br>
dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none | hostname );<br>
dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [ size ( unlimited |<br>
    <em class="replaceable"><code>size</code></em> ) ] [ versions ( unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix (<br>
@@ -324,6 +325,8 @@ options
memstatistics <em class="replaceable"><code>boolean</code></em>;<br>
memstatistics-file <em class="replaceable"><code>quoted_string</code></em>;<br>
message-compression <em class="replaceable"><code>boolean</code></em>;<br>
min-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
minimal-any <em class="replaceable"><code>boolean</code></em>;<br>
@@ -601,8 +604,8 @@ view
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
    response ) ]; ... };<br>
dnstap { ( all | auth | client | forwarder | resolver | update ) [<br>
    ( query | response ) ]; ... };<br>
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port<br>
@@ -853,7 +856,6 @@ view
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
mirror <em class="replaceable"><code>boolean</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br>
notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br>
notify-delay <em class="replaceable"><code>integer</code></em>;<br>
@@ -868,8 +870,7 @@ view
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [<br>
    port <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ); ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
@@ -880,15 +881,15 @@ view
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port (<br>
    <em class="replaceable"><code>integer</code></em> | * ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
try-tcp-refresh <em class="replaceable"><code>boolean</code></em>;<br>
type ( primary | master | secondary | slave |<br>
type ( primary | master | secondary | slave | mirror |<br>
    delegation-only | forward | hint | redirect |<br>
    static-stub | stub );<br>
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
update-policy ( local | { ( deny | grant ) <em class="replaceable"><code>string</code></em> (<br>
    6to4-self | external | krb5-self | krb5-subdomain |<br>
    ms-self | ms-subdomain | name | self | selfsub |<br>
    selfwild | subdomain | tcp-self | wildcard | zonesub )<br>
    [ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
    6to4-self | external | krb5-self | krb5-selfsub |<br>
    krb5-subdomain | ms-self | ms-selfsub | ms-subdomain |<br>
    name | self | selfsub | selfwild | subdomain | tcp-self<br>
    | wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zone-statistics ( full | terse | none | <em class="replaceable"><code>boolean</code></em> );<br>
@@ -960,7 +961,6 @@ zone
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
mirror <em class="replaceable"><code>boolean</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br>
notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br>
notify-delay <em class="replaceable"><code>integer</code></em>;<br>
@@ -973,8 +973,7 @@ zone
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [ port<br>
    <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ); ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
@@ -985,13 +984,15 @@ zone
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * )<br>
    ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
try-tcp-refresh <em class="replaceable"><code>boolean</code></em>;<br>
type ( primary | master | secondary | slave | delegation-only |<br>
    forward | hint | redirect | static-stub | stub );<br>
type ( primary | master | secondary | slave | mirror |<br>
    delegation-only | forward | hint | redirect | static-stub |<br>
    stub );<br>
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
update-policy ( local | { ( deny | grant ) <em class="replaceable"><code>string</code></em> ( 6to4-self |<br>
    external | krb5-self | krb5-subdomain | ms-self | ms-subdomain<br>
    | name | self | selfsub | selfwild | subdomain | tcp-self |<br>
    wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
    external | krb5-self | krb5-selfsub | krb5-subdomain | ms-self<br>
    | ms-selfsub | ms-subdomain | name | self | selfsub | selfwild<br>
    | subdomain | tcp-self | wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ]<br>
    <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zone-statistics ( full | terse | none | <em class="replaceable"><code>boolean</code></em> );<br>
+242 -93
View File
@@ -30,7 +30,7 @@
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/hex.h>
#include <isc/hmacsha.h>
#include <isc/hmac.h>
#include <isc/httpd.h>
#include <isc/lex.h>
#include <isc/meminfo.h>
@@ -41,7 +41,6 @@
#include <isc/print.h>
#include <isc/refcount.h>
#include <isc/resource.h>
#include <isc/sha2.h>
#include <isc/socket.h>
#include <isc/stat.h>
#include <isc/stats.h>
@@ -306,6 +305,13 @@ typedef struct catz_chgzone_event {
bool mod;
} catz_chgzone_event_t;
typedef struct {
unsigned int magic;
#define DZARG_MAGIC ISC_MAGIC('D', 'z', 'a', 'r')
isc_buffer_t **text;
isc_result_t result;
} ns_dzarg_t;
/*
* These zones should not leak onto the Internet.
*/
@@ -1146,6 +1152,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
sa = *(cfg_obj_assockaddr(obj));
@@ -1167,6 +1174,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (result != ISC_R_SUCCESS)
return (ISC_R_SUCCESS);
@@ -1274,20 +1282,22 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
obj = cfg_tuple_get(ent, "ordering");
INSIST(cfg_obj_isstring(obj));
str = cfg_obj_asstring(obj);
if (!strcasecmp(str, "fixed"))
if (!strcasecmp(str, "fixed")) {
#if DNS_RDATASET_FIXED
mode = DNS_RDATASETATTR_FIXEDORDER;
#else
mode = DNS_RDATASETATTR_CYCLIC;
#endif /* DNS_RDATASET_FIXED */
else if (!strcasecmp(str, "random"))
} else if (!strcasecmp(str, "random")) {
mode = DNS_RDATASETATTR_RANDOMIZE;
else if (!strcasecmp(str, "cyclic"))
} else if (!strcasecmp(str, "cyclic")) {
mode = DNS_RDATASETATTR_CYCLIC;
else if (!strcasecmp(str, "none"))
} else if (!strcasecmp(str, "none")) {
mode = DNS_RDATASETATTR_NONE;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/*
* "*" should match everything including the root (BIND 8 compat).
@@ -1419,14 +1429,16 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
(void)cfg_map_get(cpeer, "transfer-format", &obj);
if (obj != NULL) {
str = cfg_obj_asstring(obj);
if (strcasecmp(str, "many-answers") == 0)
if (strcasecmp(str, "many-answers") == 0) {
CHECK(dns_peer_settransferformat(peer,
dns_many_answers));
else if (strcasecmp(str, "one-answer") == 0)
} else if (strcasecmp(str, "one-answer") == 0) {
CHECK(dns_peer_settransferformat(peer,
dns_one_answer));
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@@ -2719,7 +2731,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
catz_chgzone_event_t *event;
isc_task_t *task;
isc_result_t result;
isc_taskaction_t action;
isc_taskaction_t action = NULL;
switch (type) {
case DNS_EVENT_CATZADDZONE:
@@ -3944,8 +3956,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->checknames = false;
} else if (strcasecmp(str, "ignore") == 0) {
view->checknames = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
result = named_config_get(maps, "zero-no-soa-ttl-cache", &obj);
@@ -4110,8 +4124,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
result = named_config_get(maps, "max-ncache-ttl", &obj);
INSIST(result == ISC_R_SUCCESS);
view->maxncachettl = cfg_obj_asuint32(obj);
if (view->maxncachettl > 7 * 24 * 3600)
view->maxncachettl = 7 * 24 * 3600;
obj = NULL;
result = named_config_get(maps, "min-cache-ttl", &obj);
INSIST(result == ISC_R_SUCCESS);
view->mincachettl = cfg_obj_asuint32(obj);
obj = NULL;
result = named_config_get(maps, "min-ncache-ttl", &obj);
INSIST(result == ISC_R_SUCCESS);
view->minncachettl = cfg_obj_asuint32(obj);
obj = NULL;
result = named_config_get(maps, "synth-from-dnssec", &obj);
@@ -4357,14 +4379,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
obj2 = cfg_tuple_get(obj, "response");
if (!cfg_obj_isvoid(obj2)) {
const char *resp = cfg_obj_asstring(obj2);
isc_result_t r;
isc_result_t r = DNS_R_SERVFAIL;
if (strcasecmp(resp, "drop") == 0)
if (strcasecmp(resp, "drop") == 0) {
r = DNS_R_DROP;
else if (strcasecmp(resp, "fail") == 0)
} else if (strcasecmp(resp, "fail") == 0) {
r = DNS_R_SERVFAIL;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_resolver_setquotaresponse(view->resolver,
dns_quotatype_server, r);
@@ -4710,20 +4734,24 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->minimalresponses = dns_minimal_noauth;
} else if (strcasecmp(str, "no-auth-recursive") == 0) {
view->minimalresponses = dns_minimal_noauthrec;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
result = named_config_get(maps, "transfer-format", &obj);
INSIST(result == ISC_R_SUCCESS);
str = cfg_obj_asstring(obj);
if (strcasecmp(str, "many-answers") == 0)
if (strcasecmp(str, "many-answers") == 0) {
view->transfer_format = dns_many_answers;
else if (strcasecmp(str, "one-answer") == 0)
} else if (strcasecmp(str, "one-answer") == 0) {
view->transfer_format = dns_one_answer;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
result = named_config_get(maps, "trust-anchor-telemetry", &obj);
@@ -5037,14 +5065,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
obj2 = cfg_tuple_get(obj, "response");
if (!cfg_obj_isvoid(obj2)) {
const char *resp = cfg_obj_asstring(obj2);
isc_result_t r;
isc_result_t r = DNS_R_SERVFAIL;
if (strcasecmp(resp, "drop") == 0)
if (strcasecmp(resp, "drop") == 0) {
r = DNS_R_DROP;
else if (strcasecmp(resp, "fail") == 0)
} else if (strcasecmp(resp, "fail") == 0) {
r = DNS_R_SERVFAIL;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_resolver_setquotaresponse(view->resolver,
dns_quotatype_zone, r);
@@ -5060,10 +5090,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->v4_aaaa = dns_aaaa_ok;
} else {
const char *v4_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0)
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0) {
view->v4_aaaa = dns_aaaa_break_dnssec;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@@ -5076,10 +5108,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->v6_aaaa = dns_aaaa_ok;
} else {
const char *v6_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0)
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0) {
view->v6_aaaa = dns_aaaa_break_dnssec;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
CHECK(configure_view_acl(vconfig, config, named_g_config,
@@ -5282,7 +5316,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
const char *empty_dbtype[4] =
{ "_builtin", "empty", NULL, NULL };
int empty_dbtypec = 4;
dns_zonestat_level_t statlevel;
dns_zonestat_level_t statlevel = dns_zonestat_none;
name = dns_fixedname_initname(&fixed);
@@ -5320,14 +5354,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
statlevel = dns_zonestat_none;
} else {
const char *levelstr = cfg_obj_asstring(obj);
if (strcasecmp(levelstr, "full") == 0)
if (strcasecmp(levelstr, "full") == 0) {
statlevel = dns_zonestat_full;
else if (strcasecmp(levelstr, "terse") == 0)
} else if (strcasecmp(levelstr, "terse") == 0) {
statlevel = dns_zonestat_terse;
else if (strcasecmp(levelstr, "none") == 0)
} else if (strcasecmp(levelstr, "none") == 0) {
statlevel = dns_zonestat_none;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
for (empty = empty_zones[empty_zone];
@@ -5687,16 +5723,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
"forwarding");
fwdpolicy = dns_fwdpolicy_none;
} else {
if (forwardtype == NULL)
if (forwardtype == NULL) {
fwdpolicy = dns_fwdpolicy_first;
else {
} else {
const char *forwardstr = cfg_obj_asstring(forwardtype);
if (strcasecmp(forwardstr, "first") == 0)
if (strcasecmp(forwardstr, "first") == 0) {
fwdpolicy = dns_fwdpolicy_first;
else if (strcasecmp(forwardstr, "only") == 0)
} else if (strcasecmp(forwardstr, "only") == 0) {
fwdpolicy = dns_fwdpolicy_only;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
}
@@ -6978,6 +7016,9 @@ removed(dns_zone_t *zone, void *uap) {
case dns_zone_slave:
type = "slave";
break;
case dns_zone_mirror:
type = "mirror";
break;
case dns_zone_stub:
type = "stub";
break;
@@ -7575,11 +7616,11 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data,
goto cleanup;
}
putstr(text, "zone ");
putmem(text, (const void *) zone_name, zone_name_len);
putstr(text, " ");
putmem(text, (const void *) zone_config, zone_config_len);
putstr(text, ";\n");
CHECK(putstr(text, "zone "));
CHECK(putmem(text, (const void *) zone_name, zone_name_len));
CHECK(putstr(text, " "));
CHECK(putmem(text, (const void *) zone_config, zone_config_len));
CHECK(putstr(text, ";\n"));
cfg_parser_reset(named_g_addparser);
result = cfg_parse_buffer3(named_g_addparser, *text, zone_name, 0,
@@ -8904,7 +8945,7 @@ load_configuration(const char *filename, named_server_t *server,
named_g_memstatistics = cfg_obj_asboolean(obj);
} else {
named_g_memstatistics =
(isc_mem_debugging & ISC_MEM_DEBUGRECORD);
((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0);
}
obj = NULL;
@@ -8999,6 +9040,7 @@ load_configuration(const char *filename, named_server_t *server,
server->sctx->cookiealg = ns_cookiealg_sha256;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
obj = NULL;
@@ -9008,6 +9050,7 @@ load_configuration(const char *filename, named_server_t *server,
bool first = true;
isc_buffer_t b;
unsigned int usedlength;
unsigned int expectedlength;
for (element = cfg_list_first(obj);
element != NULL;
@@ -9053,21 +9096,26 @@ load_configuration(const char *filename, named_server_t *server,
usedlength = isc_buffer_usedlength(&b);
switch (server->sctx->cookiealg) {
case ns_cookiealg_aes:
if (usedlength != ISC_AES128_KEYLENGTH) {
expectedlength = ISC_AES128_KEYLENGTH;
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"AES cookie-secret must be "
"128 bits");
}
break;
case ns_cookiealg_sha1:
if (usedlength != ISC_SHA1_DIGESTLENGTH) {
expectedlength =
isc_md_type_get_size(ISC_MD_SHA1);
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"SHA1 cookie-secret must be "
"160 bits");
}
break;
case ns_cookiealg_sha256:
if (usedlength != ISC_SHA256_DIGESTLENGTH) {
expectedlength =
isc_md_type_get_size(ISC_MD_SHA256);
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"SHA256 cookie-secret must be "
"256 bits");
@@ -9303,7 +9351,11 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
* zones.
*/
isc_refcount_increment(&zl->refs);
CHECK(dns_view_asyncload(view, reconfig, view_loaded, zl));
result = dns_view_asyncload(view, reconfig, view_loaded, zl);
if (result != ISC_R_SUCCESS) {
isc_refcount_decrement(&zl->refs);
goto cleanup;
}
}
cleanup:
@@ -9319,8 +9371,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
* the initial server setup; it isn't necessary during
* a reload.)
*/
isc_taskmgr_setmode(named_g_taskmgr,
isc_taskmgrmode_privileged);
isc_taskmgr_setprivilegedmode(named_g_taskmgr);
}
isc_task_endexclusive(server->task);
@@ -9568,8 +9619,8 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
&server->in_roothints),
"setting up root hints");
CHECKFATAL(isc_mutex_init(&server->reload_event_lock),
"initializing reload event lock");
isc_mutex_init(&server->reload_event_lock);
server->reload_event =
isc_event_allocate(named_g_mctx, server,
NAMED_EVENT_RELOAD,
@@ -9913,7 +9964,7 @@ static void
named_server_reload(isc_task_t *task, isc_event_t *event) {
named_server_t *server = (named_server_t *)event->ev_arg;
INSIST(task = server->task);
INSIST(task == server->task);
UNUSED(task);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -10162,7 +10213,8 @@ named_server_retransfercommand(named_server_t *server, isc_lex_t *lex,
dns_zone_detach(&raw);
}
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_stub ||
if (type == dns_zone_slave || type == dns_zone_mirror ||
type == dns_zone_stub ||
(type == dns_zone_redirect &&
dns_zone_getredirecttype(zone) == dns_zone_slave))
dns_zone_forcereload(zone);
@@ -10194,7 +10246,9 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
msg = "server reload successful";
} else {
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_stub) {
if (type == dns_zone_slave || type == dns_zone_mirror ||
type == dns_zone_stub)
{
dns_zone_refresh(zone);
dns_zone_detach(&zone);
msg = "zone refresh queued";
@@ -10285,7 +10339,7 @@ named_server_refreshcommand(named_server_t *server, isc_lex_t *lex,
isc_result_t result;
dns_zone_t *zone = NULL, *raw = NULL;
const char msg1[] = "zone refresh queued";
const char msg2[] = "not a slave or stub zone";
const char msg2[] = "not a slave, mirror, or stub zone";
dns_zonetype_t type;
result = zone_from_args(server, lex, NULL, &zone, NULL,
@@ -10303,7 +10357,9 @@ named_server_refreshcommand(named_server_t *server, isc_lex_t *lex,
}
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_stub) {
if (type == dns_zone_slave || type == dns_zone_mirror ||
type == dns_zone_stub)
{
dns_zone_refresh(zone);
dns_zone_detach(&zone);
(void) putstr(text, msg1);
@@ -10778,10 +10834,10 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
}
if (ptr != NULL) {
if (!found) {
putstr(text, "view '");
putstr(text, ptr);
putstr(text, "' not found");
putnull(text);
CHECK(putstr(text, "view '"));
CHECK(putstr(text, ptr));
CHECK(putstr(text, "' not found"));
CHECK(putnull(text));
result = ISC_R_NOTFOUND;
dumpdone(dctx, result);
return (result);
@@ -10864,7 +10920,7 @@ named_server_dumpsecroots(named_server_t *server, isc_lex_t *lex,
continue;
}
CHECK(putstr(text, "\n Negative trust anchors:\n\n"));
CHECK(dns_ntatable_totext(ntatable, text));
CHECK(dns_ntatable_totext(ntatable, NULL, text));
}
if (ptr != NULL)
ptr = next_token(lex, text);
@@ -12069,9 +12125,15 @@ nzd_setkey(MDB_val *key, dns_name_t *name, char *namebuf, size_t buflen) {
static void
dumpzone(void *arg, const char *buf, int len) {
isc_buffer_t **text = arg;
ns_dzarg_t *dzarg = arg;
isc_result_t result;
putmem(text, buf, len);
REQUIRE(dzarg != NULL && ISC_MAGIC_VALID(dzarg, DZARG_MAGIC));
result = putmem(dzarg->text, buf, len);
if (result != ISC_R_SUCCESS && dzarg->result == ISC_R_SUCCESS) {
dzarg->result = result;
}
}
static isc_result_t
@@ -12085,6 +12147,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
isc_buffer_t *text = NULL;
char namebuf[1024];
MDB_val key, data;
ns_dzarg_t dzarg;
view = dns_zone_getview(zone);
@@ -12136,7 +12199,21 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
goto cleanup;
}
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &text);
dzarg.magic = DZARG_MAGIC;
dzarg.text = &text;
dzarg.result = ISC_R_SUCCESS;
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
if (dzarg.result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx,
NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
"Error writing zone config to "
"buffer in nzd_save(): %s",
isc_result_totext(result));
result = dzarg.result;
goto cleanup;
}
data.mv_data = isc_buffer_base(text);
data.mv_size = isc_buffer_usedlength(text);
@@ -12415,6 +12492,7 @@ migrate_nzf(dns_view_t *view) {
MDB_txn *txn = NULL;
MDB_dbi dbi;
MDB_val key, data;
ns_dzarg_t dzarg;
/*
* If NZF file doesn't exist, or NZD DB exists and already
@@ -12504,7 +12582,21 @@ migrate_nzf(dns_view_t *view) {
}
isc_buffer_clear(text);
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &text);
dzarg.magic = DZARG_MAGIC;
dzarg.text = &text;
dzarg.result = ISC_R_SUCCESS;
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
if (dzarg.result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx,
NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
"Error writing zone config to "
"buffer in migrate_nzf(): %s",
isc_result_totext(result));
result = dzarg.result;
goto cleanup;
}
data.mv_data = isc_buffer_base(text);
data.mv_size = isc_buffer_usedlength(text);
@@ -12574,7 +12666,7 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp,
const char *viewname = NULL;
dns_rdataclass_t rdclass;
dns_view_t *view = NULL;
const char *bn;
const char *bn = NULL;
REQUIRE(viewp != NULL && *viewp == NULL);
REQUIRE(zoneobjp != NULL && *zoneobjp == NULL);
@@ -12585,12 +12677,14 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp,
isc_buffer_init(&argbuf, command, (unsigned int) strlen(command));
isc_buffer_add(&argbuf, strlen(command));
if (strncasecmp(command, "add", 3) == 0)
if (strncasecmp(command, "add", 3) == 0) {
bn = "addzone";
else if (strncasecmp(command, "mod", 3) == 0)
} else if (strncasecmp(command, "mod", 3) == 0) {
bn = "modzone";
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
/*
* Convert the "addzone" or "modzone" to just "zone", for
@@ -13495,6 +13589,7 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
TCHECK(putstr(text, zonename));
TCHECK(putstr(text, "' and associated files will be deleted."));
} else if (dns_zone_gettype(mayberaw) == dns_zone_slave ||
dns_zone_gettype(mayberaw) == dns_zone_mirror ||
dns_zone_gettype(mayberaw) == dns_zone_stub)
{
bool first;
@@ -13605,8 +13700,14 @@ find_name_in_list_from_map(const cfg_obj_t *config,
static void
emitzone(void *arg, const char *buf, int len) {
isc_buffer_t **tpp = arg;
putmem(tpp, buf, len);
ns_dzarg_t *dzarg = arg;
isc_result_t result;
REQUIRE(dzarg != NULL && ISC_MAGIC_VALID(dzarg, DZARG_MAGIC));
result = putmem(dzarg->text, buf, len);
if (result != ISC_R_SUCCESS && dzarg->result == ISC_R_SUCCESS) {
dzarg->result = result;
}
}
/*
@@ -13628,6 +13729,7 @@ named_server_showzone(named_server_t *server, isc_lex_t *lex,
cfg_obj_t *nzconfig = NULL;
#endif /* HAVE_LMDB */
bool added, redirect;
ns_dzarg_t dzarg;
/* Parse parameters */
CHECK(zone_from_args(server, lex, NULL, &zone, zonename,
@@ -13687,9 +13789,14 @@ named_server_showzone(named_server_t *server, isc_lex_t *lex,
if (zconfig == NULL)
CHECK(ISC_R_NOTFOUND);
putstr(text, "zone ");
cfg_printx(zconfig, CFG_PRINTER_ONELINE, emitzone, text);
putstr(text, ";");
CHECK(putstr(text, "zone "));
dzarg.magic = DZARG_MAGIC;
dzarg.text = text;
dzarg.result = ISC_R_SUCCESS;
cfg_printx(zconfig, CFG_PRINTER_ONELINE, emitzone, &dzarg);
CHECK(dzarg.result);
CHECK(putstr(text, ";"));
result = ISC_R_SUCCESS;
@@ -14037,7 +14144,10 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
type = "master";
break;
case dns_zone_slave:
type = dns_zone_ismirror(zone) ? "mirror" : "slave";
type = "slave";
break;
case dns_zone_mirror:
type = "mirror";
break;
case dns_zone_stub:
type = "stub";
@@ -14080,8 +14190,8 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
/* Security */
secure = dns_db_issecure(db);
allow = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW);
maintain = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN);
allow = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW) != 0);
maintain = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN) != 0);
/* Master files */
file = dns_zone_getfile(mayberaw);
@@ -14093,6 +14203,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
/* Refresh/expire times */
if (zonetype == dns_zone_slave ||
zonetype == dns_zone_mirror ||
zonetype == dns_zone_stub ||
zonetype == dns_zone_redirect)
{
@@ -14296,6 +14407,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
isc_result_t result = ISC_R_SUCCESS;
char *ptr, *nametext = NULL, *viewname;
char namebuf[DNS_NAME_FORMATSIZE];
char viewbuf[DNS_NAME_FORMATSIZE];
isc_stdtime_t now, when;
isc_time_t t;
char tbuf[64];
@@ -14305,8 +14417,9 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
const dns_name_t *ntaname;
dns_name_t *fname;
dns_ttl_t ntattl;
bool ttlset = false, excl = false;
bool ttlset = false, excl = false, viewfound = false;
dns_rdataclass_t rdclass = dns_rdataclass_in;
bool first = true;
UNUSED(force);
@@ -14319,13 +14432,16 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
}
for (;;) {
/* Check for options */
ptr = next_token(lex, text);
if (ptr == NULL) {
return (ISC_R_UNEXPECTEDEND);
}
if (argcheck(ptr, "dump")) {
if (strcmp(ptr, "--") == 0) {
break;
} else if (argcheck(ptr, "dump")) {
dump = true;
} else if (argcheck(ptr, "remove")) {
ntattl = 0;
@@ -14370,6 +14486,9 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
tr.length = strlen(ptr);
CHECK(dns_rdataclass_fromtext(&rdclass, &tr));
continue;
} else if (ptr[0] == '-') {
msg = "Unknown option";
CHECK(DNS_R_SYNTAX);
} else {
nametext = ptr;
}
@@ -14392,7 +14511,8 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
if (result == ISC_R_NOTFOUND) {
continue;
}
CHECK(dns_ntatable_totext(ntatable, text));
CHECK(dns_ntatable_totext(ntatable, view->name, text));
}
CHECK(putnull(text));
@@ -14407,7 +14527,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
CHECK(ISC_R_FAILURE);
}
/* Get the NTA name. */
/* Get the NTA name if not found above. */
if (nametext == NULL) {
nametext = next_token(lex, text);
}
@@ -14430,6 +14550,14 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
/* Look for the view name. */
viewname = next_token(lex, text);
if (viewname != NULL) {
strlcpy(viewbuf, viewname, DNS_NAME_FORMATSIZE);
viewname = viewbuf;
}
if (next_token(lex, text) != NULL) {
CHECK(DNS_R_SYNTAX);
}
isc_stdtime_get(&now);
@@ -14440,11 +14568,10 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
view != NULL;
view = ISC_LIST_NEXT(view, link))
{
static bool first = true;
if (viewname != NULL && strcmp(view->name, viewname) != 0) {
continue;
}
viewfound = true;
if (view->rdclass != rdclass && rdclass != dns_rdataclass_any) {
continue;
@@ -14500,22 +14627,37 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
"added NTA '%s' (%d sec) in view '%s'",
namebuf, ntattl, view->name);
} else {
CHECK(dns_ntatable_delete(ntatable, ntaname));
bool removed;
result = dns_ntatable_delete(ntatable, ntaname);
if (result == ISC_R_SUCCESS) {
removed = true;
} else if (result == ISC_R_NOTFOUND) {
removed = false;
} else {
goto cleanup;
}
if (!first) {
CHECK(putstr(text, "\n"));
}
first = false;
CHECK(putstr(text, "Negative trust anchor removed: "));
CHECK(putstr(text, "Negative trust anchor "));
CHECK(putstr(text, removed ? "removed: "
: "not found: "));
CHECK(putstr(text, namebuf));
CHECK(putstr(text, "/"));
CHECK(putstr(text, view->name));
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"removed NTA '%s' in view %s",
namebuf, view->name);
if (removed) {
isc_log_write(named_g_lctx,
NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER,
ISC_LOG_INFO,
"removed NTA '%s' in view %s",
namebuf, view->name);
}
}
result = dns_view_saventa(view);
@@ -14528,6 +14670,11 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
}
}
if (!viewfound) {
msg = "No such view";
CHECK(ISC_R_NOTFOUND);
}
CHECK(putnull(text));
cleanup:
@@ -14535,6 +14682,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
(void) putstr(text, msg);
(void) putnull(text);
}
if (excl) {
isc_task_endexclusive(server->task);
}
@@ -14741,7 +14889,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
snprintf(buf, sizeof(buf), "\n\talgorithm: %s", alg);
CHECK(putstr(text, buf));
revoked = (kd.flags & DNS_KEYFLAG_REVOKE);
revoked = ((kd.flags & DNS_KEYFLAG_REVOKE) != 0);
snprintf(buf, sizeof(buf), "\n\tflags:%s%s%s",
revoked ? " REVOKE" : "",
((kd.flags & DNS_KEYFLAG_KSK) != 0)
@@ -14931,6 +15079,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (viewtxt != NULL) {
+4 -7
View File
@@ -94,6 +94,7 @@ user_zonetype( dns_zone_t *zone ) {
{ dns_zone_none, "none" },
{ dns_zone_master, "master" },
{ dns_zone_slave, "slave" },
{ dns_zone_mirror, "mirror" },
{ dns_zone_stub, "stub" },
{ dns_zone_staticstub, "static-stub" },
{ dns_zone_key, "key" },
@@ -3225,7 +3226,7 @@ destroy_listener(void *arg) {
/* We don't have to acquire the lock here since it's already unlinked */
dns_acl_detach(&listener->acl);
DESTROYLOCK(&listener->lock);
isc_mutex_destroy(&listener->lock);
isc_mem_putanddetach(&listener->mctx, listener, sizeof(*listener));
}
@@ -3252,11 +3253,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
listener->mctx = NULL;
ISC_LINK_INIT(listener, link);
result = isc_mutex_init(&listener->lock);
if (result != ISC_R_SUCCESS) {
isc_mem_put(server->mctx, listener, sizeof(*listener));
return (ISC_R_FAILURE);
}
isc_mutex_init(&listener->lock);
isc_mem_attach(server->mctx, &listener->mctx);
@@ -3351,7 +3348,7 @@ cleanup:
if (result != ISC_R_SUCCESS) {
if (listener->acl != NULL)
dns_acl_detach(&listener->acl);
DESTROYLOCK(&listener->lock);
isc_mutex_destroy(&listener->lock);
isc_mem_putanddetach(&listener->mctx, listener,
sizeof(*listener));
}
+17 -12
View File
@@ -252,9 +252,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
}
/* Initialize the lock */
result = isc_mutex_init(&cd->lock);
if (result != ISC_R_SUCCESS)
goto failed;
isc_mutex_init(&cd->lock);
/* Open the library */
dlopen_flags = RTLD_NOW|RTLD_GLOBAL;
@@ -364,15 +362,19 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
failed:
dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname);
if (cd->dl_path != NULL)
if (cd->dl_path != NULL) {
isc_mem_free(mctx, cd->dl_path);
if (cd->dlzname != NULL)
}
if (cd->dlzname != NULL) {
isc_mem_free(mctx, cd->dlzname);
if (dlopen_flags != 0)
(void) isc_mutex_destroy(&cd->lock);
}
if (dlopen_flags != 0) {
isc_mutex_destroy(&cd->lock);
}
#ifdef HAVE_DLCLOSE
if (cd->dl_handle)
if (cd->dl_handle) {
dlclose(cd->dl_handle);
}
#endif
isc_mem_put(mctx, cd, sizeof(*cd));
isc_mem_destroy(&mctx);
@@ -395,17 +397,20 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
MAYBE_UNLOCK(cd);
}
if (cd->dl_path)
if (cd->dl_path) {
isc_mem_free(cd->mctx, cd->dl_path);
if (cd->dlzname)
}
if (cd->dlzname) {
isc_mem_free(cd->mctx, cd->dlzname);
}
#ifdef HAVE_DLCLOSE
if (cd->dl_handle)
if (cd->dl_handle) {
dlclose(cd->dl_handle);
}
#endif
(void) isc_mutex_destroy(&cd->lock);
isc_mutex_destroy(&cd->lock);
mctx = cd->mctx;
isc_mem_put(mctx, cd, sizeof(*cd));
+12 -10
View File
@@ -253,9 +253,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
triedload = true;
/* Initialize the lock */
result = isc_mutex_init(&cd->lock);
if (result != ISC_R_SUCCESS)
goto failed;
isc_mutex_init(&cd->lock);
/* Open the library */
cd->dl_handle = LoadLibraryA(cd->dl_path);
@@ -349,17 +347,21 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_SUCCESS);
cleanup_lock:
DESTROYLOCK(&cd->lock);
isc_mutex_destroy(&cd->lock);
failed:
dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname);
if (cd->dl_path)
if (cd->dl_path) {
isc_mem_free(mctx, cd->dl_path);
if (cd->dlzname)
}
if (cd->dlzname) {
isc_mem_free(mctx, cd->dlzname);
if (triedload)
(void) isc_mutex_destroy(&cd->lock);
if (cd->dl_handle)
}
if (triedload) {
isc_mutex_destroy(&cd->lock);
}
if (cd->dl_handle) {
FreeLibrary(cd->dl_handle);
}
isc_mem_put(mctx, cd, sizeof(*cd));
isc_mem_destroy(&mctx);
return (result);
@@ -390,7 +392,7 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
if (cd->dl_handle)
FreeLibrary(cd->dl_handle);
DESTROYLOCK(&cd->lock);
isc_mutex_destroy(&cd->lock);
mctx = cd->mctx;
isc_mem_put(mctx, cd, sizeof(*cd));
+136 -87
View File
@@ -125,7 +125,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
break;
default:
INSIST(0);
return (ISC_R_FAILURE);
ISC_UNREACHABLE();
}
/* First check to see if ACL is defined within the zone */
@@ -231,12 +231,14 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
unsigned int i, n;
str = cfg_obj_asstring(mode);
if (strcasecmp(str, "grant") == 0)
if (strcasecmp(str, "grant") == 0) {
grant = true;
else if (strcasecmp(str, "deny") == 0)
} else if (strcasecmp(str, "deny") == 0) {
grant = false;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
str = cfg_obj_asstring(matchtype);
CHECK(dns_ssu_mtypefromstring(str, &mtype));
@@ -755,10 +757,16 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
isc_result_t result;
switch (ztype) {
case dns_zone_slave: zone = "slave"; break;
case dns_zone_master: zone = "master"; break;
case dns_zone_slave:
case dns_zone_mirror:
zone = "slave";
break;
case dns_zone_master:
zone = "master";
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
result = named_checknames_get(maps, zone, objp);
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
@@ -828,6 +836,37 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
return (view == myview);
}
/*%
* For mirror zones, change "notify yes;" to "notify explicit;", informing the
* user only if "notify" was explicitly configured rather than inherited from
* default configuration.
*/
static dns_notifytype_t
process_notifytype(dns_notifytype_t ntype, dns_zonetype_t ztype,
const char *zname, const cfg_obj_t **maps)
{
const cfg_obj_t *obj = NULL;
/*
* Return the original setting if this is not a mirror zone or if the
* zone is configured with something else than "notify yes;".
*/
if (ztype != dns_zone_mirror || ntype != dns_notifytype_yes) {
return (ntype);
}
/*
* Only log a message if "notify" was set in the configuration
* hierarchy supplied in 'maps'.
*/
if (named_config_get(maps, "notify", &obj) == ISC_R_SUCCESS) {
cfg_obj_log(obj, named_g_lctx, ISC_LOG_INFO,
"'notify explicit;' will be used for mirror zone "
"'%s'", zname);
}
return (dns_notifytype_explicit);
}
isc_result_t
named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
@@ -867,7 +906,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const dns_master_style_t *masterstyle = &dns_master_style_default;
isc_stats_t *zoneqrystats;
dns_stats_t *rcvquerystats;
dns_zonestat_level_t statlevel;
dns_zonestat_level_t statlevel = dns_zonestat_none;
int seconds;
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
isc_dscp_t dscp;
@@ -982,7 +1021,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
return (ISC_R_FAILURE);
}
if (ztype == dns_zone_slave)
if (ztype == dns_zone_slave || ztype == dns_zone_mirror)
masterformat = dns_masterformat_raw;
else
masterformat = dns_masterformat_text;
@@ -991,14 +1030,16 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
if (result == ISC_R_SUCCESS) {
const char *masterformatstr = cfg_obj_asstring(obj);
if (strcasecmp(masterformatstr, "text") == 0)
if (strcasecmp(masterformatstr, "text") == 0) {
masterformat = dns_masterformat_text;
else if (strcasecmp(masterformatstr, "raw") == 0)
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
else if (strcasecmp(masterformatstr, "map") == 0)
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@@ -1014,12 +1055,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
return (ISC_R_FAILURE);
}
if (strcasecmp(masterstylestr, "full") == 0)
if (strcasecmp(masterstylestr, "full") == 0) {
masterstyle = &dns_master_style_full;
else if (strcasecmp(masterstylestr, "relative") == 0)
} else if (strcasecmp(masterstylestr, "relative") == 0) {
masterstyle = &dns_master_style_default;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@@ -1076,7 +1119,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
/*
* Notify messages are processed by the raw zone if it exists.
*/
if (ztype == dns_zone_slave)
if (ztype == dns_zone_slave || ztype == dns_zone_mirror)
RETERR(configure_zone_acl(zconfig, vconfig, config,
allow_notify, ac, mayberaw,
dns_zone_setnotifyacl,
@@ -1105,16 +1148,18 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
dialup = dns_dialuptype_no;
} else {
const char *dialupstr = cfg_obj_asstring(obj);
if (strcasecmp(dialupstr, "notify") == 0)
if (strcasecmp(dialupstr, "notify") == 0) {
dialup = dns_dialuptype_notify;
else if (strcasecmp(dialupstr, "notify-passive") == 0)
} else if (strcasecmp(dialupstr, "notify-passive") == 0) {
dialup = dns_dialuptype_notifypassive;
else if (strcasecmp(dialupstr, "refresh") == 0)
} else if (strcasecmp(dialupstr, "refresh") == 0) {
dialup = dns_dialuptype_refresh;
else if (strcasecmp(dialupstr, "passive") == 0)
} else if (strcasecmp(dialupstr, "passive") == 0) {
dialup = dns_dialuptype_passive;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
if (raw != NULL)
dns_zone_setdialup(raw, dialup);
@@ -1130,14 +1175,16 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
statlevel = dns_zonestat_none;
} else {
const char *levelstr = cfg_obj_asstring(obj);
if (strcasecmp(levelstr, "full") == 0)
if (strcasecmp(levelstr, "full") == 0) {
statlevel = dns_zonestat_full;
else if (strcasecmp(levelstr, "terse") == 0)
} else if (strcasecmp(levelstr, "terse") == 0) {
statlevel = dns_zonestat_terse;
else if (strcasecmp(levelstr, "none") == 0)
} else if (strcasecmp(levelstr, "none") == 0) {
statlevel = dns_zonestat_none;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
dns_zone_setstatlevel(zone, statlevel);
@@ -1175,13 +1222,17 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
notifytype = dns_notifytype_no;
} else {
const char *notifystr = cfg_obj_asstring(obj);
if (strcasecmp(notifystr, "explicit") == 0)
if (strcasecmp(notifystr, "explicit") == 0) {
notifytype = dns_notifytype_explicit;
else if (strcasecmp(notifystr, "master-only") == 0)
} else if (strcasecmp(notifystr, "master-only") == 0) {
notifytype = dns_notifytype_masteronly;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
notifytype = process_notifytype(notifytype, ztype, zname,
nodefault);
if (raw != NULL)
dns_zone_setnotifytype(raw, dns_notifytype_no);
dns_zone_setnotifytype(zone, notifytype);
@@ -1336,8 +1387,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
if (raw != NULL) {
dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES,
check);
@@ -1372,8 +1425,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
obj = NULL;
@@ -1524,20 +1579,22 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = cfg_map_get(zoptions, "auto-dnssec", &obj);
if (result == ISC_R_SUCCESS) {
const char *arg = cfg_obj_asstring(obj);
if (strcasecmp(arg, "allow") == 0)
if (strcasecmp(arg, "allow") == 0) {
allow = true;
else if (strcasecmp(arg, "maintain") == 0)
} else if (strcasecmp(arg, "maintain") == 0) {
allow = maint = true;
else if (strcasecmp(arg, "off") == 0)
} else if (strcasecmp(arg, "off") == 0) {
;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
}
}
if (ztype == dns_zone_slave) {
if (ztype == dns_zone_slave || ztype == dns_zone_mirror) {
RETERR(configure_zone_acl(zconfig, vconfig, config,
allow_update_forwarding, ac,
mayberaw, dns_zone_setforwardacl,
@@ -1584,8 +1641,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(dupcheck, "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail);
@@ -1599,8 +1658,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
fail = check = true;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
fail = check = false;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail);
@@ -1636,8 +1697,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
warn = ignore = false;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
warn = ignore = true;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore);
@@ -1651,8 +1714,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
warn = ignore = false;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
warn = ignore = true;
} else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME,
ignore);
@@ -1668,13 +1733,15 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
result = cfg_map_get(zoptions, "dnssec-update-mode", &obj);
if (result == ISC_R_SUCCESS) {
const char *arg = cfg_obj_asstring(obj);
if (strcasecmp(arg, "no-resign") == 0)
if (strcasecmp(arg, "no-resign") == 0) {
dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
true);
else if (strcasecmp(arg, "maintain") == 0)
} else if (strcasecmp(arg, "maintain") == 0) {
;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
@@ -1695,12 +1762,38 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* Configure slave functionality.
*/
switch (ztype) {
case dns_zone_mirror:
/*
* Disable outgoing zone transfers for mirror zones unless they
* are explicitly enabled by zone configuration.
*/
obj = NULL;
(void)cfg_map_get(zoptions, "allow-transfer", &obj);
if (obj == NULL) {
dns_acl_t *none;
RETERR(dns_acl_none(mctx, &none));
dns_zone_setxfracl(zone, none);
dns_acl_detach(&none);
}
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_redirect:
count = 0;
obj = NULL;
(void)cfg_map_get(zoptions, "masters", &obj);
/*
* Use the built-in master server list if one was not
* explicitly specified and this is a root zone mirror.
*/
if (obj == NULL && ztype == dns_zone_mirror &&
dns_name_equal(dns_zone_getorigin(zone), dns_rootname))
{
result = named_config_getmastersdef(named_g_config,
DEFAULT_IANA_ROOT_ZONE_MASTERS,
&obj);
RETERR(result);
}
if (obj != NULL) {
dns_ipkeylist_t ipkl;
dns_ipkeylist_init(&ipkl);
@@ -1727,35 +1820,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
}
dns_zone_setoption(mayberaw, DNS_ZONEOPT_MULTIMASTER, multi);
obj = NULL;
(void)cfg_map_get(zoptions, "mirror", &obj);
if (obj != NULL) {
bool mirror = cfg_obj_asboolean(obj);
dns_zone_setoption(mayberaw, DNS_ZONEOPT_MIRROR,
mirror);
if (mirror) {
/*
* Disable outgoing zone transfers unless they
* are explicitly enabled by zone
* configuration.
*/
obj = NULL;
(void)cfg_map_get(zoptions, "allow-transfer",
&obj);
if (obj == NULL) {
dns_acl_t *none;
RETERR(dns_acl_none(mctx, &none));
dns_zone_setxfracl(zone, none);
dns_acl_detach(&none);
}
/*
* Only allow "also-notify".
*/
notifytype = dns_notifytype_explicit;
dns_zone_setnotifytype(zone, notifytype);
}
}
obj = NULL;
result = named_config_get(maps, "max-transfer-time-in", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
@@ -1895,7 +1959,7 @@ named_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
const char *cfilename;
const char *zfilename;
dns_zone_t *raw = NULL;
bool has_raw, mirror;
bool has_raw;
dns_zonetype_t ztype;
zoptions = cfg_tuple_get(zconfig, "options");
@@ -1935,21 +1999,6 @@ named_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
return (false);
}
/*
* Do not reuse a zone whose "mirror" setting was changed.
*/
obj = NULL;
mirror = false;
(void)cfg_map_get(zoptions, "mirror", &obj);
if (obj != NULL) {
mirror = cfg_obj_asboolean(obj);
}
if (dns_zone_ismirror(zone) != mirror) {
dns_zone_log(zone, ISC_LOG_DEBUG(1),
"not reusable: mirror setting changed");
return (false);
}
if (zonetype_fromconfig(zoptions) != ztype) {
dns_zone_log(zone, ISC_LOG_DEBUG(1),
"not reusable: type mismatch");
+12 -2
View File
@@ -144,8 +144,8 @@ static dns_fixedname_t fuserzone;
static dns_fixedname_t fzname;
static dns_name_t *userzone = NULL;
static dns_name_t *zname = NULL;
static dns_name_t tmpzonename;
static dns_name_t restart_master;
static dns_name_t tmpzonename = DNS_NAME_INITEMPTY;
static dns_name_t restart_master = DNS_NAME_INITEMPTY;
static dns_tsig_keyring_t *gssring = NULL;
static dns_tsigkey_t *tsigkey = NULL;
static dst_key_t *sig0key = NULL;
@@ -2354,6 +2354,8 @@ update_completed(isc_task_t *task, isc_event_t *event) {
if (usegsstsig) {
dns_name_free(&tmpzonename, gmctx);
dns_name_free(&restart_master, gmctx);
dns_name_init(&tmpzonename, 0);
dns_name_init(&restart_master, 0);
}
isc_event_free(&event);
done_update();
@@ -2769,6 +2771,8 @@ failed_gssrequest() {
dns_name_free(&tmpzonename, gmctx);
dns_name_free(&restart_master, gmctx);
dns_name_init(&tmpzonename, NULL);
dns_name_init(&restart_master, NULL);
done_update();
}
@@ -3178,6 +3182,12 @@ cleanup(void) {
isc_mem_free(gmctx, realm);
realm = NULL;
}
if (dns_name_dynamic(&tmpzonename)) {
dns_name_free(&tmpzonename, gmctx);
}
if (dns_name_dynamic(&restart_master)) {
dns_name_free(&restart_master, gmctx);
}
#endif
if (sig0key != NULL)
+8 -239
View File
@@ -43,7 +43,7 @@
* Create a key in the keystore of an HSM
*
* The calculation of key tag is left to the script
* that converts the key into a DNSKEY RR and inserts
* that converts the key into a DNSKEY RR and inserts
* it into a zone file.
*
* usage:
@@ -71,7 +71,6 @@
#include <pk11/pk11.h>
#include <pk11/result.h>
#define WANT_DH_PRIMES
#include <pk11/constants.h>
#include <pkcs11/eddsa.h>
@@ -79,12 +78,10 @@
static CK_BBOOL truevalue = TRUE;
static CK_BBOOL falsevalue = FALSE;
/* Key class: RSA, ECC, ECX, DSA, DH, or unknown */
/* Key class: RSA, ECC, ECX, or unknown */
typedef enum {
key_unknown,
key_rsa,
key_dsa,
key_dh,
key_ecc,
key_ecx
} key_class_t;
@@ -152,78 +149,6 @@ static CK_ATTRIBUTE ecc_template[] = {
{CKA_ID, NULL_PTR, 0}
};
/*
* Public key template for DSA keys
*/
#define DSA_LABEL 0
#define DSA_VERIFY 1
#define DSA_TOKEN 2
#define DSA_PRIVATE 3
#define DSA_PRIME 4
#define DSA_SUBPRIME 5
#define DSA_BASE 6
#define DSA_ID 7
#define DSA_ATTRS 8
static CK_ATTRIBUTE dsa_template[] = {
{CKA_LABEL, NULL_PTR, 0},
{CKA_VERIFY, &truevalue, sizeof(truevalue)},
{CKA_TOKEN, &truevalue, sizeof(truevalue)},
{CKA_PRIVATE, &falsevalue, sizeof(falsevalue)},
{CKA_PRIME, NULL_PTR, 0},
{CKA_SUBPRIME, NULL_PTR, 0},
{CKA_BASE, NULL_PTR, 0},
{CKA_ID, NULL_PTR, 0}
};
#define DSA_PARAM_PRIME 0
#define DSA_PARAM_SUBPRIME 1
#define DSA_PARAM_BASE 2
#define DSA_PARAM_ATTRS 3
static CK_ATTRIBUTE dsa_param_template[] = {
{CKA_PRIME, NULL_PTR, 0},
{CKA_SUBPRIME, NULL_PTR, 0},
{CKA_BASE, NULL_PTR, 0},
};
#define DSA_DOMAIN_PRIMEBITS 0
#define DSA_DOMAIN_PRIVATE 1
#define DSA_DOMAIN_ATTRS 2
static CK_ATTRIBUTE dsa_domain_template[] = {
{CKA_PRIME_BITS, NULL_PTR, 0},
{CKA_PRIVATE, &falsevalue, sizeof(falsevalue)},
};
/*
* Public key template for DH keys
*/
#define DH_LABEL 0
#define DH_VERIFY 1
#define DH_TOKEN 2
#define DH_PRIVATE 3
#define DH_PRIME 4
#define DH_BASE 5
#define DH_ID 6
#define DH_ATTRS 7
static CK_ATTRIBUTE dh_template[] = {
{CKA_LABEL, NULL_PTR, 0},
{CKA_VERIFY, &truevalue, sizeof(truevalue)},
{CKA_TOKEN, &truevalue, sizeof(truevalue)},
{CKA_PRIVATE, &falsevalue, sizeof(falsevalue)},
{CKA_PRIME, NULL_PTR, 0},
{CKA_BASE, NULL_PTR, 0},
{CKA_ID, NULL_PTR, 0}
};
#define DH_PARAM_PRIME 0
#define DH_PARAM_BASE 1
#define DH_PARAM_ATTRS 2
static CK_ATTRIBUTE dh_param_template[] = {
{CKA_PRIME, NULL_PTR, 0},
{CKA_BASE, NULL_PTR, 0},
};
#define DH_DOMAIN_PRIMEBITS 0
#define DH_DOMAIN_ATTRS 1
static CK_ATTRIBUTE dh_domain_template[] = {
{CKA_PRIME_BITS, NULL_PTR, 0},
};
/*
* Convert from text to key class. Accepts the names of DNSSEC
* signing algorithms, so e.g., ECDSAP256SHA256 maps to ECC and
@@ -237,11 +162,6 @@ keyclass_fromtext(const char *name) {
if (strncasecmp(name, "rsa", 3) == 0 ||
strncasecmp(name, "nsec3rsa", 8) == 0)
return (key_rsa);
else if (strncasecmp(name, "dsa", 3) == 0 ||
strncasecmp(name, "nsec3dsa", 8) == 0)
return (key_dsa);
else if (strcasecmp(name, "dh") == 0)
return (key_dh);
else if (strncasecmp(name, "ecc", 3) == 0 ||
strncasecmp(name, "ecdsa", 5) == 0)
return (key_ecc);
@@ -279,7 +199,7 @@ main(int argc, char *argv[]) {
pk11_context_t pctx;
int error = 0;
int c, errflg = 0;
int hide = 1, special = 0, quiet = 0;
int hide = 1, quiet = 0;
int idlen = 0, id_offset = 0;
unsigned int i;
unsigned long id = 0;
@@ -331,9 +251,6 @@ main(int argc, char *argv[]) {
case 'q':
quiet = 1;
break;
case 'S':
special = 1;
break;
case ':':
fprintf(stderr,
"Option -%c requires an operand\n",
@@ -360,12 +277,6 @@ main(int argc, char *argv[]) {
exit(2);
}
if (special != 0 && keyclass != key_dh) {
fprintf(stderr, "The -S option is only compatible "
"with Diffie-Hellman key generation\n");
exit(2);
}
switch (keyclass) {
case key_rsa:
op_type = OP_RSA;
@@ -461,70 +372,10 @@ main(int argc, char *argv[]) {
#endif
break;
case key_dsa:
op_type = OP_DSA;
if (bits == 0)
usage();
dpmech.mechanism = CKM_DSA_PARAMETER_GEN;
dpmech.pParameter = NULL;
dpmech.ulParameterLen = 0;
mech.mechanism = CKM_DSA_KEY_PAIR_GEN;
mech.pParameter = NULL;
mech.ulParameterLen = 0;
public_template = dsa_template;
public_attrcnt = DSA_ATTRS;
id_offset = DSA_ID;
domain_template = dsa_domain_template;
domain_attrcnt = DSA_DOMAIN_ATTRS;
param_template = dsa_param_template;
param_attrcnt = DSA_PARAM_ATTRS;
domain_template[DSA_DOMAIN_PRIMEBITS].pValue = &bits;
domain_template[DSA_DOMAIN_PRIMEBITS].ulValueLen = sizeof(bits);
break;
case key_dh:
op_type = OP_DH;
if (special && bits == 0)
bits = 1024;
else if (special &&
bits != 768 && bits != 1024 && bits != 1536)
{
fprintf(stderr, "When using the special prime (-S) "
"option, only key sizes of\n"
"768, 1024 or 1536 are supported.\n");
exit(2);
} else if (bits == 0)
usage();
dpmech.mechanism = CKM_DH_PKCS_PARAMETER_GEN;
dpmech.pParameter = NULL;
dpmech.ulParameterLen = 0;
mech.mechanism = CKM_DH_PKCS_KEY_PAIR_GEN;
mech.pParameter = NULL;
mech.ulParameterLen = 0;
/* Override CKA_SIGN attribute */
private_template[PRIVATE_DERIVE].type = CKA_DERIVE;
public_template = dh_template;
public_attrcnt = DH_ATTRS;
id_offset = DH_ID;
domain_template = dh_domain_template;
domain_attrcnt = DH_DOMAIN_ATTRS;
param_template = dh_param_template;
param_attrcnt = DH_PARAM_ATTRS;
domain_template[DH_DOMAIN_PRIMEBITS].pValue = &bits;
domain_template[DH_DOMAIN_PRIMEBITS].ulValueLen = sizeof(bits);
break;
case key_unknown:
usage();
}
search_template[0].pValue = label;
search_template[0].ulValueLen = strlen((char *)label);
public_template[0].pValue = label;
@@ -582,7 +433,7 @@ main(int argc, char *argv[]) {
hSession = pctx.session;
/* check if a key with the same id already exists */
rv = pkcs_C_FindObjectsInit(hSession, search_template, 1);
rv = pkcs_C_FindObjectsInit(hSession, search_template, 1);
if (rv != CKR_OK) {
fprintf(stderr, "C_FindObjectsInit: Error = 0x%.8lX\n", rv);
error = 1;
@@ -609,29 +460,6 @@ main(int argc, char *argv[]) {
if (keyclass == key_rsa || keyclass == key_ecc || keyclass == key_ecx)
goto generate_keys;
/*
* Special setup for Diffie-Hellman keys
*/
if (special != 0) {
public_template[DH_BASE].pValue = pk11_dh_bn2;
public_template[DH_BASE].ulValueLen = sizeof(pk11_dh_bn2);
if (bits == 768) {
public_template[DH_PRIME].pValue = pk11_dh_bn768;
public_template[DH_PRIME].ulValueLen =
sizeof(pk11_dh_bn768);
} else if (bits == 1024) {
public_template[DH_PRIME].pValue = pk11_dh_bn1024;
public_template[DH_PRIME].ulValueLen =
sizeof(pk11_dh_bn1024);
} else {
public_template[DH_PRIME].pValue = pk11_dh_bn1536;
public_template[DH_PRIME].ulValueLen =
sizeof(pk11_dh_bn1536);
}
param_attrcnt = 0;
goto generate_keys;
}
/* Generate Domain parameters */
rv = pkcs_C_GenerateKey(hSession, &dpmech, domain_template,
domain_attrcnt, &domainparams);
@@ -651,7 +479,7 @@ main(int argc, char *argv[]) {
fprintf(stderr,
"C_GetAttributeValue0: Error = 0x%.8lX\n", rv);
error = 1;
goto exit_domain;
goto exit_search;
}
/* Allocate space for parameter attributes */
@@ -664,81 +492,22 @@ main(int argc, char *argv[]) {
if (param_template[i].pValue == NULL) {
fprintf(stderr, "malloc failed\n");
error = 1;
goto exit_params;
goto exit_search;
}
}
rv = pkcs_C_GetAttributeValue(hSession, domainparams,
dsa_param_template, DSA_PARAM_ATTRS);
if (rv != CKR_OK) {
fprintf(stderr,
"C_GetAttributeValue1: Error = 0x%.8lX\n", rv);
error = 1;
goto exit_params;
}
switch (keyclass) {
case key_dsa:
public_template[DSA_PRIME].pValue =
param_template[DSA_PARAM_PRIME].pValue;
public_template[DSA_PRIME].ulValueLen =
param_template[DSA_PARAM_PRIME].ulValueLen;
public_template[DSA_SUBPRIME].pValue =
param_template[DSA_PARAM_SUBPRIME].pValue;
public_template[DSA_SUBPRIME].ulValueLen =
param_template[DSA_PARAM_SUBPRIME].ulValueLen;
public_template[DSA_BASE].pValue =
param_template[DSA_PARAM_BASE].pValue;
public_template[DSA_BASE].ulValueLen =
param_template[DSA_PARAM_BASE].ulValueLen;
break;
case key_dh:
public_template[DH_PRIME].pValue =
param_template[DH_PARAM_PRIME].pValue;
public_template[DH_PRIME].ulValueLen =
param_template[DH_PARAM_PRIME].ulValueLen;
public_template[DH_BASE].pValue =
param_template[DH_PARAM_BASE].pValue;
public_template[DH_BASE].ulValueLen =
param_template[DH_PARAM_BASE].ulValueLen;
default:
break;
}
generate_keys:
/* Generate Key pair for signing/verifying */
rv = pkcs_C_GenerateKeyPair(hSession, &mech,
public_template, public_attrcnt,
private_template, private_attrcnt,
&publickey, &privatekey);
if (rv != CKR_OK) {
fprintf(stderr, "C_GenerateKeyPair: Error = 0x%.8lX\n", rv);
error = 1;
} else if (!quiet)
printf("Key pair generation complete.\n");
exit_params:
/* Free parameter attributes */
if (keyclass == key_dsa || keyclass == key_dh) {
for (i = 0; i < param_attrcnt; i++) {
if (param_template[i].pValue != NULL) {
free(param_template[i].pValue);
}
}
}
exit_domain:
/* Destroy domain parameters */
if (keyclass == key_dsa || (keyclass == key_dh && !special)) {
rv = pkcs_C_DestroyObject(hSession, domainparams);
if (rv != CKR_OK) {
fprintf(stderr,
"C_DestroyObject: Error = 0x%.8lX\n", rv);
error = 1;
}
}
exit_search:
rv = pkcs_C_FindObjectsFinal(hSession);
+1 -1
View File
@@ -215,7 +215,7 @@ Specifies the directory in which keys should be stored\&.
.PP
\fBkey\-size\fR
.RS 4
Specifies the number of bits to use in creating keys\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and size\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 1024 bits for DSA keys and 2048 for RSA\&.
Specifies the number of bits to use in creating keys\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and size\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
.RE
.PP
\fBkeyttl\fR
+1 -2
View File
@@ -258,8 +258,7 @@
Takes two arguments: keytype (eihter "zsk" or "ksk") and size.
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies. If no policy is
configured, the default is 1024 bits for DSA keys and 2048 for
RSA.
configured, the default is 2048 bits for RSA keys.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>keyttl</strong></span></span></dt>
+1 -1
View File
@@ -30,7 +30,7 @@ class dnskey:
'Revoke', 'DSPublish', 'SyncPublish', 'SyncDelete')
_OPTS = (None, '-P', '-A', '-I', '-D', '-R', None, '-Psync', '-Dsync')
_ALGNAMES = (None, 'RSAMD5', 'DH', 'DSA', 'ECC', 'RSASHA1',
_ALGNAMES = (None, 'RSAMD5', 'DH', 'DSA', None, 'RSASHA1',
'NSEC3DSA', 'NSEC3RSASHA1', 'RSASHA256', None,
'RSASHA512', None, 'ECCGOST', 'ECDSAP256SHA256',
'ECDSAP384SHA384', 'ED25519', 'ED448')
+17 -9
View File
@@ -386,7 +386,7 @@ See also
\fBrndc trace\fR\&.
.RE
.PP
\fBnta \fR\fB[( \-d | \-f | \-r | \-l \fIduration\fR)]\fR\fB \fR\fB\fIdomain\fR\fR\fB \fR\fB[\fIview\fR]\fR\fB \fR
\fBnta \fR\fB[( \-class \fIclass\fR | \-dump | \-force | \-remove | \-lifetime \fIduration\fR)]\fR\fB \fR\fB\fIdomain\fR\fR\fB \fR\fB[\fIview\fR]\fR\fB \fR
.RS 4
Sets a DNSSEC negative trust anchor (NTA) for
\fBdomain\fR, with a lifetime of
@@ -418,7 +418,7 @@ option\&. TTL\-style suffixes can be used to specify the lifetime in seconds, mi
to zero is equivalent to
\fB\-remove\fR\&.
.sp
If
If the
\fB\-dump\fR
is used, any other arguments are ignored, and a list of existing NTAs is printed (note that this may include NTAs that are expired but have not yet been cleaned up)\&.
.sp
@@ -430,11 +430,18 @@ option in the Administrator Reference Manual for details)\&. If data can be vali
\fB\-force\fR
overrides this behavior and forces an NTA to persist for its entire lifetime, regardless of whether data could be validated if the NTA were not present\&.
.sp
The view class can be specified with
\fB\-class\fR\&. The default is class
\fBIN\fR, which is the only class for which DNSSEC is currently supported\&.
.sp
All of these options can be shortened, i\&.e\&., to
\fB\-l\fR,
\fB\-r\fR,
\fB\-d\fR, and
\fB\-f\fR\&.
\fB\-d\fR,
\fB\-f\fR, and
\fB\-c\fR\&.
.sp
Unrecognized options are treated as errors\&. To reference a domain or view name that begins with a hyphen, use a double\-hyphen on the command line to indicate the end of options\&.
.RE
.PP
\fBquerylog\fR [ on | off ]
@@ -695,13 +702,14 @@ in each view\&. The list both statically configured keys and dynamic TKEY\-negot
.PP
\fBvalidation ( on | off | status ) \fR\fB[\fIview \&.\&.\&.\fR]\fR\fB \fR
.RS 4
Enable, disable, or check the current status of DNSSEC validation\&. Note
Enable, disable, or check the current status of DNSSEC validation\&. By default, validation is enabled\&. (Note that
\fBdnssec\-enable\fR
also needs to be set to
must also be
\fByes\fR
or
\fBauto\fR
to be effective\&. It defaults to enabled\&.
(the default value) for signatures to be returned along with validated data\&. If validation is enabled while
\fBdnssec\-enable\fR
is set to
\fBno\fR, the server will validate internally, but will not supply clients with the necessary records to allow validity to be confirmed\&.)
.RE
.PP
\fBzonestatus \fR\fB\fIzone\fR\fR\fB \fR\fB[\fIclass\fR [\fIview\fR]]\fR
+6
View File
@@ -650,6 +650,12 @@
<option>-l</option>, <option>-r</option>, <option>-d</option>,
<option>-f</option>, and <option>-c</option>.
</para>
<para>
Unrecognized options are treated as errors. To reference
a domain or view name that begins with a hyphen,
use a double-hyphen on the command line to indicate the
end of options.
</para>
</listitem>
</varlistentry>
+22 -8
View File
@@ -484,7 +484,7 @@
</p>
</dd>
<dt><span class="term"><strong class="userinput"><code>nta
[<span class="optional">( -d | -f | -r | -l <em class="replaceable"><code>duration</code></em>)</span>]
[<span class="optional">( -class <em class="replaceable"><code>class</code></em> | -dump | -force | -remove | -lifetime <em class="replaceable"><code>duration</code></em>)</span>]
<em class="replaceable"><code>domain</code></em>
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]
</code></strong></span></dt>
@@ -532,7 +532,7 @@
is equivalent to <code class="option">-remove</code>.
</p>
<p>
If <code class="option">-dump</code> is used, any other arguments
If the <code class="option">-dump</code> is used, any other arguments
are ignored, and a list of existing NTAs is printed
(note that this may include NTAs that are expired but
have not yet been cleaned up).
@@ -549,10 +549,21 @@
lifetime, regardless of whether data could be
validated if the NTA were not present.
</p>
<p>
The view class can be specified with <code class="option">-class</code>.
The default is class <strong class="userinput"><code>IN</code></strong>, which is
the only class for which DNSSEC is currently supported.
</p>
<p>
All of these options can be shortened, i.e., to
<code class="option">-l</code>, <code class="option">-r</code>, <code class="option">-d</code>,
and <code class="option">-f</code>.
<code class="option">-f</code>, and <code class="option">-c</code>.
</p>
<p>
Unrecognized options are treated as errors. To reference
a domain or view name that begins with a hyphen,
use a double-hyphen on the command line to indicate the
end of options.
</p>
</dd>
<dt><span class="term"><strong class="userinput"><code>querylog</code></strong> [<span class="optional"> on | off </span>] </span></dt>
@@ -902,11 +913,14 @@
<dd>
<p>
Enable, disable, or check the current status of
DNSSEC validation.
Note <span class="command"><strong>dnssec-enable</strong></span> also needs to be
set to <strong class="userinput"><code>yes</code></strong> or
<strong class="userinput"><code>auto</code></strong> to be effective.
It defaults to enabled.
DNSSEC validation. By default, validation is enabled.
(Note that <span class="command"><strong>dnssec-enable</strong></span> must also be
<strong class="userinput"><code>yes</code></strong> (the default value) for signatures
to be returned along with validated data. If validation is
enabled while <span class="command"><strong>dnssec-enable</strong></span> is set to
<strong class="userinput"><code>no</code></strong>, the server will validate internally,
but will not supply clients with the necessary records to allow
validity to be confirmed.)
</p>
</dd>
<dt><span class="term"><strong class="userinput"><code>zonestatus <em class="replaceable"><code>zone</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em> [<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
+2
View File
@@ -115,6 +115,8 @@ main(int argc, char **argv) {
strcmp(argv[1], "seconary") == 0)
{
zonetype = CFG_ZONE_SLAVE;
} else if (strcmp(argv[1], "mirror") == 0) {
zonetype = CFG_ZONE_MIRROR;
} else if (strcmp(argv[1], "stub") == 0) {
zonetype = CFG_ZONE_STUB;
} else if (strcmp(argv[1], "static-stub") == 0) {
+2
View File
@@ -46,6 +46,7 @@ options {
memstatistics-file "named.memstats"; // _PATH_MEMSTATS
max-cache-ttl 999;
min-cache-ttl 66;
auth-nxdomain yes; // always set AA on NXDOMAIN.
// don't set this to 'no' unless
// you know what you're doing -- older
@@ -148,6 +149,7 @@ options {
min-refresh-time 777;
max-ncache-ttl 333;
min-ncache-ttl 22;
min-roots 15;
serial-queries 34;
@@ -1 +0,0 @@
child.example. IN KEY 256 3 3 ALeiYGFXbil6PgHnkm5ZE67ygEVDvGT/gqZmLH7tGboofcPSfyhh1hpw dxZgJ26d/gynWMGVSYzaXfzsxpPoNeYn+qeevQoJOaxXXlfcy8Ik52Rm eW0J9mWlf9hsD7ShIhh1+0kRYGCOCaU25wIe3SLVkN3HgqiCBDYnBY0u nMkqRadiUnoEa3Tcvc9kJx9r9gDstR2A9A5sBhFLI/XQ0gViHHLVpQ4x hz+rTLb/xrBoAb5sQJT3xUjhhdNo9HuL6kwdLdSu//PCl1QnY9NpYPVV SKUo
@@ -1,7 +0,0 @@
Private-key-format: v1.2
Algorithm: 3 (DSA)
Prime(p): vGT/gqZmLH7tGboofcPSfyhh1hpwdxZgJ26d/gynWMGVSYzaXfzsxpPoNeYn+qeevQoJOaxXXlfcy8Ik52RmeQ==
Subprime(q): t6JgYVduKXo+AeeSblkTrvKARUM=
Base(g): bQn2ZaV/2GwPtKEiGHX7SRFgYI4JpTbnAh7dItWQ3ceCqIIENicFjS6cySpFp2JSegRrdNy9z2QnH2v2AOy1HQ==
Private_value(x): J1Ctez8+w1PTR56Hze3pGoe0Wag=
Public_value(y): gPQObAYRSyP10NIFYhxy1aUOMYc/q0y2/8awaAG+bECU98VI4YXTaPR7i+pMHS3Urv/zwpdUJ2PTaWD1VUilKA==
@@ -0,0 +1,5 @@
; This is a zone-signing key, keyid 33180, for child.example.
; Created: 20181025104746 (Thu Oct 25 12:47:46 2018)
; Publish: 20181025104746 (Thu Oct 25 12:47:46 2018)
; Activate: 20181025104746 (Thu Oct 25 12:47:46 2018)
child.example. IN DNSKEY 256 3 5 AwEAAb9eatC8ASzDnRApcZuxyBrvJRANRQjCXQ1FWK+8vEyXV5NIE9Km hKIV2wbq2tLBPfjNQz4BTJ9RmDINf1RayDlt6L+IQV1JCaDaMjd1zU3n SQK18Y7fMu0ww4AMKOnoVRbkIxa3zlA0chImXcfPE0q2AvKBYLzPfkPO cfplAuRkLcGUxdADCipNzCOakpcd5gfm9Sa2HlaXcw3gyI1WcE8=
@@ -0,0 +1,13 @@
Private-key-format: v1.3
Algorithm: 5 (RSASHA1)
Modulus: v15q0LwBLMOdEClxm7HIGu8lEA1FCMJdDUVYr7y8TJdXk0gT0qaEohXbBura0sE9+M1DPgFMn1GYMg1/VFrIOW3ov4hBXUkJoNoyN3XNTedJArXxjt8y7TDDgAwo6ehVFuQjFrfOUDRyEiZdx88TSrYC8oFgvM9+Q85x+mUC5GQtwZTF0AMKKk3MI5qSlx3mB+b1JrYeVpdzDeDIjVZwTw==
PublicExponent: AQAB
PrivateExponent: WDsn9GU6BXGLENCK2MX3BLQN2oDDu24hiOTYJu5VwtpkPjuVKCIuNKzu9xmBGnqOIBBDWGsw8KOmEC247yOL/S53iRdBS8lI7yiqznc52RhlmrdPKXbNpVnPwil8wocw+oQYa7uvdPYxI2Yy3B/tRgUxlxSlc/LW/dr0BX2L7qr/aeOBeGSRUlCpc7tYU9a2RUaLpVxF6SlqicCpC91MAQ==
Prime1: 466f+JL66Bl4qYnkj0s9+1N3pYmdcM9Ja1AN66X4VLslA9Cm1JEaC5V9HOptfcXUk0XYEVnKeKM2lIQnvcLG0yuQHIa+pGi7P8vgQfdaRUE=
Prime2: 1yuUkTVRSbUWeUreEcHgeeBBJ61UshX7t07gnGgIr3artGdo2CVEb5//+2Mvj5bgjCQBvjBbmHNZrR0jKDRBTIGtqbBerOuhEN4AXdAEgY8=
Exponent1: KzUXbJ/P973ltR7S/hKEV66WVRbRhvf/cdsGWULs5n+BXcD59/r1W19qF9OxJZ4mYjBt+ZT1pIEsuXB+7jcJbkelGJTFlwO9DTVOgJZFTkE=
Exponent2: FTPsLertGbBIiKdB/sn2Dsx0Xy6LXAkihsu1AnSV9oRhIyPVhwcVGVLQ7Lq3YxThB648pbsqK3miapamcj3D+YAF1uTUT4Hgm0LlEll/OC0=
Coefficient: Vulw9kmmjKc+wmOukLdzheoA2hNPDVtgiynfzHybyXdqvapCoK+ZVmNFzjO0M41ATcpvya3iX0bekMQqYnBhLURNZUIyqz2nGskOjV8I5Jg=
Created: 20181025104746
Publish: 20181025104746
Activate: 20181025104746
-6
View File
@@ -49,7 +49,6 @@ XTARGETS = adb_test@EXEEXT@ \
db_test@EXEEXT@ \
dst_test@EXEEXT@ \
gsstest@EXEEXT@ \
hash_test@EXEEXT@ \
fsaccess_test@EXEEXT@ \
inter_test@EXEEXT@ \
lex_test@EXEEXT@ \
@@ -78,7 +77,6 @@ XSRCS = adb_test.c \
byname_test.c \
db_test.c \
dst_test.c \
hash_test.c \
fsaccess_test.c \
gsstest.c \
inter_test.c \
@@ -167,10 +165,6 @@ name_test@EXEEXT@: name_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ name_test.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
hash_test@EXEEXT@: hash_test.@O@ ${ISCDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ hash_test.@O@ \
${ISCLIBS} ${LIBS}
entropy_test@EXEEXT@: entropy_test.@O@ ${ISCDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ entropy_test.@O@ \
${ISCLIBS} ${LIBS}
+2 -2
View File
@@ -290,8 +290,8 @@ main(int argc, char **argv) {
isc_stdtime_get(&now);
result = isc_mutex_init(&client_lock);
check_result(result, "isc_mutex_init(&client_lock)");
isc_mutex_init(&client_lock);
ISC_LIST_INIT(clients);
/*
-5
View File
@@ -359,7 +359,6 @@ main(int argc, char *argv[]) {
dbinfo *dbi;
dns_dbversion_t *version;
const dns_name_t *origin;
size_t memory_quota = 0;
dns_trust_t trust = 0;
unsigned int addopts;
isc_log_t *lctx = NULL;
@@ -411,10 +410,6 @@ main(int argc, char *argv[]) {
case 'P':
pause_every = atoi(isc_commandline_argument);
break;
case 'Q':
memory_quota = atoi(isc_commandline_argument);
isc_mem_setquota(mctx, memory_quota);
break;
case 't':
type = atoi(isc_commandline_argument);
break;
-3
View File
@@ -254,11 +254,9 @@ main(void) {
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result != ISC_R_SUCCESS)
return (1);
io(name, 23616, DST_ALG_DSA, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
io(name, 54622, DST_ALG_RSAMD5, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC,
mctx);
io(name, 49667, DST_ALG_DSA, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
io(name, 2, DST_ALG_RSAMD5, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
isc_buffer_constinit(&b, "dh.", 3);
@@ -270,7 +268,6 @@ main(void) {
generate(DST_ALG_RSAMD5, mctx);
generate(DST_ALG_DH, mctx);
generate(DST_ALG_DSA, mctx);
generate(DST_ALG_HMACMD5, mctx);
dst_lib_destroy();
-284
View File
@@ -1,284 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <isc/hmacmd5.h>
#include <isc/hmacsha.h>
#include <isc/md5.h>
#include <isc/sha1.h>
#include <isc/util.h>
#include <isc/print.h>
#include <isc/string.h>
#include <pk11/site.h>
static void
print_digest(const char *s, const char *hash, unsigned char *d,
unsigned int words)
{
unsigned int i, j;
printf("hash (%s) %s:\n\t", hash, s);
for (i = 0; i < words; i++) {
printf(" ");
for (j = 0; j < 4; j++)
printf("%02x", d[i * 4 + j]);
}
printf("\n");
}
int
main(int argc, char **argv) {
isc_sha1_t sha1;
isc_sha224_t sha224;
isc_md5_t md5;
isc_hmacmd5_t hmacmd5;
isc_hmacsha1_t hmacsha1;
isc_hmacsha224_t hmacsha224;
isc_hmacsha256_t hmacsha256;
isc_hmacsha384_t hmacsha384;
isc_hmacsha512_t hmacsha512;
unsigned char digest[ISC_SHA512_DIGESTLENGTH];
unsigned char buffer[1024];
const char *s;
unsigned char key[20];
UNUSED(argc);
UNUSED(argv);
s = "abc";
isc_sha1_init(&sha1);
memmove(buffer, s, strlen(s));
isc_sha1_update(&sha1, buffer, strlen(s));
isc_sha1_final(&sha1, digest);
print_digest(s, "sha1", digest, ISC_SHA1_DIGESTLENGTH/4);
s = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
isc_sha1_init(&sha1);
memmove(buffer, s, strlen(s));
isc_sha1_update(&sha1, buffer, strlen(s));
isc_sha1_final(&sha1, digest);
print_digest(s, "sha1", digest, ISC_SHA1_DIGESTLENGTH/4);
s = "abc";
isc_sha224_init(&sha224);
memmove(buffer, s, strlen(s));
isc_sha224_update(&sha224, buffer, strlen(s));
isc_sha224_final(digest, &sha224);
print_digest(s, "sha224", digest, ISC_SHA224_DIGESTLENGTH/4);
s = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
isc_sha224_init(&sha224);
memmove(buffer, s, strlen(s));
isc_sha224_update(&sha224, buffer, strlen(s));
isc_sha224_final(digest, &sha224);
print_digest(s, "sha224", digest, ISC_SHA224_DIGESTLENGTH/4);
s = "abc";
isc_md5_init(&md5);
memmove(buffer, s, strlen(s));
isc_md5_update(&md5, buffer, strlen(s));
isc_md5_final(&md5, digest);
print_digest(s, "md5", digest, 4);
/*
* The 3 HMAC-MD5 examples from RFC2104
*/
s = "Hi There";
memset(key, 0x0b, 16);
isc_hmacmd5_init(&hmacmd5, key, 16);
memmove(buffer, s, strlen(s));
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
isc_hmacmd5_sign(&hmacmd5, digest);
print_digest(s, "hmacmd5", digest, 4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacmd5_init(&hmacmd5, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
isc_hmacmd5_sign(&hmacmd5, digest);
print_digest(s, "hmacmd5", digest, 4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 16);
isc_hmacmd5_init(&hmacmd5, key, 16);
memmove(buffer, s, strlen(s));
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
isc_hmacmd5_sign(&hmacmd5, digest);
print_digest(s, "hmacmd5", digest, 4);
/*
* The 3 HMAC-SHA1 examples from RFC4634.
*/
s = "Hi There";
memset(key, 0x0b, 20);
isc_hmacsha1_init(&hmacsha1, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha1_update(&hmacsha1, buffer, strlen(s));
isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH);
print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacsha1_init(&hmacsha1, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacsha1_update(&hmacsha1, buffer, strlen(s));
isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH);
print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 20);
isc_hmacsha1_init(&hmacsha1, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha1_update(&hmacsha1, buffer, strlen(s));
isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH);
print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4);
/*
* The 3 HMAC-SHA224 examples from RFC4634.
*/
s = "Hi There";
memset(key, 0x0b, 20);
isc_hmacsha224_init(&hmacsha224, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha224_update(&hmacsha224, buffer, strlen(s));
isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH);
print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacsha224_init(&hmacsha224, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacsha224_update(&hmacsha224, buffer, strlen(s));
isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH);
print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 20);
isc_hmacsha224_init(&hmacsha224, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha224_update(&hmacsha224, buffer, strlen(s));
isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH);
print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4);
/*
* The 3 HMAC-SHA256 examples from RFC4634.
*/
s = "Hi There";
memset(key, 0x0b, 20);
isc_hmacsha256_init(&hmacsha256, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha256_update(&hmacsha256, buffer, strlen(s));
isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH);
print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacsha256_init(&hmacsha256, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacsha256_update(&hmacsha256, buffer, strlen(s));
isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH);
print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 20);
isc_hmacsha256_init(&hmacsha256, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha256_update(&hmacsha256, buffer, strlen(s));
isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH);
print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4);
/*
* The 3 HMAC-SHA384 examples from RFC4634.
*/
s = "Hi There";
memset(key, 0x0b, 20);
isc_hmacsha384_init(&hmacsha384, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha384_update(&hmacsha384, buffer, strlen(s));
isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH);
print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacsha384_init(&hmacsha384, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacsha384_update(&hmacsha384, buffer, strlen(s));
isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH);
print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 20);
isc_hmacsha384_init(&hmacsha384, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha384_update(&hmacsha384, buffer, strlen(s));
isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH);
print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4);
/*
* The 3 HMAC-SHA512 examples from RFC4634.
*/
s = "Hi There";
memset(key, 0x0b, 20);
isc_hmacsha512_init(&hmacsha512, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha512_update(&hmacsha512, buffer, strlen(s));
isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH);
print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4);
s = "what do ya want for nothing?";
strlcpy((char *)key, "Jefe", sizeof(key));
isc_hmacsha512_init(&hmacsha512, key, 4);
memmove(buffer, s, strlen(s));
isc_hmacsha512_update(&hmacsha512, buffer, strlen(s));
isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH);
print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4);
s = "\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335"
"\335\335\335\335\335\335\335\335\335\335";
memset(key, 0xaa, 20);
isc_hmacsha512_init(&hmacsha512, key, 20);
memmove(buffer, s, strlen(s));
isc_hmacsha512_update(&hmacsha512, buffer, strlen(s));
isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH);
print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4);
return (0);
}
+2 -2
View File
@@ -30,7 +30,7 @@ main(int argc, char *argv[]) {
isc_mem_debugging = ISC_MEM_DEBUGRECORD;
RUNTIME_CHECK(isc_mutex_init(&lock) == ISC_R_SUCCESS);
isc_mutex_init(&lock);
mctx = NULL;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -114,7 +114,7 @@ main(int argc, char *argv[]) {
isc_mem_destroy(&mctx);
DESTROYLOCK(&lock);
isc_mutex_destroy(&lock);
return (0);
}
+3 -3
View File
@@ -206,7 +206,7 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_mutex_init(&lock) == ISC_R_SUCCESS);
isc_mutex_init(&lock);
mctx = NULL;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -255,7 +255,7 @@ main(int argc, char *argv[]) {
CHECK("dns_name_fromtext", result);
key = NULL;
result = dst_key_fromfile(name, 4017, DNS_KEYALG_DSA,
result = dst_key_fromfile(name, 33180, DNS_KEYALG_RSASHA1,
DST_TYPE_PUBLIC | DST_TYPE_PRIVATE,
NULL, mctx, &key);
CHECK("dst_key_fromfile", result);
@@ -282,7 +282,7 @@ main(int argc, char *argv[]) {
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
DESTROYLOCK(&lock);
isc_mutex_destroy(&lock);
isc_app_finish();
+1 -1
View File
@@ -69,7 +69,7 @@ PARALLEL = rpzrecurse serve-stale dnssec \
rrchecker rrl rrsetorder rsabigexponent runtime \
sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks
+2 -2
View File
@@ -15,8 +15,8 @@ SYSTEMTESTTOP=../..
SYSTESTDIR=autosign
dumpit () {
echo "D:${debug}: dumping ${1}"
cat "${1}" | sed 's/^/D:/'
echo_d "${debug}: dumping ${1}"
cat "${1}" | cat_d
}
setup () {
+1 -1
View File
@@ -236,7 +236,7 @@ status=`expr $status + $ret`
echo_i "checking for nsec3param signing record ($n)"
ret=0
$RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1 | sed 's/^/ns3 /' | cat_i
$RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1
grep "Pending NSEC3 chain 1 0 20 DEAF" signing.out.test$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -42,7 +42,8 @@ tac() {
}
convert() {
local key=$1 n=$2
key=$1
n=$2
$DSFROMKEY $key >DS.$n
grep ' 8 1 ' DS.$n >DS.$n-1
grep ' 8 2 ' DS.$n >DS.$n-2
+5 -5
View File
@@ -33,7 +33,7 @@ testcase() {
check_stdout
check_stderr
if [ "$expect" -ne "$result" ]; then
echo "D:exit status does not match $expect"
echo_d "exit status does not match $expect"
fail
fi
unset name err out
@@ -45,19 +45,19 @@ check_stderr() {
else
[ -s err.$n ] || return 0
fi
echo "D:stderr did not match '$err'"
sed 's/^/D:/' err.$n
echo_d "stderr did not match '$err'"
cat err.$n | cat_d
fail
}
check_stdout() {
cmp out.$n "${out:-empty}" >/dev/null && return
echo "D:stdout did not match '$out'"
echo_d "stdout did not match '$out'"
( echo "wanted"
cat "$out"
echo "got"
cat out.$n
) | sed 's/^/D:/'
) | cat_d
fail
}
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view two {
max-ncache-ttl 604801;
};
@@ -0,0 +1,17 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view three {
max-ncache-ttl 4000000000;
};
view four {
max-ncache-ttl -1;
};
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view four {
max-ncache-ttl -1;
};
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view one {
min-cache-ttl 1x;
};
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view one {
min-ncache-ttl 1x;
};
@@ -0,0 +1,20 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
recursion yes;
allow-recursion { none; };
};
zone "." {
type mirror;
masters { 127.0.0.1; };
};
@@ -0,0 +1,15 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "." {
type mirror;
notify yes;
};
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "foo." {
type mirror;
};
@@ -0,0 +1,18 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
recursion no;
};
zone "." {
type mirror;
};
@@ -16,7 +16,7 @@ view two {
max-ncache-ttl 86400;
};
view three {
max-ncache-ttl 4000000000;
max-ncache-ttl 604800;
};
view four {
max-ncache-ttl 3600s;
@@ -0,0 +1,26 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view one {
min-cache-ttl 0;
};
view two {
min-cache-ttl 30;
};
view three {
min-cache-ttl 60;
};
view four {
min-cache-ttl 90s;
};
view five {
min-cache-ttl 1m;
};
@@ -0,0 +1,26 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
view one {
min-ncache-ttl 0;
};
view two {
min-ncache-ttl 30;
};
view three {
min-ncache-ttl 60;
};
view four {
min-ncache-ttl 90s;
};
view five {
min-ncache-ttl 1m;
};
@@ -0,0 +1,18 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
notify yes;
};
zone "." {
type mirror;
};
@@ -0,0 +1,14 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "." {
type mirror;
};
+21 -11
View File
@@ -15,10 +15,7 @@
#
# Find the top of the BIND9 tree.
TOP=${SYSTEMTESTTOP:=.}/../../..
# Make it absolute so that it continues to work after we cd.
TOP=`cd $TOP && pwd`
TOP=@abs_top_builddir@
# Default algorithm for testing
DEFAULT_ALGORITHM=ECDSAP256SHA256
@@ -105,7 +102,7 @@ PARALLELDIRS="acl additional addzone allow-query auth autosign \
rrchecker rrl rrsetorder rsabigexponent runtime \
serve-stale sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks"
@@ -226,23 +223,36 @@ fi
SYSTESTDIR="`basename $PWD`"
echo_i() {
echo "$@" | while read LINE ; do
echoinfo "I:$SYSTESTDIR:$LINE"
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_ic() {
echo "$@" | while read LINE ; do
echoinfo "I:$SYSTESTDIR: $LINE"
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read LINE ; do
echoinfo "I:$SYSTESTDIR:$LINE"
while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_d() {
echo "$@" | while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
cat_d() {
while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
digcomp() {
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
result=$?
+7 -7
View File
@@ -100,7 +100,7 @@ SEQUENTIALDIRS="acl additional addzone autosign builtin \
reclimit redirect resolver rndc rpz rrchecker rrl \
rrsetorder rsabigexponent runtime sfcache smartsign sortlist \
spf staticstub statistics statschannel stub tcp tkey tsig \
tsiggss unknown upforwd verify views wildcard xfer xferquota \
tsiggss ttl unknown upforwd verify views wildcard xfer xferquota \
zero zonechecks"
# List of tests that use unique ports (other than 5300 and 9953). These
@@ -203,20 +203,20 @@ echoend () {
SYSTESTDIR="`basename $PWD`"
echo_i() {
echo "$@" | while read LINE ; do
echoinfo "I:$SYSTESTDIR:$LINE"
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_ic() {
echo "$@" | while read LINE ; do
echoinfo "I:$SYSTESTDIR: $LINE"
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read LINE ; do
echoinfo "I:$SYSTESTDIR:$LINE"
while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
+11
View File
@@ -0,0 +1,11 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
@ 3600 SOA . . 0 0 0 0 0
@ 3600 NS .
+37
View File
@@ -0,0 +1,37 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.8 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.8;
notify-source 10.53.0.8;
transfer-source 10.53.0.8;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.8; };
listen-on-v6 { none; };
dnssec-validation yes;
rate-limit {};
require-server-cookie yes;
};
zone "example" {
type master;
file "example.db";
};
+1
View File
@@ -20,3 +20,4 @@ copy_setports ns4/named.conf.in ns4/named.conf
copy_setports ns5/named.conf.in ns5/named.conf
copy_setports ns6/named.conf.in ns6/named.conf
copy_setports ns7/named.conf.in ns7/named.conf
copy_setports ns8/named.conf.in ns8/named.conf
+11
View File
@@ -169,6 +169,17 @@ if [ $linecount != 2 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking require-server-cookie yes with rate-limit ($n)"
ret=0
$DIG $DIGOPTS +qr +cookie +nobadcookie soa example @10.53.0.8 > dig.out.test$n
grep "flags: qr[^;]* ad[ ;]" dig.out.test$n > /dev/null && ret=1
grep BADCOOKIE dig.out.test$n > /dev/null || ret=1
linecount=`getcookie dig.out.test$n | wc -l`
if [ $linecount != 2 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
#
# Test shared cookie-secret support.
#

Some files were not shown because too many files have changed in this diff Show More