Compare commits

...
1400 Commits
Author SHA1 Message Date
Witold Kręcicki 5b11668ad8 xxx tmp 2020-02-10 11:35:42 +01:00
Witold Kręcicki f689db69db Revert "Test: initial LOWAC capacity at 100k"
This reverts commit 0e52562e4eea06a4c1764ece09bc1bffcae51d32.
2018-11-24 22:38:09 +00:00
Witold Kręcicki 7b276d4062 Test: initial LOWAC capacity at 100k 2018-11-24 22:38:09 +00:00
Witold Kręcicki c5949ff9d1 Reset affinity of LOWAC worker 2018-11-24 22:38:09 +00:00
Witold Kręcicki 57ab5d3a14 Check if we have a view before LOWAC-caching 2018-11-24 22:38:09 +00:00
Witold Kręcicki 496923f71f Use memcpy instead of byte-by-byte in dns_name_fromwire 2018-11-24 22:38:09 +00:00
Witold Kręcicki 32472059d3 Minor fixes 2018-11-24 22:38:09 +00:00
Witold Kręcicki 0dcdbdfbdd Don't overuse isc_time_now(), use local time 2018-11-24 22:38:09 +00:00
Witold Kręcicki 3b6985b783 Fix atomic_ macros 2018-11-24 22:38:09 +00:00
Witold Kręcicki 96ba0486f3 Make stats inc/dec inlined macros 2018-11-24 22:38:09 +00:00
Witold Kręcicki 7132ffffad Revert "Use memory_order_acq_rel"
This reverts commit 673792d111965cf93c79a39005024b55ad4d8ba8.
2018-11-24 22:38:09 +00:00
Witold Kręcicki 48853a75ff WiP 2018-11-24 22:38:09 +00:00
Witold Kręcicki df0c5bc4cf Allocate memory for blob: 2018-11-24 22:38:09 +00:00
Witold Kręcicki cd6f768a16 Longer cache time 2018-11-24 22:38:09 +00:00
Witold Kręcicki 7a6b2ffddd Always enqueue removal after replacement 2018-11-24 22:38:09 +00:00
Witold Kręcicki 758045a2fd Fixes 2018-11-24 22:38:09 +00:00
Witold Kręcicki 0e037f8873 Mark unused memory 2018-11-24 22:38:09 +00:00
Witold Kręcicki 7c68a70bf9 Use memory_order_acq_rel 2018-11-24 22:38:09 +00:00
Witold Kręcicki f9d4a96021 Add some magic checks 2018-11-24 22:38:09 +00:00
Witold Kręcicki 9b5bdf4e89 Fixes 2018-11-24 22:38:09 +00:00
Witold Kręcicki 8c9ae61062 Revert "Use common isc_time"
This reverts commit 1c5ba6ba8af5fb7e65456ef8b846afdc874b77a2.
2018-11-24 22:38:09 +00:00
Witold Kręcicki f7390b39f8 Iterator fix 2018-11-24 22:38:09 +00:00
Witold Kręcicki 14ec374173 Use common isc_time 2018-11-24 22:38:09 +00:00
Witold Kręcicki 1fec6d70e6 Cleanup better 2018-11-24 22:38:09 +00:00
Witold Kręcicki 96b76abece More fiddling 2018-11-24 22:38:09 +00:00
Witold Kręcicki 0a73f7bb27 Some fiddling 2018-11-24 22:38:09 +00:00
Witold Kręcicki aaaa727cb3 Cleaning up 2018-11-24 22:38:09 +00:00
Witold Kręcicki 55a435f091 Cleaning up 2018-11-24 22:38:09 +00:00
Witold Kręcicki 609e505bc1 Test: ck_fifo 2018-11-24 22:38:09 +00:00
Witold Kręcicki 8ffd188a26 PoC LOWAC 2018-11-24 22:38:09 +00:00
Witold Kręcicki 965ef669bc Get rid of tasks-ready and tasks-running 2018-11-24 22:32:51 +00:00
Witold Kręcicki c42f920449 Set quantum in dispatch 2018-11-24 22:32:40 +00:00
Witold Kręcicki 95037b96a3 Add tasks_waiting field in taskqueue 2018-11-24 22:32:36 +00:00
Witold Kręcicki 09d0f57296 Remove configurable default taskmgr quantum, it was always default anyway 2018-11-24 22:32:31 +00:00
Witold Kręcicki 5098bd7776 pseudosend 2018-11-24 09:39:42 +00: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
Evan Hunt ed35755a24 Merge branch 'wpk-temporarily-disable-qmin-for-rpz' into 'master'
Disable qname minimization in RPZ test for now

See merge request isc-projects/bind9!882
2018-10-23 22:49:29 -04:00
Witold KręcickiandEvan Hunt af5f10fcf6 Disable qname minimization in RPZ test for now 2018-10-23 22:41:29 -04:00
Mark Andrews fa3d8f7d70 Merge branch '610-address-memory-leak-on-error' into 'master'
Resolve "Address memory leak on error"

Closes #610

See merge request isc-projects/bind9!859
2018-10-23 20:51:58 -04:00
Mark Andrews 607c2d7441 free key on error 2018-10-23 20:19:07 -04:00
Evan Hunt d5e69f0598 Merge branch 'cleanup-changes' into 'master'
minor CHANGES edits

See merge request isc-projects/bind9!880
2018-10-23 16:29:51 -04:00
Evan Hunt 57bb2f56f4 minor edits 2018-10-23 13:28:57 -07:00
Michał Kępień 01c174e02e Merge branch '187-libirs-handle-scoped-ipv6-addresses-in-etc-resolv.conf' into 'master'
libirs: handle scoped IPv6 addresses in /etc/resolv.conf

Closes #187

See merge request isc-projects/bind9!854
2018-10-23 09:13:14 -04:00
Michał Kępień b7564cc898 Add CHANGES entry
5050.	[bug]		The libirs version of getaddrinfo() was unable to parse
			scoped IPv6 addresses present in /etc/resolv.conf.
			[GL #187]
2018-10-23 14:50:00 +02:00
Michał Kępień 76d49c05be libirs: handle scoped IPv6 addresses in /etc/resolv.conf
Commonly used network configuration tools write scoped IPv6 nameserver
addresses to /etc/resolv.conf.  libirs only handles these when it is
compiled with -DIRS_HAVE_SIN6_SCOPE_ID, which is not the default, and
only handles numeric scopes, which is not what network configuration
tools typically use.  This causes dig to be practically unable to handle
scoped IPv6 nameserver addresses in /etc/resolv.conf.

Fix the problem by:

  - not requiring a custom compile-time flag to be set in order for
    scoped IPv6 addresses to be processed by getaddrinfo(),

  - parsing non-numeric scope identifiers using if_nametoindex(),

  - setting the sin6_scope_id field in struct sockaddr_in6 structures
    returned by getaddrinfo() even if the AI_CANONNAME flag is not set.
2018-10-23 14:50:00 +02:00
Witold Krecicki 2791bf9285 Merge branch '16-qname-minimization-newfctx' into 'master'
QNAME minimization remake

See merge request isc-projects/bind9!548
2018-10-23 08:33:12 -04:00
Mark AndrewsandWitold Kręcicki b6e2d7bca9 use ns_client_log 2018-10-23 12:15:25 +00:00
Mark AndrewsandWitold Kręcicki ffb9f721f0 log pre rrl check state 2018-10-23 12:15:25 +00:00
Witold Kręcicki 5c422ce803 changes 2018-10-23 12:15:25 +00:00
Mark AndrewsandWitold Kręcicki 15c3bf9e82 stop.pl: report test being stopped 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki ba85bb1a85 whitespace 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 2b3b626cc1 set fctx->client to NULL 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 23766ff690 checkpoint 2018-10-23 12:15:04 +00:00
Witold Kręcicki 86246c7431 Initialize adbname->client properly; check for loops 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 2f36a62d16 use RUNTIME_CHECK 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 1a2a19c693 address fctx reference count leaks; style 2018-10-23 12:15:04 +00:00
Witold Kręcicki f2af336dc4 Fix looping issues 2018-10-23 12:15:04 +00:00
Witold Kręcicki 0246ea14c4 Make resolver tests more civilized 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 98ab65dbe9 qmin: fixup expected queries for query for .ugly succeds when qname-minimization is in relaxed mode 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 4754f53979 qmin: fix 'query for .ugly fails when qname-minimization is in strict mode'; remove debugging echos 2018-10-23 12:15:04 +00:00
Witold Kręcicki 70a1ba20ec QNAME miminimization should create a separate fetch context for each fetch -
this makes the cache more efficient and eliminates duplicates queries.
2018-10-23 12:15:04 +00:00
Michał Kępień 36e431d632 Merge branch 'wpk-servfail-on-upstream-formerr' into 'master'
Set result to SERVFAIL if upstream responded with FORMERR

See merge request isc-projects/bind9!876
2018-10-23 08:09:11 -04:00
Witold KręcickiandMichał Kępień b5c9a8caad Set result to SERVFAIL if upstream responded with FORMERR
Commit ba91243542 causes the resolver to
respond to a client query with FORMERR when all upstream queries sent to
the servers authoritative for QNAME elicit FORMERR responses.  This
happens because resolver code returns DNS_R_FORMERR in such a case and
dns_result_torcode() acts as a pass-through for all arguments which are
already a valid RCODE.

The correct RCODE to set in the response returned to the client in the
case described above is SERVFAIL.  Make sure this happens by overriding
the RCODE in query_gotanswer(), on the grounds that any format errors in
the client query itself should be caught long before execution reaches
that point.  This change should not reduce query error logging accuracy
as the resolver code itself reports the exact reason for returning a
DNS_R_FORMERR result using log_formerr().
2018-10-23 13:50:27 +02:00
Ondřej Surý 9fd3c8a939 Merge branch '4-rename-configure.in-to-configure.ac' into 'master'
Rename configure.in to configure.ac

See merge request isc-projects/bind9!872
2018-10-23 04:11:31 -04:00
Ondřej Surý 866991c2cb Rename configure.in to proper name configure.ac 2018-10-23 09:55:26 +02:00
Ondřej Surý cb6b555f07 Merge branch '612-problems-compiling-on-arm-processor' into 'master'
Resolve "Problems compiling on arm processor"

Closes #612

See merge request isc-projects/bind9!869
2018-10-23 03:46:33 -04:00
Ondřej Surý 032e6963fe Check for yield support on ARM and print helpfull error message about -march 2018-10-23 09:35:00 +02:00
Ondřej Surý 4b47958163 Fix typo in isc_rwlock_pause() on sparc 2018-10-23 09:29:03 +02:00
Ondřej Surý b6368ffdad Add information compilation instructions for support on ARM 2018-10-23 09:29:03 +02:00
Ondřej Surý 8ae6280165 Merge branch '506-print-fips-mode' into 'master'
Add configure option to enable FIPS mode if OpenSSL provides the option

Closes #506

See merge request isc-projects/bind9!853
2018-10-22 15:18:45 -04:00
Ondřej Surý 9d29f73b79 Add CHANGES note.
XXXX.	[feature]	Add configure option to enabled and enforce FIPS mode
			in BIND 9. [GL #506]
2018-10-22 20:55:35 +02:00
Ondřej Surý 60862c5769 Add release notes for the FIPS mode feature 2018-10-22 20:55:35 +02:00
Ondřej Surý c4cee27f9b Add support for enabling and enforcing FIPS mode in OpenSSL:
* Add configure option --enable-fips-mode that detects and enables FIPS mode
* Add a function to enable FIPS mode and call it on crypto init
* Log an OpenSSL error when FIPS_mode_set() fails and exit
* Report FIPS mode status in a separate log message from named
2018-10-22 20:55:35 +02:00
Michał Kępień 0f62a5ce04 Merge branch '565-automatically-trigger-gitlab-pages-pipelines' into 'master'
Automatically trigger GitLab Pages pipelines

Closes #565

See merge request isc-projects/bind9!866
2018-10-20 18:01:52 -04:00
Michał Kępień 31bde118db Automatically trigger GitLab Pages pipelines
Whenever master or one for the v9_* branches gets updated, the current
ARM should be published on GitLab Pages.  Add a pipeline stage which
takes care of triggering GitLab Pages pipelines.  Extend the lifetime of
artifact archives containing the ARM to prevent GitLab Pages pipelines
from failing due to artifacts being unavailable.
2018-10-20 23:29:20 +02:00
Michał Kępień a562043fac Merge branch '565-generate-the-arm-during-ci' into 'master'
Generate the ARM during CI

See merge request isc-projects/bind9!863
2018-10-20 06:17:11 -04:00
Michał Kępień 3f443468e0 Generate the ARM during CI
Add a CI job which generates the HTML version of the ARM and makes it
available for download.  Since this is expected to be a quick process,
the new job is enabled for all pipelines.
2018-10-19 22:42:44 +02:00
Evan Hunt 423d42fd7e Merge branch '607-win32-fixes' into 'master'
Resolve "windows builds are failing for master"

Closes #607

See merge request isc-projects/bind9!858
2018-10-19 04:04:37 -04:00
Evan Hunt e839972ee2 address unresolved externals 2018-10-19 00:49:53 -07:00
Evan Hunt 3f35ab8567 remove references to methods and app_api.c 2018-10-19 00:28:53 -07:00
Evan Hunt e8194526f4 Merge branch 'fix-windows' into 'master'
fix windows build error

Closes #607

See merge request isc-projects/bind9!857
2018-10-18 23:44:24 -04:00
Evan Hunt c609a67ac7 change to bool constants; also fixed style error 2018-10-18 20:42:25 -07:00
Witold Krecicki aaa66d2560 Merge branch '479-remove-isc_bind9' into 'master'
Remove isc_bind9 from (almost) everywhere

Closes #479

See merge request isc-projects/bind9!656
2018-10-18 06:39:42 -04:00
Evan HuntandWitold Kręcicki 09f58ab63f retain a minimal "methods" struct in the mctx
- this enables memory to be allocated and freed in dyndb modules
  when named is linked statically. when we standardize on libtool,
  this should become unnecessary.
- also, simplified the isc_mem_create/createx API by removing
  extra compatibility functions
2018-10-18 09:19:12 +00:00
Evan HuntandWitold Kręcicki 6f7c9623c5 remove isc_bind9 usage from view.c 2018-10-18 09:19:12 +00:00
Evan HuntandWitold Kręcicki 0e86fa16e8 complete removal of a few unneeded functions
- removed register functions from isc_app, isc_timer, isc_task
- added a task_p.h header for use by unit tests
2018-10-18 09:19:12 +00:00
Witold Kręcicki 38a127c35b Remove layering from isc_task, isc_app, isc_socket, isc_timer, isc_mem 2018-10-18 09:19:12 +00:00
Witold Kręcicki cdbac34cba Get rid of isc_bind9 conditional 2018-10-18 09:19:12 +00:00
Stephen Morris 60f22ff410 Merge branch 'stephen-update-releaase-template' into 'master'
Update release checklist as per discussion in Amsterdam BIND meeting.

See merge request isc-projects/bind9!852
2018-10-12 08:06:43 -04:00
Stephen Morris 4914f28858 Update release checklist as per discussion in Amsterdam BIND meeting. 2018-10-12 13:57:11 +02:00
Michał Kępień a9e1517a61 Merge branch '572-improve-accuracy-of-query-error-logging' into 'master'
Improve accuracy of query error logging

Closes #572

See merge request isc-projects/bind9!837
2018-10-08 07:01:43 -04:00
Michał Kępień dc531dc340 Add CHANGES entry
5047.	[bug]		Messages logged for certain query processing failures
			now include a more specific error description if it is
			available. [GL #572]
2018-10-08 12:47:28 +02:00
Michał Kępień ba91243542 Do not set qctx->result to DNS_R_SERVFAIL unless necessary
In some cases, setting qctx->result to DNS_R_SERVFAIL causes the value
of a 'result' variable containing a more specific failure reason to be
effectively discarded.  This may cause certain query error log messages
to lack specificity despite a more accurate problem cause being
determined during query processing.

In other cases, qctx->result is set to DNS_R_SERVFAIL even though a more
specific error (e.g. ISC_R_NOMEMORY) could be explicitly indicated.

Since the response message's RCODE is derived from qctx->result using
dns_result_torcode(), which handles a number of possible isc_result_t
values and returns SERVFAIL for anything not explicitly listed, it is
fine to set qctx->result to something more specific than DNS_R_SERVFAIL
(in fact, this is already being done in a few cases).  Modify most
QUERY_ERROR() calls so that qctx->result is set to a more specific error
code when possible.  Adjust query_error() so that statistics are still
calculated properly.  Remove the RECURSE_ERROR() macro which was
introduced exactly because qctx->result could be set to DNS_R_SERVFAIL
instead of DNS_R_DUPLICATE or DNS_R_DROP, which need special handling.
Modify dns_sdlz_putrr() so that it returns DNS_R_SERVFAIL when a DLZ
driver returns invalid RDATA, in order to prevent setting RCODE to
FORMERR (which is what dns_result_torcode() translates e.g. DNS_R_SYNTAX
to) while responding authoritatively.
2018-10-08 12:47:28 +02:00
Michał Kępień b3cd868c4b Remove the 'want_stale' field from struct query_ctx
As the previous commit makes the 'want_stale' field of struct query_ctx
redundant, remove it.
2018-10-08 12:47:28 +02:00
Michał Kępień cb48d410d8 Set up stale response lookup before query_done() is called
When something goes wrong while recursing for an answer to a query,
query_gotanswer() sets a flag (qctx->want_stale) in the query context.
query_done() is subsequently called and it can either set up a stale
response lookup (if serve-stale is enabled) or conclude that a SERVFAIL
response should be sent.  This may cause confusion when looking at query
error logs since the QUERY_ERROR() line responsible for setting the
response's RCODE to SERVFAIL is not in a catch-all branch of a switch
statement inside query_gotanswer() (like it is for authoritative
responses) but rather in a code branch which appears to have something
to do with serve-stale, even when the latter is not enabled.

Extract the part of query_done() responsible for checking serve-stale
configuration and optionally setting up a stale response lookup into a
separate function, query_usestale(), shifting the responsibility for
setting the response's RCODE to SERVFAIL to the same QUERY_ERROR() line
in query_gotanswer() which is evaluated for authoritative responses.
2018-10-08 12:47:28 +02:00
Evan Hunt e8f66bcfa3 Merge branch 'move-declaration' into 'master'
style correction

See merge request isc-projects/bind9!849
2018-10-05 14:25:00 -04:00
Evan Hunt c642f9970a move declaration to the top of the block 2018-10-05 11:13:54 -07:00
Evan Hunt 9bf25f7f1e Merge branch 'rpz-shutdown-crash' into 'master'
Fix crash at shutdown during an RPZ reload. [RT #46210]

See merge request isc-projects/bind9!71
2018-10-05 13:59:26 -04:00
Tony FinchandEvan Hunt 7a2b0ac92a Fix crash at shutdown during an RPZ reload. [RT #46210] 2018-10-05 13:58:47 -04:00
Evan Hunt 754dad21f5 Merge branch 'fix-windows' into 'master'
remove references to deleted files

See merge request isc-projects/bind9!847
2018-10-05 12:19:02 -04:00
Evan Hunt f14445f13d remove references to deleted files 2018-10-05 09:10:40 -07:00
Ondřej Surý a5bdc18ce6 Merge branch 'fix-openssl_shim' into 'master'
Remove HAVE_OPENSSL guard from openssl_shim.{c,h} and uncrustify it

See merge request isc-projects/bind9!846
2018-10-05 07:21:58 -04:00
Ondřej Surý 5ccbb274d2 Remove HAVE_OPENSSL guard from openssl_shim.{c,h} and uncrustify it 2018-10-05 13:12:48 +02:00
Ondřej Surý 0fffb82f81 Merge branch 'host-idn-disable' into 'master'
Disable IDN from environment as documented

See merge request isc-projects/bind9!800
2018-10-05 06:14:28 -04:00
Petr MenšíkandOndřej Surý ec1d9b80f5 Disable IDN from environment as documented
Manual page of host contained instructions to disable IDN processing
when it was built with libidn2. When refactoring IDN support however,
support for disabling IDN in host and nslookup was lost. Use also
environment variable and document it for nslookup, host and dig.
2018-10-05 05:58:33 -04:00
Ondřej Surý 0e74384991 Merge branch 'uncrustify' into 'master'
Add configuration for uncrustify

See merge request isc-projects/bind9!681
2018-10-05 05:56:09 -04:00
Evan HuntandOndřej Surý e6fc3d8f17 tweaks to the style
- tried to improve struct variable alignment
- ignore braces on function definitions so we can keep the existing
  BIND style; braces can be on a new line or not
2018-10-05 05:47:48 -04:00
Evan HuntandOndřej Surý d15b08a57c Update config file with documentation
- this can be regenerated automatically using
  uncrustify -c .uncrustify.cfg --update-config-with-doc
2018-10-05 05:47:48 -04:00
Evan HuntandOndřej Surý c2e2163165 Add an uncrustify config file as $TOP/.uncrustify.cfg
to update file, run: uncrustify --replace -c $TOP/.uncrustify.cfg <filename>

- note that if this is in the user's $HOME dir, it's the default
  uncrustify config path name. this can be overridden with
  'uncrustify -c filenaeme' or the UNCRUSTIFY_CONFIG environment
  variable
2018-10-05 05:47:48 -04:00
Ondřej Surý 4ec0f300a4 Merge branch '22-remove-DSA-algorithm' into 'master'
Remove support for obsoleted and insecure DSA and DSA-NSEC3-SHA1 algorithms

See merge request isc-projects/bind9!348
2018-10-05 05:44:11 -04:00
Ondřej Surý b8195a0251 Add CHANGES entry.
XXXX.	[cleanup]	Remove support for DNSSEC algorithms 3 (DSA)
			and 6 (DSA-NSEC3-SHA1). [GL #22]
2018-10-05 11:16:13 +02:00
Ondřej Surý 31b8b37e8f Add note about removing DSA and DSA-NSEC3-SHA1 to release notes 2018-10-05 11:16:13 +02:00
Ondřej Surý f207e0b52e Restore the algorithm names mapping in bin/python/isc/dnskey.py.in for DSA, NSEC3DSA, and ECCGOST 2018-10-05 11:16:13 +02:00
Ondřej Surý 09fd5c442b Convert the system tests that were using DSA to use a default algorithm defined in conf.sh 2018-10-05 11:16:13 +02:00
Ondřej Surý 3994b1f9c2 Remove support for obsoleted and insecure DSA and DSA-NSEC3-SHA1 algorithms 2018-10-05 09:21:43 +02:00
Evan Hunt 6aadf7c8ab Merge branch '388-clarify-dnssec-enable' into 'master'
Clarify the relationship between "dnssec-enable" and "dnssec-validation" 

Closes #388

See merge request isc-projects/bind9!483
2018-10-05 02:41:54 -04:00
Evan Hunt c9eb1518d6 CHANGES, copyrights 2018-10-04 23:33:18 -07:00
Evan Hunt 2f0897caff add a test case 2018-10-04 23:33:18 -07:00
Evan Hunt ff49dd3c21 clarify relationship between dnssec-enable and dnssec-validation
- if dnssec-enable is no, then dnssec-validation now also defaults to
  no. if dnssec-enable is yes, dnssec-validation defaults to auto or yes
  depending on --disable-auto-validation.
- correct the doc
2018-10-04 23:33:18 -07:00
Ondřej Surý 871bc20112 Merge branch 'add-bind-version-used-to-the-bug-report-template' into 'master'
Add a "BIND version used" section to the GitLab bug report template

See merge request isc-projects/bind9!793
2018-10-04 07:35:03 -04:00
Michał Kępień 0396fbebfe Add a "BIND version used" section to the GitLab bug report template 2018-10-04 12:54:52 +02:00
Michał Kępień 739b74759d Merge branch 'fix-eddsa-signatures-creation-and-validation' into 'master'
Fix EdDSA signatures creation and validation

Closes #579

See merge request isc-projects/bind9!844
2018-10-04 06:54:03 -04:00
Witold KręcickiandMichał Kępień 87b07bf08a Fix creating and validating EdDSA signatures
Revert parts of commit c3b8130fe8 which
inadvertently broke creating and validating EdDSA signatures:

 1. EVP_DigestSignInit() returns 1 on success.

 2. EdDSA does not support streaming (EVP_Digest*Update() followed by
    EVP_Digest*Final()), only one shot operations.
2018-10-04 12:38:46 +02:00
Mark Andrews dc7b556c31 Merge branch '578-make-the-chained-delegations-in-reclimit-behave-like-they-would-in-a-regular-name-server' into 'master'
Resolve "Make the chained delegations in reclimit behave like they would in a regular name server."

Closes #578

See merge request isc-projects/bind9!840
2018-10-03 23:18:59 -04:00
Mark Andrews f1308ef186 add CHANGES 2018-10-04 13:18:09 +10:00
Mark Andrews ae77468e63 add bin/tests/system/reclimit/ans4/ans.pl 2018-10-04 12:59:38 +10:00
Mark Andrews a216135a15 reclimit: delegate to ans4 so that ans2 can behave like a real name server 2018-10-04 12:59:38 +10:00
Mark Andrews 7b08db35af Merge branch '568-the-chain-system-test-is-missing-a-delegation' into 'master'
Resolve "the chain system test is missing a delegation."

Closes #568

See merge request isc-projects/bind9!824
2018-10-03 22:27:51 -04:00
Mark Andrews e97199b0d0 add CHANGES note 2018-10-04 12:27:03 +10:00
Mark Andrews 848e42227e chain: change nameserver name so that the delegation matches 2018-10-04 12:26:28 +10:00
Mark Andrews 524c1317f7 chain: add 'start test' messages to named.run 2018-10-04 12:26:28 +10:00
Mark Andrews d5709c5f52 Merge branch '566-mem-c-fprintf-compiler-warning' into 'master'
Resolve "mem.c - fprintf Compiler Warning"

Closes #566

See merge request isc-projects/bind9!821
2018-10-03 17:08:18 -04:00
Mark Andrews f723a1247f Undo implict promotion to 64 bits in our Windows implementation of atomic_load_explicit() by casting to uint_fast32_t. 2018-10-04 06:59:28 +10:00
Evan Hunt b7ac47c47d Merge branch '570-extend-dnstap-update' into 'master'
Resolve "Extend dnstap option to support update messages"

Closes #570

See merge request isc-projects/bind9!829
2018-10-03 12:32:37 -04:00
Evan Hunt 1c8b908c21 CHANGES, copyrights 2018-10-03 09:24:06 -07:00
Evan Hunt ae8026171b update system test to add a check for UPDATE messages 2018-10-03 01:03:56 -07:00
Evan Hunt 6c31ba5c53 rebuild option grammar documentation 2018-10-03 01:03:56 -07:00
Evan Hunt 51c6f4b682 extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00
Mark Andrews 8be7d6ac3c Merge branch 'update-log-fix' into 'master'
make update_log() work if zone is not set

See merge request isc-projects/bind9!831
2018-10-03 02:18:10 -04:00
Evan HuntandMark Andrews 395f6a1474 make update_log() work if zone is not set
- update_log() is called to log update errors, but if those errors
  occur before the zone is set (for example, when returning NOTAUTH)
  it returns without logging anything.
2018-10-03 02:09:26 -04:00
Mark Andrews 33229e7fc5 Merge branch '569-zero-system-test-failed-to-set-ret-0-and-send-output-to-dev-null' into 'master'
Resolve "zero system test failed to set ret=0 and send output to /dev/null"

Closes #569

See merge request isc-projects/bind9!825
2018-10-03 01:36:56 -04:00
Mark Andrews a6507af9e3 zero: send grep output to /dev/null; set ret=0 at start of 'check repeated recursive lookups of non recurring TTL=0 responses get new values' test so the failed subtest count is correct 2018-10-03 01:28:27 -04:00
Ondřej Surý 1c0fee613f Merge branch '571-use-priufast32-instead-of-pridfast32' into 'master'
Resolve "Use PRIuFAST32 instead of PRIdFAST32"

Closes #571

See merge request isc-projects/bind9!830
2018-10-03 00:37:24 -04:00
Mark Andrews d4cc0b98de use PRIuFAST32 instead of PRIdFAST32 2018-10-03 07:59:18 +10:00
Mark Andrews 3e44011370 Merge branch '420-reading-from-master-files-could-sometime-fail-to-preserve-the-case-of-the-owner-name' into 'master'
Resolve "reading from master files could sometime fail to preserve the case of the owner name."

Closes #420

See merge request isc-projects/bind9!536
2018-10-02 01:18:58 -04:00
Mark Andrews 4fcdad292d Add CHANGES note. 2018-10-02 15:10:26 +10:00
Mark Andrews 0fc1b1bffa improve case presevation 2018-10-02 15:09:32 +10:00
Evan Hunt c93acb9949 Merge branch 'example-domain' into 'master'
use an example domain

See merge request isc-projects/bind9!819
2018-09-28 12:58:55 -04:00
Evan Hunt b026663c62 use an example domain 2018-09-28 09:58:07 -07:00
Evan Hunt eb6d02fbe5 Merge branch '562-chaos-addresses' into 'master'
fix chaosnet address comparison

Closes #562

See merge request isc-projects/bind9!813
2018-09-28 03:50:21 -04:00
Evan Hunt b4dca44ad2 fix chaosnet address comparison 2018-09-28 00:42:03 -07:00
Evan Hunt b5cfc5d032 Merge branch '319-fix-recursion-on' into 'master'
Resolve "allow-recursion-on and allow-query-cache-on should default to each other if only one is set"

Closes #319

See merge request isc-projects/bind9!556
2018-09-28 01:04:51 -04:00
Evan Hunt be8713a1e8 CHANGES, release note, copyrights 2018-09-27 21:56:11 -07:00
Evan Hunt cea9ff573c clarify documentation 2018-09-27 21:48:44 -07:00
Evan Hunt 72b49ce869 tests for allow-recursion-on and allow-query-cache-on, default and inherited 2018-09-27 21:48:44 -07:00
Evan Hunt 2b61b83199 check both allow-query-cache and allow-query-cache-on 2018-09-27 21:48:44 -07:00
Evan Hunt 5752645e60 allow-recursion-on and allow-query-cache-on should inherit from each other 2018-09-27 21:48:43 -07:00
Evan Hunt 0494f86a7b Merge branch 'fix-rpz-logging' into 'master'
fix a formatting error in logged RPZ error messages

See merge request isc-projects/bind9!805
2018-09-27 20:33:57 -04:00
Evan Hunt e47ef88810 CHANGES note 2018-09-27 17:24:37 -07:00
Evan HuntandMark Andrews 6a3afe2778 fix a formatting error in logged RPZ error messages 2018-09-27 19:59:21 -04:00
Evan Hunt e116beb68e Merge branch 'rpz-synth-dnssec' into 'master'
RPZ now treats covering NSEC records the same as negative answers

See merge request isc-projects/bind9!811
2018-09-27 18:02:53 -04:00
Tony FinchandEvan Hunt 9407d9e266 RPZ now treats covering NSEC records the same as negative answers 2018-09-27 14:53:34 -07:00
Evan Hunt 9a5c21b475 Merge branch '540-tsig-has-two-consecutive-spaces-when-maclen-is-0' into 'master'
Resolve "TSIG has two consecutive spaces when MACLEN is 0"

Closes #540

See merge request isc-projects/bind9!786
2018-09-27 16:43:23 -04:00
Mark AndrewsandEvan Hunt ac1c3aaa27 only emit a single space between mac length and the orginal id if the mac length is zero 2018-09-27 16:34:49 -04:00
Evan Hunt 26699ac57e Merge branch '503-fix-rpz-test' into 'master'
Resolve "dnsrps test no longer runs"

Closes #503

See merge request isc-projects/bind9!713
2018-09-27 16:23:24 -04:00
Evan Hunt b04c7bbd60 CHANGES note 2018-09-27 13:11:44 -07:00
Evan Hunt 6d05ec7dc1 fix problems running dnsrps tests in rpz and rpzrecurse
- set up server correctly when running the second test pass
- reset stats counters before the second pass
- clean up test output
2018-09-27 13:11:44 -07:00
Evan Hunt 261b7560b0 Merge branch '556-race-condition-in-timer-creation' into 'master'
Fix crash caused by race condition in timer creation

Closes #556

See merge request isc-projects/bind9!801
2018-09-27 15:59:30 -04:00
Zhaolong ZhangandMichał Kępień 21966423cd Fix crash caused by race condition in timer creation
The race condition is the timer elapses before isc__timer_create()
returns the pointer to the caller.  Assigning the return pointer before
enabling the timer will fix it.
2018-09-27 15:17:52 +02:00
Evan Hunt 37e834defc Merge branch '542-prevent-a-race-after-zone-load' into 'master'
Prevent a race after zone load

Closes #542

See merge request isc-projects/bind9!795
2018-09-26 22:45:11 -04:00
Michał KępieńandEvan Hunt feb2a41b7c Add CHANGES entry
5034.	[bug]		A race between threads could prevent zone maintenance
			scheduled immediately after zone load from being
			performed. [GL #542]
2018-09-26 19:35:51 -07:00
Michał KępieńandEvan Hunt 56003e9f9f Prevent a race after zone load
Zone loading happens in a different task (zone->loadtask) than other
zone actions (zone->task).  Thus, when zone_postload() is called in the
context of zone->loadtask, it may cause zone maintenance to be queued in
zone->task and another thread can then execute zone_maintenance() before
zone_postload() gets a chance to finish its work in the first thread.
This would not be a problem if zone_maintenance() accounted for this
possibility by locking the zone before checking the state of its
DNS_ZONEFLG_LOADPENDING flag.  However, the zone is currently not locked
before the state of that flag is checked, which may prevent zone
maintenance from happening despite zone_postload() scheduling it.  Fix
by locking the zone in zone_maintenance() before checking the state of
the zone's DNS_ZONEFLG_LOADPENDING flag.
2018-09-26 19:35:51 -07:00
Ondřej Surý f6bd695a98 Merge branch '543-couple-more-windows-build-fixes' into 'master'
Couple additional Windows build fixes in VCX files

Closes #543

See merge request isc-projects/bind9!802
2018-09-26 03:44:03 -04:00
Thomas JachandOndřej Surý f2d6b1b859 Couple additional Windows build fixes in VCX files 2018-09-26 09:34:34 +02:00
Evan Hunt e673237509 Merge branch 'fix-typo' into 'master'
fix a typo in usage output

See merge request isc-projects/bind9!796
2018-09-24 18:30:04 -04:00
Evan Hunt e7c99e42f3 fix a typo in usage output 2018-09-24 15:21:47 -07:00
Mark Andrews eb74f2ee68 Merge branch '546-mtype-should-be-dns_ssumatchtype_t' into 'master'
Resolve "mtype should be dns_ssumatchtype_t"

Closes #546

See merge request isc-projects/bind9!792
2018-09-20 02:13:53 -04:00
Mark Andrews 7effcffba2 mtype should be dns_ssumatchtype_t 2018-09-20 16:03:24 +10:00
Mark Andrews ae2bc454e5 Merge branch '545-add-strlcat-and-strlcpy-libisc-def-in' into 'master'
Resolve "add strlcat and strlcpy libisc.def.in"

Closes #545

See merge request isc-projects/bind9!791
2018-09-20 00:54:19 -04:00
Mark Andrews a1d8306e3a add strlcat and strlcpy 2018-09-20 14:53:26 +10:00
Mark Andrews 090a564de5 Merge branch '543-windows-builds-failing-for-master' into 'master'
Resolve "Windows builds failing for master"

Closes #543

See merge request isc-projects/bind9!790
2018-09-20 00:14:32 -04:00
Mark Andrews be333e93ec remove isc_string_strlcat and isc_string_strlcpy 2018-09-20 14:00:28 +10:00
Mark Andrews 0eda75fec0 don't typedef socklen_t for _MSC_VER >= 1914 2018-09-20 13:51:50 +10:00
Evan Hunt 5cf8fc4bba Merge branch '539-shell-style-fixes' into 'master'
Resolve "rrsetorder test not portable"

Closes #539

See merge request isc-projects/bind9!784
2018-09-11 15:56:29 -04:00
Evan Hunt bf9c60078a don't use $() in system tests 2018-09-11 14:02:25 -04:00
Evan Hunt 874a4baf62 Merge branch '535-linux-perms-broken' into 'master'
Resolve "named is broken on linux due to user permissions"

Closes #535

See merge request isc-projects/bind9!783
2018-09-10 23:46:55 -04:00
Evan Hunt 38cf56ac38 call named_os_changeuser() when setting minimal privileges on linux 2018-09-10 20:17:41 -07:00
Evan Hunt 29f699d669 Merge branch '105-nta-all' into 'master'
Resolve "[RT#44623] RNDC NTA option to add NTA to all views"

Closes #105

See merge request isc-projects/bind9!658
2018-09-10 15:15:34 -04:00
Evan Hunt 2f6ba87ab9 CHANGES, release notes 2018-09-10 12:07:06 -07:00
Evan Hunt cc0abf62a1 add -class option to rndc nta 2018-09-10 12:04:04 -07:00
Evan Hunt 83dc5a704a report when NTAs added to multiple views
- the text returned by "rndc nta" when adding NTAs to multiple views
  was incorrectly terminated after the first line, so users only saw
  on NTA added unless they checked the logs.
2018-09-10 12:02:49 -07:00
Evan Hunt 07f29a083b Merge branch 'report-compiler-version' into 'master'
report "$CC --version" output as part of the configure summary

See merge request isc-projects/bind9!770
2018-09-10 12:55:44 -04:00
Evan Hunt a6f43574a0 report "$CC --version" output as part of the configure summary 2018-09-10 12:47:03 -04:00
Mark Andrews d98de244c3 Merge branch '511-add-ms-selfsub-and-krb5-selfsub' into 'master'
Resolve "add ms-selfsub and krb5-selfsub"

Closes #511

See merge request isc-projects/bind9!732
2018-09-09 20:21:25 -04:00
Mark Andrews f924c89f97 add CHANGES and release notes documentation 2018-09-10 09:55:24 +10:00
Mark Andrews 77a0fadfce fixup 2018-09-10 09:55:24 +10:00
Mark Andrews 4aa6a118de update util/copyrights 2018-09-10 09:55:24 +10:00
Mark Andrews d1f8e116db add more missing name in update rule checks 2018-09-10 09:55:24 +10:00
Mark Andrews 54c4db569b add krb5-* tests to nsupdate system test. 2018-09-10 09:32:32 +10:00
Mark Andrews fbeefd4990 add krb5-selfsub and ms-selfsub 2018-09-10 09:32:31 +10:00
Mark Andrews 5fb75a3d75 check that name field is not a valid type 2018-09-10 09:32:31 +10:00
Mark Andrews 156d86e673 fix dns_ssumatchtype_subdomainms dns_ssumatchtype_subdomainkrb5 as they don't require the name field to be '.' 2018-09-10 09:32:31 +10:00
Mark Andrews d6f14f06de Merge branch '532-master-doesn-t-build-on-macos-due-to-class-of-align-macros' into 'master'
Resolve "master doesn't build on MacOS due to class of ALIGN macros"

Closes #532

See merge request isc-projects/bind9!774
2018-09-09 19:27:45 -04:00
Mark Andrews 81b133d963 avoid macro name collision with system defined macro 2018-09-10 09:18:17 +10:00
Evan Hunt e860375d4f Merge branch 'patch-2' into 'master'
Replace isc-logo.pdf. The one in here is obsolete. If we need a different size…

See merge request isc-projects/bind9!765
2018-09-07 19:00:56 -04:00
Evan Hunt ad9bf4c662 update isc-logo.pdf to current logo version, remove isc-logo.eps 2018-09-07 15:59:32 -07:00
Evan Hunt 5824023082 Merge branch 'silence-string-h-warning' into 'master'
<isc/string.h> instead of "isc/string.h"

See merge request isc-projects/bind9!771
2018-09-07 18:40:04 -04:00
Evan Hunt 2c3b827e5d <isc/string.h> instead of "isc/string.h" 2018-09-07 15:26:50 -07:00
Witold Krecicki ac430136fb Merge branch '525-cleanup-platform-h-for-stuff-not-exposed-to-the-headers' into 'master'
Resolve "Cleanup platform.h for stuff not exposed to the headers"

Closes #525

See merge request isc-projects/bind9!756
2018-09-07 09:05:02 -04:00
Ondřej Surý 68e017792f Add CHANGES note for GL #525.
5031.   [cleanup]       Various defines in platform.h has been either dropped
                        if always or never triggered on supported platforms
                        or replaced with config.h equivalents if the defines
                        didn't have any impact on public headers.  Workarounds
                        for LinuxThreads have been removed because NPTL is
                        available since Linux kernel 2.6.0.
2018-09-07 13:03:31 +02:00
Ondřej Surý 8ffd9a9b71 Remove PR_SET_DUMPABLE check as it is available since Linux 2.3.20 2018-09-07 12:48:49 +02:00
Ondřej Surý 8e4cc152f7 Remove HAVE_SYS_PRCTL_H check as the prctl() system call was introduced in Linux 2.1.57. 2018-09-07 12:43:43 +02:00
Ondřej Surý 2ed5eb3b9e Remove now empty acconfig.h 2018-09-07 12:17:41 +02:00
Ondřej Surý 341fd22bb0 Remove custom HAVE_UNAME define with proper AC_DEFINE call 2018-09-07 12:17:40 +02:00
Ondřej Surý 161b5dccae Remove NEED_PTHREAD_SCOPE_SYSTEM define that was needed on older FreeBSDs 2018-09-07 12:17:40 +02:00
Ondřej Surý 2750799132 Assume socklen_t is always available on all supported platforms (except on Windows where it is typedefed to int32_t) 2018-09-07 12:17:40 +02:00
Ondřej Surý 7e25330b3d Remove now dummy HAVE_STRERROR 2018-09-07 12:17:40 +02:00
Ondřej Surý 5a0f618d22 Replace custom HAVE_PTHREAD_ATTR_GETSTACKSIZE and HAVE_PTHREAD_ATTR_SETSTACKSIZE with proper AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý 7716bdd400 Remove dummy PATH_RANDOMDEV and CHECK_DSA defines 2018-09-07 12:17:40 +02:00
Ondřej Surý 43c468926b Remove HAVE_FLOCKFILE and HAVE_GETCUNLOCKED custom defines in favour of AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý 5d8f9bf935 Always enable CALL_PTHREAD_SETCONCURRENCY as it is part of POSIX Threads 2018-09-07 12:17:40 +02:00
Ondřej Surý fa048a9b2c Replace custom HAVE_TZSET define with AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý c83d9b9b50 Remove now dummy HAVE_IFLIST_SYSCTL define 2018-09-07 12:17:40 +02:00
Ondřej Surý 51bcdb78af Remove now dummy HAVE_GETIFADDRS define 2018-09-07 12:17:40 +02:00
Ondřej Surý 7384a9f23a Replace custom HAVE_CATGETS define with AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý 78bb5761a0 Replace custom HAVE_SYSCTLBYNAME define with AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý 4a5ecad038 Replace custom HAVE_SIGWAIT define with AC_CHECK_FUNCS 2018-09-07 12:17:40 +02:00
Ondřej Surý 19ae4438ab Replace custom HAVE_SYSCONF with proper AC_CHECK_FUNCS call 2018-09-07 12:17:40 +02:00
Ondřej Surý 927b65aa7f Remove now dummy HAVE_UNIXWARE_SIGWAIT define 2018-09-07 12:17:40 +02:00
Ondřej Surý c7b1e7fd08 Linux (glibc) has NPTL since LinuxThreads are no-more, so remove HAVE_LINUXTHREADS 2018-09-07 12:17:40 +02:00
Ondřej Surý 2f02552a93 Remove now dummy NEED_PTHREAD_INIT 2018-09-07 12:17:30 +02:00
Ondřej Surý 4d46f0f95d Drop ISC_PLATFORM_USEDECLSPEC and IRS_PLATFORM_USEDECLSPEC as they are platform dependent and only unix vs win32 platform.h header difference is enough 2018-09-07 12:17:30 +02:00
Ondřej Surý 51b0d5d55e Replace platform ISC_PLATFORM_HAVESTATNSEC with config ENABLE_STAT_NSEC 2018-09-07 12:17:30 +02:00
Ondřej Surý f1d3055d7b Replace platform ISC_PLATFORM_HAVETFO with config ENABLE_TCP_FASTOPEN 2018-09-07 12:17:30 +02:00
Ondřej Surý 092edb5b44 Replace platform ISC_PLATFORM_HAVEDEVPOLL with check for devpoll.h headers 2018-09-07 12:17:30 +02:00
Ondřej Surý 5d65392d18 Replace platform ISC_PLATFORM_HAVEEPOLL with config HAVE_EPOLL_CREATE1 2018-09-07 12:17:30 +02:00
Ondřej Surý 68f473a25e Replace platform ISC_PLATFORM_HAVEKQUEUE with config HAVE_KQUEUE 2018-09-07 12:17:30 +02:00
Ondřej Surý d00ef56dfa Remove dummy ISC_PLATFORM_HAVESTRINGSH platform define 2018-09-07 12:17:30 +02:00
Ondřej Surý 47f18c7d50 Replace platform ISC_PLATFORM_NEEDSTRLCPY and ISC_PLATFORM_NEEDSTRLCAT with AC_CHECK_FUNCS call 2018-09-07 12:17:30 +02:00
Ondřej Surý 4014bc42dd According to POSIX.1-2001, POSIX.1-2008 #include <sys/select.h> is correct way to get fd_set 2018-09-07 12:17:30 +02:00
Ondřej Surý 1333d4a71a Remove dummy ISC_PLATFORM_HAVELIFCONF platform define 2018-09-07 12:17:30 +02:00
Ondřej Surý 0bea5c2baf Replace platform.h ISC_PLATFORM_HAVEIFNAMETOINDEX with config HAVE_IF_NAMETOINDEX 2018-09-07 12:17:30 +02:00
Ondřej Surý 53d87175df Remove dummy ISC_PLATFORM_HAVEIF_LADDRREQ platform define 2018-09-07 12:17:30 +02:00
Ondřej Surý c798db0fcd Remove dummy ISC_PLATFORM_HAVEIF_LADDRCONF define 2018-09-07 12:17:30 +02:00
Ondřej Surý f8635fd719 Remove dummy ISC_PLATFORM_NEEDSTRCASESTR define from platform.h 2018-09-07 12:17:30 +02:00
Ondřej Surý 22e5231f99 Remove ISC_PLATFORM_BUSYWAITNOP in favour of direct isc_rwlock_pause() define 2018-09-07 12:17:29 +02:00
Ondřej Surý 376bea8b40 Cleanup the custom atomic defines from Windows and remove empty atomic_test.c 2018-09-07 12:17:29 +02:00
Ondřej Surý 510bb376e1 Define platform.h ISC_PLATFORM_USEBACKTRACE with config.h USE_BACKTRACE 2018-09-07 12:17:29 +02:00
Ondřej Surý 3949450fbd Merge branch '521-align-cmsg-buffers' into 'master'
Resolve "BIND 9.11.4 terminates with SIGBUS error when compiled with Oracle Developer Studio 12.6"

Closes #521

See merge request isc-projects/bind9!758
2018-09-07 04:26:10 -04:00
Witold Kręcicki 17212cf996 Align CMSG buffers to a void* boundary, fixes crash on architectures with strict alignment
CHANGES entry
2018-09-07 09:34:32 +02:00
Evan Hunt a985badd34 Merge branch 'missing-test' into 'master'
the allow-query test was in conf.sh.win32 as allow_query, so was skipped

See merge request isc-projects/bind9!767
2018-09-05 21:04:02 -04:00
Evan Hunt 881a868dc0 the allow-query test was in conf.sh.win32 as allow_query, so was skipped 2018-09-05 18:02:40 -07:00
Evan Hunt 3561018919 Merge branch 'fix-windows' into 'master'
add ws2_32.lib where missing

See merge request isc-projects/bind9!766
2018-09-05 20:15:26 -04:00
Evan Hunt 1aa3ba2bb1 add ws2_32.lib where missing 2018-09-05 16:54:47 -07:00
Mark Andrews 633eeabb2e Merge branch 'cplusplusize_dns_fixedname_h-master' into 'master'
Add C++ declarations to dns/fixedname.h

See merge request isc-projects/bind9!764
2018-09-05 18:27:30 -04:00
Ondřej SurýandMark Andrews ac21bbb13a Add C++ declarations to dns/fixedname.h
(cherry picked from commit 94a1c85366)
2018-09-06 08:11:30 +10:00
Evan Hunt ca6dda7328 Merge branch 'fix-windows' into 'master'
move ws2_32.lib to the end of AdditionalDependencies

See merge request isc-projects/bind9!761
2018-09-05 17:26:27 -04:00
Evan Hunt f8d9bd6178 move ws2_32.lib to the end of AdditionalDependencies 2018-09-05 14:25:38 -07:00
Evan Hunt f6c08a28e8 Merge branch '528-use-default-memory-ordering-on-win32' into 'master'
Resolve "32bit build on windows is currently broken"

Closes #528

See merge request isc-projects/bind9!760
2018-09-05 16:39:00 -04:00
Ondřej Surý 0dc714c40d On 32-bit Windows use only default memory ordering 2018-09-05 22:20:58 +02:00
Evan Hunt 8360df5a4c Merge branch '527-spurious-thread-report' into 'master'
Resolve "Master branch incorrectly reports missing thread support"

Closes #527

See merge request isc-projects/bind9!757
2018-09-04 15:06:34 -04:00
Evan Hunt 02041b94d9 remove startup log message indicating thread status 2018-09-04 11:58:26 -07:00
Tinderbox User 215e3fde22 Merge branch 'prep-release' 2018-09-04 06:12:49 +00:00
Tinderbox User 19ed6f8f5a prep 9.13.3 2018-09-04 06:11:38 +00:00
Evan Hunt 7157596743 Merge branch '192-release-notes' into 'master'
Add release notes about support for legacy platform being removed

Closes #523

See merge request isc-projects/bind9!750
2018-09-03 21:51:37 -04:00
Ondřej SurýandEvan Hunt 0868e5700f Update release notes to mention removal of legacy system workarounds 2018-09-03 18:50:58 -07:00
Ondřej Surý 3023f14c40 Merge branch 'fail-on-failed-install' into 'master'
Fail on failed install inside for loops

See merge request isc-projects/bind9!751
2018-09-03 06:18:53 -04:00
Ondřej Surý 142cb0ab8f Remove already removed headers from the Makefiles 2018-09-03 12:09:52 +02:00
Ondřej Surý 25248eb097 Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 12:05:45 +02:00
Evan Hunt 73b2648480 Merge branch 'solaris-fixes' into 'master'
Silence some warnings and errors

See merge request isc-projects/bind9!746
2018-08-31 16:57:12 -04:00
Witold KrecickiandEvan Hunt d932ec871c Silence some warnings and errors 2018-08-31 13:48:26 -07:00
Evan Hunt 0716902f6f Merge branch 'restore-readmes' into 'master'
restore accidentally erased README and related files

See merge request isc-projects/bind9!747
2018-08-31 15:56:13 -04:00
Evan Hunt 8a167a4b30 restore accidentally erased README and related files 2018-08-31 12:55:36 -07:00
Ondřej Surý 47066d3d01 Merge branch '10-clean-lib-isc-arch-Makefiles' into 'master'
Cleanup lib/isc/$arch/ Makefile.in(s) from configure.in

See merge request isc-projects/bind9!745
2018-08-31 08:27:27 -04:00
Ondřej SurýandOndřej Surý 75c2996df8 Cleanup lib/isc/$\arch/ Makefile.in(s) from configure.in 2018-08-31 08:19:15 -04:00
Ondřej Surý 5c00162f54 Merge branch '9.13.3-dev-build-doc' into 'master'
Update documentation (ARM, READMEs and man pages)

See merge request isc-projects/bind9!744
2018-08-31 06:22:24 -04:00
Ondřej SurýandOndřej Surý eb9849daff Update documentation (ARM, READMEs and man pages) 2018-08-31 06:03:42 -04:00
Mark Andrews 05bed0ecd6 Merge branch 'simplify' into 'master'
simplify

See merge request isc-projects/bind9!743
2018-08-31 05:02:17 -04:00
Mark Andrews 05eb9fd338 simplify 2018-08-31 18:47:29 +10:00
Mark Andrews 1b75d421b7 Merge branch '510-resolver-test-was-failing' into 'master'
Resolve "Resolver test was failing"

Closes #510

See merge request isc-projects/bind9!726
2018-08-31 03:56:16 -04:00
Mark AndrewsandWitold Krecicki feaf381adb use pack to construct the reply as Net::DNS just get it wrong 2018-08-31 03:47:56 -04:00
Mark Andrews 38f96de923 Merge branch '150-remove-workarounds-for-servers-that-are-not-edns-compliant' into 'master'
Resolve "Remove workarounds for servers that are not EDNS compliant."

Closes #150

See merge request isc-projects/bind9!555
2018-08-31 00:43:57 -04:00
Evan HuntandMark Andrews 5e37190877 add documentation 2018-08-31 14:34:31 +10:00
Mark AndrewsandEvan Hunt 615ebc39e3 remove EDNS workarounds, update legacy test 2018-08-30 21:17:00 -07:00
Mark AndrewsandEvan Hunt e7e4603f9b bring up interfaces 9 and 10 2018-08-30 21:16:59 -07:00
Mark AndrewsandEvan Hunt c81c9660f5 add -T ednsformerr/ednsnotimp/ednsrefused 2018-08-30 21:16:59 -07:00
Mark Andrews c0c80df254 Merge branch '418-bind-in-auto-dnssec-mode-should-support-signature-expiration-jitter' into 'master'
Resolve "BIND in auto-dnssec mode should support signature expiration jitter"

Closes #418

See merge request isc-projects/bind9!662
2018-08-30 22:46:15 -04:00
Mark Andrews d68499e1f7 add changes note 2018-08-30 22:37:09 -04:00
Mark Andrews 8e5abc6cdf report initial RRSIG expiry field values 2018-08-30 22:37:08 -04:00
Mark Andrews 050fca2139 increase jitter to cover the entire potential steady state expire range when initially signing the zone 2018-08-30 22:37:08 -04:00
Mark Andrews c5b4948db3 Merge branch '519-unclosed-files-in-lib-dns-tests-zt_test-c' into 'master'
Resolve "unclosed files in lib/dns/tests/zt_test.c"

Closes #519

See merge request isc-projects/bind9!736
2018-08-30 22:23:23 -04:00
Mark Andrews 455bb23236 fclose origfile and zonefile 2018-08-31 12:13:19 +10:00
Vicky Risk bbaff4d80f Merge branch 'patch-2' into 'master'
Update release.md

See merge request isc-projects/bind9!735
2018-08-30 17:01:26 -04:00
Vicky Risk e6106b9940 Update release.md 2018-08-30 14:47:26 -04:00
Ondřej Surý 7ee4f849b8 Merge branch 'checklist2' into 'master'
Proposed release checklist

See merge request isc-projects/bind9!734
2018-08-30 11:33:23 -04:00
Vicky Risk d9d96761cd Proposed release checklist 2018-08-30 11:15:46 -04:00
Evan Hunt 59156c60eb Merge branch 'fix-configure-loop' into 'master'
configure could loop if --with-pic was specified

See merge request isc-projects/bind9!731
2018-08-29 19:28:33 -04:00
Evan Hunt d3e2f848ec configure could loop if --with-pic was specified 2018-08-29 19:19:50 -04:00
Ondřej Surý 6a9031b0a6 Merge branch '509-fix-strerr_r-on-Windows' into 'master'
Resolve "current master not building on ubuntu 16.04 using --with-libtool --enable-developer" also on Windows

See merge request isc-projects/bind9!730
2018-08-29 16:53:41 -04:00
Ondřej Surý e582d085de Fix InterlockedCompareExchange64Acquire -> InterlockedCompareExchangeAcquire64 and variants 2018-08-29 22:23:46 +02:00
Ondřej Surý 7f508ec229 Link arpaname and mdig with ws2_32.lib 2018-08-29 22:16:37 +02:00
Ondřej Surý d67b07c115 gai_strerror on Windows is just 'char *' 2018-08-29 22:05:09 +02:00
Ondřej Surý 7cba3cc474 Bump the minimum required Windows version to Windows Vista and Windows Server 2008 2018-08-29 22:03:09 +02:00
Ondřej Surý c74ee5bb17 Remove *_loadnew from libdns.def.in 2018-08-29 21:36:27 +02:00
Ondřej Surý d967e107f6 Remove isc_net_pton and isc_net_ntop from Windows libisc.def.in 2018-08-29 21:21:52 +02:00
Ondřej Surý aa3e33575d Fixup Windows build after strerr changes 2018-08-29 21:21:52 +02:00
Ondřej Surý 7d44cc2422 Merge branch '495-pic-dlopen' into 'master'
Resolve "building with libtool requires either pic or dlopen to be enabled"

Closes #495

See merge request isc-projects/bind9!704
2018-08-29 11:02:25 -04:00
Ondřej Surý d60e553a64 -Xcompiler -shared is generally needed when using libtool on Linux, not only when -ld is present 2018-08-29 16:37:26 +02:00
Ondřej Surý d03b9ec544 Make dnsrps play well with dlopen 2018-08-29 16:37:26 +02:00
Ondřej Surý 77f71d7d4a Rewrite dlopen detection using modern autoconf language constructs 2018-08-29 16:37:26 +02:00
Evan HuntandOndřej Surý 5928d31efc make --without-pic imply --disable-shared and --without-dlopen 2018-08-29 16:37:26 +02:00
Ondřej Surý ae80e61684 Merge branch '509-use-xsi-strerror_r' into 'master'
Resolve "current master not building on ubuntu 16.04 using --with-libtool --enable-developer"

Closes #509

See merge request isc-projects/bind9!727
2018-08-29 07:43:51 -04:00
Evan HuntandOndřej Surý 1656152d76 Ensure that POSIX strerror_r variant is use even when _GNU_SOURCE is enabled by default 2018-08-29 13:31:28 +02:00
Ondřej Surý cacd21c075 Enable system extensions macros using AC_USE_SYSTEM_EXTENSIONS
and remove handcrafted code that enabled __EXTENSIONS__ and _GNU_SOURCE
2018-08-29 13:31:27 +02:00
Evan Hunt b938f50ded Merge branch 'silence-warning' into 'master'
silence "missing print.h" warning

See merge request isc-projects/bind9!723
2018-08-28 19:21:33 -04:00
Evan Hunt 3c18b7d3fd silence "missing print.h" warning 2018-08-28 15:59:20 -07:00
Ondřej Surý e2a2f08ed5 Merge branch 'fix-missing-ipv6.h' into 'master'
Remove broken @ISC_IPV6_H@ placeholder from Makefile.in

See merge request isc-projects/bind9!720
2018-08-28 15:33:05 -04:00
Ondřej Surý dc410ce58f Remove broken @ISC_IPV6_H@ placeholder from Makefile.in 2018-08-28 21:15:32 +02:00
Witold Krecicki 416e09d715 Merge branch 'set-sndbuf' into 'master'
Set sndbuf

See merge request isc-projects/bind9!74
2018-08-28 14:33:57 -04:00
Witold Kręcicki 103b60e0bc Pre-merge nits 2018-08-28 20:25:36 +02:00
Mukund SivaramanandWitold Kręcicki d077f5c180 Add CHANGES entry 2018-08-28 20:20:25 +02:00
Evan HuntandWitold Kręcicki cddb699690 style nits 2018-08-28 20:19:47 +02:00
Mukund SivaramanandWitold Kręcicki 700614a0eb Set SO_SNDBUF 2018-08-28 20:19:47 +02:00
Witold Krecicki cc8a647887 Merge branch '276-rndc-reconfig-fixes' into 'master'
Resolve "rndc reconfig now performs stat() for all zones"

Closes #276

See merge request isc-projects/bind9!518
2018-08-28 11:16:47 -04:00
Witold Kręcicki c4c3b98a27 CHANGES note 2018-08-28 17:05:28 +02:00
Witold Kręcicki 79ce86090a rndc reconfig should not touch already loaded zones, some refactoring of dns_{zone,view,zt}_{async,}load 2018-08-28 17:04:45 +02:00
Ondřej Surý c268c47c76 Merge branch '178-remove-isc_keyboard' into 'master'
Remove isc_keyboard family of functions

See merge request isc-projects/bind9!718
2018-08-28 08:47:40 -04:00
Ondřej Surý dedb104382 Add CHANGES note for GL #178.
5023.   [cleanup]       Remove isc_keyboard family of functions. [GL #178]
2018-08-28 14:37:30 +02:00
Ondřej Surý fecbc7923a Remove isc_keyboard family of functions as they were not used anywhere 2018-08-28 14:37:30 +02:00
Ondřej Surý 6034664e36 Merge branch '10-use-atomic_builtins' into 'master'
Resolve "Use and require atomic primitives support"

Closes #10

See merge request isc-projects/bind9!657
2018-08-28 07:53:41 -04:00
Ondřej Surý ddaa853ed6 Add CHANGES note for GL #10.
5023.	[func]		Replace custom assembly for atomic operations with
			atomic support from the compiler. The code will now use
			C11 stdatomic, or __atomic, or __sync builtins with GCC
			or Clang compilers, and Interlocked functions with MSVC.
			[GL #10]
2018-08-28 13:15:59 +02:00
Ondřej Surý 91aa405778 Update the isc_refcount documentation in doxygen format 2018-08-28 13:15:59 +02:00
Ondřej Surý 0f24c55d38 Refactor *_destroy and *_detach functions to unified order of actions.
This properly orders clearing the freed pointer and calling isc_refcount_destroy
as early as possible to have ability to put proper memory barrier when cleaning
up reference counting.
2018-08-28 13:15:59 +02:00
Ondřej Surý 9d5df99a9d Directly use return value of atomic_compare_exchange_strong_explicit insteaf of comparing expected value 2018-08-28 12:15:39 +02:00
Ondřej Surý b5709e5531 Explicitly load atomic values in lib/isc/rwlock.c 2018-08-28 12:15:39 +02:00
Ondřej Surý d1d15c03e2 Switch everything back to relaxed memory ordering 2018-08-28 12:15:39 +02:00
Ondřej Surý 69b9b9ec77 Remove no-op NODE_STRONG(UN)?LOCK and rename NODE_WEAK(UN)?LOCK to just NODE_(UN)?LOCK 2018-08-28 12:15:39 +02:00
Ondřej Surý bef8ac5bae Rewrite isc_refcount API to fetch_and_<op>, instead of former <op>_and_<fetch> 2018-08-28 12:15:39 +02:00
Ondřej Surý 7fbbf09d21 Remove checks for atomic rwlock from rbtdb.cz and zone.c 2018-08-28 12:15:39 +02:00
Ondřej Surý 2b74478c8f Remove check for atomic isc_refcount in dns/rbt.h and always use isc_refcount 2018-08-28 12:15:39 +02:00
Ondřej Surý 93e8ba1b50 Rewrite reference counting in isc_mem to use isc_refcount API 2018-08-28 12:15:39 +02:00
Ondřej Surý 0a7535ac81 isc_refcount_init() now doesn't return isc_result_t and asserts on failed initialization 2018-08-28 12:15:39 +02:00
Ondřej Surý e9e55cbd03 Remove isc_atomic usage from rwlock.c and stats.c 2018-08-28 12:15:39 +02:00
Ondřej Surý e119de4169 Replace arch specific atomic.h with global atomic.h header using either stdatomic, __atomic or __sync primitives 2018-08-28 12:15:39 +02:00
Ondřej Surý facc390b54 Update configure.in to check for both stdatomic.h and __atomic builtins 2018-08-28 12:15:39 +02:00
Ondřej Surý 7ab9c9dbee Merge branch 'remove-dnsperf-and-queryperf-from-contrib' into 'master'
Remove dnsperf, queryperf and perftcpdns from contrib

See merge request isc-projects/bind9!717
2018-08-28 06:05:52 -04:00
Ondřej Surý ecb27adf86 Remove dnsperf, queryperf and perftcpdns from util/copyrights 2018-08-28 11:49:28 +02:00
Ondřej Surý f4c8e42f3e Update contrib/README with new locations for dnsperf, queryperf, and perftcpdns 2018-08-28 11:44:58 +02:00
Ondřej Surý 7de898777f Remove perftcpdns from BIND 9 repository 2018-08-28 11:42:31 +02:00
Ondřej Surý 1e404fdb0e Remove queryperf from BIND 9 repository 2018-08-28 11:42:14 +02:00
Ondřej Surý 99f17b80b8 Remove dnsperf and dnsperf-patches from BIND 9 repository 2018-08-28 11:41:58 +02:00
Ondřej Surý b6e64eb23b Merge branch '192-make-ipv6-mandatory' into 'master'
Remove all kind of legacy compatibility layers (including IPv6, networking and functions defined by C99 or POSIX.1)

Closes #192

See merge request isc-projects/bind9!668
2018-08-28 04:51:38 -04:00
Ondřej Surý 2c19877197 Add CHANGES entry for GL #192
5016.   [cleanup]       Remove wrappers that try to fix broken or incomplete
                        implementations of IPv6, pthreads and other core
                        functionality required and used by BIND. [GL #192]
2018-08-28 10:36:41 +02:00
Ondřej Surý 19a374e45d Cleanup util/copyrights 2018-08-28 10:36:41 +02:00
Ondřej Surý a8b868e820 Add release notes entry. 2018-08-28 10:31:49 +02:00
Ondřej Surý f1d658764c Remove dead check for long long support 2018-08-28 10:31:49 +02:00
Ondřej Surý 52e1c45156 Assume PTHREAD_ONCE_INIT is not broken (remove support for ancient Solaris) 2018-08-28 10:31:48 +02:00
Ondřej Surý a11a271b28 Assume non-broken recvmsg 2018-08-28 10:31:48 +02:00
Ondřej Surý 1672935717 Use strerror_r from POSIX.1-2001 (strerror_s on Windows) instead of custom isc__strerror() 2018-08-28 10:31:48 +02:00
Ondřej Surý efd613e874 memmove, strtoul, and strcasestr functions are part of ISO C90, remove the compatibility shim 2018-08-28 10:31:48 +02:00
Ondřej Surý 1e1804bb96 getifaddrs() is available on all supported Unix platforms (Linux, BSDs, macOS and Solaris) 2018-08-28 10:31:48 +02:00
Ondřej Surý 62fb0759e9 Assume always working getaddrinfo/getnameinfo implemenation 2018-08-28 10:31:48 +02:00
Ondřej Surý 29c853f500 Remove check for isc_port_t; Windows never have it, Unix always have it 2018-08-28 10:31:48 +02:00
Ondřej Surý 40f7680efa Ignore sockaddr_{sin,sin6,sun}.{sin,sin6,sun}_len even on systems that define it 2018-08-28 10:31:48 +02:00
Ondřej Surý e6dc08b06c Always assume BSD4.4 msghdr version 2018-08-28 10:31:48 +02:00
Ondřej Surý 388d6db5a1 Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support 2018-08-28 10:31:48 +02:00
Ondřej Surý 3ab9c99567 Remove support for legacy systems without in6_pktinfo 2018-08-28 10:31:48 +02:00
Ondřej Surý 8c526df306 Remove support for legacy systems without sin6_scope_id 2018-08-28 10:31:48 +02:00
Ondřej Surý 4150a86046 Remove support for legacy platforms without in6addr_loopback 2018-08-28 10:31:48 +02:00
Ondřej Surý 5083a42072 Remove support for legacy systems without in6addr_any 2018-08-28 10:31:48 +02:00
Ondřej Surý b962f47d3e Remove support for pre-RFC2133 IPv6 implementation (in_addr6) 2018-08-28 10:31:48 +02:00
Ondřej Surý 243a347d60 Remove support for legacy KAME IPv6 stack 2018-08-28 10:31:47 +02:00
Ondřej Surý 7b21bbb7c1 Require IPv6 support from the OS 2018-08-28 10:31:47 +02:00
Ondřej Surý 00ca487fec We always want IPv6 2018-08-28 10:31:47 +02:00
Ondřej Surý c19713aa51 Remove support for legacy SGI IRIX 2018-08-28 10:31:47 +02:00
Ondřej Surý 9f4528c623 Remove legacy support for Compaq TruCluster 2018-08-28 10:31:47 +02:00
Ondřej Surý 02e349c051 Remove legacy support for HP-UX 2018-08-28 10:31:47 +02:00
Ondřej Surý b02de1ec30 Remove legacy support for SunOS 2018-08-28 10:31:47 +02:00
Ondřej Surý 18e3c8d232 Remove legacy support for Tru64 2018-08-28 10:31:47 +02:00
Ondřej Surý f0f71420c8 Remove legacy support for AIX 2018-08-28 10:31:47 +02:00
Ondřej Surý 9a8da1e25a Remove legacy BSD/OS support (ipv6,various hacks) 2018-08-28 10:31:47 +02:00
Ondřej Surý e53a72a649 Remove legacy UnixWare support (sigwait, ipv6) 2018-08-28 10:31:47 +02:00
Ondřej Surý 518772e4e0 Merge branch 'gitlab-ci-dont-run-make-clean' into 'master'
Disable make clean at the end of configure step in GitLab CI

See merge request isc-projects/bind9!714
2018-08-28 01:18:18 -04:00
Ondřej Surý a1d783bbe2 Disable make clean at the end of configure step in GitLab CI 2018-08-28 07:09:18 +02:00
Ondřej Surý ca0ce1cb42 Merge branch '496-fix-freebsd-issue' into 'master'
threads.h was missing on C11/thread_local builds

Closes #496

See merge request isc-projects/bind9!712
2018-08-27 14:34:47 -04:00
Witold Kręcicki 525fd76685 Include threads.h for thread_local 2018-08-27 16:41:43 +02:00
Stephen Morris 760182271e Merge branch '498-clang-scan-build-detected-errors' into 'master'
Resolve "clang scan-build detected errors"

Closes #498

See merge request isc-projects/bind9!703
2018-08-27 10:25:22 -04:00
Ondřej SurýandStephen Morris de41f0beea Cleanup couple of set-but-unused errors from Coverity 2018-08-27 10:12:19 -04:00
Ondřej SurýandStephen Morris 55361748d7 Initialize all tvresults to ISC_R_UNSET 2018-08-27 10:12:19 -04:00
Witold Krecicki edf5c01fcb Merge branch '499-fix-rsabigexponent-with-pkc11' into 'master'
Resolve "rsabigexponent test is broken w/pkcs11"

Closes #499

See merge request isc-projects/bind9!711
2018-08-27 05:33:29 -04:00
Ondřej Surý 8b3878dc7d Run rsabigexponent test only when OpenSSL is used as cryptography provider 2018-08-27 11:24:32 +02:00
Mark Andrews dc4086d4f2 Merge branch 'update-documentation-for-ms-and-krb5-rules' into 'master'
update {krb5,ms}-{self,subdomain} descriptions

See merge request isc-projects/bind9!708
2018-08-27 02:58:36 -04:00
Mark Andrews a3c5c2c29c add CHANGES note 2018-08-27 16:46:07 +10:00
Mark Andrews 0370d13667 update {krb5,ms}-{self,subdomain} descriptions 2018-08-27 16:39:51 +10:00
Mark Andrews 25bb33c866 Merge branch '487-reset-dig-exit-code-after-a-tcp-connection-is-established' into 'master'
Reset dig exit code after a TCP connection is established

Closes #487

See merge request isc-projects/bind9!698
2018-08-27 00:07:21 -04:00
Michał KępieńandMark Andrews 59057bee5b Add CHANGES entry
5020.	[bug]		dig returned a non-zero exit code when it received a
			reply over TCP after a retry. [GL #487]
2018-08-27 13:58:43 +10:00
Michał KępieńandMark Andrews deb3b85cb2 Reset dig exit code after a TCP connection is established
The "exitcode" variable is set to 9 if a TCP connection fails, but is
not reset to 0 if a subsequent TCP connection succeeds.  This causes dig
to return a non-zero exit code if it succeeds in getting a TCP response
after a retry.  Fix by resetting "exitcode" to 0 if connect_done()
receives an event with the "result" field set to ISC_R_SUCCESS.
2018-08-27 13:58:08 +10:00
Michał Kępień d3bd90f3a7 Merge branch 'set-use-alt-transfer-source-no-in-the-mirror-system-test' into 'master'
Set "use-alt-transfer-source no;" in the "mirror" system test

See merge request isc-projects/bind9!705
2018-08-25 16:20:28 -04:00
Michał Kępień a23162ab28 Set "use-alt-transfer-source no;" in the "mirror" system test
Force ns3 to use a constant source address (10.53.0.3) when sending
transfer requests for the "initially-unavailable" zone to prevent
failures of transfers not triggered by bin/tests/system/mirror/tests.sh
from causing fallback to using a source address for which transfers of
that zone are refused throughout the entire "mirror" system test since
that might yield false positives.
2018-08-25 21:48:17 +02:00
Ondřej Surý 8f37439ccf Merge branch '496-tls-in-rng' into 'master'
Resolve "RNG should not be locking"

Closes #340 and #496

See merge request isc-projects/bind9!697
2018-08-25 08:08:13 -04:00
Ondřej Surý 7ab228cf71 Use __declspec( thread ) for thread local storage when compiling with Visual Studio 2015 and higher 2018-08-25 13:59:26 +02:00
Witold Kręcicki 18ebcf2b30 Add runtime check on top of pthread_mutex_{lock,unlock} in rng 2018-08-25 13:26:25 +02:00
Witold Kręcicki 8c5aeb6c4c Use TLS variables to store RNG state, make RNG lockless 2018-08-25 13:26:25 +02:00
Ondřej Surý e79b42fec0 Merge branch 'fix-line-continuation-in-fuzz-Makefile.in' into 'master'
Fix line continuation in fuzz/Makefile.in

See merge request isc-projects/bind9!699
2018-08-24 11:01:10 -04:00
Michał Kępień 875b29c3e3 Fix line continuation in fuzz/Makefile.in
Add a missing semicolon to prevent "make test" run from the top-level
directory from failing even when all system and unit tests succeed due
to "(cd fuzz && ${MAKE} check)" returning a non-zero exit code.
2018-08-24 14:00:32 +02:00
Michał Kępień ba350f40ff Merge branch '470-log-a-message-when-ixfr-from-differences-is-set-for-an-inline-signed-zone' into 'master'
Log a message when "ixfr-from-differences" is set for an inline-signed zone

Closes #470

See merge request isc-projects/bind9!648
2018-08-24 04:35:29 -04:00
Michał Kępień 4fb5d072c2 Add CHANGES entry
5019.	[cleanup]	A message is now logged when ixfr-from-differences is
			set at zone level for an inline-signed zone. [GL #470]
2018-08-24 10:18:59 +02:00
Michał Kępień 087157d14f Log a message when "ixfr-from-differences" is set for an inline-signed zone
For inline-signed zones, the value of "ixfr-from-differences" is
hardcoded to:

  - "yes" for the raw version of the zone,
  - "no" for the signed version of the zone.

In other words, any user-provided "ixfr-from-differences" setting is
effectively ignored for an inline-signed zone.  Ensure the user is aware
of that by adding a note to the ARM and logging a message when an
"ixfr-from-differences" option is found at the zone level.
2018-08-24 10:18:59 +02:00
Michał Kępień 2359f06aa6 Merge branch '491-prevent-a-race-in-the-inline-system-test' into 'master'
Prevent a race in the "inline" system test

Closes #491

See merge request isc-projects/bind9!682
2018-08-24 03:55:13 -04:00
Michał Kępień e36c869e85 Prevent a race in the "inline" system test
A short time window exists between logging the addition of an NSEC3PARAM
record to a zone and committing it to the current version of the zone
database.  If a query arrives during such a time window, an unsigned
response will be returned.  One of the checks in the "inline" system
test requires NSEC3 records to be present in an answer - that check
would fail in the case described above.  Use rndc instead of log
watching for checking whether zone signing and NSEC3 chain modifications
are complete in order to prevent intermittent "inline" system test
failures.
2018-08-24 09:37:37 +02:00
Mark Andrews 1c82dde85c Merge branch 'fix-non-portable' into 'master'
use sizeof(CK_SLOT_ID)

See merge request isc-projects/bind9!588
2018-08-23 21:29:52 -04:00
Mark Andrews 42b16771db add CHANGES note 2018-08-24 11:02:27 +10:00
Mark Andrews 2c1d8b2e99 use sizeof(CK_SLOT_ID) 2018-08-24 11:00:39 +10:00
Mark Andrews 751c660b9d Merge branch 'value-not-updated-atomically' into 'master'
unlink before unlock

See merge request isc-projects/bind9!589
2018-08-23 20:49:38 -04:00
Mark Andrews 05531d3a86 add CHANGES note 2018-08-24 10:41:11 +10:00
Mark Andrews 4742f4ecba unlink before unlock 2018-08-24 10:36:53 +10:00
Mark Andrews e59617441e Merge branch '445-filter-aaaa-and-dns64-can-both-attempt-to-recurse-for-a-records-at-the-same-time' into 'master'
Resolve "filter-aaaa and dns64 can both attempt to recurse for A records at the same time"

Closes #445

See merge request isc-projects/bind9!561
2018-08-23 19:44:18 -04:00
Mark Andrews c1bc3baf7f add CHANGES note 2018-08-24 09:29:35 +10:00
Mark Andrews 1056376d10 when filter-aaaa and dns64 are both configured a assertion failure could occur 2018-08-24 09:26:54 +10:00
Evan Hunt 0213626992 Merge branch '436-fix-dnstap-test' into 'master'
Resolve "dnstap tests are failing in Jenkins"

Closes #436

See merge request isc-projects/bind9!683
2018-08-23 14:11:45 -04:00
Evan Hunt 0d6f504ba3 specify "dnssec-validation yes" instead of default "auto" 2018-08-23 13:52:57 -04:00
Ondřej Surý af1df8738f Merge branch 'bump-to-9.13.3-dev' into 'master'
Bump the version in the master to 9.13.3-dev

See merge request isc-projects/bind9!679
2018-08-23 06:11:51 -04:00
Ondřej SurýandOndřej Surý ca9aaf926f Bump the version in the master to 9.13.3-dev 2018-08-23 06:02:24 -04:00
Ondřej Surý 591a6c94ee Merge branch 'run-update_copyrights' into 'master'
Run update copyrights in precheck stage

See merge request isc-projects/bind9!680
2018-08-23 05:52:56 -04:00
Ondřej Surý 4016369212 Check update_copyright results in precheck stage 2018-08-23 11:39:01 +02:00
Ondřej Surý 31b5360943 Whitespace fixes 2018-08-23 11:39:01 +02:00
Ondřej Surý 65de91f512 Cleanup cruft in util/copyrights 2018-08-23 11:39:01 +02:00
Ondřej Surý db3d69263d Make update_copyrights return error code when error is encountered during processing the files 2018-08-23 11:38:21 +02:00
Ondřej Surý d877d4a561 Merge branch 'bshastry/bind9-oss-fuzz' into 'master'
Add a skeleton directory for the oss-fuzz testing

See merge request isc-projects/bind9!530
2018-08-23 04:27:11 -04:00
Bhargava ShastryandOndřej Surý 1c57b73e34 oss-fuzz: Improve interaction with fuzzing tools and add new tests in fuzz/ directory 2018-08-23 10:07:28 +02:00
Evan Hunt d30b90dba6 Merge branch '484-fix-non-libtool-build' into 'master'
Resolve "Build Fails with --enable-developer when building without libtool"

Closes #484

See merge request isc-projects/bind9!676
2018-08-22 17:00:52 -04:00
Evan Hunt e67f81bbf1 set PTHREAD_CFLAGS when building backtrace_test_nosymtbl 2018-08-22 13:52:03 -07:00
Michał Kępień cb28c27b30 Merge branch '435-fix-reloading-inline-signed-zones' into 'master'
Fix reloading inline-signed zones

Closes #435

See merge request isc-projects/bind9!664
2018-08-22 06:00:56 -04:00
Michał Kępień f9931f1d22 Add CHANGES entry
5015.	[bug]		Reloading all zones caused zone maintenance to cease
			for inline-signed zones. [GL #435]
2018-08-22 11:28:54 +02:00
Michał Kępień 5431583971 Fix reloading inline-signed zones
While "rndc reload" causes dns_zone_asyncload() to be called for the
signed version of an inline-signed zone, the subsequent zone_load() call
causes the raw version to be reloaded from storage.  This means that
DNS_ZONEFLG_LOADPENDING gets set for the signed version of the zone by
dns_zone_asyncload() before the reload is attempted, but zone_postload()
is only called for the raw version and thus DNS_ZONEFLG_LOADPENDING is
cleared for the raw version, but not for the signed version.  This in
turn prevents zone maintenance from happening for the signed version of
the zone.

Until commit 29b7efdd9f, this problem
remained dormant because DNS_ZONEFLG_LOADPENDING was previously
immediately, unconditionally cleared after zone loading was started
(whereas it should only be cleared when zone loading is finished or an
error occurs).  This behavior caused other issues [1] and thus had to be
changed.

Fix reloading inline-signed zones by clearing DNS_ZONEFLG_LOADPENDING
for the signed version of the zone once the raw version reload
completes.  Take care not to clear it prematurely during initial zone
load.  Also make sure that DNS_ZONEFLG_LOADPENDING gets cleared when
zone_postload() encounters an error or returns early, to prevent other
scenarios from resulting in the same problem.  Add comments aiming to
help explain code flow.

[1] see RT #47076
2018-08-22 11:28:54 +02:00
Michał Kępień d2785afebe Merge branch '482-fix-secure-journal-loading-for-inline-signed-zones' into 'master'
Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone

Closes #482

See merge request isc-projects/bind9!663
2018-08-22 05:21:20 -04:00
Michał Kępień b3b1a9081b Add CHANGES entry
5014.	[bug]		Signatures loaded from the journal for the signed
			version of an inline-signed zone were not scheduled for
			refresh. [GL #482]
2018-08-22 10:48:07 +02:00
Michał Kępień 8db550c42f Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone
When an inline-signed zone is loaded, the master file for its signed
version is loaded and then a rollforward of the journal for the signed
version of the zone is performed.  If DNS_JOURNALOPT_RESIGN is not set
during the latter phase, signatures loaded from the journal for the
signed version of the zone will not be scheduled for refresh.  Fix the
conditional expression determining which flags should be used for the
dns_journal_rollforward() call so that DNS_JOURNALOPT_RESIGN is set when
zone_postload() is called for the signed version of an inline-signed
zone.

Extend bin/tests/system/stop.pl so that it can use "rndc halt" instead
of "rndc stop" as the former allows master file flushing upon shutdown
to be suppressed.
2018-08-22 10:48:07 +02:00
Michał Kępień 71793853df Merge branch '390-do-not-treat-a-referral-with-a-non-empty-answer-section-as-an-error' into 'master'
Do not treat a referral with a non-empty ANSWER section as an error

Closes #390

See merge request isc-projects/bind9!628
2018-08-22 04:42:58 -04:00
Michał Kępień 2923ab4945 Add CHANGES entry
5013.	[bug]		A referral response with a non-empty ANSWER section was
			inadvertently being treated as an error. [GL #390]
2018-08-22 10:14:39 +02:00
Michał Kępień 24b9ec555a Do not treat a referral with a non-empty ANSWER section as an error
As part of resquery_response() refactoring [1], a goto statement was
replaced [2] with a call to a new function - originally called
rctx_delegation(), now folded into rctx_answer_none() - extracted from
existing code.  However, one call site of that refactored function does
not reset the "result" variable, causing a referral with a non-empty
ANSWER section to be inadvertently treated as an error, which prevents
resolution of names reliant on servers sending such responses.  Fix by
resetting the "result" variable to ISC_R_SUCCESS when a response
containing a non-empty ANSWER section can be treated as a delegation.

[1] see RT #45362

[2] see commit e1380a16741a3b4a57e54d7a9ce09dd12691522f
2018-08-22 10:14:37 +02:00
Mark Andrews 3596bad5ce Merge branch 'fix-lock-order-reversal' into 'master'
fix lock order reversal

See merge request isc-projects/bind9!590
2018-08-20 23:17:33 -04:00
Mark Andrews 083007e930 add CHANGES note 2018-08-21 12:18:27 +10:00
Mark Andrews 2bb4392bb3 fix lock order reversal 2018-08-20 22:15:18 -04:00
Ondřej Surý bf98eb41bf Merge branch 'configure.in-cmocka-CFLAGS-fix' into 'master'
Fix missing $ in CMOCKA_CFLAGS when --with-cmocka=<path> was used

See merge request isc-projects/bind9!665
2018-08-17 09:37:31 -04:00
Ondřej Surý ab9f12c7f4 Fix missing $ in CMOCKA_CFLAGS when --with-cmocka=<path> was used 2018-08-17 15:28:42 +02:00
Witold Krecicki 28cf1a7a9c Merge branch '478-remove-support-for-unthreaded-bind' into 'master'
Remove support for unthreaded BIND

Closes #478

See merge request isc-projects/bind9!655
2018-08-16 15:09:43 -04:00
Witold Kręcicki 44cec639c4 CHANGES/notes/docs 2018-08-16 19:46:10 +02:00
Ondřej SurýandWitold Kręcicki c692da2182 Improve autoconf pthread detection 2018-08-16 17:18:52 +02:00
Witold Kręcicki 5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Ondřej Surý 8e164f784d Merge branch 'gitlab-ci-make-install-job' into 'master'
Add make install job to GitLab CI

See merge request isc-projects/bind9!661
2018-08-16 09:38:06 -04:00
Ondřej SurýandOndřej Surý 9c950e5961 Add install test job 2018-08-16 09:13:41 -04:00
Ondřej SurýandOndřej Surý 28748db0b2 paste config.log to output if configure ends up with failure 2018-08-16 09:13:41 -04:00
Ondřej Surý 1ff71c7cee Merge branch 'config.h-fixes' into 'master'
Replace "config.h" with <config.h>

See merge request isc-projects/bind9!660
2018-08-16 06:54:57 -04:00
Ondřej Surý e2c938d882 Replace "config.h" with <config.h> 2018-08-16 12:45:59 +02:00
Evan Hunt 0bdefcb599 Merge branch '237-validate-except' into 'master'
Resolve "dnssec-validation exception domains"

Closes #237

See merge request isc-projects/bind9!224
2018-08-14 16:38:00 -04:00
Evan Hunt 4eb0897c90 CHANGES, release notes, README 2018-08-14 13:28:02 -07:00
Evan Hunt 7ecd699e81 add a system test 2018-08-14 13:28:02 -07:00
Evan Hunt eaac2057c7 option to disable validation under specified names
- added new 'validate-except' option, which configures an NTA with
  expiry of 0xffffffff.  NTAs with that value in the expiry field do not
  expire, are are not written out when saving the NTA table and are not
  dumped by rndc secroots
2018-08-14 13:28:02 -07:00
Evan Hunt 509d71e1aa Merge branch '465-missing-check-in-acl_test-c-unit-test' into 'master'
Resolve "Missing check in acl_test.c unit test"

Closes #465

See merge request isc-projects/bind9!639
2018-08-14 12:13:04 -04:00
Mark AndrewsandEvan Hunt 0ce82e9d5f add missing ATF_REQUIRE 2018-08-14 09:04:16 -07:00
Ondřej Surý 53690ef21f Merge branch '476-fix-openssl-error-logging' into 'master'
Fix OpenSSL error logging

Closes #476

See merge request isc-projects/bind9!644
2018-08-14 07:05:20 -04:00
Michał Kępień cab7c34fbd Add CHANGES entry
5009.	[bug]		Upon an OpenSSL failure, the first error in the OpenSSL
			error queue was not logged. [GL #476]
2018-08-14 12:49:19 +02:00
Michał Kępień fe20f8fe25 Do not remove errors from the OpenSSL error queue in toresult()
dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().
2018-08-14 12:49:19 +02:00
Michał Kępień 527614c750 Merge branch '471-fix-rbt_insert_and_remove-unit-test' into 'master'
Prevent rare rbt_insert_and_remove unit test failures

Closes #471

See merge request isc-projects/bind9!614
2018-08-14 05:11:17 -04:00
Michał Kępień 13fe763798 Prevent rare rbt_insert_and_remove unit test failures
When two or more absolute, two-label names are added to a completely
empty RBT, an extra, empty node for the root name will be created due to
node splitting.  check_tree() expects that, but the extra node will not
be created when just one name is added to a completely empty RBT.  This
problem could be handled inside check_tree(), but that would introduce
unnecessary complexity into it since adding a single name will result in
a different node count for a completely empty RBT (node count will be 1)
and an RBT containing only an empty node for the root name, created due
to prior node splitting (node count will be 2).  Thus, first explicitly
create a node for the root name to prevent rare check_tree() failures
caused by a single name being added in the first iteration of the
insert/remove loop.
2018-08-14 10:43:51 +02:00
Michał Kępień 495e10ba5a Merge branch '285-make-the-inline-system-test-more-lightweight' into 'master'
Make the "inline" system test more lightweight

Closes #285

See merge request isc-projects/bind9!611
2018-08-14 04:38:57 -04:00
Michał Kępień 24dd865b97 Make the "inline" system test more lightweight
Each zone used in the "inline" system test contains a few dozen records.
Over a dozen of these zones are used in the test.  Most records present
in these zones are not subsequently used in the test itself, but all of
them need to be signed by the named instances launched by the test,
which puts quite a bit of strain on lower-end machines, leading to
intermittent failures of the "inline" system test.  Remove all redundant
records from the zones used in the "inline" system test in order to
stabilize it.
2018-08-14 10:16:08 +02:00
Evan Hunt e0d309572f Merge branch '474-mempool-is-broken-if-object-size-is-below-the-alignment-size' into 'master'
Resolve "mempool is broken if object size is below the alignment size"

Closes #474

See merge request isc-projects/bind9!635
2018-08-14 04:09:17 -04:00
Mark AndrewsandEvan Hunt 5dd1beec8e mempool didn't work for sizes less than sizeof(void*) 2018-08-14 03:47:14 -04:00
Michał Kępień dc5b8ec97a Merge branch '468-queue-rndc-signing-nsec3param-requests-if-needed' into 'master'
Queue "rndc signing -nsec3param ..." requests if needed

Closes #468

See merge request isc-projects/bind9!610
2018-08-14 03:44:53 -04:00
Michał Kępień eed6778be4 Add CHANGES entry
5008.	[bug]		"rndc signing -nsec3param ..." requests were silently
			ignored for zones which were not yet loaded or
			transferred. [GL #468]
2018-08-14 09:22:43 +02:00
Michał Kępień cb40c5229a Queue "rndc signing -nsec3param ..." requests if needed
If "rndc signing -nsec3param ..." is ran for a zone which has not yet
been loaded or transferred (i.e. its "db" field is NULL), it will be
silently ignored by named despite rndc logging an "nsec3param request
queued" message, which is misleading.  Prevent this by keeping a
per-zone queue of NSEC3PARAM change requests which arrive before a zone
is loaded or transferred and processing that queue once the raw version
of an inline-signed zone becomes available.
2018-08-14 09:22:43 +02:00
Ondřej Surý f34e7ee612 Merge branch '462-full-recv-queue-on-netbsd' into 'master'
Resolve "Full Recv-Queue"

Closes #462

See merge request isc-projects/bind9!629
2018-08-13 13:19:48 -04:00
Ondřej Surý ebf3083e08 Make ENOBUFS a soft error 2018-08-13 18:51:10 +02:00
Ondřej Surý 9689313331 Merge branch '9-use-C99-integer-types-fix-install' into 'master'
Don't try to install removed int.h and boolean.h headers

See merge request isc-projects/bind9!627
2018-08-13 09:38:55 -04:00
Mathieu ArnoldandOndřej Surý 4c06eb20cc Don't try to install removed int.h and boolean.h headers 2018-08-13 15:30:36 +02:00
Ondřej Surý a2188e61e7 Merge branch 'support-softhsm-2.4.0' into 'master'
Fix build failures on Debian sid

See merge request isc-projects/bind9!626
2018-08-13 07:22:25 -04:00
Ondřej Surý c746037622 Disable libidn2 on Debian stretch images 2018-08-13 12:43:38 +02:00
Ondřej Surý 28b0de3e86 Use clang on Debian stretch to workaround Debian Bug #903709 2018-08-13 12:43:38 +02:00
Ondřej Surý 6bc771828c SoftHSM 2.4.0 only supports softhsm2.conf now, rewrite GitLab CI commands to properly support that 2018-08-13 12:43:38 +02:00
Ondřej Surý 2cd0a493ae Merge branch '469-typo-in-validate-glue-branch' into 'master'
Resolve "Typo in validate-glue branch"

See merge request isc-projects/bind9!613
2018-08-11 04:16:34 -04:00
Ondřej SurýandOndřej Surý bdc9860262 Fix !!validate typo to -> !validate 2018-08-11 04:07:46 -04:00
Evan Hunt d6f4592f6b Merge branch 'fix-ns-log-mismatch' into 'master'
mismatch between defined log modules and ns_modules[] in lib/ns/log.c

See merge request isc-projects/bind9!612
2018-08-10 15:14:10 -04:00
Evan Hunt b865fb77de mismatch between defined log modules and ns_modules[] in lib/ns/log.c 2018-08-10 15:04:39 -04:00
Ondřej Surý c3e4363303 Merge branch '434-after-isc_safe-merge-the-windows-build-fails-due-missing-openssl_libs-in-project-files' into 'master'
Resolve "After isc_safe merge, the Windows build fails due missing OPENSSL_LIBS in project files"

Closes #434

See merge request isc-projects/bind9!617
2018-08-10 10:58:04 -04:00
Ondřej Surý c5040e5c9e Add @OPENSSL_LIB@ to Windows project files as needed 2018-08-10 16:45:00 +02:00
Ondřej Surý 86c377ccbb Merge branch '457-restore-logging-of-used-openssl-versions-upon-startup' into 'master'
Restore logging of used OpenSSL versions upon startup

Closes #457

See merge request isc-projects/bind9!615
2018-08-10 09:16:05 -04:00
Michał Kępień b14e127569 Restore logging of used OpenSSL versions upon startup
Remove an #ifdef which commit c3b8130fe8
should have removed.
2018-08-10 13:58:41 +02:00
Evan Hunt 337f9dd0ec Merge branch 'security-complete-dname-fix' into 'master'
Merge CVE-2018-5740 fix

See merge request isc-projects/bind9!607
2018-08-08 18:33:21 -04:00
Evan Hunt b4b4277f5a CHANGES, release note 2018-08-08 14:33:19 -07:00
Evan Hunt 3f907b8bee caclulate nlabels and set *chainingp correctly 2018-08-08 14:33:19 -07:00
Evan Hunt 9d7ad52506 test case 2018-08-08 14:33:19 -07:00
Evan Hunt cac3978af2 explicit DNAME query could trigger a crash if deny-answer-aliases was set 2018-08-08 14:33:19 -07:00
Ondřej Surý fa03f94102 Merge branch '9-use-C99-integer-types' into 'master'
Redefine ISC's int and boolean types to use <stdint.h> and <stdbool.h> types

See merge request isc-projects/bind9!162
2018-08-08 05:05:26 -04:00
Ondřej Surý 75c2356f42 Add CHANGES entry
5007.   [cleanup]       Replace custom ISC boolean and integer data types
                        with C99 stdint.h and stdbool.h types. [GL #9]
2018-08-08 09:37:30 +02:00
Ondřej Surý 7351c505a0 Remove duplicate config.h 2018-08-08 09:37:30 +02:00
Ondřej Surý 994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý 055278c936 Get rid of extra UINT64_MAX definition in lib/isc/win32/time.c 2018-08-08 09:36:44 +02:00
Ondřej Surý 64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý 9e493798c6 Check for C99 compatible compiler 2018-08-08 09:36:44 +02:00
Ondřej Surý e5ee96fc1b Merge branch 'silence-openbsd-warning' into 'master'
Silence a compiler warning on openbsd and fix windows build

See merge request isc-projects/bind9!603
2018-08-08 03:34:44 -04:00
Evan HuntandOndřej Surý b55338e447 Silence a compiler warning on openbsd and fix windows build 2018-08-08 02:49:28 -04:00
Michał Kępień 20c52bf9b8 Merge branch '431-refactor-code-preparing-a-delegation-response' into 'master'
Refactor code preparing a delegation response

Closes #431

See merge request isc-projects/bind9!549
2018-08-08 02:26:40 -04:00
Michał Kępień 1d9c37876b Add CHANGES entry
5006.	[cleanup]	Code preparing a delegation response was extracted from
			query_delegation() and query_zone_delegation() into a
			separate function in order to decrease code
			duplication. [GL #431]
2018-08-08 08:08:40 +02:00
Michał Kępień 8e3fc5725f Extract code preparing a delegation response to a separate function
Changes introduced by the previous two commits make the parts of
query_delegation() and query_zone_delegation() which prepare a
delegation response functionally equivalent.  Extract this code into a
separate function, query_prepare_delegation_response(), and then call
the latter from both query_delegation() and query_zone_delegation() in
order to reduce code duplication.  Add a comment describing the purpose
of the extracted code.  Fix coding style issues.
2018-08-08 08:08:40 +02:00
Michał Kępień 7db4dedf6b Remove unused NS_QUERYATTR_CACHEGLUEOK query attribute
The NS_QUERYATTR_CACHEGLUEOK query attribute has no influence on query
processing.  Remove it.
2018-08-08 08:08:40 +02:00
Michał Kępień b6c77202cb Restore zone database and zone node if cache search results are to be ignored
When query processing hits a delegation from a locally configured zone,
an attempt may be made to look for a better answer in the cache.  In
such a case, the zone-sourced delegation data is set aside and the
lookup is retried using the cache database.  When that lookup is
completed, a decision is made whether the answer found in the cache is
better than the answer found in the zone.

Currently, if the zone-sourced answer turns out to be better than the
one found in the cache:

  - qctx->zdb is not restored into qctx->db,
  - qctx->node, holding the zone database node found, is not even saved.

Thus, in such a case both qctx->db and qctx->node will point at cache
data.  This is not an issue for BIND versions which do not support
mirror zones because in these versions non-recursive queries always
cause the zone-sourced delegation to be returned and thus the
non-recursive part of query_delegation() is never reached if the
delegation is coming from a zone.  With mirror zones, however,
non-recursive queries may cause cache lookups even after a zone
delegation is found.  Leaving qctx->db assigned to the cache database
when query_delegation() determines that the zone-sourced delegation is
the best answer to the client's query prevents DS records from being
added to delegations coming from mirror zones.  Fix this issue by
keeping the zone database and zone node in qctx while the cache is
searched for an answer and then restoring them into qctx->db and
qctx->node, respectively, if the zone-sourced delegation turns out to be
the best answer.  Since this change means that qctx->zdb cannot be used
as the glue database any more as it will be reset to NULL by RESTORE(),
ensure that qctx->db is not a cache database before attaching it to
qctx->client->query.gluedb.

Furthermore, current code contains a conditional statement which
prevents a mirror zone from being used as a source of glue records.
Said statement was added to prevent assertion failures caused by
attempting to use a zone database's glue cache for finding glue for an
NS RRset coming from a cache database.  However, that check is overly
strict since it completely prevents glue from being added to delegations
coming from mirror zones.  With the changes described above in place,
the scenario this check was preventing can no longer happen, so remove
the aforementioned check.

If qctx->zdb is not NULL, qctx->zfname will also not be NULL;
qctx->zsigrdataset may be NULL in such a case, but query_putrdataset()
handles pointers to NULL pointers gracefully.  Remove redundant
conditional expressions to make the cleanup code in query_freedata()
match the corresponding sequences of SAVE() / RESTORE() macros more
closely.
2018-08-08 08:07:46 +02:00
Ondřej Surý ec25056b48 Merge branch '440-root-zone-performance-regression-uint32' into 'master'
Resolve "Root zone performance regression since 9.12.2rc2 and 9.13.1"

Closes #440

See merge request isc-projects/bind9!602
2018-08-07 04:02:02 -04:00
Ondřej Surý e3131b8d52 Make sure the storage for isc_random32() result is 32-bit long 2018-08-07 09:52:47 +02:00
Ondřej Surý 21a547c100 Merge branch '440-root-zone-performance-regression' into 'master'
Resolve "Root zone performance regression since 9.12.2rc2 and 9.13.1"

Closes #440

See merge request isc-projects/bind9!593
2018-08-06 05:38:44 -04:00
Ondřej Surý 9e11b54bbc Update ARM on the default ordering 2018-08-06 11:24:14 +02:00
Ondřej Surý e80c26b22e Define and use new DNS_RDATASET_COUNT_UNDEFINED equals ISC_UINT32_MAX to make the code more readable 2018-08-06 11:24:14 +02:00
Ondřej Surý afddc2781e Modify the rrsetorder test to cope with the rrset order randomization (only four orders are now possible) 2018-08-06 11:24:14 +02:00
Ondřej Surý 41a68425ea Refactor code around random/cyclic/fixed to reduce code duplication 2018-08-06 11:24:14 +02:00
Mark AndrewsandOndřej Surý f7986c8d1a Only get one random number per response when order == random 2018-08-05 07:23:07 +02:00
Mark Andrews 9c4fb3b3e6 Merge branch 'remove-dead-code' into 'master'
Remove dead code

See merge request isc-projects/bind9!587
2018-08-02 19:22:25 -04:00
Mark Andrews 83a1e87dd2 remove dead code 2018-08-02 18:57:30 -04:00
Mark Andrews 5146cbc092 Merge branch '442-dnssec-verify-fails-on-case-sensitivity-of-owner-names-in-nsec-bitmap' into 'master'
Resolve "dnssec-verify fails on case-sensitivity of owner names in NSEC bitmap"

Closes #442

See merge request isc-projects/bind9!562
2018-08-02 18:34:46 -04:00
Mark Andrews 49cd3aac9c add CHANGES 2018-08-03 08:21:48 +10:00
Mark Andrews a94db46631 only check the bit map 2018-08-03 08:21:48 +10:00
Ondřej Surý c3c0481293 Merge branch '543-revert-!553' into 'master'
Revert "Merge branch 'modified-manual-install-oot' into 'master'"

Closes #453

See merge request isc-projects/bind9!573
2018-08-02 10:32:08 -04:00
Ondřej SurýandOndřej Surý 69380eb033 Revert "Merge branch 'modified-manual-install-oot' into 'master'"
This reverts commit d9929b1b0a, reversing
changes made to 8abf2f23d0.
2018-08-02 10:23:30 -04:00
Ondřej Surý 2c816e745b Merge branch '454-broken-build-with-custom-ldflags' into 'master'
Resolve "Broken build with custom LDFLAGS"

Closes #454

See merge request isc-projects/bind9!572
2018-08-02 08:41:50 -04:00
Ondřej SurýandOndřej Surý 10e6bfc864 Preserve ${LDFLAGS} contents in bin/dig/ 2018-08-02 08:33:03 -04:00
Mark Andrews 84385bc717 Merge branch '439-the-signed-instance-of-a-in-line-zone-should-be-treated-as-dynamic' into 'master'
Resolve "The signed instance of a in-line zone should be treated as dynamic."

Closes #439

See merge request isc-projects/bind9!554
2018-08-02 00:23:06 -04:00
Mark Andrews d6d9fd1c71 add CHANGES 2018-08-02 14:07:03 +10:00
Mark Andrews 9130f055f4 treat the signed instance of a inline zone as dynamic 2018-08-02 00:00:13 -04:00
Mark Andrews cfccd8d246 turn off ixfr-from-differences on signed instance of in-line zone 2018-08-02 00:00:13 -04:00
Mark Andrews 3ea9861e7a rename zone to mayberaw 2018-08-02 00:00:13 -04:00
Mark Andrews a71823bc5c Merge branch '453-master-build-broken-in-documentation-tree' into 'master'
add /opt/local/share/xsl/docbook-xsl-nons to the places to look for manpages/docbook.xsl under macports

See merge request isc-projects/bind9!571
2018-08-01 22:41:45 -04:00
Mark Andrews 7425252207 add /opt/local/share/xsl/docbook-xsl-nons to the places to look for manpages/docbook.xsl under macports 2018-08-02 12:07:27 +10:00
Mark Andrews c0bd1bf944 Merge branch '359-question-about-using-hashtable-size-log-messages-for-rpzs' into 'master'
Resolve "Question about 'using hashtable size' log messages for RPZs"

Closes #359

See merge request isc-projects/bind9!566
2018-08-01 21:32:01 -04:00
Mark Andrews 12d45c5cd1 lower log level to debug(1) 2018-08-01 21:31:17 -04:00
Mark Andrews d30f6e5f99 Merge branch '424-nsupdate-tests-fail-intermittently' into 'master'
Resolve "nsupdate tests fail intermittently"

Closes #424

See merge request isc-projects/bind9!544
2018-08-01 21:25:27 -04:00
Mark Andrews abe41ba011 use guard values for testing unixtime serial 2018-08-02 10:25:56 +10:00
Mark Andrews 6b30bc73c0 save SOA values 2018-08-01 20:04:09 -04:00
Mark Andrews f335795068 Merge branch '406-dns_acl_isinsecure-does-not-handle-geoip-elements' into 'master'
Resolve "dns_acl_isinsecure does not handle geoip elements."

Closes #406

See merge request isc-projects/bind9!528
2018-08-01 19:30:22 -04:00
Mark Andrews b0b76d259f add CHANGES note 2018-08-02 09:19:04 +10:00
Mark Andrews 57eadf4d4f handle dns_aclelementtype_geoip 2018-08-02 09:18:16 +10:00
Mark Andrews fb8bb4e306 test dns_acl_isinsecure with geoip element 2018-08-02 09:18:16 +10:00
Mark Andrews d7ae24c868 Merge branch '410-missing-sanity-check-for-call-to-next_token-in-file-mdig-c-for-bind-9-12-1-p2' into 'master'
Resolve "Missing Sanity Check for call to next_token() in file 'mdig.c' for BIND 9.12.1-P2"

Closes #410

See merge request isc-projects/bind9!527
2018-08-01 19:17:00 -04:00
Mark Andrews 84f1d9a204 add CHANGES note 2018-08-02 09:07:54 +10:00
Mark Andrews 2e688488f7 test mdig '+ednsopt=:' handling 2018-08-02 08:55:01 +10:00
Mark Andrews d2943440a0 fix handling of '+ednsopt=:'; support 100 ednsopts per query rather than 100 total 2018-08-02 08:55:01 +10:00
Mark Andrews 1a5620db01 Merge branch '372-smimea-and-tlsa-methods-incorrectly-use-txt-type' into 'master'
Resolve "smimea and tlsa methods incorrectly use txt type"

Closes #372

See merge request isc-projects/bind9!458
2018-08-01 18:23:53 -04:00
Mark Andrews 63c9ec367f use tlsa and smime structs to set common values 2018-08-01 18:15:08 -04:00
Mark Andrews d9929b1b0a Merge branch 'modified-manual-install-oot' into 'master'
Use make automatic variables to install correct manual version.

See merge request isc-projects/bind9!553
2018-08-01 02:06:44 -04:00
Petr MenšíkandMark Andrews 88f913ac81 Use make automatic variables to install updated manuals
Make will choose modified manual from build directory or original from source
directory automagically. Take advantage of install tool feature.
Install all files in single command instead of iterating on each of them.
2018-08-01 01:56:16 -04:00
Ondřej Surý 8abf2f23d0 Merge branch '443-isc_buffer_printf-fixes' into 'master'
Resolve "isc_buffer_printf() grows buffer without autorealloc being set + nit in isc_buffer_realloc()"

Closes #443

See merge request isc-projects/bind9!559
2018-07-31 16:14:47 -04:00
Ondřej Surý 20faf4652a Change isc_buffer_reallocate() into a static functions as it is not used outside of isc_buffer_reserve() 2018-07-31 22:00:30 +02:00
Ondřej Surý 7785f644c3 Remove illogical condition from isc_buffer_reallocate that would return ISC_R_NOSPACE when requested size is less than available size 2018-07-31 22:00:30 +02:00
Ondřej Surý 519bfe4c97 Forbid isc_buffer_printf from growing the buffer unless auto reallocation is enabled 2018-07-31 22:00:30 +02:00
Mark Andrews 6a6dc2f410 Merge branch 'misc-onerror-refcount-fixes' into 'master'
refcount errors on error paths

See merge request isc-projects/bind9!563
2018-07-31 03:56:46 -04:00
Mark Andrews 63aaff50df add CHANGES 2018-07-31 17:46:53 +10:00
Mark Andrews 4093efc900 refcount errors on error paths 2018-07-31 17:41:45 +10:00
Evan Hunt e91da20dc3 Merge branch '441-ns_server_servestale-can-leave-the-server-in-exclusive-mode-on-error' into 'master'
Resolve "ns_server_servestale can leave the server in exclusive mode on error."

Closes #441

See merge request isc-projects/bind9!557
2018-07-27 01:55:45 -04:00
Mark AndrewsandEvan Hunt c8b07932e4 named_server_servestale could leave the server in exclusive mode if a error occurs. 2018-07-26 22:54:15 -07:00
Mark Andrews ebcaae4ae5 Merge branch '432-sha2-c-does-not-compile-with-libressl' into 'master'
Resolve "sha2.c does not compile with libressl."

Closes #432

See merge request isc-projects/bind9!552
2018-07-24 19:28:50 -04:00
Mark Andrews 7671aba67d look for LIBRESSL_VERSION_NUMBER as well 2018-07-24 18:22:29 +10:00
Ondřej Surý e7c34d5179 Merge branch '227-replace-isc_safe-with-OpenSSL-fix-Windows' into 'master'
Fix FTBFS on Windows due CRYPTO_memcmp missing in a linker phase of libiscc

See merge request isc-projects/bind9!551
2018-07-24 03:57:23 -04:00
Ondřej Surý 187d22e090 Link libiscc with OpenSSL to fix CRYPTO_memcmp symbol missing 2018-07-24 09:37:09 +02:00
Evan Hunt 537f2284a3 Merge branch 'fix-openssl-configure' into 'master'
Fix ax_check_openssl to accept "--with-openssl" or "--with-openssl=yes",
and improve it to modern autotools standard

See merge request isc-projects/bind9!550
2018-07-23 16:29:10 -04:00
Ondřej Surý 71877806e8 Fix ax_check_openssl to accept yes and improve it to modern autotools standard 2018-07-23 22:10:52 +02:00
Ondřej Surý e0d42538f9 Merge branch '227-replace-isc_safe-with-OpenSSL' into 'master'
Replace isc_safe routines with their OpenSSL counterparts

See merge request isc-projects/bind9!546
2018-07-20 12:02:35 -04:00
Ondřej Surý 083461d332 Fix the isc_safe_memwipe() usage with (NULL, >0) 2018-07-20 10:08:24 -04:00
Ondřej Surý b105ccee68 Remove isc_safe_memcompare, it's not needed anywhere and can't be replaced with CRYPTO_memcmp() 2018-07-20 10:06:14 -04:00
Ondřej Surý 66ba2fdad5 Replace isc_safe routines with their OpenSSL counter parts 2018-07-20 00:34:26 -04:00
Ondřej Surý 8b9b270c7d Merge branch '261-print-c-issues' into 'master'
Resolve "print.c issues"

Closes #261

See merge request isc-projects/bind9!284
2018-07-20 00:17:53 -04:00
Ondřej Surý 8e6d89ad97 Add CHANGES entry for GL #261. 2018-07-19 23:30:43 -04:00
Mark AndrewsandOndřej Surý 4c3386ad95 remove lib/isc/print.c and lib/isc/tests/print_test.c 2018-07-19 23:24:28 -04:00
Ondřej Surý 7fc59e384c Merge branch '328-make-openssl-mandatory-windows' into 'master'
Fix the Windows build after merging the crypto refactoring work

See merge request isc-projects/bind9!545
2018-07-19 18:13:27 -04:00
Ondřej Surý 83cde08522 Introduce USE_OPENSSL define to Windows build, remove CRYPTO and AES conditions. 2018-07-19 16:54:53 -04:00
Ondřej Surý 51f7ed99fe Merge branch '328-make-openssl-mandatory' into 'master'
Resolve "Refactor crypto to use OpenSSL for everything but Public-Key Cryptography"

Closes #328

See merge request isc-projects/bind9!371
2018-07-19 15:08:32 -04:00
Ondřej Surý 08974f39f1 Fix the Windows build 2018-07-19 14:00:40 -04:00
Ondřej Surý fc496b2b5d Fix DH and ECDSA algorithms in PKCS#11 build 2018-07-19 14:00:40 -04:00
Ondřej Surý 919179b369 Fix the build when EdDSA algorithms are not available 2018-07-19 13:17:38 -04:00
Ondřej Surý ed090fed56 Cleanup copyrights 2018-07-19 13:17:38 -04:00
Ondřej Surý 0937e281a8 Add GitLab CI tests using SoftHSMv2 as PKCS#11 provider. 2018-07-19 13:17:38 -04:00
Ondřej Surý 0a73c9f137 Remove PKCS#11 DH implementation as there's no private keys stored in HSM for DH algorithm 2018-07-19 12:47:03 -04:00
Ondřej Surý 45abf438f8 Cleanup the configure feature report 2018-07-19 12:47:03 -04:00
Ondřej Surý c40425d0f6 RSA and ECDSA cryptography is now mandatory; remove the checks for those 2018-07-19 12:47:03 -04:00
Ondřej Surý 9d1f4696ec Disable DH test with PKCS#11 2018-07-19 12:47:03 -04:00
Ondřej Surý c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Ondřej Surý 3322e41eeb Merge branch 'gitlab-ci-add-jessie-and-stretch' into 'master'
Add Debian jessie and stretch to GitLab CI

See merge request isc-projects/bind9!543
2018-07-19 12:44:22 -04:00
Ondřej SurýandOndřej Surý d34aa0ccd0 Remove quotes around $EXTRA_CONFIGURE to break out more options into ... more options and not a single one 2018-07-19 12:35:45 -04:00
Ondřej SurýandOndřej Surý f5cb3d707a Make libidn2 build optional 2018-07-19 12:35:45 -04:00
Ondřej SurýandOndřej Surý 1d8a62713d Disable autogen.sh in precheck, it needs newer autoconf and it breaks the older builds 2018-07-19 12:35:45 -04:00
Ondřej SurýandOndřej Surý d5ec498e26 Add Debian jessie and stretch images to the build to catch errors with older but supported releases 2018-07-19 12:35:45 -04:00
Michał Kępień 636e9fc259 Merge branch '423-fix-handling-of-tat-sending-failures' into 'master'
Fix handling of TAT sending failures

Closes #423

See merge request isc-projects/bind9!540
2018-07-19 12:15:18 -04:00
Michał KępieńandMark Andrews 8666f8d28f Fix handling of TAT sending failures
dns_view_zonecut() may associate the dns_rdataset_t structure passed to
it even if it returns a result different then ISC_R_SUCCESS.  Not
handling this properly may cause a reference leak.  Fix by ensuring
'nameservers' is cleaned up in all relevant failure modes.
2018-07-20 01:55:50 +10:00
Ondřej Surý 2975f37f1c Merge branch 'use-internal-docker-registry' into 'master'
Try using the integrated Docker Registry again

See merge request isc-projects/bind9!539
2018-07-19 11:40:47 -04:00
Ondřej Surý 378e36a955 Try using the integrated Docker Registry again 2018-07-18 13:46:20 -04:00
Witold Krecicki 5bf1e8781e Merge branch 'fix-various-tests-for-qmin' into 'master'
Fix various tests for qmin

See merge request isc-projects/bind9!520
2018-07-17 11:09:24 -04:00
Witold Kręcicki 48eedb8108 Changes entry 2018-07-17 17:00:23 +02:00
Michał Kępień e10e6756c9 [squash] Make resolver tests even more civilized (ans8.pl)
Set AA=1 even for truncated responses.  Put glue record in responses to
no-questions/NS queries.  Add comments, simplify code.
2018-07-17 13:01:42 +02:00
Michał Kępień 82082ecd56 [squash] Make resolver tests even more civilized (ans2.pl and ans3.pl)
Prevent ans2.pl from responding authoritatively for any name at or below
example.net.

Make ans3.pl properly answer example.net/NS queries.  Use string
comparisons instead of regular expressions where possible.
2018-07-17 13:00:34 +02:00
Michał Kępień 122a1a00be [squash] Put Perl code extracting a tree from a cache dump in a separate function 2018-07-17 11:31:09 +02:00
Witold KręcickiandMichał Kępień c96ca40023 cacheclean test: take into account that we can have multiple RRs at one name 2018-07-17 11:31:09 +02:00
Witold KręcickiandMichał Kępień c8b36ea6b9 Make resolver tests more civilized 2018-07-17 11:31:09 +02:00
Witold Krecicki 15db6ee6e4 Merge branch '419-do-not-replace-lo0-address-on-solaris' into 'master'
Do not replace lo0 address on Solaris

Closes #419

See merge request isc-projects/bind9!535
2018-07-16 09:05:17 -04:00
Michał Kępień 618921902a Do not replace lo0 address on Solaris
lo0 and lo0:0 are the same interface on Solaris.  Make sure
bin/tests/system/ifconfig.sh does not touch lo0:0 in order to prevent it
from changing the address of the loopback interface on Solaris.
2018-07-16 08:55:22 +02:00
Evan Hunt 229dfb5dc8 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!534
2018-07-13 15:35:38 -04:00
Evan Hunt ae1aa55c6f placeholder 2018-07-13 12:35:11 -07:00
Michał Kępień 939824fce5 Merge branch '365-add-centos-to-ci' into 'master'
Add CentOS 6/7 to CI

Closes #365 and #404

See merge request isc-projects/bind9!531
2018-07-13 06:25:50 -04:00
Michał Kępień f0966d1485 Add CentOS 6/7 to CI
Modify .gitlab-ci.yml so that every CI pipeline also builds and tests
BIND on CentOS versions 6 and 7.  Use --disable-warn-error on CentOS 6
since it uses GCC 4.4.7 which suffers from bugs causing bogus warnings
to be generated, e.g.:

    sigs_test.c: In function 'compare_tuples':
    sigs_test.c:75: warning: declaration of 'index' shadows a global declaration
    /usr/include/string.h:489: warning: shadowed declaration is here
    sigs_test.c: In function 'updatesigs_test':
    sigs_test.c:193: warning: declaration of 'index' shadows a global declaration
    /usr/include/string.h:489: warning: shadowed declaration is here
2018-07-13 08:22:12 +02:00
Michał Kępień 2be97feb46 Do not spam console if "git status --ignored" fails during tests
The "git status" command in Git versions before 1.7.2 does not support
the "--ignored" option.  Prevent spamming the console when running
system tests from a Git repository on a host with an ancient Git version
installed.
2018-07-13 08:22:12 +02:00
Michał Kępień fd30a03f2b Remove IDN subtest from the "digdelv" system test
The output of certain "dig +idnout" invocations may be locale-dependent.
Remove the "dig +idnout" subtest from the "digdelv" system test as IDN
support is already thoroughly tested by the "idna" system test.
2018-07-13 08:22:12 +02:00
Michał Kępień cc0e8cda71 Include conf.sh from all prereq.sh scripts
Every prereq.sh script must include bin/tests/system/conf.sh, otherwise
if some prerequisite is not met, errors about echo_i not being found
will be printed instead of actual error messages.
2018-07-13 08:22:12 +02:00
Michał Kępień 12df6829d1 Update ATF path in the ./configure invocation used during CI
The Docker images used for CI install ATF to /usr, not /usr/local.
Update the ./configure invocation in .gitlab-ci.yml accordingly in order
to prevent confusion.
2018-07-13 08:22:12 +02:00
Michał Kępień 45e77a3680 Add "-f" to command line arguments for autoreconf in autogen.sh
Depending on tool versions used, "autoreconf -i" may not update all
Autoconf-generated files, which in turn may result in build errors.
Make autogen.sh call autoreconf with the "-f" command line argument to
ensure all Autoconf-generated files are updated when autogen.sh is run.
2018-07-13 08:21:55 +02:00
Mark Andrews c08e60adcb Merge branch '373-generic_tostruct_tlsa-incorrectly-initialises-common-structure' into 'master'
Resolve "generic_tostruct_tlsa incorrectly initialises common structure."

Closes #373

See merge request isc-projects/bind9!460
2018-07-11 19:45:56 -04:00
Mark Andrews 6e06d3e7c6 remove re-initalisation of common structure 2018-07-12 09:37:13 +10:00
Evan Hunt da3044f2df Merge branch '403-missing-sanity-check-for-call-to-next_token-in-file-dig-c' into 'master'
Resolve "Missing Sanity Check for call to next_token() in file 'dig.c'"

Closes #403

See merge request isc-projects/bind9!504
2018-07-11 14:51:32 -04:00
Evan Hunt 8ae1774089 CHANGES 2018-07-11 11:43:18 -07:00
Mark AndrewsandEvan Hunt ad86878d61 add test for bad dig option '+ednsopt=:' being handled gracefully 2018-07-11 11:22:26 -07:00
Bill ParkerandEvan Hunt 408bcf9c07 check code is non NULL 2018-07-11 11:22:26 -07:00
Evan Hunt cc9c97fdfc Merge branch '235-enhance-denied-logging-for-dynamic-updates' into 'master'
Add tcp-self policy tests.

See merge request isc-projects/bind9!282
2018-07-11 14:04:42 -04:00
Mukund SivaramanandEvan Hunt a7e6a584ea Add system tests for "tcp-self" update-policy 2018-07-11 10:55:24 -07:00
Mark Andrews 1b7598a045 Merge branch 'add-space-around-function' into 'master'
add required whitespace

See merge request isc-projects/bind9!512
2018-07-11 04:22:17 -04:00
Mark AndrewsandMichał Kępień 9bd14e2d1f add required whitespace 2018-07-11 09:30:10 +02:00
Michał Kępień a554eb1ea0 Merge branch '392-send-upstream-tat-queries-for-locally-served-zones' into 'master'
Send upstream trust anchor telemetry queries for locally served zones

Closes #392

See merge request isc-projects/bind9!484
2018-07-11 03:13:19 -04:00
Michał Kępień a64750e428 Add CHANGES entry
4994.	[bug]		Trust anchor telemetry queries were not being sent
			upstream for locally served zones. [GL #392]
2018-07-11 08:27:10 +02:00
Michał Kępień a7657dc150 Send upstream TAT queries for locally served zones
Trying to resolve a trust anchor telemetry query for a locally served
zone does not cause upstream queries to be sent as the response is
determined just by consulting local data.  Work around this issue by
calling dns_view_findzonecut() first in order to determine the NS RRset
for a given domain name and then passing the zone cut found to
dns_resolver_createfetch().

Note that this change only applies to TAT queries generated by the
resolver itself, not to ones received from downstream resolvers.
2018-07-11 08:27:10 +02:00
Michał Kępień 127810e512 Extract TAT QNAME preparation to a separate function
Extract the part of dotat() reponsible for preparing the QNAME for a TAT
query to a separate function in order to limit the number of local
variables used by each function and improve code readability.

Rename 'name' to 'origin' to better convey the purpose of that variable.
Also mark it with the const qualifier.
2018-07-11 08:27:10 +02:00
Ondřej Surý b722c92e76 Merge branch 'pkcs11-missing-gitignore' into 'master'
PKCS#11 build missing some .gitignore files and ignore .gitignore files

See merge request isc-projects/bind9!513
2018-07-11 02:09:41 -04:00
Ondřej Surý 718c527e1d Don't check copyrights on .gitignore files 2018-07-11 08:01:05 +02:00
Ondřej Surý 96907d636d Add .gitignore for PKCS#11 test files 2018-07-11 07:56:48 +02:00
Evan Hunt 9f37641d81 Merge branch 'fix-replay-merge' into 'master'
fix replay-merge

See merge request isc-projects/bind9!509
2018-07-11 00:02:05 -04:00
Evan Hunt f8f32ac1fc fixed an argument counting bug 2018-07-10 21:01:00 -07:00
Evan Hunt f781a1bd96 Merge branch 'git-replay-merge-no-push-option' into 'master'
Add --no-push and --push options and DONT_PUSH environment variable

See merge request isc-projects/bind9!439
2018-07-10 23:44:58 -04:00
Ondřej SurýandEvan Hunt 23f69e5626 Add --no-push and --push options and DONT_PUSH environment as default to control what happens after merge 2018-07-10 20:44:12 -07:00
Evan Hunt a319b82421 Merge branch 'ci-check-libs' into 'master'
check correctness of win32 .def files in CI 'precheck' step

See merge request isc-projects/bind9!455
2018-07-10 23:08:28 -04:00
Evan Hunt adebe28b52 add checklibs to precheck CI step 2018-07-10 19:31:04 -07:00
Evan Hunt 9f38be5064 remove no-longer-needed check for strsep() 2018-07-10 19:31:04 -07:00
Evan Hunt 9dfaf03b31 Merge branch '369-remove-bind8_compat-from-lib-dns-journal-c' into 'master'
Remove compatibility with BIND 8 "no-change" IXFR deltas in lib/dns/journal.c

Closes #369

See merge request isc-projects/bind9!446
2018-07-10 22:30:02 -04:00
Mark AndrewsandEvan Hunt 329a0e7812 Remove support for silently ignoring 'no-change' deltas from BIND 8 when processing an IXFR stream. 'no-change' deltas will now trigger a fallback to AXFR as the recovery mechanism. 2018-07-10 19:20:09 -07:00
Evan Hunt 440380ac41 Merge branch 'remove-redundant-test' into 'master'
remove redundant test

See merge request isc-projects/bind9!497
2018-07-10 22:04:19 -04:00
Mark AndrewsandEvan Hunt 6eec7fe092 remove redundant test 2018-07-10 18:53:38 -07:00
Evan Hunt 5ae0906b23 Merge branch '379-trust-anchor-telemetry-log-should-include-client-ip-address' into 'master'
Resolve "trust anchor telemetry log should include client IP address"

Closes #379

See merge request isc-projects/bind9!476
2018-07-10 21:28:14 -04:00
Mark AndrewsandEvan Hunt cc3c8f1a7c add CHANGES note 2018-07-10 18:19:12 -07:00
Mark AndrewsandEvan Hunt 4f18b6a09a fix spelling of 'telemetry' 2018-07-10 18:19:12 -07:00
Mark AndrewsandEvan Hunt 69fd3f5ba4 use extracted netaddr rather than client->destaddr 2018-07-10 18:17:54 -07:00
Evan Hunt f83a64072b Merge branch '378-run-xmllint-on-xml-and-docbook-in-precheck' into 'master'
Check correctness of *.xml, *.docbook, and *.html during precheck

Closes #378
2018-07-10 20:49:40 -04:00
Mark AndrewsandEvan Hunt bb1937aaec Resolve "run xmllint on *.xml and *.docbook in precheck" 2018-07-10 20:49:40 -04:00
Evan Hunt 5519c76639 Merge branch '381-fix-mirror-option-handling-during-zone-reconfiguration' into 'master'
Fix "mirror" option handling during zone reconfiguration

Closes #381

See merge request isc-projects/bind9!480
2018-07-10 20:45:25 -04:00
Michał KępieńandEvan Hunt e63376fd0a Add CHANGES entry
4988.	[bug]		"rndc reconfig" was incorrectly handling zones whose
			"mirror" setting was changed. [GL #381]
2018-07-10 17:36:57 -07:00
Michał KępieńandEvan Hunt dbfd19c668 Do not reuse zones whose "mirror" setting was changed
Update named_zone_reusable() so that it does not consider a zone to be
eligible for reuse if its old value of the "mirror" option differs from
the new one.  This causes "rndc reconfig" to create a new zone structure
whenever the value of the "mirror" option is changed, which ensures that
the previous zone database is not reused and that flags are properly set
in responses sourced from zones whose "mirror" setting was changed at
runtime.
2018-07-10 17:36:22 -07:00
Evan Hunt 802a58d5c6 Merge branch '401-null-pointer-de-reference-found-in-bind-9-12-1-p2' into 'master'
Resolve "NULL Pointer de-reference found in BIND 9.12.1-P2"

Closes #401

See merge request isc-projects/bind9!487
2018-07-10 17:33:17 -04:00
Evan Hunt 5a879071d0 CHANGES 2018-07-10 14:24:43 -07:00
Bill ParkerandEvan Hunt 8ac0152651 check param_template[i].pValue is non NULL 2018-07-10 14:24:07 -07:00
Michał Kępień cffb1ef0ac Merge branch '399-do-not-use-net-dns-nameserver-in-the-serve-stale-system-test' into 'master'
Do not use Net::DNS::Nameserver in the "serve-stale" system test

Closes #399

See merge request isc-projects/bind9!486
2018-07-10 09:14:26 -04:00
Michał Kępień c4209418a5 Do not use Net::DNS::Nameserver in the "serve-stale" system test
Net::DNS versions older than 0.67 respond to queries sent to a
Net::DNS::Nameserver even if its ReplyHandler returns undef.  This makes
the "serve-stale" system test fail as it takes advantage of the newer
behavior.  Since the latest Net::DNS version available with stock
RHEL/CentOS 6 packages is 0.65 and we officially support that operating
system, bin/tests/system/serve-stale/ans2/ans.pl should behave
consistently for various Net::DNS versions.  Ensure that by reworking it
so that it does not use Net::DNS::Nameserver.
2018-07-10 15:04:14 +02:00
Michał Kępień 96256e260a Merge branch '393-fix-a-net-dns-version-quirk-in-the-resolver-system-test' into 'master'
Fix a Net::DNS version quirk in the "resolver" system test

Closes #393

See merge request isc-projects/bind9!485
2018-07-10 09:01:53 -04:00
Michał Kępień 6c3c6aea37 Fix a Net::DNS version quirk in the "resolver" system test
Net::DNS versions older than 0.68 insert a ./ANY RR into the QUESTION
section if the latter is empty.  Since the latest Net::DNS version
available with stock RHEL/CentOS 6 packages is 0.65 and we officially
support that operating system, bin/tests/system/resolver/ans8/ans.pl
should behave consistently for various Net::DNS versions.  Ensure that
by making handleUDP() return the query ID and flags generated by
Net::DNS with 8 zero bytes appended.
2018-07-10 14:53:29 +02:00
Michał Kępień 3e0d30a642 Merge branch '384-rework-idn-support-in-dig' into 'master'
Rework IDN support in dig

Closes #384

See merge request isc-projects/bind9!478
2018-07-10 08:49:22 -04:00
Michał Kępień e05784fd64 Add CHANGES entry
4989.	[cleanup]	IDN support in dig has been reworked.  IDNA2003
			fallbacks were removed in the process. [GL #384]
2018-07-10 14:34:35 +02:00
Michał Kępień bf6efbc9a9 Do not set IDN2_NFC_INPUT explicitly
IDN2_NFC_INPUT is always set implicitly by idn2_to_ascii_lz(), so there
is no need to set it explicitly.
2018-07-10 14:34:35 +02:00
Michał Kępień b896fc4972 Improve error handling in idn_ace_to_locale()
While idn2_to_unicode_8zlz() takes a 'flags' argument, it is ignored and
thus cannot be used to perform IDN checks on the output string.

The bug in libidn2 versions before 2.0.5 was not that a call to
idn2_to_unicode_8zlz() with certain flags set did not cause IDN checks
to be performed.  The bug was that idn2_to_unicode_8zlz() did not check
whether a conversion can be performed between UTF-8 and the current
locale's character encoding.  In other words, with libidn2 version
2.0.5+, if the current locale's character encoding is ASCII, then
idn2_to_unicode_8zlz() will fail when it is passed any Punycode string
which decodes to a non-ASCII string, even if it is a valid IDNA2008
name.

Rework idn_ace_to_locale() so that invalid IDNA2008 names are properly
and consistently detected for all libidn2 versions and locales.

Update the "idna" system test accordingly.  Add checks for processing a
server response containing Punycode which decodes to an invalid IDNA2008
name.  Fix invalid subtest description.
2018-07-10 14:34:35 +02:00
Michał Kępień e5ef038134 Remove redundant dns_name_totextfilter_t argument
Since idn_output_filter() no longer uses its 'absolute' argument and no
other callback is used with dns_name_settotextfilter(), remove the
'absolute' argument from the dns_name_totextfilter_t prototype.
2018-07-10 14:34:35 +02:00
Michał Kępień 19c42d46e8 Simplify and rename output_filter()
output_filter() does not need to dot-terminate its input name because
libidn2 properly handles both dot-terminated and non-dot-terminated
names.  libidn2 also does not implicitly dot-terminate names passed to
it, so parts of output_filter() handling dot termination can simply be
removed.

Fix a logical condition to make sure 'src' can fit the terminating NULL
byte.  Replace the MAXDLEN macro with the MXNAME macro used in the rest
of dig source code.  Tweak comments and variable names.

Rename output_filter() to idn_output_filter() so that it can be easily
associated with IDN and other idn_*() functions.
2018-07-10 14:34:35 +02:00
Michał Kępień 5106a18e9e Simplify idn_ace_to_locale()
idn_ace_to_locale() may return a string longer than MAXDLEN because it
is using the current locale's character encoding.  Rather then imposing
an arbitrary limit on the length of the string that function can return,
make it pass the string prepared by libidn2 back to the caller verbatim,
making the latter responsible for freeing that string.  In conjunction
with the fact that libidn2 errors are considered fatal, this makes
returning an isc_result_t from idn_ace_to_locale() unnecessary.

Do not process success cases in conditional branches for improved
consistency with the rest of BIND source code.  Add a comment explaining
the purpose of idn_ace_to_locale().  Rename that function's parameters
to match common BIND naming pattern.
2018-07-10 14:34:35 +02:00
Michał Kępień bcf4d20603 Simplify idn_locale_to_ace()
idn_locale_to_ace() is a static function which is always used with a
buffer of size MXNAME, i.e. one that can fit any valid domain name.
Since libidn2 detects invalid domain names and libidn2 errors are
considered fatal, remove size checks from idn_locale_to_ace().  This
makes returning an isc_result_t from it unnecessary.

Do not process success cases in conditional branches for improved
consistency with the rest of BIND source code.  Add a comment explaining
the purpose of idn_locale_to_ace().  Rename that function's parameters
to match common BIND naming pattern.
2018-07-10 14:34:35 +02:00
Michał Kępień 59cdaef4f7 Remove IDNA2003 fallback from dig
Certain characters, like symbols, are allowed by IDNA2003, but not by
IDNA2008.  Make dig reject such symbols when IDN input processing is
enabled to ensure BIND only supports IDNA2008.  Update the "idna" system
test so that it uses one of such symbols rather than one which is
disallowed by both IDNA2003 and IDNA2008.
2018-07-10 14:34:35 +02:00
Michał Kępień 9a25368c8c Remove redundant dns_name_settotextfilter() call
There is no need to call dns_name_settotextfilter() in setup_system()
because setup_lookup() determines whether IDN output processing should
be enabled for a specific lookup (taking the global setting into
consideration) and calls dns_name_settotextfilter() anyway if it is.
Remove the dns_name_settotextfilter() call from setup_system().
2018-07-10 14:34:35 +02:00
Michał Kępień fafc7c7b8a Remove empty idn_initialize() function 2018-07-10 14:34:35 +02:00
Michał Kępień a0571d3851 Rework libidn2 detection
Clean up the parts of configure.in responsible for handling libidn2
detection and adjust other pieces of the build system to match these
cleanups:

  - use pkg-config when --with-libidn2 is used without an explicit path,

  - look for idn2_to_ascii_lz() rather than idn2_to_ascii_8z() as the
    former is used in BIND while the latter is not,

  - do not look for idn2_to_unicode_8zlz() as it is present in all
    libidn2 versions which have idn2_to_ascii_lz(),

  - check whether the <idn2.h> header is usable,

  - set LDFLAGS in the Makefile for dig so that, if specified, the
    requested libidn2 path is used when linking with libidn2,

  - override CPPFLAGS when looking for libidn2 components so that the
    configure script does not produce warnings when libidn2 is not
    installed system-wide,

  - merge the AS_CASE() call into the AS_IF() call below it to simplify
    code,

  - indicate the default value of --with-libidn2 in "./configure --help"
    output,

  - use $with_libidn2 rather than $use_libidn2 to better match the name
    of the configure script argument,

  - stop differentiating between IDN "in" and "out" support, i.e. make
    dig either support libidn2 or not; remove WITH_* Autoconf macros and
    use a new one, HAVE_LIBIDN2, to determine whether libidn2 support
    should be enabled.
2018-07-10 14:34:35 +02:00
Witold Krecicki f02e3c4bab Merge branch 'fix-synth-from-dnssec-dname-handling' into 'master'
Don't synthesize NXDOMAIN from NSEC for records under a DNAME.

Closes #386

See merge request isc-projects/bind9!481
2018-07-10 03:28:26 -04:00
Mark AndrewsandWitold Krecicki 8ef23f9fb0 the presence of a DNAME record proves that the name does not exist in the zone but as we don't want to use that for NXDMOMAIN return DNS_R_DNAME from dns_nsec_noexistnodata 2018-07-10 03:20:21 -04:00
Witold Kręcicki 7f60bb39df Don't synthesize NXDOMAIN from NSEC for records under a DNAME 2018-07-10 03:20:21 -04:00
Mark Andrews cd0e7df6fc Merge branch '402-memory-leak-found-in-file-fuzz-c-in-bind-9-12-1-p2' into 'master'
Resolve "Memory Leak found in file 'fuzz.c' in BIND-9.12.1-P2"

Closes #402

See merge request isc-projects/bind9!488
2018-07-10 00:32:32 -04:00
Mark Andrews ecb2f20324 free rbuf 2018-07-10 14:24:06 +10:00
Evan Hunt 4f6ef2f3e5 Merge branch 'prep-release-v9_13_2' into 'master'
prep 9.13.2

See merge request isc-projects/bind9!473
2018-07-03 03:51:40 -04:00
Tinderbox User b65d19f9fd prep 9.13.2 2018-07-03 07:40:29 +00:00
Michał Kępień fffc671219 Merge branch 'clarify-mirror' into 'master'
clarify documentation of the 'mirror' option

See merge request isc-projects/bind9!469
2018-07-03 03:23:50 -04:00
Evan HuntandMichał Kępień 3245eb98f4 clarify documentation of the 'mirror' option 2018-07-03 09:10:11 +02:00
Michał Kępień 51161526a4 Merge branch '371-remove-dns_rdataslab_tordataset' into 'master'
Remove dns_rdataslab_tordataset() and its related dns_rdatasetmethods_t callbacks

Closes #371

See merge request isc-projects/bind9!456
2018-07-03 02:53:53 -04:00
Michał Kępień e9ed9b8eec Add CHANGES entry
4987.	[cleanup]	dns_rdataslab_tordataset() and its related
			dns_rdatasetmethods_t callbacks were removed as they
			were not being used by anything in BIND. [GL #371]
2018-07-03 08:44:05 +02:00
Michał Kępień b2f65ddbf0 Remove dns_rdataslab_tordataset() and its related dns_rdatasetmethods_t callbacks
Since BIND libraries are no longer considered public and
dns_rdataslab_tordataset() is not used anywhere in the tree, remove the
latter and its associated dns_rdatasetmethods_t callbacks from
lib/dns/rdataslab.c.
2018-07-03 08:44:05 +02:00
Evan Hunt a511c8cc0e Merge branch 'fix-doc' into 'master'
fix doc issues

See merge request isc-projects/bind9!466
2018-07-02 22:11:33 -04:00
Evan Hunt 6993d9131e update new features list; also fix the "mirror" release note 2018-07-02 19:09:32 -07:00
Evan Hunt 5bc0e41008 Merge branch '321-improve-documentation-on-libcap-change' into 'master'
Improve documentation on libcap change in 9.13+

See merge request isc-projects/bind9!461
2018-07-02 12:35:05 -04:00
Ondřej Surý 48bbef71f7 Use m4_normalize to reformat the long lines in the configure output 2018-07-02 08:53:13 +02:00
Ondřej Surý b5ea00158d Improve documentation and error messages when libcap is not available 2018-07-02 08:47:32 +02:00
Ondřej Surý cebcd9184e Merge branch '321-remove-linux-capability-support-without-libcap' into 'master'
Remove ability to build without libcap when Linux capabilities are enabled

Closes #321

See merge request isc-projects/bind9!421
2018-06-30 10:59:49 -04:00
Ondřej Surý 7d4cbca5b0 Add CHANGES entry for GL #321. 2018-06-30 16:51:01 +02:00
Michał KępieńandOndřej Surý c356413294 libcap ships with <sys/capability.h>, so use an #ifdef associated with that header to determine whether to enable capabilities support 2018-06-30 16:50:22 +02:00
Michał KępieńandOndřej Surý e299a870b3 Revert parts of 3dd314590e introducing WANT_LINUX_CAPABILITY 2018-06-30 16:50:22 +02:00
Ondřej Surý c4a436569a Make libcap mandatory when Linux capabilities are enabled 2018-06-30 16:50:22 +02:00
Evan Hunt 8d9196bed7 Merge branch 'fix-win32' into 'master'
add missing symbols for windows build

See merge request isc-projects/bind9!454
2018-06-28 11:46:51 -04:00
Evan Hunt b529de9109 add missing symbols 2018-06-28 08:38:22 -07:00
Michał Kępień 8ccd8f4f90 Merge branch '33-implement-mirror-zones' into 'master'
Implement mirror zones

Closes #33

See merge request isc-projects/bind9!329
2018-06-28 07:53:10 -04:00
Michał Kępień 6f719b482b Add CHANGES entry
4985.	[func]		Add a new slave zone option, "mirror", to enable
			serving a non-authoritative copy of a zone that
			is subject to DNSSEC validation before being
			used.  For now, this option is only meant to
			facilitate deployment of an RFC 7706-style local
			copy of the root zone. [GL #33]
2018-06-28 13:38:39 +02:00
Michał Kępień 92ae05e1bc Add a release note 2018-06-28 13:38:39 +02:00
Michał Kępień dbe6a1a05f Add documentation for mirror zones
Update the ARM and various option lists with information about the
"mirror" option for slave zones.
2018-06-28 13:38:39 +02:00
Michał Kępień 73d64de779 Make "rndc zonestatus" output for mirror zones different than for regular slave zones
Replace "type: slave" with "type: mirror" in "rndc zonestatus" output
for mirror zones in order to enable the user to tell a regular slave
zone and a mirror zone apart.
2018-06-28 13:38:39 +02:00
Michał Kępień dd30f53edc Disable notifies for mirror zones unless also-notify is used
Since the mirror zone feature is expected to mostly be used for the root
zone, prevent slaves from sending NOTIFY messages for mirror zones by
default.  Retain the possibility to use "also-notify" as it might be
useful in certain cases.
2018-06-28 13:38:39 +02:00
Michał Kępień 3af412c0e0 Disable outgoing mirror zone transfers by default
As mirror zone data should be treated the way validated, cached DNS
responses are, outgoing mirror zone transfers should be disabled unless
they are explicitly enabled by zone configuration.
2018-06-28 13:38:39 +02:00
Michał Kępień c3f3b824e7 Treat mirror zone data as cache data for access control purposes
As mirror zone data should be treated the way validated, cached DNS
responses are, it should not be used when responding to clients who are
not allowed cache access.  Reuse code responsible for determining cache
database access for evaluating mirror zone access.
2018-06-28 13:38:39 +02:00
Michał Kępień 18ced94241 Rework query_checkcacheaccess()
Modify query_checkcacheaccess() so that it only contains a single return
statement rather than three and so that the "check_acl" variable is no
longer needed.  Tweak and expand comments.  Fix coding style issues.
2018-06-28 13:38:39 +02:00
Michał Kępień cde16236fb Simplify query_getcachedb()
Modify query_getcachedb() so that it uses a common return path for both
success and failure.  Remove a redundant NULL check since 'db' will
never be NULL after being passed as a target pointer to dns_db_attach().
Fix coding style issues.
2018-06-28 13:38:39 +02:00
Michał Kępień e9f17da6e9 Extract cache access checks in query_getcachedb() to a separate function
Extract the parts of query_getcachedb() responsible for checking whether
the client is allowed to access the cache to a separate function, so
that it can be reused for determining mirror zone access.
2018-06-28 13:38:39 +02:00
Michał Kępień 8d996fd79c Fall back to normal recursion when mirror zone data is unavailable
If transferring or loading a mirror zone fails, resolution should still
succeed by means of falling back to regular recursive queries.
Currently, though, if a slave zone is present in the zone table and not
loaded, a SERVFAIL response is generated.  Thus, mirror zones need
special handling in this regard.

Add a new dns_zt_find() flag, DNS_ZTFIND_MIRROR, and set it every time a
domain name is looked up rather than a zone itself.  Handle that flag in
dns_zt_find() in such a way that a mirror zone which is expired or not
yet loaded is ignored when looking up domain names, but still possible
to find when the caller wants to know whether the zone is configured.
This causes a fallback to recursion when mirror zone data is unavailable
without making unloaded mirror zones invisible to code checking a zone's
existence.
2018-06-28 13:38:39 +02:00
Michał Kępień e3160b27f7 Ensure responses sourced from mirror zones have the AD bit set
Zone RRsets are assigned trust level "ultimate" upon load, which causes
the AD bit to not be set in responses coming from slave zones, including
mirror zones.  Make dns_zoneverify_dnssec() update the trust level of
verified RRsets to "secure" so that the AD bit is set in such responses.
No rollback mechanism is implemented as dns_zoneverify_dnssec() fails in
case of any DNSSEC failure, which causes the mirror zone version being
verified to be discarded.
2018-06-28 13:38:39 +02:00
Michał Kępień ad0ec2ea93 Do not treat mirror zone data as authoritative
Section 4 of RFC 7706 suggests that responses sourced from a local copy
of a zone should not have the AA bit set.  Follow that recommendation by
setting 'qctx->authoritative' to ISC_FALSE when a response to a query is
coming from a mirror zone.
2018-06-28 13:38:39 +02:00
Michał Kępień 179d5faa28 Ensure delegations inside mirror zones are properly handled for non-recursive queries
When a resolver is a regular slave (i.e. not a mirror) for some zone,
non-recursive queries for names below that slaved zone will return a
delegation sourced from it.  This behavior is suboptimal for mirror
zones as their contents should rather be treated as validated, cached
DNS responses.  Modify query_delegation() and query_zone_delegation() to
permit clients allowed cache access to check its contents for a better
answer when responding to non-recursive queries.
2018-06-28 13:38:39 +02:00
Michał Kępień c9accfde28 Perform basic resolution checks with a mirror zone in use
Make ns3 mirror the "root" zone from ns1 and query the former for a
properly signed record below the root.  Ensure ns1 is not queried during
resolution and that the AD bit is set in the response.
2018-06-28 13:38:39 +02:00
Michał Kępień edbb256c3a Verify mirror zone journals
As mirror zone files are verified when they are loaded from disk, verify
journal files as well to ensure invalid data is not used.  Reuse the
journals generated during IXFR tests to test this.
2018-06-28 13:38:39 +02:00
Michał Kępień befd429434 Verify mirror zone files loaded from disk
Verify data read from mirror zone files before it is used in order to
prevent loading corrupt mirror zones from disk.
2018-06-28 13:38:39 +02:00
Michał Kępień 6439a76c6d Verify mirror zone IXFRs
Update ixfr_commit() so that all incoming versions of a mirror zone
transferred using IXFR are verified before being used.
2018-06-28 13:38:39 +02:00
Michał Kępień d86f1d00ad Verify mirror zone AXFRs
Update axfr_commit() so that all incoming versions of a mirror zone
transferred using AXFR are verified before being used.  If zone
verification fails, discard the received version of the zone, wait until
the next refresh and retry.
2018-06-28 13:38:39 +02:00
Michał Kępień eaf1c0f6eb Add dns_zone_verifydb()
Add a function for determining whether the supplied version of a mirror
zone passes DNSSEC validation and is signed using a trusted key.  Define
a new libdns result signifying a zone verification failure.
2018-06-28 13:38:39 +02:00
Michał Kępień fc3dd703d8 Enable dns_zoneverify_dnssec() to check whether the zone was signed by a trust anchor
Extend check_dnskey_sigs() so that, if requested, it checks whether the
DNSKEY RRset at zone apex is signed by at least one trust anchor.  The
trust anchor table is passed as an argument to dns_zoneverify_dnssec()
and passed around in the verification context structure.  Neither
dnssec-signzone nor dnssec-verify are yet modified to make use of that
feature, though.
2018-06-28 13:38:39 +02:00
Michał Kępień f86f314d7e Add a system test for mirror zones
Create the basic files comprising a system test and define a few helper
functions which will be useful when testing mirror zones.
2018-06-28 13:38:39 +02:00
Michał Kępień facb68b22e Implement a "read-only" version of nextpart()
The system test helper function nextpart() always updates the "lines
read so far" marker ("<file>.prev") when it is called, which somewhat
limits its flexibility.  Add two new helper functions, nextpartpeek()
and nextpartreset(), so that certain parts of log files can be easily
examined more than once.  Add some documentation to help understand the
purpose of each function in the nextpart*() family.
2018-06-28 13:38:39 +02:00
Michał Kępień 49201f10cb Add new "mirror" slave zone option
Add a new slave-only boolean configuration option, "mirror", along with
its corresponding dns_zoneopt_t enum and a helper function for checking
whether that option was set for a given zone.  This commit does not
introduce any behavior changes yet.
2018-06-28 13:38:39 +02:00
Evan Hunt be38c1f041 Merge branch '339-issues-with-large-journal-entries' into 'master'
Fix handling of large journal entries.

Closes #339

See merge request isc-projects/bind9!432
2018-06-27 21:24:29 -04:00
Evan Hunt 2aee33f412 CHANGES, release note 2018-06-27 17:37:29 -07:00
Witold KręcickiandEvan Hunt b1254430df Fallback to normal procedure if creating of ixfr-from-differences fails 2018-06-27 17:32:17 -07:00
Witold Kręcicki 0db7130f2b Fix some issues with large journal entries 2018-06-27 16:04:06 +02:00
Ondřej Surý 45722aa4f7 Merge branch '367-dnssec-system-test-failing' into 'master'
Resolve "dnssec system test failing"

Closes #367

See merge request isc-projects/bind9!438
2018-06-27 07:35:32 -04:00
Mark AndrewsandOndřej Surý 7288d321ae remove re-signing race when testing dnskey-sig-validity 2018-06-27 07:27:07 -04:00
Mark AndrewsandOndřej Surý 75888a1f16 improve forensics 2018-06-27 07:27:06 -04:00
Mark Andrews 03568d6ec6 Merge branch '366-missing-dereference-in-require-statement' into 'master'
Resolve "Missing dereference in REQUIRE statement?"

Closes #366

See merge request isc-projects/bind9!437
2018-06-27 03:33:12 -04:00
Mark Andrews f1ee5e4a16 cfg_parse_boolean's REQUIRE test for ret was incomplete. 2018-06-27 17:24:39 +10:00
Evan Hunt f553dac1b0 Merge branch '275-add-permanent-option-to-disable-server-side-cookies' into 'master'
Resolve "Provide a mechanism (build or runtime) to turn off server-side support for RFC7873"

Closes #275

See merge request isc-projects/bind9!413
2018-06-26 18:20:37 -04:00
Ondřej SurýandEvan Hunt cc5c3b5948 Update CHANGES and doc to reflect changes in master 2018-06-26 15:11:16 -07:00
Mark AndrewsandEvan Hunt 379d407773 add CHANGES and release notes
(cherry picked from commit 5f7a6232d6)
2018-06-26 15:10:34 -07:00
Mukund SivaramanandEvan Hunt 8c98e7abfe Update ARM documentation
(cherry picked from commit b5265a8cfa)
2018-06-26 15:10:34 -07:00
Mukund SivaramanandEvan Hunt a60cef9dec Add system test
(cherry picked from commit a5933fa2bb)
2018-06-26 15:10:34 -07:00
Mukund SivaramanandEvan Hunt 0ba997b4c2 Add a answer-cookie named config option
(cherry picked from commit 2930507357)
2018-06-26 15:10:02 -07:00
Evan Hunt 5d0b48474f Merge branch '260-queries-with-empty-question-section-return-noerror' into 'master'
Resolve "Queries with empty question section (and otherwise query message of undetermined RDCLASS) return NOERROR instead of FORMERR"

Closes #260

See merge request isc-projects/bind9!283
2018-06-26 17:20:08 -04:00
Evan Hunt 2b075c2881 CHANGES 2018-06-26 13:52:47 -07:00
Mukund SivaramanandEvan Hunt 06d3106002 return FORMERR when question section is empty if COOKIE is not present 2018-06-26 13:50:15 -07:00
Ondřej Surý be26328849 Merge branch 'temp-disable-qmin-on-rpz' into 'master'
Temporarily disable qname minimization in RPZ tests

See merge request isc-projects/bind9!433
2018-06-26 15:47:52 -04:00
Witold Kręcicki 27fb31580c Temporarily disable qname minimization in RPZ test 2018-06-26 21:28:24 +02:00
Ondřej Surý 116a2333ec Merge branch 'git-replay-merge-explicit-push' into 'master'
Explicitly push into the same named branch at the remote

See merge request isc-projects/bind9!424
2018-06-26 12:58:33 -04:00
Ondřej Surý 8afeda645c Explicitly push into same named branch at the remote instead of relying on whatever branch settings the git config might have 2018-06-26 18:49:40 +02:00
Evan Hunt 0a33957c94 Merge branch 'fix-changes' into 'master'
fix CHANGES

See merge request isc-projects/bind9!422
2018-06-26 12:02:34 -04:00
Evan Hunt 14a3193dfb add missing placeholder and fix CHANGES numbers 2018-06-26 09:01:39 -07:00
Witold Krecicki d0314a14fa Merge branch '180-fix-cmsgbuf-usage' into 'master'
Resolve "Intermittent recursive resolver issues [socket.c:2135]"

Closes #180

See merge request isc-projects/bind9!409
2018-06-26 11:55:14 -04:00
Witold Kręcicki 49f90025a0 Use completely static-sized buffers 2018-06-26 17:41:18 +02:00
Witold Kręcicki d79be7dd5e Fix socket cmsg buffer usage 2018-06-26 17:41:18 +02:00
Evan Hunt dfed04605d Merge branch '288-named-checkconf-does-not-recognize-errors-related-to-in-view-zones' into 'master'
Resolve "named-checkconf does not recognize errors related to in-view zones"

Closes #288

See merge request isc-projects/bind9!319
2018-06-26 11:33:32 -04:00
Mark AndrewsandEvan Hunt f7d346357e CHANGES, copyright 2018-06-26 08:23:51 -07:00
Mark AndrewsandEvan Hunt e01a4bcb20 construct a symtab of valid in-view targets then check that the target exists 2018-06-26 08:23:51 -07:00
Michał Kępień ddc9a8be97 Merge branch '312-fix-rpz-system-test' into 'master'
Fix rpz system test

Closes #312

See merge request isc-projects/bind9!340
2018-06-26 06:52:03 -04:00
Michał Kępień 51522a2b84 Add CHANGES entry
4978.	[test]		Fix error handling and resolver configuration in the
			"rpz" system test. [GL #312]
2018-06-26 12:20:01 +02:00
Michał Kępień ff6b717955 Do not use IANA DNSSEC keys in the "rpz" system test
With "dnssec-validation" now defaulting to "auto", it needs to be
explicitly set to "yes" (the previous default value) for all validating
resolvers used in system tests.  Ensure that requirement is satisfied by
the resolvers used in the "rpz" system test.
2018-06-26 12:19:41 +02:00
Michał Kępień 730c6651a0 Determine "rpz" system test mode based on $mode rather than $DNSRPS_TEST_MODE
Change 4897 modified the way the $DNSRPS_TEST_MODE variable is used in
bin/tests/system/rpz/tests.sh without updating all references to it,
which i.a. causes the $native and $dnsrps variables to not be set in the
default testing mode, effectively preventing failed checks from being
propagated to the final result of the test.  Use $mode instead of
$DNSRPS_TEST_MODE where appropriate to fix error handling in the "rpz"
system test.
2018-06-26 12:19:41 +02:00
Ondřej Surý dc2c707a98 Merge branch 'git-replay-merge+x' into 'master'
Make util/git-replay-merge.sh executable

See merge request isc-projects/bind9!411
2018-06-26 05:47:45 -04:00
Ondřej Surý 05a752c443 Make util/git-replay-merge.sh executable 2018-06-26 11:37:20 +02:00
Evan Hunt b8e273b47f Merge branch '247-log-the-remaining-v-info-at-startup' into 'master'
Resolve "Log the remaining -V info at startup"

Closes #247

See merge request isc-projects/bind9!249
2018-06-25 18:00:17 -04:00
Mark AndrewsandEvan Hunt 33ff03db58 log the remaining -V info at startup 2018-06-25 14:51:28 -07:00
Mark Andrews ad20284104 Merge branch '254-invalid-rpz-prefix-length-log-message-improperly-displays-the-prefix-labels-not-length' into 'master'
Resolve ""invalid RPZ prefix length" log message improperly displays the prefix labels, not length"

Closes #254

See merge request isc-projects/bind9!270
2018-06-25 03:29:23 -04:00
Mukund SivaramanandMark Andrews 90e886cfc0 Add CHANGES entry 2018-06-25 17:19:40 +10:00
Mukund SivaramanandMark Andrews 2bf388a31b Add system test 2018-06-25 17:18:36 +10:00
Mukund SivaramanandMark Andrews 6a756ab654 Patch in trailing nul character to print just the length label (for various cases below) 2018-06-25 17:18:36 +10:00
Mark Andrews 16a67911d8 Merge branch '343-casecompare-of-ninfo-tkey-txt-have-wrong-return-type' into 'master'
Resolve "casecompare of NINFO, TKEY, TXT have wrong return type"

Closes #343

See merge request isc-projects/bind9!384
2018-06-24 22:57:20 -04:00
Mark Andrews 3ba1d1e43b fix casecompare return type for ninfo, tkey, txt 2018-06-24 22:48:59 -04:00
Ondřej Surý f6e1daba05 Merge branch '355-bind-9-13-1-windows-build-fails' into 'master'
Resolve "BIND 9.13.1: Windows Build Fails"

Closes #355

See merge request isc-projects/bind9!400
2018-06-22 06:37:33 -04:00
Mark AndrewsandOndřej Surý 25d693f0c1 add zoneverify.c and zoneverify.h to libdns.vcxproj.filters.in and libdns.vcxproj.in 2018-06-22 06:29:11 -04:00
Mark Andrews 5f2f68985b Merge branch '356-client-cookie-is-being-hashed-twice-when-computing-the-dns-server-cookie' into 'master'
Resolve "Client cookie is being hashed twice when computing the DNS server cookie."

Closes #356

See merge request isc-projects/bind9!399
2018-06-22 03:40:23 -04:00
Mark Andrews 8755a249bc 4975. [bug] The server cookie computation for sha1 and sha256 did
not match the method described in RFC 7873. [GL #356]
2018-06-22 10:26:21 +10:00
Mark Andrews 4795f0ca89 the client cookie was being hashed twice when computing the server cookie for sha1 and sha256 2018-06-22 09:50:10 +10:00
Ondřej Surý dfdc6d61aa Merge branch '351-fix-with-cmocka=path-build' into 'master'
Resolve "configure fails unless --enable-developer is specified"

Closes #351

See merge request isc-projects/bind9!393
2018-06-21 08:22:48 -04:00
Ondřej Surý 0158c1a4ea Use cmocka_set_message_output as test function for cmocka presence 2018-06-21 14:12:02 +02:00
Ondřej Surý 5ed0b0d852 Merge branch '350-merge-9-13-1-release-to-master' into 'master'
Resolve "Merge 9.13.1 release to master"

Closes #350

See merge request isc-projects/bind9!392
2018-06-21 06:40:12 -04:00
Evan HuntandOndřej Surý ad94787cca prepare 9.13.1 release 2018-06-21 12:31:33 +02:00
Ondřej Surý e1400e3667 Merge branch '351-disable-cmocka-by-default' into 'master'
Resolve "configure fails unless --enable-developer is specified"

Closes #351

See merge request isc-projects/bind9!391
2018-06-21 06:29:10 -04:00
Ondřej Surý 45bee4d3c3 Cleanup cmocka related whitespace 2018-06-21 12:20:07 +02:00
Ondřej Surý ed8000f333 Set with_cmocka=no by default 2018-06-21 12:19:28 +02:00
Ondřej Surý 3385fb6456 Merge branch '250-integrate-cmocka-into-our-build-scripts' into 'master'
Add cmocka support to infrastructure (build) files

Closes #250

See merge request isc-projects/bind9!369
2018-06-20 06:38:40 -04:00
Ondřej SurýandOndřej Surý 52731c000d Add support for cmocka assert testing by overriding REQUIRE/INSIST/... macros when UNIT_TESTING is defined 2018-06-20 06:30:07 -04:00
Ondřej SurýandOndřej Surý 10535d1c79 Add --wrap linker option detection 2018-06-20 06:30:07 -04:00
Ondřej SurýandOndřej Surý bd2ddec58f Enforce TAP output from cmocka based unit tests 2018-06-20 06:30:07 -04:00
Ondřej SurýandOndřej Surý 07910f0153 Integrate cmocka unit testing framework to kyua 2018-06-20 06:30:07 -04:00
Ondřej Surý b364445fc2 Merge branch 'check-gitlab-existence' into 'master'
Check if gitlab exists in git-replay-merge.sh

See merge request isc-projects/bind9!388
2018-06-19 03:27:28 -04:00
Witold Kręcicki cdbe639fe6 Check if gitlab exists in git-replay-merge.sh{ 2018-06-19 09:18:59 +02:00
Mark Andrews 681a07229b Merge branch '336-default-of-rrset-order-silently-changed-to-be-sorted-rather-than-random' into 'master'
Resolve "Default of rrset-order silently changed to be sorted (rather than random)"

Closes #336

See merge request isc-projects/bind9!379
2018-06-18 20:34:14 -04:00
Mark Andrews e8154b50d4 Restore default rrset-order to random. 2018-06-19 10:23:44 +10:00
Michał Kępień e495999c62 Merge branch '266-convert-verifyzone-to-a-libdns-function' into 'master'
Convert verifyzone() to a libdns function

Closes #266

See merge request isc-projects/bind9!291
2018-06-15 04:58:30 -04:00
Michał Kępień ad118d6eef Add CHANGES entry
4973.	[func]		verifyzone() and the functions it uses were moved to
			libdns and refactored to prevent exit() from being
			called upon failure.  A side effect of that is that
			dnssec-signzone and dnssec-verify now check for memory
			leaks upon shutdown. [GL #266]
2018-06-15 10:40:59 +02:00
Michał Kępień 8649c59a75 Fix coding style issues in lib/dns/zoneverify.c 2018-06-15 10:40:59 +02:00
Michał Kępień c094d1e4f3 Constify function arguments throughout lib/dns/zoneverify.c
Where possible, apply the const qualifier to arguments of functions
present in lib/dns/zoneverify.c.
2018-06-15 10:40:59 +02:00
Michał Kępień 24bca1c4b4 Propagate dns_zoneverify_dnssec() errors to callers
Since exit() is no longer called upon any dns_zoneverify_dnssec() error,
verification failures should be signalled to callers.  Make
dns_zoneverify_dnssec() return an isc_result_t and handle both success
and error appropriately in bin/dnssec/dnssec-signzone.c and
bin/dnssec/dnssec-verify.c.  This enables memory leak detection during
shutdown of these tools and causes dnssec-signzone to print signing
statistics even when zone verification fails.
2018-06-15 10:40:59 +02:00
Michał Kępień a7ae615743 Remove fatal() and check_result() from lib/dns/zoneverify.c
Since no function in lib/dns/zoneverify.c uses fatal() or check_result()
any more, remove them.
2018-06-15 10:34:38 +02:00
Michał Kępień 5609472fbe Replace remaining fprintf() calls with zoneverify_*() calls
Replace all fprintf() calls inside lib/dns/zoneverify.c, but outside of
zoneverify_log_error() and zoneverify_print() with calls to these
functions.
2018-06-15 10:34:38 +02:00
Michał Kępień 11a552a614 Properly handle record_found() errors
record_found() returns an isc_result_t, but its value is not checked.
Modify the only call site of record_found() so that its errors are
properly handled.
2018-06-15 10:34:38 +02:00
Michał Kępień 5ac14cb753 Do not call exit() upon dns_zoneverify_dnssec() errors
Replace the remaining fatal() calls inside dns_zoneverify_dnssec() with
zoneverify_log_error() and zoneverify_print() calls, ensuring proper
cleanup.
2018-06-15 10:36:47 +02:00
Michał Kępień bf65f72934 Do not call exit() upon record_nsec3() errors
Replace the fprintf() call inside record_nsec3() with a
zoneverify_log_error() call.  Remove the "mctx" argument of
record_nsec3() as it can be extracted from "vctx".

Modify one of the record_nsec3() call sites so that its errors are
properly handled.
2018-06-15 10:34:38 +02:00
Michał Kępień 0d07de9228 Do not call exit() upon match_nsec3() errors
Make match_nsec3() return the verification result through a separate
pointer, thus making it possible to signal errors using function
return value.  Replace all check_result() and fprintf() calls inside
match_nsec3() with zoneverify_log_error() calls and error handling code.

Modify all call sites of match_nsec3() so that its errors are properly
handled.
2018-06-15 10:36:40 +02:00
Michał Kępień 0ed3a2b269 Do not call exit() upon isoptout() errors
Replace all check_result() calls inside isoptout() with
zoneverify_log_error() calls and error handling code.  Enable isoptout()
to signal errors to the caller using its return value.

Modify the call site of isoptout() so that its errors are properly
handled.
2018-06-15 10:36:33 +02:00
Michał Kępień c76fcdd2a2 Do not call exit() upon NSEC3 verification errors
Make verifynsec3(), verifynsec3s(), and verifyemptynodes() return the
verification result through a separate pointer, thus making it possible
to signal errors using function return values.  Replace all
check_result() and fprintf() calls inside these functions with
zoneverify_log_error() calls and error handling code.

Modify all call sites of verifynsec3(), verifynsec3s(), and
verifyemptynodes() so that their errors are properly handled.
2018-06-15 10:36:25 +02:00
Michał Kępień 8448691159 Do not call exit() upon verifynsec() errors
Make verifynsec() return the verification result through a separate
pointer, thus making it possible to signal errors using function
return value.  Replace all check_result() and fprintf() calls inside
verifynsec() with zoneverify_log_error() calls and error handling code.

Modify the call site of verifynsec() so that its errors are properly
handled.

Rename "tresult" to "tvresult" in order to improve variable naming
consistency between functions.
2018-06-15 10:36:18 +02:00
Michał Kępień 0ed9ec49ed Do not call exit() upon check_no_rrsig() errors
Replace all check_result() and fprintf() calls inside check_no_rrsig()
with zoneverify_log_error() calls and error handling code.  Enable
check_no_rrsig() to signal errors to the caller using its return
value.

Modify the call site of check_no_rrsig() so that its errors are properly
handled.

Define buffer size using a named constant rather than a plain integer.
2018-06-15 10:36:14 +02:00
Michał Kępień 30e837f31a Do not call exit() upon verifyset() errors
Replace all check_result() and fprintf() calls inside verifyset() with
zoneverify_log_error() calls and error handling code.  Enable
verifyset() to signal errors to the caller using its return value.

Modify the call site of verifyset() so that its errors are properly
handled.

Define buffer sizes using named constants rather than plain integers.
2018-06-15 10:36:06 +02:00
Michał Kępień d782fcc638 Do not call exit() upon verifynode() errors
Make verifynode() return the verification result through a separate
pointer, thus making it possible to signal errors using function
return value.  Replace all fatal() and check_result() calls inside
verifynode() with zoneverify_log_error() calls and error handling code.
Add a REQUIRE assertion to emphasize verifynode() may be called with
some of its arguments set to NULL.

Modify all call sites of verifynode() so that its errors are properly
handled.
2018-06-15 10:35:55 +02:00
Michał Kępień 7a996f0c0d Do not call exit() upon is_empty() errors
Replace the check_result() call inside is_empty() with a
zoneverify_log_error() call and error handling code.  Enable is_empty()
to signal errors to the caller using its return value.

Modify the call site of is_empty() so that its errors are properly
handled.
2018-06-15 10:35:49 +02:00
Michał Kępień 04038baf1a Do not call exit() upon check_no_nsec() errors
Replace the fatal() call inside check_no_nsec() with a
zoneverify_log_error() call.  Enable check_no_nsec() to signal errors to
the caller using its return value.

Modify all call sites of check_no_nsec() so that its errors are properly
handled.
2018-06-15 10:35:45 +02:00
Michał Kępień 4354f44d9c Do not call exit() upon verify_nodes() errors
Replace all fatal(), check_result(), and check_dns_dbiterator_current()
calls inside verify_nodes() with zoneverify_log_error() calls and error
handling code.  Enable verify_nodes() to signal errors to the caller
using its return value.

Modify the call site of verify_nodes() so that its errors are properly
handled.

Free all heap elements upon verification context cleanup as a
verification error may prevent them from being freed elsewhere.

Remove the check_dns_dbiterator_current() macro as it is no longer used
anywhere in lib/dns/zoneverify.c.
2018-06-15 10:35:40 +02:00
Michał Kępień 00ecbad2d0 Do not call exit() upon check_bad_algorithms() errors
Replace all fatal() and fprintf() calls inside check_bad_algorithms()
with zoneverify_print() calls and error handling code.  Enable
check_bad_algorithms() to signal errors to the caller using its return
value.

Modify the call site of check_bad_algorithms() so that its errors are
properly handled.
2018-06-15 10:35:25 +02:00
Michał Kępień 7c3f653112 Do not call exit() upon check_dnskey() errors
Replace all fatal() and check_result() calls inside check_dnskey() with
zoneverify_log_error() calls and error handling code.  Enable
check_dnskey() to signal errors to the caller using its return value.

Modify the call site of check_dnskey() so that its errors are properly
handled.
2018-06-15 10:35:10 +02:00
Michał Kępień 1a6525ffa2 Do not call exit() upon check_apex_rrsets() errors
Replace all fatal() calls inside check_apex_rrsets() with
zoneverify_log_error() calls and error handling code.  Enable
check_apex_rrsets() to signal errors to the caller using its return
value.

Modify the call site of check_apex_rrsets() so that its errors are
properly handled.
2018-06-15 10:34:38 +02:00
Michał Kępień ee06182057 Use RUNTIME_CHECK instead of check_result() where it is safe to do so
Replace calls to check_result() with RUNTIME_CHECK assertions for all
dns_rdata_tostruct() calls in lib/dns/zoneverify.c as this function
cannot fail when the "mctx" argument is NULL (and that is the case for
all call sites of this function throughout lib/dns/zoneverify.c).
2018-06-15 10:16:41 +02:00
Michał Kępień fc6b5ad585 Extract print_summary() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for printing a
summary for a fully signed zone to a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień b3d2ab442c Extract check_bad_algorithms() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for checking
whether the zone is fully signed using all active algorithms to a
separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień eb17957c3d Extract verify_nodes() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for verifying
DNSSEC signatures against the DNSKEY RRset at zone apex and checking
consistency of NSEC/NSEC3 chains to a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień dc81d8cb67 Extract determine_active_algorithms() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for determining
and printing a list of DNSSEC algorithms active in the verified zone to
a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień f06a755dd2 Extract check_dnskey_sigs() from check_dnskey()
Extract the part of check_dnskey() responsible for determining active
algorithms in the verified zone based on the signatures at zone apex to
a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień d4f3b14c78 Extract check_dnskey() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for checking the
DNSKEY RRset at zone apex to a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień 097b57744a Extract check_apex_rrsets() from dns_zoneverify_dnssec()
Extract the part of dns_zoneverify_dnssec() responsible for fetching and
preliminarily checking DNSKEY, SOA, NSEC, and NSEC3PARAM RRsets from
zone apex to a separate function.
2018-06-15 10:10:24 +02:00
Michał Kępień d949a5d83c Implement zoneverify_log_error() and zoneverify_print()
These functions will be used in the process of replacing fatal(),
check_result(), and fprintf() calls throughout lib/dns/zoneverify.c with
code that does not call exit().  They are intended for:

  - zoneverify_log_error(): logging problems encountered while
    performing zone verification,

  - zoneverify_print(): printing status messages and reports which are
    only useful in standalone tools.

To make using dns_zone_logv() possible, add a new "zone" argument to
dns_zoneverify_dnssec() that standalone tools are expected to set to
NULL.
2018-06-15 10:10:24 +02:00
Michał Kępień 730cc3e3c5 Move algorithm tables to the verification context structure
Tables representing algorithm use in the verified zone are commonly
accessed throughout dns_zoneverify_dnssec().  Move them into the
structure representing a verification context.  While this does not
really simplify currently existing code, it will facilitate passing data
around between smaller functions that dns_zoneverify_dnssec() is about
to get split into.
2018-06-15 10:10:24 +02:00
Michał Kępień 5d666f533b Move commonly used dns_rdataset_t structures to the verification context structure
Eight structures representing four RRsets and their signatures are
commonly accessed throughout dns_zoneverify_dnssec().  Move them into
the structure representing a verification context.  While this does not
really simplify currently existing code, it will facilitate passing data
around between smaller functions that dns_zoneverify_dnssec() is about
to get split into.
2018-06-15 10:10:24 +02:00
Michał Kępień 43d0fb84e7 Move commonly used variables to the verification context structure
Move variables commonly used throughout dns_zoneverify_dnssec() and its
helper functions to the structure representing a verification context in
order to reduce the number of arguments passed between functions.
2018-06-15 10:10:24 +02:00
Michał Kępień ffc7997723 Do not use static variables in lib/dns/zoneverify.c
Make dns_zoneverify_dnssec() eligible for multithreaded use by replacing
the static variables it accesses with a stack-allocated structure
containing these variables.  Implement setup and cleanup routines for
that structure, ensuring no error in these routines causes exit() to be
called any more.  Pass a pointer to that structure to functions
requiring access to variables which were previously static.
2018-06-15 10:10:24 +02:00
Michał Kępień 7554e8d2ca Rename verifyzone() to dns_zoneverify_dnssec()
This makes the function's name match the naming convention used for
libdns functions.
2018-06-15 10:07:22 +02:00
Michał Kępień 3a14450d39 Move verifyzone() and its dependencies into lib/dns/zoneverify.c
This commit only moves code around, with the following exceptions:

  - the check_dns_dbiterator_current() macro and functions
    is_delegation() and has_dname() were removed from
    bin/dnssec/dnssectool.{c,h} and duplicated in two locations:
    bin/dnssec/dnssec-signzone.c and lib/dns/zoneverify.c; these
    functions are used both by the code in bin/dnssec/dnssec-signzone.c
    and verifyzone(), but are not a good fit for being exported by a
    code module responsible for zone verification,

  - fatal() and check_result() were duplicated in lib/dns/zoneverify.c
    as static functions which do not use the "program" variable any more
    (as it is only set by the tools in bin/dnssec/); this is a temporary
    step which only aims to prevent compilation from breaking - these
    duplicate functions will be removed once lib/dns/zoneverify.c is
    refactored not to use them,

  - the list of header files included by lib/dns/zoneverify.c was
    expanded to encompass all header files that are actually used by the
    code in that file,

  - a description of the purpose of the commented out "fields" inside
    struct nsec3_chain_fixed was added.
2018-06-15 10:07:22 +02:00
Michał Kępień ffe8ddd95f Replace type_format() and TYPE_FORMATSIZE with their libdns counterparts
Rather than use custom functions and macros local to bin/dnssec/, use
their counterparts provided by libdns.
2018-06-15 09:59:20 +02:00
Michał Kępień c37537cfe7 Merge branch '341-constify-dns_rdata_tostruct' into 'master'
Resolve "constify dns_rdata_tostruct"

Closes #341

See merge request isc-projects/bind9!378
2018-06-15 02:57:54 -04:00
Mark AndrewsandMichał Kępień abb2fd1027 Declare the 'rdata' argument for dns_rdata_tostruct() to be const 2018-06-15 08:48:49 +02:00
Ondřej Surý 3668e152bb Merge branch 'fix-pkcs11-build' into 'master'
Fix pkcs11 build

See merge request isc-projects/bind9!377
2018-06-14 18:06:22 -04:00
Ondřej SurýandOndřej Surý 8ee23a47e8 Add better EMPTY_TRANSLATION_UNIT to isc/util.h 2018-06-14 17:58:03 -04:00
Ondřej SurýandOndřej Surý 38060959c7 Put proper guards in openssl_shim.{c,h} when compiling with PKCS#11 2018-06-14 17:58:03 -04:00
Ondřej Surý 0b559ccb33 Merge branch 'tests-server-stale-prereq' into 'master'
Fix serve-stale requirement, skip without Time::HiRes

See merge request isc-projects/bind9!356
2018-06-14 10:36:14 -04:00
Petr MenšíkandOndřej Surý 7a0c7bf9c8 Fix server-stale requirement, skip without Time::HiRes 2018-06-14 10:26:54 -04:00
Ondřej Surý 85da0086a8 Merge branch '309-fix-default-recursion' into 'master'
Resolve "Recursion improperly allowed by default"

Closes #309

See merge request isc-projects/bind9!372
2018-06-14 08:51:55 -04:00
Evan HuntandOndřej Surý 05f25f8970 add a regression test for default allow-recursion settings 2018-06-14 14:42:50 +02:00
Evan HuntandOndřej Surý 03ecba2cdc allow-recursion could incorrectly inherit from the default allow-query 2018-06-14 14:42:50 +02:00
Ondřej Surý 92b4e70d35 Merge branch '337-remove-copyright-information-from-generated-configure-file' into 'master'
Resolve "Remove copyright information from generated configure file"

Closes #337

See merge request isc-projects/bind9!370
2018-06-14 03:56:00 -04:00
Ondřej Surý 369d8cd432 Remove copyright information from the generated configure file 2018-06-14 09:46:33 +02:00
Ondřej Surý e4295bb46c Merge branch '328-add-openssl-shim' into 'master'
Add thin openssl shim for OpenSSL 1.1.x and LibreSSL compatibility functions

See merge request isc-projects/bind9!367
2018-06-13 08:27:21 -04:00
Ondřej Surý de23b20ccf Update copyrights and whitespace 2018-06-13 14:19:07 +02:00
Ondřej Surý 302c6cbe7f Add thin openssl shim for OpenSSL 1.1.x and LibreSSL compatibility functions 2018-06-13 14:19:07 +02:00
Witold Krecicki be8a607341 Merge branch 'fix-qmin-test-addr-order' into 'master'
Fix qname minimization test failures with A/AAAA ordering

See merge request isc-projects/bind9!368
2018-06-13 07:58:34 -04:00
Witold Kręcicki 524233a9d0 Fix qname minimization test failures with A/AAAA ordering 2018-06-13 13:47:26 +02:00
Michał Kępień 9b58500c6a Merge branch '298-fix-dname-handling-in-dnssec-tools' into 'master'
Fix DNAME handling in DNSSEC tools

Closes #298

See merge request isc-projects/bind9!345
2018-06-13 07:29:20 -04:00
Michał Kępień f467ba8e1f Add CHANGES entry
4971.	[bug]		dnssec-signzone and dnssec-verify did not treat records
			below a DNAME as out-of-zone data. [GL #298]
2018-06-13 12:55:34 +02:00
Mark AndrewsandMichał Kępień 7be900a98f Pull out the saving of the zone cut into a separate function 2018-06-13 12:55:32 +02:00
Michał Kępień 75c0d85fc4 Treat records below a DNAME as out-of-zone data
DNAME records indicate bottom of zone and thus no records below a DNAME
should be DNSSEC-signed or included in NSEC(3) chains.  Add a helper
function, has_dname(), for detecting DNAME records at a given node.
Prevent signing DNAME-obscured records.  Check that DNAME-obscured
records are not signed.
2018-06-13 12:19:54 +02:00
Ondřej Surý cf9fd889a6 Merge branch '328-remove-openssl-patch' into 'master'
Remove the OpenSSL PKCS#11 patches

See merge request isc-projects/bind9!362
2018-06-13 05:01:49 -04:00
Ondřej Surý c92d09320b Remove the OpenSSL PKCS#11 patches - not really needed now 2018-06-13 10:53:21 +02:00
Michał Kępień 337e37a6cf Merge branch '284-unify-keyfile-to-configuration-conversions-in-system-tests' into 'master'
Unify keyfile-to-configuration conversions in system tests

Closes #284

See merge request isc-projects/bind9!312
2018-06-13 02:06:15 -04:00
Michał Kępień 68f056b2a0 Add helper variables in mkeys system test
The keyfile and key ID for the original managed key do not change
throughout the mkeys system test.  Keep them in helper variables to
prevent calling "cat" multiple times and improve code readability.
2018-06-13 07:57:40 +02:00
Michał Kępień 120af964ce Replace duplicated code snippet with calls to helper functions
Reduce code duplication by replacing a code snippet repeated throughout
system tests using "trusted-keys" and/or "managed-keys" configuration
sections with calls to keyfile_to_{managed,trusted}_keys() helper
functions.
2018-06-13 07:57:40 +02:00
Michał Kępień 2392b8bc7d Add helper functions for converting keyfile data into configuration sections
Add a set of helper functions for system test scripts which enable
converting key data from a set of keyfiles to either a "trusted-keys"
section or a "managed-keys" section suitable for including in a
resolver's configuration file.
2018-06-13 07:57:40 +02:00
Witold Krecicki 7dc84eaa8e Merge branch '16-qname-minimization' into 'master'
QNAME Minimization

See merge request isc-projects/bind9!253
2018-06-12 07:44:36 -04:00
Witold Kręcicki 7ec88b384d Add qname-minimization off as an option; test fixes 2018-06-12 10:24:05 +02:00
Witold Kręcicki dfa43e6dd5 CHANGES entry 2018-06-12 09:20:37 +02:00
Witold Kręcicki 1c36eed760 qname minimization: ARM entry 2018-06-12 09:20:13 +02:00
Evan HuntandWitold Kręcicki dde66b8012 nits
- capitalize QNAME in the doc
- regenerate options/docbook
- whitespace
2018-06-12 09:20:13 +02:00
Witold Kręcicki 265052df49 qname-minimization: Some post-review style/minor fixes 2018-06-12 09:20:12 +02:00
Mark AndrewsandWitold Kręcicki 9cef87d835 update qname-minimization 2018-06-12 09:18:47 +02:00
Witold Kręcicki 1bf6b3ea65 +x permissions on bin/tests/system scripts 2018-06-12 09:18:47 +02:00
Witold Kręcicki 31b0dc1f20 Require python with dnspython module 2018-06-12 09:18:47 +02:00
Witold Kręcicki 058ce1e732 qname minimization: log how many qmin steps were taken 2018-06-12 09:18:47 +02:00
Witold Kręcicki c04784c144 Disable qname minimization if we encounter a bad server 2018-06-12 09:18:47 +02:00
Evan HuntandWitold Kręcicki c8015eb33b style nits (mostly line length) 2018-06-12 09:18:47 +02:00
Evan HuntandWitold Kręcicki 2ea47c7f34 rename test to qmin; add it to conf.sh.in and Makefile.in; fix copyrights 2018-06-12 09:18:47 +02:00
Witold Kręcicki 4f9c718803 qname minimization: fix tests 2018-06-12 09:18:47 +02:00
Witold Kręcicki dd7bb617be - qname minimization:
- make qname-minimization option tristate {strict,relaxed,disabled}
 - go straight for the record if we hit NXDOMAIN in relaxed mode
 - go straight for the record after 3 labels without new delegation or 7 labels total

- use start of fetch (and not time of response) as 'now' time for querying cache for
  zonecut when following delegation.
2018-06-12 09:18:46 +02:00
Witold Kręcicki 0698158eb0 QNAME minimization 2018-06-12 09:18:46 +02:00
Michał Kępień b7968f6c25 Merge branch '269-refactor-zone-logging-functions' into 'master'
Refactor zone logging functions

Closes #269

See merge request isc-projects/bind9!295
2018-06-11 07:04:39 -04:00
Michał Kępień c8de677eae Add CHANGES entry
4969.	[cleanup]	Refactor zone logging functions. [GL #269]
2018-06-11 12:49:06 +02:00
Michał Kępień 5c03cd339e Reimplement all zone logging functions using dns_zone_logv()
In order to decrease code duplication, express the logic contained in
all zone logging functions using dns_zone_logv() calls.
2018-06-11 12:49:06 +02:00
Michał Kępień bb2dfb3f49 Add dns_zone_logv()
Add a new libdns function, dns_zone_logv(), which takes a single va_list
argument rather than a variable number of arguments and can be used as a
base for implementing more specific zone logging functions.
2018-06-11 12:49:06 +02:00
Evan Hunt b8fbe4aab4 Merge branch 'validate-glue' into 'master'
ensure that we attempt to validate glue if it's signed

See merge request isc-projects/bind9!300
2018-06-08 14:48:01 -04:00
Evan Hunt bde9c2ec39 CHANGES 2018-06-08 11:39:39 -07:00
Evan Hunt 8d923a05a9 ensure that we attempt to validate glue if it's signed
- incidentally fixed a bug in the dnssec system test where TTLs in the
  answer section rather than the additional section were being checked
2018-06-08 11:39:25 -07:00
Evan Hunt 4aecd153de Merge branch '324-add-obsolete-answer-cookie-to-master' into 'master'
Resolve "add obsolete answer-cookie to master."

Closes #324

See merge request isc-projects/bind9!352
2018-06-08 14:30:13 -04:00
Mark AndrewsandEvan Hunt 0e10223029 add answer-cookie as a obsolete option 2018-06-08 11:21:43 -07:00
Mark Andrews 2368c3d2de Merge branch '325-add-cfg_parse_buffer4' into 'master'
Resolve "add cfg_parse_buffer4"

Closes #325

See merge request isc-projects/bind9!353
2018-06-08 03:38:18 -04:00
Mark Andrews b313084af2 add cfg_parse_buffer4 2018-06-08 17:37:14 +10:00
Mark Andrews 2a7025f962 Merge branch '322-add-support-for-marking-options-as-deprecated' into 'master'
Resolve "add support for marking options as deprecated."

Closes #322

See merge request isc-projects/bind9!351
2018-06-08 01:54:22 -04:00
Mark Andrews befff9452c Add support for marking a option as deprecated. 2018-06-08 15:45:16 +10:00
Witold Krecicki d70726b0d2 Merge branch 'XX-dont-fetch-keys-when-fuzzing' into 'master'
Don't fetch DNSKEY when fuzzing resolver

See merge request isc-projects/bind9!347
2018-06-06 09:25:20 -04:00
Witold Kręcicki cb3208aa43 Don't fetch DNSKEY when fuzzing resolver 2018-06-06 15:06:23 +02:00
Ondřej Surý 5fc4bd3f76 Merge branch '313-fix-spurious-entropy.h-installation' into 'master'
Resolve ""make install" error on master - missing `entropy.h`"

Closes #313

See merge request isc-projects/bind9!346
2018-06-06 08:45:49 -04:00
Ondřej Surý 013a49474c fix whitespaces 2018-06-06 14:37:22 +02:00
Ondřej Surý b4aa7a9d7e Remove entropy.h from Makefile.in 2018-06-06 14:36:33 +02:00
Ondřej Surý e582a10133 Merge branch '307-add-VALIDATION_DEFAULT-to-win32/Configure' into 'master'
VALIDATION_DEFAULT now comes from config.h.{in,win32}

Closes #307

See merge request isc-projects/bind9!344
2018-06-06 08:22:07 -04:00
Ondřej Surý 82e68ffbf0 Add VALIDATION_DEFAULT to Windows Configure script 2018-06-06 14:03:16 +02:00
Mark Andrews 18c3a08471 Merge branch '240-multiple-rrsigs-on-some-records-in-signed-zone-even-though-only-one-key-is-ever-active-at-a-time' into 'master'
Resolve "Multiple RRSIGs on some records in signed zone even though only one key is ever active at a time"

Closes #240

See merge request isc-projects/bind9!231
2018-06-06 02:29:20 -04:00
Mark Andrews ba7a343156 add CHANGES note 2018-06-06 15:59:23 +10:00
Mark Andrews 0db5b087ed add duplicate signature test 2018-06-06 15:58:49 +10:00
Mark Andrews 87a3dc8ab9 add support -T sigvalinsecs 2018-06-06 15:35:57 +10:00
Mark Andrews 0667bf7ae7 only sign with other keys when deleting a key if there are not already existing signature for the deleted algorithm 2018-06-06 15:33:41 +10:00
Evan Hunt b8b731bd20 Merge branch '302-use-ip-for-ifconfig' into 'master'
Resolve "ifconfig.sh doesn't work on centos7"

Closes #302

See merge request isc-projects/bind9!330
2018-06-06 00:44:08 -04:00
Evan Hunt 71f2335f5a CHANGES 2018-06-05 21:35:29 -07:00
Evan Hunt d7c5400798 use "ip" on linux, falling back to "ifconfig" when it isn't available 2018-06-05 21:35:16 -07:00
Evan Hunt 41b29a436b expand address range in ifconfig.sh to include more than one subnet 2018-06-05 21:35:16 -07:00
Mark Andrews 56bbad6b78 Merge branch '316-move-named-t-processing-to-its-own-function' into 'master'
Resolve "move named -T processing to its own function"

Closes #316

See merge request isc-projects/bind9!343
2018-06-06 00:26:09 -04:00
Mark Andrews ef7401e4a7 add CHANGES 2018-06-06 13:30:28 +10:00
Mark Andrews b491ceeb50 move -T parsing to its own function 2018-06-06 13:26:59 +10:00
Ondřej Surý f0d97a7cb4 Merge branch 'disable-random-test' into 'master'
Disable the random_test from the regular kyua run, we are either using cryptolib…

See merge request isc-projects/bind9!341
2018-06-05 16:57:38 -04:00
Ondřej Surý edcdfe9619 Disable the random_test from the regular kyua run, we are either using cryptolib PRNG or non-CS PRNG 2018-06-05 22:49:14 +02:00
Ondřej Surý 3d39d805c7 Merge branch '295-remove-ecc-gost' into 'master'
Resolve "Remove ECC-GOST (GOST R 34.11-94) support"

Closes #295

See merge request isc-projects/bind9!320
2018-06-05 15:41:18 -04:00
Ondřej Surý 2f7ffadfc0 Add CHANGES entry
4952.   [protocol]      Remove support for ECC-GOST (GOST R 34.11-94).
			[GL #295]
2018-06-05 09:14:14 +02:00
Ondřej Surý e771326f60 Add note about removing ECC-GOST to release notes 2018-06-05 09:14:14 +02:00
Ondřej Surý 27593e65dc Remove support for obsoleted ECC-GOST (GOST R 34.11-94) algorithm 2018-06-05 09:14:14 +02:00
Evan Hunt 57f0949e2b Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!339
2018-06-05 01:08:37 -04:00
Evan Hunt 94567f96ef placeholder 2018-06-04 22:07:58 -07:00
Mark Andrews 3b66a7bbd7 Merge branch 'fanf/bind9-u/fanf2/nsid-logging' into 'master'
Fanf/bind9 u/fanf2/nsid logging

See merge request isc-projects/bind9!338
2018-06-04 22:31:00 -04:00
Tony FinchandMark Andrews 4862d8ffc1 Add CHANGES and release notes entries
4957.	[func]		NSID logging (enabled by the "request-nsid" option)
			now has its own "nsid" category, instead of using the
			"resolver" category. [GL !331]
2018-06-05 12:11:12 +10:00
Tony FinchandMark Andrews abfbedc0b1 Move NSID logging to its own category
It is very verbose, so it is useful to be able to filter it out.
2018-06-05 12:10:37 +10:00
Mark Andrews 193cc42b44 Merge branch '281-dont-insert-extra-space-between-nsec3-nexthash-and-typemap' into 'master'
Resolve "9.11.3-S1 totext_nsec3 inserts a redundant white space between next hash and type map [ISC-support #12887]"

See merge request isc-projects/bind9!313
2018-06-03 22:34:28 -04:00
Mark Andrews f98d8115e3 Add CHANGES note 2018-06-04 12:24:00 +10:00
Mukund SivaramanandMark Andrews b0d9198e03 Add NSEC3 fromtext/totext unittests 2018-06-04 12:21:48 +10:00
Mukund SivaramanandMark Andrews d4ea1edd2c Don't insert 2nd space between NSEC3 nexthash and typemap fields 2018-06-04 12:21:48 +10:00
Ondřej Surý 374746430d Merge branch 'update-git-replay-merge' into 'master'
Update git-replay-merge script to use gitlab CLI to push merge request automatically

See merge request isc-projects/bind9!289
2018-05-31 15:47:16 -04:00
Ondřej SurýandOndřej Surý 3a643ee5b8 Add *.rej and *.orig to the global .gitignore 2018-05-31 15:39:08 -04:00
Ondřej SurýandOndřej Surý cabf9ab27a Update git-replay-merge script to use gitlab CLI to push merge request automatically 2018-05-31 15:39:08 -04:00
Ondřej Surý 4cbe9c501d Merge branch '30-deprecated-dnssec-validation-auto' into 'master'
Resolve "Update the default for dnssec-validation to auto"

Closes #30

See merge request isc-projects/bind9!145
2018-05-31 12:40:43 -04:00
Evan HuntandOndřej Surý d91e313337 CHANGES and release note 2018-05-31 18:23:43 +02:00
Evan HuntandOndřej Surý a7a2fa296a update system tests so validation won't fail when using IANA key
- all tests with "recursion yes" now also specify "dnssec-validation yes",
  and all tests with "recursion no" also specify "dnssec-validation no".
  this must be maintained in all new tests, or else validation will fail
  when we use local root zones for testing.
- clean.sh has been modified where necessary to remove managed-keys.bind
  and viewname.mkeys files.
2018-05-31 18:22:33 +02:00
Evan HuntandOndřej Surý bef18ecac6 Set "dnssec-validation auto" by default
- the default setting for dnssec-validation is now "auto", which
  activates DNSSEC validation using the IANA root key.  The old behavior
  can be restored by explicitly setting "dnssec-validation yes", which
  "yes", which activates DNSSEC validation only if keys are explicitly
  configured in named.conf.
- the ARM has been updated to describe the new behavior
2018-05-31 18:22:32 +02:00
Ondřej Surý 1f743fe0da Merge branch 'ignore-more-files-in-bin-tests-optional' into 'master'
Add backtrace_test and nsecify to bin/tests/optional/.gitignore

See merge request isc-projects/bind9!331
2018-05-31 06:15:04 -04:00
Ondřej Surý 192f777ee8 Add backtrace_test and nsecify to bin/tests/optional/.gitignore 2018-05-31 12:06:51 +02:00
Ondřej Surý 3dcc303d10 Merge branch '289-fix-non-threaded-and-windows-builds' into 'master'
Fixup the Windows and non-threaded builds

See merge request isc-projects/bind9!328
2018-05-31 05:41:46 -04:00
Ondřej Surý 4f6d6919ab Remove thread_local macro from win32 platform.h 2018-05-30 23:03:22 +02:00
Ondřej Surý 29be9cddaf Uninline isc_nonce_buf 2018-05-30 22:43:39 +02:00
Ondřej Surý e50210c695 Add isc_entropy_get to libisc.def.in 2018-05-30 22:34:57 +02:00
Ondřej Surý ed3389a72c Remove return from void function 2018-05-30 22:14:38 +02:00
Ondřej Surý eb242959cb Add nonce.{c,h} and entropy.c to libisc.vcxproj.* 2018-05-30 22:07:51 +02:00
Ondřej Surý 05d7aa5734 Fix various build failures on Windows (Courtesy of rockerinthelocker) 2018-05-30 15:09:55 +02:00
Ondřej Surý 57c3064785 Remove non-existant GUIDs from bind9.sln.in 2018-05-30 13:27:35 +02:00
Ondřej Surý 430e8d6858 Change the _LOCK macro on Windows and the variable initialization to be more VC compatible 2018-05-30 07:28:19 +02:00
Ondřej Surý 12bdee3aa7 Turn the _LOCK/_UNLOCK in xoshiro128** to no-op for non-threaded builds 2018-05-30 06:37:51 +02:00
Ondřej Surý 28e0b2c4c4 Use isc int types to be able to build with old VS 2018-05-30 06:26:05 +02:00
Evan Hunt b1e2ecbc03 Merge branch '72-supported-platforms' into 'master'
add PLATFORMS.md file to list supported platforms

Closes #72

See merge request isc-projects/bind9!315
2018-05-29 22:33:30 -04:00
Evan Hunt 79bf79082b add PLATFORMS.md/PLATFORMS, for a supported platform list 2018-05-29 22:25:27 -04:00
Curtis Blackburn 09aaed4329 Merge branch '301-rpzrecurse-output' into 'master'
Resolve "output of the rpzrecurse test is incorrect on windows"

Closes #301

See merge request isc-projects/bind9!327
2018-05-29 22:14:12 -04:00
Evan Hunt 75d348bed6 bits of conf.sh.in and conf.sh.win32 were out of sync 2018-05-29 22:06:09 -04:00
Evan Hunt 02f591f54c Merge branch 'cleanups' into 'master'
fix missing config.h and win32 symbols

See merge request isc-projects/bind9!326
2018-05-29 22:05:24 -04:00
Evan Hunt 3abb2db9e8 fix missing config.h and win32 symbols 2018-05-29 18:39:56 -07:00
Ondřej Surý 0369ee1b85 Merge branch '289-add-non-cs-prng' into 'master'
Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG

Closes #289

See merge request isc-projects/bind9!325
2018-05-29 17:08:52 -04:00
Ondřej Surý a3aed02e43 Add CHANGES entry.
4956.   [func]          Change isc_random() to be just PRNG using xoshiro128**,
                        and add isc_nonce_buf() that uses CSPRNG. [GL #289]
2018-05-29 22:58:49 +02:00
Ondřej Surý ce71d94434 Make the xoshiro128plusplus thread-safe 2018-05-29 22:58:49 +02:00
Ondřej Surý 99ba29bc52 Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG
This commit reverts the previous change to use system provided
entropy, as (SYS_)getrandom is very slow on Linux because it is
a syscall.

The change introduced in this commit adds a new call isc_nonce_buf
that uses CSPRNG from cryptographic library provider to generate
secure data that can be and must be used for generating nonces.
Example usage would be DNS cookies.

The isc_random() API has been changed to use fast PRNG that is not
cryptographically secure, but runs entirely in user space.  Two
contestants have been considered xoroshiro family of the functions
by Villa&Blackman and PCG by O'Neill.  After a consideration the
xoshiro128starstar function has been used as uint32_t random number
provider because it is very fast and has good enough properties
for our usage pattern.

The other change introduced in the commit is the more extensive usage
of isc_random_uniform in places where the usage pattern was
isc_random() % n to prevent modulo bias.  For usage patterns where
only 16 or 8 bits are needed (DNS Message ID), the isc_random()
functions has been renamed to isc_random32(), and isc_random16() and
isc_random8() functions have been introduced by &-ing the
isc_random32() output with 0xffff and 0xff.  Please note that the
functions that uses stripped down bit count doesn't pass our
NIST SP 800-22 based random test.
2018-05-29 22:58:21 +02:00
Mark Andrews 1a9a1b48d7 Merge branch '286-new-cppcheck-detected-errors' into 'master'
Resolve "New cppcheck-detected errors"

See merge request isc-projects/bind9!324
2018-05-28 19:40:53 -04:00
Mark Andrews e9134b15eb add CHANGES note 2018-05-29 09:28:30 +10:00
Mark Andrews cb5802e854 work around cppcheck false positive 2018-05-29 09:28:30 +10:00
Evan Hunt d71ee81676 Merge branch '293-cleanup-radix' into 'master'
Resolve "Follow-up from "Remove ECS authoritative implementation from BIND""

Closes #293

See merge request isc-projects/bind9!322
2018-05-28 19:07:20 -04:00
Evan Hunt 3006ccb7f0 improve readability of radix code
- use RADIX_V4 and RADIX_V6 instead of 0 and 1 as array indices
- remove some unused macros
2018-05-28 18:45:41 -04:00
Evan Hunt e7b2b097ed Merge branch 'serve-stale-doc-and-logging' into 'master'
Serve stale doc and logging

See merge request isc-projects/bind9!323
2018-05-28 18:38:49 -04:00
Evan Hunt 049777d6c5 CHANGES 2018-05-25 22:10:24 -07:00
Tony FinchandEvan Hunt 4b442c309d Move serve-stale logging to its own category, so that its verbosity can be curtailed. 2018-05-25 22:00:51 -07:00
Evan Hunt d1ca21d50a clarify serve-stale documentation, and add a floor for max-stale-ttl
- added a 1-second floor to max-stale-ttl similar to stale-answer-ttl;
  if set to 0, it will be silently updated to 1.
- fixed the ARM entry on max-stale-ttl, which incorrectly suggested that
  the default was 0 instead of 1 week.
- clarified rndc serve-stale documentation.
2018-05-25 22:00:37 -07:00
Evan Hunt 58ad54e7a1 Merge branch '245-fix-test-color' into 'master'
Resolve "rpz test fails to launch ns2 on openbsd"

Closes #245

See merge request isc-projects/bind9!321
2018-05-25 15:58:32 -04:00
Evan Hunt 1e31fdb76d fix openbsd color-display problem in system test output 2018-05-25 12:47:40 -07:00
Evan Hunt 17871ac914 Merge branch '184-lock-bucket-mapping-is-broken-in-rbtdb-c-when-dns_rbt_usehash-is-not-defined' into 'master'
Resolve "Lock bucket mapping is broken in rbtdb.c when DNS_RBT_USEHASH is not defined"

Closes #184

See merge request isc-projects/bind9!159
2018-05-25 12:29:56 -04:00
Evan Hunt 5a509f9e54 CHANGES 2018-05-25 09:12:28 -07:00
Evan Hunt 7fbffa6c44 remove #ifndef DNS_RBT_USEHASH from rbtdb.c
- this was a compile time option to disable the use of a hash table in
  the RBTDB. the code path without the hash table was buggy and
  untested, and unlikely to be needed by anyone anyway.
2018-05-25 09:12:17 -07:00
Evan Hunt 5354adc403 Merge branch '32-remove-ecs-auth' into 'master'
Resolve "Remove ECS authoritative implementation from BIND"

Closes #32

See merge request isc-projects/bind9!219
2018-05-25 11:31:11 -04:00
Evan Hunt 9f8ba2eb82 CHANGES, release note 2018-05-25 08:21:25 -07:00
Evan Hunt cb96608fd8 copyrights 2018-05-25 08:21:25 -07:00
Evan Hunt e324449349 remove the experimental authoritative ECS support from named
- mark the 'geoip-use-ecs' option obsolete; warn when it is used
  in named.conf
- prohibit 'ecs' ACL tags in named.conf; note that this is a fatal error
  since simply ignoring the tags could make ACLs behave unpredictably
- re-simplify the radix and iptable code
- clean up dns_acl_match(), dns_aclelement_match(), dns_acl_allowed()
  and dns_geoip_match() so they no longer take ecs options
- remove the ECS-specific unit and system test cases
- remove references to ECS from the ARM
2018-05-25 08:21:25 -07:00
Mark Andrews 59d076caed Merge branch '290-documentation-error-missing' into 'master'
Resolve "Documentation error - missing "};""

Closes #290

See merge request isc-projects/bind9!318
2018-05-24 23:09:03 -04:00
Mark Andrews ab22160a1c add closing '};' 2018-05-25 12:48:55 +10:00
Evan Hunt 101eafb044 Merge branch 'fix-catz-test' into 'master'
fix catz test

See merge request isc-projects/bind9!317
2018-05-24 19:12:51 -04:00
Evan HuntandCurtis Blackburn af73e16c9c files were left in place after catz run because of non-portable bracket use 2018-05-24 18:59:43 -04:00
Evan Hunt 4049ba866e Merge branch 'add-readme-features' into 'master'
add new feature list to README

See merge request isc-projects/bind9!316
2018-05-24 14:35:22 -04:00
Evan Hunt b4d8349237 add new feature list to README 2018-05-24 11:26:12 -07:00
2085 changed files with 61444 additions and 298381 deletions
+3 -29
View File
@@ -7,6 +7,8 @@ libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.rej
*.orig
*.o
*.lo
*.so
@@ -25,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
+243 -35
View File
@@ -2,13 +2,29 @@ variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C
DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: oerdnj/bind9
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
stages:
- precheck
- build
- test
- push
.centos-centos6-amd64: &centos_centos6_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
tags:
- linux
- docker
- amd64
.centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
tags:
- linux
- docker
- amd64
.debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
@@ -98,19 +114,29 @@ stages:
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- ./autogen.sh
# - ./autogen.sh
script:
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
- ./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:
- doc/
expire_in: '1 hour'
untracked: true
.install_test: &install_test_job
stage: test
before_script:
- mkdir $HOME/.local
script:
- make install
.system_test: &system_test_job
stage: test
before_script:
- rm -rf .ccache
- bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
@@ -123,42 +149,76 @@ stages:
stage: test
before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
- bash -x util/prepare-softhsm2.sh
script:
- make unit
after_script:
- 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:
- sh util/checklibs.sh > checklibs.out
- perl util/check-changes CHANGES
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
- rm util/newcopyrights
- perl -w util/update_copyrights < util/copyrights
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
artifacts:
paths:
- util/newcopyrights
- checklibs.out
expire_in: '1 week'
when: on_failure
#build:debian:jessie:amd64:
🐞:sid:amd64:precheck:
<<: *debian_sid_amd64_image
stage: precheck
script: util/check-cocci
docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: test
dependencies:
- sid:amd64:build
script:
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
artifacts:
paths:
- doc/arm/
expire_in: '1 month'
docs:push:
<<: *debian_sid_amd64_image
stage: push
dependencies: []
script:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only:
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
#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
#
@@ -174,60 +234,208 @@ precheck:debian:sid:amd64:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
build:clang:debian:sid:amd64:
variables:
CC: clang-6.0
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_sid_amd64_image
<<: *build_job
build:debian:sid:amd64:
centos6:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_sid_amd64_image
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
<<: *centos_centos6_amd64_image
<<: *build_job
build:clang:debian:sid:i386:
variables:
CC: clang-6.0
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_sid_i386_image
<<: *build_job
build:debian:sid:i386:
centos7:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
clang:stretch:amd64:build:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
jessie:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: --without-cmocka
<<: *debian_jessie_amd64_image
<<: *build_job
stretch:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
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
sid:i386:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_i386_image
<<: *build_job
unittest:debian:sid:amd64:
unit:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- centos6:amd64:build
unit:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- centos7:amd64:build
unit:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- jessie:amd64:build
unit:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- stretch:amd64:build
unit:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:sid:amd64
- sid:amd64:build
unittest:clang:debian:sid:amd64:
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:clang:debian:sid:amd64
- asan:sid:amd64:build
unittest:debian:sid:i386:
unit:clang:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- clang:stretch:amd64:build
unit:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- build:debian:sid:i386
- sid:i386:build
systemtest:debian:sid:amd64:
system:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- centos6:amd64:build
system:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- centos7:amd64:build
system:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- jessie:amd64:build
system:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- stretch:amd64:build
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:sid:amd64:
<<: *debian_sid_amd64_image
<<: *install_test_job
dependencies:
- sid:amd64:build
pkcs11:sid:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
<<: *debian_sid_amd64_image
<<: *build_job
pkcs11:unit:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64:build
pkcs11:system:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- 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
+4
View File
@@ -9,6 +9,10 @@ email to [security-officer@isc.org](security-officer@isc.org).
(Summarize the bug encountered concisely.)
### BIND version used
(Paste the output of `named -V`.)
### Steps to reproduce
(How one can reproduce the issue - this is very important.)
+44
View File
@@ -0,0 +1,44 @@
## Release Checklist
- [ ] (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:
- [ ] 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).
- [ ] Rebuild configure using autoconf on docs.isc.org.
- [ ] Update CHANGES.
- [ ] Update CHANGES.SE (subscription branch only).
- [ ] Update "version".
- [ ] Update "readme.md".
- 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]```)
- [ ] If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` (this allows development to continue on the release branch whilst release engineering continues).
- [ ] (SwEng) Run the "make release" Jenkins job to produce the tarballs and zips.
- [ ] (SwEng) Ask QA to sanity check the tarball and zips (passing to them the number of the Jenkins job).
- [ ] (QA) Sanity check the tarballs.
- [ ] (QA) Request the signature on the tarballs.
- [ ] (QA) Check signatures on tarballs.
- [ ] (QA) Tell Support to handle notification of 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).
+1434
View File
File diff suppressed because it is too large Load Diff
-5
View File
@@ -1,5 +0,0 @@
Content-Type: application/X-atf-atffile; version="1"
prop: test-suite = bind9
tp: lib
+529 -4
View File
@@ -1,3 +1,528 @@
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]
5049. [cleanup] QNAME minimization has been deeply refactored. [GL #16]
5048. [func] Add configure option to enable and enforce FIPS mode
in BIND 9. [GL #506]
5047. [bug] Messages logged for certain query processing failures
now include a more specific error description if it is
available. [GL #572]
5046. [bug] named could crash during shutdown if an RPZ
reload was in progress. [RT #46210]
5045. [func] Remove support for DNSSEC algorithms 3 (DSA)
and 6 (DSA-NSEC3-SHA1). [GL #22]
5044. [cleanup] If "dnssec-enable" is no, then "dnssec-validation"
now also defaults to no. [GL #388]
5043. [bug] Fix creating and validating EdDSA signatures. [GL #579]
5042. [test] Make the chained delegations in reclimit behave
like they would in a regular name server. [GL #578]
5041. [test] The chain test contains a incomplete delegation.
[GL #568]
5040. [func] Extended dnstap so that it can log UPDATE requests
and responses as separate message types. Thanks
to Greg Rabil. [GL #570]
5039. [bug] Named could fail to preserve owner name case of new
RRset. [GL #420]
5038. [bug] Chaosnet addresses were compared incorrectly.
[GL #562]
5037. [func] "allow-recursion-on" and "allow-query-cache-on"
each now default to the other if only one of them
is set, in order to be more consistent with the way
"allow-recursion" and "allow-query-cache" work.
Also we now ensure that both query-cache ACLs are
checked when determining cache access. [GL #319]
5036. [cleanup] Fixed a spacing/formatting error in some RPZ-related
error messages in the log. [GL !805]
5035. [test] Fixed errors that prevented the DNSRPS subtests
from running in the rpz and rpzrecurse system
tests. [GL #503]
5034. [bug] A race between threads could prevent zone maintenance
scheduled immediately after zone load from being
performed. [GL #542]
5033. [bug] When adding NTAs to multiple views using "rndc nta",
the text returned via rndc was incorrectly terminated
after the first line, making it look as if only one
NTA had been added. Also, it was not possible to
differentiate between views with the same name but
different classes; this has been corrected with the
addition of a "-class" option. [GL #105]
5032. [func] Add krb5-selfsub and ms-selfsub update policy rules.
[GL #511]
5031. [cleanup] Various defines in platform.h has been either dropped
if always or never triggered on supported platforms
or replaced with config.h equivalents if the defines
didn't have any impact on public headers. Workarounds
for LinuxThreads have been removed because NPTL is
available since Linux kernel 2.6.0. [GL #525]
5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash
on architectures with strict alignment. [GL #521]
--- 9.13.3 released ---
5029. [func] Workarounds for servers that misbehave when queried
with EDNS have been removed, because these broken
servers and the workarounds for their noncompliance
cause unnecessary delays, increase code complexity,
and prevent deployment of new DNS features. See
https://dnsflagday.net for further details. [GL #150]
5028. [bug] Spread the initial RRSIG expiration times over the
entire working sig-validity-interval when signing a
zone in named to even out re-signing and transfer
loads. [GL #418]
5027. [func] Set SO_SNDBUF size on sockets. [GL #74]
5026. [bug] rndc reconfig should not touch already loaded zones.
[GL #276]
5025. [cleanup] Remove isc_keyboard family of functions. [GL #178]
5024. [func] Replace custom assembly for atomic operations with
atomic support from the compiler. The code will now use
C11 stdatomic, or __atomic, or __sync builtins with GCC
or Clang compilers, and Interlocked functions with MSVC.
[GL #10]
5023. [cleanup] Remove wrappers that try to fix broken or incomplete
implementations of IPv6, pthreads and other core
functionality required and used by BIND. [GL #192]
5022. [doc] Update ms-self, ms-subdomain, krb5-self, and
krb5-subdomain documentation. [GL !708]
5021. [bug] dig returned a non-zero exit code when it received a
reply over TCP after a retry. [GL #487]
5020. [func] RNG uses thread-local storage instead of locks, if
supported by platform. [GL #496]
5019. [cleanup] A message is now logged when ixfr-from-differences is
set at zone level for an inline-signed zone. [GL #470]
5018. [bug] Fix incorrect sizeof arguments in lib/isc/pk11.c.
[GL !588]
5017. [bug] lib/isc/pk11.c failed to unlink the session before
releasing the lock which is unsafe. [GL !589]
5016. [bug] Named could assert with overlapping filter-aaaa and
dns64 acls. [GL #445]
5015. [bug] Reloading all zones caused zone maintenance to cease
for inline-signed zones. [GL #435]
5014. [bug] Signatures loaded from the journal for the signed
version of an inline-signed zone were not scheduled for
refresh. [GL #482]
5013. [bug] A referral response with a non-empty ANSWER section was
inadvertently being treated as an error. [GL #390]
5012. [bug] Fix lock order reversal in pk11_initialize. [GL !590]
5011. [func] Remove support for unthreaded named. [GL #478]
5010. [func] New "validate-except" option specifies a list of
domains beneath which DNSSEC validation should not
be performed. [GL #237]
5009. [bug] Upon an OpenSSL failure, the first error in the OpenSSL
error queue was not logged. [GL #476]
5008. [bug] "rndc signing -nsec3param ..." requests were silently
ignored for zones which were not yet loaded or
transferred. [GL #468]
5007. [cleanup] Replace custom ISC boolean and integer data types
with C99 stdint.h and stdbool.h types. [GL #9]
5006. [cleanup] Code preparing a delegation response was extracted from
query_delegation() and query_zone_delegation() into a
separate function in order to decrease code
duplication. [GL #431]
5005. [bug] dnssec-verify, and dnssec-signzone at the verification
step, failed on some validly signed zones. [GL #442]
5004. [bug] 'rndc reconfig' could cause inline zones to stop
re-signing. [GL #439]
5003. [bug] dns_acl_isinsecure did not handle geoip elements.
[GL #406]
5002. [bug] mdig: Handle malformed +ednsopt option, support 100
+ednsopt options per query rather than 100 total and
address memory leaks if +ednsopt was specified.
[GL #410]
5001. [bug] Fix refcount errors on error paths. [GL !563]
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
[GL #261]
4998. [test] Make resolver and cacheclean tests more civilized.
4997. [security] named could crash during recursive processing
of DNAME records when "deny-answer-aliases" was
in use. (CVE-2018-5740) [GL #387]
4996. [bug] dig: Handle malformed +ednsopt option. [GL #403]
4995. [test] Add tests for "tcp-self" update policy. [GL !282]
4994. [bug] Trust anchor telemetry queries were not being sent
upstream for locally served zones. [GL #392]
4993. [cleanup] Remove support for silently ignoring 'no-change' deltas
from BIND 8 when processing an IXFR stream. 'no-change'
deltas will now trigger a fallback to AXFR as the
recovery mechanism. [GL #369]
4992. [bug] The wrong address was being logged for trust anchor
telemetry queries. [GL #379]
4991. [bug] "rndc reconfig" was incorrectly handling zones whose
"mirror" setting was changed. [GL #381]
4990. [bug] Prevent a possible NULL reference in pkcs11-keygen.
[GL #401]
4989. [cleanup] IDN support in dig has been reworked. IDNA2003
fallbacks were removed in the process. [GL #384]
4988. [bug] Don't synthesize NXDOMAIN from NSEC for records under
a DNAME.
--- 9.13.2 released ---
4987. [cleanup] dns_rdataslab_tordataset() and its related
dns_rdatasetmethods_t callbacks were removed as they
were not being used by anything in BIND. [GL #371]
4986. [func] When built on Linux, BIND now requires the libcap
library to set process privileges, unless capability
support is explicitly overridden with "configure
--disable-linux-caps". [GL #321]
4985. [func] Add a new slave zone option, "mirror", to enable
serving a non-authoritative copy of a zone that
is subject to DNSSEC validation before being
used. For now, this option is only meant to
facilitate deployment of an RFC 7706-style local
copy of the root zone. [GL #33]
4984. [bug] Improve handling of very large incremental
zone transfers to prevent journal corruption. [GL #339]
4983. [func] Add the ability to not return a DNS COOKIE option
when one is present in the request (answer-cookie no;).
[GL #173]
4982. [cleanup] Return FORMERR if the question section is empty
and no COOKIE option is present; this restores
older behavior except in the newly specified
COOKIE case. [GL #260]
4981. [bug] Fix race in cmsg buffer usage in socket code.
[GL #180]
4980. [bug] Named-checkconf failed to detect bad in-view targets.
[GL #288]
4979. [placeholder]
4978. [test] Fix error handling and resolver configuration in the
"rpz" system test. [GL #312]
4977. [func] When starting up, log the same details that
would be reported by 'named -V'. [GL #247]
4976. [bug] Log the label with invalid prefix length correctly
when loading RPZ zones. [GL #254]
4975. [bug] The server cookie computation for sha1 and sha256 did
not match the method described in RFC 7873. [GL #356]
4974. [bug] Restore default rrset-order to random. [GL #336]
4973. [func] verifyzone() and the functions it uses were moved to
libdns and refactored to prevent exit() from being
called upon failure. A side effect of that is that
dnssec-signzone and dnssec-verify now check for memory
leaks upon shutdown. [GL #266]
4972. [func] Declare the 'rdata' argument for dns_rdata_tostruct()
to be const. [GL #341]
4971. [bug] dnssec-signzone and dnssec-verify did not treat records
below a DNAME as out-of-zone data. [GL #298]
4970. [func] Add QNAME minimization option to resolver. [GL #16]
4969. [cleanup] Refactor zone logging functions. [GL #269]
--- 9.13.1 released ---
4968. [bug] If glue records are signed, attempt to validate them.
[GL #209]
4967. [cleanup] Add "answer-cookie" to the parser, marked obsolete.
4966. [placeholder]
4965. [func] Add support for marking options as deprecated.
[GL #322]
4964. [bug] Reduce the probabilty of double signature when deleting
a DNSKEY by checking if the node is otherwise signed
by the algorithm of the key to be deleted. [GL #240]
4963. [test] ifconfig.sh now uses "ip" instead of "ifconfig",
if available, to configure the test interfaces on
linux. [GL #302]
4962. [cleanup] Move 'named -T' processing to its own function.
[GL #316]
4961. [protocol] Remove support for ECC-GOST (GOST R 34.11-94).
[GL #295]
4960. [security] When recursion is enabled, but the "allow-recursion"
and "allow-query-cache" ACLs are not specified,
they should be limited to local networks,
but were inadvertently set to match the default
"allow-query", thus allowing remote queries.
(CVE-2018-5738) [GL #309]
4959. [func] NSID logging (enabled by the "request-nsid" option)
now has its own "nsid" category, instead of using the
"resolver" category. [GL !332]
4958. [bug] Remove redundant space from NSEC3 record. [GL #281]
4957. [func] The default setting for "dnssec-validation" is now
"auto", which activates DNSSEC validation using the
IANA root key. (The default can be changed back to
"yes", which activates DNSSEC validation only when keys
are explicitly configured in named.conf, by building
BIND with "configure --disable-auto-validation".)
[GL #30]
4956. [func] Change isc_random() to be just PRNG using xoshiro128**,
and add isc_nonce_buf() that uses CSPRNG. [GL #289]
4955. [cleanup] Silence cppcheck warnings in lib/dns/master.c.
[GL #286]
4954. [func] Messages about serving of stale answers are now
directed to the "serve-stale" logging category.
Also clarified serve-stale documentation. [GL !323]
4953. [bug] Removed the option to build the red black tree
database without a hash table; the non-hashing
version was buggy and is not needed. [GL #184]
4952. [func] Authoritative server support in named for the
EDNS CLIENT-SUBNET option (which was experimental
and not practical to deploy) has been removed.
The ECS option is still supported in dig and mdig
via the +subnet option, and can be parsed and logged
when received by named, but it is no longer used
for ACL processing. The "geoip-use-ecs" option
is now obsolete; a warning will be logged if it is
used in named.conf. "ecs" tags in an ACL definition
are also obsolete and will cause the configuration
to fail to load. [GL #32]
4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as
per RFC 8375. [GL #273]
@@ -664,8 +1189,8 @@
4760. [func] Add glue cache statistics counters. [RT #46028]
4759. [func] Add logging channel "trust-anchor-telementry" to
record trust-anchor-telementry in incoming requests.
4759. [func] Add logging channel "trust-anchor-telemetry" to
record trust-anchor-telemetry in incoming requests.
Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
are logged. [RT #46124]
@@ -734,10 +1259,10 @@
tests when running on terminals that support them.
[RT #45977]
4744. [bug] Suppress trust-anchor-telementry queries if
4744. [bug] Suppress trust-anchor-telemetry queries if
validation is disabled. [RT #46131]
4743. [func] Exclude trust-anchor-telementry queries from
4743. [func] Exclude trust-anchor-telemetry queries from
synth-from-dnssec processing. [RT #46123]
4742. [func] Synthesis of responses from DNSSEC-verified records.
+9 -2
View File
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@
SUBDIRS = make unit lib bin doc
SUBDIRS = make lib fuzz bin doc
TARGETS =
PREREQS = bind.keys.h
@@ -22,7 +22,8 @@ MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
@@ -89,6 +90,7 @@ force-test: test-force
test-force:
status=0; \
(cd fuzz && ${MAKE} check) || status=1; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
@@ -114,6 +116,11 @@ CONTRIBUTING: CONTRIBUTING.md
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit::
sh ${top_builddir}/unit/unittest.sh
+89
View File
@@ -0,0 +1,89 @@
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
cryptography library. Atomic operations support from the compiler is
needed, either in the form of builtin operations, C11 atomics or the
Interlocked family of functions on Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
* Debian 8, 9
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run, but
on which it is not routinely tested. ISC makes every effort to fix bugs on
these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* NetBSD
* Older or less popular Linux distributions still supported by their
vendors, such as:
+ Ubuntu 14.04, 18.10+
+ Gentoo
+ ArchLinux
+ Alpine Linux
* OpenWRT/LEDE 17.0
* Other CPU architectures (mips, mipsel, sparc, ...)
Unsupported platforms
These are platforms on which BIND is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* 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
+100
View File
@@ -0,0 +1,100 @@
<!--
- 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.
-->
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics or the Interlocked family of functions on
Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
### Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
* Debian 8, 9
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run,
but on which it is not routinely tested. ISC makes every effort to fix bugs
on these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* NetBSD
* Older or less popular Linux distributions still supported by their vendors, such as:
* Ubuntu 14.04, 18.10+
* Gentoo
* ArchLinux
* Alpine Linux
* OpenWRT/LEDE 17.0
* Other CPU architectures (mips, mipsel, sparc, ...)
## Unsupported platforms
These are platforms on which BIND is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* 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
```
+63 -26
View File
@@ -31,9 +31,9 @@ administrative tools, including the dig and delv DNS lookup tools,
nsupdate for dynamic DNS zone updates, rndc for remote name server
administration, and more.
BIND 9 is a complete re-write of the BIND architecture that was used in
versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
(c)(3) public benefit corporation dedicated to providing software and
BIND 9 began as a complete re-write of the BIND architecture that was used
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
501(c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open
source software licenced under the terms of the Mozilla Public License,
@@ -48,6 +48,8 @@ the file CHANGES. See below for details on the CHANGES file format.
For up-to-date release notes and errata, see http://www.isc.org/software/
bind9/releasenotes
For information about supported platforms, see PLATFORMS.
Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
@@ -99,19 +101,52 @@ format-patch.
BIND 9.13 features
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
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:
* TBD
* 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.
* Secondary zones can now be configured as "mirror" zones; their
contents are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is now longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
Building BIND
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed
on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
HP-UX, AIX, SCO OpenServer, and OpenWRT.
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have
been observed on many versions of Linux and UNIX, including RedHat,
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
X, Solaris, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the
libcap library to set process privileges, though this requirement can be
overridden by disabling capability support at compile time. See
Compile-time options below for details on other libraries that may be
required to support optional features.
BIND is also available for Windows 2008 and higher. See win32utils/
readme1st.txt for details on building for Windows systems.
@@ -182,11 +217,10 @@ smaller systems.
For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location,
specify the prefix using "--with-openssl=<PREFIX>" on the configure
command line. To use a PKCS#11 hardware service module for cryptographic
specify the prefix using --with-openssl=<PREFIX> on the configure command
line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using
"--with-pkcs11=<PREFIX>", and configure BIND with
"--enable-native-pkcs11".
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2 http://xmlsoft.org or json-c https://
@@ -199,17 +233,22 @@ specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using "with-lmdb=/prefix".
a nonstandard location, specify the prefix using with-lmdb=/prefix.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
"--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using "--with-geoip=/prefix".
--with-geoip. If the library is installed in a nonstandard location,
specify the prefix using --with-geoip=/prefix.
For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https://
developers.google.com/protocol-buffers, and BIND must be configured with
"--enable-dnstap".
--enable-dnstap.
On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel module. Process capability support can also be disabled by
configuring with --disable-linux-caps.
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
@@ -226,10 +265,6 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use --with-kame
[=PATH] to specify its location.
make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure.
@@ -255,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
+63 -23
View File
@@ -41,8 +41,8 @@ administrative tools, including the `dig` and `delv` DNS lookup tools,
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
administration, and more.
BIND 9 is a complete re-write of the BIND architecture that was used in
versions 4 and 8. Internet Systems Consortium
BIND 9 began as a complete re-write of the BIND architecture that was
used in versions 4 and 8. Internet Systems Consortium
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its
@@ -59,6 +59,8 @@ CHANGES file format.
For up-to-date release notes and errata, see
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
### <a name="help"/> Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
@@ -116,19 +118,55 @@ including your patch as an attachment, preferably generated by
### <a name="features"/> BIND 9.13 features
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
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:
* TBD
* 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.
* Secondary zones can now be configured as "mirror" zones; their contents
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is now
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
### <a name="build"/> Building BIND
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed on
many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
SCO OpenServer, and OpenWRT.
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have been
observed on many versions of Linux and UNIX, including RedHat, Fedora,
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
Solaris, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires
the `libcap` library to set process privileges, though this requirement
can be overridden by disabling capability support at compile time.
See [Compile-time options](#opts) below for details on other libraries
that may be required to support optional features.
BIND is also available for Windows 2008 and higher. See
`win32utils/readme1st.txt` for details on building for Windows
@@ -194,10 +232,10 @@ performance on smaller systems.
For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix
using "--with-openssl=&lt;PREFIX&gt;" on the configure command line. To use a
using `--with-openssl=<PREFIX>` on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using "--with-pkcs11=&lt;PREFIX&gt;", and
configure BIND with "--enable-native-pkcs11".
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with `--enable-native-pkcs11`.
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2
@@ -212,18 +250,23 @@ specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using "with-lmdb=/prefix".
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
"--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using "--with-geoip=/prefix".
`--with-geoip`. If the library is installed in a nonstandard location,
specify the prefix using `--with-geoip=/prefix`.
For DNSTAP packet logging, you must have installed libfstrm
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and libprotobuf-c
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with "--enable-dnstap".
and BIND must be configured with `--enable-dnstap`.
On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` module. Process capability support can
also be disabled by configuring with `--disable-linux-caps`.
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
@@ -240,10 +283,6 @@ specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use
`--with-kame[=PATH]` to specify its location.
`make install` will install `named` and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
`--prefix` option when running `configure`.
@@ -269,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
-137
View File
@@ -1,137 +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 */
/***
*** This file is not to be included by any public header files, because
*** it does not get installed.
***/
@TOP@
/** define on DEC OSF to enable 4.4BSD style sa_len support */
#undef _SOCKADDR_LEN
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
/** define if your system has sigwait() */
#undef HAVE_SIGWAIT
/** define if sigwait() is the UnixWare flavor */
#undef HAVE_UNIXWARE_SIGWAIT
/** define on Solaris to get sigwait() to work using pthreads semantics */
#undef _POSIX_PTHREAD_SEMANTICS
/** define if LinuxThreads is in use */
#undef HAVE_LINUXTHREADS
/** define if sysconf() is available */
#undef HAVE_SYSCONF
/** define if sysctlbyname() is available */
#undef HAVE_SYSCTLBYNAME
/** define if catgets() is available */
#undef HAVE_CATGETS
/** define if getifaddrs() exists */
#undef HAVE_GETIFADDRS
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if tzset() is available */
#undef HAVE_TZSET
/** define if struct addrinfo exists */
#undef HAVE_ADDRINFO
/** define if getaddrinfo() exists */
#undef HAVE_GETADDRINFO
/** define if gai_strerror() exists */
#undef HAVE_GAISTRERROR
/**
* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
#undef CALL_PTHREAD_SETCONCURRENCY
/** define if IPv6 is not disabled */
#undef WANT_IPV6
/** define if flockfile() is available */
#undef HAVE_FLOCKFILE
/** define if getc_unlocked() is available */
#undef HAVE_GETCUNLOCKED
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
struct __sFILE;
extern __inline int __sputaux(int _c, struct __sFILE *_p);
#endif
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
#undef SHUTUP_SIGWAIT
#ifdef SHUTUP_SIGWAIT
int sigwait(const unsigned int *set, int *sig);
#endif
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
#undef SHUTUP_STDARG_CAST
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
#include <stdarg.h> /** Grr. Must be included *every time*. */
/**
* The silly continuation line is to keep configure from
* commenting out the #undef.
*/
#undef \
va_start
#define va_start(ap, last) \
do { \
union { const void *konst; long *var; } _u; \
_u.konst = &(last); \
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
} while (0)
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
/** define if the system has a random number generating device */
#undef PATH_RANDOMDEV
/** define if pthread_attr_getstacksize() is available */
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
/** define if pthread_attr_setstacksize() is available */
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
/** define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
/* Define if you have getpassphrase in the C library. */
#undef HAVE_GETPASSPHRASE
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
/* Define to 1 if you have the uname library function. */
#undef HAVE_UNAME
Vendored
+296 -15
View File
@@ -1,17 +1,298 @@
sinclude(libtool.m4/libtool.m4)dnl
sinclude(libtool.m4/ltoptions.m4)dnl
sinclude(libtool.m4/ltsugar.m4)dnl
sinclude(libtool.m4/ltversion.m4)dnl
sinclude(libtool.m4/lt~obsolete.m4)dnl
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
m4_divert_text(HELP_CANON, [[
NOTE: If PREFIX is not set, then the default values for --sysconfdir
and --localstatedir are /etc and /var, respectively.]])
m4_divert_text(HELP_END, [[
Professional support for BIND is provided by Internet Systems Consortium,
Inc. Information about paid support and training options is available at
https://www.isc.org/support.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
Help can also often be found on the BIND Users mailing list
(https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
channel of the Freenode IRC service.]])
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
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])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
+1 -1
View File
@@ -10,4 +10,4 @@
# information regarding copyright ownership.
# Run this script after modifying configure.in to generate configure
autoreconf -i
autoreconf -f -i
+5 -5
View File
@@ -16,15 +16,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} @DST_OPENSSL_INC@
${ISC_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
@@ -88,12 +88,12 @@ install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
uninstall::
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
+45 -64
View File
@@ -14,7 +14,9 @@
#include <config.h>
#include <stdbool.h>
#include <stdio.h>
#include <inttypes.h>
#ifdef _WIN32
#include <Winsock2.h>
@@ -60,14 +62,6 @@
#define CHECK_LOCAL 1
#endif
#ifdef HAVE_ADDRINFO
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO
#endif
#endif
#endif
#define CHECK(r) \
do { \
result = (r); \
@@ -88,15 +82,15 @@ static const char *dbtype[] = { "rbt" };
int debug = 0;
const char *journal = NULL;
isc_boolean_t nomerge = ISC_TRUE;
bool nomerge = true;
#if CHECK_LOCAL
isc_boolean_t docheckmx = ISC_TRUE;
isc_boolean_t dochecksrv = ISC_TRUE;
isc_boolean_t docheckns = ISC_TRUE;
bool docheckmx = true;
bool dochecksrv = true;
bool docheckns = true;
#else
isc_boolean_t docheckmx = ISC_FALSE;
isc_boolean_t dochecksrv = ISC_FALSE;
isc_boolean_t docheckns = ISC_FALSE;
bool docheckmx = false;
bool dochecksrv = false;
bool docheckns = false;
#endif
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
@@ -142,7 +136,7 @@ add(char *key, int value) {
if (symtab == NULL) {
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
ISC_FALSE, &symtab);
false, &symtab);
if (result != ISC_R_SUCCESS)
return;
}
@@ -158,32 +152,31 @@ add(char *key, int value) {
isc_mem_free(sym_mctx, key);
}
static isc_boolean_t
static bool
logged(char *key, int value) {
isc_result_t result;
if (symtab == NULL)
return (ISC_FALSE);
return (false);
result = isc_symtab_lookup(symtab, key, value, NULL);
if (result == ISC_R_SUCCESS)
return (ISC_TRUE);
return (ISC_FALSE);
return (true);
return (false);
}
static isc_boolean_t
static bool
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
dns_rdataset_t *a, dns_rdataset_t *aaaa)
{
#ifdef USE_GETADDRINFO
dns_rdataset_t *rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT;
struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE];
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
isc_boolean_t answer = ISC_TRUE;
isc_boolean_t match;
bool answer = true;
bool match;
const char *type;
void *ptr = NULL;
int result;
@@ -232,7 +225,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
ownerbuf, namebuf,
cur->ai_canonname);
/* XXX950 make fatal for 9.5.0 */
/* answer = ISC_FALSE; */
/* answer = false; */
add(namebuf, ERR_IS_CNAME);
}
break;
@@ -248,7 +241,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
add(namebuf, ERR_NO_ADDRESSES);
}
/* XXX950 make fatal for 9.5.0 */
return (ISC_TRUE);
return (true);
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -257,7 +250,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (ISC_TRUE);
return (true);
}
/*
@@ -268,13 +261,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(a);
while (result == ISC_R_SUCCESS) {
dns_rdataset_current(a, &rdata);
match = ISC_FALSE;
match = false;
for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET)
continue;
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = ISC_TRUE;
match = true;
break;
}
}
@@ -286,7 +279,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_A);
/* XXX950 make fatal for 9.5.0 */
/* answer = ISC_FALSE; */
/* answer = false; */
}
dns_rdata_reset(&rdata);
result = dns_rdataset_next(a);
@@ -298,13 +291,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(aaaa);
while (result == ISC_R_SUCCESS) {
dns_rdataset_current(aaaa, &rdata);
match = ISC_FALSE;
match = false;
for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET6)
continue;
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = ISC_TRUE;
match = true;
break;
}
}
@@ -316,7 +309,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_AAAA);
/* XXX950 make fatal for 9.5.0. */
/* answer = ISC_FALSE; */
/* answer = false; */
}
dns_rdata_reset(&rdata);
result = dns_rdataset_next(aaaa);
@@ -327,7 +320,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
* Check that all addresses appear in the glue.
*/
if (!logged(namebuf, ERR_MISSING_GLUE)) {
isc_boolean_t missing_glue = ISC_FALSE;
bool missing_glue = false;
for (cur = ai; cur != NULL; cur = cur->ai_next) {
switch (cur->ai_family) {
case AF_INET:
@@ -343,7 +336,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
default:
continue;
}
match = ISC_FALSE;
match = false;
if (dns_rdataset_isassociated(rdataset))
result = dns_rdataset_first(rdataset);
else
@@ -351,7 +344,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
while (result == ISC_R_SUCCESS && !match) {
dns_rdataset_current(rdataset, &rdata);
if (memcmp(ptr, rdata.data, rdata.length) == 0)
match = ISC_TRUE;
match = true;
dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset);
}
@@ -362,8 +355,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
inet_ntop(cur->ai_family, ptr,
addrbuf, sizeof(addrbuf)));
/* XXX950 make fatal for 9.5.0. */
/* answer = ISC_FALSE; */
missing_glue = ISC_TRUE;
/* answer = false; */
missing_glue = true;
}
}
if (missing_glue)
@@ -371,20 +364,16 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
}
freeaddrinfo(ai);
return (answer);
#else
return (ISC_TRUE);
#endif
}
static isc_boolean_t
static bool
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE];
int result;
int level = ISC_LOG_ERROR;
isc_boolean_t answer = ISC_TRUE;
bool answer = true;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
@@ -428,7 +417,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_MXCNAME);
}
if (level == ISC_LOG_ERROR)
answer = ISC_FALSE;
answer = false;
}
}
freeaddrinfo(ai);
@@ -446,7 +435,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES);
}
/* XXX950 make fatal for 9.5.0. */
return (ISC_TRUE);
return (true);
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -455,22 +444,18 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (ISC_TRUE);
return (true);
}
#else
return (ISC_TRUE);
#endif
}
static isc_boolean_t
static bool
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE];
int result;
int level = ISC_LOG_ERROR;
isc_boolean_t answer = ISC_TRUE;
bool answer = true;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
@@ -513,7 +498,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_SRVCNAME);
}
if (level == ISC_LOG_ERROR)
answer = ISC_FALSE;
answer = false;
}
}
freeaddrinfo(ai);
@@ -531,7 +516,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES);
}
/* XXX950 make fatal for 9.5.0. */
return (ISC_TRUE);
return (true);
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -540,11 +525,8 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (ISC_TRUE);
return (true);
}
#else
return (ISC_TRUE);
#endif
}
isc_result_t
@@ -650,7 +632,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
if (dbiter != NULL)
dns_dbiterator_destroy(&dbiter);
if (version != NULL)
dns_db_closeversion(db, &version, ISC_FALSE);
dns_db_closeversion(db, &version, false);
if (db != NULL)
dns_db_detach(&db);
@@ -697,7 +679,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
CHECK(dns_rdataclass_fromtext(&rdclass, &region));
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, zone_options, ISC_TRUE);
dns_zone_setoption(zone, zone_options, true);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
dns_zone_setmaxttl(zone, maxttl);
@@ -709,7 +691,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
if (dochecksrv)
dns_zone_setchecksrv(zone, checksrv);
CHECK(dns_zone_load(zone));
CHECK(dns_zone_load(zone, false));
/*
* When loading map files we can't catch oversize TTLs during
@@ -734,7 +716,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style,
const isc_uint32_t rawversion)
const uint32_t rawversion)
{
isc_result_t result;
FILE *output = stdout;
@@ -789,4 +771,3 @@ DestroySockets(void) {
WSACleanup();
}
#endif
+8 -5
View File
@@ -15,6 +15,9 @@
/*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <isc/lang.h>
#include <isc/stdio.h>
#include <isc/types.h>
@@ -36,7 +39,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style,
const isc_uint32_t rawversion);
const uint32_t rawversion);
#ifdef _WIN32
void InitSockets(void);
@@ -45,10 +48,10 @@ void DestroySockets(void);
extern int debug;
extern const char *journal;
extern isc_boolean_t nomerge;
extern isc_boolean_t docheckmx;
extern isc_boolean_t docheckns;
extern isc_boolean_t dochecksrv;
extern bool nomerge;
extern bool docheckmx;
extern bool docheckns;
extern bool dochecksrv;
extern dns_zoneopt_t zone_options;
ISC_LANG_ENDDECLS
+47 -32
View File
@@ -15,6 +15,7 @@
#include <config.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -91,18 +92,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
return (ISC_R_SUCCESS);
}
static isc_boolean_t
static bool
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL)
return (ISC_FALSE);
return (false);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
return (ISC_TRUE);
return (true);
}
}
static isc_boolean_t
static bool
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
const cfg_listelt_t *element;
const cfg_obj_t *checknames;
@@ -113,14 +114,14 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
for (i = 0;; i++) {
if (maps[i] == NULL)
return (ISC_FALSE);
return (false);
checknames = NULL;
result = cfg_map_get(maps[i], "check-names", &checknames);
if (result != ISC_R_SUCCESS)
continue;
if (checknames != NULL && !cfg_obj_islist(checknames)) {
*obj = checknames;
return (ISC_TRUE);
return (true);
}
for (element = cfg_list_first(checknames);
element != NULL;
@@ -135,7 +136,7 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
continue;
}
*obj = cfg_tuple_get(value, "mode");
return (ISC_TRUE);
return (true);
}
}
}
@@ -168,7 +169,7 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
static isc_result_t
configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, isc_mem_t *mctx, isc_boolean_t list)
const cfg_obj_t *config, isc_mem_t *mctx, bool list)
{
int i = 0;
isc_result_t result;
@@ -281,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;
@@ -299,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;
@@ -326,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;
@@ -344,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;
@@ -365,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;
}
@@ -382,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;
@@ -393,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;
@@ -420,7 +435,7 @@ configure_zone(const char *vclass, const char *view,
/*% configure a view */
static isc_result_t
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
const cfg_obj_t *vconfig, isc_mem_t *mctx, isc_boolean_t list)
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list)
{
const cfg_listelt_t *element;
const cfg_obj_t *voptions;
@@ -469,7 +484,7 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
/*% load zones from the configuration */
static isc_result_t
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
isc_boolean_t list_zones)
bool list_zones)
{
const cfg_listelt_t *element;
const cfg_obj_t *views;
@@ -537,12 +552,12 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL;
isc_result_t result;
int exit_status = 0;
isc_boolean_t load_zones = ISC_FALSE;
isc_boolean_t list_zones = ISC_FALSE;
isc_boolean_t print = ISC_FALSE;
bool load_zones = false;
bool list_zones = false;
bool print = false;
unsigned int flags = 0;
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
/*
* Process memory debugging argument first.
@@ -566,7 +581,7 @@ main(int argc, char **argv) {
break;
}
}
isc_commandline_reset = ISC_TRUE;
isc_commandline_reset = true;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -577,11 +592,11 @@ main(int argc, char **argv) {
break;
case 'j':
nomerge = ISC_FALSE;
nomerge = false;
break;
case 'l':
list_zones = ISC_TRUE;
list_zones = true;
break;
case 'm':
@@ -597,7 +612,7 @@ main(int argc, char **argv) {
break;
case 'p':
print = ISC_TRUE;
print = true;
break;
case 'v':
@@ -609,10 +624,10 @@ main(int argc, char **argv) {
break;
case 'z':
load_zones = ISC_TRUE;
docheckmx = ISC_FALSE;
docheckns = ISC_FALSE;
dochecksrv = ISC_FALSE;
load_zones = true;
docheckmx = false;
docheckns = false;
dochecksrv = false;
break;
case '?':
+30 -26
View File
@@ -14,7 +14,9 @@
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>
#include <isc/app.h>
#include <isc/commandline.h>
@@ -106,10 +108,10 @@ main(int argc, char **argv) {
dns_masterformat_t inputformat = dns_masterformat_text;
dns_masterformat_t outputformat = dns_masterformat_text;
dns_masterrawheader_t header;
isc_uint32_t rawversion = 1, serialnum = 0;
uint32_t rawversion = 1, serialnum = 0;
dns_ttl_t maxttl = 0;
isc_boolean_t snset = ISC_FALSE;
isc_boolean_t logdump = ISC_FALSE;
bool snset = false;
bool logdump = false;
FILE *errout = stdout;
char *endp;
@@ -137,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) {
@@ -159,7 +163,7 @@ main(int argc, char **argv) {
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
while ((c = isc_commandline_parse(argc, argv,
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
@@ -177,33 +181,33 @@ main(int argc, char **argv) {
if (ARGCMP("full")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
DNS_ZONEOPT_CHECKSIBLING;
docheckmx = ISC_TRUE;
docheckns = ISC_TRUE;
dochecksrv = ISC_TRUE;
docheckmx = true;
docheckns = true;
dochecksrv = true;
} else if (ARGCMP("full-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = ISC_TRUE;
docheckns = ISC_TRUE;
dochecksrv = ISC_TRUE;
docheckmx = true;
docheckns = true;
dochecksrv = true;
} else if (ARGCMP("local")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
docheckmx = ISC_FALSE;
docheckns = ISC_FALSE;
dochecksrv = ISC_FALSE;
docheckmx = false;
docheckns = false;
dochecksrv = false;
} else if (ARGCMP("local-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = ISC_FALSE;
docheckns = ISC_FALSE;
dochecksrv = ISC_FALSE;
docheckmx = false;
docheckns = false;
dochecksrv = false;
} else if (ARGCMP("none")) {
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = ISC_FALSE;
docheckns = ISC_FALSE;
dochecksrv = ISC_FALSE;
docheckmx = false;
docheckns = false;
dochecksrv = false;
} else {
fprintf(stderr, "invalid argument to -i: %s\n",
isc_commandline_argument);
@@ -220,12 +224,12 @@ main(int argc, char **argv) {
break;
case 'j':
nomerge = ISC_FALSE;
nomerge = false;
break;
case 'J':
journal = isc_commandline_argument;
nomerge = ISC_FALSE;
nomerge = false;
break;
case 'k':
@@ -246,7 +250,7 @@ main(int argc, char **argv) {
break;
case 'L':
snset = ISC_TRUE;
snset = true;
endp = NULL;
serialnum = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0') {
@@ -505,7 +509,7 @@ main(int argc, char **argv) {
strcmp(output_filename, "/dev/fd/1") == 0 ||
strcmp(output_filename, "/dev/stdout") == 0)) {
errout = stderr;
logdump = ISC_FALSE;
logdump = false;
}
if (isc_commandline_index + 2 != argc)
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
+2 -2
View File
@@ -58,7 +58,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -80,7 +80,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -87,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -105,7 +105,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
+2 -2
View File
@@ -27,8 +27,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
+15 -13
View File
@@ -19,15 +19,15 @@
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/assertions.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
@@ -36,7 +36,7 @@
#include <isc/time.h>
#include <isc/util.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -56,7 +56,7 @@
static char program[256];
const char *progname;
static enum { progmode_keygen, progmode_confgen} progmode;
isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
bool verbose = false; /* needed by util.c but not used here */
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
@@ -87,8 +87,8 @@ Usage:\n\
int
main(int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS;
isc_boolean_t show_final_mem = ISC_FALSE;
isc_boolean_t quiet = ISC_FALSE;
bool show_final_mem = false;
bool quiet = false;
isc_buffer_t key_txtbuffer;
char key_txtsecret[256];
isc_mem_t *mctx = NULL;
@@ -102,7 +102,7 @@ main(int argc, char **argv) {
int len = 0;
int ch;
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
@@ -124,13 +124,15 @@ main(int argc, char **argv) {
if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen;
quiet = ISC_TRUE;
} else if (PROGCMP("ddns-confgen"))
quiet = true;
} else if (PROGCMP("ddns-confgen")) {
progmode = progmode_confgen;
else
} else {
INSIST(0);
ISC_UNREACHABLE();
}
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv,
"a:hk:Mmr:qs:y:z:")) != -1) {
@@ -155,11 +157,11 @@ main(int argc, char **argv) {
isc_mem_debugging = ISC_MEM_DEBUGTRACE;
break;
case 'm':
show_final_mem = ISC_TRUE;
show_final_mem = true;
break;
case 'q':
if (progmode == progmode_confgen)
quiet = ISC_TRUE;
quiet = true;
else
usage(1);
break;
-8
View File
@@ -20,7 +20,6 @@
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/result.h>
@@ -43,10 +42,8 @@
const char *
alg_totext(dns_secalg_t alg) {
switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5:
return "hmac-md5";
#endif
case DST_ALG_HMACSHA1:
return "hmac-sha1";
case DST_ALG_HMACSHA224:
@@ -71,10 +68,8 @@ alg_fromtext(const char *name) {
if (strncasecmp(p, "hmac-", 5) == 0)
p = &name[5];
#ifndef PK11_MD5_DISABLE
if (strcasecmp(p, "md5") == 0)
return DST_ALG_HMACMD5;
#endif
if (strcasecmp(p, "sha1") == 0)
return DST_ALG_HMACSHA1;
if (strcasecmp(p, "sha224") == 0)
@@ -124,9 +119,7 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
dst_key_t *key = NULL;
switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5:
#endif
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
@@ -198,4 +191,3 @@ write_key_file(const char *keyfile, const char *user,
fatal("fclose(%s) failed\n", keyfile);
fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
}
+9 -9
View File
@@ -22,15 +22,15 @@
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/assertions.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
@@ -57,7 +57,7 @@
static char program[256];
const char *progname;
isc_boolean_t verbose = ISC_FALSE;
bool verbose = false;
const char *keyfile, *keydef;
@@ -87,7 +87,7 @@ Usage:\n\
int
main(int argc, char **argv) {
isc_boolean_t show_final_mem = ISC_FALSE;
bool show_final_mem = false;
isc_buffer_t key_txtbuffer;
char key_txtsecret[256];
isc_mem_t *mctx = NULL;
@@ -104,7 +104,7 @@ main(int argc, char **argv) {
struct in6_addr addr6_dummy;
char *chrootdir = NULL;
char *user = NULL;
isc_boolean_t keyonly = ISC_FALSE;
bool keyonly = false;
int len;
keydef = keyfile = RNDC_KEYFILE;
@@ -119,14 +119,14 @@ main(int argc, char **argv) {
serveraddr = DEFAULT_SERVER;
port = DEFAULT_PORT;
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv,
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
{
switch (ch) {
case 'a':
keyonly = ISC_TRUE;
keyonly = true;
break;
case 'A':
algname = isc_commandline_argument;
@@ -153,7 +153,7 @@ main(int argc, char **argv) {
break;
case 'm':
show_final_mem = ISC_TRUE;
show_final_mem = true;
break;
case 'p':
port = strtol(isc_commandline_argument, &p, 10);
@@ -177,7 +177,7 @@ main(int argc, char **argv) {
user = isc_commandline_argument;
break;
case 'V':
verbose = ISC_TRUE;
verbose = true;
break;
case '?':
if (isc_commandline_option != '?') {
+2 -2
View File
@@ -15,15 +15,15 @@
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <isc/boolean.h>
#include <isc/print.h>
#include "util.h"
extern isc_boolean_t verbose;
extern bool verbose;
extern const char *progname;
void
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -106,7 +106,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+3 -3
View File
@@ -16,7 +16,7 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = -DVERSION=\"${VERSION}\" \
-DSYSCONFDIR=\"${sysconfdir}\"
@@ -24,8 +24,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+111 -76
View File
@@ -24,7 +24,9 @@
#include <netdb.h>
#endif
#include <stdbool.h>
#include <stdio.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -94,40 +96,40 @@ static const char *port = "53";
static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL;
static isc_sockaddr_t a4, a6;
static char *curqname = NULL, *qname = NULL;
static isc_boolean_t classset = ISC_FALSE;
static bool classset = false;
static dns_rdatatype_t qtype = dns_rdatatype_none;
static isc_boolean_t typeset = ISC_FALSE;
static bool typeset = false;
static unsigned int styleflags = 0;
static isc_uint32_t splitwidth = 0xffffffff;
static isc_boolean_t
showcomments = ISC_TRUE,
showdnssec = ISC_TRUE,
showtrust = ISC_TRUE,
rrcomments = ISC_TRUE,
noclass = ISC_FALSE,
nocrypto = ISC_FALSE,
nottl = ISC_FALSE,
multiline = ISC_FALSE,
short_form = ISC_FALSE,
print_unknown_format = ISC_FALSE;
static uint32_t splitwidth = 0xffffffff;
static bool
showcomments = true,
showdnssec = true,
showtrust = true,
rrcomments = true,
noclass = false,
nocrypto = false,
nottl = false,
multiline = false,
short_form = false,
print_unknown_format = false;
static isc_boolean_t
resolve_trace = ISC_FALSE,
validator_trace = ISC_FALSE,
message_trace = ISC_FALSE;
static bool
resolve_trace = false,
validator_trace = false,
message_trace = false;
static isc_boolean_t
use_ipv4 = ISC_TRUE,
use_ipv6 = ISC_TRUE;
static bool
use_ipv4 = true,
use_ipv6 = true;
static isc_boolean_t
cdflag = ISC_FALSE,
no_sigs = ISC_FALSE,
root_validation = ISC_TRUE,
dlv_validation = ISC_TRUE;
static bool
cdflag = false,
no_sigs = false,
root_validation = true,
dlv_validation = true;
static isc_boolean_t use_tcp = ISC_FALSE;
static bool use_tcp = false;
static char *anchorfile = NULL;
static char *trust_anchor = NULL;
@@ -144,10 +146,10 @@ static char anchortext[] = MANAGED_KEYS;
* Static function prototypes
*/
static isc_result_t
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict);
get_reverse(char *reverse, size_t len, char *value, bool strict);
static isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
parse_uint(uint32_t *uip, const char *value, uint32_t max,
const char *desc);
static void
@@ -408,7 +410,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
{
isc_result_t result = ISC_R_SUCCESS;
static dns_trust_t trust;
static isc_boolean_t first = ISC_TRUE;
static bool first = true;
isc_buffer_t target;
isc_region_t r;
char *t = NULL;
@@ -430,7 +432,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
putchar('\n');
print_status(rdataset);
trust = rdataset->trust;
first = ISC_FALSE;
first = false;
}
do {
@@ -566,7 +568,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
static isc_result_t
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_rdata_dnskey_t keystruct;
isc_uint32_t flags, proto, alg;
uint32_t flags, proto, alg;
const char *keystr, *keynamestr;
unsigned char keydata[4096];
isc_buffer_t keydatabuf;
@@ -576,7 +578,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_fixedname_t fkeyname;
dns_name_t *keyname;
isc_result_t result;
isc_boolean_t match_root = ISC_FALSE, match_dlv = ISC_FALSE;
bool match_root = false, match_dlv = false;
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
@@ -621,9 +623,9 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
if (alg > 0xff)
CHECK(ISC_R_RANGE);
keystruct.flags = (isc_uint16_t)flags;
keystruct.protocol = (isc_uint8_t)proto;
keystruct.algorithm = (isc_uint8_t)alg;
keystruct.flags = (uint16_t)flags;
keystruct.protocol = (uint8_t)proto;
keystruct.algorithm = (uint8_t)alg;
isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
@@ -763,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));
@@ -778,7 +787,7 @@ addserver(dns_client_t *client) {
struct in6_addr in6;
isc_sockaddr_t *sa;
isc_sockaddrlist_t servers;
isc_uint32_t destport;
uint32_t destport;
isc_result_t result;
dns_name_t *name = NULL;
@@ -869,7 +878,7 @@ findserver(dns_client_t *client) {
irs_resconf_t *resconf = NULL;
isc_sockaddrlist_t *nameservers;
isc_sockaddr_t *sa, *next;
isc_uint32_t destport;
uint32_t destport;
result = parse_uint(&destport, port, 0xffff, "port");
if (result != ISC_R_SUCCESS)
@@ -944,9 +953,9 @@ cleanup:
}
static isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
parse_uint(uint32_t *uip, const char *value, uint32_t max,
const char *desc) {
isc_uint32_t n;
uint32_t n;
isc_result_t result = isc_parse_uint32(&n, value, 10);
if (result == ISC_R_SUCCESS && n > max)
result = ISC_R_RANGE;
@@ -963,7 +972,7 @@ static void
plus_option(char *option) {
isc_result_t result;
char *cmd, *value, *last = NULL;
isc_boolean_t state = ISC_TRUE;
bool state = true;
INSIST(option != NULL);
@@ -974,7 +983,7 @@ plus_option(char *option) {
}
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = ISC_FALSE;
state = false;
}
value = strtok_r(NULL, "\0", &last);
@@ -1001,7 +1010,7 @@ plus_option(char *option) {
break;
case 'l': /* class */
FULLCHECK("class");
noclass = ISC_TF(!state);
noclass = !state;
break;
case 'o': /* comments */
FULLCHECK("comments");
@@ -1009,7 +1018,7 @@ plus_option(char *option) {
break;
case 'r': /* crypto */
FULLCHECK("crypto");
nocrypto = ISC_TF(!state);
nocrypto = !state;
break;
default:
goto invalid_option;
@@ -1082,10 +1091,10 @@ plus_option(char *option) {
FULLCHECK("short");
short_form = state;
if (short_form) {
multiline = ISC_FALSE;
showcomments = ISC_FALSE;
showtrust = ISC_FALSE;
showdnssec = ISC_FALSE;
multiline = false;
showcomments = false;
showtrust = false;
showdnssec = false;
}
break;
case 'p': /* split */
@@ -1137,7 +1146,7 @@ plus_option(char *option) {
break;
case 't': /* ttl */
FULLCHECK("ttl");
nottl = ISC_TF(!state);
nottl = !state;
break;
default:
goto invalid_option;
@@ -1165,11 +1174,13 @@ plus_option(char *option) {
* options: "46a:b:c:d:himp:q:t:vx:";
*/
static const char *single_dash_opts = "46himv";
static isc_boolean_t
dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
static const char *dash_opts = "46abcdhimpqtvx";
static bool
dash_option(char *option, char *next, bool *open_type_class) {
char opt, *value;
isc_result_t result;
isc_boolean_t value_from_next;
bool value_from_next;
isc_textregion_t tr;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
@@ -1177,7 +1188,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
struct in_addr in4;
struct in6_addr in6;
in_port_t srcport;
isc_uint32_t num;
uint32_t num;
char *hash;
while (strpbrk(option, single_dash_opts) == &option[0]) {
@@ -1193,7 +1204,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
fatal("IPv4 networking not available");
if (use_ipv6) {
isc_net_disableipv6();
use_ipv6 = ISC_FALSE;
use_ipv6 = false;
}
break;
case '6':
@@ -1201,7 +1212,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
fatal("IPv6 networking not available");
if (use_ipv4) {
isc_net_disableipv4();
use_ipv4 = ISC_FALSE;
use_ipv4 = false;
}
break;
case 'h':
@@ -1209,9 +1220,9 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
exit(0);
/* NOTREACHED */
case 'i':
no_sigs = ISC_TRUE;
dlv_validation = ISC_FALSE;
root_validation = ISC_FALSE;
no_sigs = true;
dlv_validation = false;
root_validation = false;
break;
case 'm':
/* handled in preparse_args() */
@@ -1222,18 +1233,19 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
/* NOTREACHED */
default:
INSIST(0);
ISC_UNREACHABLE();
}
if (strlen(option) > 1U)
option = &option[1];
else
return (ISC_FALSE);
return (false);
}
opt = option[0];
if (strlen(option) > 1U) {
value_from_next = ISC_FALSE;
value_from_next = false;
value = &option[1];
} else {
value_from_next = ISC_TRUE;
value_from_next = true;
value = next;
}
if (value == NULL)
@@ -1279,13 +1291,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
if (classset)
warn("extra query class");
*open_type_class = ISC_FALSE;
*open_type_class = false;
tr.base = value;
tr.length = strlen(value);
result = dns_rdataclass_fromtext(&rdclass,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS)
classset = ISC_TRUE;
classset = true;
else if (rdclass != dns_rdataclass_in)
warn("ignoring non-IN query class");
else
@@ -1310,7 +1322,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
fatal("out of memory");
return (value_from_next);
case 't':
*open_type_class = ISC_FALSE;
*open_type_class = false;
tr.base = value;
tr.length = strlen(value);
result = dns_rdatatype_fromtext(&rdtype,
@@ -1322,13 +1334,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
rdtype == dns_rdatatype_axfr)
fatal("Transfer not supported");
qtype = rdtype;
typeset = ISC_TRUE;
typeset = true;
} else
warn("ignoring invalid type");
return (value_from_next);
case 'x':
result = get_reverse(textname, sizeof(textname), value,
ISC_FALSE);
false);
if (result == ISC_R_SUCCESS) {
if (curqname != NULL) {
isc_mem_free(mctx, curqname);
@@ -1340,7 +1352,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
if (typeset)
warn("extra query type");
qtype = dns_rdatatype_ptr;
typeset = ISC_TRUE;
typeset = true;
} else {
fprintf(stderr, "Invalid IP address %s\n", value);
exit(1);
@@ -1352,7 +1364,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
usage();
}
/* NOTREACHED */
return (ISC_FALSE);
return (false);
}
/*
@@ -1361,12 +1373,14 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
*/
static void
preparse_args(int argc, char **argv) {
isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
bool ipv4only = false, ipv6only = false;
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]) {
@@ -1378,17 +1392,38 @@ preparse_args(int argc, char **argv) {
if (ipv6only) {
fatal("only one of -4 and -6 allowed");
}
ipv4only = ISC_TRUE;
ipv4only = true;
break;
case '6':
if (ipv4only) {
fatal("only one of -4 and -6 allowed");
}
ipv6only = ISC_TRUE;
ipv6only = true;
break;
}
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;
}
}
}
@@ -1404,7 +1439,7 @@ parse_args(int argc, char **argv) {
isc_textregion_t tr;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
isc_boolean_t open_type_class = ISC_TRUE;
bool open_type_class = true;
for (; argc > 0; argc--, argv++) {
if (argv[0][0] == '@') {
@@ -1443,7 +1478,7 @@ parse_args(int argc, char **argv) {
rdtype == dns_rdatatype_axfr)
fatal("Transfer not supported");
qtype = rdtype;
typeset = ISC_TRUE;
typeset = true;
continue;
}
result = dns_rdataclass_fromtext(&rdclass,
@@ -1512,7 +1547,7 @@ reverse_octets(const char *in, char **p, char *end) {
}
static isc_result_t
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
get_reverse(char *reverse, size_t len, char *value, bool strict) {
int r;
isc_result_t result;
isc_netaddr_t addr;
@@ -1588,7 +1623,7 @@ main(int argc, char *argv[]) {
fatal("failed to create mctx");
CHECK(isc_appctx_create(mctx, &actx));
CHECK(isc_taskmgr_createinctx(mctx, actx, 1, 0, &taskmgr));
CHECK(isc_taskmgr_createinctx(mctx, actx, 1, &taskmgr));
CHECK(isc_socketmgr_createinctx(mctx, actx, &socketmgr));
CHECK(isc_timermgr_createinctx(mctx, actx, &timermgr));
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+8 -6
View File
@@ -19,7 +19,7 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
@@ -27,8 +27,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
@@ -64,6 +64,8 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
@@ -99,12 +101,12 @@ install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
nslookup@EXEEXT@ ${DESTDIR}${bindir}
for m in ${MANPAGES}; do \
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
done
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1 || exit 1; \
done
uninstall::
for m in ${MANPAGES}; do \
rm -f ${DESTDIR}${mandir}/man1/$$m ; \
rm -f ${DESTDIR}${mandir}/man1/$$m || exit 1; \
done
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@
+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
+195 -157
View File
@@ -12,6 +12,9 @@
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
@@ -61,10 +64,10 @@ static int addresscount = 0;
static char domainopt[DNS_NAME_MAXTEXT];
static char hexcookie[81];
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
static isc_uint32_t splitwidth = 0xffffffff;
static bool short_form = false, printcmd = true,
plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false, digrc = true;
static uint32_t splitwidth = 0xffffffff;
/*% opcode text */
static const char * const opcodetext[] = {
@@ -150,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"
@@ -190,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"
@@ -240,7 +245,7 @@ help(void) {
*/
static void
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_uint64_t diff;
uint64_t diff;
time_t tnow;
struct tm tmnow;
#ifdef WIN32
@@ -260,7 +265,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
printf(";; Query time: %ld msec\n", (long) diff / 1000);
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
time(&tnow);
#if defined(ISC_PLATFORM_USETHREADS) && !defined(WIN32)
#if !defined(WIN32)
(void)localtime_r(&tnow, &tmnow);
#else
tmnow = *localtime(&tnow);
@@ -281,7 +286,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
#endif
if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u, "
"bytes %" ISC_PRINT_QUADFORMAT "u)\n",
"bytes %" PRIu64 ")\n",
query->rr_count, query->msg_count,
query->byte_count);
} else {
@@ -299,18 +304,18 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
} else if (query->lookup->identify && !short_form) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
if (query->lookup->use_usec)
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
printf(";; Received %" PRIu64 " bytes "
"from %s(%s) in %ld us\n\n",
query->lookup->doing_xfr
? query->byte_count
: (isc_uint64_t)bytes,
: (uint64_t)bytes,
fromtext, query->userarg, (long) diff);
else
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
printf(";; Received %" PRIu64 " bytes "
"from %s(%s) in %ld ms\n\n",
query->lookup->doing_xfr
? query->byte_count
: (isc_uint64_t)bytes,
: (uint64_t)bytes,
fromtext, query->userarg, (long) diff / 1000);
}
}
@@ -332,7 +337,7 @@ trying(char *frm, dig_lookup_t *lookup) {
static isc_result_t
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
isc_result_t result;
isc_uint64_t diff;
uint64_t diff;
char store[sizeof(" in 18446744073709551616 us.")];
unsigned int styleflags = 0;
@@ -360,10 +365,11 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
if (query->lookup->use_usec)
snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u us.", diff);
else
snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
if (query->lookup->use_usec) {
snprintf(store, sizeof(store), " in %" PRIu64 " us.", diff);
} else {
snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000);
}
ADD_STRING(buf, store);
}
ADD_STRING(buf, "\n");
@@ -421,7 +427,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
return (ISC_R_SUCCESS);
}
static isc_boolean_t
static bool
isdotlocal(dns_message_t *msg) {
isc_result_t result;
static unsigned char local_ndata[] = { "\005local\0" };
@@ -436,16 +442,16 @@ isdotlocal(dns_message_t *msg) {
dns_name_t *name = NULL;
dns_message_currentname(msg, DNS_SECTION_QUESTION, &name);
if (dns_name_issubdomain(name, &local))
return (ISC_TRUE);
return (true);
}
return (ISC_FALSE);
return (false);
}
/*
* Callback from dighost.c to print the reply from a server
*/
static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
isc_result_t result;
dns_messagetextflag_t flags;
isc_buffer_t *buf = NULL;
@@ -689,7 +695,7 @@ cleanup:
static void
printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
int i;
static isc_boolean_t first = ISC_TRUE;
static bool first = true;
char append[MXNAME];
if (printcmd) {
@@ -716,7 +722,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
";; global options:%s%s\n",
short_form ? " +short" : "",
printcmd ? " +cmd" : "");
first = ISC_FALSE;
first = false;
strlcat(lookup->cmdline, append,
sizeof(lookup->cmdline));
}
@@ -731,13 +737,13 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
*/
static void
plus_option(char *option, isc_boolean_t is_batchfile,
plus_option(char *option, bool is_batchfile,
dig_lookup_t *lookup)
{
isc_result_t result;
char *cmd, *value, *last = NULL, *code, *extra;
isc_uint32_t num;
isc_boolean_t state = ISC_TRUE;
uint32_t num;
bool state = true;
size_t n;
INSIST(option != NULL);
@@ -748,7 +754,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = ISC_FALSE;
state = false;
}
/* parse the rest of the string */
value = strtok_r(NULL, "", &last);
@@ -855,7 +861,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'l': /* class */
/* keep +cl for backwards compatibility */
FULLCHECK2("cl", "class");
lookup->noclass = ISC_TF(!state);
lookup->noclass = !state;
break;
case 'm': /* cmd */
FULLCHECK("cmd");
@@ -891,7 +897,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
break;
case 'r':
FULLCHECK("crypto");
lookup->nocrypto = ISC_TF(!state);
lookup->nocrypto = !state;
break;
default:
goto invalid_option;
@@ -1001,14 +1007,20 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->ednsoptscnt = 0;
break;
}
if (value == NULL) {
code = NULL;
if (value != NULL) {
code = strtok_r(value,
":",
&last);
}
if (code == NULL) {
warn("ednsopt no "
"code point "
"specified");
goto exit_or_usage;
}
code = strtok_r(value, ":", &last);
extra = strtok_r(NULL, "\0", &last);
extra = strtok_r(NULL, "\0",
&last);
save_opt(lookup, code, extra);
break;
default:
@@ -1051,7 +1063,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
switch (cmd[3]) {
case 'i':
FULLCHECK("idnin");
#ifndef WITH_IDN_SUPPORT
#ifndef HAVE_LIBIDN2
fprintf(stderr, ";; IDN input support"
" not enabled\n");
#else
@@ -1060,7 +1072,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
break;
case 'o':
FULLCHECK("idnout");
#ifndef WITH_IDN_OUT_SUPPORT
#ifndef HAVE_LIBIDN2
fprintf(stderr, ";; IDN output support"
" not enabled\n");
#else
@@ -1156,17 +1168,17 @@ plus_option(char *option, isc_boolean_t is_batchfile,
FULLCHECK("nssearch");
lookup->ns_search_only = state;
if (state) {
lookup->trace_root = ISC_TRUE;
lookup->recurse = ISC_TRUE;
lookup->identify = ISC_TRUE;
lookup->stats = ISC_FALSE;
lookup->comments = ISC_FALSE;
lookup->section_additional = ISC_FALSE;
lookup->section_authority = ISC_FALSE;
lookup->section_question = ISC_FALSE;
lookup->trace_root = true;
lookup->recurse = true;
lookup->identify = true;
lookup->stats = false;
lookup->comments = false;
lookup->section_additional = false;
lookup->section_authority = false;
lookup->section_question = false;
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = ISC_TRUE;
short_form = ISC_TRUE;
lookup->rdtypeset = true;
short_form = true;
lookup->rrcomments = 0;
}
break;
@@ -1224,7 +1236,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
warn("Couldn't parse padding");
goto exit_or_usage;
}
lookup->padding = (isc_uint16_t)num;
lookup->padding = (uint16_t)num;
break;
case 'q':
switch (cmd[1]) {
@@ -1300,13 +1312,13 @@ plus_option(char *option, isc_boolean_t is_batchfile,
FULLCHECK("short");
short_form = state;
if (state) {
printcmd = ISC_FALSE;
lookup->section_additional = ISC_FALSE;
lookup->section_answer = ISC_TRUE;
lookup->section_authority = ISC_FALSE;
lookup->section_question = ISC_FALSE;
lookup->comments = ISC_FALSE;
lookup->stats = ISC_FALSE;
printcmd = false;
lookup->section_additional = false;
lookup->section_answer = true;
lookup->section_authority = false;
lookup->section_question = false;
lookup->comments = false;
lookup->stats = false;
lookup->rrcomments = -1;
}
break;
@@ -1400,7 +1412,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
FULLCHECK("tcp");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = ISC_TRUE;
lookup->tcp_mode_set = true;
}
break;
default:
@@ -1433,17 +1445,17 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->trace = state;
lookup->trace_root = state;
if (state) {
lookup->recurse = ISC_FALSE;
lookup->identify = ISC_TRUE;
lookup->comments = ISC_FALSE;
lookup->recurse = false;
lookup->identify = true;
lookup->comments = false;
lookup->rrcomments = 0;
lookup->stats = ISC_FALSE;
lookup->section_additional = ISC_FALSE;
lookup->section_authority = ISC_TRUE;
lookup->section_question = ISC_FALSE;
lookup->dnssec = ISC_TRUE;
lookup->sendcookie = ISC_TRUE;
usesearch = ISC_FALSE;
lookup->stats = false;
lookup->section_additional = false;
lookup->section_authority = true;
lookup->section_question = false;
lookup->dnssec = true;
lookup->sendcookie = true;
usesearch = false;
}
break;
case 'i': /* tries */
@@ -1477,12 +1489,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 0:
case 'i': /* ttlid */
FULLCHECK2("ttl", "ttlid");
lookup->nottl = ISC_TF(!state);
lookup->nottl = !state;
break;
case 'u': /* ttlunits */
FULLCHECK("ttlunits");
lookup->nottl = ISC_FALSE;
lookup->ttlunits = ISC_TF(state);
lookup->nottl = false;
lookup->ttlunits = state;
break;
default:
goto invalid_option;
@@ -1504,7 +1516,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
FULLCHECK("vc");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = ISC_TRUE;
lookup->tcp_mode_set = true;
}
break;
case 'z': /* zflag */
@@ -1530,19 +1542,19 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
/*%
* #ISC_TRUE returned if value was used
* #true returned if value was used
*/
static const char *single_dash_opts = "46dhimnuv";
static const char *dash_opts = "46bcdfhikmnptvyx";
static isc_boolean_t
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,
isc_boolean_t *open_type_class, isc_boolean_t *need_clone,
isc_boolean_t config_only, int argc, char **argv,
isc_boolean_t *firstarg)
bool *open_type_class, bool *need_clone,
bool config_only, int argc, char **argv,
bool *firstarg)
{
char opt, *value, *ptr, *ptr2, *ptr3, *last;
isc_result_t result;
isc_boolean_t value_from_next;
bool value_from_next;
isc_textregion_t tr;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
@@ -1551,7 +1563,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
struct in6_addr in6;
in_port_t srcport;
char *hash, *cmd;
isc_uint32_t num;
uint32_t num;
while (strpbrk(option, single_dash_opts) == &option[0]) {
/*
@@ -1564,21 +1576,21 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case '4':
if (have_ipv4) {
isc_net_disableipv6();
have_ipv6 = ISC_FALSE;
have_ipv6 = false;
} else {
fatal("can't find IPv4 networking");
/* NOTREACHED */
return (ISC_FALSE);
return (false);
}
break;
case '6':
if (have_ipv6) {
isc_net_disableipv4();
have_ipv4 = ISC_FALSE;
have_ipv4 = false;
} else {
fatal("can't find IPv6 networking");
/* NOTREACHED */
return (ISC_FALSE);
return (false);
}
break;
case 'd':
@@ -1586,17 +1598,17 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (ptr != &option[1]) {
cmd = option;
FULLCHECK("debug");
debugging = ISC_TRUE;
return (ISC_FALSE);
debugging = true;
return (false);
} else
debugging = ISC_TRUE;
debugging = true;
break;
case 'h':
help();
exit(0);
break;
case 'i':
ip6_int = ISC_TRUE;
/* deprecated */
break;
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
@@ -1604,8 +1616,12 @@ 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 = ISC_TRUE;
(*lookup)->use_usec = true;
break;
case 'v':
version();
@@ -1615,14 +1631,14 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (strlen(option) > 1U)
option = &option[1];
else
return (ISC_FALSE);
return (false);
}
opt = option[0];
if (strlen(option) > 1U) {
value_from_next = ISC_FALSE;
value_from_next = false;
value = &option[1];
} else {
value_from_next = ISC_TRUE;
value_from_next = true;
value = next;
}
if (value == NULL)
@@ -1652,20 +1668,20 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
}
if (hash != NULL)
*hash = '#';
specified_source = ISC_TRUE;
specified_source = true;
return (value_from_next);
case 'c':
if ((*lookup)->rdclassset) {
fprintf(stderr, ";; Warning, extra class option\n");
}
*open_type_class = ISC_FALSE;
*open_type_class = false;
tr.base = value;
tr.length = (unsigned int) strlen(value);
result = dns_rdataclass_fromtext(&rdclass,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS) {
(*lookup)->rdclass = rdclass;
(*lookup)->rdclassset = ISC_TRUE;
(*lookup)->rdclassset = true;
} else
fprintf(stderr, ";; Warning, ignoring "
"invalid class %s\n",
@@ -1687,23 +1703,23 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (!config_only) {
if (*need_clone)
(*lookup) = clone_lookup(default_lookup,
ISC_TRUE);
*need_clone = ISC_TRUE;
true);
*need_clone = true;
strlcpy((*lookup)->textname, value,
sizeof((*lookup)->textname));
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->new_search = ISC_TRUE;
(*lookup)->trace_root = ((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->new_search = true;
if (*firstarg) {
printgreeting(argc, argv, *lookup);
*firstarg = ISC_FALSE;
*firstarg = false;
}
ISC_LIST_APPEND(lookup_list, (*lookup), link);
debug("looking up %s", (*lookup)->textname);
}
return (value_from_next);
case 't':
*open_type_class = ISC_FALSE;
*open_type_class = false;
if (strncasecmp(value, "ixfr=", 5) == 0) {
rdtype = dns_rdatatype_ixfr;
result = ISC_R_SUCCESS;
@@ -1723,9 +1739,9 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
"extra type option\n");
}
if (rdtype == dns_rdatatype_ixfr) {
isc_uint32_t serial;
uint32_t serial;
(*lookup)->rdtype = dns_rdatatype_ixfr;
(*lookup)->rdtypeset = ISC_TRUE;
(*lookup)->rdtypeset = true;
result = parse_uint(&serial, &value[5],
MAXSERIAL, "serial number");
if (result != ISC_R_SUCCESS)
@@ -1734,19 +1750,19 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
(*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm;
if (!(*lookup)->tcp_mode_set)
(*lookup)->tcp_mode = ISC_TRUE;
(*lookup)->tcp_mode = true;
} else {
(*lookup)->rdtype = rdtype;
if (!config_only)
(*lookup)->rdtypeset = ISC_TRUE;
(*lookup)->rdtypeset = true;
if (rdtype == dns_rdatatype_axfr) {
(*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm;
} else if (rdtype == dns_rdatatype_any) {
if (!(*lookup)->tcp_mode_set)
(*lookup)->tcp_mode = ISC_TRUE;
(*lookup)->tcp_mode = true;
}
(*lookup)->ixfr_serial = ISC_FALSE;
(*lookup)->ixfr_serial = false;
}
} else
fprintf(stderr, ";; Warning, ignoring "
@@ -1765,11 +1781,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
ptr = ptr2;
ptr2 = ptr3;
} else {
#ifndef PK11_MD5_DISABLE
hmacname = DNS_TSIG_HMACMD5_NAME;
#else
hmacname = DNS_TSIG_HMACSHA256_NAME;
#endif
digestbits = 0;
}
/* XXXONDREJ: FIXME */
@@ -1778,24 +1790,23 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
return (value_from_next);
case 'x':
if (*need_clone)
*lookup = clone_lookup(default_lookup, ISC_TRUE);
*need_clone = ISC_TRUE;
*lookup = clone_lookup(default_lookup, true);
*need_clone = true;
if (get_reverse(textname, sizeof(textname), value,
ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
false) == ISC_R_SUCCESS) {
strlcpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->ip6_int = ip6_int;
(*lookup)->trace_root = ((*lookup)->trace ||
(*lookup)->ns_search_only);
if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset)
(*lookup)->rdclass = dns_rdataclass_in;
(*lookup)->new_search = ISC_TRUE;
(*lookup)->new_search = true;
if (*firstarg) {
printgreeting(argc, argv, *lookup);
*firstarg = ISC_FALSE;
*firstarg = false;
}
ISC_LIST_APPEND(lookup_list, *lookup, link);
} else {
@@ -1809,7 +1820,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
usage();
}
/* NOTREACHED */
return (ISC_FALSE);
return (false);
}
/*%
@@ -1835,24 +1846,50 @@ 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 = ISC_TRUE;
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");
ipv4only = ISC_TRUE;
ipv4only = true;
break;
case '6':
if (ipv4only)
fatal("only one of -4 and -6 allowed");
ipv6only = ISC_TRUE;
ipv6only = true;
break;
}
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;
}
}
@@ -1873,16 +1910,16 @@ split_batchline(char *batchline, char **bargv, int len, const char *msg) {
}
static void
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
parse_args(bool is_batchfile, bool config_only,
int argc, char **argv)
{
isc_result_t result;
isc_textregion_t tr;
isc_boolean_t firstarg = ISC_TRUE;
bool firstarg = true;
dig_lookup_t *lookup = NULL;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
isc_boolean_t open_type_class = ISC_TRUE;
bool open_type_class = true;
char batchline[MXNAME];
int bargc;
char *bargv[64];
@@ -1892,7 +1929,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
char *homedir;
char rcfile[PATH_MAX];
#endif
isc_boolean_t need_clone = ISC_TRUE;
bool need_clone = true;
/*
* The semantics for parsing the args is a bit complex; if
@@ -1909,9 +1946,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (!is_batchfile) {
debug("making new lookup");
default_lookup = make_empty_lookup();
default_lookup->adflag = ISC_TRUE;
default_lookup->adflag = true;
default_lookup->edns = 0;
default_lookup->sendcookie = ISC_TRUE;
default_lookup->sendcookie = true;
#ifndef NOPOSIX
/*
@@ -1919,8 +1956,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t 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)) {
@@ -1936,7 +1974,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
".digrc argv");
bargv[0] = argv[0];
argv0 = argv[0];
parse_args(ISC_TRUE, ISC_TRUE,
parse_args(true, true,
bargc, (char **)bargv);
}
fclose(batchfp);
@@ -1946,8 +1984,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (is_batchfile && !config_only) {
/* Processing '-f batchfile'. */
lookup = clone_lookup(default_lookup, ISC_TRUE);
need_clone = ISC_FALSE;
lookup = clone_lookup(default_lookup, true);
need_clone = false;
} else {
lookup = default_lookup;
}
@@ -2030,10 +2068,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
"extra type option\n");
}
if (rdtype == dns_rdatatype_ixfr) {
isc_uint32_t serial;
uint32_t serial;
lookup->rdtype =
dns_rdatatype_ixfr;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
result = parse_uint(&serial,
&rv[0][5],
MAXSERIAL,
@@ -2046,10 +2084,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
plusquest;
lookup->comments = pluscomm;
if (!lookup->tcp_mode_set)
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode = true;
} else {
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
if (rdtype ==
dns_rdatatype_axfr) {
lookup->section_question =
@@ -2059,8 +2097,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (rdtype ==
dns_rdatatype_any &&
!lookup->tcp_mode_set)
lookup->tcp_mode = ISC_TRUE;
lookup->ixfr_serial = ISC_FALSE;
lookup->tcp_mode = true;
lookup->ixfr_serial = false;
}
continue;
}
@@ -2072,7 +2110,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
"extra class option\n");
}
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
lookup->rdclassset = true;
continue;
}
}
@@ -2080,16 +2118,16 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (!config_only) {
if (need_clone)
lookup = clone_lookup(default_lookup,
ISC_TRUE);
need_clone = ISC_TRUE;
true);
need_clone = true;
strlcpy(lookup->textname, rv[0],
sizeof(lookup->textname));
lookup->trace_root = ISC_TF(lookup->trace ||
lookup->ns_search_only);
lookup->new_search = ISC_TRUE;
lookup->trace_root = (lookup->trace ||
lookup->ns_search_only);
lookup->new_search = true;
if (firstarg) {
printgreeting(argc, argv, lookup);
firstarg = ISC_FALSE;
firstarg = false;
}
ISC_LIST_APPEND(lookup_list, lookup, link);
debug("looking up %s", lookup->textname);
@@ -2125,7 +2163,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
"batch argv");
bargv[0] = argv[0];
argv0 = argv[0];
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
parse_args(true, false, bargc, (char **)bargv);
return;
}
return;
@@ -2135,17 +2173,17 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
*/
if ((lookup_list.head == NULL) && !config_only) {
if (need_clone)
lookup = clone_lookup(default_lookup, ISC_TRUE);
need_clone = ISC_TRUE;
lookup->trace_root = ISC_TF(lookup->trace ||
lookup->ns_search_only);
lookup->new_search = ISC_TRUE;
lookup = clone_lookup(default_lookup, true);
need_clone = true;
lookup->trace_root = (lookup->trace ||
lookup->ns_search_only);
lookup->new_search = true;
strlcpy(lookup->textname, ".", sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
if (firstarg) {
printgreeting(argc, argv, lookup);
firstarg = ISC_FALSE;
firstarg = false;
}
ISC_LIST_APPEND(lookup_list, lookup, link);
}
@@ -2182,7 +2220,7 @@ query_finished(void) {
debug("batch line %s", batchline);
bargc = split_batchline(batchline, bargv, 14, "batch argv");
bargv[0] = argv0;
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
parse_args(true, false, bargc, (char **)bargv);
start_lookup();
} else {
batchname = NULL;
@@ -2219,7 +2257,7 @@ void dig_setup(int argc, char **argv)
setup_system(ipv4only, ipv6only);
}
void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
void dig_query_setup(bool is_batchfile, bool config_only,
int argc, char **argv)
{
debug("dig_query_setup");
@@ -2231,7 +2269,7 @@ void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
setup_text_key();
if (domainopt[0] != '\0') {
set_search_domain(domainopt);
usesearch = ISC_TRUE;
usesearch = true;
}
}
@@ -2268,7 +2306,7 @@ int
main(int argc, char **argv) {
dig_setup(argc, argv);
dig_query_setup(ISC_FALSE, ISC_FALSE, argc, argv);
dig_query_setup(false, false, argc, argv);
dig_startup();
dig_shutdown();
+32 -19
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>
@@ -1330,7 +1341,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 <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter>.
<parameter>+noidnout</parameter> or define
the <envar>IDN_DISABLE</envar> environment variable.
</para>
</refsection>
+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>
+534 -532
View File
File diff suppressed because it is too large Load Diff
+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
+88 -87
View File
@@ -12,6 +12,9 @@
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <limits.h>
@@ -26,7 +29,6 @@
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
#include <isc/stdlib.h>
#include <dns/byaddr.h>
#include <dns/fixedname.h>
@@ -40,14 +42,14 @@
#include <dig/dig.h>
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
static isc_boolean_t default_lookups = ISC_TRUE;
static bool short_form = true, listed_server = false;
static bool default_lookups = true;
static int seen_error = -1;
static isc_boolean_t list_addresses = ISC_TRUE;
static isc_boolean_t list_almost_all = ISC_FALSE;
static bool list_addresses = true;
static bool list_almost_all = false;
static dns_rdatatype_t list_type = dns_rdatatype_a;
static isc_boolean_t printed_server = ISC_FALSE;
static isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
static bool printed_server = false;
static bool ipv4only = false, ipv6only = false;
static const char *opcodetext[] = {
"QUERY",
@@ -141,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"
@@ -224,7 +225,7 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
static isc_result_t
printsection(dns_message_t *msg, dns_section_t sectionid,
const char *section_name, isc_boolean_t headers,
const char *section_name, bool headers,
dig_query_t *query)
{
dns_name_t *name, *print_name;
@@ -235,13 +236,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
isc_region_t r;
dns_name_t empty_name;
char tbuf[4096];
isc_boolean_t first;
isc_boolean_t no_rdata;
bool first;
bool no_rdata;
if (sectionid == DNS_SECTION_QUESTION)
no_rdata = ISC_TRUE;
no_rdata = true;
else
no_rdata = ISC_FALSE;
no_rdata = false;
if (headers)
printf(";; %s SECTION:\n", section_name);
@@ -259,7 +260,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
dns_message_currentname(msg, sectionid, &name);
isc_buffer_init(&target, tbuf, sizeof(tbuf));
first = ISC_TRUE;
first = true;
print_name = name;
for (rdataset = ISC_LIST_HEAD(name->list);
@@ -283,7 +284,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
if (!short_form) {
result = dns_rdataset_totext(rdataset,
print_name,
ISC_FALSE,
false,
no_rdata,
&target);
if (result != ISC_R_SUCCESS)
@@ -291,7 +292,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
#ifdef USEINITALWS
if (first) {
print_name = &empty_name;
first = ISC_FALSE;
first = false;
}
#else
UNUSED(first); /* Shut up compiler. */
@@ -350,7 +351,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
static isc_result_t
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
const dns_name_t *owner, const char *set_name,
isc_boolean_t headers)
bool headers)
{
isc_buffer_t target;
isc_result_t result;
@@ -363,7 +364,7 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
isc_buffer_init(&target, tbuf, sizeof(tbuf));
result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
result = dns_rdataset_totext(rdataset, owner, false, false,
&target);
if (result != ISC_R_SUCCESS)
return (result);
@@ -400,8 +401,8 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
}
static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
isc_boolean_t did_flag = ISC_FALSE;
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
bool did_flag = false;
dns_rdataset_t *opt, *tsig = NULL;
const dns_name_t *tsigname;
isc_result_t result = ISC_R_SUCCESS;
@@ -424,7 +425,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
sizeof(sockstr));
printf("Address: %s\n", sockstr);
printf("Aliases: \n\n");
printed_server = ISC_TRUE;
printed_server = true;
}
if (msg->rcode != 0) {
@@ -456,22 +457,22 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, ISC_FALSE);
lookup = clone_lookup(query->lookup, false);
if (lookup != NULL) {
strlcpy(lookup->textname, namestr,
sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
lookup->origin = NULL;
lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link);
}
lookup = clone_lookup(query->lookup, ISC_FALSE);
lookup = clone_lookup(query->lookup, false);
if (lookup != NULL) {
strlcpy(lookup->textname, namestr,
sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_mx;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
lookup->origin = NULL;
lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -485,31 +486,31 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
printf(";; flags: ");
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
printf("qr");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
printf("%saa", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
printf("%stc", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
printf("%srd", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
printf("%sra", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
printf("%sad", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
}
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
printf("%scd", did_flag ? " " : "");
did_flag = ISC_TRUE;
did_flag = true;
POST(did_flag);
}
printf("; QUERY: %u, ANSWER: %u, "
@@ -532,7 +533,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
!short_form) {
printf("\n");
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
ISC_TRUE, query);
true, query);
if (result != ISC_R_SUCCESS)
return (result);
}
@@ -540,7 +541,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
if (!short_form)
printf("\n");
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
ISC_TF(!short_form), query);
!short_form, query);
if (result != ISC_R_SUCCESS)
return (result);
}
@@ -549,7 +550,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
!short_form) {
printf("\n");
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
ISC_TRUE, query);
true, query);
if (result != ISC_R_SUCCESS)
return (result);
}
@@ -557,14 +558,14 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
!short_form) {
printf("\n");
result = printsection(msg, DNS_SECTION_ADDITIONAL,
"ADDITIONAL", ISC_TRUE, query);
"ADDITIONAL", true, query);
if (result != ISC_R_SUCCESS)
return (result);
}
if ((tsig != NULL) && !short_form) {
printf("\n");
result = printrdata(msg, tsig, tsigname,
"PSEUDOSECTION TSIG", ISC_TRUE);
"PSEUDOSECTION TSIG", true);
if (result != ISC_R_SUCCESS)
return (result);
}
@@ -599,7 +600,7 @@ pre_parse_args(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) {
case 'm':
memdebugging = ISC_TRUE;
memdebugging = true;
if (strcasecmp("trace", isc_commandline_argument) == 0)
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
else if (strcasecmp("record",
@@ -613,12 +614,12 @@ pre_parse_args(int argc, char **argv) {
case '4':
if (ipv6only)
fatal("only one of -4 and -6 allowed");
ipv4only = ISC_TRUE;
ipv4only = true;
break;
case '6':
if (ipv4only)
fatal("only one of -4 and -6 allowed");
ipv6only = ISC_TRUE;
ipv6only = true;
break;
case 'a': break;
case 'A': break;
@@ -639,8 +640,8 @@ pre_parse_args(int argc, char **argv) {
case 'C': break;
case 'D':
if (debugging)
debugtiming = ISC_TRUE;
debugging = ISC_TRUE;
debugtiming = true;
debugging = true;
break;
case 'N': break;
case 'R': break;
@@ -650,12 +651,12 @@ pre_parse_args(int argc, char **argv) {
show_usage();
}
}
isc_commandline_reset = ISC_TRUE;
isc_commandline_reset = true;
isc_commandline_index = 1;
}
static void
parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
parse_args(bool is_batchfile, int argc, char **argv) {
char hostname[MXNAME];
dig_lookup_t *lookup;
int c;
@@ -664,30 +665,30 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
isc_uint32_t serial = 0;
uint32_t serial = 0;
UNUSED(is_batchfile);
lookup = make_empty_lookup();
lookup->servfail_stops = ISC_FALSE;
lookup->comments = ISC_FALSE;
lookup->servfail_stops = false;
lookup->comments = false;
short_form = !verbose;
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) {
case 'l':
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode = true;
lookup->rdtype = dns_rdatatype_axfr;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
fatalexit = 3;
break;
case 'v':
case 'd':
short_form = ISC_FALSE;
short_form = false;
break;
case 'r':
lookup->recurse = ISC_FALSE;
lookup->recurse = false;
break;
case 't':
if (strncasecmp(isc_commandline_argument,
@@ -712,23 +713,23 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */
list_type = dns_rdatatype_any;
short_form = ISC_FALSE;
lookup->tcp_mode = ISC_TRUE;
short_form = false;
lookup->tcp_mode = true;
} else if (rdtype == dns_rdatatype_ixfr) {
lookup->ixfr_serial = serial;
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode = true;
list_type = rdtype;
} else if (rdtype == dns_rdatatype_any) {
if (!lookup->tcp_mode_set)
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode = true;
} else
list_type = rdtype;
list_addresses = ISC_FALSE;
default_lookups = ISC_FALSE;
list_addresses = false;
default_lookups = false;
break;
case 'c':
tr.base = isc_commandline_argument;
@@ -742,25 +743,25 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
isc_commandline_argument);
} else {
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
lookup->rdclassset = true;
}
default_lookups = ISC_FALSE;
default_lookups = false;
break;
case 'A':
list_almost_all = ISC_TRUE;
list_almost_all = true;
/* FALL THROUGH */
case 'a':
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = dns_rdatatype_any;
list_type = dns_rdatatype_any;
list_addresses = ISC_FALSE;
lookup->rdtypeset = ISC_TRUE;
short_form = ISC_FALSE;
default_lookups = ISC_FALSE;
list_addresses = false;
lookup->rdtypeset = true;
short_form = false;
default_lookups = false;
break;
case 'i':
lookup->ip6_int = ISC_TRUE;
/* deprecated */
break;
case 'n':
/* deprecated */
@@ -786,23 +787,23 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
tries = 2;
break;
case 'T':
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode_set = ISC_TRUE;
lookup->tcp_mode = true;
lookup->tcp_mode_set = true;
break;
case 'U':
lookup->tcp_mode = ISC_FALSE;
lookup->tcp_mode_set = ISC_TRUE;
lookup->tcp_mode = false;
lookup->tcp_mode_set = true;
break;
case 'C':
debug("showing all SOAs");
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
lookup->rdclass = dns_rdataclass_in;
lookup->rdclassset = ISC_TRUE;
lookup->ns_search_only = ISC_TRUE;
lookup->trace_root = ISC_TRUE;
lookup->identify_previous_line = ISC_TRUE;
default_lookups = ISC_FALSE;
lookup->rdclassset = true;
lookup->ns_search_only = true;
lookup->trace_root = true;
lookup->identify_previous_line = true;
default_lookups = false;
break;
case 'N':
debug("setting NDOTS to %s",
@@ -819,7 +820,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
/* Handled by pre_parse_args(). */
break;
case 's':
lookup->servfail_stops = ISC_TRUE;
lookup->servfail_stops = true;
break;
}
}
@@ -834,22 +835,22 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
if (argc > isc_commandline_index + 1) {
set_nameserver(argv[isc_commandline_index+1]);
debug("server is %s", argv[isc_commandline_index+1]);
listed_server = ISC_TRUE;
listed_server = true;
} else
check_ra = ISC_TRUE;
check_ra = true;
lookup->pending = ISC_FALSE;
if (get_reverse(store, sizeof(store), hostname,
lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
lookup->pending = false;
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 = ISC_TRUE;
default_lookups = ISC_FALSE;
lookup->rdtypeset = true;
default_lookups = false;
} else {
strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
usesearch = ISC_TRUE;
usesearch = true;
}
lookup->new_search = ISC_TRUE;
lookup->new_search = true;
ISC_LIST_APPEND(lookup_list, lookup, link);
}
@@ -878,7 +879,7 @@ main(int argc, char **argv) {
check_result(result, "isc_app_start");
setup_libs();
setup_system(ipv4only, ipv6only);
parse_args(ISC_FALSE, argc, argv);
parse_args(false, argc, argv);
if (keyfile[0] != 0)
setup_file_key();
else if (keysecret[0] != 0)
+1 -13
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>
@@ -389,7 +377,7 @@
<command>host</command> 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 <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>host</command> runs.
+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.
+45 -42
View File
@@ -14,16 +14,19 @@
/*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <dns/rdatalist.h>
#include <dst/dst.h>
#include <isc/boolean.h>
#include <isc/buffer.h>
#include <isc/bufferlist.h>
#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>
@@ -79,9 +82,14 @@ 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 {
isc_boolean_t
bool
pending, /*%< Pending a successful answer */
waiting_connect,
doing_xfr,
@@ -101,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,
@@ -139,8 +146,8 @@ struct dig_lookup {
dns_rdatatype_t rdtype;
dns_rdatatype_t qrdtype;
dns_rdataclass_t rdclass;
isc_boolean_t rdtypeset;
isc_boolean_t rdclassset;
bool rdtypeset;
bool rdclassset;
char name_space[BUFSIZE];
char oname_space[BUFSIZE];
isc_buffer_t namebuf;
@@ -158,17 +165,17 @@ struct dig_lookup {
dig_serverlist_t my_server_list;
dig_searchlist_t *origin;
dig_query_t *xfr_q;
isc_uint32_t retries;
uint32_t retries;
int nsfound;
isc_uint16_t udpsize;
isc_int16_t edns;
isc_int16_t padding;
isc_uint32_t ixfr_serial;
uint16_t udpsize;
int16_t edns;
int16_t padding;
uint32_t ixfr_serial;
isc_buffer_t rdatabuf;
char rdatastore[MXNAME];
dst_context_t *tsigctx;
isc_buffer_t *querysig;
isc_uint32_t msgcounter;
uint32_t msgcounter;
dns_fixedname_t fdomain;
isc_sockaddr_t *ecs_addr;
char *cookie;
@@ -183,8 +190,9 @@ struct dig_lookup {
/*% The dig_query structure */
struct dig_query {
unsigned int magic;
dig_lookup_t *lookup;
isc_boolean_t waiting_connect,
bool waiting_connect,
pending_free,
waiting_senddone,
first_pass,
@@ -194,30 +202,26 @@ struct dig_query {
recv_made,
warn_id,
timedout;
isc_uint32_t first_rr_serial;
isc_uint32_t second_rr_serial;
isc_uint32_t msg_count;
isc_uint32_t rr_count;
isc_boolean_t ixfr_axfr;
uint32_t first_rr_serial;
uint32_t second_rr_serial;
uint32_t msg_count;
uint32_t rr_count;
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;
isc_sockaddr_t sockaddr;
isc_time_t time_sent;
isc_time_t time_recv;
isc_uint64_t byte_count;
isc_buffer_t sendbuf;
uint64_t byte_count;
isc_timer_t *timer;
};
@@ -244,7 +248,7 @@ extern dig_serverlist_t server_list;
extern dig_searchlistlist_t search_list;
extern unsigned int extrabytes;
extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
extern bool check_ra, have_ipv4, have_ipv6, specified_source,
usesearch, showsearch;
extern in_port_t port;
extern unsigned int timeout;
@@ -260,17 +264,17 @@ extern char keysecret[MXNAME];
extern const dns_name_t *hmacname;
extern unsigned int digestbits;
extern dns_tsigkey_t *tsigkey;
extern isc_boolean_t validated;
extern bool validated;
extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
extern isc_boolean_t free_now;
extern isc_boolean_t debugging, debugtiming, memdebugging;
extern isc_boolean_t keep_open;
extern bool free_now;
extern bool debugging, debugtiming, memdebugging;
extern bool keep_open;
extern char *progname;
extern int tries;
extern int fatalexit;
extern isc_boolean_t verbose;
extern bool verbose;
/*
* Routines in dighost.c.
@@ -282,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, isc_boolean_t ip6_int,
isc_boolean_t strict);
get_reverse(char *reverse, size_t len, char *value, bool strict);
ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...)
@@ -302,7 +305,7 @@ debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void
check_result(isc_result_t result, const char *msg);
isc_boolean_t
bool
setup_lookup(dig_lookup_t *lookup);
void
@@ -324,14 +327,14 @@ void
setup_libs(void);
void
setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only);
setup_system(bool ipv4only, bool ipv6only);
isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
parse_uint(uint32_t *uip, const char *value, uint32_t max,
const char *desc);
isc_result_t
parse_xint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
parse_xint(uint32_t *uip, const char *value, uint32_t max,
const char *desc);
isc_result_t
@@ -341,13 +344,13 @@ void
parse_hmac(const char *hmacstr);
dig_lookup_t *
requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
requeue_lookup(dig_lookup_t *lookold, bool servers);
dig_lookup_t *
make_empty_lookup(void);
dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
clone_lookup(dig_lookup_t *lookold, bool servers);
dig_server_t *
make_server(const char *servname, const char *userarg);
@@ -376,7 +379,7 @@ set_search_domain(char *domain);
* then assigned to the appropriate function pointer
*/
extern isc_result_t
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers);
/*%<
* Print the final result of the lookup.
*/
@@ -418,7 +421,7 @@ dig_setup(int argc, char **argv);
* Call to supply new parameters for the next lookup
*/
void
dig_query_setup(isc_boolean_t, isc_boolean_t, int argc, char **argv);
dig_query_setup(bool, bool, int argc, char **argv);
/*%<
* set the main application event cycle running
+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
+88 -92
View File
@@ -11,6 +11,8 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
@@ -53,18 +55,18 @@
#endif
#endif
static isc_boolean_t short_form = ISC_TRUE,
tcpmode = ISC_FALSE, tcpmode_set = ISC_FALSE,
identify = ISC_FALSE, stats = ISC_TRUE,
comments = ISC_TRUE, section_question = ISC_TRUE,
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
section_additional = ISC_TRUE, recurse = ISC_TRUE,
aaonly = ISC_FALSE, nofail = ISC_TRUE,
default_lookups = ISC_TRUE, a_noanswer = ISC_FALSE;
static bool short_form = true,
tcpmode = false, tcpmode_set = false,
identify = false, stats = true,
comments = true, section_question = true,
section_answer = true, section_authority = true,
section_additional = true, recurse = true,
aaonly = false, nofail = true,
default_lookups = true, a_noanswer = false;
static isc_boolean_t interactive;
static bool interactive;
static isc_boolean_t in_use = ISC_FALSE;
static bool in_use = false;
static char defclass[MXRD] = "IN";
static char deftype[MXRD] = "A";
static isc_event_t *global_event = NULL;
@@ -213,7 +215,7 @@ printrdata(dns_rdata_t *rdata) {
isc_result_t result;
isc_buffer_t *b = NULL;
unsigned int size = 1024;
isc_boolean_t done = ISC_FALSE;
bool done = false;
if (rdata->type < N_KNOWN_RRTYPES)
printf("%s", rtypetext[rdata->type]);
@@ -228,7 +230,7 @@ printrdata(dns_rdata_t *rdata) {
if (result == ISC_R_SUCCESS) {
printf("%.*s\n", (int)isc_buffer_usedlength(b),
(char *)isc_buffer_base(b));
done = ISC_TRUE;
done = true;
} else if (result != ISC_R_NOSPACE)
check_result(result, "dns_rdata_totext");
isc_buffer_free(&b);
@@ -237,7 +239,7 @@ printrdata(dns_rdata_t *rdata) {
}
static isc_result_t
printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
printsection(dig_query_t *query, dns_message_t *msg, bool headers,
dns_section_t section) {
isc_result_t result, loopresult;
dns_name_t *name;
@@ -304,7 +306,7 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
}
static isc_result_t
detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
detailsection(dig_query_t *query, dns_message_t *msg, bool headers,
dns_section_t section) {
isc_result_t result, loopresult;
dns_name_t *name;
@@ -429,7 +431,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
}
static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
char servtext[ISC_SOCKADDR_FORMATSIZE];
/* I've we've gotten this far, we've reached a server. */
@@ -448,10 +450,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
if (!short_form) {
puts("------------");
/* detailheader(query, msg);*/
detailsection(query, msg, ISC_TRUE, DNS_SECTION_QUESTION);
detailsection(query, msg, ISC_TRUE, DNS_SECTION_ANSWER);
detailsection(query, msg, ISC_TRUE, DNS_SECTION_AUTHORITY);
detailsection(query, msg, ISC_TRUE, DNS_SECTION_ADDITIONAL);
detailsection(query, msg, true, DNS_SECTION_QUESTION);
detailsection(query, msg, true, DNS_SECTION_ANSWER);
detailsection(query, msg, true, DNS_SECTION_AUTHORITY);
detailsection(query, msg, true, DNS_SECTION_ADDITIONAL);
puts("------------");
}
@@ -479,12 +481,12 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, ISC_FALSE);
lookup = clone_lookup(query->lookup, false);
if (lookup != NULL) {
strlcpy(lookup->textname, namestr,
sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
lookup->origin = NULL;
lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -498,7 +500,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
printsection(query, msg, headers, DNS_SECTION_ANSWER);
else {
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
a_noanswer = ISC_TRUE;
a_noanswer = true;
else if (!default_lookups ||
(query->lookup->rdtype == dns_rdatatype_aaaa &&
@@ -520,7 +522,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
}
static void
show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
show_settings(bool full, bool serv_only) {
dig_server_t *srv;
isc_sockaddr_t sockaddr;
dig_searchlist_t *listent;
@@ -565,7 +567,7 @@ show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
printf("\n");
}
static isc_boolean_t
static bool
testtype(char *typetext) {
isc_result_t result;
isc_textregion_t tr;
@@ -575,14 +577,14 @@ testtype(char *typetext) {
tr.length = strlen(typetext);
result = dns_rdatatype_fromtext(&rdtype, &tr);
if (result == ISC_R_SUCCESS)
return (ISC_TRUE);
return (true);
else {
printf("unknown query type: %s\n", typetext);
return (ISC_FALSE);
return (false);
}
}
static isc_boolean_t
static bool
testclass(char *typetext) {
isc_result_t result;
isc_textregion_t tr;
@@ -592,24 +594,24 @@ testclass(char *typetext) {
tr.length = strlen(typetext);
result = dns_rdataclass_fromtext(&rdclass, &tr);
if (result == ISC_R_SUCCESS)
return (ISC_TRUE);
return (true);
else {
printf("unknown query class: %s\n", typetext);
return (ISC_FALSE);
return (false);
}
}
static void
set_port(const char *value) {
isc_uint32_t n;
uint32_t n;
isc_result_t result = parse_uint(&n, value, 65535, "port");
if (result == ISC_R_SUCCESS)
port = (isc_uint16_t) n;
port = (uint16_t) n;
}
static void
set_timeout(const char *value) {
isc_uint32_t n;
uint32_t n;
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
if (result == ISC_R_SUCCESS)
timeout = n;
@@ -617,7 +619,7 @@ set_timeout(const char *value) {
static void
set_tries(const char *value) {
isc_uint32_t n;
uint32_t n;
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
if (result == ISC_R_SUCCESS)
tries = n;
@@ -625,7 +627,7 @@ set_tries(const char *value) {
static void
set_ndots(const char *value) {
isc_uint32_t n;
uint32_t n;
isc_result_t result = parse_uint(&n, value, 128, "ndots");
if (result == ISC_R_SUCCESS)
ndots = n;
@@ -644,7 +646,7 @@ setoption(char *opt) {
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
if (CHECKOPT("all", 3)) {
show_settings(ISC_TRUE, ISC_FALSE);
show_settings(true, false);
} else if (strncasecmp(opt, "class=", 6) == 0) {
if (testclass(&opt[6]))
strlcpy(defclass, &opt[6], sizeof(defclass));
@@ -654,41 +656,41 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "type=", 5) == 0) {
if (testtype(&opt[5])) {
strlcpy(deftype, &opt[5], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "ty=", 3) == 0) {
if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "querytype=", 10) == 0) {
if (testtype(&opt[10])) {
strlcpy(deftype, &opt[10], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "query=", 6) == 0) {
if (testtype(&opt[6])) {
strlcpy(deftype, &opt[6], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "qu=", 3) == 0) {
if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "q=", 2) == 0) {
if (testtype(&opt[2])) {
strlcpy(deftype, &opt[2], sizeof(deftype));
default_lookups = ISC_FALSE;
default_lookups = false;
}
} else if (strncasecmp(opt, "domain=", 7) == 0) {
strlcpy(domainopt, &opt[7], sizeof(domainopt));
set_search_domain(domainopt);
usesearch = ISC_TRUE;
usesearch = true;
} else if (strncasecmp(opt, "do=", 3) == 0) {
strlcpy(domainopt, &opt[3], sizeof(domainopt));
set_search_domain(domainopt);
usesearch = ISC_TRUE;
usesearch = true;
} else if (strncasecmp(opt, "port=", 5) == 0) {
set_port(&opt[5]);
} else if (strncasecmp(opt, "po=", 3) == 0) {
@@ -698,43 +700,43 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "t=", 2) == 0) {
set_timeout(&opt[2]);
} else if (CHECKOPT("recurse", 3)) {
recurse = ISC_TRUE;
recurse = true;
} else if (CHECKOPT("norecurse", 5)) {
recurse = ISC_FALSE;
recurse = false;
} else if (strncasecmp(opt, "retry=", 6) == 0) {
set_tries(&opt[6]);
} else if (strncasecmp(opt, "ret=", 4) == 0) {
set_tries(&opt[4]);
} else if (CHECKOPT("defname", 3)) {
usesearch = ISC_TRUE;
usesearch = true;
} else if (CHECKOPT("nodefname", 5)) {
usesearch = ISC_FALSE;
usesearch = false;
} else if (CHECKOPT("vc", 2)) {
tcpmode = ISC_TRUE;
tcpmode_set = ISC_TRUE;
tcpmode = true;
tcpmode_set = true;
} else if (CHECKOPT("novc", 4)) {
tcpmode = ISC_FALSE;
tcpmode_set = ISC_TRUE;
tcpmode = false;
tcpmode_set = true;
} else if (CHECKOPT("debug", 3)) {
short_form = ISC_FALSE;
showsearch = ISC_TRUE;
short_form = false;
showsearch = true;
} else if (CHECKOPT("nodebug", 5)) {
short_form = ISC_TRUE;
showsearch = ISC_FALSE;
short_form = true;
showsearch = false;
} else if (CHECKOPT("d2", 2)) {
debugging = ISC_TRUE;
debugging = true;
} else if (CHECKOPT("nod2", 4)) {
debugging = ISC_FALSE;
debugging = false;
} else if (CHECKOPT("search", 3)) {
usesearch = ISC_TRUE;
usesearch = true;
} else if (CHECKOPT("nosearch", 5)) {
usesearch = ISC_FALSE;
usesearch = false;
} else if (CHECKOPT("sil", 3)) {
/* deprecation_msg = ISC_FALSE; */
/* deprecation_msg = false; */
} else if (CHECKOPT("fail", 3)) {
nofail=ISC_FALSE;
nofail=false;
} else if (CHECKOPT("nofail", 5)) {
nofail=ISC_TRUE;
nofail=true;
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
set_ndots(&opt[6]);
} else {
@@ -753,7 +755,7 @@ addlookup(char *opt) {
debug("addlookup()");
a_noanswer = ISC_FALSE;
a_noanswer = false;
tr.base = deftype;
tr.length = strlen(deftype);
@@ -770,21 +772,21 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
if (get_reverse(store, sizeof(store), opt, true)
== ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
} else {
strlcpy(lookup->textname, opt, sizeof(lookup->textname));
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
lookup->rdtypeset = true;
}
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
lookup->trace = ISC_FALSE;
lookup->rdclassset = true;
lookup->trace = false;
lookup->trace_root = lookup->trace;
lookup->ns_search_only = ISC_FALSE;
lookup->ns_search_only = false;
lookup->identify = identify;
lookup->recurse = recurse;
lookup->aaonly = aaonly;
@@ -792,7 +794,7 @@ addlookup(char *opt) {
lookup->udpsize = 0;
lookup->comments = comments;
if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode = true;
else
lookup->tcp_mode = tcpmode;
lookup->stats = stats;
@@ -800,9 +802,9 @@ addlookup(char *opt) {
lookup->section_answer = section_answer;
lookup->section_authority = section_authority;
lookup->section_additional = section_additional;
lookup->new_search = ISC_TRUE;
lookup->new_search = true;
if (nofail)
lookup->servfail_stops = ISC_FALSE;
lookup->servfail_stops = false;
ISC_LIST_INIT(lookup->q);
ISC_LINK_INIT(lookup, link);
ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -826,11 +828,11 @@ do_next_command(char *input) {
(strcasecmp(ptr, "lserver") == 0)) {
isc_app_block();
set_nameserver(arg);
check_ra = ISC_FALSE;
check_ra = false;
isc_app_unblock();
show_settings(ISC_TRUE, ISC_TRUE);
show_settings(true, true);
} else if (strcasecmp(ptr, "exit") == 0) {
in_use = ISC_FALSE;
in_use = false;
} else if (strcasecmp(ptr, "help") == 0 ||
strcasecmp(ptr, "?") == 0) {
printf("The '%s' command is not yet implemented.\n", ptr);
@@ -867,7 +869,7 @@ get_next_command(void) {
ptr = fgets(buf, COMMSIZE, stdin);
isc_app_unblock();
if (ptr == NULL) {
in_use = ISC_FALSE;
in_use = false;
} else
do_next_command(ptr);
#ifdef HAVE_READLINE
@@ -879,9 +881,9 @@ get_next_command(void) {
static void
parse_args(int argc, char **argv) {
isc_boolean_t have_lookup = ISC_FALSE;
bool have_lookup = false;
usesearch = ISC_TRUE;
usesearch = true;
for (argc--, argv++; argc > 0; argc--, argv++) {
debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') {
@@ -891,15 +893,15 @@ parse_args(int argc, char **argv) {
} else if (argv[0][1] != 0) {
setoption(&argv[0][1]);
} else
have_lookup = ISC_TRUE;
have_lookup = true;
} else {
if (!have_lookup) {
have_lookup = ISC_TRUE;
in_use = ISC_TRUE;
have_lookup = true;
in_use = true;
addlookup(argv[0]);
} else {
set_nameserver(argv[0]);
check_ra = ISC_FALSE;
check_ra = false;
}
}
}
@@ -921,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;
@@ -970,13 +966,13 @@ int
main(int argc, char **argv) {
isc_result_t result;
interactive = ISC_TF(isatty(0));
interactive = isatty(0);
ISC_LIST_INIT(lookup_list);
ISC_LIST_INIT(server_list);
ISC_LIST_INIT(search_list);
check_ra = ISC_TRUE;
check_ra = true;
/* setup dighost callbacks */
dighost_printmessage = printmessage;
@@ -990,7 +986,7 @@ main(int argc, char **argv) {
setup_libs();
progname = argv[0];
setup_system(ISC_FALSE, ISC_FALSE);
setup_system(false, false);
parse_args(argc, argv);
if (keyfile[0] != 0)
setup_file_key();
@@ -1004,7 +1000,7 @@ main(int argc, char **argv) {
else
result = isc_app_onrun(mctx, global_task, getinput, NULL);
check_result(result, "isc_app_onrun");
in_use = ISC_TF(!in_use);
in_use = !in_use;
(void)isc_app_run();
+16
View File
@@ -478,6 +478,22 @@ nslookup -query=hinfo -timeout=10
</para>
</refsection>
<refsection><info><title>IDN SUPPORT</title></info>
<para>
If <command>nslookup</command> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<command>nslookup</command> 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 <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>nslookup</command> runs or when the standard output is not
a tty.
</para>
</refsection>
<refsection><info><title>FILES</title></info>
<para><filename>/etc/resolv.conf</filename>
+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)
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+2 -2
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -77,7 +77,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+8 -9
View File
@@ -15,15 +15,14 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
-DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
@@ -116,12 +115,12 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: ${TARGETS} installdirs
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done
uninstall::
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t ; done
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done
clean distclean::
rm -f ${TARGETS}
+1 -1
View File
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
.sp
The
\fIalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST, or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
.RE
.PP
\-c \fIclass\fR
+52 -50
View File
@@ -19,6 +19,8 @@
#include <config.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/buffer.h>
@@ -53,14 +55,14 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-cds";
@@ -84,7 +86,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
* from -a arguments. The size of the array is an arbitrary limit.
*/
static isc_uint8_t dtype[8];
static uint8_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
@@ -127,7 +129,7 @@ static int nkey; /* number of child zone DNSKEY records */
typedef struct keyinfo {
dns_rdata_t rdata;
dst_key_t *dst;
isc_uint8_t algo;
uint8_t algo;
dns_keytag_t tag;
} keyinfo_t;
@@ -161,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);
}
}
@@ -258,7 +260,7 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
isc_result_totext(result));
}
result = dns_db_findnode(*dbp, name, ISC_FALSE, nodep);
result = dns_db_findnode(*dbp, name, false, nodep);
if (result != ISC_R_SUCCESS) {
fatal("can't find %s node in %s", namestr, filename);
}
@@ -312,7 +314,7 @@ get_dsset_name(char *filename, size_t size,
}
isc_buffer_putstr(&buf, prefix);
result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
result = dns_name_tofilenametext(name, false, &buf);
check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0) {
fatal("%s: pathname too long", path);
@@ -400,7 +402,7 @@ formatset(dns_rdataset_t *rdataset) {
static void
write_parent_set(const char *path, const char *inplace,
isc_boolean_t nsupdate, dns_rdataset_t *rdataset)
bool nsupdate, dns_rdataset_t *rdataset)
{
isc_result_t result;
isc_buffer_t *buf = NULL;
@@ -467,7 +469,7 @@ typedef enum { LOOSE, TIGHT } strictness_t;
/*
* Find out if any (C)DS record matches a particular (C)DNSKEY.
*/
static isc_boolean_t
static bool
match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
{
isc_result_t result;
@@ -481,7 +483,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_t newdsrdata = DNS_RDATA_INIT;
dns_rdatatype_t keytype;
isc_boolean_t c;
bool c;
dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
@@ -511,13 +513,13 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
vbprintf(1, "found matching %s %d %d %d\n",
c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type);
return (ISC_TRUE);
return (true);
} else if (strictness == TIGHT) {
vbprintf(0, "key does not match %s %d %d %d "
"when it looks like it should\n",
c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type);
return (ISC_FALSE);
return (false);
}
}
@@ -528,7 +530,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
? "CDNSKEY" : "DNSKEY",
ki->tag, ki->algo);
return (ISC_FALSE);
return (false);
}
/*
@@ -617,12 +619,12 @@ free_keytable(keyinfo_t **keytable_p) {
* otherwise the key algorithm. This is used by the signature coverage
* check functions below.
*/
static isc_uint8_t *
static uint8_t *
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
dns_rdataset_t *sigset)
{
isc_result_t result;
isc_uint8_t *algo;
uint8_t *algo;
int i;
algo = isc_mem_get(mctx, nkey);
@@ -668,7 +670,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
}
result = dns_dnssec_verify(name, rdataset, ki->dst,
ISC_FALSE, 0, mctx,
false, 0, mctx,
&sigrdata, NULL);
if (result != ISC_R_SUCCESS &&
@@ -704,13 +706,13 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
* Consume the result of matching_sigs(). When checking records
* fetched from the child zone, any working signature is enough.
*/
static isc_boolean_t
signed_loose(isc_uint8_t *algo) {
isc_boolean_t ok = ISC_FALSE;
static bool
signed_loose(uint8_t *algo) {
bool ok = false;
int i;
for (i = 0; i < nkey; i++) {
if (algo[i] != 0) {
ok = ISC_TRUE;
ok = true;
}
}
isc_mem_put(mctx, algo, nkey);
@@ -723,10 +725,10 @@ signed_loose(isc_uint8_t *algo) {
* key algorithm in the DS RRset must have a signature in the DNSKEY
* RRset.
*/
static isc_boolean_t
signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
static bool
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
isc_result_t result;
isc_boolean_t all_ok = ISC_TRUE;
bool all_ok = true;
for (result = dns_rdataset_first(dsset);
result == ISC_R_SUCCESS;
@@ -734,23 +736,23 @@ signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
{
dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_ds_t ds;
isc_boolean_t ds_ok;
bool ds_ok;
int i;
dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
check_result(result, "dns_rdata_tostruct(DS)");
ds_ok = ISC_FALSE;
ds_ok = false;
for (i = 0; i < nkey; i++) {
if (algo[i] == ds.algorithm) {
ds_ok = ISC_TRUE;
ds_ok = true;
}
}
if (!ds_ok) {
vbprintf(0, "missing signature for algorithm %d "
"(key %d)\n", ds.algorithm, ds.key_tag);
all_ok = ISC_FALSE;
all_ok = false;
}
}
@@ -848,14 +850,14 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
*/
static int
cmp_dtype(const void *ap, const void *bp) {
int a = *(const isc_uint8_t *)ap;
int b = *(const isc_uint8_t *)bp;
int a = *(const uint8_t *)ap;
int b = *(const uint8_t *)bp;
return (a - b);
}
static void
add_dtype(const char *dn) {
isc_uint8_t dt;
uint8_t dt;
unsigned i, n;
dt = strtodsdigest(dn);
@@ -872,7 +874,7 @@ add_dtype(const char *dn) {
static void
make_new_ds_set(ds_maker_func_t *ds_from_rdata,
isc_uint32_t ttl, dns_rdataset_t *rdset)
uint32_t ttl, dns_rdataset_t *rdset)
{
unsigned int size = 16;
for (;;) {
@@ -934,14 +936,14 @@ rdata_cmp(const void *rdata1, const void *rdata2) {
* Ensure that every key identified by the DS RRset has the same set of
* digest types.
*/
static isc_boolean_t
static bool
consistent_digests(dns_rdataset_t *dsset) {
isc_result_t result;
dns_rdata_t *arrdata;
dns_rdata_ds_t *ds;
dns_keytag_t key_tag;
isc_uint8_t algorithm;
isc_boolean_t match;
uint8_t algorithm;
bool match;
int i, j, n, d;
/*
@@ -995,7 +997,7 @@ consistent_digests(dns_rdataset_t *dsset) {
/*
* Check subsequent keys match the first one
*/
match = ISC_TRUE;
match = true;
while (i < n) {
key_tag = ds[i].key_tag;
algorithm = ds[i].algorithm;
@@ -1004,7 +1006,7 @@ consistent_digests(dns_rdataset_t *dsset) {
ds[i+j].algorithm != algorithm ||
ds[i+j].digest_type != ds[j].digest_type)
{
match = ISC_FALSE;
match = false;
}
}
i += d;
@@ -1039,7 +1041,7 @@ print_diff(const char *cmd, dns_rdataset_t *rdataset) {
}
static void
update_diff(const char *cmd, isc_uint32_t ttl,
update_diff(const char *cmd, uint32_t ttl,
dns_rdataset_t *addset, dns_rdataset_t *delset)
{
isc_result_t result;
@@ -1047,7 +1049,7 @@ update_diff(const char *cmd, isc_uint32_t ttl,
dns_dbnode_t *node;
dns_dbversion_t *ver;
dns_rdataset_t diffset;
isc_uint32_t save;
uint32_t save;
db = NULL;
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
@@ -1059,7 +1061,7 @@ update_diff(const char *cmd, isc_uint32_t ttl,
check_result(result, "dns_db_newversion()");
node = NULL;
result = dns_db_findnode(db, name, ISC_TRUE, &node);
result = dns_db_findnode(db, name, true, &node);
check_result(result, "dns_db_findnode()");
dns_rdataset_init(&diffset);
@@ -1083,12 +1085,12 @@ update_diff(const char *cmd, isc_uint32_t ttl,
}
dns_db_detachnode(db, &node);
dns_db_closeversion(db, &ver, ISC_FALSE);
dns_db_closeversion(db, &ver, false);
dns_db_detach(&db);
}
static void
nsdiff(isc_uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
if (ttl == 0) {
vbprintf(1, "warning: no TTL in nsupdate script\n");
}
@@ -1115,7 +1117,7 @@ usage(void) {
program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / GOST / SHA-384)\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / SHA-384)\n"
" -c <class> of domain (default IN)\n"
" -D prefer CDNSKEY records instead of CDS\n"
" -d <file|dir> where to find parent dsset- file\n"
@@ -1136,9 +1138,9 @@ main(int argc, char *argv[]) {
const char *ds_path = NULL;
const char *inplace = NULL;
isc_result_t result;
isc_boolean_t prefer_cdnskey = ISC_FALSE;
isc_boolean_t nsupdate = ISC_FALSE;
isc_uint32_t ttl = 0;
bool prefer_cdnskey = false;
bool nsupdate = false;
uint32_t ttl = 0;
int ch;
char *endp;
@@ -1147,12 +1149,12 @@ main(int argc, char *argv[]) {
fatal("out of memory");
}
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
@@ -1164,7 +1166,7 @@ main(int argc, char *argv[]) {
rdclass = strtoclass(isc_commandline_argument);
break;
case 'D':
prefer_cdnskey = ISC_TRUE;
prefer_cdnskey = true;
break;
case 'd':
ds_path = isc_commandline_argument;
@@ -1197,7 +1199,7 @@ main(int argc, char *argv[]) {
ttl = strtottl(isc_commandline_argument);
break;
case 'u':
nsupdate = ISC_TRUE;
nsupdate = true;
break;
case 'V':
/* Does not return. */
+1 -1
View File
@@ -144,7 +144,7 @@
</para>
<para>
The <replaceable>algorithm</replaceable> must be one of SHA-1
(SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified,
the default is SHA-256.
</para>
+1 -1
View File
@@ -130,7 +130,7 @@
</p>
<p>
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
(SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified,
the default is SHA-256.
</p>
+1 -1
View File
@@ -64,7 +64,7 @@ Use SHA\-256 as the digest algorithm\&.
.RS 4
Select the digest algorithm\&. The value of
\fBalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384)\&. These values are case insensitive\&.
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&.
.RE
.PP
\-C
+25 -23
View File
@@ -13,6 +13,8 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/buffer.h>
@@ -41,14 +43,14 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-dsfromkey";
@@ -58,8 +60,8 @@ static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;
static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL;
static isc_uint32_t ttl;
static isc_boolean_t emitttl = ISC_FALSE;
static uint32_t ttl;
static bool emitttl = false;
static isc_result_t
initname(char *setname) {
@@ -118,7 +120,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
isc_result_totext(result));
}
result = dns_db_findnode(db, name, ISC_FALSE, &node);
result = dns_db_findnode(db, name, false, &node);
if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename);
@@ -159,7 +161,7 @@ loadkeyset(char *dirname, dns_rdataset_t *rdataset) {
return (ISC_R_NOSPACE);
isc_buffer_putstr(&buf, "keyset-");
result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
result = dns_name_tofilenametext(name, false, &buf);
check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0)
return (ISC_R_NOSPACE);
@@ -233,8 +235,8 @@ logkey(dns_rdata_t *rdata)
}
static void
emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
isc_boolean_t cds, dns_rdata_t *rdata)
emit(unsigned int dtype, bool showall, char *lookaside,
bool cds, dns_rdata_t *rdata)
{
isc_result_t result;
unsigned char buf[DNS_DS_BUFFERSIZE];
@@ -263,7 +265,7 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
if (result != ISC_R_SUCCESS)
fatal("can't build record");
result = dns_name_totext(name, ISC_FALSE, &nameb);
result = dns_name_totext(name, false, &nameb);
if (result != ISC_R_SUCCESS)
fatal("can't print name");
@@ -352,10 +354,10 @@ main(int argc, char **argv) {
char *endp;
int ch;
unsigned int dtype = DNS_DSDIGEST_SHA1;
isc_boolean_t cds = ISC_FALSE;
isc_boolean_t both = ISC_TRUE;
isc_boolean_t usekeyset = ISC_FALSE;
isc_boolean_t showall = ISC_FALSE;
bool cds = false;
bool both = true;
bool usekeyset = false;
bool showall = false;
isc_result_t result;
isc_log_t *log = NULL;
dns_rdataset_t rdataset;
@@ -370,36 +372,36 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) {
case '1':
dtype = DNS_DSDIGEST_SHA1;
both = ISC_FALSE;
both = false;
break;
case '2':
dtype = DNS_DSDIGEST_SHA256;
both = ISC_FALSE;
both = false;
break;
case 'A':
showall = ISC_TRUE;
showall = true;
break;
case 'a':
dtype = strtodsdigest(isc_commandline_argument);
both = ISC_FALSE;
both = false;
break;
case 'C':
if (lookaside != NULL)
fatal("lookaside and CDS are mutually"
" exclusive");
cds = ISC_TRUE;
cds = true;
break;
case 'c':
classname = isc_commandline_argument;
@@ -425,10 +427,10 @@ main(int argc, char **argv) {
fatal("lookaside must be a non-empty string");
break;
case 's':
usekeyset = ISC_TRUE;
usekeyset = true;
break;
case 'T':
emitttl = ISC_TRUE;
emitttl = true;
ttl = strtottl(isc_commandline_argument);
break;
case 'v':
@@ -466,7 +468,7 @@ main(int argc, char **argv) {
/* When not using -f, -A is implicit */
if (filename == NULL)
showall = ISC_TRUE;
showall = true;
if (argc < isc_commandline_index + 1 && filename == NULL)
fatal("the key file name was not specified");
+1 -1
View File
@@ -117,7 +117,7 @@
<para>
Select the digest algorithm. The value of
<option>algorithm</option> must be one of SHA-1 (SHA1),
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
SHA-256 (SHA256) or SHA-384 (SHA384).
These values are case insensitive.
</para>
</listitem>
+1 -1
View File
@@ -97,7 +97,7 @@
<p>
Select the digest algorithm. The value of
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
SHA-256 (SHA256) or SHA-384 (SHA384).
These values are case insensitive.
</p>
</dd>
+12 -11
View File
@@ -13,6 +13,7 @@
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/buffer.h>
@@ -41,14 +42,14 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-importkey";
@@ -58,13 +59,13 @@ static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;
static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL;
static isc_boolean_t setpub = ISC_FALSE, setdel = ISC_FALSE;
static isc_boolean_t setttl = ISC_FALSE;
static bool setpub = false, setdel = false;
static bool setttl = false;
static isc_stdtime_t pub = 0, del = 0;
static dns_ttl_t ttl = 0;
static isc_stdtime_t syncadd = 0, syncdel = 0;
static isc_boolean_t setsyncadd = ISC_FALSE;
static isc_boolean_t setsyncdel = ISC_FALSE;
static bool setsyncadd = false;
static bool setsyncdel = false;
static isc_result_t
initname(char *setname) {
@@ -124,7 +125,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
isc_result_totext(result));
}
result = dns_db_findnode(db, name, ISC_FALSE, &node);
result = dns_db_findnode(db, name, false, &node);
if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename);
@@ -226,7 +227,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
dst_key_free(&tmp);
}
dst_key_setexternal(key, ISC_TRUE);
dst_key_setexternal(key, true);
if (setpub)
dst_key_settime(key, DST_TIME_PUBLISH, pub);
if (setdel)
@@ -310,12 +311,12 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
@@ -346,7 +347,7 @@ main(int argc, char **argv) {
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = ISC_TRUE;
setttl = true;
break;
case 'P':
/* -Psync ? */
+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, ECCGOST, 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
+33 -58
View File
@@ -14,6 +14,8 @@
#include <config.h>
#include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/buffer.h>
@@ -37,7 +39,7 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -62,19 +64,16 @@ 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"
" RSASHA256 | RSASHA512 | ECCGOST |\n"
" RSA | RSAMD5 | DH | RSASHA1 |\n"
" NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 |\n"
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -c class (default: IN)\n");
fprintf(stderr, " -E <engine>:\n");
#if HAVE_PKCS11
#if USE_PKCS11
fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif
@@ -124,19 +123,15 @@ main(int argc, char **argv) {
const char *directory = NULL;
const char *predecessor = NULL;
dst_key_t *prevkey = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char *classname = NULL;
char *endp;
dst_key_t *key = NULL;
dns_fixedname_t fname;
dns_name_t *name;
isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
uint16_t flags = 0, kskflag = 0, revflag = 0;
dns_secalg_t alg;
isc_boolean_t oldstyle = ISC_FALSE;
bool oldstyle = false;
isc_mem_t *mctx = NULL;
int ch;
int protocol = -1, signatory = 0;
@@ -153,32 +148,32 @@ main(int argc, char **argv) {
isc_stdtime_t inactive = 0, deltime = 0;
isc_stdtime_t now;
int prepub = -1;
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
isc_boolean_t unsetdel = ISC_FALSE;
isc_boolean_t genonly = ISC_FALSE;
isc_boolean_t use_nsec3 = ISC_FALSE;
isc_boolean_t avoid_collisions = ISC_TRUE;
isc_boolean_t exact;
bool setpub = false, setact = false;
bool setrev = false, setinact = false;
bool setdel = false, setttl = false;
bool unsetpub = false, unsetact = false;
bool unsetrev = false, unsetinact = false;
bool unsetdel = false;
bool genonly = false;
bool use_nsec3 = false;
bool avoid_collisions = true;
bool exact;
unsigned char c;
isc_stdtime_t syncadd = 0, syncdel = 0;
isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
bool unsetsyncadd = false, setsyncadd = false;
bool unsetsyncdel = false, setsyncdel = false;
if (argc == 1)
usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
isc_stdtime_get(&now);
@@ -186,13 +181,13 @@ main(int argc, char **argv) {
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
case '3':
use_nsec3 = ISC_TRUE;
use_nsec3 = true;
break;
case 'a':
algname = isc_commandline_argument;
break;
case 'C':
oldstyle = ISC_TRUE;
oldstyle = true;
break;
case 'c':
classname = isc_commandline_argument;
@@ -222,7 +217,7 @@ main(int argc, char **argv) {
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = ISC_TRUE;
setttl = true;
break;
case 'l':
label = isc_mem_strdup(mctx, isc_commandline_argument);
@@ -245,10 +240,10 @@ main(int argc, char **argv) {
fatal("-v must be followed by a number");
break;
case 'y':
avoid_collisions = ISC_FALSE;
avoid_collisions = false;
break;
case 'G':
genonly = ISC_TRUE;
genonly = true;
break;
case 'P':
/* -Psync ? */
@@ -388,20 +383,10 @@ main(int argc, char **argv) {
}
if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
if (freeit != NULL)
free(freeit);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
#endif
if (freeit != NULL)
free(freeit);
return (1);
@@ -417,17 +402,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:
@@ -460,14 +440,14 @@ main(int argc, char **argv) {
"prepublication interval.");
if (!setpub && !setact) {
setpub = setact = ISC_TRUE;
setpub = setact = true;
publish = now;
activate = now + prepub;
} else if (setpub && !setact) {
setact = ISC_TRUE;
setact = true;
activate = publish + prepub;
} else if (setact && !setpub) {
setpub = ISC_TRUE;
setpub = true;
publish = activate - prepub;
}
@@ -513,11 +493,6 @@ main(int argc, char **argv) {
alg = dst_key_alg(prevkey);
flags = dst_key_flags(prevkey);
#ifdef PK11_MD5_DISABLE
if (alg == DST_ALG_RSAMD5)
fatal("Key %s uses disabled RSAMD5", predecessor);
#endif
dst_key_format(prevkey, keystr, sizeof(keystr));
dst_key_getprivateformat(prevkey, &major, &minor);
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
@@ -555,7 +530,7 @@ main(int argc, char **argv) {
"You can use dnssec-settime -D to "
"change this.\n", program, keystr);
setpub = setact = ISC_TRUE;
setpub = setact = true;
}
if (nametype == NULL) {
@@ -607,7 +582,7 @@ main(int argc, char **argv) {
/* associate the key */
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
#if HAVE_PKCS11
#if USE_PKCS11
"pkcs11",
#else
engine,
+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, ECCGOST,
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, ECCGOST,
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, ECCGOST, 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
+42 -88
View File
@@ -28,6 +28,8 @@
#include <config.h>
#include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
@@ -52,7 +54,7 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -77,9 +79,9 @@ 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, " RSASHA256 | RSASHA512 | ECCGOST |\n");
fprintf(stderr, " RSA | RSAMD5 | RSASHA1 | NSEC3RSASHA1"
" |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
@@ -90,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");
@@ -106,12 +104,9 @@ usage(void) {
fprintf(stderr, " -c <class>: (default: IN)\n");
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
fprintf(stderr, " -E <engine>:\n");
#if HAVE_PKCS11
#if USE_PKCS11
fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif
@@ -162,11 +157,6 @@ usage(void) {
exit (-1);
}
static isc_boolean_t
dsa_size_ok(int size) {
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
}
static void
progress(int p)
{
@@ -201,10 +191,10 @@ main(int argc, char **argv) {
dst_key_t *key = NULL;
dns_fixedname_t fname;
dns_name_t *name;
isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
uint16_t flags = 0, kskflag = 0, revflag = 0;
dns_secalg_t alg;
isc_boolean_t conflict = ISC_FALSE, null_key = ISC_FALSE;
isc_boolean_t oldstyle = ISC_FALSE;
bool conflict = false, null_key = false;
bool oldstyle = false;
isc_mem_t *mctx = NULL;
int ch, generator = 0, param = 0;
int protocol = -1, size = -1, signatory = 0;
@@ -216,43 +206,39 @@ main(int argc, char **argv) {
dst_key_t *prevkey = NULL;
isc_buffer_t buf;
isc_log_t *log = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
dns_rdataclass_t rdclass;
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
int dbits = 0;
dns_ttl_t ttl = 0;
isc_boolean_t use_nsec3 = ISC_FALSE;
bool use_nsec3 = false;
isc_stdtime_t publish = 0, activate = 0, revokekey = 0;
isc_stdtime_t inactive = 0, deltime = 0;
isc_stdtime_t now;
int prepub = -1;
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
isc_boolean_t unsetdel = ISC_FALSE;
isc_boolean_t genonly = ISC_FALSE;
isc_boolean_t quiet = ISC_FALSE;
isc_boolean_t show_progress = ISC_FALSE;
bool setpub = false, setact = false;
bool setrev = false, setinact = false;
bool setdel = false, setttl = false;
bool unsetpub = false, unsetact = false;
bool unsetrev = false, unsetinact = false;
bool unsetdel = false;
bool genonly = false;
bool quiet = false;
bool show_progress = false;
unsigned char c;
isc_stdtime_t syncadd = 0, syncdel = 0;
isc_boolean_t setsyncadd = ISC_FALSE;
isc_boolean_t setsyncdel = ISC_FALSE;
bool setsyncadd = false;
bool setsyncdel = false;
if (argc == 1)
usage();
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
/*
* Process memory debugging argument first.
@@ -277,7 +263,7 @@ main(int argc, char **argv) {
break;
}
}
isc_commandline_reset = ISC_TRUE;
isc_commandline_reset = true;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -286,7 +272,7 @@ main(int argc, char **argv) {
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
case '3':
use_nsec3 = ISC_TRUE;
use_nsec3 = true;
break;
case 'a':
algname = isc_commandline_argument;
@@ -297,7 +283,7 @@ main(int argc, char **argv) {
fatal("-b requires a non-negative number");
break;
case 'C':
oldstyle = ISC_TRUE;
oldstyle = true;
break;
case 'c':
classname = isc_commandline_argument;
@@ -313,7 +299,7 @@ main(int argc, char **argv) {
case 'e':
fprintf(stderr,
"phased-out option -e "
"(was 'use (RSA) large exponent)\n");
"(was 'use (RSA) large exponent')\n");
break;
case 'f':
c = (unsigned char)(isc_commandline_argument[0]);
@@ -345,7 +331,7 @@ main(int argc, char **argv) {
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = ISC_TRUE;
setttl = true;
break;
case 'n':
nametype = isc_commandline_argument;
@@ -359,7 +345,7 @@ main(int argc, char **argv) {
"[0..255]");
break;
case 'q':
quiet = ISC_TRUE;
quiet = true;
break;
case 'r':
fatal("The -r option has been deprecated.\n"
@@ -396,7 +382,7 @@ main(int argc, char **argv) {
/* already the default */
break;
case 'G':
genonly = ISC_TRUE;
genonly = true;
break;
case 'P':
/* -Psync ? */
@@ -490,7 +476,7 @@ main(int argc, char **argv) {
}
if (!isatty(0))
quiet = ISC_TRUE;
quiet = true;
ret = dst_lib_init(mctx, engine);
if (ret != ISC_R_SUCCESS)
@@ -523,23 +509,12 @@ main(int argc, char **argv) {
}
if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
INSIST(freeit == NULL);
return (1);
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
INSIST(freeit == NULL);
return (1);
#endif
} else {
r.base = algname;
r.length = strlen(algname);
@@ -552,27 +527,18 @@ main(int argc, char **argv) {
}
}
#ifdef PK11_MD5_DISABLE
INSIST((alg != DNS_KEYALG_RSAMD5));
#endif
if (!dst_algorithm_supported(alg)) {
fatal("unsupported algorithm: %d", alg);
}
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:
@@ -618,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:
@@ -636,14 +601,14 @@ main(int argc, char **argv) {
"prepublication interval.");
if (!setpub && !setact) {
setpub = setact = ISC_TRUE;
setpub = setact = true;
publish = now;
activate = now + prepub;
} else if (setpub && !setact) {
setact = ISC_TRUE;
setact = true;
activate = publish + prepub;
} else if (setact && !setpub) {
setpub = ISC_TRUE;
setpub = true;
publish = activate - prepub;
}
@@ -729,7 +694,7 @@ main(int argc, char **argv) {
"You can use dnssec-settime -D to "
"change this.\n", program, keystr);
setpub = setact = ISC_TRUE;
setpub = setact = true;
}
switch (alg) {
@@ -748,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;
@@ -828,31 +785,28 @@ main(int argc, char **argv) {
case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256:
case DNS_KEYALG_RSASHA512:
show_progress = ISC_TRUE;
show_progress = true;
break;
case DNS_KEYALG_DH:
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:
case DST_ALG_ED448:
show_progress = ISC_TRUE;
show_progress = true;
break;
}
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
null_key = ISC_TRUE;
null_key = true;
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
do {
conflict = ISC_FALSE;
conflict = false;
if (!quiet && show_progress) {
fprintf(stderr, "Generating key pair.");
@@ -973,7 +927,7 @@ main(int argc, char **argv) {
* or another key being revoked.
*/
if (key_collision(key, name, directory, mctx, NULL)) {
conflict = ISC_TRUE;
conflict = true;
if (null_key) {
dst_key_free(&key);
break;
@@ -994,7 +948,7 @@ main(int argc, char **argv) {
dst_key_free(&key);
}
} while (conflict == ISC_TRUE);
} while (conflict == true);
if (conflict)
fatal("cannot generate a null key due to possible key ID "
+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, ECCGOST,
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, ECCGOST,
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
+12 -17
View File
@@ -13,6 +13,8 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
@@ -30,7 +32,7 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -49,12 +51,9 @@ usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION);
#if HAVE_PKCS11
#if USE_PKCS11
fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " -E engine: specify OpenSSL engine "
"(default \"pkcs11\")\n");
#else
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
#endif
@@ -75,11 +74,7 @@ usage(void) {
int
main(int argc, char **argv) {
isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char const *filename = NULL;
char *dir = NULL;
char newname[1024], oldname[1024];
@@ -87,11 +82,11 @@ main(int argc, char **argv) {
char *endp;
int ch;
dst_key_t *key = NULL;
isc_uint32_t flags;
uint32_t flags;
isc_buffer_t buf;
isc_boolean_t force = ISC_FALSE;
isc_boolean_t removefile = ISC_FALSE;
isc_boolean_t id = ISC_FALSE;
bool force = false;
bool removefile = false;
bool id = false;
if (argc == 1)
usage();
@@ -105,7 +100,7 @@ main(int argc, char **argv) {
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
switch (ch) {
@@ -113,7 +108,7 @@ main(int argc, char **argv) {
engine = isc_commandline_argument;
break;
case 'f':
force = ISC_TRUE;
force = true;
break;
case 'K':
/*
@@ -127,10 +122,10 @@ main(int argc, char **argv) {
}
break;
case 'r':
removefile = ISC_TRUE;
removefile = true;
break;
case 'R':
id = ISC_TRUE;
id = true;
break;
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
+54 -56
View File
@@ -13,6 +13,8 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
@@ -33,7 +35,7 @@
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -53,7 +55,7 @@ usage(void) {
fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "General options:\n");
#if HAVE_PKCS11
#if USE_PKCS11
fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
@@ -102,7 +104,7 @@ usage(void) {
}
static void
printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
printtime(dst_key_t *key, int type, const char *tag, bool epoch,
FILE *stream)
{
isc_result_t result;
@@ -127,11 +129,7 @@ printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
int
main(int argc, char **argv) {
isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
const char *filename = NULL;
char *directory = NULL;
char newname[1024];
@@ -145,29 +143,29 @@ main(int argc, char **argv) {
dns_name_t *name = NULL;
dns_secalg_t alg = 0;
unsigned int size = 0;
isc_uint16_t flags = 0;
uint16_t flags = 0;
int prepub = -1;
dns_ttl_t ttl = 0;
isc_stdtime_t now;
isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0;
isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0;
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
isc_boolean_t unsetdel = ISC_FALSE;
isc_boolean_t printcreate = ISC_FALSE, printpub = ISC_FALSE;
isc_boolean_t printact = ISC_FALSE, printrev = ISC_FALSE;
isc_boolean_t printinact = ISC_FALSE, printdel = ISC_FALSE;
isc_boolean_t force = ISC_FALSE;
isc_boolean_t epoch = ISC_FALSE;
isc_boolean_t changed = ISC_FALSE;
bool setpub = false, setact = false;
bool setrev = false, setinact = false;
bool setdel = false, setttl = false;
bool unsetpub = false, unsetact = false;
bool unsetrev = false, unsetinact = false;
bool unsetdel = false;
bool printcreate = false, printpub = false;
bool printact = false, printrev = false;
bool printinact = false, printdel = false;
bool force = false;
bool epoch = false;
bool changed = false;
isc_log_t *log = NULL;
isc_stdtime_t syncadd = 0, syncdel = 0;
isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
isc_boolean_t printsyncadd = ISC_FALSE, printsyncdel = ISC_FALSE;
bool unsetsyncadd = false, setsyncadd = false;
bool unsetsyncdel = false, setsyncdel = false;
bool printsyncadd = false, printsyncdel = false;
if (argc == 1)
usage();
@@ -178,12 +176,12 @@ main(int argc, char **argv) {
setup_logging(mctx, &log);
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
isc_stdtime_get(&now);
@@ -194,51 +192,51 @@ main(int argc, char **argv) {
engine = isc_commandline_argument;
break;
case 'f':
force = ISC_TRUE;
force = true;
break;
case 'p':
p = isc_commandline_argument;
if (!strcasecmp(p, "all")) {
printcreate = ISC_TRUE;
printpub = ISC_TRUE;
printact = ISC_TRUE;
printrev = ISC_TRUE;
printinact = ISC_TRUE;
printdel = ISC_TRUE;
printsyncadd = ISC_TRUE;
printsyncdel = ISC_TRUE;
printcreate = true;
printpub = true;
printact = true;
printrev = true;
printinact = true;
printdel = true;
printsyncadd = true;
printsyncdel = true;
break;
}
do {
switch (*p++) {
case 'C':
printcreate = ISC_TRUE;
printcreate = true;
break;
case 'P':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncadd = ISC_TRUE;
printsyncadd = true;
break;
}
printpub = ISC_TRUE;
printpub = true;
break;
case 'A':
printact = ISC_TRUE;
printact = true;
break;
case 'R':
printrev = ISC_TRUE;
printrev = true;
break;
case 'I':
printinact = ISC_TRUE;
printinact = true;
break;
case 'D':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncdel = ISC_TRUE;
printsyncdel = true;
break;
}
printdel = ISC_TRUE;
printdel = true;
break;
case ' ':
break;
@@ -249,7 +247,7 @@ main(int argc, char **argv) {
} while (*p != '\0');
break;
case 'u':
epoch = ISC_TRUE;
epoch = true;
break;
case 'K':
/*
@@ -265,7 +263,7 @@ main(int argc, char **argv) {
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = ISC_TRUE;
setttl = true;
break;
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
@@ -279,7 +277,7 @@ main(int argc, char **argv) {
fatal("-P sync specified more than "
"once");
changed = ISC_TRUE;
changed = true;
syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd);
unsetsyncadd = !setsyncadd;
@@ -289,7 +287,7 @@ main(int argc, char **argv) {
if (setpub || unsetpub)
fatal("-P specified more than once");
changed = ISC_TRUE;
changed = true;
pub = strtotime(isc_commandline_argument,
now, now, &setpub);
unsetpub = !setpub;
@@ -298,7 +296,7 @@ main(int argc, char **argv) {
if (setact || unsetact)
fatal("-A specified more than once");
changed = ISC_TRUE;
changed = true;
act = strtotime(isc_commandline_argument,
now, now, &setact);
unsetact = !setact;
@@ -307,7 +305,7 @@ main(int argc, char **argv) {
if (setrev || unsetrev)
fatal("-R specified more than once");
changed = ISC_TRUE;
changed = true;
rev = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
@@ -316,7 +314,7 @@ main(int argc, char **argv) {
if (setinact || unsetinact)
fatal("-I specified more than once");
changed = ISC_TRUE;
changed = true;
inact = strtotime(isc_commandline_argument,
now, now, &setinact);
unsetinact = !setinact;
@@ -328,7 +326,7 @@ main(int argc, char **argv) {
fatal("-D sync specified more than "
"once");
changed = ISC_TRUE;
changed = true;
syncdel = strtotime(isc_commandline_argument,
now, now, &setsyncdel);
unsetsyncdel = !setsyncdel;
@@ -339,7 +337,7 @@ main(int argc, char **argv) {
if (setdel || unsetdel)
fatal("-D specified more than once");
changed = ISC_TRUE;
changed = true;
del = strtotime(isc_commandline_argument,
now, now, &setdel);
unsetdel = !setdel;
@@ -450,7 +448,7 @@ main(int argc, char **argv) {
"before it is scheduled to be "
"inactive.\n", program);
changed = setpub = setact = ISC_TRUE;
changed = setpub = setact = true;
} else {
if (prepub < 0)
prepub = 0;
@@ -462,10 +460,10 @@ main(int argc, char **argv) {
"prepublication interval.");
if (setpub && !setact) {
setact = ISC_TRUE;
setact = true;
act = pub + prepub;
} else if (setact && !setpub) {
setpub = ISC_TRUE;
setpub = true;
pub = act - prepub;
}
@@ -596,11 +594,11 @@ main(int argc, char **argv) {
if (force && !changed) {
dst_key_settime(key, DST_TIME_PUBLISH, now);
dst_key_settime(key, DST_TIME_ACTIVATE, now);
changed = ISC_TRUE;
changed = true;
}
if (!changed && setttl)
changed = ISC_TRUE;
changed = true;
/*
* Print out time values, if -p was used.
File diff suppressed because it is too large Load Diff
+15 -21
View File
@@ -13,6 +13,7 @@
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
@@ -31,7 +32,6 @@
#include <isc/rwlock.h>
#include <isc/serial.h>
#include <isc/stdio.h>
#include <isc/stdlib.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
@@ -58,10 +58,11 @@
#include <dns/result.h>
#include <dns/soa.h>
#include <dns/time.h>
#include <dns/zoneverify.h>
#include <dst/dst.h>
#if HAVE_PKCS11
#if USE_PKCS11
#include <pk11/result.h>
#endif
@@ -77,8 +78,8 @@ static dns_db_t *gdb; /* The database */
static dns_dbversion_t *gversion; /* The database version */
static dns_rdataclass_t gclass; /* The class */
static dns_name_t *gorigin; /* The database origin */
static isc_boolean_t ignore_kskflag = ISC_FALSE;
static isc_boolean_t keyset_kskonly = ISC_FALSE;
static bool ignore_kskflag = false;
static bool keyset_kskonly = false;
/*%
* Load the zone file from disk
@@ -149,12 +150,9 @@ usage(void) {
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
fprintf(stderr, "\t-c class (IN)\n");
fprintf(stderr, "\t-E engine:\n");
#if HAVE_PKCS11
#if USE_PKCS11
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
#endif
@@ -170,11 +168,7 @@ main(int argc, char *argv[]) {
char *inputformatstr = NULL;
isc_result_t result;
isc_log_t *log = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char *classname = NULL;
dns_rdataclass_t rdclass;
char *endp;
@@ -204,19 +198,19 @@ main(int argc, char *argv[]) {
break;
}
}
isc_commandline_reset = ISC_TRUE;
isc_commandline_reset = true;
check_result(isc_app_start(), "isc_app_start");
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if HAVE_PKCS11
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
isc_commandline_errprint = ISC_FALSE;
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
@@ -247,11 +241,11 @@ main(int argc, char *argv[]) {
break;
case 'x':
keyset_kskonly = ISC_TRUE;
keyset_kskonly = true;
break;
case 'z':
ignore_kskflag = ISC_TRUE;
ignore_kskflag = true;
break;
case '?':
@@ -322,10 +316,10 @@ main(int argc, char *argv[]) {
result = dns_db_newversion(gdb, &gversion);
check_result(result, "dns_db_newversion()");
verifyzone(gdb, gversion, gorigin, mctx,
ignore_kskflag, keyset_kskonly);
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL,
mctx, ignore_kskflag, keyset_kskonly);
dns_db_closeversion(gdb, &gversion, ISC_FALSE);
dns_db_closeversion(gdb, &gversion, false);
dns_db_detach(&gdb);
cleanup_logging(&log);
@@ -337,5 +331,5 @@ main(int argc, char *argv[]) {
(void) isc_app_finish();
return (0);
return (result == ISC_R_SUCCESS ? 0 : 1);
}
+24 -1361
View File
File diff suppressed because it is too large Load Diff
+8 -23
View File
@@ -13,16 +13,14 @@
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
#include <inttypes.h>
#include <stdbool.h>
#include <isc/log.h>
#include <isc/stdtime.h>
#include <dns/rdatastruct.h>
#include <dst/dst.h>
#define check_dns_dbiterator_current(result) \
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
"dns_dbiterator_current()")
typedef void (fatalcallback_t)(void);
ISC_PLATFORM_NORETURN_PRE void
@@ -41,10 +39,6 @@ vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
ISC_PLATFORM_NORETURN_PRE void
version(const char *program) ISC_PLATFORM_NORETURN_POST;
void
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
#define TYPE_FORMATSIZE 20
void
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
@@ -58,8 +52,8 @@ cleanup_logging(isc_log_t **logp);
dns_ttl_t strtottl(const char *str);
isc_stdtime_t
strtotime(const char *str, isc_int64_t now, isc_int64_t base,
isc_boolean_t *setp);
strtotime(const char *str, int64_t now, int64_t base,
bool *setp);
unsigned int
strtodsdigest(const char *str);
@@ -76,20 +70,11 @@ check_keyversion(dst_key_t *key, char *keystr);
void
set_keyversion(dst_key_t *key);
isc_boolean_t
bool
key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
isc_mem_t *mctx, isc_boolean_t *exact);
isc_mem_t *mctx, bool *exact);
isc_boolean_t
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp);
void
verifyzone(dns_db_t *db, dns_dbversion_t *ver,
dns_name_t *origin, isc_mem_t *mctx,
isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
isc_boolean_t
bool
isoptarg(const char *arg, char **argv, void (*usage)(void));
#ifdef _WIN32
+2 -2
View File
@@ -61,7 +61,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -84,7 +84,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
@IF PYTHON
<PostBuildEvent>
@@ -94,7 +94,7 @@ set PYTHONPATH=.
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -113,7 +113,7 @@ set PYTHONPATH=.
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
@IF PYTHON
<PostBuildEvent>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+8 -6
View File
@@ -46,17 +46,17 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@
CDEFINES = @CONTRIB_DLZ@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
@@ -72,11 +72,13 @@ DEPLIBS = ${NSDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
@LIBS@
NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
@LIBS@
SUBDIRS = unix
+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"
+52 -32
View File
@@ -13,6 +13,7 @@
#include <config.h>
#include <inttypes.h>
#include <stdlib.h>
#include <isc/buffer.h>
@@ -27,6 +28,7 @@
#include <pk11/site.h>
#include <isccfg/grammar.h>
#include <isccfg/namedconf.h>
#include <dns/fixedname.h>
@@ -46,14 +48,11 @@
/*% default configuration */
static char defaultconf[] = "\
options {\n\
answer-cookie true;\n\
automatic-interface-scan yes;\n\
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
# blackhole {none;};\n"
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
" cookie-algorithm aes;\n"
#else
" cookie-algorithm sha256;\n"
#endif
#ifndef WIN32
" coresize default;\n\
datasize default;\n"
@@ -94,6 +93,7 @@ options {\n\
request-nsid false;\n\
reserved-sockets 512;\n\
resolver-query-timeout 10;\n\
rrset-order { order random; };\n\
secroots-file \"named.secroots\";\n\
send-cookie true;\n\
# serial-queries <obsolete>;\n\
@@ -146,7 +146,7 @@ options {\n\
clients-per-query 10;\n\
dnssec-accept-expired no;\n\
dnssec-enable yes;\n\
dnssec-validation yes; \n"
dnssec-validation " VALIDATION_DEFAULT "; \n"
#ifdef HAVE_DNSTAP
" dnstap-identity hostname;\n"
#endif
@@ -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\
@@ -181,6 +183,7 @@ options {\n\
notify-source-v6 *;\n\
nsec3-test-zone no;\n\
provide-ixfr true;\n\
qname-minimization relaxed;\n\
query-source address *;\n\
query-source-v6 address *;\n\
recursion true;\n\
@@ -300,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
@@ -308,8 +326,9 @@ named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1);
isc_buffer_add(&b, sizeof(defaultconf) - 1);
return (cfg_parse_buffer3(parser, &b, __FILE__, 0,
&cfg_type_namedconf, conf));
return (cfg_parse_buffer4(parser, &b, __FILE__, 0,
&cfg_type_namedconf,
CFG_PCTX_NODEPRECATED, conf));
}
isc_result_t
@@ -430,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) {
@@ -438,6 +459,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
ztype = dns_zone_redirect;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
return (ztype);
}
@@ -446,7 +468,7 @@ isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
isc_uint32_t *countp)
uint32_t *countp)
{
int count, i = 0;
const cfg_obj_t *addrlist;
@@ -466,8 +488,8 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
portobj = cfg_tuple_get(list, "port");
if (cfg_obj_isuint32(portobj)) {
isc_uint32_t val = cfg_obj_asuint32(portobj);
if (val > ISC_UINT16_MAX) {
uint32_t val = cfg_obj_asuint32(portobj);
if (val > UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range", val);
return (ISC_R_RANGE);
@@ -537,7 +559,7 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, isc_uint32_t count)
isc_dscp_t **dscpsp, uint32_t count)
{
INSIST(addrsp != NULL && *addrsp != NULL);
INSIST(dscpsp == NULL || *dscpsp != NULL);
@@ -551,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;
@@ -583,9 +605,9 @@ isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, dns_ipkeylist_t *ipkl)
{
isc_uint32_t addrcount = 0, dscpcount = 0, keycount = 0, i = 0;
isc_uint32_t listcount = 0, l = 0, j;
isc_uint32_t stackcount = 0, pushed = 0;
uint32_t addrcount = 0, dscpcount = 0, keycount = 0, i = 0;
uint32_t listcount = 0, l = 0, j;
uint32_t stackcount = 0, pushed = 0;
isc_result_t result;
const cfg_listelt_t *element;
const cfg_obj_t *addrlist;
@@ -629,8 +651,8 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dscpobj = cfg_tuple_get(list, "dscp");
if (cfg_obj_isuint32(portobj)) {
isc_uint32_t val = cfg_obj_asuint32(portobj);
if (val > ISC_UINT16_MAX) {
uint32_t val = cfg_obj_asuint32(portobj);
if (val > UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range", val);
result = ISC_R_RANGE;
@@ -674,7 +696,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
/* Grow lists? */
if (listcount == l) {
void * tmp;
isc_uint32_t newlen = listcount + 16;
uint32_t newlen = listcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(*lists);
@@ -695,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);
@@ -709,7 +732,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
/* Grow stack? */
if (stackcount == pushed) {
void * tmp;
isc_uint32_t newlen = stackcount + 16;
uint32_t newlen = stackcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(*stack);
@@ -737,7 +760,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (i == addrcount) {
void * tmp;
isc_uint32_t newlen = addrcount + 16;
uint32_t newlen = addrcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(isc_sockaddr_t);
@@ -910,7 +933,7 @@ named_config_getport(const cfg_obj_t *config, in_port_t *portp) {
result = named_config_get(maps, "port", &portobj);
INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_asuint32(portobj) >= ISC_UINT16_MAX) {
if (cfg_obj_asuint32(portobj) >= UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range",
cfg_obj_asuint32(portobj));
@@ -950,13 +973,11 @@ struct keyalgorithms {
enum { hmacnone, hmacmd5, hmacsha1, hmacsha224,
hmacsha256, hmacsha384, hmacsha512 } hmac;
unsigned int type;
isc_uint16_t size;
uint16_t size;
} algorithms[] = {
#ifndef PK11_MD5_DISABLE
{ "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 },
{ "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 },
{ "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 },
#endif
{ "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 },
{ "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 },
{ "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 },
@@ -967,18 +988,18 @@ struct keyalgorithms {
isc_result_t
named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
isc_uint16_t *digestbits)
uint16_t *digestbits)
{
return (named_config_getkeyalgorithm2(str, name, NULL, digestbits));
}
isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
unsigned int *typep, isc_uint16_t *digestbits)
unsigned int *typep, uint16_t *digestbits)
{
int i;
size_t len = 0;
isc_uint16_t bits;
uint16_t bits;
isc_result_t result;
for (i = 0; algorithms[i].str != NULL; i++) {
@@ -1003,9 +1024,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
if (name != NULL) {
switch (algorithms[i].hmac) {
#ifndef PK11_MD5_DISABLE
case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
#endif
case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
@@ -1013,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)
+10 -9
View File
@@ -14,6 +14,7 @@
#include <config.h>
#include <stdbool.h>
#include <isc/app.h>
#include <isc/event.h>
@@ -59,9 +60,9 @@ getcommand(isc_lex_t *lex, char **cmdp) {
return (ISC_R_SUCCESS);
}
static inline isc_boolean_t
static inline bool
command_compare(const char *str, const char *command) {
return ISC_TF(strcasecmp(str, command) == 0);
return (strcasecmp(str, command) == 0);
}
/*%
@@ -69,7 +70,7 @@ command_compare(const char *str, const char *command) {
* when a control channel message is received.
*/
isc_result_t
named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
named_control_docommand(isccc_sexpr_t *message, bool readonly,
isc_buffer_t **text)
{
isccc_sexpr_t *data;
@@ -184,7 +185,7 @@ named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
*/
#endif
/* Do not flush master files */
named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_server_flushonshutdown(named_g_server, false);
named_os_shutdownmsg(cmdline, *text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
@@ -201,7 +202,7 @@ named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
if (named_smf_got_instance == 1 && named_smf_chroot == 0)
named_smf_want_disable = 1;
#endif
named_server_flushonshutdown(named_g_server, ISC_TRUE);
named_server_flushonshutdown(named_g_server, true);
named_os_shutdownmsg(cmdline, *text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
@@ -223,9 +224,9 @@ named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
} else if (command_compare(command, NAMED_COMMAND_FLUSH)) {
result = named_server_flushcache(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_FLUSHNAME)) {
result = named_server_flushnode(named_g_server, lex, ISC_FALSE);
result = named_server_flushnode(named_g_server, lex, false);
} else if (command_compare(command, NAMED_COMMAND_FLUSHTREE)) {
result = named_server_flushnode(named_g_server, lex, ISC_TRUE);
result = named_server_flushnode(named_g_server, lex, true);
} else if (command_compare(command, NAMED_COMMAND_STATUS)) {
result = named_server_status(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
@@ -233,11 +234,11 @@ named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
result = named_server_tsigdelete(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_FREEZE)) {
result = named_server_freeze(named_g_server, ISC_TRUE, lex,
result = named_server_freeze(named_g_server, true, lex,
text);
} else if (command_compare(command, NAMED_COMMAND_UNFREEZE) ||
command_compare(command, NAMED_COMMAND_THAW)) {
result = named_server_freeze(named_g_server, ISC_FALSE, lex,
result = named_server_freeze(named_g_server, false, lex,
text);
} else if (command_compare(command, NAMED_COMMAND_SCAN)) {
result = ISC_R_SUCCESS;
+39 -40
View File
@@ -13,6 +13,9 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/event.h>
@@ -20,6 +23,7 @@
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/nonce.h>
#include <isc/random.h>
#include <isc/result.h>
#include <isc/stdtime.h>
@@ -64,7 +68,7 @@ typedef ISC_LIST(controllistener_t) controllistenerlist_t;
struct controlkey {
char * keyname;
isc_uint32_t algorithm;
uint32_t algorithm;
isc_region_t secret;
ISC_LINK(controlkey_t) link;
};
@@ -72,12 +76,12 @@ struct controlkey {
struct controlconnection {
isc_socket_t * sock;
isccc_ccmsg_t ccmsg;
isc_boolean_t ccmsg_valid;
isc_boolean_t sending;
bool ccmsg_valid;
bool sending;
isc_timer_t * timer;
isc_buffer_t * buffer;
controllistener_t * listener;
isc_uint32_t nonce;
uint32_t nonce;
ISC_LINK(controlconnection_t) link;
};
@@ -88,22 +92,22 @@ struct controllistener {
isc_sockaddr_t address;
isc_socket_t * sock;
dns_acl_t * acl;
isc_boolean_t listening;
isc_boolean_t exiting;
bool listening;
bool exiting;
controlkeylist_t keys;
controlconnectionlist_t connections;
isc_sockettype_t type;
isc_uint32_t perm;
isc_uint32_t owner;
isc_uint32_t group;
isc_boolean_t readonly;
uint32_t perm;
uint32_t owner;
uint32_t group;
bool readonly;
ISC_LINK(controllistener_t) link;
};
struct named_controls {
named_server_t *server;
controllistenerlist_t listeners;
isc_boolean_t shuttingdown;
bool shuttingdown;
isccc_symtab_t *symtab;
};
@@ -201,8 +205,8 @@ shutdown_listener(controllistener_t *listener) {
NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
"stopping command channel on %s", socktext);
if (listener->type == isc_sockettype_unix)
isc_socket_cleanunix(&listener->address, ISC_TRUE);
listener->exiting = ISC_TRUE;
isc_socket_cleanunix(&listener->address, true);
listener->exiting = true;
}
for (conn = ISC_LIST_HEAD(listener->connections);
@@ -220,7 +224,7 @@ shutdown_listener(controllistener_t *listener) {
maybe_free_listener(listener);
}
static isc_boolean_t
static bool
address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
dns_aclenv_t *env =
ns_interfacemgr_getaclenv(named_g_server->interfacemgr);
@@ -230,13 +234,8 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
result = dns_acl_match(&netaddr, NULL, NULL, 0, NULL, acl, env, &match,
NULL);
if (result != ISC_R_SUCCESS || match <= 0)
return (ISC_FALSE);
else
return (ISC_TRUE);
result = dns_acl_match(&netaddr, NULL, acl, env, &match, NULL);
return (result == ISC_R_SUCCESS && match > 0);
}
static isc_result_t
@@ -250,7 +249,7 @@ control_accept(controllistener_t *listener) {
"isc_socket_accept() failed: %s",
isc_result_totext(result));
else
listener->listening = ISC_TRUE;
listener->listening = true;
return (result);
}
@@ -283,7 +282,7 @@ control_senddone(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
conn->sending = ISC_FALSE;
conn->sending = false;
if (sevent->result != ISC_R_SUCCESS &&
sevent->result != ISC_R_CANCELED)
@@ -329,7 +328,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
controlkey_t *key = NULL;
isccc_sexpr_t *request = NULL;
isccc_sexpr_t *response = NULL;
isc_uint32_t algorithm;
uint32_t algorithm;
isccc_region_t secret;
isc_stdtime_t now;
isc_buffer_t b;
@@ -340,7 +339,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
isccc_sexpr_t *_ctrl = NULL;
isccc_time_t sent;
isccc_time_t exp;
isc_uint32_t nonce;
uint32_t nonce;
isccc_sexpr_t *data = NULL;
REQUIRE(event->ev_type == ISCCC_EVENT_CCMSG);
@@ -458,7 +457,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
*/
if (conn->nonce == 0) {
while (conn->nonce == 0) {
isc_random_buf(&conn->nonce, sizeof(conn->nonce));
isc_nonce_buf(&conn->nonce, sizeof(conn->nonce));
}
eresult = ISC_R_SUCCESS;
} else
@@ -520,7 +519,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isc_socket_send(conn->sock, &r, task, control_senddone, conn);
if (result != ISC_R_SUCCESS)
goto cleanup_response;
conn->sending = ISC_TRUE;
conn->sending = true;
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
isccc_sexpr_free(&request);
@@ -540,7 +539,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
cleanup:
isc_socket_detach(&conn->sock);
isccc_ccmsg_invalidate(&conn->ccmsg);
conn->ccmsg_valid = ISC_FALSE;
conn->ccmsg_valid = false;
maybe_free_connection(conn);
maybe_free_listener(listener);
}
@@ -573,8 +572,8 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
/* Set a 32 KiB upper limit on incoming message. */
isccc_ccmsg_setmaxsize(&conn->ccmsg, 32768);
conn->ccmsg_valid = ISC_TRUE;
conn->sending = ISC_FALSE;
conn->ccmsg_valid = true;
conn->sending = false;
conn->buffer = NULL;
conn->timer = NULL;
isc_interval_set(&interval, 60, 0);
@@ -621,7 +620,7 @@ control_newconn(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
listener->listening = ISC_FALSE;
listener->listening = false;
if (nevent->result != ISC_R_SUCCESS) {
if (nevent->result == ISC_R_CANCELED) {
@@ -685,7 +684,7 @@ controls_shutdown(named_controls_t *controls) {
void
named_controls_shutdown(named_controls_t *controls) {
controls_shutdown(controls);
controls->shuttingdown = ISC_TRUE;
controls->shuttingdown = true;
}
static isc_result_t
@@ -1091,7 +1090,7 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
socktext, isc_result_totext(result));
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) {
isc_uint32_t perm, owner, group;
uint32_t perm, owner, group;
perm = cfg_obj_asuint32(cfg_tuple_get(control, "perm"));
owner = cfg_obj_asuint32(cfg_tuple_get(control, "owner"));
group = cfg_obj_asuint32(cfg_tuple_get(control, "group"));
@@ -1138,14 +1137,14 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
listener->task = cp->server->task;
listener->address = *addr;
listener->sock = NULL;
listener->listening = ISC_FALSE;
listener->exiting = ISC_FALSE;
listener->listening = false;
listener->exiting = false;
listener->acl = NULL;
listener->type = type;
listener->perm = 0;
listener->owner = 0;
listener->group = 0;
listener->readonly = ISC_FALSE;
listener->readonly = false;
ISC_LINK_INIT(listener, link);
ISC_LIST_INIT(listener->keys);
ISC_LIST_INIT(listener->connections);
@@ -1208,7 +1207,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
}
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix)
isc_socket_cleanunix(&listener->address, ISC_FALSE);
isc_socket_cleanunix(&listener->address, false);
if (result == ISC_R_SUCCESS)
result = isc_socket_create(named_g_socketmgr,
@@ -1219,7 +1218,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
#ifndef ISC_ALLOW_MAPPED
if (result == ISC_R_SUCCESS)
isc_socket_ipv6only(listener->sock, ISC_TRUE);
isc_socket_ipv6only(listener->sock, true);
#endif
if (result == ISC_R_SUCCESS)
@@ -1250,7 +1249,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
} else {
if (listener != NULL) {
listener->exiting = ISC_TRUE;
listener->exiting = true;
free_listener(listener);
}
@@ -1510,7 +1509,7 @@ named_controls_create(named_server_t *server, named_controls_t **ctrlsp) {
return (ISC_R_NOMEMORY);
controls->server = server;
ISC_LIST_INIT(controls->listeners);
controls->shuttingdown = ISC_FALSE;
controls->shuttingdown = false;
controls->symtab = NULL;
result = isccc_cc_createsymtab(&controls->symtab);
if (result != ISC_R_SUCCESS) {
+31 -25
View File
@@ -9,7 +9,10 @@
* information regarding copyright ownership.
*/
#include "config.h"
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <named/fuzz.h>
@@ -33,10 +36,6 @@
#include <unistd.h>
#include <pthread.h>
#ifndef __AFL_LOOP
#error To use American Fuzzy Lop you have to set CC to afl-clang-fast!!!
#endif
/*
* We are using pthreads directly because we might be using it with
* unthreaded version of BIND, where all thread functions are
@@ -44,7 +43,7 @@
*/
static pthread_cond_t cond;
static pthread_mutex_t mutex;
static isc_boolean_t ready;
static bool ready;
/*
* In "client:" mode, this thread reads fuzzed query messages from AFL
@@ -58,7 +57,6 @@ fuzz_thread_client(void *arg) {
char *port;
struct sockaddr_in servaddr;
int sockfd;
int loop;
void *buf;
UNUSED(arg);
@@ -100,14 +98,18 @@ fuzz_thread_client(void *arg) {
* Processing fuzzed packets 100,000 times before shutting down
* the app.
*/
for (loop = 0; loop < 100000; loop++) {
#ifdef __AFL_LOOP
for (int loop = 0; loop < 100000; loop++) {
#else
{
#endif
ssize_t length;
ssize_t sent;
length = read(0, buf, 65536);
if (length <= 0) {
usleep(1000000);
continue;
goto next;
}
/*
@@ -122,17 +124,17 @@ fuzz_thread_client(void *arg) {
free(buf);
close(sockfd);
named_server_flushonshutdown(named_g_server,
ISC_FALSE);
false);
isc_app_shutdown();
return (NULL);
}
raise(SIGSTOP);
continue;
goto next;
}
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = ISC_FALSE;
ready = false;
sent = sendto(sockfd, buf, length, 0,
(struct sockaddr *) &servaddr, sizeof(servaddr));
@@ -148,12 +150,13 @@ fuzz_thread_client(void *arg) {
pthread_cond_wait(&cond, &mutex);
RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
next: ;
}
free(buf);
close(sockfd);
named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_server_flushonshutdown(named_g_server, false);
isc_app_shutdown();
return (NULL);
@@ -200,7 +203,7 @@ fuzz_thread_resolver(void *arg) {
* have to be updated. 0x8d, 0xf6 at the start is the ID field
* which will be made to match the query.
*/
const isc_uint8_t dnskey_wf[] = {
const uint8_t dnskey_wf[] = {
0x8d, 0xf6, 0x84, 0x00, 0x00, 0x01, 0x00, 0x02,
0x00, 0x00, 0x00, 0x01, 0x07, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x30, 0x00,
@@ -282,12 +285,12 @@ fuzz_thread_resolver(void *arg) {
int sockfd;
int listenfd;
int loop;
isc_uint16_t qtype;
uint16_t qtype;
char *buf, *rbuf;
char *nameptr;
unsigned int i;
isc_uint8_t llen;
isc_uint64_t seed;
uint8_t llen;
uint64_t seed;
UNUSED(arg);
@@ -385,7 +388,7 @@ fuzz_thread_resolver(void *arg) {
close(sockfd);
close(listenfd);
named_server_flushonshutdown(named_g_server,
ISC_FALSE);
false);
isc_app_shutdown();
return (NULL);
}
@@ -399,7 +402,7 @@ fuzz_thread_resolver(void *arg) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = ISC_FALSE;
ready = false;
/* Use a unique query ID. */
seed = 1664525 * seed + 1013904223;
@@ -549,7 +552,7 @@ fuzz_thread_resolver(void *arg) {
* "example."
*/
if ((nameptr - buf) < (length - 2)) {
isc_uint8_t hb, lb;
uint8_t hb, lb;
hb = *nameptr++;
lb = *nameptr++;
qtype = (hb << 8) | lb;
@@ -577,11 +580,13 @@ fuzz_thread_resolver(void *arg) {
}
free(buf);
free(rbuf);
close(sockfd);
close(listenfd);
named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_server_flushonshutdown(named_g_server, false);
isc_app_shutdown();
#ifdef __AFL_LOOP
/*
* This is here just for the signature, that's how AFL detects
* if it's a 'persistent mode' binary. It has to occur somewhere
@@ -590,6 +595,7 @@ fuzz_thread_resolver(void *arg) {
* in persistent mode if it's present.
*/
__AFL_LOOP(0);
#endif
return (NULL);
}
@@ -686,7 +692,7 @@ fuzz_thread_tcp(void *arg) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = ISC_FALSE;
ready = false;
yes = 1;
sockfd = socket(AF_INET, SOCK_STREAM, 0);
@@ -717,7 +723,7 @@ fuzz_thread_tcp(void *arg) {
free(buf);
close(sockfd);
named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_server_flushonshutdown(named_g_server, false);
isc_app_shutdown();
return (NULL);
@@ -734,7 +740,7 @@ void
named_fuzz_notify(void) {
#ifdef ENABLE_AFL
if (getenv("AFL_CMIN")) {
named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_server_flushonshutdown(named_g_server, false);
isc_app_shutdown();
return;
}
@@ -743,7 +749,7 @@ named_fuzz_notify(void) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = ISC_TRUE;
ready = true;
RUNTIME_CHECK(pthread_cond_signal(&cond) == 0);
RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
+12 -4
View File
@@ -15,11 +15,15 @@
/*! \file */
#include <inttypes.h>
#include <isccfg/cfg.h>
#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);
@@ -49,11 +53,15 @@ isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
isc_uint32_t *countp);
uint32_t *countp);
void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, isc_uint32_t count);
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,
@@ -64,10 +72,10 @@ named_config_getport(const cfg_obj_t *config, in_port_t *portp);
isc_result_t
named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
isc_uint16_t *digestbits);
uint16_t *digestbits);
isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
unsigned int *typep, isc_uint16_t *digestbits);
unsigned int *typep, uint16_t *digestbits);
isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);
+3 -1
View File
@@ -17,6 +17,8 @@
* The name server command channel.
*/
#include <stdbool.h>
#include <isccc/types.h>
#include <isccfg/aclconf.h>
@@ -101,7 +103,7 @@ named_controls_shutdown(named_controls_t *controls);
*/
isc_result_t
named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
named_control_docommand(isccc_sexpr_t *message, bool readonly,
isc_buffer_t **text);
#endif /* NAMED_CONTROL_H */
+11 -13
View File
@@ -14,6 +14,8 @@
/*! \file */
#include <stdbool.h>
#include <isc/rwlock.h>
#include <isc/log.h>
#include <isc/net.h>
@@ -51,7 +53,7 @@ EXTERN dns_dispatchmgr_t * named_g_dispatchmgr INIT(NULL);
EXTERN unsigned int named_g_cpus_detected INIT(1);
#ifdef ENABLE_AFL
EXTERN isc_boolean_t named_g_run_done INIT(ISC_FALSE);
EXTERN bool named_g_run_done INIT(false);
#endif
/*
* XXXRTH We're going to want multiple timer managers eventually. One
@@ -94,7 +96,7 @@ EXTERN const char * named_g_keyfile INIT(NAMED_SYSCONFDIR
EXTERN dns_tsigkey_t * named_g_sessionkey INIT(NULL);
EXTERN dns_name_t named_g_sessionkeyname;
EXTERN isc_boolean_t named_g_conffileset INIT(ISC_FALSE);
EXTERN bool named_g_conffileset INIT(false);
EXTERN cfg_aclconfctx_t * named_g_aclconfctx INIT(NULL);
/*
@@ -108,11 +110,11 @@ EXTERN isc_resourcevalue_t named_g_initopenfiles INIT(0);
/*
* Misc.
*/
EXTERN isc_boolean_t named_g_coreok INIT(ISC_TRUE);
EXTERN bool named_g_coreok INIT(true);
EXTERN const char * named_g_chrootdir INIT(NULL);
EXTERN isc_boolean_t named_g_foreground INIT(ISC_FALSE);
EXTERN isc_boolean_t named_g_logstderr INIT(ISC_FALSE);
EXTERN isc_boolean_t named_g_nosyslog INIT(ISC_FALSE);
EXTERN bool named_g_foreground INIT(false);
EXTERN bool named_g_logstderr INIT(false);
EXTERN bool named_g_nosyslog INIT(false);
EXTERN const char * named_g_logfile INIT(NULL);
EXTERN const char * named_g_defaultsessionkeyfile
@@ -121,7 +123,7 @@ EXTERN const char * named_g_defaultsessionkeyfile
EXTERN const char * named_g_defaultlockfile INIT(NAMED_LOCALSTATEDIR
"/run/named/"
"named.lock");
EXTERN isc_boolean_t named_g_forcelock INIT(ISC_FALSE);
EXTERN bool named_g_forcelock INIT(false);
#if NAMED_RUN_PID_DIR
EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR
@@ -142,16 +144,12 @@ EXTERN const char * named_g_defaultdnstap INIT(NULL);
EXTERN const char * named_g_username INIT(NULL);
#if defined(USE_PKCS11)
EXTERN const char * named_g_engine INIT(PKCS11_ENGINE);
#else
EXTERN const char * named_g_engine INIT(NULL);
#endif
EXTERN isc_time_t named_g_boottime;
EXTERN isc_time_t named_g_configtime;
EXTERN isc_boolean_t named_g_memstatistics INIT(ISC_FALSE);
EXTERN isc_boolean_t named_g_keepstderr INIT(ISC_FALSE);
EXTERN bool named_g_memstatistics INIT(false);
EXTERN bool named_g_keepstderr INIT(false);
EXTERN unsigned int named_g_tat_interval INIT(24*3600);
+1 -1
View File
@@ -34,7 +34,7 @@
#define NAMED_LOGMODULE_CONTROL (&named_g_modules[2])
isc_result_t
named_log_init(isc_boolean_t safe);
named_log_init(bool safe);
/*%
* Initialize the logging system and set up an initial default
* logging default configuration that will be used until the
+14 -11
View File
@@ -14,6 +14,9 @@
/*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <isc/log.h>
#include <isc/magic.h>
#include <isc/quota.h>
@@ -53,9 +56,9 @@ struct named_server {
char * secrootsfile; /*%< Secroots file name */
char * bindkeysfile; /*%< bind.keys file name */
char * recfile; /*%< Recursive file name */
isc_boolean_t version_set; /*%< User has set version */
bool version_set; /*%< User has set version */
char * version; /*%< User-specified version */
isc_boolean_t hostname_set; /*%< User has set hostname */
bool hostname_set; /*%< User has set hostname */
char * hostname; /*%< User-specified hostname */
/* Server data structures. */
@@ -70,13 +73,13 @@ struct named_server {
isc_timer_t * pps_timer;
isc_timer_t * tat_timer;
isc_uint32_t interface_interval;
isc_uint32_t heartbeat_interval;
uint32_t interface_interval;
uint32_t heartbeat_interval;
isc_mutex_t reload_event_lock;
isc_event_t * reload_event;
isc_boolean_t flushonshutdown;
bool flushonshutdown;
named_cachelist_t cachelist; /*%< Possibly shared caches */
isc_stats_t * zonestats; /*% Zone management stats */
@@ -93,8 +96,8 @@ struct named_server {
char *session_keyfile;
dns_name_t *session_keyname;
unsigned int session_keyalg;
isc_uint16_t session_keybits;
isc_boolean_t interface_auto;
uint16_t session_keybits;
bool interface_auto;
unsigned char secret[32]; /*%< Server Cookie Secret */
ns_cookiealg_t cookiealg;
@@ -137,7 +140,7 @@ named_server_scan_interfaces(named_server_t *server);
*/
void
named_server_flushonshutdown(named_server_t *server, isc_boolean_t flush);
named_server_flushonshutdown(named_server_t *server, bool flush);
/*%<
* Inform the server that the zones should be flushed to disk on shutdown.
*/
@@ -234,7 +237,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex);
*/
isc_result_t
named_server_flushnode(named_server_t *server, isc_lex_t *lex,
isc_boolean_t tree);
bool tree);
/*%
* Report the server's status.
@@ -259,7 +262,7 @@ named_server_tsigdelete(named_server_t *server, isc_lex_t *lex,
* Enable or disable updates for a zone.
*/
isc_result_t
named_server_freeze(named_server_t *server, isc_boolean_t freeze,
named_server_freeze(named_server_t *server, bool freeze,
isc_lex_t *lex, isc_buffer_t **text);
/*%
@@ -339,7 +342,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
*/
isc_result_t
named_server_nta(named_server_t *server, isc_lex_t *lex,
isc_boolean_t readonly, isc_buffer_t **text);
bool readonly, isc_buffer_t **text);
/*%
* Generates a test sequence that is only for use in system tests. The
+5 -3
View File
@@ -14,6 +14,8 @@
/*! \file */
#include <stdbool.h>
#include <isc/lang.h>
#include <isc/types.h>
@@ -41,13 +43,13 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* \li 'zone' to be initialized.
*/
isc_boolean_t
bool
named_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
/*%<
* If 'zone' can be safely reconfigured according to the configuration
* data in 'zconfig', return ISC_TRUE. If the configuration data is so
* data in 'zconfig', return true. If the configuration data is so
* different from the current zone state that the zone needs to be destroyed
* and recreated, return ISC_FALSE.
* and recreated, return false.
*/
isc_result_t
+1 -1
View File
@@ -50,7 +50,7 @@ static isc_logmodule_t modules[] = {
};
isc_result_t
named_log_init(isc_boolean_t safe) {
named_log_init(bool safe) {
isc_result_t result;
isc_logconfig_t *lcfg = NULL;
+10 -6
View File
@@ -13,6 +13,9 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <isc/file.h>
#include <isc/offset.h>
#include <isc/print.h>
@@ -136,10 +139,10 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
cfg_tuple_get(fileobj, "versions");
const cfg_obj_t *suffixobj =
cfg_tuple_get(fileobj, "suffix");
isc_int32_t versions = ISC_LOG_ROLLNEVER;
int32_t versions = ISC_LOG_ROLLNEVER;
isc_log_rollsuffix_t suffix = isc_log_rollsuffix_increment;
isc_offset_t size = 0;
isc_uint64_t maxoffset;
uint64_t maxoffset;
/*
* isc_offset_t is a signed integer type, so the maximum
@@ -154,6 +157,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
type = ISC_LOG_TOFILE;
@@ -302,8 +306,8 @@ named_logconfig(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
const cfg_obj_t *channels = NULL;
const cfg_obj_t *categories = NULL;
const cfg_listelt_t *element;
isc_boolean_t default_set = ISC_FALSE;
isc_boolean_t unmatched_set = ISC_FALSE;
bool default_set = false;
bool unmatched_set = false;
const cfg_obj_t *catname;
if (logconfig != NULL)
@@ -328,12 +332,12 @@ named_logconfig(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
if (!default_set) {
catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "default") == 0)
default_set = ISC_TRUE;
default_set = true;
}
if (!unmatched_set) {
catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0)
unmatched_set = ISC_TRUE;
unmatched_set = true;
}
}

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