Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c65f307d57 | ||
|
|
3b8a52264c | ||
|
|
db00eb2fa9 | ||
|
|
8b5aa19ed9 | ||
|
|
a8595262f7 | ||
|
|
c48979e6c5 | ||
|
|
ca52242661 | ||
|
|
3f2de6d39c | ||
|
|
fc834aa4bc | ||
|
|
008b73fb41 | ||
|
|
04ce124279 | ||
|
|
057e9fdb51 | ||
|
|
f1a887a0b9 | ||
|
|
d9e96809ac | ||
|
|
510306c654 | ||
|
|
9d3205e894 | ||
|
|
d98f446d3f | ||
|
|
c8ed70a108 | ||
|
|
ba26c6eb48 | ||
|
|
30610eb9a5 | ||
|
|
3705605e0b | ||
|
|
cd40c9fe61 | ||
|
|
2ebc4776ca | ||
|
|
ddd871bbea | ||
|
|
7b65ea4c11 | ||
|
|
417df8cfbc | ||
|
|
2627287dbc | ||
|
|
33887dd941 | ||
|
|
617696fbfc | ||
|
|
241cf78fee | ||
|
|
5aa375f0d8 | ||
|
|
71325852f1 | ||
|
|
89d5ecb04d | ||
|
|
9fc4be226d | ||
|
|
e1792341ac | ||
|
|
1b9b826518 | ||
|
|
d6a9407908 | ||
|
|
d60557be82 | ||
|
|
4c0b0fa6a5 | ||
|
|
2ceb4b6a98 | ||
|
|
98b460e604 | ||
|
|
1cd3516d54 | ||
|
|
6e48abc503 | ||
|
|
a3af2c57e7 | ||
|
|
48332d4478 | ||
|
|
c9d56a8185 | ||
|
|
403cc1fa12 | ||
|
|
33bddbb5d1 | ||
|
|
ed10608663 | ||
|
|
d7461772bb | ||
|
|
5ed13fe426 | ||
|
|
efa5f7ed54 | ||
|
|
02d95d0b62 | ||
|
|
54de054dd5 | ||
|
|
2c87ab1cca | ||
|
|
f9c07c78bc | ||
|
|
3a19e9ea19 | ||
|
|
0b2b6b2ed1 | ||
|
|
a73350a210 | ||
|
|
a00f1df736 | ||
|
|
1d86b202ad | ||
|
|
6a51b66197 | ||
|
|
053a716ae0 | ||
|
|
d80b6ec879 | ||
|
|
0d20df220e | ||
|
|
4a8b3a8ac0 | ||
|
|
52beeed444 | ||
|
|
443449863b | ||
|
|
44c0cc881f | ||
|
|
cbf32b901b | ||
|
|
22d5355782 | ||
|
|
ab78e350dd | ||
|
|
7fac94f589 | ||
|
|
a5ad6b16c5 | ||
|
|
d3506c9728 | ||
|
|
93ad3eea90 | ||
|
|
edab51b420 | ||
|
|
5d5cf12a85 | ||
|
|
4db3189de2 | ||
|
|
b3cd04b95a | ||
|
|
cd9bbe6dea | ||
|
|
f03aaaa6b5 | ||
|
|
d883aab05f | ||
|
|
48213633ce | ||
|
|
9679c8c20a | ||
|
|
6d50f7d924 | ||
|
|
451113b4a9 | ||
|
|
ac28cc14e1 | ||
|
|
4293a2f4bf | ||
|
|
57a328d67e | ||
|
|
954782d78a | ||
|
|
49c31702bd | ||
|
|
9cfd0ecccf | ||
|
|
9b10cfef56 | ||
|
|
53800281fe | ||
|
|
fefb2d2662 | ||
|
|
37cccbab8d | ||
|
|
4302b4f3c4 | ||
|
|
ae76cd086e | ||
|
|
1d3ba54d6c | ||
|
|
72bd0db6cf | ||
|
|
2b632a232f | ||
|
|
aed7eb0c74 | ||
|
|
d95ae93dd3 | ||
|
|
a7ec7eb6ed | ||
|
|
06d8b1071d | ||
|
|
46919579bb | ||
|
|
d6a60f2905 | ||
|
|
e6de6deec9 | ||
|
|
dd430c3093 | ||
|
|
6d069edb59 | ||
|
|
4b44351e65 | ||
|
|
7c3430a24e | ||
|
|
44381929e2 | ||
|
|
a6dcdc535c | ||
|
|
d502569902 | ||
|
|
b23c8aa5e8 | ||
|
|
e4144fb9cf | ||
|
|
664b8f04f5 | ||
|
|
022649abc3 | ||
|
|
fd00bac736 | ||
|
|
94354d4655 | ||
|
|
ced15edea1 | ||
|
|
90f4c1c5a2 | ||
|
|
36ee99c5ee | ||
|
|
4b5e1da0e3 | ||
|
|
51ec36c826 | ||
|
|
fac23cf939 | ||
|
|
7c210a2b3b | ||
|
|
b791ab542b | ||
|
|
9836d5bc17 | ||
|
|
2a047af31e | ||
|
|
6f8d363514 | ||
|
|
12d9681442 | ||
|
|
91a0cb5da3 | ||
|
|
f30bdd1aac | ||
|
|
326a334b49 | ||
|
|
f4daf6e0e7 | ||
|
|
bb9c1654e2 | ||
|
|
b10d28d1e0 | ||
|
|
266e3ed52a | ||
|
|
ad008f7dbf | ||
|
|
3384455659 | ||
|
|
b5cd146033 | ||
|
|
5381ac0fcc | ||
|
|
59528d0e9d | ||
|
|
03de34194d | ||
|
|
c19ebde14b | ||
|
|
c14dc46319 | ||
|
|
78da483941 | ||
|
|
73e615fcfa | ||
|
|
36bc018275 | ||
|
|
e976db255f | ||
|
|
4b40266a1d | ||
|
|
8751585841 | ||
|
|
b8a96bfa78 | ||
|
|
570d1cf0bb | ||
|
|
e6c13ebb26 | ||
|
|
34ce90565c | ||
|
|
86595ed8cb | ||
|
|
d807ecde24 | ||
|
|
a1871e7f1d | ||
|
|
19eb5d0e83 | ||
|
|
9123da5362 | ||
|
|
f0c6aef542 | ||
|
|
9bdc24a9fd | ||
|
|
601cb4e4cc | ||
|
|
3c1d4298af | ||
|
|
49f244406c | ||
|
|
ae83801e2b | ||
|
|
f63e696967 | ||
|
|
7f828a213c | ||
|
|
3bcd05f081 | ||
|
|
0cd1e5ed28 | ||
|
|
14a4a799c0 | ||
|
|
b558346437 | ||
|
|
14d10521ba | ||
|
|
ca528766d6 | ||
|
|
dd358e6a21 | ||
|
|
bded8af7b8 | ||
|
|
07b4859dec | ||
|
|
2bf44c6cd4 | ||
|
|
673aa9f626 | ||
|
|
839ed7894b | ||
|
|
135519e59a | ||
|
|
c808255682 | ||
|
|
a4f38bec6a | ||
|
|
b786171423 | ||
|
|
b9a1c31df1 | ||
|
|
1eb640049c | ||
|
|
b9dc9b68cd | ||
|
|
59a7f75b7e | ||
|
|
5f71d9c6ac | ||
|
|
fb40bc061f | ||
|
|
a4141fcf98 | ||
|
|
317e36d47e | ||
|
|
0b8632e662 | ||
|
|
779aa2c9d9 | ||
|
|
926f2dedbd | ||
|
|
03b8e7ccb7 | ||
|
|
69e84ab9c1 | ||
|
|
51ec6f6500 | ||
|
|
1711e61549 | ||
|
|
eee6f51d05 | ||
|
|
a912f31398 | ||
|
|
afa81ee4e4 | ||
|
|
4e33942742 | ||
|
|
d1c7b79183 | ||
|
|
4084ba1085 | ||
|
|
257b0456f1 | ||
|
|
00f9ed8f8b | ||
|
|
f3bcd1485f | ||
|
|
9f916b000e | ||
|
|
5b5930dca1 | ||
|
|
dc234e3819 | ||
|
|
7615e86fae | ||
|
|
5efc32ebae |
@@ -61,6 +61,7 @@
|
||||
|
||||
(eval setq flycheck-clang-include-path include-directories)
|
||||
(eval setq flycheck-cppcheck-include-path include-directories)
|
||||
(eval setq flycheck-gcc-include-path include-directories)
|
||||
(eval setq flycheck-clang-args
|
||||
(list
|
||||
"-include"
|
||||
@@ -68,5 +69,20 @@
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-gcc-args
|
||||
(list
|
||||
"-include"
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-cppcheck-args
|
||||
(list
|
||||
"--enable=all"
|
||||
"--suppress=missingIncludeSystem"
|
||||
(concat "-include=" (expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h")))
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
+127
-38
@@ -17,7 +17,9 @@ variables:
|
||||
stages:
|
||||
- precheck
|
||||
- build
|
||||
- test
|
||||
- unit
|
||||
- system
|
||||
- docs
|
||||
- push
|
||||
|
||||
### Runner Tag Templates
|
||||
@@ -34,6 +36,12 @@ stages:
|
||||
|
||||
### Docker Image Templates
|
||||
|
||||
# Alpine Linux
|
||||
|
||||
.alpine-3.10-amd64: &alpine_3_10_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:alpine-3.10-amd64"
|
||||
<<: *linux_amd64
|
||||
|
||||
# CentOS
|
||||
|
||||
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
||||
@@ -50,10 +58,6 @@ stages:
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
|
||||
<<: *linux_amd64
|
||||
|
||||
.debian-jessie-i386: &debian_jessie_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
|
||||
<<: *linux_i386
|
||||
|
||||
.debian-stretch-amd64: &debian_stretch_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
||||
<<: *linux_amd64
|
||||
@@ -62,6 +66,10 @@ stages:
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
|
||||
<<: *linux_i386
|
||||
|
||||
.debian-buster-amd64: &debian_buster_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
||||
<<: *linux_i386
|
||||
|
||||
.debian-sid-amd64: &debian_sid_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
|
||||
<<: *linux_amd64
|
||||
@@ -72,8 +80,8 @@ stages:
|
||||
|
||||
# Fedora
|
||||
|
||||
.fedora-29-amd64: &fedora_29_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:fedora-29-amd64"
|
||||
.fedora-30-amd64: &fedora_30_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
|
||||
<<: *linux_amd64
|
||||
|
||||
# Ubuntu
|
||||
@@ -142,23 +150,25 @@ stages:
|
||||
- test -z "${RUN_MAKE_INSTALL}" || make install
|
||||
dependencies:
|
||||
- autoreconf:sid:amd64
|
||||
needs:
|
||||
- autoreconf:sid:amd64
|
||||
artifacts:
|
||||
untracked: true
|
||||
expire_in: "1 hour"
|
||||
|
||||
.setup_interfaces: &setup_interfaces |
|
||||
if [ "$(id -u)" -eq "0" ]; then
|
||||
bash -x bin/tests/system/ifconfig.sh up;
|
||||
sh -x bin/tests/system/ifconfig.sh up;
|
||||
else
|
||||
sudo bash -x bin/tests/system/ifconfig.sh up;
|
||||
sudo sh -x bin/tests/system/ifconfig.sh up;
|
||||
fi
|
||||
|
||||
.setup_softhsm: &setup_softhsm |
|
||||
bash -x util/prepare-softhsm2.sh
|
||||
sh -x util/prepare-softhsm2.sh
|
||||
|
||||
.system_test: &system_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
stage: system
|
||||
retry: 2
|
||||
before_script:
|
||||
- *setup_interfaces
|
||||
@@ -180,7 +190,7 @@ stages:
|
||||
|
||||
.unit_test: &unit_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
stage: unit
|
||||
before_script:
|
||||
- *setup_softhsm
|
||||
script:
|
||||
@@ -228,19 +238,23 @@ misc:sid:amd64:
|
||||
|
||||
🐞:sid:amd64:
|
||||
<<: *precheck_job
|
||||
script: util/check-cocci
|
||||
script:
|
||||
- util/check-cocci
|
||||
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
|
||||
|
||||
# Jobs for doc builds on Debian Sid (amd64)
|
||||
|
||||
docs:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: build
|
||||
stage: docs
|
||||
script:
|
||||
- ./configure || cat config.log
|
||||
- make -C doc/misc docbook
|
||||
- make -C doc/arm Bv9ARM.html
|
||||
dependencies:
|
||||
- autoreconf:sid:amd64
|
||||
needs:
|
||||
- autoreconf:sid:amd64
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/arm/
|
||||
@@ -262,6 +276,30 @@ push:docs:sid:amd64:
|
||||
- master@isc-projects/bind9
|
||||
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
||||
|
||||
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)
|
||||
|
||||
gcc:alpine3.10:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap"
|
||||
<<: *alpine_3_10_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:alpine3.10:amd64:
|
||||
<<: *alpine_3_10_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:alpine3.10:amd64
|
||||
needs: ["gcc:alpine3.10:amd64"]
|
||||
|
||||
unit:gcc:alpine3.10:amd64:
|
||||
<<: *alpine_3_10_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:alpine3.10:amd64
|
||||
needs: ["gcc:alpine3.10:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on CentOS 6 (amd64)
|
||||
|
||||
gcc:centos6:amd64:
|
||||
@@ -277,12 +315,14 @@ system:gcc:centos6:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:centos6:amd64
|
||||
needs: ["gcc:centos6:amd64"]
|
||||
|
||||
unit:gcc:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:centos6:amd64
|
||||
needs: ["gcc:centos6:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on CentOS 7 (amd64)
|
||||
|
||||
@@ -290,7 +330,7 @@ gcc:centos7:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -299,12 +339,14 @@ system:gcc:centos7:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:centos7:amd64
|
||||
needs: ["gcc:centos7:amd64"]
|
||||
|
||||
unit:gcc:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:centos7:amd64
|
||||
needs: ["gcc:centos7:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
|
||||
|
||||
@@ -321,12 +363,14 @@ system:gcc:jessie:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:jessie:amd64
|
||||
needs: ["gcc:jessie:amd64"]
|
||||
|
||||
unit:gcc:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:jessie:amd64
|
||||
needs: ["gcc:jessie:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
|
||||
|
||||
@@ -342,12 +386,37 @@ system:gcc:stretch:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:stretch:amd64
|
||||
needs: ["gcc:stretch:amd64"]
|
||||
|
||||
unit:gcc:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:stretch:amd64
|
||||
needs: ["gcc:stretch:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian 10 Buster (amd64)
|
||||
|
||||
gcc:buster:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_buster_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:buster:amd64:
|
||||
<<: *debian_buster_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:buster:amd64
|
||||
needs: ["gcc:buster:amd64"]
|
||||
|
||||
unit:gcc:buster:amd64:
|
||||
<<: *debian_buster_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:buster:amd64
|
||||
needs: ["gcc:buster:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian Sid (amd64)
|
||||
|
||||
@@ -355,7 +424,7 @@ gcc:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn22"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
|
||||
RUN_MAKE_INSTALL: 1
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
@@ -365,12 +434,14 @@ system:gcc:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:sid:amd64
|
||||
needs: ["gcc:sid:amd64"]
|
||||
|
||||
unit:gcc:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:sid:amd64
|
||||
needs: ["gcc:sid:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian Sid (i386)
|
||||
|
||||
@@ -378,7 +449,7 @@ gcc:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -387,34 +458,38 @@ system:gcc:sid:i386:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:sid:i386
|
||||
needs: ["gcc:sid:i386"]
|
||||
|
||||
unit:gcc:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:sid:i386
|
||||
needs: ["gcc:sid:i386"]
|
||||
|
||||
# Jobs for regular GCC builds on Fedora 29 (amd64)
|
||||
# Jobs for regular GCC builds on Fedora 30 (amd64)
|
||||
|
||||
gcc:fedora29:amd64:
|
||||
gcc:fedora30:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *fedora_29_amd64_image
|
||||
<<: *fedora_30_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:fedora29:amd64:
|
||||
<<: *fedora_29_amd64_image
|
||||
system:gcc:fedora30:amd64:
|
||||
<<: *fedora_30_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:fedora29:amd64
|
||||
- gcc:fedora30:amd64
|
||||
needs: ["gcc:fedora30:amd64"]
|
||||
|
||||
unit:gcc:fedora29:amd64:
|
||||
<<: *fedora_29_amd64_image
|
||||
unit:gcc:fedora30:amd64:
|
||||
<<: *fedora_30_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:fedora29:amd64
|
||||
- gcc:fedora30:amd64
|
||||
needs: ["gcc:fedora30:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
|
||||
|
||||
@@ -431,12 +506,14 @@ system:gcc:xenial:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:xenial:amd64
|
||||
needs: ["gcc:xenial:amd64"]
|
||||
|
||||
unit:gcc:xenial:amd64:
|
||||
<<: *ubuntu_xenial_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:xenial:amd64
|
||||
needs: ["gcc:xenial:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
|
||||
|
||||
@@ -453,12 +530,14 @@ system:gcc:bionic:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:bionic:amd64
|
||||
needs: ["gcc:bionic:amd64"]
|
||||
|
||||
unit:gcc:bionic:amd64:
|
||||
<<: *ubuntu_bionic_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:bionic:amd64
|
||||
needs: ["gcc:bionic:amd64"]
|
||||
|
||||
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
|
||||
|
||||
@@ -476,12 +555,14 @@ system:asan:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- asan:sid:amd64
|
||||
needs: ["asan:sid:amd64"]
|
||||
|
||||
unit:asan:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- asan:sid:amd64
|
||||
needs: ["asan:sid:amd64"]
|
||||
|
||||
rwlock:sid:amd64:
|
||||
variables:
|
||||
@@ -496,12 +577,14 @@ system:rwlock:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- rwlock:sid:amd64
|
||||
needs: ["rwlock:sid:amd64"]
|
||||
|
||||
unit:rwlock:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- rwlock:sid:amd64
|
||||
needs: ["rwlock:sid:amd64"]
|
||||
|
||||
# Jobs for mutex-based atomics on Debian SID (amd64)
|
||||
mutexatomics:sid:amd64:
|
||||
@@ -512,19 +595,20 @@ mutexatomics:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:mutexatomics:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- mutexatomics:sid:amd64
|
||||
allow_failure: true
|
||||
#system:mutexatomics:sid:amd64:
|
||||
# <<: *debian_sid_amd64_image
|
||||
# <<: *system_test_job
|
||||
# dependencies:
|
||||
# - mutexatomics:sid:amd64
|
||||
# - mutexatomics:sid:amd64
|
||||
# allow_failure: true
|
||||
|
||||
unit:mutexatomics:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- mutexatomics:sid:amd64
|
||||
allow_failure: true
|
||||
#unit:mutexatomics:sid:amd64:
|
||||
# <<: *debian_sid_amd64_image
|
||||
# <<: *unit_test_job
|
||||
# dependencies:
|
||||
# - mutexatomics:sid:amd64
|
||||
# allow_failure: true
|
||||
|
||||
# Jobs for Clang builds on Debian Stretch (amd64)
|
||||
|
||||
@@ -541,6 +625,7 @@ unit:clang:stretch:amd64:
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- clang:stretch:amd64
|
||||
needs: ["clang:stretch:amd64"]
|
||||
|
||||
# Jobs for Clang builds on Debian Stretch (i386)
|
||||
|
||||
@@ -567,12 +652,14 @@ system:pkcs11:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
needs: ["pkcs11:sid:amd64"]
|
||||
|
||||
unit:pkcs11:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
needs: ["pkcs11:sid:amd64"]
|
||||
|
||||
# Jobs with libtool disabled
|
||||
|
||||
@@ -589,9 +676,11 @@ system:nolibtool:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- nolibtool:sid:amd64
|
||||
needs: ["nolibtool:sid:amd64"]
|
||||
|
||||
unit:nolibtool:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- nolibtool:sid:amd64
|
||||
needs: ["nolibtool:sid:amd64"]
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
- [ ] Update tickets in case of waiting support customers.
|
||||
|
||||
## Marketing
|
||||
- [ ] Post short note to Twitter.
|
||||
- [ ] Update BIND Product page if needed
|
||||
- [ ] Update BIND Significant Features Matrix in KB if needed
|
||||
- [ ] Update BIND -S Edition data sheet if S Edition feature change
|
||||
- [ ] Announce on social media
|
||||
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
|
||||
- [ ] Write blog article (if a major release).
|
||||
|
||||
@@ -1,3 +1,68 @@
|
||||
5280. [protocol] Add support for displaying EDNS option LLQ. [GL #1201]
|
||||
|
||||
5279. [bug] When loading, reject zones containing CDS or CDNSKEY
|
||||
RRsets at the zone apex if they would cause DNSSEC
|
||||
validation failures if published in the parent zone
|
||||
as the DS RRset. [GL #1187]
|
||||
|
||||
5278. [func] Add YAML output formats for dig, mdig and delv;
|
||||
use the "+yaml" option to enable. [GL #1145]
|
||||
|
||||
--- 9.15.3 released ---
|
||||
|
||||
5277. [bug] Cache DB statistics could underflow when serve-stale
|
||||
was in use, because of a bug in counter maintenance
|
||||
when RRsets become stale.
|
||||
|
||||
Functions for dumping statistics have been updated
|
||||
to dump active, stale, and ancient statistic
|
||||
counters. Ancient RRset counters are prefixed
|
||||
with '~'; stale RRset counters are still prefixed
|
||||
with '#'. [GL #602]
|
||||
|
||||
5276. [func] DNSSEC Lookaside Validation (DLV) is now obsolete;
|
||||
all code enabling its use has been removed from the
|
||||
validator, "delv", and the DNSSEC tools. [GL #7]
|
||||
|
||||
5275. [bug] Mark DS records included in referral messages
|
||||
with trust level "pending" so that they can be
|
||||
validated and cached immediately, with no need to
|
||||
re-query. [GL #964]
|
||||
|
||||
5274. [bug] Address potential use after free race when shutting
|
||||
down rpz. [GL #1175]
|
||||
|
||||
5273. [bug] Check that bits [64..71] of a dns64 prefix are zero.
|
||||
[GL #1159]
|
||||
|
||||
5272. [cleanup] Remove isc-config.sh script as the BIND 9 libraries
|
||||
are now purely internal. [GL #1123]
|
||||
|
||||
5271. [func] The normal (non-debugging) output of dnssec-signzone
|
||||
and dnssec-verify tools now goes to stdout, instead of
|
||||
the combination of stderr and stdout.
|
||||
|
||||
5270. [bug] 'dig +expandaaaa +short' did not work. [GL #1152]
|
||||
|
||||
5269. [port] cygwin: can return ETIMEDOUT on connect() with a
|
||||
non-blocking socket. [GL #1133]
|
||||
|
||||
5268. [placeholder]
|
||||
|
||||
5267. [func] Allow statistics groups display to be toggleable.
|
||||
[GL #1030]
|
||||
|
||||
5266. [bug] named-checkconf failed to report dnstap-output
|
||||
missing from named.conf when dnstap was specified.
|
||||
[GL #1136]
|
||||
|
||||
5265. [bug] DNS64 and RPZ nodata (CNAME *.) rules interacted badly
|
||||
[GL #1106]
|
||||
|
||||
5264. [func] New DNS Cookie algorithm - siphash24 - has been added
|
||||
to BIND 9, and the old HMAC-SHA DNS Cookie algorithms
|
||||
have been removed. [GL #605]
|
||||
|
||||
--- 9.15.2 released ---
|
||||
|
||||
5263. [cleanup] Use atomics and isc_refcount_t wherever possible.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
CODE OF CONDUCT
|
||||
|
||||
BIND 9 Code of Conduct
|
||||
|
||||
Like the technical community as a whole, the BIND 9 team and community is
|
||||
made up of a mixture of professionals and volunteers from all over the
|
||||
world, working on every aspect of the mission - including mentorship,
|
||||
teaching, and connecting people.
|
||||
|
||||
Diversity is one of our huge strengths, but it can also lead to
|
||||
communication issues and unhappiness. To that end, we have a few ground
|
||||
rules that we ask people to adhere to. This code applies equally to the
|
||||
core development team, open source contributors and those seeking help and
|
||||
guidance.
|
||||
|
||||
This isn't an exhaustive list of things that you can't do. Rather, take it
|
||||
in the spirit in which it's intended - a guide to make it easier to enrich
|
||||
all of us and the technical communities in which we participate.
|
||||
|
||||
This code of conduct applies to all spaces managed by the BIND 9 project
|
||||
or Internet Systems Consortium. This includes chat, the mailing lists, the
|
||||
issue tracker, and any other fora created by the project team which the
|
||||
community uses for communication. In addition, violations of this code
|
||||
outside these spaces may affect a person's ability to participate within
|
||||
them.
|
||||
|
||||
If you believe someone is violating the code of conduct, we ask that you
|
||||
report it by emailing conduct@isc.org. For more details please see our
|
||||
Reporting Guidelines.
|
||||
|
||||
* Be friendly and patient.
|
||||
* Be welcoming. We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not
|
||||
limited to members of any race, ethnicity, culture, national origin,
|
||||
colour, immigration status, social and economic class, educational
|
||||
level, sex, sexual orientation, gender identity and expression, age,
|
||||
size, family status, political belief, religion, and mental and
|
||||
physical ability.
|
||||
* Be considerate. Your work will be used by other people, and you in
|
||||
turn will depend on the work of others. Any decision you take will
|
||||
affect users and colleagues, and you should take those consequences
|
||||
into account when making decisions. Remember that we're a world-wide
|
||||
community, so you might not be communicating in someone else's primary
|
||||
language.
|
||||
* Be respectful. Not all of us will agree all the time, but disagreement
|
||||
is no excuse for poor behavior and poor manners. We might all
|
||||
experience some frustration now and then, but we cannot allow that
|
||||
frustration to turn into a personal attack. It's important to remember
|
||||
that a community where people feel uncomfortable or threatened is not
|
||||
a productive one. Members of the BIND 9 community should be respectful
|
||||
when dealing with other members as well as with people outside the
|
||||
BIND 9 community.
|
||||
* Be careful in the words that you choose. We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to
|
||||
others. Do not insult or put down other participants. Harassment and
|
||||
other exclusionary behavior aren't acceptable. This includes, but is
|
||||
not limited to:
|
||||
+ Violent threats or language directed against another person.
|
||||
+ Discriminatory jokes and language.
|
||||
+ Posting sexually explicit or violent material.
|
||||
+ Posting (or threatening to post) other people's personally
|
||||
identifying information ("doxing").
|
||||
+ Personal insults, especially those using racist or sexist terms.
|
||||
+ Unwelcome sexual attention.
|
||||
+ Advocating for, or encouraging, any of the above behavior.
|
||||
+ Repeated harassment of others. In general, if someone asks you to
|
||||
stop, then stop.
|
||||
* When we disagree, try to understand why. Disagreements, both social
|
||||
and technical, happen all the time and BIND 9 is no exception. It is
|
||||
important that we resolve disagreements and differing views
|
||||
constructively. Remember that we're different. The strength of BIND 9
|
||||
comes from its varied community, people from a wide range of
|
||||
backgrounds. Different people have different perspectives on issues.
|
||||
Being unable to understand why someone holds a viewpoint doesn't mean
|
||||
that they're wrong. Don't forget that it is human to err and blaming
|
||||
each other doesn't get us anywhere. Instead, focus on helping to
|
||||
resolve issues and learning from mistakes.
|
||||
|
||||
Original text courtesy of the Django Code of Conduct project.
|
||||
@@ -0,0 +1,71 @@
|
||||
# BIND 9 Code of Conduct
|
||||
|
||||
Like the technical community as a whole, the BIND 9 team and community is made
|
||||
up of a mixture of professionals and volunteers from all over the world, working
|
||||
on every aspect of the mission - including mentorship, teaching, and connecting
|
||||
people.
|
||||
|
||||
Diversity is one of our huge strengths, but it can also lead to communication
|
||||
issues and unhappiness. To that end, we have a few ground rules that we ask
|
||||
people to adhere to. This code applies equally to the core development team, open source contributors and those
|
||||
seeking help and guidance.
|
||||
|
||||
This isn't an exhaustive list of things that you can't do. Rather, take it in
|
||||
the spirit in which it's intended - a guide to make it easier to enrich all of
|
||||
us and the technical communities in which we participate.
|
||||
|
||||
This code of conduct applies to all spaces managed by the BIND 9 project or
|
||||
Internet Systems Consortium. This includes chat, the mailing lists, the issue
|
||||
tracker, and any other fora created by the project team which the
|
||||
community uses for communication. In addition, violations of this code outside
|
||||
these spaces may affect a person's ability to participate within them.
|
||||
|
||||
If you believe someone is violating the code of conduct, we ask that you report
|
||||
it by emailing [conduct@isc.org](conduct@isc.org). For more details please see
|
||||
our [Reporting Guidelines](https://www.isc.org/conductreporting/).
|
||||
|
||||
* **Be friendly and patient.**
|
||||
* **Be welcoming.** We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not limited to
|
||||
members of any race, ethnicity, culture, national origin, colour, immigration
|
||||
status, social and economic class, educational level, sex, sexual orientation,
|
||||
gender identity and expression, age, size, family status, political belief,
|
||||
religion, and mental and physical ability.
|
||||
* **Be considerate.** Your work will be used by other people, and you in turn
|
||||
will depend on the work of others. Any decision you take will affect users and
|
||||
colleagues, and you should take those consequences into account when making
|
||||
decisions. Remember that we're a world-wide community, so you might not be
|
||||
communicating in someone else's primary language.
|
||||
* **Be respectful.** Not all of us will agree all the time, but disagreement is
|
||||
no excuse for poor behavior and poor manners. We might all experience some
|
||||
frustration now and then, but we cannot allow that frustration to turn into a
|
||||
personal attack. It's important to remember that a community where people feel
|
||||
uncomfortable or threatened is not a productive one. Members of the BIND 9
|
||||
community should be respectful when dealing with other members as well as with
|
||||
people outside the BIND 9 community.
|
||||
* **Be careful in the words that you choose.** We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to others. Do
|
||||
not insult or put down other participants. Harassment and other exclusionary
|
||||
behavior aren't acceptable. This includes, but is not limited to:
|
||||
* Violent threats or language directed against another person.
|
||||
* Discriminatory jokes and language.
|
||||
* Posting sexually explicit or violent material.
|
||||
* Posting (or threatening to post) other people's personally identifying
|
||||
information ("doxing").
|
||||
* Personal insults, especially those using racist or sexist terms.
|
||||
* Unwelcome sexual attention.
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Repeated harassment of others. In general, if someone asks you to stop, then
|
||||
stop.
|
||||
* **When we disagree, try to understand why.** Disagreements, both social and
|
||||
technical, happen all the time and BIND 9 is no exception. It is important
|
||||
that we resolve disagreements and differing views constructively. Remember
|
||||
that we're different. The strength of BIND 9 comes from its varied community,
|
||||
people from a wide range of backgrounds. Different people have different
|
||||
perspectives on issues. Being unable to understand why someone holds a
|
||||
viewpoint doesn't mean that they're wrong. Don't forget that it is human to
|
||||
err and blaming each other doesn't get us anywhere. Instead, focus on helping
|
||||
to resolve issues and learning from mistakes.
|
||||
|
||||
Original text courtesy of the [Django Code of Conduct](https://www.djangoproject.com/conduct/)
|
||||
project.
|
||||
@@ -34,6 +34,14 @@ access to the source repository was restricted just as commit access was.
|
||||
That's now changing, with the opening of a public git mirror to the BIND
|
||||
source tree (see below).
|
||||
|
||||
At Internet Systems Consortium, we're committed to building communities
|
||||
that are welcoming and inclusive; environments where people are encouraged
|
||||
to share ideas, treat each other with respect, and collaborate towards the
|
||||
best solutions. To reinforce our commitment, the Internet Systems
|
||||
Consortium has adopted the Contributor Covenant version 1.4 as our Code of
|
||||
Conduct for BIND 9 project, as well as for the conduct of our developers
|
||||
throughout the industry.
|
||||
|
||||
Access to source code
|
||||
|
||||
Public BIND releases are always available from the ISC FTP site.
|
||||
|
||||
+9
-1
@@ -41,6 +41,14 @@ a release: read access to the source repository was restricted just
|
||||
as commit access was. That's now changing, with the opening of a
|
||||
public git mirror to the BIND source tree (see below).
|
||||
|
||||
At [Internet Systems Consortium](https://www.isc.org), we're committed to
|
||||
building communities that are welcoming and inclusive; environments where people
|
||||
are encouraged to share ideas, treat each other with respect, and collaborate
|
||||
towards the best solutions. To reinforce our commitment, the [Internet Systems
|
||||
Consortium](https://www.isc.org) has adopted the Contributor Covenant version
|
||||
1.4 as our Code of Conduct for BIND 9 project, as well as for the conduct of our
|
||||
developers throughout the industry.
|
||||
|
||||
### <a name="access"></a>Access to source code
|
||||
|
||||
Public BIND releases are always available from the
|
||||
@@ -108,7 +116,7 @@ ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.
|
||||
If you have a crash, you may want to consult
|
||||
[‘What to do if your BIND or DHCP server has crashed.’](https://kb.isc.org/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
|
||||
|
||||
### <a name="bugs"></a>Contributing code
|
||||
### <a name="contrib"></a>Contributing code
|
||||
|
||||
BIND is licensed under the
|
||||
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
||||
|
||||
+8
-21
@@ -18,11 +18,7 @@ SUBDIRS = make lib fuzz bin doc
|
||||
TARGETS =
|
||||
PREREQS = bind.keys.h
|
||||
|
||||
MANPAGES = isc-config.sh.1
|
||||
|
||||
HTMLPAGES = isc-config.sh.html
|
||||
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \
|
||||
${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
@@ -35,7 +31,7 @@ bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
|
||||
|
||||
distclean::
|
||||
rm -f config.cache config.h config.log config.status TAGS
|
||||
rm -f libtool isc-config.sh configure.lineno
|
||||
rm -f libtool configure.lineno
|
||||
rm -f util/conf.sh docutil/docbook2man-wrapper.sh
|
||||
|
||||
# XXX we should clean libtool stuff too. Only do this after we add rules
|
||||
@@ -54,25 +50,11 @@ installdirs:
|
||||
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
||||
|
||||
install:: isc-config.sh installdirs
|
||||
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
@LN@ ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config
|
||||
${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
@LN@ ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
install:: installdirs
|
||||
${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${sysconfdir}/bind.keys
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
rm -f ${DESTDIR}${mandir}/man1/isc-config.sh.1
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
rm -f ${DESTDIR}${bindir}/isc-config.sh
|
||||
|
||||
tags:
|
||||
rm -f TAGS
|
||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||
|
||||
test check:
|
||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
|
||||
@@ -121,6 +103,11 @@ PLATFORMS: PLATFORMS.md
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html $< | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
unit::
|
||||
sh ${top_builddir}/unit/unittest.sh
|
||||
|
||||
|
||||
@@ -87,8 +87,9 @@ ISC maintains a public git repository for BIND; details can be found at
|
||||
http://www.isc.org/git/.
|
||||
|
||||
Information for BIND contributors can be found in the following files: -
|
||||
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
||||
- BIND architecture and developer guide: doc/dev/dev.md
|
||||
General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md
|
||||
- BIND 9 code style: doc/dev/style.md - BIND architecture and developer
|
||||
guide: doc/dev/dev.md
|
||||
|
||||
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
|
||||
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
||||
|
||||
@@ -98,7 +98,8 @@ ISC maintains a public git repository for BIND; details can be found
|
||||
at [http://www.isc.org/git/](http://www.isc.org/git/).
|
||||
|
||||
Information for BIND contributors can be found in the following files:
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING)
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
||||
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
|
||||
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
||||
|
||||
@@ -125,6 +126,7 @@ include:
|
||||
|
||||
* Support for the new GeoIP2 geolocation API
|
||||
* Improved DNSSEC key configuration using `dnssec-keys`
|
||||
* YAML output for dig, mdig, and delv.
|
||||
|
||||
### <a name="build"/> Building BIND
|
||||
|
||||
|
||||
Vendored
-1
@@ -375,7 +375,6 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
m4_include([m4/ax_check_compile_flag.m4])
|
||||
m4_include([m4/ax_check_link_flag.m4])
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/ax_posix_shell.m4])
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
|
||||
@@ -140,8 +140,6 @@ add(char *key, int value) {
|
||||
}
|
||||
|
||||
key = isc_mem_strdup(sym_mctx, key);
|
||||
if (key == NULL)
|
||||
return;
|
||||
|
||||
symvalue.as_pointer = NULL;
|
||||
result = isc_symtab_define(symtab, key, value, symvalue,
|
||||
@@ -666,7 +664,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
dns_zone_setdbtype(zone, 1, (const char * const *) dbtype);
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
if (journal != NULL)
|
||||
|
||||
@@ -222,8 +222,6 @@ main(int argc, char **argv) {
|
||||
if (suffix != NULL) {
|
||||
len = strlen(keyname) + strlen(suffix) + 2;
|
||||
keybuf = isc_mem_get(mctx, len);
|
||||
if (keybuf == NULL)
|
||||
fatal("failed to allocate memory for keyname");
|
||||
snprintf(keybuf, len, "%s.%s", keyname, suffix);
|
||||
keyname = (const char *) keybuf;
|
||||
}
|
||||
|
||||
@@ -222,8 +222,6 @@ main(int argc, char **argv) {
|
||||
char *buf;
|
||||
len = strlen(chrootdir) + strlen(keyfile) + 2;
|
||||
buf = isc_mem_get(mctx, len);
|
||||
if (buf == NULL)
|
||||
fatal("isc_mem_get(%d) failed\n", len);
|
||||
snprintf(buf, len, "%s%s%s", chrootdir,
|
||||
(*keyfile != '/') ? "/" : "", keyfile);
|
||||
|
||||
|
||||
+4
-15
@@ -53,7 +53,7 @@ is a tool for sending DNS queries and validating the results, using the same int
|
||||
\fBnamed\fR\&.
|
||||
.PP
|
||||
\fBdelv\fR
|
||||
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records to establish a chain of trust for DNSSEC validation\&. It does not perform iterative resolution, but simulates the behavior of a name server configured for DNSSEC validating and forwarding\&.
|
||||
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY and DS records to establish a chain of trust for DNSSEC validation\&. It does not perform iterative resolution, but simulates the behavior of a name server configured for DNSSEC validating and forwarding\&.
|
||||
.PP
|
||||
By default, responses are validated using built\-in DNSSEC trust anchor for the root zone ("\&.")\&. Records returned by
|
||||
\fBdelv\fR
|
||||
@@ -139,9 +139,7 @@ BIND
|
||||
.sp
|
||||
Keys that do not match the root zone name are ignored\&. An alternate key name can be specified using the
|
||||
\fB+root=NAME\fR
|
||||
options\&. DNSSEC Lookaside Validation can also be turned on by using the
|
||||
\fB+dlv=NAME\fR
|
||||
to specify the name of a zone containing DLV records\&.
|
||||
options\&.
|
||||
.sp
|
||||
Note: When reading the trust anchor file,
|
||||
\fBdelv\fR
|
||||
@@ -392,25 +390,16 @@ output\&. The default is to do so\&. Note that (unlike in
|
||||
control whether to request DNSSEC records or whether to validate them\&. DNSSEC records are always requested, and validation will always occur unless suppressed by the use of
|
||||
\fB\-i\fR
|
||||
or
|
||||
\fB+noroot\fR
|
||||
and
|
||||
\fB+nodlv\fR\&.
|
||||
\fB+noroot\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]root[=ROOT]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform conventional (non\-lookaside) DNSSEC validation, and if so, specifies the name of a trust anchor\&. The default is to validate using a trust anchor of "\&." (the root zone), for which there is a built\-in key\&. If specifying a different trust anchor, then
|
||||
Indicates whether to perform conventional DNSSEC validation, and if so, specifies the name of a trust anchor\&. The default is to validate using a trust anchor of "\&." (the root zone), for which there is a built\-in key\&. If specifying a different trust anchor, then
|
||||
\fB\-a\fR
|
||||
must be used to specify a file containing the key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dlv[=DLV]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform DNSSEC lookaside validation, and if so, specifies the name of the DLV trust anchor\&. The
|
||||
\fB\-a\fR
|
||||
option must also be used to specify a file containing the DLV key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Controls whether to use TCP when sending queries\&. The default is to use UDP unless a truncated response has been received\&.
|
||||
|
||||
+135
-117
@@ -111,7 +111,8 @@ static bool
|
||||
nottl = false,
|
||||
multiline = false,
|
||||
short_form = false,
|
||||
print_unknown_format = false;
|
||||
print_unknown_format = false,
|
||||
yaml = false;
|
||||
|
||||
static bool
|
||||
resolve_trace = false,
|
||||
@@ -125,18 +126,16 @@ static bool
|
||||
static bool
|
||||
cdflag = false,
|
||||
no_sigs = false,
|
||||
root_validation = true,
|
||||
dlv_validation = true;
|
||||
root_validation = true;
|
||||
|
||||
static bool use_tcp = false;
|
||||
|
||||
static char *anchorfile = NULL;
|
||||
static char *trust_anchor = NULL;
|
||||
static char *dlv_anchor = NULL;
|
||||
static int num_keys = 0;
|
||||
|
||||
static dns_fixedname_t afn, dfn;
|
||||
static dns_name_t *anchor_name = NULL, *dlv_name = NULL;
|
||||
static dns_fixedname_t afn;
|
||||
static dns_name_t *anchor_name = NULL;
|
||||
|
||||
/* Default bind.keys contents */
|
||||
static char anchortext[] = DNSSEC_KEYS;
|
||||
@@ -161,7 +160,7 @@ usage(void) {
|
||||
" q-opt is one of:\n"
|
||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||
" -d level (set debugging level)\n"
|
||||
" -a anchor-file (specify root and dlv trust anchors)\n"
|
||||
" -a anchor-file (specify root trust anchor)\n"
|
||||
" -b address[#port] (bind to source address/port)\n"
|
||||
" -p port (specify port number)\n"
|
||||
" -q name (specify query name)\n"
|
||||
@@ -181,7 +180,8 @@ usage(void) {
|
||||
" +[no]comments (Control display of comment lines)\n"
|
||||
" +[no]rrcomments (Control display of per-record "
|
||||
"comments)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 "
|
||||
"\"unknown\" format)\n"
|
||||
" +[no]short (Short form answer)\n"
|
||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||
" +[no]tcp (TCP mode)\n"
|
||||
@@ -190,7 +190,7 @@ usage(void) {
|
||||
" +[no]rtrace (Trace resolver fetches)\n"
|
||||
" +[no]mtrace (Trace messages received)\n"
|
||||
" +[no]vtrace (Trace validation process)\n"
|
||||
" +[no]dlv (DNSSEC lookaside validation anchor)\n"
|
||||
" +[no]dlv (Obsolete)\n"
|
||||
" +[no]root (DNSSEC validation trust anchor)\n"
|
||||
" +[no]dnssec (Display DNSSEC records)\n"
|
||||
" -h (print help and exit)\n"
|
||||
@@ -354,53 +354,80 @@ setup_logging(FILE *errout) {
|
||||
|
||||
static void
|
||||
print_status(dns_rdataset_t *rdataset) {
|
||||
const char *astr = "", *tstr = "";
|
||||
char buf[1024] = { 0 };
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
|
||||
if (!showtrust || !dns_rdataset_isassociated(rdataset))
|
||||
if (!showtrust || !dns_rdataset_isassociated(rdataset)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
astr = "negative response, ";
|
||||
buf[0] = '\0';
|
||||
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
|
||||
strlcat(buf, "negative response", sizeof(buf));
|
||||
strlcat(buf, (yaml ? "_" : ", "), sizeof(buf));
|
||||
}
|
||||
|
||||
switch (rdataset->trust) {
|
||||
case dns_trust_none:
|
||||
tstr = "untrusted";
|
||||
strlcat(buf, "untrusted", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_pending_additional:
|
||||
tstr = "signed additional data, pending validation";
|
||||
strlcat(buf, "signed additional data", sizeof(buf));
|
||||
if (!yaml) {
|
||||
strlcat(buf, ", ", sizeof(buf));
|
||||
}
|
||||
strlcat(buf, "pending validation", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_pending_answer:
|
||||
tstr = "signed answer, pending validation";
|
||||
strlcat(buf, "signed answer", sizeof(buf));
|
||||
if (!yaml) {
|
||||
strlcat(buf, ", ", sizeof(buf));
|
||||
}
|
||||
strlcat(buf, "pending validation", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_additional:
|
||||
tstr = "unsigned additional data";
|
||||
strlcat(buf, "unsigned additional data", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_glue:
|
||||
tstr = "glue data";
|
||||
strlcat(buf, "glue data", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_answer:
|
||||
if (root_validation || dlv_validation)
|
||||
tstr = "unsigned answer";
|
||||
else
|
||||
tstr = "answer not validated";
|
||||
if (root_validation) {
|
||||
strlcat(buf, "unsigned answer", sizeof(buf));
|
||||
} else {
|
||||
strlcat(buf, "answer not validated", sizeof(buf));
|
||||
}
|
||||
break;
|
||||
case dns_trust_authauthority:
|
||||
tstr = "authority data";
|
||||
strlcat(buf, "authority data", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_authanswer:
|
||||
tstr = "authoritative";
|
||||
strlcat(buf, "authoritative", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_secure:
|
||||
tstr = "fully validated";
|
||||
strlcat(buf, "fully validated", sizeof(buf));
|
||||
break;
|
||||
case dns_trust_ultimate:
|
||||
tstr = "ultimate trust";
|
||||
strlcat(buf, "ultimate trust", sizeof(buf));
|
||||
break;
|
||||
}
|
||||
|
||||
printf("; %s%s\n", astr, tstr);
|
||||
if (yaml) {
|
||||
char *p;
|
||||
|
||||
/* Convert spaces to underscores for YAML */
|
||||
for (p = buf; p != NULL && *p != '\0'; p++) {
|
||||
if (*p == ' ') {
|
||||
*p = '_';
|
||||
}
|
||||
}
|
||||
|
||||
printf(" - %s:\n", buf);
|
||||
} else {
|
||||
printf("; %s\n", buf);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
@@ -427,8 +454,9 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
if (first || rdataset->trust != trust) {
|
||||
if (!first && showtrust && !short_form)
|
||||
if (!first && showtrust && !short_form && !yaml) {
|
||||
putchar('\n');
|
||||
}
|
||||
print_status(rdataset);
|
||||
trust = rdataset->trust;
|
||||
first = false;
|
||||
@@ -436,8 +464,6 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
|
||||
do {
|
||||
t = isc_mem_get(mctx, len);
|
||||
if (t == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
isc_buffer_init(&target, t, len);
|
||||
if (short_form) {
|
||||
@@ -469,9 +495,11 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
dns_rdata_reset(&rdata);
|
||||
}
|
||||
} else {
|
||||
if ((rdataset->attributes &
|
||||
DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
if (!yaml && (rdataset->attributes &
|
||||
DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
{
|
||||
isc_buffer_putstr(&target, "; ");
|
||||
}
|
||||
|
||||
result = dns_master_rdatasettotext(owner, rdataset,
|
||||
style, &target);
|
||||
@@ -504,38 +532,52 @@ setup_style(dns_master_style_t **stylep) {
|
||||
REQUIRE(stylep != NULL || *stylep == NULL);
|
||||
|
||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||
if (showcomments)
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (rrcomments)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (nottl)
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
if (noclass)
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
if (nocrypto)
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (yaml) {
|
||||
styleflags |= DNS_STYLEFLAG_YAML;
|
||||
dns_master_indentstr = " ";
|
||||
dns_master_indent = 2;
|
||||
} else {
|
||||
if (showcomments) {
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
if (print_unknown_format) {
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
}
|
||||
if (rrcomments) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
if (nottl) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
}
|
||||
if (noclass) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
}
|
||||
if (nocrypto) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
}
|
||||
if (multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
}
|
||||
|
||||
if (multiline || (nottl && noclass))
|
||||
if (multiline || (nottl && noclass)) {
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else if (nottl || noclass)
|
||||
} else if (nottl || noclass) {
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else
|
||||
} else {
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
*stylep = style;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -577,30 +619,30 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
dns_fixedname_t fkeyname;
|
||||
dns_name_t *keyname;
|
||||
isc_result_t result;
|
||||
bool match_root = false, match_dlv = false;
|
||||
bool match_root = false;
|
||||
|
||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
|
||||
|
||||
if (!root_validation && !dlv_validation)
|
||||
if (!root_validation) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (anchor_name)
|
||||
if (anchor_name) {
|
||||
match_root = dns_name_equal(keyname, anchor_name);
|
||||
if (dlv_name)
|
||||
match_dlv = dns_name_equal(keyname, dlv_name);
|
||||
}
|
||||
|
||||
if (!match_root && !match_dlv)
|
||||
if (!match_root) {
|
||||
return (ISC_R_SUCCESS);
|
||||
if ((!root_validation && match_root) || (!dlv_validation && match_dlv))
|
||||
}
|
||||
if (!root_validation && match_root) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (match_root)
|
||||
if (match_root) {
|
||||
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s",
|
||||
trust_anchor);
|
||||
if (match_dlv)
|
||||
delv_log(ISC_LOG_DEBUG(3), "adding DLV trust anchor %s",
|
||||
dlv_anchor);
|
||||
}
|
||||
|
||||
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
|
||||
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
|
||||
@@ -699,7 +741,7 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
cfg_obj_t *bindkeys = NULL;
|
||||
const char *filename = anchorfile;
|
||||
|
||||
if (!root_validation && !dlv_validation) {
|
||||
if (!root_validation) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -716,17 +758,11 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
|
||||
if (trust_anchor == NULL) {
|
||||
trust_anchor = isc_mem_strdup(mctx, ".");
|
||||
if (trust_anchor == NULL) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
}
|
||||
|
||||
if (trust_anchor != NULL) {
|
||||
CHECK(convert_name(&afn, &anchor_name, trust_anchor));
|
||||
}
|
||||
if (dlv_anchor != NULL) {
|
||||
CHECK(convert_name(&dfn, &dlv_name, dlv_anchor));
|
||||
}
|
||||
|
||||
CHECK(cfg_parser_create(mctx, dns_lctx, &parser));
|
||||
|
||||
@@ -777,11 +813,6 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
fatal("No trusted keys were loaded");
|
||||
}
|
||||
|
||||
if (dlv_validation) {
|
||||
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
||||
}
|
||||
|
||||
|
||||
cleanup:
|
||||
if (bindkeys != NULL) {
|
||||
cfg_obj_destroy(parser, &bindkeys);
|
||||
@@ -819,8 +850,6 @@ addserver(dns_client_t *client) {
|
||||
fatal("Use of IPv4 disabled by -6");
|
||||
}
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
ISC_LINK_INIT(sa, link);
|
||||
isc_sockaddr_fromin(sa, &in4, destport);
|
||||
ISC_LIST_APPEND(servers, sa, link);
|
||||
@@ -829,8 +858,6 @@ addserver(dns_client_t *client) {
|
||||
fatal("Use of IPv6 disabled by -4");
|
||||
}
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
ISC_LINK_INIT(sa, link);
|
||||
isc_sockaddr_fromin6(sa, &in6, destport);
|
||||
ISC_LIST_APPEND(servers, sa, link);
|
||||
@@ -858,10 +885,6 @@ addserver(dns_client_t *client) {
|
||||
cur->ai_family != AF_INET6)
|
||||
continue;
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
break;
|
||||
}
|
||||
memset(sa, 0, sizeof(*sa));
|
||||
ISC_LINK_INIT(sa, link);
|
||||
memmove(&sa->type, cur->ai_addr, cur->ai_addrlen);
|
||||
@@ -934,10 +957,6 @@ findserver(dns_client_t *client) {
|
||||
struct in_addr localhost;
|
||||
localhost.s_addr = htonl(INADDR_LOOPBACK);
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_sockaddr_fromin(sa, &localhost, destport);
|
||||
|
||||
ISC_LINK_INIT(sa, link);
|
||||
@@ -946,10 +965,6 @@ findserver(dns_client_t *client) {
|
||||
|
||||
if (use_ipv6) {
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_sockaddr_fromin6(sa, &in6addr_loopback, destport);
|
||||
|
||||
ISC_LINK_INIT(sa, link);
|
||||
@@ -1045,13 +1060,10 @@ plus_option(char *option) {
|
||||
switch (cmd[1]) {
|
||||
case 'l': /* dlv */
|
||||
FULLCHECK("dlv");
|
||||
if (state && no_sigs)
|
||||
break;
|
||||
dlv_validation = state;
|
||||
if (value != NULL) {
|
||||
dlv_anchor = isc_mem_strdup(mctx, value);
|
||||
if (dlv_anchor == NULL)
|
||||
fatal("out of memory");
|
||||
if (state) {
|
||||
fprintf(stderr, "Invalid option: "
|
||||
"+dlv is obsolete\n");
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
case 'n': /* dnssec */
|
||||
@@ -1086,8 +1098,6 @@ plus_option(char *option) {
|
||||
root_validation = state;
|
||||
if (value != NULL) {
|
||||
trust_anchor = isc_mem_strdup(mctx, value);
|
||||
if (trust_anchor == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
break;
|
||||
case 'r': /* rrcomments */
|
||||
@@ -1175,6 +1185,13 @@ plus_option(char *option) {
|
||||
if (state)
|
||||
resolve_trace = state;
|
||||
break;
|
||||
case 'y': /* yaml */
|
||||
FULLCHECK("yaml");
|
||||
yaml = state;
|
||||
if (state) {
|
||||
rrcomments = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
invalid_option:
|
||||
/*
|
||||
@@ -1238,7 +1255,6 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
/* NOTREACHED */
|
||||
case 'i':
|
||||
no_sigs = true;
|
||||
dlv_validation = false;
|
||||
root_validation = false;
|
||||
break;
|
||||
case 'm':
|
||||
@@ -1270,8 +1286,6 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
anchorfile = isc_mem_strdup(mctx, value);
|
||||
if (anchorfile == NULL)
|
||||
fatal("out of memory");
|
||||
return (value_from_next);
|
||||
case 'b':
|
||||
hash = strchr(value, '#');
|
||||
@@ -1335,8 +1349,6 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
isc_mem_free(mctx, curqname);
|
||||
}
|
||||
curqname = isc_mem_strdup(mctx, value);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
return (value_from_next);
|
||||
case 't':
|
||||
*open_type_class = false;
|
||||
@@ -1364,8 +1376,6 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
warn("extra query name");
|
||||
}
|
||||
curqname = isc_mem_strdup(mctx, textname);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
if (typeset)
|
||||
warn("extra query type");
|
||||
qtype = dns_rdatatype_ptr;
|
||||
@@ -1512,8 +1522,6 @@ parse_args(int argc, char **argv) {
|
||||
|
||||
if (curqname == NULL) {
|
||||
curqname = isc_mem_strdup(mctx, argv[0]);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1527,8 +1535,6 @@ parse_args(int argc, char **argv) {
|
||||
|
||||
if (curqname == NULL) {
|
||||
qname = isc_mem_strdup(mctx, ".");
|
||||
if (qname == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
if (!typeset)
|
||||
qtype = dns_rdatatype_ns;
|
||||
@@ -1612,6 +1618,7 @@ main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
dns_fixedname_t qfn;
|
||||
dns_name_t *query_name, *response_name;
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_namelist_t namelist;
|
||||
unsigned int resopt, clopt;
|
||||
@@ -1683,22 +1690,35 @@ main(int argc, char *argv[]) {
|
||||
|
||||
/* Set up resolution options */
|
||||
resopt = DNS_CLIENTRESOPT_ALLOWRUN | DNS_CLIENTRESOPT_NOCDFLAG;
|
||||
if (no_sigs)
|
||||
if (no_sigs) {
|
||||
resopt |= DNS_CLIENTRESOPT_NODNSSEC;
|
||||
if (!root_validation && !dlv_validation)
|
||||
}
|
||||
if (!root_validation) {
|
||||
resopt |= DNS_CLIENTRESOPT_NOVALIDATE;
|
||||
if (cdflag)
|
||||
}
|
||||
if (cdflag) {
|
||||
resopt &= ~DNS_CLIENTRESOPT_NOCDFLAG;
|
||||
if (use_tcp)
|
||||
}
|
||||
if (use_tcp) {
|
||||
resopt |= DNS_CLIENTRESOPT_TCP;
|
||||
}
|
||||
|
||||
/* Perform resolution */
|
||||
ISC_LIST_INIT(namelist);
|
||||
result = dns_client_resolve(client, query_name, dns_rdataclass_in,
|
||||
qtype, resopt, &namelist);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS && !yaml) {
|
||||
delv_log(ISC_LOG_ERROR, "resolution failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
if (yaml) {
|
||||
printf("type: DELV_RESULT\n");
|
||||
dns_name_format(query_name, namestr, sizeof(namestr));
|
||||
printf("query_name: %s\n", namestr);
|
||||
printf("status: %s\n", isc_result_totext(result));
|
||||
printf("records:\n");
|
||||
}
|
||||
|
||||
for (response_name = ISC_LIST_HEAD(namelist);
|
||||
response_name != NULL;
|
||||
@@ -1715,8 +1735,6 @@ main(int argc, char *argv[]) {
|
||||
dns_client_freeresanswer(client, &namelist);
|
||||
|
||||
cleanup:
|
||||
if (dlv_anchor != NULL)
|
||||
isc_mem_free(mctx, dlv_anchor);
|
||||
if (trust_anchor != NULL)
|
||||
isc_mem_free(mctx, trust_anchor);
|
||||
if (anchorfile != NULL)
|
||||
|
||||
+14
-20
@@ -96,7 +96,7 @@
|
||||
<command>delv</command> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
CNAME or DNAME chains, and queries for DNSKEY and DS records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
@@ -211,10 +211,7 @@
|
||||
<para>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<option>+root=NAME</option> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<option>+dlv=NAME</option> to specify the name of a
|
||||
zone containing DLV records.
|
||||
<option>+root=NAME</option> options.
|
||||
</para>
|
||||
<para>
|
||||
Note: When reading the trust anchor file,
|
||||
@@ -620,8 +617,7 @@
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<option>-i</option> or <option>+noroot</option> and
|
||||
<option>+nodlv</option>.
|
||||
<option>-i</option> or <option>+noroot</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -630,7 +626,7 @@
|
||||
<term><option>+[no]root[=ROOT]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
Indicates whether to perform conventional
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
@@ -641,18 +637,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]dlv[=DLV]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <option>-a</option> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]tcp</option></term>
|
||||
<listitem>
|
||||
@@ -674,6 +658,16 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]yaml</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print response data in YAML format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
+4
-17
@@ -83,7 +83,7 @@
|
||||
<span class="command"><strong>delv</strong></span> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
CNAME or DNAME chains, and queries for DNSKEY and DS records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
@@ -193,10 +193,7 @@
|
||||
<p>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<code class="option">+root=NAME</code> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<code class="option">+dlv=NAME</code> to specify the name of a
|
||||
zone containing DLV records.
|
||||
<code class="option">+root=NAME</code> options.
|
||||
</p>
|
||||
<p>
|
||||
Note: When reading the trust anchor file,
|
||||
@@ -520,14 +517,13 @@
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<code class="option">-i</code> or <code class="option">+noroot</code> and
|
||||
<code class="option">+nodlv</code>.
|
||||
<code class="option">-i</code> or <code class="option">+noroot</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
Indicates whether to perform conventional
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
@@ -536,15 +532,6 @@
|
||||
containing the key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]dlv[=DLV]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <code class="option">-a</code> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
+13
-7
@@ -361,14 +361,20 @@ Display [do not display] the CLASS when printing the record\&.
|
||||
.PP
|
||||
\fB+[no]cmd\fR
|
||||
.RS 4
|
||||
Toggles the printing of the initial comment in the output identifying the version of
|
||||
Toggles the printing of the initial comment in the output, identifying the version of
|
||||
\fBdig\fR
|
||||
and the query options that have been applied\&. This comment is printed by default\&.
|
||||
and the query options that have been applied\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. The default is to print this comment\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]comments\fR
|
||||
.RS 4
|
||||
Toggle the display of comment lines in the output\&. The default is to print comments\&.
|
||||
Toggles the display of some comment lines in the output, containing information about the packet header and OPT pseudosection, and the names of the response section\&. The default is to print these comments\&.
|
||||
.sp
|
||||
Other types of comments in the output are not affected by this option, but can be controlled using other command line switches\&. These include
|
||||
\fB+[no]cmd\fR,
|
||||
\fB+[no]question\fR,
|
||||
\fB+[no]stats\fR, and
|
||||
\fB+[no]rrcomments\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cookie\fR\fB[=####]\fR
|
||||
@@ -566,12 +572,12 @@ would cause a 48\-byte query to be padded to 64 bytes\&. The default block size
|
||||
.PP
|
||||
\fB+[no]qr\fR
|
||||
.RS 4
|
||||
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
|
||||
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]question\fR
|
||||
.RS 4
|
||||
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
Toggles the display of the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]raflag\fR
|
||||
@@ -624,7 +630,7 @@ determines if the name will be treated as relative or not and hence whether a se
|
||||
.PP
|
||||
\fB+[no]short\fR
|
||||
.RS 4
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]showsearch\fR
|
||||
@@ -654,7 +660,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
|
||||
.PP
|
||||
\fB+[no]stats\fR
|
||||
.RS 4
|
||||
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
|
||||
Toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics as a comment after each lookup\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]subnet=addr[/prefix\-length]\fR
|
||||
|
||||
+239
-59
@@ -64,7 +64,8 @@ static char hexcookie[81];
|
||||
|
||||
static bool short_form = false, printcmd = true,
|
||||
plusquest = false, pluscomm = false,
|
||||
ipv4only = false, ipv6only = false, digrc = true;
|
||||
ipv4only = false, ipv6only = false, digrc = true,
|
||||
yaml = false;
|
||||
static uint32_t splitwidth = 0xffffffff;
|
||||
|
||||
/*% opcode text */
|
||||
@@ -173,11 +174,13 @@ help(void) {
|
||||
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
|
||||
" +[no]cdflag (Set checking disabled flag in query)\n"
|
||||
" +[no]class (Control display of class in records)\n"
|
||||
" +[no]cmd (Control display of command line)\n"
|
||||
" +[no]comments (Control display of comment lines)\n"
|
||||
" +[no]cmd (Control display of command line -\n"
|
||||
" global option)\n"
|
||||
" +[no]comments (Control display of packet header\n"
|
||||
" and section name comments)\n"
|
||||
" +[no]cookie (Add a COOKIE option to the request)\n"
|
||||
" +[no]crypto (Control display of cryptographic "
|
||||
"fields in records)\n"
|
||||
" +[no]crypto (Control display of cryptographic\n"
|
||||
" fields in records)\n"
|
||||
" +[no]defname (Use search list (+[no]search))\n"
|
||||
" +[no]dnssec (Request DNSSEC records)\n"
|
||||
" +domain=### (Set default domainname)\n"
|
||||
@@ -194,11 +197,13 @@ help(void) {
|
||||
" +[no]identify (ID responders in short answers)\n"
|
||||
#ifdef HAVE_LIBIDN2
|
||||
" +[no]idnin (Parse IDN names [default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response [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"
|
||||
" +[no]keepopen (Keep the TCP socket open between "
|
||||
"queries)\n"
|
||||
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
|
||||
" +[no]multiline (Print records in an expanded format)\n"
|
||||
" +ndots=### (Set search NDOTS value)\n"
|
||||
@@ -217,7 +222,7 @@ help(void) {
|
||||
"comments)\n"
|
||||
" +[no]search (Set whether to use searchlist)\n"
|
||||
" +[no]short (Display nothing except short\n"
|
||||
" form of answer)\n"
|
||||
" form of answers - global option)\n"
|
||||
" +[no]showsearch (Search with intermediate results)\n"
|
||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||
" +[no]stats (Control display of statistics)\n"
|
||||
@@ -225,11 +230,13 @@ help(void) {
|
||||
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
||||
" +[no]tcp (TCP mode (+[no]vc))\n"
|
||||
" +timeout=### (Set query timeout) [5]\n"
|
||||
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
||||
" +[no]trace (Trace delegation down from root "
|
||||
"[+dnssec])\n"
|
||||
" +tries=### (Set number of UDP attempts) [3]\n"
|
||||
" +[no]ttlid (Control display of ttls in records)\n"
|
||||
" +[no]ttlunits (Display TTLs in human-readable units)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
|
||||
"format)\n"
|
||||
" +[no]vc (TCP mode (+[no]tcp))\n"
|
||||
" +[no]zflag (Set Z flag in query)\n"
|
||||
" global d-opts and servers (before host name) affect all queries.\n"
|
||||
@@ -256,7 +263,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
|
||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||
|
||||
if (query->lookup->stats && !short_form) {
|
||||
if (short_form || yaml) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (query->lookup->stats) {
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (query->lookup->use_usec)
|
||||
printf(";; Query time: %ld usec\n", (long) diff);
|
||||
@@ -277,11 +288,15 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
*/
|
||||
if (wcsftime(time_str, sizeof(time_str)/sizeof(time_str[0]),
|
||||
L"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
||||
{
|
||||
printf(";; WHEN: %ls\n", time_str);
|
||||
}
|
||||
#else
|
||||
if (strftime(time_str, sizeof(time_str),
|
||||
"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
||||
{
|
||||
printf(";; WHEN: %s\n", time_str);
|
||||
}
|
||||
#endif
|
||||
if (query->lookup->doing_xfr) {
|
||||
printf(";; XFR size: %u records (messages %u, "
|
||||
@@ -292,30 +307,32 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
||||
}
|
||||
if (tsigkey != NULL) {
|
||||
if (!validated)
|
||||
if (!validated) {
|
||||
puts(";; WARNING -- Some TSIG could not "
|
||||
"be validated");
|
||||
}
|
||||
}
|
||||
if ((tsigkey == NULL) && (keysecret[0] != 0)) {
|
||||
puts(";; WARNING -- TSIG key was not used.");
|
||||
}
|
||||
puts("");
|
||||
} else if (query->lookup->identify && !short_form) {
|
||||
} else if (query->lookup->identify) {
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (query->lookup->use_usec)
|
||||
if (query->lookup->use_usec) {
|
||||
printf(";; Received %" PRIu64 " bytes "
|
||||
"from %s(%s) in %ld us\n\n",
|
||||
query->lookup->doing_xfr
|
||||
? query->byte_count
|
||||
: (uint64_t)bytes,
|
||||
fromtext, query->userarg, (long) diff);
|
||||
else
|
||||
} else {
|
||||
printf(";; Received %" PRIu64 " bytes "
|
||||
"from %s(%s) in %ld ms\n\n",
|
||||
query->lookup->doing_xfr
|
||||
? query->byte_count
|
||||
: (uint64_t)bytes,
|
||||
fromtext, query->userarg, (long) diff / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,20 +371,24 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (query->lookup->print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (query->lookup->expandaaaa)
|
||||
styleflags |= DNS_STYLEFLAG_EXPANDAAAA;
|
||||
result = dns_rdata_tofmttext(rdata, NULL, styleflags, 0,
|
||||
splitwidth, " ", buf);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
return (result);
|
||||
}
|
||||
check_result(result, "dns_rdata_totext");
|
||||
if (query->lookup->identify) {
|
||||
|
||||
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 %" PRIu64 " us.", diff);
|
||||
snprintf(store, sizeof(store),
|
||||
" in %" PRIu64 " us.", diff);
|
||||
} else {
|
||||
snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000);
|
||||
snprintf(store, sizeof(store),
|
||||
" in %" PRIu64 " ms.", diff / 1000);
|
||||
}
|
||||
ADD_STRING(buf, store);
|
||||
}
|
||||
@@ -407,8 +428,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
||||
loopresult = dns_rdataset_first(rdataset);
|
||||
while (loopresult == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = say_message(&rdata, query,
|
||||
buf);
|
||||
result = say_message(&rdata, query, buf);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (result);
|
||||
check_result(result, "say_message");
|
||||
@@ -450,62 +470,85 @@ isdotlocal(dns_message_t *msg) {
|
||||
* Callback from dighost.c to print the reply from a server
|
||||
*/
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_messagetextflag_t flags;
|
||||
isc_buffer_t *buf = NULL;
|
||||
unsigned int len = OUTPUTBUF;
|
||||
dns_master_style_t *style = NULL;
|
||||
unsigned int styleflags = 0;
|
||||
bool isquery = (msg == query->lookup->sendmsg);
|
||||
|
||||
UNUSED(msgbuf);
|
||||
|
||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||
if (query->lookup->comments)
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (query->lookup->print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
/* Turn on rrcomments if explicitly enabled */
|
||||
if (query->lookup->rrcomments > 0)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (query->lookup->ttlunits)
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
if (query->lookup->nottl)
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
if (query->lookup->noclass)
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
if (query->lookup->nocrypto)
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (query->lookup->expandaaaa)
|
||||
styleflags |= DNS_STYLEFLAG_EXPANDAAAA;
|
||||
if (query->lookup->multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
|
||||
styleflags |= DNS_STYLEFLAG_REL_DATA;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (query->lookup->rrcomments >= 0)
|
||||
if (yaml) {
|
||||
dns_master_indentstr = " ";
|
||||
dns_master_indent = 3;
|
||||
styleflags |= DNS_STYLEFLAG_YAML;
|
||||
} else {
|
||||
if (query->lookup->comments) {
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
if (query->lookup->print_unknown_format) {
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
}
|
||||
/* Turn on rrcomments if explicitly enabled */
|
||||
if (query->lookup->rrcomments > 0) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
if (query->lookup->ttlunits) {
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
}
|
||||
if (query->lookup->nottl) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
}
|
||||
if (query->lookup->noclass) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
}
|
||||
if (query->lookup->nocrypto) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
}
|
||||
if (query->lookup->expandaaaa) {
|
||||
styleflags |= DNS_STYLEFLAG_EXPANDAAAA;
|
||||
}
|
||||
if (query->lookup->multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
|
||||
styleflags |= DNS_STYLEFLAG_REL_DATA;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (query->lookup->rrcomments >= 0) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (query->lookup->multiline ||
|
||||
(query->lookup->nottl && query->lookup->noclass))
|
||||
{
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else if (query->lookup->nottl || query->lookup->noclass)
|
||||
} else if (query->lookup->nottl || query->lookup->noclass) {
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else
|
||||
} else {
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
}
|
||||
check_result(result, "dns_master_stylecreate");
|
||||
|
||||
if (query->lookup->cmdline[0] != 0) {
|
||||
if (!short_form)
|
||||
if (!short_form && printcmd) {
|
||||
fputs(query->lookup->cmdline, stdout);
|
||||
query->lookup->cmdline[0]=0;
|
||||
}
|
||||
query->lookup->cmdline[0] = '\0';
|
||||
}
|
||||
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
|
||||
query->lookup->comments ? "comments" : "nocomments",
|
||||
@@ -526,13 +569,110 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
result = isc_buffer_allocate(mctx, &buf, len);
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
|
||||
if (query->lookup->comments && !short_form) {
|
||||
if (query->lookup->cmdline[0] != 0)
|
||||
if (yaml) {
|
||||
enum { Q = 0x1, R = 0x2 }; /* Q:query; R:ecursive */
|
||||
unsigned int tflag = 0;
|
||||
isc_sockaddr_t saddr;
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
uint16_t sport;
|
||||
char *hash;
|
||||
int pf;
|
||||
|
||||
printf("-\n");
|
||||
printf(" type: MESSAGE\n");
|
||||
printf(" message:\n");
|
||||
|
||||
if (isquery) {
|
||||
tflag |= Q;
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
|
||||
tflag |= R;
|
||||
}
|
||||
} else if (((msg->flags & DNS_MESSAGEFLAG_RD) != 0) &&
|
||||
((msg->flags & DNS_MESSAGEFLAG_RA) != 0))
|
||||
{
|
||||
tflag |= R;
|
||||
}
|
||||
|
||||
if (tflag == (Q|R)) {
|
||||
printf(" type: RECURSIVE_QUERY\n");
|
||||
} else if (tflag == Q) {
|
||||
printf(" type: AUTH_QUERY\n");
|
||||
} else if (tflag == R) {
|
||||
printf(" type: RECURSIVE_RESPONSE\n");
|
||||
} else {
|
||||
printf(" type: AUTH_RESPONSE\n");
|
||||
}
|
||||
|
||||
if (!isc_time_isepoch(&query->time_sent)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_sent,
|
||||
tbuf, sizeof(tbuf));
|
||||
printf(" query_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
if (!isquery && !isc_time_isepoch(&query->time_recv)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_recv,
|
||||
tbuf, sizeof(tbuf));
|
||||
printf(" response_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
printf(" message_size: %ub\n",
|
||||
isc_buffer_usedlength(msgbuf));
|
||||
|
||||
pf = isc_sockaddr_pf(&query->sockaddr);
|
||||
if (pf == PF_INET || pf == PF_INET6) {
|
||||
printf(" socket_family: %s\n",
|
||||
pf == PF_INET ? "INET" : "INET6");
|
||||
|
||||
printf(" socket_protocol: %s\n",
|
||||
query->lookup->tcp_mode ? "TCP" : "UDP");
|
||||
|
||||
sport = isc_sockaddr_getport(&query->sockaddr);
|
||||
isc_sockaddr_format(&query->sockaddr,
|
||||
sockstr, sizeof(sockstr));
|
||||
hash = strchr(sockstr, '#');
|
||||
if (hash != NULL) {
|
||||
*hash = '\0';
|
||||
}
|
||||
if (strcmp(sockstr, "::") == 0) {
|
||||
strlcat(sockstr, "0", sizeof(sockstr));
|
||||
}
|
||||
|
||||
printf(" response_address: %s\n", sockstr);
|
||||
printf(" response_port: %u\n", sport);
|
||||
}
|
||||
|
||||
if (query->sock != NULL &&
|
||||
isc_socket_getsockname(query->sock, &saddr)
|
||||
== ISC_R_SUCCESS)
|
||||
{
|
||||
sport = isc_sockaddr_getport(&saddr);
|
||||
isc_sockaddr_format(&saddr, sockstr, sizeof(sockstr));
|
||||
hash = strchr(sockstr, '#');
|
||||
if (hash != NULL) {
|
||||
*hash = '\0';
|
||||
}
|
||||
if (strcmp(sockstr, "::") == 0) {
|
||||
strlcat(sockstr, "0", sizeof(sockstr));
|
||||
}
|
||||
|
||||
printf(" query_address: %s\n", sockstr);
|
||||
printf(" query_port: %u\n", sport);
|
||||
}
|
||||
|
||||
printf(" %s:\n", isquery ? "query_message_data"
|
||||
: "response_message_data");
|
||||
result = dns_message_headertotext(msg, style, flags, buf);
|
||||
} else if (query->lookup->comments && !short_form) {
|
||||
if (query->lookup->cmdline[0] != '\0' && printcmd) {
|
||||
printf("; %s\n", query->lookup->cmdline);
|
||||
if (msg == query->lookup->sendmsg)
|
||||
}
|
||||
if (msg == query->lookup->sendmsg) {
|
||||
printf(";; Sending:\n");
|
||||
else
|
||||
} else {
|
||||
printf(";; Got answer:\n");
|
||||
}
|
||||
|
||||
if (headers) {
|
||||
if (isdotlocal(msg)) {
|
||||
@@ -677,8 +817,9 @@ buftoosmall:
|
||||
}
|
||||
}
|
||||
|
||||
if (headers && query->lookup->comments && !short_form)
|
||||
if (headers && query->lookup->comments && !short_form && !yaml) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("%.*s", (int)isc_buffer_usedlength(buf),
|
||||
(char *)isc_buffer_base(buf));
|
||||
@@ -1536,6 +1677,15 @@ plus_option(char *option, bool is_batchfile,
|
||||
lookup->tcp_mode_set = true;
|
||||
}
|
||||
break;
|
||||
case 'y': /* yaml */
|
||||
FULLCHECK("yaml");
|
||||
yaml = state;
|
||||
if (state) {
|
||||
printcmd = false;
|
||||
lookup->stats = false;
|
||||
lookup->rrcomments = -1;
|
||||
}
|
||||
break;
|
||||
case 'z': /* zflag */
|
||||
FULLCHECK("zflag");
|
||||
lookup->zflag = state;
|
||||
@@ -2248,8 +2398,37 @@ query_finished(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void dig_setup(int argc, char **argv)
|
||||
{
|
||||
static void
|
||||
dig_error(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
if (yaml) {
|
||||
printf("-\n");
|
||||
printf(" type: DIG_ERROR\n");
|
||||
|
||||
/*
|
||||
* Print an indent before a literal block quote.
|
||||
* Note: this will break if used to print more than
|
||||
* one line of text as only the first line would be
|
||||
* indented.
|
||||
*/
|
||||
printf(" message: |\n");
|
||||
printf(" ");
|
||||
} else {
|
||||
printf(";; ");
|
||||
}
|
||||
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
|
||||
if (!yaml) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dig_setup(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
|
||||
ISC_LIST_INIT(lookup_list);
|
||||
@@ -2263,6 +2442,7 @@ void dig_setup(int argc, char **argv)
|
||||
dighost_received = received;
|
||||
dighost_trying = trying;
|
||||
dighost_shutdown = query_finished;
|
||||
dighost_error = dig_error;
|
||||
|
||||
progname = argv[0];
|
||||
preparse_args(argc, argv);
|
||||
|
||||
+36
-13
@@ -593,9 +593,11 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the printing of the initial comment in the
|
||||
output identifying the version of <command>dig</command>
|
||||
and the query options that have been applied. This
|
||||
comment is printed by default.
|
||||
output, identifying the version of <command>dig</command>
|
||||
and the query options that have been applied. This option
|
||||
always has global effect; it cannot be set globally
|
||||
and then overridden on a per-lookup basis. The default
|
||||
is to print this comment.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -604,8 +606,18 @@
|
||||
<term><option>+[no]comments</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle the display of comment lines in the output.
|
||||
The default is to print comments.
|
||||
Toggles the display of some comment lines in the output,
|
||||
containing information about the packet header and
|
||||
OPT pseudosection, and the names of the response
|
||||
section. The default is to print these comments.
|
||||
</para>
|
||||
<para>
|
||||
Other types of comments in the output are not affected by
|
||||
this option, but can be controlled using other command
|
||||
line switches. These include <command>+[no]cmd</command>,
|
||||
<command>+[no]question</command>,
|
||||
<command>+[no]stats</command>, and
|
||||
<command>+[no]rrcomments</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -965,8 +977,8 @@
|
||||
<term><option>+[no]qr</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print [do not print] the query as it is sent. By
|
||||
default, the query is not printed.
|
||||
Toggles the display of the query message as it is sent.
|
||||
By default, the query is not printed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -975,7 +987,7 @@
|
||||
<term><option>+[no]question</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print [do not print] the question section of a query
|
||||
Toggles the display of the question section of a query
|
||||
when an answer is returned. The default is to print
|
||||
the question section as a comment.
|
||||
</para>
|
||||
@@ -1066,7 +1078,9 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Provide a terse answer. The default is to print the
|
||||
answer in a verbose form.
|
||||
answer in a verbose form. This option always has global
|
||||
effect; it cannot be set globally and then overridden on
|
||||
a per-lookup basis.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1111,10 +1125,9 @@
|
||||
<term><option>+[no]stats</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This query option toggles the printing of statistics:
|
||||
when the query was made, the size of the reply and
|
||||
so on. The default behavior is to print the query
|
||||
statistics.
|
||||
Toggles the printing of statistics: when the query was made,
|
||||
the size of the reply and so on. The default behavior is to
|
||||
print the query statistics as a comment after each lookup.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1279,6 +1292,16 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]yaml</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the responses (and, if <option>+qr</option> is in use,
|
||||
also the outgoing queries) in a detailed YAML format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]zflag</option></term>
|
||||
<listitem>
|
||||
|
||||
+26
-13
@@ -481,16 +481,28 @@
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the printing of the initial comment in the
|
||||
output identifying the version of <span class="command"><strong>dig</strong></span>
|
||||
and the query options that have been applied. This
|
||||
comment is printed by default.
|
||||
output, identifying the version of <span class="command"><strong>dig</strong></span>
|
||||
and the query options that have been applied. This option
|
||||
always has global effect; it cannot be set globally
|
||||
and then overridden on a per-lookup basis. The default
|
||||
is to print this comment.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle the display of comment lines in the output.
|
||||
The default is to print comments.
|
||||
Toggles the display of some comment lines in the output,
|
||||
containing information about the packet header and
|
||||
OPT pseudosection, and the names of the response
|
||||
section. The default is to print these comments.
|
||||
</p>
|
||||
<p>
|
||||
Other types of comments in the output are not affected by
|
||||
this option, but can be controlled using other command
|
||||
line switches. These include <span class="command"><strong>+[no]cmd</strong></span>,
|
||||
<span class="command"><strong>+[no]question</strong></span>,
|
||||
<span class="command"><strong>+[no]stats</strong></span>, and
|
||||
<span class="command"><strong>+[no]rrcomments</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
|
||||
@@ -764,14 +776,14 @@
|
||||
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print [do not print] the query as it is sent. By
|
||||
default, the query is not printed.
|
||||
Toggles the display of the query message as it is sent.
|
||||
By default, the query is not printed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print [do not print] the question section of a query
|
||||
Toggles the display of the question section of a query
|
||||
when an answer is returned. The default is to print
|
||||
the question section as a comment.
|
||||
</p>
|
||||
@@ -841,7 +853,9 @@
|
||||
<dd>
|
||||
<p>
|
||||
Provide a terse answer. The default is to print the
|
||||
answer in a verbose form.
|
||||
answer in a verbose form. This option always has global
|
||||
effect; it cannot be set globally and then overridden on
|
||||
a per-lookup basis.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
|
||||
@@ -874,10 +888,9 @@
|
||||
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
This query option toggles the printing of statistics:
|
||||
when the query was made, the size of the reply and
|
||||
so on. The default behavior is to print the query
|
||||
statistics.
|
||||
Toggles the printing of statistics: when the query was made,
|
||||
the size of the reply and so on. The default behavior is to
|
||||
print the query statistics as a comment after each lookup.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
|
||||
|
||||
+50
-54
@@ -193,11 +193,15 @@ dig_lookup_t *current_lookup = NULL;
|
||||
/* dynamic callbacks */
|
||||
|
||||
isc_result_t
|
||||
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg,
|
||||
bool headers);
|
||||
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers);
|
||||
|
||||
void
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
(*dighost_error)(const char *format, ...);
|
||||
|
||||
void
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
|
||||
dig_query_t *query);
|
||||
|
||||
void
|
||||
(*dighost_trying)(char *frm, dig_lookup_t *lookup);
|
||||
@@ -446,9 +450,6 @@ make_server(const char *servname, const char *userarg) {
|
||||
|
||||
debug("make_server(%s)", servname);
|
||||
srv = isc_mem_allocate(mctx, sizeof(struct dig_server));
|
||||
if (srv == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
strlcpy(srv->servername, servname, MXNAME);
|
||||
strlcpy(srv->userarg, userarg, MXNAME);
|
||||
ISC_LINK_INIT(srv, link);
|
||||
@@ -576,9 +577,6 @@ make_empty_lookup(void) {
|
||||
INSIST(!free_now);
|
||||
|
||||
looknew = isc_mem_allocate(mctx, sizeof(struct dig_lookup));
|
||||
if (looknew == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
looknew->pending = true;
|
||||
looknew->textname[0] = 0;
|
||||
looknew->cmdline[0] = 0;
|
||||
@@ -681,8 +679,6 @@ cloneopts(dig_lookup_t *looknew, dig_lookup_t *lookold) {
|
||||
size_t len = sizeof(looknew->ednsopts[0]) * EDNSOPT_OPTIONS;
|
||||
size_t i;
|
||||
looknew->ednsopts = isc_mem_allocate(mctx, len);
|
||||
if (looknew->ednsopts == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < EDNSOPT_OPTIONS; i++) {
|
||||
looknew->ednsopts[i].code = 0;
|
||||
looknew->ednsopts[i].length = 0;
|
||||
@@ -696,10 +692,8 @@ cloneopts(dig_lookup_t *looknew, dig_lookup_t *lookold) {
|
||||
len = lookold->ednsopts[i].length;
|
||||
if (len != 0) {
|
||||
INSIST(lookold->ednsopts[i].value != NULL);
|
||||
looknew->ednsopts[i].value =
|
||||
isc_mem_allocate(mctx, len);
|
||||
if (looknew->ednsopts[i].value == NULL)
|
||||
fatal("out of memory");
|
||||
looknew->ednsopts[i].value = isc_mem_allocate(mctx,
|
||||
len);
|
||||
memmove(looknew->ednsopts[i].value,
|
||||
lookold->ednsopts[i].value, len);
|
||||
}
|
||||
@@ -805,8 +799,6 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
|
||||
if (lookold->ecs_addr != NULL) {
|
||||
size_t len = sizeof(isc_sockaddr_t);
|
||||
looknew->ecs_addr = isc_mem_allocate(mctx, len);
|
||||
if (looknew->ecs_addr == NULL)
|
||||
fatal("out of memory");
|
||||
memmove(looknew->ecs_addr, lookold->ecs_addr, len);
|
||||
}
|
||||
|
||||
@@ -865,9 +857,6 @@ setup_text_key(void) {
|
||||
isc_buffer_putstr(namebuf, keynametext);
|
||||
secretsize = (unsigned int) strlen(keysecret) * 3 / 4;
|
||||
secretstore = isc_mem_allocate(mctx, secretsize);
|
||||
if (secretstore == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
isc_buffer_init(&secretbuf, secretstore, secretsize);
|
||||
result = isc_base64_decodestring(keysecret, &secretbuf);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -957,8 +946,6 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
|
||||
fatal("invalid prefix '%s'\n", value);
|
||||
|
||||
sa = isc_mem_allocate(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
fatal("out of memory");
|
||||
memset(sa, 0, sizeof(*sa));
|
||||
|
||||
if (strcmp(buf, "0") == 0) {
|
||||
@@ -1190,9 +1177,6 @@ static dig_searchlist_t *
|
||||
make_searchlist_entry(char *domain) {
|
||||
dig_searchlist_t *search;
|
||||
search = isc_mem_allocate(mctx, sizeof(*search));
|
||||
if (search == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
strlcpy(search->origin, domain, MXNAME);
|
||||
search->origin[MXNAME-1] = 0;
|
||||
ISC_LINK_INIT(search, link);
|
||||
@@ -1399,6 +1383,7 @@ typedef struct dig_ednsoptname {
|
||||
} dig_ednsoptname_t;
|
||||
|
||||
dig_ednsoptname_t optnames[] = {
|
||||
{ 1, "LLQ" }, /* draft-sekar-dns-llq */
|
||||
{ 3, "NSID" }, /* RFC 5001 */
|
||||
{ 5, "DAU" }, /* RFC 6975 */
|
||||
{ 6, "DHU" }, /* RFC 6975 */
|
||||
@@ -1456,9 +1441,7 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
|
||||
|
||||
if (value != NULL) {
|
||||
char *buf;
|
||||
buf = isc_mem_allocate(mctx, strlen(value)/2 + 1);
|
||||
if (buf == NULL)
|
||||
fatal("out of memory");
|
||||
buf = isc_mem_allocate(mctx, strlen(value) / 2 + 1);
|
||||
isc_buffer_init(&b, buf, (unsigned int) strlen(value)/2 + 1);
|
||||
result = isc_hex_decodestring(value, &b);
|
||||
check_result(result, "isc_hex_decodestring");
|
||||
@@ -2489,10 +2472,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
serv = ISC_LIST_NEXT(serv, link))
|
||||
{
|
||||
query = isc_mem_allocate(mctx, sizeof(dig_query_t));
|
||||
if (query == NULL) {
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
}
|
||||
debug("create query %p linked to lookup %p", query, lookup);
|
||||
query->lookup = lookup;
|
||||
query->timer = NULL;
|
||||
@@ -2527,6 +2506,9 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
COMMSIZE);
|
||||
query->sendbuf = lookup->renderbuf;
|
||||
|
||||
isc_time_settoepoch(&query->time_sent);
|
||||
isc_time_settoepoch(&query->time_recv);
|
||||
|
||||
ISC_LINK_INIT(query, clink);
|
||||
ISC_LINK_INIT(query, link);
|
||||
|
||||
@@ -2535,16 +2517,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
ISC_LIST_ENQUEUE(lookup->q, query, link);
|
||||
}
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(lookup->q) && lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(lookup->q),
|
||||
lookup->sendmsg, true);
|
||||
if (lookup->stats) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(&lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
@@ -2882,6 +2854,18 @@ send_udp(dig_query_t *query) {
|
||||
sevent, ISC_SOCKFLAG_NORETRY);
|
||||
check_result(result, "isc_socket_sendto2");
|
||||
sendcount++;
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(query->lookup->q) && query->lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(query->lookup->q),
|
||||
&query->lookup->renderbuf,
|
||||
query->lookup->sendmsg, true);
|
||||
if (query->lookup->stats) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(&query->lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -2981,11 +2965,11 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
|
||||
isc_netaddr_format(&netaddr, buf, sizeof(buf));
|
||||
|
||||
printf(";; no response from %s\n", buf);
|
||||
dighost_error("no response from %s\n", buf);
|
||||
} else {
|
||||
fputs(l->cmdline, stdout);
|
||||
printf(";; connection timed out; no servers could be "
|
||||
"reached\n");
|
||||
dighost_error("connection timed out; "
|
||||
"no servers could be reached\n");
|
||||
}
|
||||
cancel_lookup(l);
|
||||
check_next_lookup(l);
|
||||
@@ -3057,8 +3041,8 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr,
|
||||
sizeof(sockstr));
|
||||
printf(";; communications error to %s: %s\n",
|
||||
sockstr, isc_result_totext(sevent->result));
|
||||
dighost_error("communications error to %s: %s\n",
|
||||
sockstr, isc_result_totext(sevent->result));
|
||||
if (keep != NULL)
|
||||
isc_socket_detach(&keep);
|
||||
l = query->lookup;
|
||||
@@ -3157,6 +3141,19 @@ launch_next_query(dig_query_t *query, bool include_question) {
|
||||
check_result(result, "isc_socket_send");
|
||||
sendcount++;
|
||||
debug("sendcount=%d", sendcount);
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(query->lookup->q) && query->lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(query->lookup->q),
|
||||
&query->lookup->renderbuf,
|
||||
query->lookup->sendmsg, true);
|
||||
if (query->lookup->stats) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(
|
||||
&query->lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
}
|
||||
query->waiting_connect = false;
|
||||
#if 0
|
||||
@@ -3531,7 +3528,6 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
query = event->ev_arg;
|
||||
TIME_NOW(&query->time_recv);
|
||||
debug("lookup=%p, query=%p", query->lookup, query);
|
||||
|
||||
l = query->lookup;
|
||||
|
||||
@@ -3560,8 +3556,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
debug("in recv cancel handler");
|
||||
query->waiting_connect = false;
|
||||
} else {
|
||||
printf(";; communications error: %s\n",
|
||||
isc_result_totext(sevent->result));
|
||||
dighost_error("communications error: %s\n",
|
||||
isc_result_totext(sevent->result));
|
||||
if (keep != NULL)
|
||||
isc_socket_detach(&keep);
|
||||
isc_socket_detach(&query->sock);
|
||||
@@ -3912,19 +3908,19 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
if (msg->rcode == dns_rcode_nxdomain &&
|
||||
(l->origin != NULL || l->need_search)) {
|
||||
if (!next_origin(query->lookup) || showsearch) {
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
dighost_received(isc_buffer_usedlength(&b),
|
||||
&sevent->address, query);
|
||||
}
|
||||
} else if (!l->trace && !l->ns_search_only) {
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
} else if (l->trace) {
|
||||
int nl = 0;
|
||||
int count = msg->counts[DNS_SECTION_ANSWER];
|
||||
|
||||
debug("in TRACE code");
|
||||
if (!l->ns_search_only)
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
|
||||
l->rdtype = l->qrdtype;
|
||||
if (l->trace_root || (l->ns_search_only && count > 0)) {
|
||||
@@ -3955,7 +3951,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
l->trace_root = false;
|
||||
usesearch = false;
|
||||
} else {
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-1
@@ -400,13 +400,16 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
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;
|
||||
int force_error;
|
||||
|
||||
UNUSED(msgbuf);
|
||||
UNUSED(headers);
|
||||
|
||||
/*
|
||||
@@ -854,6 +857,17 @@ parse_args(bool is_batchfile, int argc, char **argv) {
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
}
|
||||
|
||||
static void
|
||||
host_error(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
printf(";; ");
|
||||
va_start(args, format);
|
||||
vfprintf(stdout, format, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
@@ -871,6 +885,7 @@ main(int argc, char **argv) {
|
||||
dighost_received = received;
|
||||
dighost_trying = trying;
|
||||
dighost_shutdown = host_shutdown;
|
||||
dighost_error = host_error;
|
||||
|
||||
debug("main()");
|
||||
progname = argv[0];
|
||||
|
||||
@@ -380,13 +380,22 @@ 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, bool headers);
|
||||
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers);
|
||||
|
||||
/*
|
||||
* Print an error message in the appropriate format.
|
||||
*/
|
||||
extern void
|
||||
(*dighost_error)(const char *format, ...);
|
||||
|
||||
/*%<
|
||||
* Print the final result of the lookup.
|
||||
*/
|
||||
|
||||
extern void
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
|
||||
dig_query_t *query);
|
||||
/*%<
|
||||
* Print a message about where and when the response
|
||||
* was received from, like the final comment in the
|
||||
|
||||
+19
-4
@@ -429,16 +429,21 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers)
|
||||
{
|
||||
char servtext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
UNUSED(msgbuf);
|
||||
|
||||
/* I've we've gotten this far, we've reached a server. */
|
||||
query_error = 0;
|
||||
|
||||
debug("printmessage()");
|
||||
|
||||
if(!default_lookups || query->lookup->rdtype == dns_rdatatype_a) {
|
||||
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
|
||||
isc_sockaddr_format(&query->sockaddr, servtext,
|
||||
sizeof(servtext));
|
||||
printf("Server:\t\t%s\n", query->userarg);
|
||||
printf("Address:\t%s\n", servtext);
|
||||
|
||||
@@ -850,8 +855,6 @@ get_next_command(void) {
|
||||
|
||||
fflush(stdout);
|
||||
buf = isc_mem_allocate(mctx, COMMSIZE);
|
||||
if (buf == NULL)
|
||||
fatal("memory allocation failure");
|
||||
isc_app_block();
|
||||
if (interactive) {
|
||||
#ifdef HAVE_READLINE
|
||||
@@ -980,6 +983,17 @@ getinput(isc_task_t *task, isc_event_t *event) {
|
||||
isc_app_shutdown();
|
||||
}
|
||||
|
||||
static void
|
||||
nsl_error(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
printf(";; ");
|
||||
va_start(args, format);
|
||||
vfprintf(stdout, format, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
@@ -997,6 +1011,7 @@ main(int argc, char **argv) {
|
||||
dighost_received = received;
|
||||
dighost_trying = trying;
|
||||
dighost_shutdown = query_finished;
|
||||
dighost_error = nsl_error;
|
||||
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
|
||||
@@ -530,9 +530,6 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
||||
nkey = dns_rdataset_count(keyset);
|
||||
|
||||
keytable = isc_mem_get(mctx, sizeof(keyinfo_t) * nkey);
|
||||
if (keytable == NULL) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
for (result = dns_rdataset_first(keyset), i = 0;
|
||||
result == ISC_R_SUCCESS;
|
||||
@@ -610,10 +607,6 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
int i;
|
||||
|
||||
algo = isc_mem_get(mctx, nkey);
|
||||
if (algo == NULL) {
|
||||
fatal("allocating RRSIG/DNSKEY match list: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
memset(algo, 0, nkey);
|
||||
|
||||
for (result = dns_rdataset_first(sigset);
|
||||
@@ -747,10 +740,6 @@ rdata_get(void) {
|
||||
dns_rdata_t *rdata;
|
||||
|
||||
rdata = isc_mem_get(mctx, sizeof(*rdata));
|
||||
if (rdata == NULL) {
|
||||
fatal("allocating DS rdata: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
dns_rdata_init(rdata);
|
||||
|
||||
return (rdata);
|
||||
@@ -835,10 +824,6 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata,
|
||||
dns_rdatalist_t *dslist;
|
||||
|
||||
dslist = isc_mem_get(mctx, sizeof(*dslist));
|
||||
if (dslist == NULL) {
|
||||
fatal("allocating new DS list: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
dns_rdatalist_init(dslist);
|
||||
dslist->rdclass = rdclass;
|
||||
@@ -907,10 +892,6 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
n = dns_rdataset_count(dsset);
|
||||
|
||||
arrdata = isc_mem_get(mctx, n * sizeof(dns_rdata_t));
|
||||
if (arrdata == NULL) {
|
||||
fatal("allocating DS rdata array: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
for (result = dns_rdataset_first(dsset), i = 0;
|
||||
result == ISC_R_SUCCESS;
|
||||
@@ -926,10 +907,6 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
* Convert sorted arrdata to more accessible format
|
||||
*/
|
||||
ds = isc_mem_get(mctx, n * sizeof(dns_rdata_ds_t));
|
||||
if (ds == NULL) {
|
||||
fatal("allocating unpacked DS array: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
result = dns_rdata_tostruct(&arrdata[i], &ds[i], NULL);
|
||||
|
||||
@@ -50,11 +50,9 @@ dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
||||
.PP
|
||||
The
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
command outputs DS (Delegation Signer) resource records (RRs) and other similarly\-constructed RRs: with the
|
||||
\fB\-l\fR
|
||||
option it outputs DLV (DNSSEC Lookaside Validation) RRs; or with the
|
||||
command outputs DS (Delegation Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
\fB\-C\fR
|
||||
it outputs CDS (Child DS) RRs\&.
|
||||
option\&.
|
||||
.PP
|
||||
The input keys can be specified in a number of ways:
|
||||
.PP
|
||||
@@ -119,9 +117,7 @@ zone file mode\&.
|
||||
.PP
|
||||
\-C
|
||||
.RS 4
|
||||
Generate CDS records rather than DS records\&. This is mutually exclusive with the
|
||||
\fB\-l\fR
|
||||
option for generating DLV records\&.
|
||||
Generate CDS records rather than DS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIfile\fR
|
||||
@@ -156,15 +152,6 @@ files in
|
||||
\fBdirectory\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Generate a DLV set instead of a DS set\&. The specified
|
||||
\fIdomain\fR
|
||||
is appended to the name for each record in the set\&. This is mutually exclusive with the
|
||||
\fB\-C\fR
|
||||
option for generating CDS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s
|
||||
.RS 4
|
||||
Keyset mode:
|
||||
@@ -224,8 +211,6 @@ A keyfile error can give a "file not found" even if the file exists\&.
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 3658
|
||||
(DS RRs),
|
||||
RFC 4431
|
||||
(DLV RRs),
|
||||
RFC 4509
|
||||
(SHA\-256 for DS RRs),
|
||||
RFC 6605
|
||||
|
||||
@@ -208,8 +208,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
||||
}
|
||||
|
||||
static void
|
||||
logkey(dns_rdata_t *rdata)
|
||||
{
|
||||
logkey(dns_rdata_t *rdata) {
|
||||
isc_result_t result;
|
||||
dst_key_t *key = NULL;
|
||||
isc_buffer_t buf;
|
||||
@@ -228,9 +227,7 @@ logkey(dns_rdata_t *rdata)
|
||||
}
|
||||
|
||||
static void
|
||||
emit(dns_dsdigest_t dt, bool showall, char *lookaside,
|
||||
bool cds, dns_rdata_t *rdata)
|
||||
{
|
||||
emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
isc_result_t result;
|
||||
unsigned char buf[DNS_DS_BUFFERSIZE];
|
||||
char text_buf[DST_KEY_MAXTEXTSIZE];
|
||||
@@ -262,18 +259,6 @@ emit(dns_dsdigest_t dt, bool showall, char *lookaside,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print name");
|
||||
|
||||
/* Add lookaside origin, if set */
|
||||
if (lookaside != NULL) {
|
||||
if (isc_buffer_availablelength(&nameb) < strlen(lookaside))
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, lookaside);
|
||||
if (lookaside[strlen(lookaside) - 1] != '.') {
|
||||
if (isc_buffer_availablelength(&nameb) < 1)
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, ".");
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_rdata_tofmttext(&ds, (dns_name_t *) NULL, 0, 0, 0, "",
|
||||
&textb);
|
||||
|
||||
@@ -293,26 +278,24 @@ emit(dns_dsdigest_t dt, bool showall, char *lookaside,
|
||||
isc_buffer_usedregion(&classb, &r);
|
||||
printf("%.*s", (int)r.length, r.base);
|
||||
|
||||
if (lookaside == NULL) {
|
||||
if (cds)
|
||||
printf(" CDS ");
|
||||
else
|
||||
printf(" DS ");
|
||||
} else
|
||||
printf(" DLV ");
|
||||
if (cds) {
|
||||
printf(" CDS ");
|
||||
} else {
|
||||
printf(" DS ");
|
||||
}
|
||||
|
||||
isc_buffer_usedregion(&textb, &r);
|
||||
printf("%.*s\n", (int)r.length, r.base);
|
||||
}
|
||||
|
||||
static void
|
||||
emits(bool showall, char *lookaside, bool cds, dns_rdata_t *rdata) {
|
||||
emits(bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
unsigned i, n;
|
||||
|
||||
n = sizeof(dtype)/sizeof(dtype[0]);
|
||||
for (i = 0; i < n; i++) {
|
||||
if (dtype[i] != 0) {
|
||||
emit(dtype[i], showall, lookaside, cds, rdata);
|
||||
emit(dtype[i], showall, cds, rdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,12 +321,11 @@ usage(void) {
|
||||
" -f zonefile: read keys from a zone file\n"
|
||||
" -h: print help information\n"
|
||||
" -K directory: where to find key or keyset files\n"
|
||||
" -l zone: print DLV records in the given lookaside zone\n"
|
||||
" -s: read keys from keyset-<dnsname> file\n"
|
||||
" -T: TTL of output records (omitted by default)\n"
|
||||
" -v level: verbosity\n"
|
||||
" -V: print version information\n");
|
||||
fprintf(stderr, "Output: DS, DLV, or CDS RRs\n");
|
||||
fprintf(stderr, "Output: DS or CDS RRs\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
@@ -352,7 +334,6 @@ int
|
||||
main(int argc, char **argv) {
|
||||
char *classname = NULL;
|
||||
char *filename = NULL, *dir = NULL, *namestr;
|
||||
char *lookaside = NULL;
|
||||
char *endp;
|
||||
int ch;
|
||||
bool cds = false;
|
||||
@@ -397,9 +378,6 @@ main(int argc, char **argv) {
|
||||
add_dtype(strtodsdigest(isc_commandline_argument));
|
||||
break;
|
||||
case 'C':
|
||||
if (lookaside != NULL)
|
||||
fatal("lookaside and CDS are mutually"
|
||||
" exclusive");
|
||||
cds = true;
|
||||
break;
|
||||
case 'c':
|
||||
@@ -418,12 +396,7 @@ main(int argc, char **argv) {
|
||||
filename = isc_commandline_argument;
|
||||
break;
|
||||
case 'l':
|
||||
if (cds)
|
||||
fatal("lookaside and CDS are mutually"
|
||||
" exclusive");
|
||||
lookaside = isc_commandline_argument;
|
||||
if (strlen(lookaside) == 0U)
|
||||
fatal("lookaside must be a non-empty string");
|
||||
fatal("-l option (DLV lookaside) is obsolete");
|
||||
break;
|
||||
case 's':
|
||||
usekeyset = true;
|
||||
@@ -528,7 +501,7 @@ main(int argc, char **argv) {
|
||||
logkey(&rdata);
|
||||
}
|
||||
|
||||
emits(showall, lookaside, cds, &rdata);
|
||||
emits(showall, cds, &rdata);
|
||||
}
|
||||
} else {
|
||||
unsigned char key_buf[DST_KEY_MAXSIZE];
|
||||
@@ -536,7 +509,7 @@ main(int argc, char **argv) {
|
||||
loadkey(argv[isc_commandline_index], key_buf,
|
||||
DST_KEY_MAXSIZE, &rdata);
|
||||
|
||||
emits(showall, lookaside, cds, &rdata);
|
||||
emits(showall, cds, &rdata);
|
||||
}
|
||||
|
||||
if (dns_rdataset_isassociated(&rdataset)) {
|
||||
|
||||
@@ -112,10 +112,8 @@
|
||||
|
||||
<para>
|
||||
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
|
||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
||||
with the <option>-l</option> option it outputs DLV (DNSSEC Lookaside
|
||||
Validation) RRs; or with the <option>-C</option> it outputs CDS (Child
|
||||
DS) RRs.
|
||||
Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
<option>-C</option> option.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -212,9 +210,7 @@
|
||||
<term>-C</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with the <option>-l</option> option for generating DLV
|
||||
records.
|
||||
Generate CDS records rather than DS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -260,19 +256,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<replaceable>domain</replaceable> is appended to the name for each
|
||||
record in the set.
|
||||
This is mutually exclusive with the <option>-C</option> option
|
||||
for generating CDS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
@@ -362,7 +345,6 @@
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 3658</citetitle> (DS RRs),
|
||||
<citetitle>RFC 4431</citetitle> (DLV RRs),
|
||||
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs),
|
||||
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs),
|
||||
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
|
||||
|
||||
@@ -97,10 +97,8 @@
|
||||
|
||||
<p>
|
||||
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
|
||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
||||
with the <code class="option">-l</code> option it outputs DLV (DNSSEC Lookaside
|
||||
Validation) RRs; or with the <code class="option">-C</code> it outputs CDS (Child
|
||||
DS) RRs.
|
||||
Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
<code class="option">-C</code> option.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -182,9 +180,7 @@
|
||||
<dt><span class="term">-C</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with the <code class="option">-l</code> option for generating DLV
|
||||
records.
|
||||
Generate CDS records rather than DS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
|
||||
@@ -219,16 +215,6 @@
|
||||
<code class="option">directory</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<em class="replaceable"><code>domain</code></em> is appended to the name for each
|
||||
record in the set.
|
||||
This is mutually exclusive with the <code class="option">-C</code> option
|
||||
for generating CDS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -311,7 +297,6 @@
|
||||
</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 3658</em> (DS RRs),
|
||||
<em class="citetitle">RFC 4431</em> (DLV RRs),
|
||||
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs),
|
||||
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs),
|
||||
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
|
||||
|
||||
@@ -368,8 +368,6 @@ main(int argc, char **argv) {
|
||||
|
||||
len = strlen(label) + 8;
|
||||
l = isc_mem_allocate(mctx, len);
|
||||
if (l == NULL)
|
||||
fatal("cannot allocate memory");
|
||||
snprintf(l, len, "pkcs11:%s", label);
|
||||
isc_mem_free(mctx, label);
|
||||
label = l;
|
||||
|
||||
@@ -218,7 +218,6 @@ main(int argc, char **argv) {
|
||||
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;
|
||||
|
||||
@@ -113,10 +113,6 @@ main(int argc, char **argv) {
|
||||
* simplify cleanup later
|
||||
*/
|
||||
dir = isc_mem_strdup(mctx, isc_commandline_argument);
|
||||
if (dir == NULL) {
|
||||
fatal("Failed to allocate memory for "
|
||||
"directory");
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
removefile = true;
|
||||
|
||||
@@ -253,10 +253,6 @@ main(int argc, char **argv) {
|
||||
*/
|
||||
directory = isc_mem_strdup(mctx,
|
||||
isc_commandline_argument);
|
||||
if (directory == NULL) {
|
||||
fatal("Failed to allocate memory for "
|
||||
"directory");
|
||||
}
|
||||
break;
|
||||
case 'L':
|
||||
ttl = strtottl(isc_commandline_argument);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
dnssec-signzone \- DNSSEC zone signing tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-signzone\fR\ 'u
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR
|
||||
@@ -113,11 +113,6 @@ Key repository: Specify a directory to search for DNSSEC keys\&. If not specifie
|
||||
Treat specified key as a key signing key ignoring any key flags\&. This option may be specified multiple times\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets\&. The domain is appended to the name of the records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-M \fImaxttl\fR
|
||||
.RS 4
|
||||
Sets the maximum TTL for the signed zone\&. Any TTL higher than
|
||||
@@ -296,6 +291,13 @@ forces
|
||||
to remove signatures from keys that are no longer active\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.1 ("Pre\-Publish Key Rollover")\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode: Suppresses unnecessary output\&. Without this option, when
|
||||
\fBdnssec\-signzone\fR
|
||||
is run it will print to standard output the number of keys in use, the algorithms used to verify the zone was signed correctly and other status information, and finally the filename containing the signed zone\&. With it, that output is suppressed, leaving only the filename\&.
|
||||
.RE
|
||||
.PP
|
||||
\-R
|
||||
.RS 4
|
||||
Remove signatures from keys that are no longer published\&.
|
||||
|
||||
@@ -163,8 +163,6 @@ static bool removefile = false;
|
||||
static bool generateds = false;
|
||||
static bool ignore_kskflag = false;
|
||||
static bool keyset_kskonly = false;
|
||||
static dns_name_t *dlv = NULL;
|
||||
static dns_fixedname_t dlv_fixed;
|
||||
static dns_master_style_t *dsstyle = NULL;
|
||||
static unsigned int serialformat = SOA_SERIAL_KEEP;
|
||||
static unsigned int hash_length = 0;
|
||||
@@ -1496,8 +1494,6 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
}
|
||||
|
||||
fname = isc_mem_get(mctx, sizeof(dns_fixedname_t));
|
||||
if (fname == NULL)
|
||||
fatal("out of memory");
|
||||
name = dns_fixedname_initname(fname);
|
||||
node = NULL;
|
||||
found = false;
|
||||
@@ -2647,11 +2643,13 @@ loadexplicitkeys(char *keyfiles[], int n, bool setksk) {
|
||||
|
||||
static void
|
||||
report(const char *format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
putc('\n', stderr);
|
||||
if (!quiet) {
|
||||
FILE *out = output_stdout ? stderr : stdout;
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vfprintf(out, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2906,7 +2904,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
dns_dbversion_t *dbversion = NULL;
|
||||
dns_diff_t diff;
|
||||
dns_difftuple_t *tuple = NULL;
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
dns_rdata_t rdata, ds;
|
||||
bool have_ksk = false;
|
||||
@@ -2930,8 +2927,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
if (dsdir != NULL)
|
||||
filenamelen += strlen(dsdir) + 1;
|
||||
filename = isc_mem_get(mctx, filenamelen);
|
||||
if (filename == NULL)
|
||||
fatal("out of memory");
|
||||
if (dsdir != NULL)
|
||||
snprintf(filename, filenamelen, "%s/", dsdir);
|
||||
else
|
||||
@@ -2941,18 +2936,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
|
||||
dns_diff_init(mctx, &diff);
|
||||
|
||||
if (type == dns_rdatatype_dlv) {
|
||||
dns_name_t tname;
|
||||
unsigned int labels;
|
||||
|
||||
dns_name_init(&tname, NULL);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
labels = dns_name_countlabels(gorigin);
|
||||
dns_name_getlabelsequence(gorigin, 0, labels - 1, &tname);
|
||||
result = dns_name_concatenate(&tname, dlv, name, NULL);
|
||||
check_result(result, "dns_name_concatenate");
|
||||
} else
|
||||
name = gorigin;
|
||||
name = gorigin;
|
||||
|
||||
for (key = ISC_LIST_HEAD(keylist);
|
||||
key != NULL;
|
||||
@@ -2993,8 +2977,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
DNS_DSDIGEST_SHA256,
|
||||
dsbuf, &ds);
|
||||
check_result(result, "dns_ds_buildrdata");
|
||||
if (type == dns_rdatatype_dlv)
|
||||
ds.type = dns_rdatatype_dlv;
|
||||
result = dns_difftuple_create(mctx,
|
||||
DNS_DIFFOP_ADDRESIGN,
|
||||
name, 0, &ds, &tuple);
|
||||
@@ -3089,6 +3071,7 @@ usage(void) {
|
||||
fprintf(stderr, "\t-j jitter:\n");
|
||||
fprintf(stderr, "\t\trandomize signature end time up to jitter seconds\n");
|
||||
fprintf(stderr, "\t-v debuglevel (0)\n");
|
||||
fprintf(stderr, "\t-q quiet\n");
|
||||
fprintf(stderr, "\t-V:\tprint version information\n");
|
||||
fprintf(stderr, "\t-o origin:\n");
|
||||
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
|
||||
@@ -3131,7 +3114,6 @@ usage(void) {
|
||||
"\t\twith older versions of dnssec-signzone -g\n");
|
||||
fprintf(stderr, "\t-n ncpus (number of cpus present)\n");
|
||||
fprintf(stderr, "\t-k key_signing_key\n");
|
||||
fprintf(stderr, "\t-l lookasidezone\n");
|
||||
fprintf(stderr, "\t-3 NSEC3 salt\n");
|
||||
fprintf(stderr, "\t-H NSEC3 iterations (10)\n");
|
||||
fprintf(stderr, "\t-A NSEC3 optout\n");
|
||||
@@ -3207,8 +3189,6 @@ main(int argc, char *argv[]) {
|
||||
int tempfilelen = 0;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_task_t **tasks = NULL;
|
||||
isc_buffer_t b;
|
||||
int len;
|
||||
hashlist_t hashlist;
|
||||
bool make_keyset = false;
|
||||
bool set_salt = false;
|
||||
@@ -3221,7 +3201,7 @@ main(int argc, char *argv[]) {
|
||||
|
||||
/* Unused letters: Bb G J q Yy (and F is reserved). */
|
||||
#define CMDLINE_FLAGS \
|
||||
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:M:n:N:o:O:PpQRr:s:ST:tuUv:VX:xzZ:"
|
||||
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:M:n:N:o:O:PpQqRr:s:ST:tuUv:VX:xzZ:"
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
@@ -3386,14 +3366,7 @@ main(int argc, char *argv[]) {
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
len = strlen(isc_commandline_argument);
|
||||
isc_buffer_init(&b, isc_commandline_argument, len);
|
||||
isc_buffer_add(&b, len);
|
||||
|
||||
dlv = dns_fixedname_initname(&dlv_fixed);
|
||||
result = dns_name_fromtext(dlv, &b, dns_rootname, 0,
|
||||
NULL);
|
||||
check_result(result, "dns_name_fromtext(dlv)");
|
||||
fatal("-l option (DLV lookaside) is obsolete");
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
@@ -3482,6 +3455,10 @@ main(int argc, char *argv[]) {
|
||||
fatal("verbose level must be numeric");
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
quiet = true;
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
dnskey_endstr = isc_commandline_argument;
|
||||
break;
|
||||
@@ -3581,8 +3558,6 @@ main(int argc, char *argv[]) {
|
||||
free_output = true;
|
||||
size = strlen(file) + strlen(".signed") + 1;
|
||||
output = isc_mem_allocate(mctx, size);
|
||||
if (output == NULL)
|
||||
fatal("out of memory");
|
||||
snprintf(output, size, "%s.signed", file);
|
||||
}
|
||||
|
||||
@@ -3797,10 +3772,8 @@ main(int argc, char *argv[]) {
|
||||
|
||||
if (!nokeys) {
|
||||
writeset("dsset-", dns_rdatatype_ds);
|
||||
if (make_keyset)
|
||||
if (make_keyset) {
|
||||
writeset("keyset-", dns_rdatatype_dnskey);
|
||||
if (dlv != NULL) {
|
||||
writeset("dlvset-", dns_rdatatype_dlv);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3811,8 +3784,6 @@ main(int argc, char *argv[]) {
|
||||
} else {
|
||||
tempfilelen = strlen(output) + 20;
|
||||
tempfile = isc_mem_get(mctx, tempfilelen);
|
||||
if (tempfile == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
result = isc_file_mktemplate(output, tempfile, tempfilelen);
|
||||
check_result(result, "isc_file_mktemplate");
|
||||
@@ -3842,8 +3813,6 @@ main(int argc, char *argv[]) {
|
||||
fatal("failed to create task: %s", isc_result_totext(result));
|
||||
|
||||
tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *));
|
||||
if (tasks == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < (int)ntasks; i++) {
|
||||
tasks[i] = NULL;
|
||||
result = isc_task_create(taskmgr, 0, &tasks[i]);
|
||||
@@ -3892,7 +3861,7 @@ main(int argc, char *argv[]) {
|
||||
} else {
|
||||
vresult = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin,
|
||||
NULL, mctx, ignore_kskflag,
|
||||
keyset_kskonly);
|
||||
keyset_kskonly, report);
|
||||
if (vresult != ISC_R_SUCCESS) {
|
||||
fprintf(output_stdout ? stderr : stdout,
|
||||
"Zone verification failed (%s)\n",
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||
@@ -223,16 +224,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-M <replaceable class="parameter">maxttl</replaceable></term>
|
||||
<listitem>
|
||||
@@ -543,6 +534,22 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode: Suppresses unnecessary output. Without this
|
||||
option, when <command>dnssec-signzone</command> is run it
|
||||
will print to standard output the number of keys in use,
|
||||
the algorithms used to verify the zone was signed correctly
|
||||
and other status information, and finally the filename
|
||||
containing the signed zone. With it, that output is
|
||||
suppressed, leaving only the filename.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-R</term>
|
||||
<listitem>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
|
||||
[<code class="option">-P</code>]
|
||||
[<code class="option">-Q</code>]
|
||||
[<code class="option">-q</code>]
|
||||
[<code class="option">-R</code>]
|
||||
[<code class="option">-S</code>]
|
||||
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
|
||||
@@ -173,13 +174,6 @@
|
||||
key flags. This option may be specified multiple times.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-M <em class="replaceable"><code>maxttl</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -429,6 +423,18 @@
|
||||
RFC 4641, section 4.2.1.1 ("Pre-Publish Key Rollover").
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Quiet mode: Suppresses unnecessary output. Without this
|
||||
option, when <span class="command"><strong>dnssec-signzone</strong></span> is run it
|
||||
will print to standard output the number of keys in use,
|
||||
the algorithms used to verify the zone was signed correctly
|
||||
and other status information, and finally the filename
|
||||
containing the signed zone. With it, that output is
|
||||
suppressed, leaving only the filename.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-R</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
dnssec-verify \- DNSSEC zone verification tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-verify\fR\ 'u
|
||||
\fBdnssec\-verify\fR [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-x\fR] [\fB\-z\fR] {zonefile}
|
||||
\fBdnssec\-verify\fR [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-q\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-x\fR] [\fB\-z\fR] {zonefile}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-verify\fR
|
||||
@@ -81,6 +81,13 @@ Sets the debugging level\&.
|
||||
Prints version information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode: Suppresses output\&. Without this option, when
|
||||
\fBdnssec\-verify\fR
|
||||
is run it will print to standard output the number of keys in use, the algorithms used to verify the zone was signed correctly and other status information\&. With it, all non\-error output is suppressed, and only the exit code will indicate success\&.
|
||||
.RE
|
||||
.PP
|
||||
\-x
|
||||
.RS 4
|
||||
Only verify that the DNSKEY RRset is signed with key\-signing keys\&. Without this flag, it is assumed that the DNSKEY RRset will be signed by all active keys\&. When this flag is set, it will not be an error if the DNSKEY RRset is not signed by zone\-signing keys\&. This corresponds to the
|
||||
|
||||
@@ -78,6 +78,16 @@ static dns_name_t *gorigin; /* The database origin */
|
||||
static bool ignore_kskflag = false;
|
||||
static bool keyset_kskonly = false;
|
||||
|
||||
static void
|
||||
report(const char *format, ...) {
|
||||
if (!quiet) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vfprintf(stdout, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Load the zone file from disk
|
||||
*/
|
||||
@@ -140,6 +150,7 @@ usage(void) {
|
||||
|
||||
fprintf(stderr, "Options: (default value in parenthesis) \n");
|
||||
fprintf(stderr, "\t-v debuglevel (0)\n");
|
||||
fprintf(stderr, "\t-q quiet\n");
|
||||
fprintf(stderr, "\t-V:\tprint version information\n");
|
||||
fprintf(stderr, "\t-o origin:\n");
|
||||
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
|
||||
@@ -172,7 +183,7 @@ main(int argc, char *argv[]) {
|
||||
int ch;
|
||||
|
||||
#define CMDLINE_FLAGS \
|
||||
"hm:o:I:c:E:v:Vxz"
|
||||
"c:E:hm:o:I:qv:Vxz"
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
@@ -237,6 +248,10 @@ main(int argc, char *argv[]) {
|
||||
fatal("verbose level must be numeric");
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
quiet = true;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
keyset_kskonly = true;
|
||||
break;
|
||||
@@ -304,7 +319,7 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
gdb = NULL;
|
||||
fprintf(stderr, "Loading zone '%s' from file '%s'\n", origin, file);
|
||||
report("Loading zone '%s' from file '%s'\n", origin, file);
|
||||
loadzone(file, origin, rdclass, &gdb);
|
||||
gorigin = dns_db_origin(gdb);
|
||||
gclass = dns_db_class(gdb);
|
||||
@@ -314,7 +329,8 @@ main(int argc, char *argv[]) {
|
||||
check_result(result, "dns_db_newversion()");
|
||||
|
||||
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL,
|
||||
mctx, ignore_kskflag, keyset_kskonly);
|
||||
mctx, ignore_kskflag, keyset_kskonly,
|
||||
report);
|
||||
|
||||
dns_db_closeversion(gdb, &gversion, false);
|
||||
dns_db_detach(&gdb);
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-I <replaceable class="parameter">input-format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-x</option></arg>
|
||||
@@ -140,6 +141,20 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode: Suppresses output. Without this option, when
|
||||
<command>dnssec-verify</command> is run it will print to
|
||||
standard output the number of keys in use, the algorithms
|
||||
used to verify the zone was signed correctly and other
|
||||
status information. With it, all non-error output is
|
||||
suppressed, and only the exit code will indicate success.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-x</term>
|
||||
<listitem>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
[<code class="option">-E <em class="replaceable"><code>engine</code></em></code>]
|
||||
[<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>]
|
||||
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
|
||||
[<code class="option">-q</code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-V</code>]
|
||||
[<code class="option">-x</code>]
|
||||
@@ -112,6 +113,17 @@
|
||||
Prints version information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Quiet mode: Suppresses output. Without this option, when
|
||||
<span class="command"><strong>dnssec-verify</strong></span> is run it will print to
|
||||
standard output the number of keys in use, the algorithms
|
||||
used to verify the zone was signed correctly and other
|
||||
status information. With it, all non-error output is
|
||||
suppressed, and only the exit code will indicate success.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-x</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
int verbose;
|
||||
int verbose = 0;
|
||||
bool quiet = false;
|
||||
uint8_t dtype[8];
|
||||
|
||||
static fatalcallback_t *fatalcallback = NULL;
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
|
||||
#endif
|
||||
|
||||
/*! verbosity: set by -v option in each program, defined in dnssectool.c */
|
||||
/*! verbosity: set by -v and -q option in each program, defined in dnssectool.c */
|
||||
extern int verbose;
|
||||
extern bool quiet;
|
||||
|
||||
/*! program name, statically initialized in each program */
|
||||
extern const char *program;
|
||||
|
||||
@@ -50,7 +50,8 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${OPENSSL_CFLAGS} \
|
||||
${JSON_C_CFLAGS} \
|
||||
${LIBXML2_CFLAGS} \
|
||||
${MAXMINDDB_CFLAGS}
|
||||
${MAXMINDDB_CFLAGS} \
|
||||
${ZLIB_CFLAGS}
|
||||
|
||||
CDEFINES = @CONTRIB_DLZ@
|
||||
|
||||
@@ -59,8 +60,8 @@ CWARNINGS =
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
var wid=0;
|
||||
$('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });
|
||||
$('table.zones').css('min-width', wid );
|
||||
$("h2+table,h3+table,h4+table,h2+div,h3+div,h2+script,h3+script").prev().append(' <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a>');
|
||||
$(".tabletoggle").click(function(){
|
||||
var n = $(this).closest("h2,h3,h4").next();
|
||||
if (n.is("script")) { n = n.next(); }
|
||||
if (n.is("div")) { n.toggleClass("hidden"); n = n.next(); }
|
||||
if (n.is("table")) { n.toggleClass("hidden"); }
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -90,6 +98,10 @@
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.odd{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,14 @@ static char xslmsg[] =
|
||||
" var wid=0;\n"
|
||||
" $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });\n"
|
||||
" $('table.zones').css('min-width', wid );\n"
|
||||
" $(\"h2+table,h3+table,h4+table,h2+div,h3+div,h2+script,h3+script\").prev().append(' <a class=\"tabletoggle\" href=\"#\" style=\"font-size:small\">Show/Hide</a>');\n"
|
||||
" $(\".tabletoggle\").click(function(){\n"
|
||||
" var n = $(this).closest(\"h2,h3,h4\").next();\n"
|
||||
" if (n.is(\"script\")) { n = n.next(); }\n"
|
||||
" if (n.is(\"div\")) { n.toggleClass(\"hidden\"); n = n.next(); }\n"
|
||||
" if (n.is(\"table\")) { n.toggleClass(\"hidden\"); }\n"
|
||||
" return false;\n"
|
||||
" });\n"
|
||||
" });\n"
|
||||
" </script>\n"
|
||||
"\n"
|
||||
@@ -95,6 +103,10 @@ static char xslmsg[] =
|
||||
" font-size: 10pt;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" .hidden{\n"
|
||||
" display: none;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" .odd{\n"
|
||||
" background-color: #f0f0f0;\n"
|
||||
" }\n"
|
||||
|
||||
+1
-26
@@ -50,7 +50,7 @@ options {\n\
|
||||
automatic-interface-scan yes;\n\
|
||||
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
|
||||
# blackhole {none;};\n"
|
||||
" cookie-algorithm aes;\n"
|
||||
" cookie-algorithm siphash24;\n"
|
||||
#ifndef WIN32
|
||||
" coresize default;\n\
|
||||
datasize default;\n"
|
||||
@@ -512,16 +512,9 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
}
|
||||
|
||||
dscps = isc_mem_get(mctx, count * sizeof(isc_dscp_t));
|
||||
if (dscps == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
|
||||
if (addrs == NULL) {
|
||||
if (dscps != NULL)
|
||||
isc_mem_put(mctx, dscps, count * sizeof(isc_dscp_t));
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
for (element = cfg_list_first(addrlist);
|
||||
element != NULL;
|
||||
@@ -697,8 +690,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
newsize = newlen * sizeof(*lists);
|
||||
oldsize = listcount * sizeof(*lists);
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
if (listcount != 0) {
|
||||
memmove(tmp, lists, oldsize);
|
||||
isc_mem_put(mctx, lists, oldsize);
|
||||
@@ -733,8 +724,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
newsize = newlen * sizeof(*stack);
|
||||
oldsize = stackcount * sizeof(*stack);
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
if (stackcount != 0) {
|
||||
memmove(tmp, stack, oldsize);
|
||||
isc_mem_put(mctx, stack, oldsize);
|
||||
@@ -761,8 +750,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
newsize = newlen * sizeof(isc_sockaddr_t);
|
||||
oldsize = addrcount * sizeof(isc_sockaddr_t);
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
if (addrcount != 0) {
|
||||
memmove(tmp, addrs, oldsize);
|
||||
isc_mem_put(mctx, addrs, oldsize);
|
||||
@@ -773,8 +760,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
newsize = newlen * sizeof(isc_dscp_t);
|
||||
oldsize = dscpcount * sizeof(isc_dscp_t);
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
if (dscpcount != 0) {
|
||||
memmove(tmp, dscps, oldsize);
|
||||
isc_mem_put(mctx, dscps, oldsize);
|
||||
@@ -785,8 +770,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
newsize = newlen * sizeof(dns_name_t *);
|
||||
oldsize = keycount * sizeof(dns_name_t *);
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
if (keycount != 0) {
|
||||
memmove(tmp, keys, oldsize);
|
||||
isc_mem_put(mctx, keys, oldsize);
|
||||
@@ -806,8 +789,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
if (!cfg_obj_isstring(key))
|
||||
continue;
|
||||
keys[i - 1] = isc_mem_get(mctx, sizeof(dns_name_t));
|
||||
if (keys[i - 1] == NULL)
|
||||
goto cleanup;
|
||||
dns_name_init(keys[i - 1], NULL);
|
||||
|
||||
keystr = cfg_obj_asstring(key);
|
||||
@@ -838,8 +819,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
oldsize = addrcount * sizeof(isc_sockaddr_t);
|
||||
if (i != 0) {
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
memmove(tmp, addrs, newsize);
|
||||
} else
|
||||
tmp = NULL;
|
||||
@@ -851,8 +830,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
oldsize = dscpcount * sizeof(isc_dscp_t);
|
||||
if (i != 0) {
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
memmove(tmp, dscps, newsize);
|
||||
} else
|
||||
tmp = NULL;
|
||||
@@ -864,8 +841,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
oldsize = keycount * sizeof(dns_name_t *);
|
||||
if (i != 0) {
|
||||
tmp = isc_mem_get(mctx, newsize);
|
||||
if (tmp == NULL)
|
||||
goto cleanup;
|
||||
memmove(tmp, keys, newsize);
|
||||
} else
|
||||
tmp = NULL;
|
||||
|
||||
+14
-53
@@ -369,9 +369,8 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
ccregion.rstart = isc_buffer_base(&conn->ccmsg.buffer);
|
||||
ccregion.rend = isc_buffer_used(&conn->ccmsg.buffer);
|
||||
secret.rstart = isc_mem_get(listener->mctx, key->secret.length);
|
||||
if (secret.rstart == NULL)
|
||||
goto cleanup;
|
||||
secret.rstart = isc_mem_get(listener->mctx,
|
||||
key->secret.length);
|
||||
memmove(secret.rstart, key->secret.base, key->secret.length);
|
||||
secret.rend = secret.rstart + key->secret.length;
|
||||
algorithm = key->algorithm;
|
||||
@@ -561,8 +560,6 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
|
||||
isc_result_t result;
|
||||
|
||||
conn = isc_mem_get(listener->mctx, sizeof(*conn));
|
||||
if (conn == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
conn->sock = sock;
|
||||
isccc_ccmsg_init(listener->mctx, sock, &conn->ccmsg);
|
||||
@@ -709,7 +706,7 @@ cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
static void
|
||||
controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
controlkeylist_t *keyids)
|
||||
{
|
||||
@@ -726,11 +723,7 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
obj = cfg_listelt_value(element);
|
||||
str = cfg_obj_asstring(obj);
|
||||
newstr = isc_mem_strdup(mctx, str);
|
||||
if (newstr == NULL)
|
||||
goto cleanup;
|
||||
key = isc_mem_get(mctx, sizeof(*key));
|
||||
if (key == NULL)
|
||||
goto cleanup;
|
||||
key->keyname = newstr;
|
||||
key->algorithm = DST_ALG_UNKNOWN;
|
||||
key->secret.base = NULL;
|
||||
@@ -739,13 +732,6 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
ISC_LIST_APPEND(*keyids, key, link);
|
||||
newstr = NULL;
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (newstr != NULL)
|
||||
isc_mem_free(mctx, newstr);
|
||||
free_controlkeylist(keyids, mctx);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -819,15 +805,6 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
|
||||
keyid->secret.length = isc_buffer_usedlength(&b);
|
||||
keyid->secret.base = isc_mem_get(mctx,
|
||||
keyid->secret.length);
|
||||
if (keyid->secret.base == NULL) {
|
||||
cfg_obj_log(keydef, named_g_lctx,
|
||||
ISC_LOG_WARNING,
|
||||
"couldn't register key '%s': "
|
||||
"out of memory", keyid->keyname);
|
||||
ISC_LIST_UNLINK(*keyids, keyid, link);
|
||||
free_controlkey(keyid, mctx);
|
||||
break;
|
||||
}
|
||||
memmove(keyid->secret.base, isc_buffer_base(&b),
|
||||
keyid->secret.length);
|
||||
}
|
||||
@@ -868,8 +845,6 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
|
||||
CHECK(cfg_map_get(config, "key", &key));
|
||||
|
||||
keyid = isc_mem_get(mctx, sizeof(*keyid));
|
||||
if (keyid == NULL)
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
keyid->keyname = isc_mem_strdup(mctx,
|
||||
cfg_obj_asstring(cfg_map_getname(key)));
|
||||
keyid->secret.base = NULL;
|
||||
@@ -911,14 +886,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
|
||||
}
|
||||
|
||||
keyid->secret.length = isc_buffer_usedlength(&b);
|
||||
keyid->secret.base = isc_mem_get(mctx,
|
||||
keyid->secret.length);
|
||||
if (keyid->secret.base == NULL) {
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"couldn't register key '%s': "
|
||||
"out of memory", keyid->keyname);
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
}
|
||||
keyid->secret.base = isc_mem_get(mctx, keyid->secret.length);
|
||||
memmove(keyid->secret.base, isc_buffer_base(&b),
|
||||
keyid->secret.length);
|
||||
ISC_LIST_APPEND(*keyids, keyid, link);
|
||||
@@ -1017,14 +985,11 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
|
||||
INSIST(global_keylist != NULL);
|
||||
|
||||
ISC_LIST_INIT(keys);
|
||||
result = controlkeylist_fromcfg(control_keylist,
|
||||
listener->mctx, &keys);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
free_controlkeylist(&listener->keys, listener->mctx);
|
||||
listener->keys = keys;
|
||||
register_keys(control, global_keylist, &listener->keys,
|
||||
listener->mctx, socktext);
|
||||
}
|
||||
controlkeylist_fromcfg(control_keylist, listener->mctx, &keys);
|
||||
free_controlkeylist(&listener->keys, listener->mctx);
|
||||
listener->keys = keys;
|
||||
register_keys(control, global_keylist, &listener->keys,
|
||||
listener->mctx, socktext);
|
||||
} else {
|
||||
free_controlkeylist(&listener->keys, listener->mctx);
|
||||
result = get_rndckey(listener->mctx, &listener->keys);
|
||||
@@ -1125,8 +1090,6 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
listener = isc_mem_get(mctx, sizeof(*listener));
|
||||
if (listener == NULL)
|
||||
result = ISC_R_NOMEMORY;
|
||||
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
listener->mctx = NULL;
|
||||
@@ -1177,15 +1140,13 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
|
||||
&control_keylist);
|
||||
|
||||
if (control_keylist != NULL) {
|
||||
result = controlkeylist_fromcfg(control_keylist,
|
||||
listener->mctx,
|
||||
controlkeylist_fromcfg(control_keylist, listener->mctx,
|
||||
&listener->keys);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
register_keys(control, global_keylist,
|
||||
&listener->keys,
|
||||
listener->mctx, socktext);
|
||||
} else
|
||||
register_keys(control, global_keylist, &listener->keys,
|
||||
listener->mctx, socktext);
|
||||
} else {
|
||||
result = get_rndckey(mctx, &listener->keys);
|
||||
}
|
||||
|
||||
if (result != ISC_R_SUCCESS && control != NULL)
|
||||
cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifdef ENABLE_AFL
|
||||
#include <named/globals.h>
|
||||
#include <named/server.h>
|
||||
#include <sys/errno.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/condition.h>
|
||||
|
||||
+3
-11
@@ -10,12 +10,12 @@
|
||||
.\" Title: named.conf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2019-06-28
|
||||
.\" Date: 2019-08-07
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\&.CONF" "5" "2019\-06\-28" "ISC" "BIND9"
|
||||
.TH "NAMED\&.CONF" "5" "2019\-08\-07" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -243,7 +243,7 @@ options {
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
check\-wildcard \fIboolean\fR;
|
||||
clients\-per\-query \fIinteger\fR;
|
||||
cookie\-algorithm ( aes | sha1 | sha256 );
|
||||
cookie\-algorithm ( aes | siphash24 );
|
||||
cookie\-secret \fIstring\fR;
|
||||
coresize ( default | unlimited | \fIsizeval\fR );
|
||||
datasize ( default | unlimited | \fIsizeval\fR );
|
||||
@@ -274,9 +274,6 @@ options {
|
||||
dnssec\-accept\-expired \fIboolean\fR;
|
||||
dnssec\-dnskey\-kskonly \fIboolean\fR;
|
||||
dnssec\-loadkeys\-interval \fIinteger\fR;
|
||||
dnssec\-lookaside ( \fIstring\fR
|
||||
trust\-anchor \fIstring\fR |
|
||||
auto | no ); deprecated
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
@@ -661,9 +658,6 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
initial\-key ) \fIinteger\fR \fIinteger\fR
|
||||
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
|
||||
dnssec\-loadkeys\-interval \fIinteger\fR;
|
||||
dnssec\-lookaside ( \fIstring\fR
|
||||
trust\-anchor \fIstring\fR |
|
||||
auto | no ); deprecated
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
@@ -913,7 +907,6 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
masters [ port \fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR
|
||||
| \fIipv4_address\fR [ port \fIinteger\fR ] | \fIipv6_address\fR [
|
||||
port \fIinteger\fR ] ) [ key \fIstring\fR ]; \&.\&.\&. };
|
||||
max\-ixfr\-log\-size ( default | unlimited |
|
||||
max\-journal\-size ( default | unlimited | \fIsizeval\fR );
|
||||
max\-records \fIinteger\fR;
|
||||
max\-refresh\-time \fIinteger\fR;
|
||||
@@ -933,7 +926,6 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR
|
||||
| * ) ] [ dscp \fIinteger\fR ];
|
||||
notify\-to\-soa \fIboolean\fR;
|
||||
pubkey \fIinteger\fR \fIinteger\fR \fIinteger\fR
|
||||
request\-expire \fIboolean\fR;
|
||||
request\-ixfr \fIboolean\fR;
|
||||
serial\-update\-method ( date | increment | unixtime );
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
|
||||
<info>
|
||||
<date>2019-06-28</date>
|
||||
<date>2019-08-07</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
@@ -154,7 +154,6 @@ logging {
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
|
||||
<refsection><info><title>MANAGED-KEYS</title></info>
|
||||
<para>Deprecated - see DNSSEC-KEYS.</para>
|
||||
<literallayout class="normal">
|
||||
@@ -222,7 +221,7 @@ options {
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
check-wildcard <replaceable>boolean</replaceable>;
|
||||
clients-per-query <replaceable>integer</replaceable>;
|
||||
cookie-algorithm ( aes | sha1 | sha256 );
|
||||
cookie-algorithm ( aes | siphash24 );
|
||||
cookie-secret <replaceable>string</replaceable>;
|
||||
coresize ( default | unlimited | <replaceable>sizeval</replaceable> );
|
||||
datasize ( default | unlimited | <replaceable>sizeval</replaceable> );
|
||||
@@ -253,9 +252,6 @@ options {
|
||||
dnssec-accept-expired <replaceable>boolean</replaceable>;
|
||||
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
|
||||
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
|
||||
dnssec-lookaside ( <replaceable>string</replaceable>
|
||||
trust-anchor <replaceable>string</replaceable> |
|
||||
auto | no ); deprecated
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
|
||||
dnssec-update-mode ( maintain | no-resign );
|
||||
@@ -614,9 +610,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
|
||||
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
|
||||
dnssec-lookaside ( <replaceable>string</replaceable>
|
||||
trust-anchor <replaceable>string</replaceable> |
|
||||
auto | no ); deprecated
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
|
||||
dnssec-update-mode ( maintain | no-resign );
|
||||
@@ -866,7 +859,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
masters [ port <replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable>
|
||||
| <replaceable>ipv4_address</replaceable> [ port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [
|
||||
port <replaceable>integer</replaceable> ] ) [ key <replaceable>string</replaceable> ]; ... };
|
||||
max-ixfr-log-size ( default | unlimited |
|
||||
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
|
||||
max-records <replaceable>integer</replaceable>;
|
||||
max-refresh-time <replaceable>integer</replaceable>;
|
||||
@@ -886,7 +878,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable>
|
||||
| * ) ] [ dscp <replaceable>integer</replaceable> ];
|
||||
notify-to-soa <replaceable>boolean</replaceable>;
|
||||
pubkey <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
request-expire <replaceable>boolean</replaceable>;
|
||||
request-ixfr <replaceable>boolean</replaceable>;
|
||||
serial-update-method ( date | increment | unixtime );
|
||||
|
||||
@@ -139,7 +139,6 @@ logging
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.15"></a><h2>MANAGED-KEYS</h2>
|
||||
<p>Deprecated - see DNSSEC-KEYS.</p>
|
||||
@@ -210,7 +209,7 @@ options
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
|
||||
cookie-algorithm ( aes | sha1 | sha256 );<br>
|
||||
cookie-algorithm ( aes | siphash24 );<br>
|
||||
cookie-secret <em class="replaceable"><code>string</code></em>;<br>
|
||||
coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
|
||||
datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
|
||||
@@ -241,9 +240,6 @@ options
|
||||
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
dnssec-lookaside ( <em class="replaceable"><code>string</code></em><br>
|
||||
trust-anchor <em class="replaceable"><code>string</code></em> |<br>
|
||||
auto | no ); deprecated<br>
|
||||
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-update-mode ( maintain | no-resign );<br>
|
||||
@@ -607,9 +603,6 @@ view
|
||||
initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
dnssec-lookaside ( <em class="replaceable"><code>string</code></em><br>
|
||||
trust-anchor <em class="replaceable"><code>string</code></em> |<br>
|
||||
auto | no ); deprecated<br>
|
||||
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-update-mode ( maintain | no-resign );<br>
|
||||
@@ -859,7 +852,6 @@ view
|
||||
masters [ port <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em><br>
|
||||
| <em class="replaceable"><code>ipv4_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [<br>
|
||||
port <em class="replaceable"><code>integer</code></em> ] ) [ key <em class="replaceable"><code>string</code></em> ]; ... };<br>
|
||||
max-ixfr-log-size ( default | unlimited |<br>
|
||||
max-journal-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
|
||||
max-records <em class="replaceable"><code>integer</code></em>;<br>
|
||||
max-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
|
||||
@@ -879,7 +871,6 @@ view
|
||||
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em><br>
|
||||
| * ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
|
||||
notify-to-soa <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
pubkey <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
serial-update-method ( date | increment | unixtime );<br>
|
||||
|
||||
+23
-134
@@ -39,6 +39,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/resource.h>
|
||||
#include <isc/siphash.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/stat.h>
|
||||
#include <isc/stats.h>
|
||||
@@ -1903,7 +1904,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
|
||||
dns_zone_setclass(zone, view->rdclass);
|
||||
dns_zone_settype(zone, dns_zone_master);
|
||||
dns_zone_setstats(zone, named_g_server->zonestats);
|
||||
CHECK(dns_zone_setdbtype(zone, dns64_dbtypec, dns64_dbtype));
|
||||
dns_zone_setdbtype(zone, dns64_dbtypec, dns64_dbtype);
|
||||
if (view->queryacl != NULL)
|
||||
dns_zone_setqueryacl(zone, view->queryacl);
|
||||
if (view->queryonacl != NULL)
|
||||
@@ -1944,10 +1945,6 @@ conf_dnsrps_sadd(conf_dnsrps_ctx_t *ctx, const char *p, ...) {
|
||||
|
||||
if (ctx->cstr == NULL) {
|
||||
ctx->cstr = isc_mem_get(ctx->mctx, 256);
|
||||
if (ctx->cstr == NULL) {
|
||||
ctx->result = ISC_R_NOMEMORY;
|
||||
return (false);
|
||||
}
|
||||
ctx->cstr[0] = '\0';
|
||||
ctx->cstr_size = 256;
|
||||
}
|
||||
@@ -1963,10 +1960,6 @@ conf_dnsrps_sadd(conf_dnsrps_ctx_t *ctx, const char *p, ...) {
|
||||
|
||||
new_cstr_size = ((cur_len + new_len)/256 + 1) * 256;
|
||||
new_cstr = isc_mem_get(ctx->mctx, new_cstr_size);
|
||||
if (new_cstr == NULL) {
|
||||
ctx->result = ISC_R_NOMEMORY;
|
||||
return (false);
|
||||
}
|
||||
|
||||
memmove(new_cstr, ctx->cstr, cur_len);
|
||||
isc_mem_put(ctx->mctx, ctx->cstr, ctx->cstr_size);
|
||||
@@ -3417,9 +3410,9 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
|
||||
zone = myzone;
|
||||
CHECK(dns_zone_setorigin(zone, name));
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
|
||||
if (db == NULL)
|
||||
CHECK(dns_zone_setdbtype(zone, empty_dbtypec,
|
||||
empty_dbtype));
|
||||
if (db == NULL) {
|
||||
dns_zone_setdbtype(zone, empty_dbtypec, empty_dbtype);
|
||||
}
|
||||
dns_zone_setclass(zone, view->rdclass);
|
||||
dns_zone_settype(zone, dns_zone_master);
|
||||
dns_zone_setstats(zone, named_g_server->zonestats);
|
||||
@@ -3790,7 +3783,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
const cfg_obj_t *zonelist;
|
||||
const cfg_obj_t *dlzlist;
|
||||
const cfg_obj_t *dlz;
|
||||
const cfg_obj_t *dlvobj = NULL;
|
||||
unsigned int dlzargc;
|
||||
char **dlzargv;
|
||||
const cfg_obj_t *dyndb_list, *plugin_list;
|
||||
@@ -4371,10 +4363,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
isc_mem_detach(&hmctx);
|
||||
}
|
||||
nsc = isc_mem_get(mctx, sizeof(*nsc));
|
||||
if (nsc == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
nsc->cache = NULL;
|
||||
dns_cache_attach(cache, &nsc->cache);
|
||||
nsc->primaryview = view;
|
||||
@@ -4625,7 +4613,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
}
|
||||
|
||||
/*
|
||||
* Set supported DS/DLV digest types.
|
||||
* Set supported DS digest types.
|
||||
*/
|
||||
dns_resolver_reset_ds_digests(view->resolver);
|
||||
disabled = NULL;
|
||||
@@ -5215,57 +5203,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
view->prefetch_eligible = view->prefetch_trigger + 6;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(optionmaps, "dnssec-lookaside", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
/* "auto" is deprecated, log a warning if seen */
|
||||
const char *dom;
|
||||
dlvobj = cfg_listelt_value(cfg_list_first(obj));
|
||||
dom = cfg_obj_asstring(cfg_tuple_get(dlvobj, "domain"));
|
||||
if (cfg_obj_isvoid(cfg_tuple_get(dlvobj, "trust-anchor"))) {
|
||||
/* If "no", skip; if "auto", log warning */
|
||||
if (!strcasecmp(dom, "no")) {
|
||||
result = ISC_R_NOTFOUND;
|
||||
} else if (!strcasecmp(dom, "auto")) {
|
||||
/*
|
||||
* Warning logged by libbind9.
|
||||
*/
|
||||
result = ISC_R_NOTFOUND;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_name_t *dlv, *iscdlv;
|
||||
dns_fixedname_t f;
|
||||
|
||||
/* Also log a warning if manually configured to dlv.isc.org */
|
||||
iscdlv = dns_fixedname_initname(&f);
|
||||
CHECK(dns_name_fromstring(iscdlv, "dlv.isc.org", 0, NULL));
|
||||
|
||||
for (element = cfg_list_first(obj);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
obj = cfg_listelt_value(element);
|
||||
obj = cfg_tuple_get(obj, "trust-anchor");
|
||||
|
||||
dlv = dns_fixedname_name(&view->dlv_fixed);
|
||||
CHECK(dns_name_fromstring(dlv, cfg_obj_asstring(obj),
|
||||
DNS_NAME_DOWNCASE, NULL));
|
||||
if (dns_name_equal(dlv, iscdlv)) {
|
||||
/*
|
||||
* Warning logged by libbind9.
|
||||
*/
|
||||
view->dlv = NULL;
|
||||
} else {
|
||||
view->dlv = dlv;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
view->dlv = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* For now, there is only one kind of trusted keys, the
|
||||
* "security roots".
|
||||
@@ -5795,10 +5732,6 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
|
||||
{
|
||||
const cfg_obj_t *forwarder = cfg_listelt_value(element);
|
||||
fwd = isc_mem_get(view->mctx, sizeof(dns_forwarder_t));
|
||||
if (fwd == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
fwd->addr = *cfg_obj_assockaddr(forwarder);
|
||||
if (isc_sockaddr_getport(&fwd->addr) == 0)
|
||||
isc_sockaddr_setport(&fwd->addr, port);
|
||||
@@ -6856,9 +6789,6 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
|
||||
view->name, namebuf);
|
||||
|
||||
tat = isc_mem_get(dotat_arg->view->mctx, sizeof(*tat));
|
||||
if (tat == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
tat->mctx = NULL;
|
||||
tat->task = NULL;
|
||||
@@ -6987,8 +6917,6 @@ setstring(named_server_t *server, char **field, const char *value) {
|
||||
|
||||
if (value != NULL) {
|
||||
copy = isc_mem_strdup(server->mctx, value);
|
||||
if (copy == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
} else {
|
||||
copy = NULL;
|
||||
}
|
||||
@@ -7325,15 +7253,12 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
|
||||
INSIST(server->session_keyalg == DST_ALG_UNKNOWN);
|
||||
INSIST(server->session_keybits == 0);
|
||||
|
||||
server->session_keyname = isc_mem_get(mctx, sizeof(dns_name_t));
|
||||
if (server->session_keyname == NULL)
|
||||
goto cleanup;
|
||||
server->session_keyname = isc_mem_get(mctx,
|
||||
sizeof(dns_name_t));
|
||||
dns_name_init(server->session_keyname, NULL);
|
||||
CHECK(dns_name_dup(keyname, mctx, server->session_keyname));
|
||||
|
||||
server->session_keyfile = isc_mem_strdup(mctx, keyfile);
|
||||
if (server->session_keyfile == NULL)
|
||||
goto cleanup;
|
||||
|
||||
server->session_keyalg = algtype;
|
||||
server->session_keybits = bits;
|
||||
@@ -7536,10 +7461,6 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
|
||||
}
|
||||
|
||||
nzcfg = isc_mem_get(view->mctx, sizeof(*nzcfg));
|
||||
if (nzcfg == NULL) {
|
||||
dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
/*
|
||||
* We attach the parser that was used for config as well
|
||||
@@ -8028,7 +7949,7 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
|
||||
"'lock-file' has no effect "
|
||||
"because the server was run with -X");
|
||||
server->lockfile = isc_mem_strdup(server->mctx,
|
||||
named_g_defaultlockfile);
|
||||
named_g_defaultlockfile);
|
||||
} else {
|
||||
filename = cfg_obj_asstring(obj);
|
||||
server->lockfile = isc_mem_strdup(server->mctx,
|
||||
@@ -9129,12 +9050,10 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "cookie-algorithm", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "siphash24") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_siphash24;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_aes;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_sha1;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha256") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_sha256;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
@@ -9171,10 +9090,6 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
} else {
|
||||
altsecret = isc_mem_get(server->sctx->mctx,
|
||||
sizeof(*altsecret));
|
||||
if (altsecret == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_init(&b, altsecret->secret,
|
||||
sizeof(altsecret->secret));
|
||||
result = isc_hex_decodestring(str, &b);
|
||||
@@ -9192,30 +9107,18 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
|
||||
usedlength = isc_buffer_usedlength(&b);
|
||||
switch (server->sctx->cookiealg) {
|
||||
case ns_cookiealg_siphash24:
|
||||
expectedlength = ISC_SIPHASH24_KEY_LENGTH;
|
||||
if (usedlength != expectedlength) {
|
||||
CHECKM(ISC_R_RANGE,
|
||||
"SipHash-2-4 cookie-secret must be 128 bits");
|
||||
}
|
||||
break;
|
||||
case ns_cookiealg_aes:
|
||||
expectedlength = ISC_AES128_KEYLENGTH;
|
||||
if (usedlength != expectedlength) {
|
||||
CHECKM(ISC_R_RANGE,
|
||||
"AES cookie-secret must be "
|
||||
"128 bits");
|
||||
}
|
||||
break;
|
||||
case ns_cookiealg_sha1:
|
||||
expectedlength =
|
||||
isc_md_type_get_size(ISC_MD_SHA1);
|
||||
if (usedlength != expectedlength) {
|
||||
CHECKM(ISC_R_RANGE,
|
||||
"SHA1 cookie-secret must be "
|
||||
"160 bits");
|
||||
}
|
||||
break;
|
||||
case ns_cookiealg_sha256:
|
||||
expectedlength =
|
||||
isc_md_type_get_size(ISC_MD_SHA256);
|
||||
if (usedlength != expectedlength) {
|
||||
CHECKM(ISC_R_RANGE,
|
||||
"SHA256 cookie-secret must be "
|
||||
"256 bits");
|
||||
"AES cookie-secret must be 128 bits");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -9411,9 +9314,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
|
||||
dns_view_t *view;
|
||||
ns_zoneload_t *zl;
|
||||
|
||||
zl = isc_mem_get(server->mctx, sizeof (*zl));
|
||||
if (zl == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
zl = isc_mem_get(server->mctx, sizeof(*zl));
|
||||
zl->server = server;
|
||||
zl->reconfig = reconfig;
|
||||
|
||||
@@ -9965,10 +9866,6 @@ named_add_reserved_dispatch(named_server_t *server,
|
||||
}
|
||||
|
||||
dispatch = isc_mem_get(server->mctx, sizeof(*dispatch));
|
||||
if (dispatch == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
dispatch->addr = *addr;
|
||||
dispatch->dispatchgen = server->dispatchgen;
|
||||
@@ -10642,8 +10539,6 @@ add_zone_tolist(dns_zone_t *zone, void *uap) {
|
||||
struct zonelistentry *zle;
|
||||
|
||||
zle = isc_mem_get(dctx->mctx, sizeof *zle);
|
||||
if (zle == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
zle->zone = NULL;
|
||||
dns_zone_attach(zone, &zle->zone);
|
||||
ISC_LINK_INIT(zle, link);
|
||||
@@ -10666,8 +10561,6 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
vle = isc_mem_get(dctx->mctx, sizeof *vle);
|
||||
if (vle == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
vle->view = NULL;
|
||||
dns_view_attach(view, &vle->view);
|
||||
ISC_LINK_INIT(vle, link);
|
||||
@@ -10860,8 +10753,6 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
dctx = isc_mem_get(server->mctx, sizeof(*dctx));
|
||||
if (dctx == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
dctx->mctx = server->mctx;
|
||||
dctx->dumpcache = true;
|
||||
@@ -11597,7 +11488,7 @@ delete_keynames(dns_tsig_keyring_t *ring, char *target,
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
|
||||
again:
|
||||
dns_rbtnodechain_init(&chain, ring->mctx);
|
||||
dns_rbtnodechain_init(&chain);
|
||||
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
|
||||
origin);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
@@ -11713,7 +11604,7 @@ list_keynames(dns_view_t *view, dns_tsig_keyring_t *ring, isc_buffer_t **text,
|
||||
|
||||
dns_name_init(&foundname, NULL);
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
dns_rbtnodechain_init(&chain, ring->mctx);
|
||||
dns_rbtnodechain_init(&chain);
|
||||
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
|
||||
origin);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
@@ -13668,8 +13559,6 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
|
||||
|
||||
/* Send cleanup event */
|
||||
dz = isc_mem_get(named_g_mctx, sizeof(*dz));
|
||||
if (dz == NULL)
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
|
||||
dz->cleanup = cleanup;
|
||||
dz->zone = NULL;
|
||||
|
||||
+16
-13
@@ -1253,6 +1253,12 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
rdatastatstype_attr(dns_rdatastatstype_t type, unsigned int attr)
|
||||
{
|
||||
return ((DNS_RDATASTATSTYPE_ATTR(type) & attr) != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
stats_dumparg_t *dumparg = arg;
|
||||
@@ -1261,6 +1267,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
const char *typestr;
|
||||
bool nxrrset = false;
|
||||
bool stale = false;
|
||||
bool ancient = false;
|
||||
#ifdef HAVE_LIBXML2
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
@@ -1282,19 +1289,16 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
typestr = typebuf;
|
||||
}
|
||||
|
||||
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_NXRRSET)
|
||||
!= 0)
|
||||
nxrrset = true;
|
||||
|
||||
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_STALE)
|
||||
!= 0)
|
||||
stale = true;
|
||||
nxrrset = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_NXRRSET);
|
||||
stale = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_STALE);
|
||||
ancient = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_ANCIENT);
|
||||
|
||||
switch (dumparg->type) {
|
||||
case isc_statsformat_file:
|
||||
fp = dumparg->arg;
|
||||
fprintf(fp, "%20" PRIu64 " %s%s%s\n", val,
|
||||
stale ? "#" : "", nxrrset ? "!" : "", typestr);
|
||||
fprintf(fp, "%20" PRIu64 " %s%s%s%s\n", val,
|
||||
ancient ? "~" : "", stale ? "#" : "",
|
||||
nxrrset ? "!" : "", typestr);
|
||||
break;
|
||||
case isc_statsformat_xml:
|
||||
#ifdef HAVE_LIBXML2
|
||||
@@ -1302,7 +1306,8 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
|
||||
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "rrset"));
|
||||
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "name"));
|
||||
TRY0(xmlTextWriterWriteFormatString(writer, "%s%s%s",
|
||||
TRY0(xmlTextWriterWriteFormatString(writer, "%s%s%s%s",
|
||||
ancient ? "~" : "",
|
||||
stale ? "#" : "",
|
||||
nxrrset ? "!" : "", typestr));
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* name */
|
||||
@@ -1319,7 +1324,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON_C
|
||||
zoneobj = (json_object *) dumparg->arg;
|
||||
snprintf(buf, sizeof(buf), "%s%s%s",
|
||||
snprintf(buf, sizeof(buf), "%s%s%s%s", ancient ? "~" : "",
|
||||
stale ? "#" : "", nxrrset ? "!" : "", typestr);
|
||||
obj = json_object_new_int64(val);
|
||||
if (obj == NULL)
|
||||
@@ -3403,8 +3408,6 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
|
||||
dns_acl_t *new_acl = NULL;
|
||||
|
||||
listener = isc_mem_get(server->mctx, sizeof(*listener));
|
||||
if (listener == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
listener->httpdmgr = NULL;
|
||||
listener->address = *addr;
|
||||
|
||||
@@ -84,10 +84,6 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
name = dns_fixedname_initname(&fname);
|
||||
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
|
||||
if (tctx->domain == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failure;
|
||||
}
|
||||
dns_name_init(tctx->domain, NULL);
|
||||
RETERR(dns_name_dup(name, mctx, tctx->domain));
|
||||
}
|
||||
@@ -109,10 +105,6 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
s = cfg_obj_asstring(obj);
|
||||
tctx->gssapi_keytab = isc_mem_strdup(mctx, s);
|
||||
if (tctx->gssapi_keytab == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failure;
|
||||
}
|
||||
}
|
||||
|
||||
*tctxp = tctx;
|
||||
|
||||
@@ -97,10 +97,6 @@ add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
|
||||
secretstr = cfg_obj_asstring(secretobj);
|
||||
secretalloc = secretlen = strlen(secretstr) * 3 / 4;
|
||||
secret = isc_mem_get(mctx, secretlen);
|
||||
if (secret == NULL) {
|
||||
ret = ISC_R_NOMEMORY;
|
||||
goto failure;
|
||||
}
|
||||
isc_buffer_init(&secretbuf, secret, secretlen);
|
||||
ret = isc_base64_decodestring(secretstr, &secretbuf);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
|
||||
@@ -230,25 +230,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
return (result);
|
||||
|
||||
cd = isc_mem_get(mctx, sizeof(*cd));
|
||||
if (cd == NULL) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
memset(cd, 0, sizeof(*cd));
|
||||
|
||||
cd->mctx = mctx;
|
||||
|
||||
cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
|
||||
if (cd->dl_path == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
|
||||
if (cd->dlzname == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
/* Initialize the lock */
|
||||
isc_mutex_init(&cd->lock);
|
||||
|
||||
@@ -227,25 +227,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
isc_mem_create(0, 0, &mctx);
|
||||
|
||||
cd = isc_mem_get(mctx, sizeof(*cd));
|
||||
if (cd == NULL) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
memset(cd, 0, sizeof(*cd));
|
||||
|
||||
cd->mctx = mctx;
|
||||
|
||||
cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
|
||||
if (cd->dl_path == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
|
||||
if (cd->dlzname == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
triedload = true;
|
||||
|
||||
|
||||
+3
-25
@@ -287,10 +287,6 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
||||
types = NULL;
|
||||
else {
|
||||
types = isc_mem_get(mctx, n * sizeof(dns_rdatatype_t));
|
||||
if (types == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
i = 0;
|
||||
@@ -433,8 +429,6 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
||||
}
|
||||
|
||||
rdata = isc_mem_get(mctx, sizeof(*rdata) + region.length);
|
||||
if (rdata == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
region.base = (unsigned char *)(rdata + 1);
|
||||
memmove(region.base, &na.type, region.length);
|
||||
dns_rdata_init(rdata);
|
||||
@@ -455,13 +449,6 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
||||
/* Add to the list an apex NS with the ns name being the origin name */
|
||||
dns_name_toregion(dns_zone_getorigin(zone), &sregion);
|
||||
rdata = isc_mem_get(mctx, sizeof(*rdata) + sregion.length);
|
||||
if (rdata == NULL) {
|
||||
/*
|
||||
* Already allocated data will be freed in the caller, so
|
||||
* we can simply return here.
|
||||
*/
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
region.length = sregion.length;
|
||||
region.base = (unsigned char *)(rdata + 1);
|
||||
memmove(region.base, sregion.base, region.length);
|
||||
@@ -523,8 +510,6 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
||||
|
||||
dns_name_toregion(nsname, &sregion);
|
||||
rdata = isc_mem_get(mctx, sizeof(*rdata) + sregion.length);
|
||||
if (rdata == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
region.length = sregion.length;
|
||||
region.base = (unsigned char *)(rdata + 1);
|
||||
memmove(region.base, sregion.base, region.length);
|
||||
@@ -718,8 +703,6 @@ strtoargvsub(isc_mem_t *mctx, char *s, unsigned int *argcp,
|
||||
/* We have reached the end of the string. */
|
||||
*argcp = n;
|
||||
*argvp = isc_mem_get(mctx, n * sizeof(char *));
|
||||
if (*argvp == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
} else {
|
||||
char *p = s;
|
||||
while (*p != ' ' && *p != '\t' && *p != '\0')
|
||||
@@ -980,8 +963,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
|
||||
len = strlen(dlzname) + 5;
|
||||
cpval = isc_mem_allocate(mctx, len);
|
||||
if (cpval == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
snprintf(cpval, len, "dlz %s", dlzname);
|
||||
}
|
||||
|
||||
@@ -996,12 +977,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
* cannot be promoted automatically to (const char * const *) by the
|
||||
* compiler w/o generating a warning.
|
||||
*/
|
||||
result = dns_zone_setdbtype(zone, dbargc, (const char * const *)dbargv);
|
||||
dns_zone_setdbtype(zone, dbargc, (const char * const *)dbargv);
|
||||
isc_mem_put(mctx, dbargv, dbargc * sizeof(*dbargv));
|
||||
if (cpval != default_dbtype && cpval != dlz_dbtype)
|
||||
if (cpval != default_dbtype && cpval != dlz_dbtype) {
|
||||
isc_mem_free(mctx, cpval);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = cfg_map_get(zoptions, "file", &obj);
|
||||
@@ -1098,8 +1078,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
RETERR(dns_zone_setfile(raw, filename,
|
||||
masterformat, masterstyle));
|
||||
signedname = isc_mem_get(mctx, signedlen);
|
||||
if (signedname == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
(void)snprintf(signedname, signedlen, "%s" SIGNED, filename);
|
||||
result = dns_zone_setfile(zone, signedname,
|
||||
|
||||
+8
-32
@@ -514,8 +514,6 @@ setup_keystr(void) {
|
||||
|
||||
secretlen = strlen(secretstr) * 3 / 4;
|
||||
secret = isc_mem_allocate(gmctx, secretlen);
|
||||
if (secret == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
isc_buffer_init(&secretbuf, secret, secretlen);
|
||||
result = isc_base64_decodestring(secretstr, &secretbuf);
|
||||
@@ -584,8 +582,6 @@ read_sessionkey(isc_mem_t *mctx, isc_log_t *lctx) {
|
||||
|
||||
len = strlen(algorithm) + strlen(mykeyname) + strlen(secretstr) + 3;
|
||||
keystr = isc_mem_allocate(mctx, len);
|
||||
if (keystr == NULL)
|
||||
fatal("out of memory");
|
||||
snprintf(keystr, len, "%s:%s:%s", algorithm, mykeyname, secretstr);
|
||||
setup_keystr();
|
||||
|
||||
@@ -824,9 +820,8 @@ setup_system(void) {
|
||||
default_servers = !local_only;
|
||||
|
||||
ns_total = ns_alloc = (have_ipv4 ? 1 : 0) + (have_ipv6 ? 1 : 0);
|
||||
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
servers = isc_mem_get(gmctx,
|
||||
ns_alloc * sizeof(isc_sockaddr_t));
|
||||
|
||||
if (have_ipv6) {
|
||||
memset(&in6, 0, sizeof(in6));
|
||||
@@ -869,9 +864,8 @@ setup_system(void) {
|
||||
}
|
||||
|
||||
ns_alloc = ns_total;
|
||||
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
servers = isc_mem_get(gmctx,
|
||||
ns_alloc * sizeof(isc_sockaddr_t));
|
||||
|
||||
i = 0;
|
||||
for (sa = ISC_LIST_HEAD(*nslist);
|
||||
@@ -1497,8 +1491,6 @@ evaluate_server(char *cmdline) {
|
||||
ns_alloc = MAX_SERVERADDRS;
|
||||
ns_inuse = 0;
|
||||
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
memset(servers, 0, ns_alloc * sizeof(isc_sockaddr_t));
|
||||
ns_total = get_addresses(server, (in_port_t)port, servers, ns_alloc);
|
||||
@@ -1541,15 +1533,13 @@ evaluate_local(char *cmdline) {
|
||||
|
||||
if (have_ipv6 && inet_pton(AF_INET6, local, &in6) == 1) {
|
||||
if (localaddr6 == NULL)
|
||||
localaddr6 = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
|
||||
if (localaddr6 == NULL)
|
||||
fatal("out of memory");
|
||||
localaddr6 = isc_mem_get(gmctx,
|
||||
sizeof(isc_sockaddr_t));
|
||||
isc_sockaddr_fromin6(localaddr6, &in6, (in_port_t)port);
|
||||
} else if (have_ipv4 && inet_pton(AF_INET, local, &in4) == 1) {
|
||||
if (localaddr4 == NULL)
|
||||
localaddr4 = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
|
||||
if (localaddr4 == NULL)
|
||||
fatal("out of memory");
|
||||
localaddr4 = isc_mem_get(gmctx,
|
||||
sizeof(isc_sockaddr_t));
|
||||
isc_sockaddr_fromin(localaddr4, &in4, (in_port_t)port);
|
||||
} else {
|
||||
fprintf(stderr, "invalid address %s", local);
|
||||
@@ -1608,8 +1598,6 @@ evaluate_key(char *cmdline) {
|
||||
}
|
||||
secretlen = strlen(secretstr) * 3 / 4;
|
||||
secret = isc_mem_allocate(gmctx, secretlen);
|
||||
if (secret == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
isc_buffer_init(&secretbuf, secret, secretlen);
|
||||
result = isc_base64_decodestring(secretstr, &secretbuf);
|
||||
@@ -1683,8 +1671,6 @@ evaluate_realm(char *cmdline) {
|
||||
return (STATUS_SYNTAX);
|
||||
}
|
||||
realm = isc_mem_strdup(gmctx, buf);
|
||||
if (realm == NULL)
|
||||
fatal("out of memory");
|
||||
return (STATUS_MORE);
|
||||
#else
|
||||
UNUSED(cmdline);
|
||||
@@ -2520,8 +2506,6 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
|
||||
ddebug("Destroying request [%p]", request);
|
||||
dns_request_destroy(&request);
|
||||
reqinfo = isc_mem_get(gmctx, sizeof(nsu_requestinfo_t));
|
||||
if (reqinfo == NULL)
|
||||
fatal("out of memory");
|
||||
reqinfo->msg = soaquery;
|
||||
reqinfo->addr = addr;
|
||||
dns_message_renderreset(soaquery);
|
||||
@@ -2659,8 +2643,6 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
|
||||
master_alloc = MAX_SERVERADDRS;
|
||||
size = master_alloc * sizeof(isc_sockaddr_t);
|
||||
master_servers = isc_mem_get(gmctx, size);
|
||||
if (master_servers == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
memset(master_servers, 0, size);
|
||||
master_total = get_addresses(serverstr, dnsport,
|
||||
@@ -2724,8 +2706,6 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
|
||||
isc_sockaddr_t *srcaddr;
|
||||
|
||||
reqinfo = isc_mem_get(gmctx, sizeof(nsu_requestinfo_t));
|
||||
if (reqinfo == NULL)
|
||||
fatal("out of memory");
|
||||
reqinfo->msg = msg;
|
||||
reqinfo->addr = destaddr;
|
||||
|
||||
@@ -2835,8 +2815,6 @@ start_gssrequest(dns_name_t *master) {
|
||||
dns_name_format(master, namestr, sizeof(namestr));
|
||||
if (kserver == NULL) {
|
||||
kserver = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
|
||||
if (kserver == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
memmove(kserver, &master_servers[master_inuse],
|
||||
@@ -2920,8 +2898,6 @@ send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
|
||||
|
||||
debug("send_gssrequest");
|
||||
reqinfo = isc_mem_get(gmctx, sizeof(nsu_gssinfo_t));
|
||||
if (reqinfo == NULL)
|
||||
fatal("out of memory");
|
||||
reqinfo->msg = msg;
|
||||
reqinfo->addr = destaddr;
|
||||
reqinfo->context = context;
|
||||
|
||||
@@ -43,12 +43,12 @@ dnssec-checkds \- DNSSEC delegation consistency checking tool
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-checkds\fR
|
||||
verifies the correctness of Delegation Signer (DS) or DNSSEC Lookaside Validation (DLV) resource records for keys in a specified zone\&.
|
||||
verifies the correctness of Delegation Signer (DS) resource records for keys in a specified zone\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS or DLV records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&.
|
||||
Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&.
|
||||
.sp
|
||||
The
|
||||
\fIalgorithm\fR
|
||||
@@ -62,11 +62,6 @@ If a
|
||||
is specified, then the zone is read from that file to find the DNSKEY records\&. If not, then the DNSKEY records for the zone are looked up in the DNS\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Check for a DLV record in the specified lookaside domain, instead of checking for a DS record in the zone\*(Aqs parent\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIfile\fR
|
||||
.RS 4
|
||||
Specifies a prepared dsset file, such as would be generated by
|
||||
|
||||
@@ -59,9 +59,8 @@
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para><command>dnssec-checkds</command>
|
||||
verifies the correctness of Delegation Signer (DS) or DNSSEC
|
||||
Lookaside Validation (DLV) resource records for keys in a specified
|
||||
zone.
|
||||
verifies the correctness of Delegation Signer (DS)
|
||||
resource records for keys in a specified zone.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
@@ -74,7 +73,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Specify a digest algorithm to use when converting the
|
||||
zone's DNSKEY records to expected DS or DLV records. This
|
||||
zone's DNSKEY records to expected DS records. This
|
||||
option can be repeated, so that multiple records are
|
||||
checked for each DNSKEY record.
|
||||
</para>
|
||||
@@ -98,16 +97,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check for a DLV record in the specified lookaside domain,
|
||||
instead of checking for a DS record in the zone's parent.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">file</replaceable></term>
|
||||
<listitem>
|
||||
|
||||
@@ -46,9 +46,8 @@
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p><span class="command"><strong>dnssec-checkds</strong></span>
|
||||
verifies the correctness of Delegation Signer (DS) or DNSSEC
|
||||
Lookaside Validation (DLV) resource records for keys in a specified
|
||||
zone.
|
||||
verifies the correctness of Delegation Signer (DS)
|
||||
resource records for keys in a specified zone.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -60,7 +59,7 @@
|
||||
<dd>
|
||||
<p>
|
||||
Specify a digest algorithm to use when converting the
|
||||
zone's DNSKEY records to expected DS or DLV records. This
|
||||
zone's DNSKEY records to expected DS records. This
|
||||
option can be repeated, so that multiple records are
|
||||
checked for each DNSKEY record.
|
||||
</p>
|
||||
@@ -79,13 +78,6 @@
|
||||
then the DNSKEY records for the zone are looked up in the DNS.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Check for a DLV record in the specified lookaside domain,
|
||||
instead of checking for a DS record in the zone's parent.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>file</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -21,7 +21,7 @@ prog = 'dnssec-checkds'
|
||||
|
||||
############################################################################
|
||||
# SECRR class:
|
||||
# Class for DS/DLV resource record
|
||||
# Class for DS resource record
|
||||
############################################################################
|
||||
class SECRR:
|
||||
hashalgs = {1: 'SHA-1', 2: 'SHA-256', 3: 'GOST', 4: 'SHA-384'}
|
||||
@@ -33,7 +33,7 @@ class SECRR:
|
||||
digest = ''
|
||||
ttl = 0
|
||||
|
||||
def __init__(self, rrtext, dlvname = None):
|
||||
def __init__(self, rrtext):
|
||||
if not rrtext:
|
||||
raise Exception
|
||||
|
||||
@@ -45,24 +45,8 @@ class SECRR:
|
||||
if len(fields) < 7:
|
||||
raise Exception
|
||||
|
||||
if dlvname:
|
||||
self.rrtype = "DLV"
|
||||
self.dlvname = dlvname.lower()
|
||||
parent = fields[0].lower().strip('.').split('.')
|
||||
parent.reverse()
|
||||
dlv = dlvname.split('.')
|
||||
dlv.reverse()
|
||||
while len(dlv) != 0 and len(parent) != 0 and parent[0] == dlv[0]:
|
||||
parent = parent[1:]
|
||||
dlv = dlv[1:]
|
||||
if dlv:
|
||||
raise Exception
|
||||
parent.reverse()
|
||||
self.parent = '.'.join(parent)
|
||||
self.rrname = self.parent + '.' + self.dlvname + '.'
|
||||
else:
|
||||
self.rrtype = "DS"
|
||||
self.rrname = fields[0].lower()
|
||||
self.rrtype = "DS"
|
||||
self.rrname = fields[0].lower()
|
||||
|
||||
fields = fields[1:]
|
||||
if fields[0].upper() in ['IN', 'CH', 'HS']:
|
||||
@@ -91,9 +75,9 @@ class SECRR:
|
||||
|
||||
############################################################################
|
||||
# check:
|
||||
# Fetch DS/DLV RRset for the given zone from the DNS; fetch DNSKEY
|
||||
# Fetch DS RRset for the given zone from the DNS; fetch DNSKEY
|
||||
# RRset from the masterfile if specified, or from DNS if not.
|
||||
# Generate a set of expected DS/DLV records from the DNSKEY RRset,
|
||||
# Generate a set of expected DS records from the DNSKEY RRset,
|
||||
# and report on congruency.
|
||||
############################################################################
|
||||
def check(zone, args):
|
||||
@@ -101,15 +85,13 @@ def check(zone, args):
|
||||
if args.dssetfile:
|
||||
fp = open(args.dssetfile).read()
|
||||
else:
|
||||
cmd = [args.dig, "+noall", "+answer", "-t",
|
||||
"dlv" if args.lookaside else "ds", "-q",
|
||||
zone + "." + args.lookaside if args.lookaside else zone]
|
||||
cmd = [args.dig, "+noall", "+answer", "-t", "ds", "-q", zone]
|
||||
fp, _ = Popen(cmd, stdout=PIPE).communicate()
|
||||
|
||||
for line in fp.splitlines():
|
||||
if type(line) is not str:
|
||||
line = line.decode('ascii')
|
||||
rrlist.append(SECRR(line, args.lookaside))
|
||||
rrlist.append(SECRR(line))
|
||||
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
|
||||
|
||||
klist = []
|
||||
@@ -117,8 +99,6 @@ def check(zone, args):
|
||||
cmd = [args.dsfromkey]
|
||||
for algo in args.algo:
|
||||
cmd += ['-a', algo]
|
||||
if args.lookaside:
|
||||
cmd += ["-l", args.lookaside]
|
||||
|
||||
if args.masterfile:
|
||||
cmd += ["-f", args.masterfile, zone]
|
||||
@@ -132,7 +112,7 @@ def check(zone, args):
|
||||
for line in fp.splitlines():
|
||||
if type(line) is not str:
|
||||
line = line.decode('ascii')
|
||||
klist.append(SECRR(line, args.lookaside))
|
||||
klist.append(SECRR(line))
|
||||
|
||||
if len(klist) < 1:
|
||||
print("No DNSKEY records found in zone apex")
|
||||
@@ -182,8 +162,6 @@ def parse_args():
|
||||
type=str, help='path to \'dnssec-dsfromkey\'')
|
||||
parser.add_argument('-f', '--file', dest='masterfile', type=str,
|
||||
help='zone master file')
|
||||
parser.add_argument('-l', '--lookaside', dest='lookaside', type=str,
|
||||
help='DLV lookaside zone')
|
||||
parser.add_argument('-s', '--dsset', dest='dssetfile', type=str,
|
||||
help='prepared DSset file')
|
||||
parser.add_argument('-v', '--version', action='version',
|
||||
@@ -191,8 +169,6 @@ def parse_args():
|
||||
args = parser.parse_args()
|
||||
|
||||
args.zone = args.zone.strip('.')
|
||||
if args.lookaside:
|
||||
args.lookaside = args.lookaside.strip('.')
|
||||
|
||||
return args
|
||||
|
||||
|
||||
@@ -968,8 +968,6 @@ main(int argc, char **argv) {
|
||||
argslen += strlen(argv[i]) + 1;
|
||||
|
||||
args = isc_mem_get(rndc_mctx, argslen);
|
||||
if (args == NULL)
|
||||
DO("isc_mem_get", ISC_R_NOMEMORY);
|
||||
|
||||
p = args;
|
||||
for (i = 0; i < argc; i++) {
|
||||
|
||||
+10
-5
@@ -49,7 +49,8 @@ output(void *closure, const char *text, int textlen) {
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: cfg_test --rndc|--named "
|
||||
"[--grammar] [--memstats] conffile\n");
|
||||
"[--grammar] [--zonegrammar] [--active] "
|
||||
"[--memstats] conffile\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -67,6 +68,7 @@ main(int argc, char **argv) {
|
||||
bool memstats = false;
|
||||
char *filename = NULL;
|
||||
unsigned int zonetype = 0;
|
||||
unsigned int pflags = 0;
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
@@ -98,7 +100,9 @@ main(int argc, char **argv) {
|
||||
usage();
|
||||
|
||||
while (argc > 1) {
|
||||
if (strcmp(argv[1], "--grammar") == 0) {
|
||||
if (strcmp(argv[1], "--active") == 0) {
|
||||
pflags |= CFG_PRINTER_ACTIVEONLY;
|
||||
} else if (strcmp(argv[1], "--grammar") == 0) {
|
||||
grammar = true;
|
||||
} else if (strcmp(argv[1], "--zonegrammar") == 0) {
|
||||
argv++, argc--;
|
||||
@@ -149,13 +153,14 @@ main(int argc, char **argv) {
|
||||
if (grammar) {
|
||||
if (type == NULL)
|
||||
usage();
|
||||
cfg_print_grammar(type, output, NULL);
|
||||
cfg_print_grammar(type, pflags, output, NULL);
|
||||
} else if (zonetype != 0) {
|
||||
cfg_print_zonegrammar(zonetype, output, NULL);
|
||||
cfg_print_zonegrammar(zonetype, pflags, output, NULL);
|
||||
} else {
|
||||
if (type == NULL || filename == NULL)
|
||||
usage();
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) ==
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
result = cfg_parse_file(pctx, filename, type, &cfg);
|
||||
|
||||
|
||||
@@ -231,8 +231,6 @@ load(const char *filename, const char *origintext, bool cache) {
|
||||
unsigned int i;
|
||||
|
||||
dbi = isc_mem_get(mctx, sizeof(*dbi));
|
||||
if (dbi == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
dbi->db = NULL;
|
||||
dbi->version = NULL;
|
||||
|
||||
@@ -55,10 +55,6 @@ create_name(char *s) {
|
||||
* name structure.
|
||||
*/
|
||||
name = isc_mem_get(mctx, sizeof(*name) + DNSNAMELEN);
|
||||
if (name == NULL) {
|
||||
printf("out of memory!\n");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
dns_name_init(name, NULL);
|
||||
isc_buffer_init(&target, name + 1, DNSNAMELEN);
|
||||
@@ -107,7 +103,7 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
|
||||
isc_result_t result;
|
||||
bool nodes_should_match = false;
|
||||
|
||||
dns_rbtnodechain_init(&chain, mctx);
|
||||
dns_rbtnodechain_init(&chain);
|
||||
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
fullname = dns_fixedname_initname(&fixedfullname);
|
||||
@@ -186,7 +182,7 @@ iterate(dns_rbt_t *rbt, bool forward) {
|
||||
isc_result_t (*move)(dns_rbtnodechain_t *chain, dns_name_t *name,
|
||||
dns_name_t *origin);
|
||||
|
||||
dns_rbtnodechain_init(&chain, mctx);
|
||||
dns_rbtnodechain_init(&chain);
|
||||
|
||||
dns_name_init(&foundname, NULL);
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
|
||||
@@ -109,18 +109,16 @@ main(int argc, char *argv[]) {
|
||||
snprintf(name, sizeof(name), "%02u", i);
|
||||
dupname = strdup(name);
|
||||
RUNTIME_CHECK(dupname != NULL);
|
||||
if (i != 0 && i % 3 == 0)
|
||||
RUNTIME_CHECK(isc_thread_create(run1, dupname,
|
||||
&workers[i]) ==
|
||||
ISC_R_SUCCESS);
|
||||
else
|
||||
RUNTIME_CHECK(isc_thread_create(run2, dupname,
|
||||
&workers[i]) ==
|
||||
ISC_R_SUCCESS);
|
||||
if (i != 0 && i % 3 == 0) {
|
||||
isc_thread_create(run1, dupname, &workers[i]);
|
||||
} else {
|
||||
isc_thread_create(run2, dupname, &workers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < nworkers; i++)
|
||||
(void)isc_thread_join(workers[i], NULL);
|
||||
for (i = 0; i < nworkers; i++) {
|
||||
isc_thread_join(workers[i], NULL);
|
||||
}
|
||||
|
||||
isc_rwlock_destroy(&lock);
|
||||
|
||||
|
||||
@@ -104,11 +104,10 @@ my_recv(isc_task_t *task, isc_event_t *event) {
|
||||
snprintf(buf, sizeof(buf), "\r\nReceived: %.*s\r\n\r\n",
|
||||
(int)dev->n, (char *)region.base);
|
||||
region.base = isc_mem_get(mctx, strlen(buf) + 1);
|
||||
if (region.base != NULL) {
|
||||
{
|
||||
region.length = strlen(buf) + 1;
|
||||
strlcpy((char *)region.base, buf, region.length);
|
||||
} else
|
||||
region.length = 0;
|
||||
}
|
||||
isc_socket_send(sock, ®ion, task, my_send, event->ev_arg);
|
||||
} else {
|
||||
region = dev->region;
|
||||
@@ -177,11 +176,9 @@ my_connect(isc_task_t *task, isc_event_t *event) {
|
||||
"GET / HTTP/1.1\r\nHost: www.flame.org\r\n"
|
||||
"Connection: Close\r\n\r\n");
|
||||
region.base = isc_mem_get(mctx, strlen(buf) + 1);
|
||||
if (region.base != NULL) {
|
||||
{
|
||||
region.length = strlen(buf) + 1;
|
||||
strlcpy((char *)region.base, buf, region.length);
|
||||
} else {
|
||||
region.length = 0;
|
||||
}
|
||||
|
||||
isc_socket_send(sock, ®ion, task, my_http_get, event->ev_arg);
|
||||
|
||||
@@ -99,8 +99,7 @@ setup(const char *zonename, const char *filename, const char *classname) {
|
||||
result = dns_zone_setorigin(zone, origin);
|
||||
ERRRET(result, "dns_zone_setorigin");
|
||||
|
||||
result = dns_zone_setdbtype(zone, 1, &rbt);
|
||||
ERRRET(result, "dns_zone_setdatabase");
|
||||
dns_zone_setdbtype(zone, 1, &rbt);
|
||||
|
||||
result = dns_zone_setfile(zone, filename, dns_masterformat_text,
|
||||
&dns_master_style_default);
|
||||
|
||||
@@ -371,6 +371,7 @@ grep "type: redirect" zonestatus.out.ns2.$n > /dev/null || ret=1
|
||||
grep "serial: 0" zonestatus.out.ns2.$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that reloading a added 'master redirect' zone works ($n)"
|
||||
ret=0
|
||||
@@ -382,12 +383,14 @@ grep "type: redirect" zonestatus.out.ns2.$n > /dev/null || ret=1
|
||||
grep "serial: 1" zonestatus.out.ns2.$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that retransfer of a added 'master redirect' zone fails ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.2 retransfer -redirect > rndc.out.ns2.$n 2>&1 && ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that deleting a 'master redirect' zone works ($n)"
|
||||
ret=0
|
||||
|
||||
@@ -39,7 +39,7 @@ ksk=`$KEYGEN -a RSASHA1 -3 -q -fk $zone`
|
||||
$KEYGEN -a RSASHA1 -3 -q $zone > /dev/null
|
||||
keyfile_to_static_keys $ksk > private.conf
|
||||
cp private.conf ../ns4/private.conf
|
||||
$SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > /dev/null 2>&1
|
||||
$SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > /dev/null
|
||||
|
||||
# Extract saved keys for the revoke-to-duplicate-key test
|
||||
zone=bar
|
||||
|
||||
@@ -152,7 +152,7 @@ setup oldsigs.example
|
||||
cp $infile $zonefile
|
||||
$KEYGEN -q -a RSASHA1 -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$KEYGEN -q -a RSASHA1 $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$SIGNER -PS -s now-1y -e now-6mo -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -PS -s now-1y -e now-6mo -o $zone -f $zonefile $infile > s.out || dumpit s.out
|
||||
|
||||
#
|
||||
# NSEC3->NSEC transition test zone.
|
||||
@@ -160,7 +160,7 @@ $SIGNER -PS -s now-1y -e now-6mo -o $zone -f $zonefile $infile > s.out 2>&1 || d
|
||||
setup nsec3-to-nsec.example
|
||||
$KEYGEN -q -a RSASHA512 -b 2048 -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$KEYGEN -q -a RSASHA512 -b 1024 $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > s.out || dumpit s.out
|
||||
|
||||
#
|
||||
# secure-to-insecure transition test zone; used to test removal of
|
||||
@@ -169,7 +169,7 @@ $SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
setup secure-to-insecure.example
|
||||
$KEYGEN -a RSASHA1 -q -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$KEYGEN -a RSASHA1 -q $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$SIGNER -S -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -o $zone -f $zonefile $infile > s.out || dumpit s.out
|
||||
|
||||
#
|
||||
# another secure-to-insecure transition test zone; used to test
|
||||
@@ -180,7 +180,7 @@ ksk=`$KEYGEN -q -a RSASHA1 -3 -fk $zone 2> kg.out` || dumpit kg.out
|
||||
echo $ksk > ../del1.key
|
||||
zsk=`$KEYGEN -q -a RSASHA1 -3 $zone 2> kg.out` || dumpit kg.out
|
||||
echo $zsk > ../del2.key
|
||||
$SIGNER -S -3 beef -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -3 beef -o $zone -f $zonefile $infile > s.out || dumpit s.out
|
||||
|
||||
#
|
||||
# Introducing a pre-published key test.
|
||||
@@ -189,7 +189,7 @@ setup prepub.example
|
||||
infile="secure-to-insecure2.example.db.in"
|
||||
$KEYGEN -a RSASHA1 -3 -q -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$KEYGEN -a RSASHA1 -3 -q $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$SIGNER -S -3 beef -o $zone -f $zonefile $infile > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -3 beef -o $zone -f $zonefile $infile > s.out || dumpit s.out
|
||||
|
||||
#
|
||||
# Key TTL tests.
|
||||
@@ -235,7 +235,7 @@ echo $zsk > ../delayzsk.key
|
||||
setup nozsk.example
|
||||
$KEYGEN -q -a RSASHA1 -3 -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
zsk=`$KEYGEN -q -a RSASHA1 -3 $zone`
|
||||
$SIGNER -S -P -s now-1mo -e now-1mi -o $zone -f $zonefile ${zonefile}.in > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -P -s now-1mo -e now-1mi -o $zone -f $zonefile ${zonefile}.in > s.out || dumpit s.out
|
||||
echo $zsk > ../missingzsk.key
|
||||
rm -f ${zsk}.private
|
||||
|
||||
@@ -246,7 +246,7 @@ rm -f ${zsk}.private
|
||||
setup inaczsk.example
|
||||
$KEYGEN -q -a RSASHA1 -3 -fk $zone > kg.out 2>&1 || dumpit kg.out
|
||||
zsk=`$KEYGEN -q -a RSASHA1 -3 $zone`
|
||||
$SIGNER -S -P -s now-1mo -e now-1mi -o $zone -f $zonefile ${zonefile}.in > s.out 2>&1 || dumpit s.out
|
||||
$SIGNER -S -P -s now-1mo -e now-1mi -o $zone -f $zonefile ${zonefile}.in > s.out || dumpit s.out
|
||||
echo $zsk > ../inactivezsk.key
|
||||
$SETTIME -I now $zsk > st.out 2>&1 || dumpit st.out
|
||||
|
||||
|
||||
@@ -1168,7 +1168,7 @@ status=`expr $status + $ret`
|
||||
# event scheduled is within 10 seconds of expected interval.
|
||||
check_interval () {
|
||||
awk '/next key event/ {print $2 ":" $9}' $1/named.run |
|
||||
sed 's/\.//g' |
|
||||
sed -e 's/\.//g' -e 's/:0\{1,4\}/:/g' |
|
||||
awk -F: '
|
||||
{
|
||||
x = ($6+ $5*60000 + $4*3600000) - ($3+ $2*60000 + $1*3600000);
|
||||
|
||||
@@ -157,7 +157,6 @@ sleep 1
|
||||
grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
|
||||
|
||||
VERSION=`../../../../isc-config.sh --version | cut -d = -f 2`
|
||||
HOSTNAME=`$FEATURETEST --gethostname`
|
||||
BIND_VERSION_STRING=$($NAMED -V | head -1)
|
||||
BIND_VERSION=$($NAMED -V | sed -ne 's/^BIND \([^ ]*\).*/\1/p')
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
rm -f dig.out.ns2
|
||||
rm -f dig.out.expire
|
||||
rm -f rndc.out.*
|
||||
rm -f sed.out.*
|
||||
rm -f */named.memstats
|
||||
rm -f */named.run
|
||||
|
||||
@@ -57,13 +57,7 @@ EOF
|
||||
}
|
||||
|
||||
dump_cache () {
|
||||
$RNDC $RNDCOPTS dumpdb -cache _default
|
||||
for i in 0 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
grep '^; Dump complete$' ns2/named_dump.db > /dev/null && break
|
||||
sleep 1
|
||||
done
|
||||
mv ns2/named_dump.db ns2/named_dump.db.$n
|
||||
rndc_dumpdb ns2 -cache _default
|
||||
}
|
||||
|
||||
clear_cache () {
|
||||
@@ -113,7 +107,7 @@ echo_i "reset and check that records are correctly cached initially ($n)"
|
||||
ret=0
|
||||
load_cache
|
||||
dump_cache
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | egrep '(TXT|ANY)' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 18 ] || { ret=1; echo_i "found $nrecords records expected 18"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -123,7 +117,7 @@ echo_i "check flushing of the full cache ($n)"
|
||||
ret=0
|
||||
clear_cache
|
||||
dump_cache
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | wc -l`
|
||||
[ $nrecords -eq 0 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -207,7 +201,7 @@ n=`expr $n + 1`
|
||||
echo_i "check the number of cached records remaining ($n)"
|
||||
ret=0
|
||||
dump_cache
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 17 ] || { ret=1; echo_i "found $nrecords records expected 17"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -225,7 +219,7 @@ n=`expr $n + 1`
|
||||
echo_i "check the number of cached records remaining ($n)"
|
||||
ret=0
|
||||
dump_cache
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | egrep '(TXT|ANY)' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.test$n | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 1 ] || { ret=1; echo_i "found $nrecords records expected 1"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -235,17 +229,17 @@ echo_i "check flushtree clears adb correctly ($n)"
|
||||
ret=0
|
||||
load_cache
|
||||
dump_cache
|
||||
mv ns2/named_dump.db.$n ns2/named_dump.db.$n.a
|
||||
mv ns2/named_dump.db.test$n ns2/named_dump.db.test$n.a
|
||||
sed -n '/plain success\/timeout/,/Unassociated entries/p' \
|
||||
ns2/named_dump.db.$n.a > sed.out.$n.a
|
||||
ns2/named_dump.db.test$n.a > sed.out.$n.a
|
||||
grep 'plain success/timeout' sed.out.$n.a > /dev/null 2>&1 || ret=1
|
||||
grep 'Unassociated entries' sed.out.$n.a > /dev/null 2>&1 || ret=1
|
||||
grep 'ns.flushtest.example' sed.out.$n.a > /dev/null 2>&1 || ret=1
|
||||
$RNDC $RNDCOPTS flushtree flushtest.example || ret=1
|
||||
dump_cache
|
||||
mv ns2/named_dump.db.$n ns2/named_dump.db.$n.b
|
||||
mv ns2/named_dump.db.test$n ns2/named_dump.db.test$n.b
|
||||
sed -n '/plain success\/timeout/,/Unassociated entries/p' \
|
||||
ns2/named_dump.db.$n.b > sed.out.$n.b
|
||||
ns2/named_dump.db.test$n.b > sed.out.$n.b
|
||||
grep 'plain success/timeout' sed.out.$n.b > /dev/null 2>&1 || ret=1
|
||||
grep 'Unassociated entries' sed.out.$n.b > /dev/null 2>&1 || ret=1
|
||||
grep 'ns.flushtest.example' sed.out.$n.b > /dev/null 2>&1 && ret=1
|
||||
|
||||
@@ -84,7 +84,7 @@ sed 's/ add \(.*\) IN DS / add \1 3600 IN DS /' <UP.swap >UP.swapttl
|
||||
|
||||
sign() {
|
||||
cat >db.$1
|
||||
$SIGNER >/dev/null 2>&1 \
|
||||
$SIGNER >/dev/null \
|
||||
-S -O full -o $Z -f sig.$1 db.$1
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ zonefile=example.db
|
||||
|
||||
ksk=`$KEYGEN -q -a RSASHA256 -b 2048 -fk $zone`
|
||||
zsk=`$KEYGEN -q -a RSASHA256 -b 1024 $zone`
|
||||
$SIGNER -S -o $zone example.db > /dev/null 2>&1
|
||||
$SIGNER -S -o $zone example.db > /dev/null
|
||||
|
||||
@@ -1,20 +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.
|
||||
*/
|
||||
|
||||
dnssec-keys {
|
||||
dlv.isc.org static-key 257 3 5 "BEAAAAPHMu/5onzrEE7z1egmhg/WPO0+juoZrW3euWE
|
||||
n4MxDCE1+lLy2brhQv5rN32RKtMzX6Mj70jdzeND4XknW58dnJNPCxn8
|
||||
+jAGl2FZLK8t+1uq4W+nnA3qO2+DL+k6BD4mewMLbIYFwe0PG73Te9fZ
|
||||
2kJb56dhgMde5ymX4BI/oQ+cAK50/xvJv00Frf8kw6ucMTwFlgPe+jnG
|
||||
xPPEmHAte/URkY62ZfkLoBAADLHQ9IrS2tryAe7mbBZVcOwIeU/Rw/mR
|
||||
x/vwwMCTgNboMQKtUdvNXDrYJDSHZws3xiRXF1Rf+al9UmZfSav/4NWL
|
||||
KjHzpT59k/VStTDN0YUuWrBNh";
|
||||
};
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
options {
|
||||
dnssec-validation yes;
|
||||
dnssec-lookaside . trust-anchor dlv.example.com;
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
|
||||
@@ -130,7 +130,6 @@ n=`expr $n + 1`
|
||||
echo_i "checking named-checkconf deprecate warnings ($n)"
|
||||
ret=0
|
||||
$CHECKCONF deprecated.conf > checkconf.out$n.1 2>&1
|
||||
grep "option 'dnssec-lookaside' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
|
||||
grep "option 'managed-keys' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
|
||||
grep "option 'trusted-keys' is deprecated" < checkconf.out$n.1 > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -389,7 +388,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that 'dnssec-lookaside auto;' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-dlv-auto.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "dnssec-lookaside 'auto' is no longer supported" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "option 'dnssec-lookaside' is obsolete and should be removed" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -397,17 +396,15 @@ n=`expr $n + 1`
|
||||
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-dlv-dlv.isc.org.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "dlv.isc.org has been shut down" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "option 'dnssec-lookaside' is obsolete and should be removed" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.example.com;' generates only a deprecate warning ($n)"
|
||||
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.example.com;' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF good-dlv-dlv.example.com.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
lines=$(wc -l < checkconf.out$n)
|
||||
if [ $lines != 1 ]; then ret=1; fi
|
||||
grep "option 'dnssec-lookaside' is deprecated" < checkconf.out$n > /dev/null || ret=1
|
||||
$CHECKCONF warn-dlv-dlv.example.com.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "option 'dnssec-lookaside' is obsolete and should be removed" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -456,14 +453,6 @@ grep "use of managed-keys is not allowed" checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that the dlv.isc.org KSK generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF check-dlv-ksk-key.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
[ -s checkconf.out$n ] || ret=1
|
||||
grep "trust anchor for dlv.isc.org is present" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that 'geoip-use-ecs no' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-geoip-use-ecs.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
|
||||
@@ -9,8 +9,6 @@ if "%arg:~0,1%" == "+" goto next
|
||||
if "%arg%" == "-t" goto next
|
||||
if "%arg%" == "ds" goto ds
|
||||
if "%arg%" == "DS" goto ds
|
||||
if "%arg%" == "dlv" goto dlv
|
||||
if "%arg%" == "DLV" goto dlv
|
||||
if "%arg%" == "dnskey" goto dnskey
|
||||
if "%arg%" == "DNSKEY" goto dnskey
|
||||
set file=%arg%
|
||||
@@ -20,10 +18,6 @@ goto next
|
||||
set ext=ds
|
||||
goto next
|
||||
|
||||
:dlv
|
||||
set ext=dlv
|
||||
goto next
|
||||
|
||||
:dnskey
|
||||
set ext=dnskey
|
||||
goto next
|
||||
|
||||
@@ -24,10 +24,6 @@ foreach $arg (@ARGV) {
|
||||
$ext = "ds";
|
||||
next;
|
||||
}
|
||||
if ($arg =~ /^dlv$/i) {
|
||||
$ext = "dlv";
|
||||
next;
|
||||
}
|
||||
if ($arg =~ /^dnskey$/i) {
|
||||
$ext = "dnskey";
|
||||
next;
|
||||
|
||||
@@ -14,7 +14,6 @@ while [ "$#" != 0 ]; do
|
||||
+*) shift ;;
|
||||
-t) shift ;;
|
||||
DS|ds) ext=ds ; shift ;;
|
||||
DLV|dlv) ext=dlv ; shift ;;
|
||||
DNSKEY|dnskey) ext=dnskey ; shift ;;
|
||||
*) file=$1 ; shift ;;
|
||||
esac
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
missing.example.dlv.example. 3600 IN DLV 12892 5 1 9D4CD60491D372207FA584D2EE460CC51D7FF8A7
|
||||
missing.example.dlv.example. 3600 IN DLV 12892 5 2 EF59E5C70BC4153B7DB4C11F9C36B729577DA71474E0A5C9B8875173 6E583200
|
||||
@@ -1,2 +0,0 @@
|
||||
ok.example.dlv.example. 3600 IN DLV 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390
|
||||
ok.example.dlv.example. 3600 IN DLV 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13
|
||||
@@ -43,24 +43,6 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for correct DLV, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example ok.example > checkds.out.$n 2>&1 || ret=1
|
||||
grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for correct DLV, obtaining key from file ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example -f ok.example.dnskey.db ok.example > checkds.out.$n 2>&1 || ret=1
|
||||
grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for incorrect DS, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS wrong.example > checkds.out.$n 2>&1 || ret=1
|
||||
@@ -79,24 +61,6 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for incorrect DLV, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example wrong.example > checkds.out.$n 2>&1 || ret=1
|
||||
grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for incorrect DLV, obtaining key from file ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example -f wrong.example.dnskey.db wrong.example > checkds.out.$n 2>&1 || ret=1
|
||||
grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for partially missing DS, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS missing.example > checkds.out.$n 2>&1 && ret=1
|
||||
@@ -119,28 +83,6 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for partially missing DLV, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example missing.example > checkds.out.$n 2>&1 && ret=1
|
||||
grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for partially missing DLV, obtaining key from file ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example -f missing.example.dnskey.db missing.example > checkds.out.$n 2>&1 && ret=1
|
||||
grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for entirely missing DS, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS none.example > checkds.out.$n 2>&1 && ret=1
|
||||
@@ -159,24 +101,6 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for entirely missing DLV, looking up key via 'dig' ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example none.example > checkds.out.$n 2>&1 && ret=1
|
||||
grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1
|
||||
grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for entirely missing DLV, obtaining key from file ($n)"
|
||||
ret=0
|
||||
$CHECKDS -l dlv.example -f none.example.dnskey.db none.example > checkds.out.$n 2>&1 && ret=1
|
||||
grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 && ret=1
|
||||
grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 && ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking with prepared dsset file ($n)"
|
||||
ret=0
|
||||
$CHECKDS -f prep.example.db -s prep.example.ds.db prep.example > checkds.out.$n 2>&1 || ret=1
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
wrong.example.dlv.example. 3600 IN DLV 1192 5 1 684BB5119673C9272A0A7582AF8576561B5D80EC
|
||||
wrong.example.dlv.example. 3600 IN DLV 1192 5 2 14E4A873360E512CD2E8C2C331C4472F5EDAB0736669901F4D42E976 3D7B1F5C
|
||||
@@ -0,0 +1,4 @@
|
||||
example. 0 SOA . . 0 0 0 0 0
|
||||
example. 0 NS .
|
||||
example. 0 DNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTxuao WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
example. 0 CDNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTXXXX WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
@@ -0,0 +1,6 @@
|
||||
example. 0 SOA . . 0 0 0 0 0
|
||||
example. 0 NS .
|
||||
example. 0 DNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTxuao WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
; Actual CDS
|
||||
; example. 0 CDS 14364 10 2 FD03B2312C8F0FE72C1751EFA1007D743C94EC91594FF0047C23C37CE119BA0C
|
||||
example. 0 CDS 14364 10 2 FD03B2312C8F0FE72C1751EFA1007D743C94EC91594FF0047C23C37CE119BA0B
|
||||
@@ -0,0 +1,4 @@
|
||||
example. 0 SOA . . 0 0 0 0 0
|
||||
example. 0 NS .
|
||||
example. 0 DNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTxuao WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
example. 0 CDNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTxuao WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
@@ -0,0 +1,4 @@
|
||||
example. 0 SOA . . 0 0 0 0 0
|
||||
example. 0 NS .
|
||||
example. 0 DNSKEY 257 3 10 AwEAAbqjg7xdvnU2Q/gtLw5LOfr5cDeTRjYuEbkzGrUiVSOSoxcTxuao WS/AFPQHuD8OSLiE/CeZ087JowREXl058rRfae8KMrveY17V0wmKs9N1 F1wf/hRDpXiThlRHWlskp8eSEEIqYrrHgWTesy/xDGIEOFM1gwRo0w8j KdRRJeL2hseTMa+m3rTzrYudUsI0BHLW8PiDUCbG5xgdee8/5YR4847i AAqHIiPJ1Z/IT53OIjMmtv5BUykZ8RYjlJxxX+C+dpRKiK73SQaR3hCB XAYOL9WsDp2/fpmEZpewavkMkdC+j2CX+z27MCS3ASO0AeKK0lcNXwND kgreE+Kr7gc=
|
||||
example. 0 CDS 14364 10 2 FD03B2312C8F0FE72C1751EFA1007D743C94EC91594FF0047C23C37CE119BA0C
|
||||
@@ -59,7 +59,7 @@ PARALLEL_COMMON="dnssec rpzrecurse serve-stale \
|
||||
acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
cookie database digdelv dlz dlzexternal \
|
||||
dns64 dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
@@ -343,6 +343,48 @@ rndc_reconfig() {
|
||||
done
|
||||
}
|
||||
|
||||
# rndc_dumpdb: call "rndc dumpdb [...]" and wait until it completes
|
||||
#
|
||||
# The first argument is the name server instance to send the command to, in the
|
||||
# form of "nsX" (where "X" is the instance number), e.g. "ns5". The remaining
|
||||
# arguments, if any, are appended to the rndc command line after "dumpdb".
|
||||
#
|
||||
# Control channel configuration for the name server instance to send the
|
||||
# command to must match the contents of bin/tests/system/common/rndc.conf.
|
||||
#
|
||||
# rndc output is stored in a file called rndc.out.test${n}; the "n" variable is
|
||||
# required to be set by the calling tests.sh script.
|
||||
#
|
||||
# Return 0 if the dump completes successfully; return 1 if rndc returns an exit
|
||||
# code other than 0 or if the "; Dump complete" string does not appear in the
|
||||
# dump within 10 seconds.
|
||||
rndc_dumpdb() {
|
||||
__ret=0
|
||||
__dump_complete=0
|
||||
__server="${1}"
|
||||
__ip="10.53.0.$(echo "${__server}" | tr -c -d "0-9")"
|
||||
|
||||
shift
|
||||
${RNDC} -c ../common/rndc.conf -p "${CONTROLPORT}" -s "${__ip}" dumpdb "$@" > "rndc.out.test${n}" 2>&1 || __ret=1
|
||||
|
||||
for _ in 0 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
if grep '^; Dump complete$' "${__server}/named_dump.db" > /dev/null; then
|
||||
mv "${__server}/named_dump.db" "${__server}/named_dump.db.test${n}"
|
||||
__dump_complete=1
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ ${__dump_complete} -eq 0 ]; then
|
||||
echo_i "timed out waiting for 'rndc dumpdb' to finish"
|
||||
__ret=1
|
||||
fi
|
||||
|
||||
return ${__ret}
|
||||
}
|
||||
|
||||
# get_dig_xfer_stats: extract transfer statistics from dig output stored
|
||||
# in $1, converting them to a format used by some system tests.
|
||||
get_dig_xfer_stats() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user