Compare commits
546
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 | ||
|
|
98eda76eb6 | ||
|
|
2e637325ed | ||
|
|
4b4f33e676 | ||
|
|
895eabd376 | ||
|
|
3cf11418b5 | ||
|
|
111d08a6ad | ||
|
|
fcabb55942 | ||
|
|
db8acb4898 | ||
|
|
dd7bd1c23f | ||
|
|
e56cc07f50 | ||
|
|
81faafd508 | ||
|
|
0471d1c1ce | ||
|
|
c0511688b5 | ||
|
|
f1471bc2e1 | ||
|
|
cbe8034dc8 | ||
|
|
244ac0601f | ||
|
|
81550c67da | ||
|
|
3c30d095c4 | ||
|
|
2a57d0b00c | ||
|
|
38a973a33f | ||
|
|
f3577e4635 | ||
|
|
9da902a201 | ||
|
|
6622c7a70a | ||
|
|
1097a209e1 | ||
|
|
8a128151f9 | ||
|
|
3dece71b91 | ||
|
|
f5d3250d90 | ||
|
|
d108e86cc8 | ||
|
|
757cff6644 | ||
|
|
44e2088449 | ||
|
|
de73904d03 | ||
|
|
fc19182e97 | ||
|
|
92424e23fa | ||
|
|
5aeb99786e | ||
|
|
3fcf98c8d3 | ||
|
|
420f84f3f5 | ||
|
|
b56948743a | ||
|
|
5d49f0ac39 | ||
|
|
c434cc69d7 | ||
|
|
5686c33068 | ||
|
|
8a83592e6a | ||
|
|
5c0cc1ee8b | ||
|
|
5570f6bbdc | ||
|
|
747736d361 | ||
|
|
2f9ae94296 | ||
|
|
a2e89ff0c1 | ||
|
|
1957bcaa99 | ||
|
|
9ba3e3f1b5 | ||
|
|
3781448c89 | ||
|
|
55cca87d8a | ||
|
|
787f2a7e03 | ||
|
|
c01679142a | ||
|
|
77c2a8bcbd | ||
|
|
d1503cbfa2 | ||
|
|
4cacdcc15b | ||
|
|
f56b88f72e | ||
|
|
a2a69725ef | ||
|
|
ab7036488e | ||
|
|
81fcde5953 | ||
|
|
f7f4eef5c5 | ||
|
|
df42771a54 | ||
|
|
590362fa48 | ||
|
|
00807c03af | ||
|
|
b104a9bc50 | ||
|
|
49462cf974 | ||
|
|
7c95192691 | ||
|
|
570f358252 | ||
|
|
99d4339093 | ||
|
|
9c509c2684 | ||
|
|
f55e4c878b | ||
|
|
3128bd96f7 | ||
|
|
6dad6b57c0 | ||
|
|
e957825eee | ||
|
|
4d3e7d0b7d | ||
|
|
646bb64246 | ||
|
|
4ae2713640 | ||
|
|
723433cbc6 | ||
|
|
1fe0c51f9b | ||
|
|
9dd11ee258 | ||
|
|
209b2e53d1 | ||
|
|
1eeda8cd23 | ||
|
|
a5dc24b25a | ||
|
|
4c0e9d0bdf | ||
|
|
7d6eaad1bd | ||
|
|
f895e4aaf2 | ||
|
|
7354207e1b | ||
|
|
3549abe81d | ||
|
|
1dfdedf137 | ||
|
|
0b8790967e | ||
|
|
2890c98d4e | ||
|
|
363e6319b7 | ||
|
|
11aedb1fae | ||
|
|
8854e284fd | ||
|
|
c9945d6148 | ||
|
|
9a1caf99ef | ||
|
|
6399a70cb4 | ||
|
|
6e0b93e5a0 | ||
|
|
fe46d5bc34 | ||
|
|
fea6b5bf10 | ||
|
|
cc1292d694 | ||
|
|
d584223653 | ||
|
|
95a8e42e57 | ||
|
|
f8b3aa97df | ||
|
|
d5c795942f | ||
|
|
ce3907e9fe | ||
|
|
eaba8dd799 | ||
|
|
96f0bbd4d5 | ||
|
|
d02f807a24 | ||
|
|
cdace7cac1 | ||
|
|
e6ef64c385 | ||
|
|
03a6a78b55 | ||
|
|
9a1f0ea873 | ||
|
|
e7684c7b64 | ||
|
|
2c370d93b4 | ||
|
|
c29e344f07 | ||
|
|
e48b3f1a00 | ||
|
|
0b792bd37b | ||
|
|
be492cf28d | ||
|
|
60ce0ed411 | ||
|
|
8ab398a90d | ||
|
|
6cfcc6e8a2 | ||
|
|
42013c43f3 | ||
|
|
f1c236d95d | ||
|
|
97543354d2 | ||
|
|
9fc5e48b14 | ||
|
|
955732d29c | ||
|
|
5d1e7be582 | ||
|
|
32fc6c85f4 | ||
|
|
9badc4dc90 | ||
|
|
e3e6888946 | ||
|
|
0771dd3be8 | ||
|
|
11db639945 | ||
|
|
3a3f40e372 | ||
|
|
6f67546cd6 | ||
|
|
a8750a8805 | ||
|
|
312fa7f65e | ||
|
|
d8cf7aedfa | ||
|
|
e317a675a1 | ||
|
|
134248531c | ||
|
|
2b5615b9d7 | ||
|
|
f77d5599ec | ||
|
|
79eed4e5c6 | ||
|
|
7d499f8fb8 | ||
|
|
42173037ee | ||
|
|
8e05e2e9d5 | ||
|
|
e0dd3757cb | ||
|
|
b62e6418b5 | ||
|
|
41915e88cd | ||
|
|
77db0cb929 | ||
|
|
f6ccd59e8b | ||
|
|
a8dd98fbac | ||
|
|
5aaee26ed0 | ||
|
|
0bdc3df5a0 | ||
|
|
2b1131cb28 | ||
|
|
bc235cf477 | ||
|
|
0f9f1ece14 | ||
|
|
28af0de764 | ||
|
|
5098c95452 | ||
|
|
00b57b0120 | ||
|
|
cbb2edb8d3 | ||
|
|
e21103f2d3 | ||
|
|
9e499ddbf6 | ||
|
|
39344dfb3e | ||
|
|
04961a7e6b | ||
|
|
62fd8827c7 | ||
|
|
ac04d7b348 | ||
|
|
24f23e7fad | ||
|
|
af7b462b30 | ||
|
|
14ea08c759 | ||
|
|
9bb0b30bc2 | ||
|
|
7dfef18b05 | ||
|
|
f1b9bd6f07 | ||
|
|
a78a9d37a8 | ||
|
|
95ecdcd762 | ||
|
|
52f98c5734 | ||
|
|
6a1f24a863 | ||
|
|
6713c6703e | ||
|
|
695c997e6f | ||
|
|
a654756c3e | ||
|
|
5a941fbd88 | ||
|
|
7706f22924 | ||
|
|
42cc7f5456 | ||
|
|
fab67c074a | ||
|
|
ea054d024a | ||
|
|
b2026bd9e8 | ||
|
|
47c8deee52 | ||
|
|
0b7b1161c2 | ||
|
|
fd8adb1282 | ||
|
|
c62a7c88b8 | ||
|
|
24cfee942f | ||
|
|
cd3b656001 | ||
|
|
ce796ac1f4 | ||
|
|
44e6bb8b93 | ||
|
|
3569487875 | ||
|
|
1eb7a9e10b | ||
|
|
3dcf121064 | ||
|
|
5adc0baaca | ||
|
|
68eb9a7c6a | ||
|
|
34db730ee3 | ||
|
|
8136b09fa8 | ||
|
|
90ff5a551a | ||
|
|
db87352742 | ||
|
|
32c86e29e2 | ||
|
|
3663f61e0e | ||
|
|
8975a0830b | ||
|
|
d47c1d5dd0 | ||
|
|
644a2197f4 | ||
|
|
8ceaa19698 | ||
|
|
36dd373ab4 | ||
|
|
0a8c47bae5 | ||
|
|
c6553eb3fc | ||
|
|
fd4e3a650d | ||
|
|
d45f9e413f | ||
|
|
ac3d9b97a3 | ||
|
|
1e2f40d01b | ||
|
|
48f16f223c | ||
|
|
a363455b58 | ||
|
|
3853b3cf6d | ||
|
|
d07053c8f6 | ||
|
|
0ef5b8edb7 | ||
|
|
821f041d8c | ||
|
|
fec032588b | ||
|
|
82f5bce1bb | ||
|
|
a00e54cf0e | ||
|
|
5ab252183b | ||
|
|
977dc54ef6 | ||
|
|
a9dca5831b | ||
|
|
e43925f284 | ||
|
|
e1e800dd40 | ||
|
|
0dd6c2be70 | ||
|
|
bb51694d03 | ||
|
|
9aac7f52f8 | ||
|
|
30a50f9be4 | ||
|
|
56106437b0 | ||
|
|
8973d4bd16 | ||
|
|
9279641496 | ||
|
|
fbd9c5c97f | ||
|
|
56e1b76a88 | ||
|
|
4e97f7dccc | ||
|
|
1bbba52750 | ||
|
|
5d5d751c7f | ||
|
|
ce52ac1178 | ||
|
|
c0e0643fc5 | ||
|
|
14ecd7d79e | ||
|
|
7e05848870 | ||
|
|
2e54b1be29 | ||
|
|
387cc00121 | ||
|
|
85059c2937 | ||
|
|
7ab1fb2a8d | ||
|
|
b675ace6c9 | ||
|
|
d0a73c7da6 | ||
|
|
bae12f569d | ||
|
|
aca283919d | ||
|
|
915af3c950 | ||
|
|
043df1be12 | ||
|
|
62bc30e08f | ||
|
|
9a2c4bf11e | ||
|
|
86f60c0807 | ||
|
|
1a980e8124 | ||
|
|
ab85681c11 | ||
|
|
2846465719 | ||
|
|
af356955e2 | ||
|
|
28323f5ebf | ||
|
|
e56d95847b | ||
|
|
e517c18d98 | ||
|
|
126b3e0bd7 | ||
|
|
6d6e94bee7 | ||
|
|
8783735f89 | ||
|
|
ae52c2117e | ||
|
|
2691e729f0 | ||
|
|
6c6d93b29d | ||
|
|
02bbf1e2b9 | ||
|
|
4501f646ee | ||
|
|
64fbffbbaa | ||
|
|
158ab9afd4 | ||
|
|
22fda5c719 | ||
|
|
a25aa889e1 | ||
|
|
5bc68d16e2 | ||
|
|
4cd01cd7c5 | ||
|
|
6c499a0c08 | ||
|
|
20f2d9b41b | ||
|
|
5da97eeea6 | ||
|
|
4157e6ab73 | ||
|
|
92325d3150 | ||
|
|
61752bf8ac | ||
|
|
ebbedd6c03 | ||
|
|
52a8fb31c7 | ||
|
|
bdde335cca | ||
|
|
9c47bad86a | ||
|
|
4d2d3b49ce | ||
|
|
d54f3f8b8c | ||
|
|
d4596baed4 | ||
|
|
4419d7bf6b | ||
|
|
47b850348c | ||
|
|
bb939a03ff | ||
|
|
56ed1275c6 | ||
|
|
4dea5cb799 | ||
|
|
effd16ab25 | ||
|
|
aaf81ca6ef | ||
|
|
3e7fa15ca3 | ||
|
|
6283c1cc7e | ||
|
|
9491616e5c | ||
|
|
db9cfde1ab | ||
|
|
4c7345bcb6 | ||
|
|
05b7c08a16 | ||
|
|
fa806cc7b3 | ||
|
|
d70bf76d80 | ||
|
|
571f0beee0 | ||
|
|
75815c1581 | ||
|
|
4d498b3dac | ||
|
|
505ec918d7 | ||
|
|
978a37c827 | ||
|
|
8ddc54e200 | ||
|
|
e65d4989a1 | ||
|
|
00ff786384 | ||
|
|
dc9543abb3 | ||
|
|
d5055665ca | ||
|
|
2e7d82443f | ||
|
|
2cbf633192 | ||
|
|
a197df137a | ||
|
|
0efc36c19a | ||
|
|
efff347f96 | ||
|
|
93aa9766e5 | ||
|
|
eb8c9bdd55 | ||
|
|
4d30aee3e2 | ||
|
|
45d76498d9 | ||
|
|
316b399f95 | ||
|
|
94cb73d96c | ||
|
|
1c672367a0 |
@@ -53,6 +53,7 @@
|
||||
|
||||
(expand-file-name "/usr/local/opt/openssl@1.1/include")
|
||||
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
|
||||
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
|
||||
(expand-file-name "/usr/local/include")
|
||||
)
|
||||
)
|
||||
@@ -60,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"
|
||||
@@ -67,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")))
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
+240
-32
@@ -8,10 +8,18 @@ variables:
|
||||
CCACHE_DIR: "/ccache"
|
||||
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
|
||||
|
||||
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
|
||||
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
|
||||
|
||||
BUILD_PARALLEL_JOBS: 6
|
||||
TEST_PARALLEL_JOBS: 6
|
||||
|
||||
stages:
|
||||
- precheck
|
||||
- build
|
||||
- test
|
||||
- unit
|
||||
- system
|
||||
- docs
|
||||
- push
|
||||
|
||||
### Runner Tag Templates
|
||||
@@ -28,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
|
||||
@@ -44,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
|
||||
@@ -56,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
|
||||
@@ -66,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
|
||||
@@ -101,26 +115,64 @@ stages:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: precheck
|
||||
|
||||
.autoconf: &autoconf_job
|
||||
<<: *default_triggering_rules
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: precheck
|
||||
script:
|
||||
- autoreconf -fi
|
||||
artifacts:
|
||||
untracked: true
|
||||
expire_in: "1 hour"
|
||||
|
||||
.configure: &configure |
|
||||
./configure \
|
||||
--disable-maintainer-mode \
|
||||
--enable-developer \
|
||||
--with-libtool \
|
||||
--disable-static \
|
||||
--with-cmocka \
|
||||
--with-libxml2 \
|
||||
--with-json-c \
|
||||
--prefix=$HOME/.local \
|
||||
--without-make-clean \
|
||||
$EXTRA_CONFIGURE \
|
||||
|| cat config.log
|
||||
|
||||
.build: &build_job
|
||||
<<: *default_triggering_rules
|
||||
stage: build
|
||||
before_script:
|
||||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||
script:
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
|
||||
- *configure
|
||||
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
|
||||
- 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
|
||||
sh -x bin/tests/system/ifconfig.sh up;
|
||||
else
|
||||
sudo sh -x bin/tests/system/ifconfig.sh up;
|
||||
fi
|
||||
|
||||
.setup_softhsm: &setup_softhsm |
|
||||
sh -x util/prepare-softhsm2.sh
|
||||
|
||||
.system_test: &system_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
stage: system
|
||||
retry: 2
|
||||
before_script:
|
||||
- bash -x bin/tests/system/ifconfig.sh up
|
||||
- bash -x util/prepare-softhsm2.sh
|
||||
- *setup_interfaces
|
||||
- *setup_softhsm
|
||||
script:
|
||||
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
||||
- test -s bin/tests/system/systests.output
|
||||
@@ -129,16 +181,22 @@ stages:
|
||||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
.kyua_report: &kyua_report_html |
|
||||
kyua report-html \
|
||||
--force \
|
||||
--results-file "$KYUA_RESULT" \
|
||||
--results-filter "" \
|
||||
--output kyua_html
|
||||
|
||||
.unit_test: &unit_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
stage: unit
|
||||
before_script:
|
||||
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
||||
- bash -x util/prepare-softhsm2.sh
|
||||
- *setup_softhsm
|
||||
script:
|
||||
- make unit
|
||||
after_script:
|
||||
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
|
||||
- *kyua_report_html
|
||||
artifacts:
|
||||
paths:
|
||||
- kyua.log
|
||||
@@ -151,6 +209,9 @@ stages:
|
||||
|
||||
# Jobs in the precheck stage
|
||||
|
||||
autoreconf:sid:amd64:
|
||||
<<: *autoconf_job
|
||||
|
||||
misc:sid:amd64:
|
||||
<<: *precheck_job
|
||||
script:
|
||||
@@ -177,17 +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/
|
||||
@@ -209,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:
|
||||
@@ -224,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)
|
||||
|
||||
@@ -237,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
|
||||
|
||||
@@ -246,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)
|
||||
|
||||
@@ -259,7 +354,7 @@ gcc:jessie:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--without-cmocka --with-python"
|
||||
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -268,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)
|
||||
|
||||
@@ -289,20 +386,45 @@ 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)
|
||||
|
||||
gcc:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
|
||||
RUN_MAKE_INSTALL: 1
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
@@ -312,20 +434,22 @@ 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)
|
||||
|
||||
gcc:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -334,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)
|
||||
|
||||
@@ -369,6 +497,7 @@ gcc:xenial:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--disable-geoip"
|
||||
<<: *ubuntu_xenial_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -377,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)
|
||||
|
||||
@@ -399,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)
|
||||
|
||||
@@ -422,12 +555,60 @@ 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:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:rwlock:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *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:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
#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
|
||||
|
||||
# Jobs for Clang builds on Debian Stretch (amd64)
|
||||
|
||||
@@ -444,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)
|
||||
|
||||
@@ -470,9 +652,35 @@ 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
|
||||
|
||||
nolibtool:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -Og -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:nolibtool:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *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,188 @@
|
||||
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.
|
||||
[GL #1038]
|
||||
|
||||
5262. [func] Removed support for the legacy GeoIP API. [GL #1112]
|
||||
|
||||
5261. [cleanup] Remove SO_BSDCOMPAT socket option usage.
|
||||
|
||||
5260. [bug] dnstap-read was producing malformed output for large
|
||||
packets. [GL #1093]
|
||||
|
||||
5259. [func] New option '-i' for 'named-checkconf' to ignore
|
||||
warnings about deprecated options. [GL #1101]
|
||||
|
||||
5258. [func] Added support for the GeoIP2 API from MaxMind. This
|
||||
will be compiled in by default if the "libmaxminddb"
|
||||
library is found at compile time, but can be
|
||||
suppressed using "configure --disable-geoip".
|
||||
|
||||
Certain geoip ACL settings that were available with
|
||||
legacy GeoIP are not available when using GeoIP2.
|
||||
[GL #182]
|
||||
|
||||
5257. [bug] Some statistics data was not being displayed.
|
||||
Add shading to the zone tables. [GL #1030]
|
||||
|
||||
5256. [bug] Ensure that glue records are included in root
|
||||
priming responses if "minimal-responses" is not
|
||||
set to "yes". [GL #1092]
|
||||
|
||||
5255. [bug] Errors encountered while reloading inline-signing
|
||||
zones could be ignored, causing the zone content to
|
||||
be left in an incompletely updated state rather than
|
||||
reverted. [GL #1109]
|
||||
|
||||
5254. [func] Collect metrics to report to the statistics-channel
|
||||
DNSSEC signing operations (dnssec-sign) and refresh
|
||||
operations (dnssec-refresh) per zone and per keytag.
|
||||
[GL #513]
|
||||
|
||||
5253. [port] Support platforms that don't define ULLONG_MAX.
|
||||
[GL #1098]
|
||||
|
||||
5252. [func] Report if the last 'rndc reload/reconfig' failed in
|
||||
rndc status. [GL !2040]
|
||||
|
||||
5251. [bug] Statistics were broken in x86 Windows builds.
|
||||
[GL #1081]
|
||||
|
||||
5250. [func] The default size for RSA keys is now 2048 bits,
|
||||
for both ZSKs and KSKs. [GL #1097]
|
||||
|
||||
5249. [bug] Fix a possible underflow in recursion clients
|
||||
statistics when hitting recursive clients
|
||||
soft quota. [GL #1067]
|
||||
|
||||
--- 9.15.1 released ---
|
||||
|
||||
5248. [func] To clarify the configuration of DNSSEC keys,
|
||||
the "managed-keys" and "trusted-keys" options
|
||||
have both been deprecated. The new "dnssec-keys"
|
||||
statement can now be used for all trust anchors,
|
||||
with the keywords "iniital-key" or "static-key"
|
||||
to indicate whether the configured trust anchor
|
||||
should be used for initialization of RFC 5011 key
|
||||
management, or as a permanent trust anchor.
|
||||
|
||||
The "static-key" keyword will generate a warning if
|
||||
used for the root zone.
|
||||
|
||||
Configurations using "trusted-keys" or "managed-keys"
|
||||
will continue to work with no changes, but will
|
||||
generate warnings in the log. In a future release,
|
||||
these options will be marked obsolete. [GL #6]
|
||||
|
||||
5247. [cleanup] The 'cleaning-interval' option has been removed.
|
||||
[GL !1731]
|
||||
|
||||
5246. [func] Log TSIG if appropriate in 'sending notify to' message.
|
||||
[GL #1058]
|
||||
|
||||
5245. [cleanup] Reduce logging level for IXFR up-to-date poll
|
||||
responses. [GL #1009]
|
||||
|
||||
5244. [security] Fixed a race condition in dns_dispatch_getnext()
|
||||
that could cause an assertion failure if a
|
||||
significant number of incoming packets were
|
||||
rejected. (CVE-2019-6471) [GL #942]
|
||||
|
||||
5243. [bug] Fix a possible race between dispatcher and socket
|
||||
code in a high-load cold-cache resolver scenario.
|
||||
[GL #943]
|
||||
|
||||
5242. [bug] In relaxed qname minimizatiom mode, fall back to
|
||||
normal resolution when encountering a lame
|
||||
delegation, and use _.domain/A queries rather
|
||||
than domain/NS. [GL #1055]
|
||||
|
||||
5241. [bug] Fix Ed448 private and public key ASN.1 prefix blobs.
|
||||
[GL #225]
|
||||
|
||||
5240. [bug] Remove key id calculation for RSAMD5. [GL #996]
|
||||
|
||||
5239. [func] Change the json-c detection to pkg-config. [GL #855]
|
||||
|
||||
5238. [bug] Fix a possible deadlock in TCP code. [GL #1046]
|
||||
|
||||
5237. [bug] Recurse to find the root server list with 'dig +trace'.
|
||||
[GL #1028]
|
||||
|
||||
5236. [func] Add SipHash 2-4 implementation in lib/isc/siphash.c
|
||||
and switch isc_hash_function() to use SipHash 2-4.
|
||||
[GL #605]
|
||||
|
||||
5235. [cleanup] Refactor lib/isc/app.c to be thread-safe, unused
|
||||
parts of the API has been removed and the
|
||||
isc_appctx_t data type has been changed to be
|
||||
fully opaque. [GL #1023]
|
||||
|
||||
5234. [port] arm: just use the compiler's default support for
|
||||
yield. [GL #981]
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -1,3 +1,5 @@
|
||||
CONTRIBUTING
|
||||
|
||||
BIND Source Access and Contributor Guidelines
|
||||
|
||||
Feb 22, 2018
|
||||
@@ -32,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/).
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
HISTORY
|
||||
|
||||
Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
BIND 9.14
|
||||
@@ -505,11 +507,11 @@ BIND 9.4.0
|
||||
* Detect duplicates of UDP queries we are recursing on and drop them.
|
||||
New stats category "duplicates".
|
||||
* "USE INTERNAL MALLOC" is now runtime selectable.
|
||||
* The lame cache is now done on a basis as some servers only appear to
|
||||
be lame for certain query types.
|
||||
* The lame cache is now done on a <qname,qclass,qtype> basis as some
|
||||
servers only appear to be lame for certain query types.
|
||||
* Limit the number of recursive clients that can be waiting for a single
|
||||
query () to resolve. New options clients-per-query and
|
||||
max-clients-per-query.
|
||||
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
|
||||
and max-clients-per-query.
|
||||
* dig: report the number of extra bytes still left in the packet after
|
||||
processing all the records.
|
||||
* Support for IPSECKEY rdata type.
|
||||
|
||||
+13
-26
@@ -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 \
|
||||
@@ -97,27 +79,32 @@ test-force:
|
||||
exit $$status
|
||||
|
||||
README: README.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html README.md | \
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
HISTORY: HISTORY.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
OPTIONS: OPTIONS.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CONTRIBUTING: CONTRIBUTING.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
PLATFORMS: PLATFORMS.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html 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;}' > $@
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
OPTIONS
|
||||
|
||||
Setting the STD_CDEFINES environment variable before running configure can
|
||||
be used to enable certain compile-time options that are not explicitly
|
||||
defined in configure.
|
||||
|
||||
Some of these settings are:
|
||||
|
||||
Setting Description
|
||||
Setting Description
|
||||
Overwrite memory with tag values when allocating
|
||||
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
|
||||
makes debugging of memory problems easier.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
PLATFORMS
|
||||
|
||||
Supported platforms
|
||||
|
||||
In general, this version of BIND will build and run on any POSIX-compliant
|
||||
@@ -64,31 +66,6 @@ These are platforms on which BIND 9.15 is known not to build or run:
|
||||
|
||||
Platform quirks
|
||||
|
||||
ARM
|
||||
|
||||
If the compilation ends with following error:
|
||||
|
||||
Error: selected processor does not support `yield' in ARM mode
|
||||
|
||||
You will need to set -march compiler option to native, so the compiler
|
||||
recognizes yield assembler instruction. The proper way to set -march=
|
||||
native would be to put it into CFLAGS, e.g. run ./configure like this:
|
||||
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
|
||||
|
||||
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
|
||||
Debian armhf documentation):
|
||||
|
||||
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
|
||||
recommended build option is -march=armv7-a.
|
||||
|
||||
* FPU should be set at VFPv3-D16 as they represent the minimum
|
||||
specification of the processors to support here, therefore the
|
||||
recommended build option is -mfpu=vfpv3-d16.
|
||||
|
||||
The configure command should look like this:
|
||||
|
||||
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
|
||||
|
||||
NetBSD 6 i386
|
||||
|
||||
The i386 build of NetBSD requires the libatomic library, available from
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
README
|
||||
|
||||
BIND 9
|
||||
|
||||
Contents
|
||||
@@ -37,7 +39,7 @@ in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
|
||||
501(c)(3) public benefit corporation dedicated to providing software and
|
||||
services in support of the Internet infrastructure, developed BIND 9 and
|
||||
is responsible for its ongoing maintenance and improvement. BIND is open
|
||||
source software licenced under the terms of the Mozilla Public License,
|
||||
source software licensed under the terms of the Mozilla Public License,
|
||||
version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND, see
|
||||
@@ -85,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.
|
||||
@@ -103,7 +106,10 @@ format-patch.
|
||||
BIND 9.15 features
|
||||
|
||||
BIND 9.15 is the newest development branch of BIND 9. It includes a number
|
||||
of changes from BIND 9.14 and earlier releases.
|
||||
of changes from BIND 9.14 and earlier releases. New features include:
|
||||
|
||||
* Support for the new GeoIP2 geolocation API
|
||||
* Improved DNSSEC key configuration using dnssec-keys
|
||||
|
||||
Building BIND
|
||||
|
||||
@@ -134,7 +140,7 @@ make depend. If you're using Emacs, you might find make tags helpful.
|
||||
Several environment variables that can be set before running configure
|
||||
will affect compilation:
|
||||
|
||||
Variable Description
|
||||
Variable Description
|
||||
CC The C compiler to use. configure tries to figure out the
|
||||
right one for supported systems.
|
||||
C compiler flags. Defaults to include -g and/or -O2 as
|
||||
@@ -187,8 +193,10 @@ operations, specify the path to the PKCS#11 provider library using
|
||||
|
||||
To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
||||
github.com/json-c. If these are installed at a nonstandard location,
|
||||
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
|
||||
github.com/json-c. If these are installed at a nonstandard location, then:
|
||||
|
||||
* for libxml2, specify the prefix using --with-libxml2=/prefix,
|
||||
* for json-c, adjust PKG_CONFIG_PATH.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
@@ -198,10 +206,11 @@ To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with liblmdb. If this is installed in
|
||||
a nonstandard location, specify the prefix using with-lmdb=/prefix.
|
||||
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
--with-geoip. If the library is installed in a nonstandard location,
|
||||
specify the prefix using --with-geoip=/prefix.
|
||||
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
|
||||
with libmaxminddb. This is turned on by default if the library is found;
|
||||
if the library is installed in a nonstandard location, specify the prefix
|
||||
using --with-maxminddb=/prefix. GeoIP2 support can be switched off with
|
||||
--disable-geoip.
|
||||
|
||||
For DNSTAP packet logging, you must have installed libfstrm https://
|
||||
github.com/farsightsec/fstrm and libprotobuf-c https://
|
||||
@@ -239,11 +248,8 @@ default, installation is into /usr/local, but this can be changed with the
|
||||
|
||||
You may specify the option --sysconfdir to set the directory where
|
||||
configuration files like named.conf go by default, and --localstatedir to
|
||||
set the default parent directory of run/named.pid. For backwards
|
||||
compatibility with BIND 8, --sysconfdir defaults to /etc and
|
||||
--localstatedir defaults to /var if no --prefix option is given. If there
|
||||
is a --prefix option, sysconfdir defaults to $prefix/etc and localstatedir
|
||||
defaults to $prefix/var.
|
||||
set the default parent directory of run/named.pid. --sysconfdir defaults
|
||||
to $prefix/etc and --localstatedir defaults to $prefix/var.
|
||||
|
||||
Automated testing
|
||||
|
||||
@@ -286,7 +292,7 @@ development BIND 9 is included in the file CHANGES, with the most recent
|
||||
changes listed first. Change notes include tags indicating the category of
|
||||
the change that was made; these categories are:
|
||||
|
||||
Category Description
|
||||
Category Description
|
||||
[func] New feature
|
||||
[bug] General bug fix
|
||||
[security] Fix for a significant security flaw
|
||||
@@ -314,26 +320,46 @@ releases (i.e., those with version numbers ending in zero). Some new
|
||||
functionality may be backported to older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
Bug report identifiers
|
||||
|
||||
Most notes in the CHANGES file include a reference to a bug report or
|
||||
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
|
||||
referred to entries in the "bind9-bugs" RT database, which was not open to
|
||||
the public. More recent entries use the form [GL #NNN] or, less often, [GL
|
||||
!NNN], which, respectively, refer to issues or merge requests in the
|
||||
Gitlab database. Most of these are publicly readable, unless they include
|
||||
information which is confidential or security senstive.
|
||||
|
||||
To look up a Gitlab issue by its number, use the URL https://
|
||||
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
|
||||
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
|
||||
|
||||
In rare cases, an issue or merge request number may be followed with the
|
||||
letter "P". This indicates that the information is in the private ISC
|
||||
Gitlab instance, which is not visible to the public.
|
||||
|
||||
Acknowledgments
|
||||
|
||||
* The original development of BIND 9 was underwritten by the following
|
||||
organizations:
|
||||
|
||||
Sun Microsystems, Inc.
|
||||
Hewlett Packard
|
||||
Compaq Computer Corporation
|
||||
IBM
|
||||
Process Software Corporation
|
||||
Silicon Graphics, Inc.
|
||||
Network Associates, Inc.
|
||||
U.S. Defense Information Systems Agency
|
||||
USENIX Association
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
Sun Microsystems, Inc.
|
||||
Hewlett Packard
|
||||
Compaq Computer Corporation
|
||||
IBM
|
||||
Process Software Corporation
|
||||
Silicon Graphics, Inc.
|
||||
Network Associates, Inc.
|
||||
U.S. Defense Information Systems Agency
|
||||
USENIX Association
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
* This product includes software developed by the OpenSSL Project for
|
||||
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
|
||||
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
(eay@cryptsoft.com)
|
||||
|
||||
* This product includes software written by Tim Hudson
|
||||
(tjh@cryptsoft.com)
|
||||
|
||||
@@ -48,7 +48,7 @@ used in versions 4 and 8. Internet Systems Consortium
|
||||
corporation dedicated to providing software and services in support of the
|
||||
Internet infrastructure, developed BIND 9 and is responsible for its
|
||||
ongoing maintenance and improvement. BIND is open source software
|
||||
licenced under the terms of the Mozilla Public License, version 2.0.
|
||||
licensed under the terms of the Mozilla Public License, version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND,
|
||||
see the file [HISTORY](HISTORY.md).
|
||||
@@ -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)
|
||||
|
||||
@@ -120,7 +121,12 @@ including your patch as an attachment, preferably generated by
|
||||
### <a name="features"/> BIND 9.15 features
|
||||
|
||||
BIND 9.15 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.14 and earlier releases.
|
||||
number of changes from BIND 9.14 and earlier releases. New features
|
||||
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
|
||||
|
||||
@@ -200,8 +206,10 @@ To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following: libxml2
|
||||
[http://xmlsoft.org](http://xmlsoft.org) or json-c
|
||||
[https://github.com/json-c](https://github.com/json-c). If these are
|
||||
installed at a nonstandard location, specify the prefix using
|
||||
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
|
||||
installed at a nonstandard location, then:
|
||||
|
||||
* for libxml2, specify the prefix using `--with-libxml2=/prefix`,
|
||||
* for json-c, adjust `PKG_CONFIG_PATH`.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
@@ -211,10 +219,11 @@ To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with liblmdb. If this is installed in a
|
||||
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
|
||||
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
`--with-geoip`. If the library is installed in a nonstandard location,
|
||||
specify the prefix using `--with-geoip=/prefix`.
|
||||
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
|
||||
with `libmaxminddb`. This is turned on by default if the library is
|
||||
found; if the library is installed in a nonstandard location,
|
||||
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
|
||||
can be switched off with `--disable-geoip`.
|
||||
|
||||
For DNSTAP packet logging, you must have installed libfstrm
|
||||
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
||||
@@ -253,11 +262,8 @@ default, installation is into /usr/local, but this can be changed with the
|
||||
|
||||
You may specify the option `--sysconfdir` to set the directory where
|
||||
configuration files like `named.conf` go by default, and `--localstatedir`
|
||||
to set the default parent directory of `run/named.pid`. For backwards
|
||||
compatibility with BIND 8, `--sysconfdir` defaults to `/etc` and
|
||||
`--localstatedir` defaults to `/var` if no `--prefix` option is given. If
|
||||
there is a `--prefix` option, sysconfdir defaults to `$prefix/etc` and
|
||||
localstatedir defaults to `$prefix/var`.
|
||||
to set the default parent directory of `run/named.pid`. `--sysconfdir`
|
||||
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`.
|
||||
|
||||
### <a name="testing"/> Automated testing
|
||||
|
||||
@@ -323,6 +329,25 @@ releases (i.e., those with version numbers ending in zero). Some new
|
||||
functionality may be backported to older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
#### Bug report identifiers
|
||||
|
||||
Most notes in the CHANGES file include a reference to a bug report or
|
||||
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
|
||||
and referred to entries in the "bind9-bugs" RT database, which was not open
|
||||
to the public. More recent entries use the form `[GL #NNN]` or, less often,
|
||||
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
|
||||
Gitlab database. Most of these are publicly readable, unless they include
|
||||
information which is confidential or security senstive.
|
||||
|
||||
To look up a Gitlab issue by its number, use the URL
|
||||
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
|
||||
To look up a merge request, use
|
||||
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
In rare cases, an issue or merge request number may be followed with the
|
||||
letter "P". This indicates that the information is in the private ISC
|
||||
Gitlab instance, which is not visible to the public.
|
||||
|
||||
### <a name="ack"/> Acknowledgments
|
||||
|
||||
* The original development of BIND 9 was underwritten by the
|
||||
|
||||
Vendored
+89
@@ -288,9 +288,98 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ([2.52])dnl
|
||||
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# --------------------------
|
||||
# Public sister of _AM_SUBST_NOTMAKE.
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
m4_include([m4/ax_check_compile_flag.m4])
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/ax_posix_shell.m4])
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
m4_include([m4/ax_restore_flags.m4])
|
||||
m4_include([m4/ax_save_flags.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
|
||||
@@ -16,15 +16,16 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
${ISC_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
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}
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -86,6 +86,11 @@ Check "core" configuration only\&. This suppresses the loading of plugin modules
|
||||
statements to be ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Ignore warnings on deprecated options\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Print out the
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/namedconf.h>
|
||||
#include <isccfg/grammar.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
@@ -61,7 +62,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
|
||||
fprintf(stderr, "usage: %s [-chijlvz] [-p [-x]] [-t directory] "
|
||||
"[named.conf]\n", program);
|
||||
exit(1);
|
||||
}
|
||||
@@ -555,6 +556,7 @@ main(int argc, char **argv) {
|
||||
bool load_zones = false;
|
||||
bool list_zones = false;
|
||||
bool print = false;
|
||||
bool nodeprecate = false;
|
||||
unsigned int flags = 0;
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
@@ -562,7 +564,7 @@ main(int argc, char **argv) {
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
|
||||
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
@@ -595,6 +597,10 @@ main(int argc, char **argv) {
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
nodeprecate = true;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = false;
|
||||
break;
|
||||
@@ -675,11 +681,16 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
|
||||
if (nodeprecate) {
|
||||
cfg_parser_setflags(parser, CFG_PCTX_NODEPRECATED, true);
|
||||
}
|
||||
cfg_parser_setcallback(parser, directory_callback, NULL);
|
||||
|
||||
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
|
||||
ISC_R_SUCCESS)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
||||
@@ -126,6 +126,15 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ignore warnings on deprecated options.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<span class="command"><strong>plugin</strong></span> statements to be ignored.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Ignore warnings on deprecated options.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -27,9 +27,9 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
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}
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -16,16 +16,17 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_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}
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
+13
-22
@@ -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,21 +139,21 @@ 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
|
||||
treats
|
||||
\fBmanaged\-keys\fR
|
||||
statements and
|
||||
\fBtrusted\-keys\fR
|
||||
statements identically\&. That is, for a managed key, it is the
|
||||
\fIinitial\fR
|
||||
key that is trusted; RFC 5011 key management is not supported\&.
|
||||
\fBdnssec\-keys\fR\fBinitial\-key\fR
|
||||
and
|
||||
\fBstatic\-key\fR
|
||||
entries identically\&. That is, even if a key is configured with
|
||||
\fBinitial\-key\fR, indicating that it is meant to be used only as an initializing key for RFC 5011 key maintenance, it is still treated by
|
||||
\fBdelv\fR
|
||||
will not consult the managed\-keys database maintained by
|
||||
as if it had been configured as a
|
||||
\fBstatic\-key\fR\&.
|
||||
\fBdelv\fR
|
||||
does not consult the managed keys database maintained by
|
||||
\fBnamed\fR\&. This means that if either of the keys in
|
||||
/etc/bind\&.keys
|
||||
is revoked and rolled over, it will be necessary to update
|
||||
@@ -390,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\&.
|
||||
|
||||
+168
-132
@@ -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,21 +126,19 @@ 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 trusted_keys = 0;
|
||||
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[] = MANAGED_KEYS;
|
||||
static char anchortext[] = DNSSEC_KEYS;
|
||||
|
||||
/*
|
||||
* Static function prototypes
|
||||
@@ -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"));
|
||||
@@ -642,7 +684,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
|
||||
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
|
||||
keyname, &rrdatabuf));
|
||||
trusted_keys++;
|
||||
num_keys++;
|
||||
|
||||
cleanup:
|
||||
if (result == DST_R_NOCRYPTO)
|
||||
@@ -693,13 +735,15 @@ static isc_result_t
|
||||
setup_dnsseckeys(dns_client_t *client) {
|
||||
isc_result_t result;
|
||||
cfg_parser_t *parser = NULL;
|
||||
const cfg_obj_t *keys = NULL;
|
||||
const cfg_obj_t *trusted_keys = NULL;
|
||||
const cfg_obj_t *managed_keys = NULL;
|
||||
const cfg_obj_t *dnssec_keys = NULL;
|
||||
cfg_obj_t *bindkeys = NULL;
|
||||
const char *filename = anchorfile;
|
||||
|
||||
if (!root_validation && !dlv_validation)
|
||||
if (!root_validation) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (filename == NULL) {
|
||||
#ifndef WIN32
|
||||
@@ -714,27 +758,27 @@ 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)
|
||||
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));
|
||||
|
||||
if (access(filename, R_OK) != 0) {
|
||||
if (anchorfile != NULL)
|
||||
if (anchorfile != NULL) {
|
||||
fatal("Unable to read key file '%s'", anchorfile);
|
||||
}
|
||||
} else {
|
||||
result = cfg_parse_file(parser, filename,
|
||||
&cfg_type_bindkeys, &bindkeys);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (anchorfile != NULL)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (anchorfile != NULL) {
|
||||
fatal("Unable to load keys from '%s'",
|
||||
anchorfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bindkeys == NULL) {
|
||||
@@ -744,26 +788,30 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
isc_buffer_add(&b, sizeof(anchortext) - 1);
|
||||
result = cfg_parse_buffer(parser, &b, NULL, 0,
|
||||
&cfg_type_bindkeys, 0, &bindkeys);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("Unable to parse built-in keys");
|
||||
}
|
||||
}
|
||||
|
||||
INSIST(bindkeys != NULL);
|
||||
cfg_map_get(bindkeys, "trusted-keys", &keys);
|
||||
cfg_map_get(bindkeys, "trusted-keys", &trusted_keys);
|
||||
cfg_map_get(bindkeys, "managed-keys", &managed_keys);
|
||||
cfg_map_get(bindkeys, "dnssec-keys", &dnssec_keys);
|
||||
|
||||
if (keys != NULL)
|
||||
CHECK(load_keys(keys, client));
|
||||
if (managed_keys != NULL)
|
||||
if (trusted_keys != NULL) {
|
||||
CHECK(load_keys(trusted_keys, client));
|
||||
}
|
||||
if (managed_keys != NULL) {
|
||||
CHECK(load_keys(managed_keys, client));
|
||||
}
|
||||
if (dnssec_keys != NULL) {
|
||||
CHECK(load_keys(dnssec_keys, client));
|
||||
}
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
if (trusted_keys == 0)
|
||||
if (num_keys == 0) {
|
||||
fatal("No trusted keys were loaded");
|
||||
|
||||
if (dlv_validation)
|
||||
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
||||
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (bindkeys != NULL) {
|
||||
@@ -772,9 +820,10 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
if (parser != NULL) {
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -801,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);
|
||||
@@ -811,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);
|
||||
@@ -840,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);
|
||||
@@ -916,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);
|
||||
@@ -928,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);
|
||||
@@ -1027,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 */
|
||||
@@ -1068,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 */
|
||||
@@ -1157,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:
|
||||
/*
|
||||
@@ -1220,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':
|
||||
@@ -1252,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, '#');
|
||||
@@ -1317,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;
|
||||
@@ -1346,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;
|
||||
@@ -1494,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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1509,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;
|
||||
@@ -1594,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;
|
||||
@@ -1622,9 +1647,9 @@ main(int argc, char *argv[]) {
|
||||
fatal("failed to create mctx");
|
||||
|
||||
CHECK(isc_appctx_create(mctx, &actx));
|
||||
CHECK(isc_taskmgr_createinctx(mctx, actx, 1, 0, &taskmgr));
|
||||
CHECK(isc_socketmgr_createinctx(mctx, actx, &socketmgr));
|
||||
CHECK(isc_timermgr_createinctx(mctx, actx, &timermgr));
|
||||
CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
|
||||
CHECK(isc_socketmgr_createinctx(mctx, &socketmgr));
|
||||
CHECK(isc_timermgr_createinctx(mctx, &timermgr));
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
@@ -1665,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;
|
||||
@@ -1697,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)
|
||||
|
||||
+25
-28
@@ -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,21 +211,21 @@
|
||||
<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,
|
||||
<command>delv</command> treats <option>managed-keys</option>
|
||||
statements and <option>trusted-keys</option> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<emphasis>initial</emphasis> key that is trusted; RFC 5011
|
||||
key management is not supported. <command>delv</command>
|
||||
will not consult the managed-keys database maintained by
|
||||
<command>named</command>. This means that if either of the
|
||||
keys in <filename>/etc/bind.keys</filename> is revoked
|
||||
<command>delv</command> treats <option>dnssec-keys</option>
|
||||
<option>initial-key</option> and <option>static-key</option>
|
||||
entries identically. That is, even if a key is configured
|
||||
with <command>initial-key</command>, indicating that it is
|
||||
meant to be used only as an initializing key for RFC 5011
|
||||
key maintenance, it is still treated by <command>delv</command>
|
||||
as if it had been configured as a <command>static-key</command>.
|
||||
<command>delv</command> does not consult the managed keys
|
||||
database maintained by <command>named</command>. This means
|
||||
that if either of the keys in
|
||||
<filename>/etc/bind.keys</filename> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<filename>/etc/bind.keys</filename> to use DNSSEC
|
||||
validation in <command>delv</command>.
|
||||
@@ -617,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>
|
||||
@@ -627,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
|
||||
@@ -638,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>
|
||||
@@ -671,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>
|
||||
|
||||
+15
-25
@@ -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,21 +193,21 @@
|
||||
<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,
|
||||
<span class="command"><strong>delv</strong></span> treats <code class="option">managed-keys</code>
|
||||
statements and <code class="option">trusted-keys</code> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<span class="emphasis"><em>initial</em></span> key that is trusted; RFC 5011
|
||||
key management is not supported. <span class="command"><strong>delv</strong></span>
|
||||
will not consult the managed-keys database maintained by
|
||||
<span class="command"><strong>named</strong></span>. This means that if either of the
|
||||
keys in <code class="filename">/etc/bind.keys</code> is revoked
|
||||
<span class="command"><strong>delv</strong></span> treats <code class="option">dnssec-keys</code>
|
||||
<code class="option">initial-key</code> and <code class="option">static-key</code>
|
||||
entries identically. That is, even if a key is configured
|
||||
with <span class="command"><strong>initial-key</strong></span>, indicating that it is
|
||||
meant to be used only as an initializing key for RFC 5011
|
||||
key maintenance, it is still treated by <span class="command"><strong>delv</strong></span>
|
||||
as if it had been configured as a <span class="command"><strong>static-key</strong></span>.
|
||||
<span class="command"><strong>delv</strong></span> does not consult the managed keys
|
||||
database maintained by <span class="command"><strong>named</strong></span>. This means
|
||||
that if either of the keys in
|
||||
<code class="filename">/etc/bind.keys</code> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<code class="filename">/etc/bind.keys</code> to use DNSSEC
|
||||
validation in <span class="command"><strong>delv</strong></span>.
|
||||
@@ -517,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
|
||||
@@ -533,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>
|
||||
|
||||
+5
-4
@@ -19,16 +19,17 @@ READLINE_LIB = @READLINE_LIB@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ \
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
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}
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
+16
-10
@@ -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
|
||||
@@ -589,11 +595,11 @@ A synonym for
|
||||
.RS 4
|
||||
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
|
||||
\fBdig\fR
|
||||
normally sends recursive queries\&. Recursion is automatically disabled when the
|
||||
normally sends recursive queries\&. Recursion is automatically disabled when using the
|
||||
\fI+nssearch\fR
|
||||
or
|
||||
option, and when using
|
||||
\fI+trace\fR
|
||||
query options are used\&.
|
||||
except for an initial recursive query to get the list of root servers\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+retry=T\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
|
||||
|
||||
+240
-60
@@ -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));
|
||||
@@ -1462,7 +1603,7 @@ plus_option(char *option, bool is_batchfile,
|
||||
lookup->trace = state;
|
||||
lookup->trace_root = state;
|
||||
if (state) {
|
||||
lookup->recurse = false;
|
||||
lookup->recurse = true;
|
||||
lookup->identify = true;
|
||||
lookup->comments = false;
|
||||
lookup->rrcomments = 0;
|
||||
@@ -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);
|
||||
|
||||
+40
-15
@@ -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>
|
||||
@@ -1010,8 +1022,10 @@
|
||||
in the query. This bit is set by default, which means
|
||||
<command>dig</command> normally sends recursive
|
||||
queries. Recursion is automatically disabled when
|
||||
the <parameter>+nssearch</parameter> or
|
||||
<parameter>+trace</parameter> query options are used.
|
||||
using the <parameter>+nssearch</parameter> option, and
|
||||
when using <parameter>+trace</parameter> except for
|
||||
an initial recursive query to get the list of root
|
||||
servers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1064,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>
|
||||
@@ -1109,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>
|
||||
@@ -1277,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>
|
||||
|
||||
+30
-15
@@ -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>
|
||||
@@ -797,8 +809,10 @@
|
||||
in the query. This bit is set by default, which means
|
||||
<span class="command"><strong>dig</strong></span> normally sends recursive
|
||||
queries. Recursion is automatically disabled when
|
||||
the <em class="parameter"><code>+nssearch</code></em> or
|
||||
<em class="parameter"><code>+trace</code></em> query options are used.
|
||||
using the <em class="parameter"><code>+nssearch</code></em> option, and
|
||||
when using <em class="parameter"><code>+trace</code></em> except for
|
||||
an initial recursive query to get the list of root
|
||||
servers.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
|
||||
@@ -839,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>
|
||||
@@ -872,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>
|
||||
|
||||
+55
-57
@@ -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");
|
||||
@@ -2191,12 +2174,14 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
lookup->sendmsg->id = (dns_messageid_t)isc_random16();
|
||||
lookup->sendmsg->opcode = lookup->opcode;
|
||||
lookup->msgcounter = 0;
|
||||
|
||||
/*
|
||||
* If this is a trace request, completely disallow recursion, since
|
||||
* it's meaningless for traces.
|
||||
* If this is a trace request, completely disallow recursion after
|
||||
* looking up the root name servers, since it's meaningless for traces.
|
||||
*/
|
||||
if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
|
||||
if ((lookup->trace || lookup->ns_search_only) && !lookup->trace_root) {
|
||||
lookup->recurse = false;
|
||||
}
|
||||
|
||||
if (lookup->recurse &&
|
||||
lookup->rdtype != dns_rdatatype_axfr &&
|
||||
@@ -2487,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;
|
||||
@@ -2525,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);
|
||||
|
||||
@@ -2533,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);
|
||||
}
|
||||
|
||||
@@ -2880,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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -2979,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);
|
||||
@@ -3055,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;
|
||||
@@ -3155,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
|
||||
@@ -3529,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;
|
||||
|
||||
@@ -3558,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);
|
||||
@@ -3910,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)) {
|
||||
@@ -3953,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");
|
||||
|
||||
@@ -15,14 +15,15 @@ VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
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}
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -92,8 +92,7 @@ to generate TSIG keys\&.
|
||||
.RS 4
|
||||
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 4096 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
|
||||
.sp
|
||||
If the key size is not specified, some algorithms have pre\-defined defaults\&. For example, RSA keys for use as DNSSEC zone signing keys have a default size of 1024 bits; RSA keys for use as key signing keys (KSKs, generated with
|
||||
\fB\-f KSK\fR) default to 2048 bits\&.
|
||||
If the key size is not specified, some algorithms have pre\-defined defaults\&. For instance, RSA keys have a default size of 2048 bits\&.
|
||||
.RE
|
||||
.PP
|
||||
\-C
|
||||
|
||||
@@ -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;
|
||||
@@ -554,11 +553,7 @@ main(int argc, char **argv) {
|
||||
case DST_ALG_NSEC3RSASHA1:
|
||||
case DST_ALG_RSASHA256:
|
||||
case DST_ALG_RSASHA512:
|
||||
if ((kskflag & DNS_KEYFLAG_KSK) != 0) {
|
||||
size = 2048;
|
||||
} else {
|
||||
size = 1024;
|
||||
}
|
||||
size = 2048;
|
||||
if (verbose > 0) {
|
||||
fprintf(stderr, "key size not "
|
||||
"specified; defaulting"
|
||||
|
||||
@@ -176,10 +176,8 @@
|
||||
</para>
|
||||
<para>
|
||||
If the key size is not specified, some algorithms have
|
||||
pre-defined defaults. For example, RSA keys for use as
|
||||
DNSSEC zone signing keys have a default size of 1024 bits;
|
||||
RSA keys for use as key signing keys (KSKs, generated with
|
||||
<option>-f KSK</option>) default to 2048 bits.
|
||||
pre-defined defaults. For instance, RSA keys have a default
|
||||
size of 2048 bits.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -145,10 +145,8 @@
|
||||
</p>
|
||||
<p>
|
||||
If the key size is not specified, some algorithms have
|
||||
pre-defined defaults. For example, RSA keys for use as
|
||||
DNSSEC zone signing keys have a default size of 1024 bits;
|
||||
RSA keys for use as key signing keys (KSKs, generated with
|
||||
<code class="option">-f KSK</code>) default to 2048 bits.
|
||||
pre-defined defaults. For instance, RSA keys have a default
|
||||
size of 2048 bits.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-C</span></dt>
|
||||
|
||||
@@ -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\&.
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/atomic.h>
|
||||
#include <isc/base32.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/event.h>
|
||||
@@ -45,8 +46,8 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@@ -155,14 +156,13 @@ static unsigned char *gsalt = saltbuf;
|
||||
static size_t salt_length = 0;
|
||||
static isc_task_t *master = NULL;
|
||||
static unsigned int ntasks = 0;
|
||||
static bool shuttingdown = false, finished = false;
|
||||
static atomic_bool shuttingdown;
|
||||
static atomic_bool finished;
|
||||
static bool nokeys = false;
|
||||
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;
|
||||
@@ -1454,11 +1454,12 @@ signapex(void) {
|
||||
cleannode(gdb, gversion, node);
|
||||
dns_db_detachnode(gdb, &node);
|
||||
result = dns_dbiterator_first(gdbiter);
|
||||
if (result == ISC_R_NOMORE)
|
||||
finished = true;
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
if (result == ISC_R_NOMORE) {
|
||||
atomic_store(&finished, true);
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
fatal("failure iterating database: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -1478,11 +1479,12 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
static dns_fixedname_t fzonecut; /* Protected by namelock. */
|
||||
static unsigned int ended = 0; /* Protected by namelock. */
|
||||
|
||||
if (shuttingdown)
|
||||
if (atomic_load(&shuttingdown)) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOCK(&namelock);
|
||||
if (finished) {
|
||||
if (atomic_load(&finished)) {
|
||||
ended++;
|
||||
if (ended == ntasks) {
|
||||
isc_task_detach(&task);
|
||||
@@ -1492,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;
|
||||
@@ -1552,7 +1552,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
next:
|
||||
result = dns_dbiterator_next(gdbiter);
|
||||
if (result == ISC_R_NOMORE) {
|
||||
finished = true;
|
||||
atomic_store(&finished, true);
|
||||
break;
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
fatal("failure iterating database: %s",
|
||||
@@ -2643,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
|
||||
@@ -2902,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;
|
||||
@@ -2926,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
|
||||
@@ -2937,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;
|
||||
@@ -2989,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);
|
||||
@@ -3085,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");
|
||||
@@ -3127,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");
|
||||
@@ -3203,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;
|
||||
@@ -3212,9 +3196,12 @@ main(int argc, char *argv[]) {
|
||||
bool set_iter = false;
|
||||
bool nonsecify = false;
|
||||
|
||||
atomic_init(&shuttingdown, false);
|
||||
atomic_init(&finished, false);
|
||||
|
||||
/* 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.
|
||||
@@ -3379,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':
|
||||
@@ -3475,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;
|
||||
@@ -3574,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);
|
||||
}
|
||||
|
||||
@@ -3790,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3804,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");
|
||||
@@ -3835,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]);
|
||||
@@ -3854,7 +3830,7 @@ main(int argc, char *argv[]) {
|
||||
presign();
|
||||
TIME_NOW(&sign_start);
|
||||
signapex();
|
||||
if (!finished) {
|
||||
if (!atomic_load(&finished)) {
|
||||
/*
|
||||
* There is more work to do. Spread it out over multiple
|
||||
* processors if possible.
|
||||
@@ -3867,11 +3843,12 @@ main(int argc, char *argv[]) {
|
||||
isc_result_totext(result));
|
||||
}
|
||||
(void)isc_app_run();
|
||||
if (!finished)
|
||||
if (!atomic_load(&finished)) {
|
||||
fatal("process aborted by user");
|
||||
}
|
||||
} else
|
||||
isc_task_detach(&master);
|
||||
shuttingdown = true;
|
||||
atomic_store(&shuttingdown, true);;
|
||||
for (i = 0; i < (int)ntasks; i++)
|
||||
isc_task_detach(&tasks[i]);
|
||||
isc_taskmgr_destroy(&taskmgr);
|
||||
@@ -3884,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;
|
||||
|
||||
+16
-8
@@ -46,17 +46,22 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${NS_INCLUDES} ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
|
||||
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@
|
||||
${DBDRIVER_INCLUDES} \
|
||||
${OPENSSL_CFLAGS} \
|
||||
${JSON_C_CFLAGS} \
|
||||
${LIBXML2_CFLAGS} \
|
||||
${MAXMINDDB_CFLAGS} \
|
||||
${ZLIB_CFLAGS}
|
||||
|
||||
CDEFINES = @CONTRIB_DLZ@
|
||||
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
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@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_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@
|
||||
|
||||
@@ -84,10 +89,11 @@ SUBDIRS = unix
|
||||
|
||||
TARGETS = named@EXEEXT@
|
||||
|
||||
GEOIPLINKOBJS = geoip.@O@
|
||||
GEOIP2LINKOBJS = geoip.@O@
|
||||
|
||||
OBJS = builtin.@O@ config.@O@ control.@O@ \
|
||||
controlconf.@O@ fuzz.@O@ @GEOIPLINKOBJS@ \
|
||||
controlconf.@O@ fuzz.@O@ \
|
||||
@GEOIP2LINKOBJS@ \
|
||||
log.@O@ logconf.@O@ main.@O@ \
|
||||
server.@O@ statschannel.@O@ \
|
||||
tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \
|
||||
@@ -97,10 +103,11 @@ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
|
||||
|
||||
SYMOBJS = symtbl.@O@
|
||||
|
||||
GEOIPLINKSRCS = geoip.c
|
||||
GEOIP2LINKSRCS = geoip.c
|
||||
|
||||
SRCS = builtin.c config.c control.c \
|
||||
controlconf.c fuzz.c @GEOIPLINKSRCS@ \
|
||||
controlconf.c fuzz.c \
|
||||
@GEOIP2LINKSRCS@ \
|
||||
log.c logconf.c main.c \
|
||||
server.c statschannel.c \
|
||||
tkeyconf.c tsigconf.c zoneconf.c \
|
||||
@@ -132,6 +139,7 @@ config.@O@: config.c
|
||||
-DDYNDB_LIBDIR=\"@libdir@/bind\" \
|
||||
-DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \
|
||||
-DNAMED_SYSCONFDIR=\"${sysconfdir}\" \
|
||||
-DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" \
|
||||
-c ${srcdir}/config.c
|
||||
|
||||
server.@O@: server.c
|
||||
|
||||
+81
-40
@@ -15,6 +15,23 @@
|
||||
<xsl:template match="statistics[@version="3.11"]">
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function($) {
|
||||
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>
|
||||
|
||||
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
|
||||
<!-- Non Mozilla specific markup -->
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi"/>
|
||||
@@ -81,6 +98,10 @@
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.odd{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
@@ -221,6 +242,22 @@
|
||||
background-color: rgb(1,169,206);
|
||||
color: #ffffff;
|
||||
}
|
||||
table.zones {
|
||||
border: 1px solid grey;
|
||||
}
|
||||
table.zones td {
|
||||
text-align: right;
|
||||
font-family: monospace;
|
||||
}
|
||||
table.zones td:nth-child(2) {
|
||||
text-align: center;
|
||||
}
|
||||
table.zones td:nth-child(3) {
|
||||
text-align: left;
|
||||
}
|
||||
table.zones tr:hover{
|
||||
background-color: #99ddff;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding-right: 5px;
|
||||
@@ -293,25 +330,25 @@
|
||||
<hr/>
|
||||
<h2>Server Status</h2>
|
||||
<table class="info">
|
||||
<tr>
|
||||
<tr class="odd">
|
||||
<th>Boot time:</th>
|
||||
<td>
|
||||
<xsl:value-of select="server/boot-time"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="even">
|
||||
<th>Last reconfigured:</th>
|
||||
<td>
|
||||
<xsl:value-of select="server/config-time"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="odd">
|
||||
<th>Current time:</th>
|
||||
<td>
|
||||
<xsl:value-of select="server/current-time"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="even">
|
||||
<th>Server version:</th>
|
||||
<td>
|
||||
<xsl:value-of select="server/version"/>
|
||||
@@ -330,7 +367,13 @@
|
||||
<table class="counters">
|
||||
<xsl:for-each select="server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']">
|
||||
<xsl:sort select="." data-type="number" order="descending"/>
|
||||
<tr>
|
||||
<xsl:variable name="css-class0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class0}">
|
||||
<th>
|
||||
<xsl:value-of select="@name"/>
|
||||
</th>
|
||||
@@ -611,13 +654,13 @@
|
||||
<br/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="traffic/udp/counters[@type="request-size"]/counter[.>0] or traffic/udp/counters[@type="response-size"]/counter[.>0] or traffic/tcp/counters[@type="request-size"]/counter[.>0] or traffic/tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:if test="traffic//udp/counters[@type="request-size"]/counter[.>0] or traffic//udp/counters[@type="response-size"]/counter[.>0] or traffic//tcp/counters[@type="request-size"]/counter[.>0] or traffic//tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<h2>Traffic Size Statistics</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="traffic/udp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:if test="traffic//udp/counters[@type="request-size"]/counter[.>0]">
|
||||
<h4>UDP Requests Received</h4>
|
||||
<table class="counters">
|
||||
<xsl:for-each select="traffic/udp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:for-each select="traffic//udp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:variable name="css-class7">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
@@ -625,6 +668,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class7}">
|
||||
<th><xsl:value-of select="local-name(../../..)"/></th>
|
||||
<th>
|
||||
<xsl:value-of select="@name"/>
|
||||
</th>
|
||||
@@ -636,10 +680,10 @@
|
||||
</table>
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="traffic/udp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:if test="traffic//udp/counters[@type="response-size"]/counter[.>0]">
|
||||
<h4>UDP Responses Sent</h4>
|
||||
<table class="counters">
|
||||
<xsl:for-each select="traffic/udp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:for-each select="traffic//udp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:variable name="css-class7">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
@@ -647,6 +691,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class7}">
|
||||
<th><xsl:value-of select="local-name(../../..)"/></th>
|
||||
<th>
|
||||
<xsl:value-of select="@name"/>
|
||||
</th>
|
||||
@@ -658,10 +703,10 @@
|
||||
</table>
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="traffic/tcp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:if test="traffic//tcp/counters[@type="request-size"]/counter[.>0]">
|
||||
<h4>TCP Requests Received</h4>
|
||||
<table class="counters">
|
||||
<xsl:for-each select="traffic/tcp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:for-each select="traffic//tcp/counters[@type="request-size"]/counter[.>0]">
|
||||
<xsl:variable name="css-class7">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
@@ -669,6 +714,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class7}">
|
||||
<th><xsl:value-of select="local-name(../../..)"/></th>
|
||||
<th>
|
||||
<xsl:value-of select="@name"/>
|
||||
</th>
|
||||
@@ -680,10 +726,10 @@
|
||||
</table>
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="traffic/tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:if test="traffic//tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<h4>TCP Responses Sent</h4>
|
||||
<table class="counters">
|
||||
<xsl:for-each select="traffic/tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:for-each select="traffic//tcp/counters[@type="response-size"]/counter[.>0]">
|
||||
<xsl:variable name="css-class7">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
@@ -691,6 +737,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class7}">
|
||||
<th><xsl:value-of select="local-name(../../..)"/></th>
|
||||
<th>
|
||||
<xsl:value-of select="@name"/>
|
||||
</th>
|
||||
@@ -724,35 +771,29 @@
|
||||
</table>
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="views/view">
|
||||
<xsl:if test="zones/zone">
|
||||
<xsl:if test="views/view/zones/zone">
|
||||
<xsl:for-each select="views/view">
|
||||
<h3>Zones for View <xsl:value-of select="@name"/></h3>
|
||||
<table class="zones">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Class</th>
|
||||
<th>Type</th>
|
||||
<th>Serial</th>
|
||||
</tr>
|
||||
<xsl:for-each select="zones/zone">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="@name"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@rdataclass"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="type"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="serial"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="zones/zone">
|
||||
<xsl:variable name="css-class15">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<tr class="{$css-class15}">
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<td><xsl:value-of select="@rdataclass"/></td>
|
||||
<td><xsl:value-of select="type"/></td>
|
||||
<td><xsl:value-of select="serial"/></td></tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
|
||||
<h2>Received QTYPES per view/zone</h2>
|
||||
<xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
|
||||
|
||||
+77
-36
@@ -20,6 +20,23 @@ static char xslmsg[] =
|
||||
" <xsl:template match=\"statistics[@version="3.11"]\">\n"
|
||||
" <html>\n"
|
||||
" <head>\n"
|
||||
" <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>\n"
|
||||
" <script type=\"text/javascript\">\n"
|
||||
" $(function($) {\n"
|
||||
" 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"
|
||||
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
|
||||
" <!-- Non Mozilla specific markup -->\n"
|
||||
" <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
|
||||
@@ -86,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"
|
||||
@@ -226,6 +247,22 @@ static char xslmsg[] =
|
||||
" background-color: rgb(1,169,206);\n"
|
||||
" color: #ffffff;\n"
|
||||
" }\n"
|
||||
" table.zones {\n"
|
||||
" border: 1px solid grey;\n"
|
||||
" }\n"
|
||||
" table.zones td {\n"
|
||||
" text-align: right;\n"
|
||||
" font-family: monospace;\n"
|
||||
" }\n"
|
||||
" table.zones td:nth-child(2) {\n"
|
||||
" text-align: center;\n"
|
||||
" }\n"
|
||||
" table.zones td:nth-child(3) {\n"
|
||||
" text-align: left;\n"
|
||||
" }\n"
|
||||
" table.zones tr:hover{\n"
|
||||
" background-color: #99ddff;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" td, th {\n"
|
||||
" padding-right: 5px;\n"
|
||||
@@ -298,25 +335,25 @@ static char xslmsg[] =
|
||||
" <hr/>\n"
|
||||
" <h2>Server Status</h2>\n"
|
||||
" <table class=\"info\">\n"
|
||||
" <tr>\n"
|
||||
" <tr class=\"odd\">\n"
|
||||
" <th>Boot time:</th>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"server/boot-time\"/>\n"
|
||||
" </td>\n"
|
||||
" </tr>\n"
|
||||
" <tr>\n"
|
||||
" <tr class=\"even\">\n"
|
||||
" <th>Last reconfigured:</th>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"server/config-time\"/>\n"
|
||||
" </td>\n"
|
||||
" </tr>\n"
|
||||
" <tr>\n"
|
||||
" <tr class=\"odd\">\n"
|
||||
" <th>Current time:</th>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"server/current-time\"/>\n"
|
||||
" </td>\n"
|
||||
" </tr>\n"
|
||||
" <tr>\n"
|
||||
" <tr class=\"even\">\n"
|
||||
" <th>Server version:</th>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"server/version\"/>\n"
|
||||
@@ -335,7 +372,13 @@ static char xslmsg[] =
|
||||
" <table class=\"counters\">\n"
|
||||
" <xsl:for-each select=\"server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']\">\n"
|
||||
" <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
|
||||
" <tr>\n"
|
||||
" <xsl:variable name=\"css-class0\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
" <xsl:otherwise>odd</xsl:otherwise>\n"
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class0}\">\n"
|
||||
" <th>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </th>\n"
|
||||
@@ -616,13 +659,13 @@ static char xslmsg[] =
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" </xsl:for-each>\n"
|
||||
" <xsl:if test=\"traffic/udp/counters[@type="request-size"]/counter[.>0] or traffic/udp/counters[@type="response-size"]/counter[.>0] or traffic/tcp/counters[@type="request-size"]/counter[.>0] or traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:if test=\"traffic//udp/counters[@type="request-size"]/counter[.>0] or traffic//udp/counters[@type="response-size"]/counter[.>0] or traffic//tcp/counters[@type="request-size"]/counter[.>0] or traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <h2>Traffic Size Statistics</h2>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"traffic/udp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:if test=\"traffic//udp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <h4>UDP Requests Received</h4>\n"
|
||||
" <table class=\"counters\">\n"
|
||||
" <xsl:for-each select=\"traffic/udp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:for-each select=\"traffic//udp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:variable name=\"css-class7\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
@@ -630,6 +673,7 @@ static char xslmsg[] =
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class7}\">\n"
|
||||
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
|
||||
" <th>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </th>\n"
|
||||
@@ -641,10 +685,10 @@ static char xslmsg[] =
|
||||
" </table>\n"
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"traffic/udp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:if test=\"traffic//udp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <h4>UDP Responses Sent</h4>\n"
|
||||
" <table class=\"counters\">\n"
|
||||
" <xsl:for-each select=\"traffic/udp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:for-each select=\"traffic//udp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:variable name=\"css-class7\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
@@ -652,6 +696,7 @@ static char xslmsg[] =
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class7}\">\n"
|
||||
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
|
||||
" <th>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </th>\n"
|
||||
@@ -663,10 +708,10 @@ static char xslmsg[] =
|
||||
" </table>\n"
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"traffic/tcp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:if test=\"traffic//tcp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <h4>TCP Requests Received</h4>\n"
|
||||
" <table class=\"counters\">\n"
|
||||
" <xsl:for-each select=\"traffic/tcp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:for-each select=\"traffic//tcp/counters[@type="request-size"]/counter[.>0]\">\n"
|
||||
" <xsl:variable name=\"css-class7\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
@@ -674,6 +719,7 @@ static char xslmsg[] =
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class7}\">\n"
|
||||
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
|
||||
" <th>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </th>\n"
|
||||
@@ -685,10 +731,10 @@ static char xslmsg[] =
|
||||
" </table>\n"
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:if test=\"traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <h4>TCP Responses Sent</h4>\n"
|
||||
" <table class=\"counters\">\n"
|
||||
" <xsl:for-each select=\"traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:for-each select=\"traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
|
||||
" <xsl:variable name=\"css-class7\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
@@ -696,6 +742,7 @@ static char xslmsg[] =
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class7}\">\n"
|
||||
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
|
||||
" <th>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </th>\n"
|
||||
@@ -729,35 +776,29 @@ static char xslmsg[] =
|
||||
" </table>\n"
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"views/view/zones/zone\">\n"
|
||||
" <xsl:for-each select=\"views/view\">\n"
|
||||
" <xsl:if test=\"zones/zone\">\n"
|
||||
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
|
||||
" <table class=\"zones\">\n"
|
||||
" <tr>\n"
|
||||
" <th>Name</th>\n"
|
||||
" <th>Class</th>\n"
|
||||
" <th>Type</th>\n"
|
||||
" <th>Serial</th>\n"
|
||||
" </tr>\n"
|
||||
" <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
|
||||
" <tbody>\n"
|
||||
" <xsl:for-each select=\"zones/zone\">\n"
|
||||
" <tr>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"@rdataclass\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"type\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"serial\"/>\n"
|
||||
" </td>\n"
|
||||
" </tr>\n"
|
||||
" <xsl:variable name=\"css-class15\">\n"
|
||||
" <xsl:choose>\n"
|
||||
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
|
||||
" <xsl:otherwise>odd</xsl:otherwise>\n"
|
||||
" </xsl:choose>\n"
|
||||
" </xsl:variable>\n"
|
||||
" <tr class=\"{$css-class15}\">\n"
|
||||
" <td><xsl:value-of select=\"@name\"/></td>\n"
|
||||
" <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
|
||||
" <td><xsl:value-of select=\"type\"/></td>\n"
|
||||
" <td><xsl:value-of select=\"serial\"/></td></tr>\n"
|
||||
" </xsl:for-each>\n"
|
||||
" </tbody>\n"
|
||||
" </table>\n"
|
||||
" </xsl:if>\n"
|
||||
" </xsl:for-each>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:if test=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n"
|
||||
" <h2>Received QTYPES per view/zone</h2>\n"
|
||||
" <xsl:for-each select=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n"
|
||||
|
||||
+10
-34
@@ -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"
|
||||
@@ -64,6 +64,11 @@ options {\n\
|
||||
#ifndef WIN32
|
||||
" files unlimited;\n"
|
||||
#endif
|
||||
#if defined(HAVE_GEOIP2) && !defined(WIN32)
|
||||
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
|
||||
#elif defined(HAVE_GEOIP2)
|
||||
" geoip-directory \".\";\n"
|
||||
#endif
|
||||
"\
|
||||
# has-old-clients <obsolete>;\n\
|
||||
heartbeat-interval 60;\n\
|
||||
@@ -140,7 +145,6 @@ options {\n\
|
||||
check-names response ignore;\n\
|
||||
check-names slave warn;\n\
|
||||
check-spf warn;\n\
|
||||
cleaning-interval 0; /* now meaningless */\n\
|
||||
clients-per-query 10;\n\
|
||||
dnssec-accept-expired no;\n\
|
||||
dnssec-validation " VALIDATION_DEFAULT "; \n"
|
||||
@@ -151,11 +155,8 @@ options {\n\
|
||||
# fetch-glue <obsolete>;\n\
|
||||
fetch-quota-params 100 0.1 0.3 0.7;\n\
|
||||
fetches-per-server 0;\n\
|
||||
fetches-per-zone 0;\n"
|
||||
#ifdef HAVE_GEOIP
|
||||
" geoip-use-ecs yes;\n"
|
||||
#endif
|
||||
" glue-cache yes;\n\
|
||||
fetches-per-zone 0;\n\
|
||||
glue-cache yes;\n\
|
||||
lame-ttl 600;\n"
|
||||
#ifdef HAVE_LMDB
|
||||
" lmdb-mapsize 32M;\n"
|
||||
@@ -291,10 +292,10 @@ view \"_bind\" chaos {\n\
|
||||
# \"dnssec-validation auto;\" is set and\n\
|
||||
# sysconfdir/bind.keys doesn't exist).\n\
|
||||
#\n\
|
||||
# BEGIN MANAGED KEYS\n"
|
||||
# BEGIN DNSSEC KEYS\n"
|
||||
|
||||
/* Imported from bind.keys.h: */
|
||||
MANAGED_KEYS
|
||||
DNSSEC_KEYS
|
||||
|
||||
"# END MANAGED KEYS\n\
|
||||
\n\
|
||||
@@ -511,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;
|
||||
@@ -696,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);
|
||||
@@ -732,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);
|
||||
@@ -760,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);
|
||||
@@ -772,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);
|
||||
@@ -784,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);
|
||||
@@ -805,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);
|
||||
@@ -837,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;
|
||||
@@ -850,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;
|
||||
@@ -863,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>
|
||||
|
||||
+95
-96
@@ -11,133 +11,132 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if defined(HAVE_GEOIP2)
|
||||
#include <maxminddb.h>
|
||||
#endif
|
||||
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/geoip.h>
|
||||
|
||||
#include <named/log.h>
|
||||
#include <named/geoip.h>
|
||||
|
||||
#include <dns/geoip.h>
|
||||
static dns_geoip_databases_t geoip_table;
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
static dns_geoip_databases_t geoip_table = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
#if defined(HAVE_GEOIP2)
|
||||
static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
|
||||
|
||||
static void
|
||||
init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
|
||||
GeoIPOptions method, const char *name)
|
||||
{
|
||||
char *info;
|
||||
GeoIP *db;
|
||||
static MMDB_s *
|
||||
open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
|
||||
char pathbuf[PATH_MAX];
|
||||
unsigned int n;
|
||||
int ret;
|
||||
|
||||
REQUIRE(dbp != NULL);
|
||||
|
||||
db = *dbp;
|
||||
|
||||
if (db != NULL) {
|
||||
GeoIP_delete(db);
|
||||
db = *dbp = NULL;
|
||||
n = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile);
|
||||
if (n >= sizeof(pathbuf)) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"GeoIP2 database '%s/%s': path too long",
|
||||
dir, dbfile);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (! GeoIP_db_avail(edition)) {
|
||||
ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"GeoIP %s (type %d) DB not available", name, edition);
|
||||
goto fail;
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"opened GeoIP2 database '%s'", pathbuf);
|
||||
return (mmdb);
|
||||
}
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"initializing GeoIP %s (type %d) DB", name, edition);
|
||||
|
||||
db = GeoIP_open_type(edition, method);
|
||||
if (db == NULL) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"failed to initialize GeoIP %s (type %d) DB%s",
|
||||
name, edition, fallback == 0
|
||||
? "geoip matches using this database will fail" : "");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
info = GeoIP_database_info(db);
|
||||
if (info != NULL) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"%s", info);
|
||||
free(info);
|
||||
}
|
||||
|
||||
*dbp = db;
|
||||
return;
|
||||
fail:
|
||||
if (fallback != 0)
|
||||
init_geoip_db(dbp, fallback, 0, method, name);
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
|
||||
"unable to open GeoIP2 database '%s' (status %d)",
|
||||
pathbuf, ret);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
|
||||
void
|
||||
named_geoip_init(void) {
|
||||
#ifndef HAVE_GEOIP
|
||||
return;
|
||||
#else
|
||||
GeoIP_cleanup();
|
||||
if (named_g_geoip == NULL)
|
||||
#if defined(HAVE_GEOIP2)
|
||||
if (named_g_geoip == NULL) {
|
||||
named_g_geoip = &geoip_table;
|
||||
}
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
named_geoip_load(char *dir) {
|
||||
#ifndef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
REQUIRE(dir != NULL);
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"looking for GeoIP2 databases in '%s'", dir);
|
||||
|
||||
named_g_geoip->country = open_geoip2(dir, "GeoIP2-Country.mmdb",
|
||||
&geoip_country);
|
||||
if (named_g_geoip->country == NULL) {
|
||||
named_g_geoip->country = open_geoip2(dir,
|
||||
"GeoLite2-Country.mmdb",
|
||||
&geoip_country);
|
||||
}
|
||||
|
||||
named_g_geoip->city = open_geoip2(dir, "GeoIP2-City.mmdb",
|
||||
&geoip_city);
|
||||
if (named_g_geoip->city == NULL) {
|
||||
named_g_geoip->city = open_geoip2(dir, "GeoLite2-City.mmdb",
|
||||
&geoip_city);
|
||||
}
|
||||
|
||||
named_g_geoip->as = open_geoip2(dir, "GeoIP2-ASN.mmdb", &geoip_as);
|
||||
if (named_g_geoip->as == NULL) {
|
||||
named_g_geoip->as = open_geoip2(dir, "GeoLite2-ASN.mmdb",
|
||||
&geoip_as);
|
||||
}
|
||||
|
||||
named_g_geoip->isp = open_geoip2(dir, "GeoIP2-ISP.mmdb", &geoip_isp);
|
||||
named_g_geoip->domain = open_geoip2(dir, "GeoIP2-Domain.mmdb",
|
||||
&geoip_domain);
|
||||
#else
|
||||
UNUSED(dir);
|
||||
|
||||
return;
|
||||
#else
|
||||
GeoIPOptions method;
|
||||
|
||||
#ifdef _WIN32
|
||||
method = GEOIP_STANDARD;
|
||||
#else
|
||||
method = GEOIP_MMAP_CACHE;
|
||||
#endif
|
||||
}
|
||||
|
||||
named_geoip_init();
|
||||
if (dir != NULL) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"using \"%s\" as GeoIP directory", dir);
|
||||
GeoIP_setup_custom_directory(dir);
|
||||
void
|
||||
named_geoip_shutdown(void) {
|
||||
#ifdef HAVE_GEOIP2
|
||||
if (named_g_geoip->country != NULL) {
|
||||
MMDB_close(named_g_geoip->country);
|
||||
named_g_geoip->country = NULL;
|
||||
}
|
||||
|
||||
init_geoip_db(&named_g_geoip->country_v4, GEOIP_COUNTRY_EDITION, 0,
|
||||
method, "Country (IPv4)");
|
||||
#ifdef HAVE_GEOIP_V6
|
||||
init_geoip_db(&named_g_geoip->country_v6, GEOIP_COUNTRY_EDITION_V6, 0,
|
||||
method, "Country (IPv6)");
|
||||
#endif
|
||||
|
||||
init_geoip_db(&named_g_geoip->city_v4, GEOIP_CITY_EDITION_REV1,
|
||||
GEOIP_CITY_EDITION_REV0, method, "City (IPv4)");
|
||||
#if defined(HAVE_GEOIP_V6) && defined(HAVE_GEOIP_CITY_V6)
|
||||
init_geoip_db(&named_g_geoip->city_v6, GEOIP_CITY_EDITION_REV1_V6,
|
||||
GEOIP_CITY_EDITION_REV0_V6, method, "City (IPv6)");
|
||||
#endif
|
||||
|
||||
init_geoip_db(&named_g_geoip->region, GEOIP_REGION_EDITION_REV1,
|
||||
GEOIP_REGION_EDITION_REV0, method, "Region");
|
||||
if (named_g_geoip->city != NULL) {
|
||||
MMDB_close(named_g_geoip->city);
|
||||
named_g_geoip->city = NULL;
|
||||
}
|
||||
if (named_g_geoip->as != NULL) {
|
||||
MMDB_close(named_g_geoip->as);
|
||||
named_g_geoip->as = NULL;
|
||||
}
|
||||
if (named_g_geoip->isp != NULL) {
|
||||
MMDB_close(named_g_geoip->isp);
|
||||
named_g_geoip->isp = NULL;
|
||||
}
|
||||
if (named_g_geoip->domain != NULL) {
|
||||
MMDB_close(named_g_geoip->domain);
|
||||
named_g_geoip->domain = NULL;
|
||||
}
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
init_geoip_db(&named_g_geoip->isp, GEOIP_ISP_EDITION, 0,
|
||||
method, "ISP");
|
||||
init_geoip_db(&named_g_geoip->org, GEOIP_ORG_EDITION, 0,
|
||||
method, "Org");
|
||||
init_geoip_db(&named_g_geoip->as, GEOIP_ASNUM_EDITION, 0,
|
||||
method, "AS");
|
||||
init_geoip_db(&named_g_geoip->domain, GEOIP_DOMAIN_EDITION, 0,
|
||||
method, "Domain");
|
||||
init_geoip_db(&named_g_geoip->netspeed, GEOIP_NETSPEED_EDITION, 0,
|
||||
method, "NetSpeed");
|
||||
#endif /* HAVE_GEOIP */
|
||||
dns_geoip_shutdown();
|
||||
}
|
||||
|
||||
@@ -9,18 +9,15 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#ifndef _GEOIP_H
|
||||
#define _GEOIP_H
|
||||
#pragma once
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#include <GeoIP.h>
|
||||
#include <GeoIPCity.h>
|
||||
#endif /* HAVE_GEOIP */
|
||||
|
||||
void named_geoip_init(void);
|
||||
void named_geoip_load(char *dir);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
extern dns_geoip_databases_t *named_g_geoip;
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif
|
||||
|
||||
void
|
||||
named_geoip_init(void);
|
||||
|
||||
void
|
||||
named_geoip_load(char *dir);
|
||||
|
||||
void
|
||||
named_geoip_shutdown(void);
|
||||
|
||||
@@ -154,7 +154,7 @@ EXTERN bool named_g_keepstderr INIT(false);
|
||||
|
||||
EXTERN unsigned int named_g_tat_interval INIT(24*3600);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/quota.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
#include <dns/acl.h>
|
||||
#include <dns/dnstap.h>
|
||||
@@ -56,9 +55,9 @@ struct named_server {
|
||||
char * secrootsfile; /*%< Secroots file name */
|
||||
char * bindkeysfile; /*%< bind.keys file name */
|
||||
char * recfile; /*%< Recursive file name */
|
||||
bool version_set; /*%< User has set version */
|
||||
bool version_set; /*%< User has set version */
|
||||
char * version; /*%< User-specified version */
|
||||
bool hostname_set; /*%< User has set hostname */
|
||||
bool hostname_set; /*%< User has set hostname */
|
||||
char * hostname; /*%< User-specified hostname */
|
||||
|
||||
/* Server data structures. */
|
||||
@@ -78,9 +77,9 @@ struct named_server {
|
||||
|
||||
isc_mutex_t reload_event_lock;
|
||||
isc_event_t * reload_event;
|
||||
bool reload_in_progress;
|
||||
named_reload_t reload_status;
|
||||
|
||||
bool flushonshutdown;
|
||||
bool flushonshutdown;
|
||||
|
||||
named_cachelist_t cachelist; /*%< Possibly shared caches */
|
||||
isc_stats_t * zonestats; /*% Zone management stats */
|
||||
@@ -98,7 +97,7 @@ struct named_server {
|
||||
dns_name_t *session_keyname;
|
||||
unsigned int session_keyalg;
|
||||
uint16_t session_keybits;
|
||||
bool interface_auto;
|
||||
bool interface_auto;
|
||||
unsigned char secret[32]; /*%< Server Cookie Secret */
|
||||
ns_cookiealg_t cookiealg;
|
||||
|
||||
|
||||
@@ -27,4 +27,13 @@ typedef ISC_LIST(named_dispatch_t) named_dispatchlist_t;
|
||||
typedef struct named_statschannel named_statschannel_t;
|
||||
typedef ISC_LIST(named_statschannel_t) named_statschannellist_t;
|
||||
|
||||
/*%
|
||||
* Used for server->reload_status as printed by `rndc status`
|
||||
*/
|
||||
typedef enum {
|
||||
NAMED_RELOAD_DONE,
|
||||
NAMED_RELOAD_IN_PROGRESS,
|
||||
NAMED_RELOAD_FAILED,
|
||||
} named_reload_t;
|
||||
|
||||
#endif /* NAMED_TYPES_H */
|
||||
|
||||
+11
-7
@@ -54,6 +54,9 @@
|
||||
#include <gperftools/profiler.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_JSON_C
|
||||
#include <json_c_version.h>
|
||||
#endif /* HAVE_JSON_C */
|
||||
|
||||
/*
|
||||
* Defining NAMED_MAIN provides storage declarations (rather than extern)
|
||||
@@ -79,6 +82,7 @@
|
||||
#include <openssl/crypto.h>
|
||||
#ifdef HAVE_LIBXML2
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
#include <zlib.h>
|
||||
@@ -338,7 +342,7 @@ save_command_line(int argc, char *argv[]) {
|
||||
int i;
|
||||
char *dst = saved_command_line;
|
||||
char *eob = saved_command_line + sizeof(saved_command_line) - 1;
|
||||
char *rollback;
|
||||
char *rollback = dst;
|
||||
|
||||
for (i = 1; i < argc && dst < eob; i++) {
|
||||
char *src = argv[i];
|
||||
@@ -526,10 +530,10 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
|
||||
printf("linked to libxml2 version: %s\n",
|
||||
xmlParserVersion);
|
||||
#endif
|
||||
#if defined(HAVE_JSON) && defined(JSON_C_VERSION)
|
||||
printf("compiled with libjson-c version: %s\n",
|
||||
#if defined(HAVE_JSON_C)
|
||||
printf("compiled with json-c version: %s\n",
|
||||
JSON_C_VERSION);
|
||||
printf("linked to libjson-c version: %s\n",
|
||||
printf("linked to json-c version: %s\n",
|
||||
json_c_version());
|
||||
#endif
|
||||
#if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
|
||||
@@ -1092,13 +1096,13 @@ setup(void) {
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"linked to libxml2 version: %s", xmlParserVersion);
|
||||
#endif
|
||||
#if defined(HAVE_JSON) && defined(JSON_C_VERSION)
|
||||
#if defined(HAVE_JSON_C)
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"compiled with libjson-c version: %s", JSON_C_VERSION);
|
||||
"compiled with json-c version: %s", JSON_C_VERSION);
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"linked to libjson-c version: %s", json_c_version());
|
||||
"linked to json-c version: %s", json_c_version());
|
||||
#endif
|
||||
#if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
|
||||
+51
-33
@@ -10,12 +10,12 @@
|
||||
.\" Title: named.conf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2018-12-07
|
||||
.\" Date: 2019-08-07
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\&.CONF" "5" "2018\-12\-07" "ISC" "BIND9"
|
||||
.TH "NAMED\&.CONF" "5" "2019\-08\-07" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -97,6 +97,19 @@ dlz \fIstring\fR {
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "DNSSEC-KEYS"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
dnssec\-keys { \fIstring\fR ( static\-key |
|
||||
initial\-key ) \fIinteger\fR \fIinteger\fR \fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. };
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "DYNDB"
|
||||
.sp
|
||||
.if n \{\
|
||||
@@ -149,13 +162,17 @@ logging {
|
||||
.RE
|
||||
.\}
|
||||
.SH "MANAGED-KEYS"
|
||||
.PP
|
||||
Deprecated \- see DNSSEC\-KEYS\&.
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
managed\-keys { \fIstring\fR \fIstring\fR \fIinteger\fR
|
||||
\fIinteger\fR \fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
|
||||
managed\-keys { \fIstring\fR ( static\-key
|
||||
| initial\-key ) \fIinteger\fR
|
||||
\fIinteger\fR \fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. }; deprecated
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -225,9 +242,8 @@ options {
|
||||
check\-spf ( warn | ignore );
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
check\-wildcard \fIboolean\fR;
|
||||
cleaning\-interval \fIinteger\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 );
|
||||
@@ -257,10 +273,7 @@ options {
|
||||
dnsrps\-options { \fIunspecified\-text\fR };
|
||||
dnssec\-accept\-expired \fIboolean\fR;
|
||||
dnssec\-dnskey\-kskonly \fIboolean\fR;
|
||||
dnssec\-enable \fIboolean\fR;
|
||||
dnssec\-loadkeys\-interval \fIinteger\fR;
|
||||
dnssec\-lookaside ( \fIstring\fR trust\-anchor
|
||||
\fIstring\fR | auto | no );
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
@@ -409,11 +422,12 @@ options {
|
||||
resolver\-retry\-interval \fIinteger\fR;
|
||||
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
|
||||
\fIinteger\fR;
|
||||
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
|
||||
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
|
||||
disabled | drop | given | no\-op | nodata | nxdomain | passthru
|
||||
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
|
||||
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
|
||||
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
|
||||
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
|
||||
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
|
||||
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
|
||||
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
|
||||
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
|
||||
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
|
||||
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
|
||||
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
|
||||
@@ -551,13 +565,16 @@ statistics\-channels {
|
||||
.RE
|
||||
.\}
|
||||
.SH "TRUSTED-KEYS"
|
||||
.PP
|
||||
Deprecated \- see DNSSEC\-KEYS\&.
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
trusted\-keys { \fIstring\fR \fIinteger\fR \fIinteger\fR
|
||||
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
|
||||
trusted\-keys { \fIstring\fR \fIinteger\fR
|
||||
\fIinteger\fR \fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. }; deprecated
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@@ -607,7 +624,6 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
check\-spf ( warn | ignore );
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
check\-wildcard \fIboolean\fR;
|
||||
cleaning\-interval \fIinteger\fR;
|
||||
clients\-per\-query \fIinteger\fR;
|
||||
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
|
||||
except\-from { \fIstring\fR; \&.\&.\&. } ];
|
||||
@@ -638,10 +654,10 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
dnsrps\-options { \fIunspecified\-text\fR };
|
||||
dnssec\-accept\-expired \fIboolean\fR;
|
||||
dnssec\-dnskey\-kskonly \fIboolean\fR;
|
||||
dnssec\-enable \fIboolean\fR;
|
||||
dnssec\-keys { \fIstring\fR ( static\-key |
|
||||
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 );
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
@@ -676,9 +692,11 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
key\-directory \fIquoted_string\fR;
|
||||
lame\-ttl \fIttlval\fR;
|
||||
lmdb\-mapsize \fIsizeval\fR;
|
||||
managed\-keys { \fIstring\fR \fIstring\fR
|
||||
\fIinteger\fR \fIinteger\fR \fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. };
|
||||
managed\-keys { \fIstring\fR (
|
||||
static\-key | initial\-key
|
||||
) \fIinteger\fR \fIinteger\fR
|
||||
\fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. }; deprecated
|
||||
masterfile\-format ( map | raw | text );
|
||||
masterfile\-style ( full | relative );
|
||||
match\-clients { \fIaddress_match_element\fR; \&.\&.\&. };
|
||||
@@ -761,11 +779,12 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
resolver\-retry\-interval \fIinteger\fR;
|
||||
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
|
||||
\fIinteger\fR;
|
||||
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
|
||||
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
|
||||
disabled | drop | given | no\-op | nodata | nxdomain | passthru
|
||||
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
|
||||
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
|
||||
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
|
||||
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
|
||||
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
|
||||
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
|
||||
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
|
||||
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
|
||||
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
|
||||
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
|
||||
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
|
||||
@@ -827,9 +846,10 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * )
|
||||
] [ dscp \fIinteger\fR ];
|
||||
trust\-anchor\-telemetry \fIboolean\fR; // experimental
|
||||
trusted\-keys { \fIstring\fR \fIinteger\fR
|
||||
\fIinteger\fR \fIinteger\fR \fIquoted_string\fR;
|
||||
\&.\&.\&. };
|
||||
trusted\-keys { \fIstring\fR
|
||||
\fIinteger\fR \fIinteger\fR
|
||||
\fIinteger\fR
|
||||
\fIquoted_string\fR; \&.\&.\&. }; deprecated
|
||||
try\-tcp\-refresh \fIboolean\fR;
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
use\-alt\-transfer\-source \fIboolean\fR;
|
||||
@@ -887,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;
|
||||
@@ -907,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>2018-12-07</date>
|
||||
<date>2019-08-07</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
@@ -80,14 +80,12 @@
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>ACL</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
acl <replaceable>string</replaceable> { <replaceable>address_match_element</replaceable>; ... };
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>CONTROLS</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
controls {
|
||||
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> |
|
||||
@@ -104,7 +102,6 @@ controls {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>DLZ</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
dlz <replaceable>string</replaceable> {
|
||||
database <replaceable>string</replaceable>;
|
||||
@@ -113,8 +110,15 @@ dlz <replaceable>string</replaceable> {
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>DYNDB</title></info>
|
||||
<refsection><info><title>DNSSEC-KEYS</title></info>
|
||||
<literallayout class="normal">
|
||||
dnssec-keys { <replaceable>string</replaceable> ( static-key |
|
||||
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... };
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>DYNDB</title></info>
|
||||
<literallayout class="normal">
|
||||
dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable> {
|
||||
<replaceable>unspecified-text</replaceable> };
|
||||
@@ -122,7 +126,6 @@ dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>KEY</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
key <replaceable>string</replaceable> {
|
||||
algorithm <replaceable>string</replaceable>;
|
||||
@@ -132,7 +135,6 @@ key <replaceable>string</replaceable> {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>LOGGING</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
logging {
|
||||
category <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
|
||||
@@ -152,17 +154,17 @@ logging {
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
|
||||
<refsection><info><title>MANAGED-KEYS</title></info>
|
||||
|
||||
<para>Deprecated - see DNSSEC-KEYS.</para>
|
||||
<literallayout class="normal">
|
||||
managed-keys { <replaceable>string</replaceable> <replaceable>string</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
|
||||
managed-keys { <replaceable>string</replaceable> ( static-key
|
||||
| initial-key ) <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... }; deprecated
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>MASTERS</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
masters <replaceable>string</replaceable> [ port <replaceable>integer</replaceable> ] [ dscp
|
||||
<replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
|
||||
@@ -172,7 +174,6 @@ masters <replaceable>string</replaceable> [ port <replaceable>integer</replaceab
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
options {
|
||||
allow-new-zones <replaceable>boolean</replaceable>;
|
||||
@@ -219,9 +220,8 @@ options {
|
||||
check-spf ( warn | ignore );
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
check-wildcard <replaceable>boolean</replaceable>;
|
||||
cleaning-interval <replaceable>integer</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> );
|
||||
@@ -251,10 +251,7 @@ options {
|
||||
dnsrps-options { <replaceable>unspecified-text</replaceable> };
|
||||
dnssec-accept-expired <replaceable>boolean</replaceable>;
|
||||
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
|
||||
dnssec-enable <replaceable>boolean</replaceable>;
|
||||
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
|
||||
dnssec-lookaside ( <replaceable>string</replaceable> trust-anchor
|
||||
<replaceable>string</replaceable> | auto | no );
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
|
||||
dnssec-update-mode ( maintain | no-resign );
|
||||
@@ -403,11 +400,12 @@ options {
|
||||
resolver-retry-interval <replaceable>integer</replaceable>;
|
||||
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
|
||||
<replaceable>integer</replaceable>;
|
||||
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
|
||||
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
|
||||
disabled | drop | given | no-op | nodata | nxdomain | passthru
|
||||
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
|
||||
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
|
||||
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
|
||||
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
|
||||
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
|
||||
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
|
||||
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
|
||||
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
|
||||
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
|
||||
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
|
||||
@@ -474,7 +472,6 @@ options {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>PLUGIN</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
plugin ( query ) <replaceable>string</replaceable> [ { <replaceable>unspecified-text</replaceable>
|
||||
} ];
|
||||
@@ -482,7 +479,6 @@ plugin ( query ) <replaceable>string</replaceable> [ { <replaceable>unspecified-
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SERVER</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
server <replaceable>netprefix</replaceable> {
|
||||
bogus <replaceable>boolean</replaceable>;
|
||||
@@ -520,7 +516,6 @@ server <replaceable>netprefix</replaceable> {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>STATISTICS-CHANNELS</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
statistics-channels {
|
||||
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> |
|
||||
@@ -532,15 +527,15 @@ statistics-channels {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>TRUSTED-KEYS</title></info>
|
||||
|
||||
<para>Deprecated - see DNSSEC-KEYS.</para>
|
||||
<literallayout class="normal">
|
||||
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
|
||||
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... }; deprecated
|
||||
</literallayout>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>VIEW</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
allow-new-zones <replaceable>boolean</replaceable>;
|
||||
@@ -581,7 +576,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
check-spf ( warn | ignore );
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
check-wildcard <replaceable>boolean</replaceable>;
|
||||
cleaning-interval <replaceable>integer</replaceable>;
|
||||
clients-per-query <replaceable>integer</replaceable>;
|
||||
deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [
|
||||
except-from { <replaceable>string</replaceable>; ... } ];
|
||||
@@ -612,10 +606,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
dnsrps-options { <replaceable>unspecified-text</replaceable> };
|
||||
dnssec-accept-expired <replaceable>boolean</replaceable>;
|
||||
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
|
||||
dnssec-enable <replaceable>boolean</replaceable>;
|
||||
dnssec-keys { <replaceable>string</replaceable> ( static-key |
|
||||
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 );
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
|
||||
dnssec-update-mode ( maintain | no-resign );
|
||||
@@ -650,9 +644,11 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
key-directory <replaceable>quoted_string</replaceable>;
|
||||
lame-ttl <replaceable>ttlval</replaceable>;
|
||||
lmdb-mapsize <replaceable>sizeval</replaceable>;
|
||||
managed-keys { <replaceable>string</replaceable> <replaceable>string</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... };
|
||||
managed-keys { <replaceable>string</replaceable> (
|
||||
static-key | initial-key
|
||||
) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... }; deprecated
|
||||
masterfile-format ( map | raw | text );
|
||||
masterfile-style ( full | relative );
|
||||
match-clients { <replaceable>address_match_element</replaceable>; ... };
|
||||
@@ -735,11 +731,12 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
resolver-retry-interval <replaceable>integer</replaceable>;
|
||||
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
|
||||
<replaceable>integer</replaceable>;
|
||||
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
|
||||
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
|
||||
disabled | drop | given | no-op | nodata | nxdomain | passthru
|
||||
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
|
||||
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
|
||||
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
|
||||
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
|
||||
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
|
||||
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
|
||||
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
|
||||
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
|
||||
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
|
||||
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
|
||||
@@ -801,9 +798,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * )
|
||||
] [ dscp <replaceable>integer</replaceable> ];
|
||||
trust-anchor-telemetry <replaceable>boolean</replaceable>; // experimental
|
||||
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>;
|
||||
... };
|
||||
trusted-keys { <replaceable>string</replaceable>
|
||||
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
|
||||
<replaceable>integer</replaceable>
|
||||
<replaceable>quoted_string</replaceable>; ... }; deprecated
|
||||
try-tcp-refresh <replaceable>boolean</replaceable>;
|
||||
update-check-ksk <replaceable>boolean</replaceable>;
|
||||
use-alt-transfer-source <replaceable>boolean</replaceable>;
|
||||
@@ -861,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>;
|
||||
@@ -881,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 );
|
||||
@@ -915,7 +911,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>ZONE</title></info>
|
||||
|
||||
<literallayout class="normal">
|
||||
zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
allow-notify { <replaceable>address_match_element</replaceable>; ... };
|
||||
|
||||
+56
-60
@@ -59,7 +59,6 @@
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>ACL</h2>
|
||||
|
||||
<div class="literallayout"><p><br>
|
||||
acl <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
</p></div>
|
||||
@@ -67,7 +66,6 @@ acl
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>CONTROLS</h2>
|
||||
|
||||
<div class="literallayout"><p><br>
|
||||
controls {<br>
|
||||
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
|
||||
@@ -85,7 +83,6 @@ controls
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>DLZ</h2>
|
||||
|
||||
<div class="literallayout"><p><br>
|
||||
dlz <em class="replaceable"><code>string</code></em> {<br>
|
||||
database <em class="replaceable"><code>string</code></em>;<br>
|
||||
@@ -95,8 +92,16 @@ dlz
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.11"></a><h2>DYNDB</h2>
|
||||
<a name="id-1.11"></a><h2>DNSSEC-KEYS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
|
||||
initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.12"></a><h2>DYNDB</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
dyndb <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>quoted_string</code></em> {<br>
|
||||
<em class="replaceable"><code>unspecified-text</code></em> };<br>
|
||||
@@ -104,8 +109,7 @@ dyndb
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.12"></a><h2>KEY</h2>
|
||||
|
||||
<a name="id-1.13"></a><h2>KEY</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
key <em class="replaceable"><code>string</code></em> {<br>
|
||||
algorithm <em class="replaceable"><code>string</code></em>;<br>
|
||||
@@ -115,8 +119,7 @@ key
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.13"></a><h2>LOGGING</h2>
|
||||
|
||||
<a name="id-1.14"></a><h2>LOGGING</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
logging {<br>
|
||||
category <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
|
||||
@@ -136,19 +139,19 @@ logging
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.14"></a><h2>MANAGED-KEYS</h2>
|
||||
|
||||
<a name="id-1.15"></a><h2>MANAGED-KEYS</h2>
|
||||
<p>Deprecated - see DNSSEC-KEYS.</p>
|
||||
<div class="literallayout"><p><br>
|
||||
managed-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
managed-keys { <em class="replaceable"><code>string</code></em> ( static-key<br>
|
||||
| initial-key ) <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.15"></a><h2>MASTERS</h2>
|
||||
|
||||
<a name="id-1.16"></a><h2>MASTERS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
masters <em class="replaceable"><code>string</code></em> [ port <em class="replaceable"><code>integer</code></em> ] [ dscp<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
|
||||
@@ -158,8 +161,7 @@ masters
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.16"></a><h2>OPTIONS</h2>
|
||||
|
||||
<a name="id-1.17"></a><h2>OPTIONS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
options {<br>
|
||||
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
@@ -206,9 +208,8 @@ options
|
||||
check-spf ( warn | ignore );<br>
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
cleaning-interval <em class="replaceable"><code>integer</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>
|
||||
@@ -238,10 +239,7 @@ options
|
||||
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
|
||||
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-enable <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> trust-anchor<br>
|
||||
<em class="replaceable"><code>string</code></em> | auto | no );<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>
|
||||
@@ -390,11 +388,12 @@ options
|
||||
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
|
||||
<em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
|
||||
<em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
|
||||
disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
|
||||
| tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
|
||||
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
|
||||
<em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
|
||||
<em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
|
||||
nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
|
||||
recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
|
||||
min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
|
||||
nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
|
||||
@@ -461,8 +460,7 @@ options
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.17"></a><h2>PLUGIN</h2>
|
||||
|
||||
<a name="id-1.18"></a><h2>PLUGIN</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
plugin ( query ) <em class="replaceable"><code>string</code></em> [ { <em class="replaceable"><code>unspecified-text</code></em><br>
|
||||
} ];<br>
|
||||
@@ -470,8 +468,7 @@ plugin
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.18"></a><h2>SERVER</h2>
|
||||
|
||||
<a name="id-1.19"></a><h2>SERVER</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
server <em class="replaceable"><code>netprefix</code></em> {<br>
|
||||
bogus <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
@@ -509,8 +506,7 @@ server
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.19"></a><h2>STATISTICS-CHANNELS</h2>
|
||||
|
||||
<a name="id-1.20"></a><h2>STATISTICS-CHANNELS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
statistics-channels {<br>
|
||||
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
|
||||
@@ -522,17 +518,17 @@ statistics-channels
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.20"></a><h2>TRUSTED-KEYS</h2>
|
||||
|
||||
<a name="id-1.21"></a><h2>TRUSTED-KEYS</h2>
|
||||
<p>Deprecated - see DNSSEC-KEYS.</p>
|
||||
<div class="literallayout"><p><br>
|
||||
trusted-keys { <em class="replaceable"><code>string</code></em> <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>
|
||||
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.21"></a><h2>VIEW</h2>
|
||||
|
||||
<a name="id-1.22"></a><h2>VIEW</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
view <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
|
||||
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
@@ -573,7 +569,6 @@ view
|
||||
check-spf ( warn | ignore );<br>
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
|
||||
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
|
||||
except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>
|
||||
@@ -604,10 +599,10 @@ view
|
||||
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
|
||||
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-enable <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
|
||||
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> trust-anchor<br>
|
||||
<em class="replaceable"><code>string</code></em> | auto | no );<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>
|
||||
@@ -642,9 +637,11 @@ view
|
||||
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
lame-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
|
||||
lmdb-mapsize <em class="replaceable"><code>sizeval</code></em>;<br>
|
||||
managed-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
managed-keys { <em class="replaceable"><code>string</code></em> (<br>
|
||||
static-key | initial-key<br>
|
||||
) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
|
||||
masterfile-format ( map | raw | text );<br>
|
||||
masterfile-style ( full | relative );<br>
|
||||
match-clients { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@@ -727,11 +724,12 @@ view
|
||||
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
|
||||
<em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
|
||||
<em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
|
||||
disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
|
||||
| tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
|
||||
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
|
||||
<em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
|
||||
<em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
|
||||
nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
|
||||
recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
|
||||
min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
|
||||
nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
|
||||
@@ -793,9 +791,10 @@ view
|
||||
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * )<br>
|
||||
] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
|
||||
trust-anchor-telemetry <em class="replaceable"><code>boolean</code></em>; // experimental<br>
|
||||
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
... };<br>
|
||||
trusted-keys { <em class="replaceable"><code>string</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>integer</code></em><br>
|
||||
<em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
|
||||
try-tcp-refresh <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
@@ -853,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>
|
||||
@@ -873,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>
|
||||
@@ -907,8 +904,7 @@ view
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.22"></a><h2>ZONE</h2>
|
||||
|
||||
<a name="id-1.23"></a><h2>ZONE</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
zone <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
|
||||
allow-notify { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@@ -1007,14 +1003,14 @@ zone
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.23"></a><h2>FILES</h2>
|
||||
<a name="id-1.24"></a><h2>FILES</h2>
|
||||
|
||||
<p><code class="filename">/etc/named.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.24"></a><h2>SEE ALSO</h2>
|
||||
<a name="id-1.25"></a><h2>SEE ALSO</h2>
|
||||
|
||||
<p><span class="citerefentry">
|
||||
<span class="refentrytitle">ddns-confgen</span>(8)
|
||||
|
||||
+130
-248
@@ -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>
|
||||
@@ -47,7 +48,6 @@
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/xml.h>
|
||||
|
||||
#include <isccfg/grammar.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
@@ -106,9 +106,9 @@
|
||||
|
||||
#include <named/config.h>
|
||||
#include <named/control.h>
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
#include <named/geoip.h>
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
#include <named/log.h>
|
||||
#include <named/logconf.h>
|
||||
#include <named/main.h>
|
||||
@@ -700,11 +700,9 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
bool managed, dst_key_t **target, const char **keynamestrp,
|
||||
isc_mem_t *mctx)
|
||||
dstkey_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **target,
|
||||
const char **keynamestrp, isc_mem_t *mctx)
|
||||
{
|
||||
dns_rdataclass_t viewclass;
|
||||
dns_rdata_dnskey_t keystruct;
|
||||
uint32_t flags, proto, alg;
|
||||
const char *keystr, *keynamestr;
|
||||
@@ -729,13 +727,15 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||
*keynamestrp = keynamestr;
|
||||
|
||||
if (managed) {
|
||||
if (*initialp) {
|
||||
const char *initmethod;
|
||||
initmethod = cfg_obj_asstring(cfg_tuple_get(key, "init"));
|
||||
|
||||
if (strcasecmp(initmethod, "initial-key") != 0) {
|
||||
if (strcasecmp(initmethod, "static-key") == 0) {
|
||||
*initialp = false;
|
||||
} else if (strcasecmp(initmethod, "initial-key") != 0) {
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
|
||||
"managed key '%s': "
|
||||
"key '%s': "
|
||||
"invalid initialization method '%s'",
|
||||
keynamestr, initmethod);
|
||||
result = ISC_R_FAILURE;
|
||||
@@ -743,15 +743,12 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
}
|
||||
}
|
||||
|
||||
if (vconfig == NULL)
|
||||
viewclass = dns_rdataclass_in;
|
||||
else {
|
||||
const cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
|
||||
CHECK(named_config_getclass(classobj, dns_rdataclass_in,
|
||||
&viewclass));
|
||||
}
|
||||
keystruct.common.rdclass = viewclass;
|
||||
/*
|
||||
* This function should never be reached for non-IN classes.
|
||||
*/
|
||||
keystruct.common.rdclass = dns_rdataclass_in;
|
||||
keystruct.common.rdtype = dns_rdatatype_dnskey;
|
||||
|
||||
/*
|
||||
* The key data in keystruct is not dynamically allocated.
|
||||
*/
|
||||
@@ -782,10 +779,12 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
|
||||
if ((keystruct.algorithm == DST_ALG_RSASHA1) &&
|
||||
r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
|
||||
{
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"%s key '%s' has a weak exponent",
|
||||
managed ? "managed" : "trusted",
|
||||
"%s '%s' has a weak exponent",
|
||||
*initialp ? "initial-key" : "static-key",
|
||||
keynamestr);
|
||||
}
|
||||
|
||||
CHECK(dns_rdata_fromstruct(NULL,
|
||||
keystruct.common.rdclass,
|
||||
@@ -795,7 +794,7 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
isc_buffer_constinit(&namebuf, keynamestr, strlen(keynamestr));
|
||||
isc_buffer_add(&namebuf, strlen(keynamestr));
|
||||
CHECK(dns_name_fromtext(keyname, &namebuf, dns_rootname, 0, NULL));
|
||||
CHECK(dst_key_fromdns(keyname, viewclass, &rrdatabuf,
|
||||
CHECK(dst_key_fromdns(keyname, dns_rdataclass_in, &rrdatabuf,
|
||||
mctx, &dstkey));
|
||||
|
||||
*target = dstkey;
|
||||
@@ -821,18 +820,19 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
* the memory context to use for allocating memory.
|
||||
*/
|
||||
static isc_result_t
|
||||
process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
dns_keytable_t *secroots, const dns_name_t *keyname_match,
|
||||
dns_resolver_t *resolver, bool managed, isc_mem_t *mctx)
|
||||
process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
|
||||
const dns_name_t *keyname_match, dns_resolver_t *resolver,
|
||||
bool managed, isc_mem_t *mctx)
|
||||
{
|
||||
const dns_name_t *keyname = NULL;
|
||||
const char *keynamestr = NULL;
|
||||
dst_key_t *dstkey = NULL;
|
||||
unsigned int keyalg;
|
||||
isc_result_t result;
|
||||
bool initializing = managed;
|
||||
|
||||
result = dstkey_fromconfig(vconfig, key, managed, &dstkey, &keynamestr,
|
||||
mctx);
|
||||
result = dstkey_fromconfig(key, &initializing,
|
||||
&dstkey, &keynamestr, mctx);
|
||||
|
||||
switch (result) {
|
||||
case ISC_R_SUCCESS:
|
||||
@@ -851,8 +851,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
* but do not prevent any further ones from being processed.
|
||||
*/
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"ignoring %s key for '%s': %s",
|
||||
managed ? "managed" : "trusted",
|
||||
"ignoring %s for '%s': %s",
|
||||
initializing ? "initial-key" : "static-key",
|
||||
keynamestr, isc_result_totext(result));
|
||||
return (ISC_R_SUCCESS);
|
||||
case DST_R_NOCRYPTO:
|
||||
@@ -860,8 +860,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
* Crypto support is not available.
|
||||
*/
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
|
||||
"ignoring %s key for '%s': no crypto support",
|
||||
managed ? "managed" : "trusted",
|
||||
"ignoring %s for '%s': no crypto support",
|
||||
initializing ? "initial-key" : "static-key",
|
||||
keynamestr);
|
||||
return (result);
|
||||
default:
|
||||
@@ -871,8 +871,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
* is interrupted.
|
||||
*/
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
|
||||
"configuring %s key for '%s': %s",
|
||||
managed ? "managed" : "trusted",
|
||||
"configuring %s for '%s': %s",
|
||||
initializing ? "initial-key" : "static-key",
|
||||
keynamestr, isc_result_totext(result));
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
@@ -893,17 +893,21 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
*/
|
||||
if (!dns_resolver_algorithm_supported(resolver, keyname, keyalg)) {
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"ignoring %s key for '%s': algorithm is disabled",
|
||||
managed ? "managed" : "trusted", keynamestr);
|
||||
"ignoring %s for '%s': algorithm is disabled",
|
||||
initializing ? "initial-key" : "static-key",
|
||||
keynamestr);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the key to 'secroots'. This key is taken from the
|
||||
* configuration, so if it's a managed key then it's an initializing
|
||||
* key; that's why 'managed' is duplicated below.
|
||||
* Add the key to 'secroots'. Keys from a "dnssec-keys" or
|
||||
* "managed-keys" statement may be either static or initializing
|
||||
* keys. If it's not initializing, we don't want to treat it as
|
||||
* managed, so we use 'initializing' twice here, for both the
|
||||
* 'managed' and 'initializing' arguments to dns_keytable_add().
|
||||
*/
|
||||
result = dns_keytable_add(secroots, managed, managed, &dstkey);
|
||||
result = dns_keytable_add(secroots, initializing,
|
||||
initializing, &dstkey);
|
||||
|
||||
done:
|
||||
/*
|
||||
@@ -924,8 +928,7 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
|
||||
* an initializing key.
|
||||
*/
|
||||
static isc_result_t
|
||||
load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
|
||||
dns_view_t *view, bool managed,
|
||||
load_view_keys(const cfg_obj_t *keys, dns_view_t *view, bool managed,
|
||||
const dns_name_t *keyname, isc_mem_t *mctx)
|
||||
{
|
||||
const cfg_listelt_t *elt, *elt2;
|
||||
@@ -945,7 +948,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
|
||||
elt2 != NULL;
|
||||
elt2 = cfg_list_next(elt2))
|
||||
{
|
||||
CHECK(process_key(cfg_listelt_value(elt2), vconfig,
|
||||
CHECK(process_key(cfg_listelt_value(elt2),
|
||||
secroots, keyname, view->resolver,
|
||||
managed, mctx));
|
||||
}
|
||||
@@ -999,7 +1002,9 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
const cfg_obj_t *view_keys = NULL;
|
||||
const cfg_obj_t *global_keys = NULL;
|
||||
const cfg_obj_t *view_managed_keys = NULL;
|
||||
const cfg_obj_t *view_dnssec_keys = NULL;
|
||||
const cfg_obj_t *global_managed_keys = NULL;
|
||||
const cfg_obj_t *global_dnssec_keys = NULL;
|
||||
const cfg_obj_t *maps[4];
|
||||
const cfg_obj_t *voptions = NULL;
|
||||
const cfg_obj_t *options = NULL;
|
||||
@@ -1019,15 +1024,24 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
if (voptions != NULL) {
|
||||
(void) cfg_map_get(voptions, "trusted-keys",
|
||||
&view_keys);
|
||||
|
||||
/* managed-keys and dnssec-keys are synonyms. */
|
||||
(void) cfg_map_get(voptions, "managed-keys",
|
||||
&view_managed_keys);
|
||||
(void) cfg_map_get(voptions, "dnssec-keys",
|
||||
&view_dnssec_keys);
|
||||
|
||||
maps[i++] = voptions;
|
||||
}
|
||||
}
|
||||
|
||||
if (config != NULL) {
|
||||
(void)cfg_map_get(config, "trusted-keys", &global_keys);
|
||||
|
||||
/* managed-keys and dnssec-keys are synonyms. */
|
||||
(void)cfg_map_get(config, "managed-keys", &global_managed_keys);
|
||||
(void)cfg_map_get(config, "dnssec-keys", &global_dnssec_keys);
|
||||
|
||||
(void)cfg_map_get(config, "options", &options);
|
||||
if (options != NULL) {
|
||||
maps[i++] = options;
|
||||
@@ -1055,11 +1069,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
|
||||
if (auto_root && view->rdclass == dns_rdataclass_in) {
|
||||
const cfg_obj_t *builtin_keys = NULL;
|
||||
const cfg_obj_t *builtin_managed_keys = NULL;
|
||||
|
||||
/*
|
||||
* If bind.keys exists and is populated, it overrides
|
||||
* the managed-keys clause hard-coded in named_g_config.
|
||||
* the dnssec-keys clause hard-coded in named_g_config.
|
||||
*/
|
||||
if (bindkeys != NULL) {
|
||||
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
|
||||
@@ -1068,13 +1081,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
"from '%s'",
|
||||
view->name, named_g_server->bindkeysfile);
|
||||
|
||||
(void)cfg_map_get(bindkeys, "trusted-keys",
|
||||
(void)cfg_map_get(bindkeys, "dnssec-keys",
|
||||
&builtin_keys);
|
||||
(void)cfg_map_get(bindkeys, "managed-keys",
|
||||
&builtin_managed_keys);
|
||||
|
||||
if ((builtin_keys == NULL) &&
|
||||
(builtin_managed_keys == NULL))
|
||||
if (builtin_keys == NULL) {
|
||||
isc_log_write(named_g_lctx,
|
||||
DNS_LOGCATEGORY_SECURITY,
|
||||
NAMED_LOGMODULE_SERVER,
|
||||
@@ -1082,29 +1092,23 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
"dnssec-validation auto: "
|
||||
"WARNING: root zone key "
|
||||
"not found");
|
||||
}
|
||||
}
|
||||
|
||||
if ((builtin_keys == NULL) &&
|
||||
(builtin_managed_keys == NULL))
|
||||
{
|
||||
if (builtin_keys == NULL) {
|
||||
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"using built-in root key for view %s",
|
||||
view->name);
|
||||
|
||||
(void)cfg_map_get(named_g_config, "trusted-keys",
|
||||
(void)cfg_map_get(named_g_config, "dnssec-keys",
|
||||
&builtin_keys);
|
||||
(void)cfg_map_get(named_g_config, "managed-keys",
|
||||
&builtin_managed_keys);
|
||||
}
|
||||
|
||||
if (builtin_keys != NULL)
|
||||
CHECK(load_view_keys(builtin_keys, vconfig, view,
|
||||
false, dns_rootname, mctx));
|
||||
if (builtin_managed_keys != NULL)
|
||||
CHECK(load_view_keys(builtin_managed_keys, vconfig,
|
||||
view, true, dns_rootname,
|
||||
mctx));
|
||||
if (builtin_keys != NULL) {
|
||||
CHECK(load_view_keys(builtin_keys, view, true,
|
||||
dns_rootname, mctx));
|
||||
}
|
||||
|
||||
if (!keyloaded(view, dns_rootname)) {
|
||||
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
|
||||
@@ -1115,16 +1119,16 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(load_view_keys(view_keys, vconfig, view, false,
|
||||
NULL, mctx));
|
||||
CHECK(load_view_keys(view_managed_keys, vconfig, view, true,
|
||||
NULL, mctx));
|
||||
CHECK(load_view_keys(view_keys, view, false, NULL, mctx));
|
||||
CHECK(load_view_keys(view_managed_keys, view, true, NULL, mctx));
|
||||
CHECK(load_view_keys(view_dnssec_keys, view, true, NULL, mctx));
|
||||
|
||||
if (view->rdclass == dns_rdataclass_in) {
|
||||
CHECK(load_view_keys(global_keys, vconfig, view, false,
|
||||
CHECK(load_view_keys(global_keys, view, false, NULL, mctx));
|
||||
CHECK(load_view_keys(global_managed_keys, view, true,
|
||||
NULL, mctx));
|
||||
CHECK(load_view_keys(global_dnssec_keys, view, true,
|
||||
NULL, mctx));
|
||||
CHECK(load_view_keys(global_managed_keys, vconfig, view,
|
||||
true, NULL, mctx));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1804,7 +1808,6 @@ cache_reusable(dns_view_t *originview, dns_view_t *view,
|
||||
static bool
|
||||
cache_sharable(dns_view_t *originview, dns_view_t *view,
|
||||
bool new_zero_no_soattl,
|
||||
unsigned int new_cleaning_interval,
|
||||
uint64_t new_max_cache_size,
|
||||
uint32_t new_stale_ttl)
|
||||
{
|
||||
@@ -1819,9 +1822,7 @@ cache_sharable(dns_view_t *originview, dns_view_t *view,
|
||||
* Check other cache related parameters that must be consistent among
|
||||
* the sharing views.
|
||||
*/
|
||||
if (dns_cache_getcleaninginterval(originview->cache) !=
|
||||
new_cleaning_interval ||
|
||||
dns_cache_getservestalettl(originview->cache) != new_stale_ttl ||
|
||||
if (dns_cache_getservestalettl(originview->cache) != new_stale_ttl ||
|
||||
dns_cache_getcachesize(originview->cache) != new_max_cache_size) {
|
||||
return (false);
|
||||
}
|
||||
@@ -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;
|
||||
@@ -3800,7 +3792,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
in_port_t port;
|
||||
dns_cache_t *cache = NULL;
|
||||
isc_result_t result;
|
||||
unsigned int cleaning_interval;
|
||||
size_t max_cache_size;
|
||||
uint32_t max_cache_size_percent = 0;
|
||||
size_t max_adb_size;
|
||||
@@ -4014,11 +4005,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
* Obtain configuration parameters that affect the decision of whether
|
||||
* we can reuse/share an existing cache.
|
||||
*/
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "cleaning-interval", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
cleaning_interval = cfg_obj_asuint32(obj) * 60;
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "max-cache-size", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
@@ -4306,8 +4292,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
nsc = cachelist_find(cachelist, cachename, view->rdclass);
|
||||
if (nsc != NULL) {
|
||||
if (!cache_sharable(nsc->primaryview, view, zero_no_soattl,
|
||||
cleaning_interval, max_cache_size,
|
||||
max_stale_ttl))
|
||||
max_cache_size, max_stale_ttl))
|
||||
{
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
@@ -4378,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;
|
||||
@@ -4405,7 +4386,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
CHECK(dns_cache_load(cache));
|
||||
}
|
||||
|
||||
dns_cache_setcleaninginterval(cache, cleaning_interval);
|
||||
dns_cache_setcachesize(cache, max_cache_size);
|
||||
dns_cache_setservestalettl(cache, max_stale_ttl);
|
||||
|
||||
@@ -4633,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;
|
||||
@@ -5223,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".
|
||||
@@ -5803,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);
|
||||
@@ -6864,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;
|
||||
@@ -6995,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;
|
||||
}
|
||||
@@ -7333,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;
|
||||
@@ -7544,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
|
||||
@@ -8036,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,
|
||||
@@ -8269,7 +8182,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
}
|
||||
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
/*
|
||||
* Initialize GeoIP databases from the configured location.
|
||||
* This should happen before configuring any ACLs, so that we
|
||||
@@ -8278,15 +8191,14 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
*/
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "geoip-directory", &obj);
|
||||
if (result == ISC_R_SUCCESS && cfg_obj_isstring(obj)) {
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_isstring(obj)) {
|
||||
char *dir;
|
||||
DE_CONST(cfg_obj_asstring(obj), dir);
|
||||
named_geoip_load(dir);
|
||||
} else {
|
||||
named_geoip_load(NULL);
|
||||
}
|
||||
named_g_aclconfctx->geoip = named_g_geoip;
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
/*
|
||||
* Configure various server options.
|
||||
@@ -9138,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();
|
||||
@@ -9180,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);
|
||||
@@ -9201,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;
|
||||
}
|
||||
@@ -9404,7 +9298,7 @@ view_loaded(void *arg) {
|
||||
"FIPS mode is %s",
|
||||
FIPS_mode() ? "enabled" : "disabled");
|
||||
#endif
|
||||
server->reload_in_progress = false;
|
||||
server->reload_status = NAMED_RELOAD_DONE;
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
|
||||
@@ -9420,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;
|
||||
|
||||
@@ -9489,6 +9381,7 @@ static void
|
||||
run_server(isc_task_t *task, isc_event_t *event) {
|
||||
isc_result_t result;
|
||||
named_server_t *server = (named_server_t *)event->ev_arg;
|
||||
dns_geoip_databases_t *geoip;
|
||||
|
||||
INSIST(task == server->task);
|
||||
|
||||
@@ -9499,25 +9392,19 @@ run_server(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
dns_dispatchmgr_setstats(named_g_dispatchmgr, server->resolverstats);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
|
||||
named_g_taskmgr, named_g_timermgr,
|
||||
named_g_socketmgr,
|
||||
named_g_dispatchmgr,
|
||||
server->task, named_g_udpdisp,
|
||||
named_g_geoip,
|
||||
&server->interfacemgr),
|
||||
"creating interface manager");
|
||||
#if defined(HAVE_GEOIP2)
|
||||
geoip = named_g_geoip;
|
||||
#else
|
||||
geoip = NULL;
|
||||
#endif
|
||||
|
||||
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
|
||||
named_g_taskmgr, named_g_timermgr,
|
||||
named_g_socketmgr,
|
||||
named_g_dispatchmgr,
|
||||
server->task, named_g_udpdisp,
|
||||
NULL,
|
||||
server->task, named_g_udpdisp, geoip,
|
||||
&server->interfacemgr),
|
||||
"creating interface manager");
|
||||
#endif
|
||||
|
||||
CHECKFATAL(isc_timer_create(named_g_timermgr, isc_timertype_inactive,
|
||||
NULL, NULL, server->task,
|
||||
@@ -9639,9 +9526,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
|
||||
#ifdef HAVE_DNSTAP
|
||||
dns_dt_shutdown();
|
||||
#endif
|
||||
#ifdef HAVE_GEOIP
|
||||
dns_geoip_shutdown();
|
||||
#endif
|
||||
#if defined(HAVE_GEOIP2)
|
||||
named_geoip_shutdown();
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
dns_db_detach(&server->in_roothints);
|
||||
|
||||
@@ -9740,7 +9627,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
CHECKFATAL(server->reload_event == NULL ?
|
||||
ISC_R_NOMEMORY : ISC_R_SUCCESS,
|
||||
"allocating reload event");
|
||||
server->reload_in_progress = true;
|
||||
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
|
||||
|
||||
/*
|
||||
* Setup the server task, which is responsible for coordinating
|
||||
@@ -9757,14 +9644,14 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
&server->sctx),
|
||||
"creating server context");
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
/*
|
||||
* GeoIP must be initialized before the interface
|
||||
* manager (which includes the ACL environment)
|
||||
* is created
|
||||
*/
|
||||
named_geoip_init();
|
||||
#endif
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
#ifdef ENABLE_AFL
|
||||
server->sctx->fuzztype = named_g_fuzz_type;
|
||||
@@ -9979,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;
|
||||
@@ -10044,6 +9927,7 @@ loadconfig(named_server_t *server) {
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"reloading configuration failed: %s",
|
||||
isc_result_totext(result));
|
||||
server->reload_status = NAMED_RELOAD_FAILED;
|
||||
}
|
||||
|
||||
return (result);
|
||||
@@ -10052,20 +9936,21 @@ loadconfig(named_server_t *server) {
|
||||
static isc_result_t
|
||||
reload(named_server_t *server) {
|
||||
isc_result_t result;
|
||||
server->reload_in_progress = true;
|
||||
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
|
||||
CHECK(loadconfig(server));
|
||||
|
||||
result = load_zones(server, false, false);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"reloading zones succeeded");
|
||||
else
|
||||
} else {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"reloading zones failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
server->reload_status = NAMED_RELOAD_FAILED;
|
||||
}
|
||||
cleanup:
|
||||
return (result);
|
||||
}
|
||||
@@ -10399,20 +10284,22 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
|
||||
isc_result_t
|
||||
named_server_reconfigcommand(named_server_t *server) {
|
||||
isc_result_t result;
|
||||
server->reload_in_progress = true;
|
||||
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
|
||||
|
||||
CHECK(loadconfig(server));
|
||||
|
||||
result = load_zones(server, false, true);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"scheduled loading new zones");
|
||||
else
|
||||
} else {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"loading new zones failed: %s",
|
||||
isc_result_totext(result));
|
||||
server->reload_status = NAMED_RELOAD_FAILED;
|
||||
}
|
||||
cleanup:
|
||||
return (result);
|
||||
}
|
||||
@@ -10652,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);
|
||||
@@ -10676,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);
|
||||
@@ -10870,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;
|
||||
@@ -11546,8 +11427,11 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
isc_quota_getmax(&server->sctx->tcpquota));
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
if (server->reload_in_progress) {
|
||||
CHECK(putstr(text, "reload/reconfig in progress"));
|
||||
if (server->reload_status != NAMED_RELOAD_DONE) {
|
||||
snprintf(line, sizeof(line), "reload/reconfig %s\n",
|
||||
server->reload_status == NAMED_RELOAD_FAILED
|
||||
? "failed" : "in progress");
|
||||
CHECK(putstr(text, line));
|
||||
}
|
||||
|
||||
CHECK(putstr(text, "server is up and running"));
|
||||
@@ -11604,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) {
|
||||
@@ -11720,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) {
|
||||
@@ -13675,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;
|
||||
|
||||
+203
-39
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/httpd.h>
|
||||
#include <isc/json.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
@@ -43,6 +42,16 @@
|
||||
#include <named/server.h>
|
||||
#include <named/statschannel.h>
|
||||
|
||||
#if HAVE_JSON_C
|
||||
#include <json_object.h>
|
||||
#include <linkhash.h>
|
||||
#endif /* HAVE_JSON_C */
|
||||
|
||||
#if HAVE_LIBXML2
|
||||
#include <libxml/xmlwriter.h>
|
||||
#define ISC_XMLCHAR (const xmlChar *)
|
||||
#endif /* HAVE_LIBXML2 */
|
||||
|
||||
#include "bind9.xsl.h"
|
||||
|
||||
struct named_statschannel {
|
||||
@@ -74,7 +83,7 @@ stats_dumparg {
|
||||
|
||||
static isc_once_t once = ISC_ONCE_INIT;
|
||||
|
||||
#if defined(HAVE_LIBXML2) || defined(HAVE_JSON)
|
||||
#if defined(HAVE_LIBXML2) || defined(HAVE_JSON_C)
|
||||
#define EXTENDED_STATS
|
||||
#else
|
||||
#undef EXTENDED_STATS
|
||||
@@ -1067,10 +1076,10 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
|
||||
stats_dumparg_t dumparg;
|
||||
FILE *fp;
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlTextWriterPtr writer;
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *job, *cat, *counter;
|
||||
#endif
|
||||
|
||||
@@ -1086,7 +1095,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
|
||||
memset(values, 0, sizeof(values[0]) * ncounters);
|
||||
isc_stats_dump(stats, generalstat_dump, &dumparg, options);
|
||||
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
cat = job = (json_object *) arg;
|
||||
if (ncounters > 0 && type == isc_statsformat_json) {
|
||||
if (category != NULL) {
|
||||
@@ -1113,7 +1122,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
|
||||
break;
|
||||
case isc_statsformat_xml:
|
||||
#ifdef HAVE_LIBXML2
|
||||
writer = (xmlTextWriterPtr) arg;
|
||||
writer = arg;
|
||||
|
||||
if (category != NULL) {
|
||||
/* <NameOfCategory> */
|
||||
@@ -1161,7 +1170,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
counter = json_object_new_int64(value);
|
||||
if (counter == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
@@ -1187,10 +1196,10 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
stats_dumparg_t *dumparg = arg;
|
||||
FILE *fp;
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlTextWriterPtr writer;
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *zoneobj, *obj;
|
||||
#endif
|
||||
|
||||
@@ -1224,7 +1233,7 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
zoneobj = (json_object *) dumparg->arg;
|
||||
obj = json_object_new_int64(val);
|
||||
if (obj == NULL)
|
||||
@@ -1244,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;
|
||||
@@ -1252,11 +1267,12 @@ 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
|
||||
xmlTextWriterPtr writer;
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *zoneobj, *obj;
|
||||
char buf[1024];
|
||||
#endif
|
||||
@@ -1273,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
|
||||
@@ -1293,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 */
|
||||
@@ -1308,9 +1322,9 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_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)
|
||||
@@ -1337,10 +1351,10 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
|
||||
char codebuf[64];
|
||||
stats_dumparg_t *dumparg = arg;
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlTextWriterPtr writer;
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *zoneobj, *obj;
|
||||
#endif
|
||||
|
||||
@@ -1366,7 +1380,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
zoneobj = (json_object *) dumparg->arg;
|
||||
obj = json_object_new_int64(val);
|
||||
if (obj == NULL)
|
||||
@@ -1394,10 +1408,10 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
|
||||
char codebuf[64];
|
||||
stats_dumparg_t *dumparg = arg;
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlTextWriterPtr writer;
|
||||
void *writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *zoneobj, *obj;
|
||||
#endif
|
||||
|
||||
@@ -1423,7 +1437,7 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
zoneobj = (json_object *) dumparg->arg;
|
||||
obj = json_object_new_int64(val);
|
||||
if (obj == NULL)
|
||||
@@ -1444,6 +1458,62 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(EXTENDED_STATS)
|
||||
static void
|
||||
dnssecsignstat_dump(dns_keytag_t tag, uint64_t val, void *arg) {
|
||||
FILE *fp;
|
||||
char tagbuf[64];
|
||||
stats_dumparg_t *dumparg = arg;
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlTextWriterPtr writer;
|
||||
int xmlrc;
|
||||
#endif
|
||||
#ifdef HAVE_JSON_C
|
||||
json_object *zoneobj, *obj;
|
||||
#endif
|
||||
|
||||
snprintf(tagbuf, sizeof(tagbuf), "%u", tag);
|
||||
|
||||
switch (dumparg->type) {
|
||||
case isc_statsformat_file:
|
||||
fp = dumparg->arg;
|
||||
fprintf(fp, "%20" PRIu64 " %s\n", val, tagbuf);
|
||||
break;
|
||||
case isc_statsformat_xml:
|
||||
#ifdef HAVE_LIBXML2
|
||||
writer = dumparg->arg;
|
||||
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter"));
|
||||
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
|
||||
ISC_XMLCHAR tagbuf ));
|
||||
TRY0(xmlTextWriterWriteFormatString(writer,
|
||||
"%" PRIu64,
|
||||
val));
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* counter */
|
||||
#endif
|
||||
break;
|
||||
case isc_statsformat_json:
|
||||
#ifdef HAVE_JSON_C
|
||||
zoneobj = (json_object *) dumparg->arg;
|
||||
obj = json_object_new_int64(val);
|
||||
if (obj == NULL) {
|
||||
return;
|
||||
}
|
||||
json_object_object_add(zoneobj, tagbuf, obj);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return;
|
||||
#ifdef HAVE_LIBXML2
|
||||
error:
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"failed at dnssecsignstat_dump()");
|
||||
dumparg->result = ISC_R_FAILURE;
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
#endif /* defined(EXTENDED_STATS) */
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
/*
|
||||
* Which statistics to include when rendering to XML
|
||||
@@ -1506,6 +1576,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
|
||||
isc_stats_t *zonestats;
|
||||
isc_stats_t *gluecachestats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_stats_t *dnssecsignstats;
|
||||
dns_stats_t *dnssecrefreshstats;
|
||||
uint64_t nsstat_values[ns_statscounter_max];
|
||||
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
|
||||
|
||||
@@ -1533,8 +1605,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
|
||||
TRY0(xmlTextWriterStartElement(writer,
|
||||
ISC_XMLCHAR "counters"));
|
||||
TRY0(xmlTextWriterWriteAttribute(writer,
|
||||
ISC_XMLCHAR "type",
|
||||
ISC_XMLCHAR "gluecache"));
|
||||
ISC_XMLCHAR "type",
|
||||
ISC_XMLCHAR "gluecache"));
|
||||
|
||||
result = dump_counters(gluecachestats,
|
||||
isc_statsformat_xml,
|
||||
@@ -1567,6 +1639,46 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
|
||||
/* counters type="qtype"*/
|
||||
TRY0(xmlTextWriterEndElement(writer));
|
||||
}
|
||||
|
||||
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
|
||||
if (dnssecsignstats != NULL) {
|
||||
TRY0(xmlTextWriterStartElement(writer,
|
||||
ISC_XMLCHAR "counters"));
|
||||
TRY0(xmlTextWriterWriteAttribute(writer,
|
||||
ISC_XMLCHAR "type",
|
||||
ISC_XMLCHAR "dnssec-sign"));
|
||||
|
||||
dumparg.result = ISC_R_SUCCESS;
|
||||
dns_dnssecsignstats_dump(dnssecsignstats,
|
||||
dnssecsignstat_dump,
|
||||
&dumparg, 0);
|
||||
if(dumparg.result != ISC_R_SUCCESS) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* counters type="dnssec-sign"*/
|
||||
TRY0(xmlTextWriterEndElement(writer));
|
||||
}
|
||||
|
||||
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
|
||||
if (dnssecrefreshstats != NULL) {
|
||||
TRY0(xmlTextWriterStartElement(writer,
|
||||
ISC_XMLCHAR "counters"));
|
||||
TRY0(xmlTextWriterWriteAttribute(writer,
|
||||
ISC_XMLCHAR "type",
|
||||
ISC_XMLCHAR "dnssec-refresh"));
|
||||
|
||||
dumparg.result = ISC_R_SUCCESS;
|
||||
dns_dnssecsignstats_dump(dnssecrefreshstats,
|
||||
dnssecsignstat_dump,
|
||||
&dumparg, 0);
|
||||
if(dumparg.result != ISC_R_SUCCESS) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* counters type="dnssec-refresh"*/
|
||||
TRY0(xmlTextWriterEndElement(writer));
|
||||
}
|
||||
}
|
||||
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* zone */
|
||||
@@ -2195,7 +2307,7 @@ render_xml_traffic(const char *url, isc_httpdurl_t *urlinfo,
|
||||
|
||||
#endif /* HAVE_LIBXML2 */
|
||||
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
/*
|
||||
* Which statistics to include when rendering to JSON
|
||||
*/
|
||||
@@ -2287,6 +2399,8 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
|
||||
isc_stats_t *zonestats;
|
||||
isc_stats_t *gluecachestats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_stats_t *dnssecsignstats;
|
||||
dns_stats_t *dnssecrefreshstats;
|
||||
uint64_t nsstat_values[ns_statscounter_max];
|
||||
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
|
||||
|
||||
@@ -2364,6 +2478,58 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
|
||||
else
|
||||
json_object_put(counters);
|
||||
}
|
||||
|
||||
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
|
||||
if (dnssecsignstats != NULL) {
|
||||
stats_dumparg_t dumparg;
|
||||
json_object *counters = json_object_new_object();
|
||||
CHECKMEM(counters);
|
||||
|
||||
dumparg.type = isc_statsformat_json;
|
||||
dumparg.arg = counters;
|
||||
dumparg.result = ISC_R_SUCCESS;
|
||||
dns_dnssecsignstats_dump(dnssecsignstats,
|
||||
dnssecsignstat_dump,
|
||||
&dumparg, 0);
|
||||
if (dumparg.result != ISC_R_SUCCESS) {
|
||||
json_object_put(counters);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (json_object_get_object(counters)->count != 0) {
|
||||
json_object_object_add(zoneobj,
|
||||
"dnssec-sign",
|
||||
counters);
|
||||
} else {
|
||||
json_object_put(counters);
|
||||
}
|
||||
}
|
||||
|
||||
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
|
||||
if (dnssecrefreshstats != NULL) {
|
||||
stats_dumparg_t dumparg;
|
||||
json_object *counters = json_object_new_object();
|
||||
CHECKMEM(counters);
|
||||
|
||||
dumparg.type = isc_statsformat_json;
|
||||
dumparg.arg = counters;
|
||||
dumparg.result = ISC_R_SUCCESS;
|
||||
dns_dnssecsignstats_dump(dnssecrefreshstats,
|
||||
dnssecsignstat_dump,
|
||||
&dumparg, 0);
|
||||
if (dumparg.result != ISC_R_SUCCESS) {
|
||||
json_object_put(counters);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (json_object_get_object(counters)->count != 0) {
|
||||
json_object_object_add(zoneobj,
|
||||
"dnssec-refresh",
|
||||
counters);
|
||||
} else {
|
||||
json_object_put(counters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
json_object_array_add(zonearray, zoneobj);
|
||||
@@ -3098,7 +3264,7 @@ render_json_traffic(const char *url, isc_httpdurl_t *urlinfo,
|
||||
freecb, freecb_args));
|
||||
}
|
||||
|
||||
#endif /* HAVE_JSON */
|
||||
#endif /* HAVE_JSON_C */
|
||||
|
||||
static isc_result_t
|
||||
render_xsl(const char *url, isc_httpdurl_t *urlinfo,
|
||||
@@ -3242,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;
|
||||
@@ -3314,7 +3478,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
|
||||
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/traffic",
|
||||
render_xml_traffic, server);
|
||||
#endif
|
||||
#ifdef HAVE_JSON
|
||||
#ifdef HAVE_JSON_C
|
||||
isc_httpdmgr_addurl(listener->httpdmgr, "/json",
|
||||
render_json_all, server);
|
||||
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1",
|
||||
@@ -3449,12 +3613,12 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
|
||||
"statistics-channels: XML library missing, "
|
||||
"only JSON stats will be available");
|
||||
#endif /* !HAVE_LIBXML2 */
|
||||
#ifndef HAVE_JSON
|
||||
#ifndef HAVE_JSON_C
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"statistics-channels: JSON library missing, "
|
||||
"only XML stats will be available");
|
||||
#endif /* !HAVE_JSON */
|
||||
#endif /* !HAVE_JSON_C */
|
||||
#endif /* EXTENDED_STATS */
|
||||
|
||||
for (element = cfg_list_first(statschannellist);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -15,7 +15,8 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
|
||||
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+20
-27
@@ -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')
|
||||
@@ -904,6 +887,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
const dns_master_style_t *masterstyle = &dns_master_style_default;
|
||||
isc_stats_t *zoneqrystats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_stats_t *dnssecsignstats;
|
||||
dns_stats_t *dnssecrefreshstats;
|
||||
dns_zonestat_level_t statlevel = dns_zonestat_none;
|
||||
int seconds;
|
||||
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
|
||||
@@ -978,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);
|
||||
}
|
||||
|
||||
@@ -994,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);
|
||||
@@ -1096,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,
|
||||
@@ -1188,14 +1168,19 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
|
||||
zoneqrystats = NULL;
|
||||
rcvquerystats = NULL;
|
||||
dnssecsignstats = NULL;
|
||||
dnssecrefreshstats = NULL;
|
||||
if (statlevel == dns_zonestat_full) {
|
||||
RETERR(isc_stats_create(mctx, &zoneqrystats,
|
||||
ns_statscounter_max));
|
||||
RETERR(dns_rdatatypestats_create(mctx,
|
||||
&rcvquerystats));
|
||||
RETERR(dns_rdatatypestats_create(mctx, &rcvquerystats));
|
||||
RETERR(dns_dnssecsignstats_create(mctx, &dnssecsignstats));
|
||||
RETERR(dns_dnssecsignstats_create(mctx, &dnssecrefreshstats));
|
||||
}
|
||||
dns_zone_setrequeststats(zone, zoneqrystats);
|
||||
dns_zone_setrcvquerystats(zone, rcvquerystats);
|
||||
dns_zone_setdnssecsignstats(zone, dnssecsignstats);
|
||||
dns_zone_setdnssecrefreshstats(zone, dnssecrefreshstats);
|
||||
|
||||
if (zoneqrystats != NULL)
|
||||
isc_stats_detach(&zoneqrystats);
|
||||
@@ -1203,6 +1188,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
if(rcvquerystats != NULL)
|
||||
dns_stats_detach(&rcvquerystats);
|
||||
|
||||
if(dnssecsignstats != NULL) {
|
||||
dns_stats_detach(&dnssecsignstats);
|
||||
}
|
||||
|
||||
if(dnssecrefreshstats != NULL) {
|
||||
dns_stats_detach(&dnssecrefreshstats);
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure master functionality. This applies
|
||||
* to primary masters (type "master") and slaves
|
||||
|
||||
@@ -21,15 +21,15 @@ DST_GSSAPI_INC = @DST_GSSAPI_INC@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${IRS_INCLUDES} ${DST_GSSAPI_INC} \
|
||||
@OPENSSL_INCLUDES@
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
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}
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
|
||||
+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;
|
||||
|
||||
@@ -17,7 +17,7 @@ CINCLUDES = ${ISC_INCLUDES}
|
||||
|
||||
CDEFINES =
|
||||
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${NS_INCLUDES} ${DNS_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${ISC_INCLUDES}
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
LIBS =
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
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}
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
+8
-8
@@ -284,7 +284,7 @@ maintain, and also requires the zone to be configured to allow dynamic DNS\&. (S
|
||||
.PP
|
||||
\fBmanaged\-keys \fR\fB\fI(status | refresh | sync | destroy)\fR\fR\fB \fR\fB[\fIclass\fR [\fIview\fR]]\fR
|
||||
.RS 4
|
||||
Inspect and control the "managed\-keys" database which handles RFC 5011 DNSSEC trust anchor maintenance\&. If a view is specified, these commands are applied to that view; otherwise they are applied to all views\&.
|
||||
Inspect and control the "managed keys" database which handles RFC 5011 DNSSEC trust anchor maintenance\&. If a view is specified, these commands are applied to that view; otherwise they are applied to all views\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@@ -296,7 +296,7 @@ Inspect and control the "managed\-keys" database which handles RFC 5011 DNSSEC t
|
||||
.\}
|
||||
When run with the
|
||||
status
|
||||
keyword, prints the current status of the managed\-keys database\&.
|
||||
keyword, prints the current status of the managed keys database\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@@ -309,7 +309,7 @@ keyword, prints the current status of the managed\-keys database\&.
|
||||
.\}
|
||||
When run with the
|
||||
refresh
|
||||
keyword, forces an immediate refresh query to be sent for all the managed keys, updating the managed\-keys database if any new keys are found, without waiting the normal refresh interval\&.
|
||||
keyword, forces an immediate refresh query to be sent for all the managed keys, updating the managed keys database if any new keys are found, without waiting the normal refresh interval\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@@ -322,7 +322,7 @@ keyword, forces an immediate refresh query to be sent for all the managed keys,
|
||||
.\}
|
||||
When run with the
|
||||
sync
|
||||
keyword, forces an immediate dump of the managed\-keys database to disk (in the file
|
||||
keyword, forces an immediate dump of the managed keys database to disk (in the file
|
||||
managed\-keys\&.bind
|
||||
or (\fIviewname\fR\&.mkeys)\&. This synchronizes the database with its journal file, so that the database\*(Aqs current contents can be inspected visually\&.
|
||||
.RE
|
||||
@@ -337,7 +337,7 @@ or (\fIviewname\fR\&.mkeys)\&. This synchronizes the database with its journal f
|
||||
.\}
|
||||
When run with the
|
||||
destroy
|
||||
keyword, the managed\-keys database is shut down and deleted, and all key maintenance is terminated\&. This command should be used only with extreme caution\&.
|
||||
keyword, the managed keys database is shut down and deleted, and all key maintenance is terminated\&. This command should be used only with extreme caution\&.
|
||||
.sp
|
||||
Existing keys that are already trusted are not deleted from memory; DNSSEC validation can continue after this command is used\&. However, key maintenance operations will cease until
|
||||
\fBnamed\fR
|
||||
@@ -515,8 +515,8 @@ timer\&.
|
||||
\fBsecroots \fR\fB[\-]\fR\fB \fR\fB[\fIview \&.\&.\&.\fR]\fR
|
||||
.RS 4
|
||||
Dump the security roots (i\&.e\&., trust anchors configured via
|
||||
\fBtrusted\-keys\fR,
|
||||
\fBmanaged\-keys\fR, or
|
||||
\fBdnssec\-keys\fR
|
||||
statements, or the managed\-keys or trusted\-keys statements (both deprecated), or via
|
||||
\fBdnssec\-validation auto\fR) and negative trust anchors for the specified views\&. If no view is specified, all views are dumped\&. Security roots will indicate whether they are configured as trusted keys, managed keys, or initializing managed keys (managed keys that have not yet been updated by a successful key refresh query)\&.
|
||||
.sp
|
||||
If the first argument is "\-", then the output is returned via the
|
||||
@@ -697,7 +697,7 @@ Delete a given TKEY\-negotiated key from the server\&. (This does not apply to s
|
||||
.RS 4
|
||||
List the names of all TSIG keys currently configured for use by
|
||||
\fBnamed\fR
|
||||
in each view\&. The list both statically configured keys and dynamic TKEY\-negotiated keys\&.
|
||||
in each view\&. The list includes both statically configured keys and dynamic TKEY\-negotiated keys\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBvalidation ( on | off | status ) \fR\fB[\fIview \&.\&.\&.\fR]\fR\fB \fR
|
||||
|
||||
+2
-4
@@ -278,7 +278,7 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) {
|
||||
if (sends == 0 && recvs == 0) {
|
||||
isc_socket_detach(&sock);
|
||||
isc_task_shutdown(task);
|
||||
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
|
||||
isc_app_shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
|
||||
if (sends == 0 && recvs == 0) {
|
||||
isc_socket_detach(&sock);
|
||||
isc_task_shutdown(task);
|
||||
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
|
||||
isc_app_shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
<term><userinput>managed-keys <replaceable>(status | refresh | sync | destroy)</replaceable> <optional><replaceable>class</replaceable> <optional><replaceable>view</replaceable></optional></optional></userinput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Inspect and control the "managed-keys" database which
|
||||
Inspect and control the "managed keys" database which
|
||||
handles RFC 5011 DNSSEC trust anchor maintenance. If a view
|
||||
is specified, these commands are applied to that view;
|
||||
otherwise they are applied to all views.
|
||||
@@ -467,14 +467,14 @@
|
||||
<listitem>
|
||||
<para>
|
||||
When run with the <literal>status</literal> keyword, prints
|
||||
the current status of the managed-keys database.
|
||||
the current status of the managed keys database.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
When run with the <literal>refresh</literal> keyword,
|
||||
forces an immediate refresh query to be sent for all
|
||||
the managed keys, updating the managed-keys database
|
||||
the managed keys, updating the managed keys database
|
||||
if any new keys are found, without waiting the normal
|
||||
refresh interval.
|
||||
</para>
|
||||
@@ -482,7 +482,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
When run with the <literal>sync</literal> keyword, forces an
|
||||
immediate dump of the managed-keys database to disk
|
||||
immediate dump of the managed keys database to disk
|
||||
(in the file <filename>managed-keys.bind</filename> or
|
||||
(<filename><replaceable>viewname</replaceable>.mkeys</filename>).
|
||||
This synchronizes the database with its journal file, so
|
||||
@@ -493,7 +493,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
When run with the <literal>destroy</literal> keyword, the
|
||||
managed-keys database is shut down and deleted, and all key
|
||||
managed keys database is shut down and deleted, and all key
|
||||
maintenance is terminated. This command should be used only
|
||||
with extreme caution.
|
||||
</para>
|
||||
@@ -772,9 +772,9 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Dump the security roots (i.e., trust anchors
|
||||
configured via <command>trusted-keys</command>,
|
||||
<command>managed-keys</command>, or
|
||||
<command>dnssec-validation auto</command>) and negative trust
|
||||
configured via <command>dnssec-keys</command> statements, or the
|
||||
managed-keys or trusted-keys statements (both deprecated), or
|
||||
via <command>dnssec-validation auto</command>) and negative trust
|
||||
anchors for the specified views. If no view is specified, all
|
||||
views are dumped. Security roots will indicate whether
|
||||
they are configured as trusted keys, managed keys, or
|
||||
@@ -1066,7 +1066,7 @@
|
||||
<para>
|
||||
List the names of all TSIG keys currently configured
|
||||
for use by <command>named</command> in each view. The
|
||||
list both statically configured keys and dynamic
|
||||
list includes both statically configured keys and dynamic
|
||||
TKEY-negotiated keys.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
+9
-9
@@ -378,7 +378,7 @@
|
||||
<dt><span class="term"><strong class="userinput"><code>managed-keys <em class="replaceable"><code>(status | refresh | sync | destroy)</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em> [<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Inspect and control the "managed-keys" database which
|
||||
Inspect and control the "managed keys" database which
|
||||
handles RFC 5011 DNSSEC trust anchor maintenance. If a view
|
||||
is specified, these commands are applied to that view;
|
||||
otherwise they are applied to all views.
|
||||
@@ -387,14 +387,14 @@
|
||||
<li class="listitem">
|
||||
<p>
|
||||
When run with the <code class="literal">status</code> keyword, prints
|
||||
the current status of the managed-keys database.
|
||||
the current status of the managed keys database.
|
||||
</p>
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<p>
|
||||
When run with the <code class="literal">refresh</code> keyword,
|
||||
forces an immediate refresh query to be sent for all
|
||||
the managed keys, updating the managed-keys database
|
||||
the managed keys, updating the managed keys database
|
||||
if any new keys are found, without waiting the normal
|
||||
refresh interval.
|
||||
</p>
|
||||
@@ -402,7 +402,7 @@
|
||||
<li class="listitem">
|
||||
<p>
|
||||
When run with the <code class="literal">sync</code> keyword, forces an
|
||||
immediate dump of the managed-keys database to disk
|
||||
immediate dump of the managed keys database to disk
|
||||
(in the file <code class="filename">managed-keys.bind</code> or
|
||||
(<code class="filename"><em class="replaceable"><code>viewname</code></em>.mkeys</code>).
|
||||
This synchronizes the database with its journal file, so
|
||||
@@ -413,7 +413,7 @@
|
||||
<li class="listitem">
|
||||
<p>
|
||||
When run with the <code class="literal">destroy</code> keyword, the
|
||||
managed-keys database is shut down and deleted, and all key
|
||||
managed keys database is shut down and deleted, and all key
|
||||
maintenance is terminated. This command should be used only
|
||||
with extreme caution.
|
||||
</p>
|
||||
@@ -653,9 +653,9 @@
|
||||
<dd>
|
||||
<p>
|
||||
Dump the security roots (i.e., trust anchors
|
||||
configured via <span class="command"><strong>trusted-keys</strong></span>,
|
||||
<span class="command"><strong>managed-keys</strong></span>, or
|
||||
<span class="command"><strong>dnssec-validation auto</strong></span>) and negative trust
|
||||
configured via <span class="command"><strong>dnssec-keys</strong></span> statements, or the
|
||||
managed-keys or trusted-keys statements (both deprecated), or
|
||||
via <span class="command"><strong>dnssec-validation auto</strong></span>) and negative trust
|
||||
anchors for the specified views. If no view is specified, all
|
||||
views are dumped. Security roots will indicate whether
|
||||
they are configured as trusted keys, managed keys, or
|
||||
@@ -905,7 +905,7 @@
|
||||
<p>
|
||||
List the names of all TSIG keys currently configured
|
||||
for use by <span class="command"><strong>named</strong></span> in each view. The
|
||||
list both statically configured keys and dynamic
|
||||
list includes both statically configured keys and dynamic
|
||||
TKEY-negotiated keys.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
@@ -14,15 +14,15 @@ top_srcdir = @top_srcdir@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
@OPENSSL_INCLUDES@
|
||||
${OPENSSL_CFLAGS}
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
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}
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
|
||||
+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);
|
||||
|
||||
|
||||
@@ -174,7 +174,6 @@ options {
|
||||
files 230;
|
||||
max-cache-size 1m;
|
||||
stacksize 231;
|
||||
cleaning-interval 1000;
|
||||
heartbeat-interval 1001;
|
||||
interface-interval 1002;
|
||||
statistics-interval 1003;
|
||||
@@ -260,8 +259,8 @@ key "non-viewkey" { secret "YWFh" ; algorithm "zzz" ; };
|
||||
view "test-view" in {
|
||||
key "viewkey" { algorithm "xxx" ; secret "eXl5" ; };
|
||||
also-notify { 10.2.2.3; };
|
||||
trusted-keys {
|
||||
foo.com. 4 3 2 "abdefghijklmnopqrstuvwxyz";
|
||||
managed-keys {
|
||||
foo.com. static 4 3 2 "abdefghijklmnopqrstuvwxyz";
|
||||
};
|
||||
sig-validity-interval 45;
|
||||
max-cache-size 100000;
|
||||
@@ -285,7 +284,6 @@ view "test-view" in {
|
||||
query-source-v6 address 6:6:6:6:6:6:6:6 port *;
|
||||
max-transfer-time-out 45;
|
||||
max-transfer-idle-out 55;
|
||||
cleaning-interval 100;
|
||||
min-roots 3;
|
||||
lame-ttl 477;
|
||||
max-ncache-ttl 333;
|
||||
@@ -344,8 +342,8 @@ zone "." {
|
||||
// pubkey 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
"." 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
|
||||
managed-keys {
|
||||
"." static 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
|
||||
};
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user