Compare commits
517
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2224022297 | ||
|
|
f812ef5f44 | ||
|
|
c945a0c1db | ||
|
|
31775074b7 | ||
|
|
d66a9a9b9a | ||
|
|
6045adbd1a | ||
|
|
23c2b14064 | ||
|
|
18aa38610f | ||
|
|
1a1e550f94 | ||
|
|
5369bbe6e6 | ||
|
|
24103171ca | ||
|
|
d6bd7bb9af | ||
|
|
049d8a311b | ||
|
|
7468036226 | ||
|
|
0283ab7512 | ||
|
|
7fc92bee0c | ||
|
|
6a7e805796 | ||
|
|
38e10a8201 | ||
|
|
e87a180187 | ||
|
|
34bacac31e | ||
|
|
04c8c43f09 | ||
|
|
97041a38a7 | ||
|
|
212db50edd | ||
|
|
2c494feee6 | ||
|
|
ec799c667d | ||
|
|
a25668a58b | ||
|
|
93b3964bc1 | ||
|
|
8573a1d752 | ||
|
|
41bb9505d4 | ||
|
|
e20eb63a6d | ||
|
|
bbb55191c5 | ||
|
|
0c6b4f7285 | ||
|
|
5246f6ecaa | ||
|
|
e8ce85d073 | ||
|
|
11b4bd4d7e | ||
|
|
3d839809c9 | ||
|
|
6b3eef02c5 | ||
|
|
a049ce872f | ||
|
|
09fc9d4f87 | ||
|
|
9ea8ff424a | ||
|
|
e79362eaee | ||
|
|
efaa857219 | ||
|
|
22a40323b0 | ||
|
|
0612da5d5d | ||
|
|
5324e332c5 | ||
|
|
8c1c47b22b | ||
|
|
32e5035ddb | ||
|
|
e98921fd8d | ||
|
|
aff3391656 | ||
|
|
019c5f3d12 | ||
|
|
7c963d0fc4 | ||
|
|
79765491c0 | ||
|
|
1f9eb50f56 | ||
|
|
add9625713 | ||
|
|
4906e9cb9a | ||
|
|
de65b8f0f8 | ||
|
|
095cfa32a3 | ||
|
|
5de88e29f8 | ||
|
|
5f777e6a49 | ||
|
|
b0c7a44744 | ||
|
|
84c8c26ae4 | ||
|
|
adf5b60e50 | ||
|
|
5a70336065 | ||
|
|
1c6ce19e1b | ||
|
|
878dfb1e52 | ||
|
|
488656375c | ||
|
|
931357d801 | ||
|
|
14d4968f78 | ||
|
|
aa54cc407f | ||
|
|
4f23a48449 | ||
|
|
a4946bfd23 | ||
|
|
7e8884e2e3 | ||
|
|
b9820ec727 | ||
|
|
87b7562bfb | ||
|
|
1d0bb1de10 | ||
|
|
a0621b51d8 | ||
|
|
bd501abaa6 | ||
|
|
8d2ae614e4 | ||
|
|
639bdf24c7 | ||
|
|
929ee132fc | ||
|
|
823c7babf8 | ||
|
|
6e058ea035 | ||
|
|
4e0e7e2f24 | ||
|
|
60177eb292 | ||
|
|
b65b268fde | ||
|
|
9a957fef40 | ||
|
|
9c374db434 | ||
|
|
e3afb5c619 | ||
|
|
a86cf8eef6 | ||
|
|
535cf4b1aa | ||
|
|
0c65d9dc3a | ||
|
|
f9649f0529 | ||
|
|
f33d9a825f | ||
|
|
023b44a921 | ||
|
|
65ece077c2 | ||
|
|
9c3c0c463f | ||
|
|
0fc89e0f9f | ||
|
|
d19507416d | ||
|
|
4a889d5fe3 | ||
|
|
8da63b7e7b | ||
|
|
5dda2cfca7 | ||
|
|
95c2595194 | ||
|
|
b6d11230b2 | ||
|
|
dddc16d1d5 | ||
|
|
40b2ebc9c7 | ||
|
|
60d0da833b | ||
|
|
8b29a7cbf4 | ||
|
|
668fce4f79 | ||
|
|
630d05e920 | ||
|
|
e726515e03 | ||
|
|
6ca95b5478 | ||
|
|
b7a14300d8 | ||
|
|
d0181cb97d | ||
|
|
09b95b399e | ||
|
|
7273a5fa98 | ||
|
|
93063a0d3a | ||
|
|
53683aeed5 | ||
|
|
8464fef786 | ||
|
|
2a569ef9e4 | ||
|
|
30c9068714 | ||
|
|
909651afe6 | ||
|
|
0f5871e0fa | ||
|
|
e1823c5240 | ||
|
|
eeb0747efa | ||
|
|
762344a468 | ||
|
|
96a4c329f1 | ||
|
|
a74bcebbff | ||
|
|
82f3c88d46 | ||
|
|
bdae8ed097 | ||
|
|
f7050fc728 | ||
|
|
a17eb8dec4 | ||
|
|
477515fb09 | ||
|
|
1ceef52e21 | ||
|
|
43f5b94da6 | ||
|
|
000fdd8fa5 | ||
|
|
0fc9c25cd8 | ||
|
|
98de15b780 | ||
|
|
4b21ee60b6 | ||
|
|
1aabcfc725 | ||
|
|
9088679e85 | ||
|
|
2b343d1fc1 | ||
|
|
5d8d65bfdc | ||
|
|
110beba49c | ||
|
|
b61d6cde83 | ||
|
|
f433202a5e | ||
|
|
0617148792 | ||
|
|
7ad719f45a | ||
|
|
4de58ee1c8 | ||
|
|
354cf1f66f | ||
|
|
d7862ea81c | ||
|
|
092b9d3cba | ||
|
|
3b7bf9ecac | ||
|
|
ddb09b8046 | ||
|
|
9ca0c63f1f | ||
|
|
c6bf43a821 | ||
|
|
90c4e778d5 | ||
|
|
31fbfe56fd | ||
|
|
c3162ac196 | ||
|
|
c10f361f44 | ||
|
|
ace60a3daa | ||
|
|
07f8daf536 | ||
|
|
b31a9ce95d | ||
|
|
bfd646795d | ||
|
|
9b59425d06 | ||
|
|
80d946e90e | ||
|
|
228a50a3f3 | ||
|
|
0ae562e2af | ||
|
|
7dd4fa9da3 | ||
|
|
b99c0f93b1 | ||
|
|
7098238039 | ||
|
|
227b49a830 | ||
|
|
8c7052e1cf | ||
|
|
ea9083647e | ||
|
|
0b6a698320 | ||
|
|
a0feec3dbc | ||
|
|
dbbbed29e9 | ||
|
|
b01ebf8168 | ||
|
|
83310317c7 | ||
|
|
3ebf1ddeb2 | ||
|
|
0e6a620432 | ||
|
|
2ffdbe9eff | ||
|
|
9c9b9ab651 | ||
|
|
df9cfeaf1b | ||
|
|
96e0e38fcd | ||
|
|
5755465c2f | ||
|
|
9fe5acc36b | ||
|
|
6925c8136d | ||
|
|
fb58d23a94 | ||
|
|
3e052caca8 | ||
|
|
756bb201bd | ||
|
|
63fe63c8c5 | ||
|
|
455472c817 | ||
|
|
0e30e6abaa | ||
|
|
524d36bc2d | ||
|
|
60a834789e | ||
|
|
e203d4d65a | ||
|
|
bb258967c3 | ||
|
|
3b7bc3421c | ||
|
|
e3a090e159 | ||
|
|
027c6179a8 | ||
|
|
9215d68c6b | ||
|
|
e4204809ed | ||
|
|
8c1af0d3f5 | ||
|
|
1d6133277f | ||
|
|
586e085a71 | ||
|
|
02cbca91d7 | ||
|
|
a6fac68b4f | ||
|
|
228a29da4b | ||
|
|
86e9e54766 | ||
|
|
a78af2f1d3 | ||
|
|
a41c9dbfc1 | ||
|
|
010e6f4bd7 | ||
|
|
ef28e8879b | ||
|
|
4ca208adb8 | ||
|
|
b128b54261 | ||
|
|
31c690396d | ||
|
|
6b22e1f4fe | ||
|
|
a38d17dc1c | ||
|
|
ef6001e055 | ||
|
|
434ef46661 | ||
|
|
84a02a0ed7 | ||
|
|
c7bf78d52d | ||
|
|
0c5ab7563a | ||
|
|
d5ec990f18 | ||
|
|
c15805d74d | ||
|
|
1b432b3633 | ||
|
|
ae9c457878 | ||
|
|
f58a0bbcc1 | ||
|
|
5496b04829 | ||
|
|
5bb8f501ee | ||
|
|
5bd52654e8 | ||
|
|
8691b38edf | ||
|
|
41af10f069 | ||
|
|
ca51ee2bb3 | ||
|
|
f5eae9d637 | ||
|
|
ff2c10cced | ||
|
|
8af9f59a58 | ||
|
|
eee13b7786 | ||
|
|
6419622575 | ||
|
|
358e37309c | ||
|
|
fcd2c2b644 | ||
|
|
93af6cd40e | ||
|
|
d5d4ddd764 | ||
|
|
5ac1725b67 | ||
|
|
f069aca7ed | ||
|
|
26907f1b0b | ||
|
|
2c7e341bf3 | ||
|
|
aa5839b19c | ||
|
|
b45e5fc0c6 | ||
|
|
a228c5b7be | ||
|
|
f9b7e2834c | ||
|
|
d79ad36b90 | ||
|
|
a8172d06cf | ||
|
|
1aeeb6ab85 | ||
|
|
3349792aa3 | ||
|
|
5c1d831069 | ||
|
|
c8e376af50 | ||
|
|
9e44151d40 | ||
|
|
cd40d65e1b | ||
|
|
d583362353 | ||
|
|
30ec661356 | ||
|
|
b93cb57afe | ||
|
|
d52bed8864 | ||
|
|
3113dc24ec | ||
|
|
a224bea4b2 | ||
|
|
a7c59e322b | ||
|
|
42c543bb85 | ||
|
|
96312dadc6 | ||
|
|
5626c56862 | ||
|
|
ab125db998 | ||
|
|
0d6a4f7a89 | ||
|
|
0ccddb2b0e | ||
|
|
19f249ffa5 | ||
|
|
7d7930cb82 | ||
|
|
f4dc62f33b | ||
|
|
244870844c | ||
|
|
3e75bea995 | ||
|
|
4dee3d149c | ||
|
|
72ba7d132d | ||
|
|
a7e1a91a36 | ||
|
|
7378ba8a80 | ||
|
|
ded4650794 | ||
|
|
f6c3b13522 | ||
|
|
c675e366f2 | ||
|
|
7b99a235a8 | ||
|
|
57c8cb42db | ||
|
|
ad73e08b07 | ||
|
|
b27ef87c38 | ||
|
|
86bb6e23ce | ||
|
|
1eb7267e60 | ||
|
|
14c2db8c5d | ||
|
|
4395311280 | ||
|
|
c5b191e78f | ||
|
|
56a534ab06 | ||
|
|
63b34486c1 | ||
|
|
fe0c131061 | ||
|
|
5b77d02cbb | ||
|
|
f471907db8 | ||
|
|
6ba7607283 | ||
|
|
dad1a49e4e | ||
|
|
10fba8fd8d | ||
|
|
3818f05513 | ||
|
|
92bb35b2f5 | ||
|
|
480bcb314d | ||
|
|
b24c128a2c | ||
|
|
4b3df7b577 | ||
|
|
2e7a18fb3c | ||
|
|
d006ae2195 | ||
|
|
25b1635310 | ||
|
|
69e218ea45 | ||
|
|
e09a3f0a2b | ||
|
|
3c32b765c1 | ||
|
|
53a62e2977 | ||
|
|
07d024a4da | ||
|
|
356bf021e2 | ||
|
|
14313d798a | ||
|
|
e5de594ddb | ||
|
|
6e63d7047d | ||
|
|
5ca807d65d | ||
|
|
4df48b84c1 | ||
|
|
9ff296afeb | ||
|
|
4024dac62b | ||
|
|
915f94a6a3 | ||
|
|
cabee6b765 | ||
|
|
ffdd736b63 | ||
|
|
69d3bb78c2 | ||
|
|
ddfd5be3b7 | ||
|
|
7a0f39b848 | ||
|
|
8c2a3b03f4 | ||
|
|
e1240eaa2e | ||
|
|
684f90a674 | ||
|
|
e6225b210b | ||
|
|
19c53595ff | ||
|
|
2d36283bc1 | ||
|
|
fdeb694c1e | ||
|
|
fc43fe565a | ||
|
|
9cfcce0858 | ||
|
|
7485a4332e | ||
|
|
ffb950c8ae | ||
|
|
6b09e885b8 | ||
|
|
dde35a8edf | ||
|
|
a31960314a | ||
|
|
5125a367ad | ||
|
|
753d77c51f | ||
|
|
e4bd0c00e2 | ||
|
|
2818a83df9 | ||
|
|
c52dfb2063 | ||
|
|
8b047466c9 | ||
|
|
d14d661c20 | ||
|
|
7046195e23 | ||
|
|
689f5aef5a | ||
|
|
78cce30893 | ||
|
|
31a2a00c64 | ||
|
|
514ed3d0fa | ||
|
|
03a7e521df | ||
|
|
cab6c2ff01 | ||
|
|
a61cc8cffe | ||
|
|
e677397e19 | ||
|
|
a226afa2a6 | ||
|
|
1119cccf99 | ||
|
|
6fd2475f3e | ||
|
|
3954d4ec30 | ||
|
|
8c0a0011f4 | ||
|
|
b1c658b850 | ||
|
|
7885bbff99 | ||
|
|
2dc5dbfeb2 | ||
|
|
b57ca2982f | ||
|
|
3123d8714f | ||
|
|
b30e5f11fb | ||
|
|
838906b3cd | ||
|
|
46bc92d5d1 | ||
|
|
68608eaa3c | ||
|
|
1c1fb922c2 | ||
|
|
8f2227a423 | ||
|
|
be71d9cc43 | ||
|
|
cdaf04f043 | ||
|
|
12fa506459 | ||
|
|
d69530cae8 | ||
|
|
d8ef8b5658 | ||
|
|
1210201ab3 | ||
|
|
e9a1087e96 | ||
|
|
e658e92ada | ||
|
|
a87585aba3 | ||
|
|
fcb5642ec0 | ||
|
|
84910c0920 | ||
|
|
ec8621ae10 | ||
|
|
fcc7a8c6ca | ||
|
|
769982d7db | ||
|
|
abf84143e4 | ||
|
|
b0b1c5f88f | ||
|
|
2b526cf8e1 | ||
|
|
4e0e40dee7 | ||
|
|
7dcee14699 | ||
|
|
d974a28898 | ||
|
|
85f6e00755 | ||
|
|
0faa56cb6c | ||
|
|
802a965245 | ||
|
|
79a4cbd203 | ||
|
|
83acb4ffad | ||
|
|
8f2f5d98dc | ||
|
|
f301744f59 | ||
|
|
f28953b6fc | ||
|
|
8f1c3e5da6 | ||
|
|
95a765202c | ||
|
|
b23e7208ed | ||
|
|
a169e35634 | ||
|
|
4e38e3bb24 | ||
|
|
3bf0350ae7 | ||
|
|
7202303f8c | ||
|
|
9fe1f29d39 | ||
|
|
040d631027 | ||
|
|
a364783956 | ||
|
|
1e2bfb1460 | ||
|
|
1d3a271352 | ||
|
|
8faca93b37 | ||
|
|
06d2cb71da | ||
|
|
e2ee2e9e0b | ||
|
|
61339e91ea | ||
|
|
cdf928d391 | ||
|
|
5bb39746a1 | ||
|
|
c1489dfa4f | ||
|
|
8b1e4ec8e9 | ||
|
|
e58a77043c | ||
|
|
ee9d1eca72 | ||
|
|
c117605812 | ||
|
|
f13692afcf | ||
|
|
d76b2147a8 | ||
|
|
e152529fb7 | ||
|
|
edc607bced | ||
|
|
b3e152610d | ||
|
|
5d09223874 | ||
|
|
56e4b5c9dd | ||
|
|
36d91876bf | ||
|
|
4a46242ed2 | ||
|
|
5b27d26909 | ||
|
|
7ddd24ba97 | ||
|
|
9d3eb872d0 | ||
|
|
ef46f75066 | ||
|
|
98fd813532 | ||
|
|
be60fedced | ||
|
|
71adab3f4a | ||
|
|
54f9c1d306 | ||
|
|
c2fb1f8853 | ||
|
|
9036952f84 | ||
|
|
3e676b0d65 | ||
|
|
0a5a0a5e97 | ||
|
|
a553168786 | ||
|
|
d4d89a18af | ||
|
|
f1f695ef5a | ||
|
|
1865264426 | ||
|
|
9b72458b1e | ||
|
|
3883acc5c2 | ||
|
|
4ddfaeea3e | ||
|
|
017b190bdb | ||
|
|
919dc5dd42 | ||
|
|
c7d164fad5 | ||
|
|
1d8682d429 | ||
|
|
3b6de8e0c1 | ||
|
|
cb1006d95d | ||
|
|
8c32b70956 | ||
|
|
b12970046a | ||
|
|
4b0eaf7267 | ||
|
|
e4a544e989 | ||
|
|
60beddf87f | ||
|
|
7c78e5b90a | ||
|
|
3ca83c19d9 | ||
|
|
8578d11ca7 | ||
|
|
00d04b28c2 | ||
|
|
4e800096e6 | ||
|
|
f9920f62c4 | ||
|
|
25e4ebaba6 | ||
|
|
3c29d47797 | ||
|
|
6fd9415350 | ||
|
|
06b36db554 | ||
|
|
3761db36e8 | ||
|
|
778cfd3a98 | ||
|
|
8431d18426 | ||
|
|
ed72b9434d | ||
|
|
71f7589f08 | ||
|
|
43eeb2319b | ||
|
|
79666f739b | ||
|
|
7b1f4c8a6a | ||
|
|
c2c957735f | ||
|
|
4ea7fb82a7 | ||
|
|
13c0bf922b | ||
|
|
8d3931409e | ||
|
|
3396f9396f | ||
|
|
06d5da0204 | ||
|
|
0f520ac026 | ||
|
|
05f156e8ba | ||
|
|
ae159914b0 | ||
|
|
d6cb3022a3 | ||
|
|
6594f7acb2 | ||
|
|
a4cd74e71a | ||
|
|
48d7e4bb40 | ||
|
|
e2def297b6 | ||
|
|
c01d63373c | ||
|
|
6491691ac4 | ||
|
|
453f5da790 | ||
|
|
856c74700f | ||
|
|
ce5857556b | ||
|
|
ed6c10d46b | ||
|
|
bc01aadc02 | ||
|
|
702e5dc21a | ||
|
|
a47d2850c0 | ||
|
|
7d5b7192ec | ||
|
|
d68adfea9c | ||
|
|
873c704de9 | ||
|
|
ff47556e26 | ||
|
|
f3fbbc20d2 | ||
|
|
8b8e492e48 | ||
|
|
ea5a5b77f9 | ||
|
|
98ef5c09d2 | ||
|
|
3516864ade | ||
|
|
5aa41ae9f8 | ||
|
|
566ad7021e | ||
|
|
2579f31f54 |
+51
-29
@@ -1,36 +1,58 @@
|
||||
Makefile
|
||||
config.log
|
||||
config.h
|
||||
config.cache
|
||||
config.status
|
||||
libtool
|
||||
/isc-config.sh
|
||||
/configure.lineno
|
||||
autom4te.cache/
|
||||
*.rej
|
||||
*.orig
|
||||
*.o
|
||||
*.lo
|
||||
*.so
|
||||
*.a
|
||||
*.la
|
||||
*.gcno
|
||||
*.gcda
|
||||
*_test
|
||||
*-symtbl.c
|
||||
timestamp
|
||||
ans.run
|
||||
named.run
|
||||
named.memstats
|
||||
gen.dSYM/
|
||||
*.a
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.orig
|
||||
*.plist/ # ccc-analyzer store its results in .plist directories
|
||||
*.rej
|
||||
*.so
|
||||
*_test
|
||||
*~
|
||||
.ccache/
|
||||
.cproject
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
# ccc-analyzer store its results in .plist directories
|
||||
*.plist/
|
||||
*~
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
kyua.log
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/autom4te.cache/
|
||||
/bind.keys.h
|
||||
/compile
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.lineno
|
||||
/depcomp
|
||||
/install-sh
|
||||
/isc-config.sh
|
||||
/libltdl/*
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/m4/libtool.m4
|
||||
/m4/ltargz.m4
|
||||
/m4/ltdl.m4
|
||||
/m4/ltoptions.m4
|
||||
/m4/ltsugar.m4
|
||||
/m4/ltversion.m4
|
||||
/m4/lt~obsolete.m4
|
||||
/missing
|
||||
/py-compile
|
||||
/stamp-h1
|
||||
/test-driver
|
||||
Makefile
|
||||
ans.run
|
||||
gen.dSYM/
|
||||
kyua.log
|
||||
named.memstats
|
||||
named.run
|
||||
timestamp
|
||||
|
||||
+48
-3
@@ -107,7 +107,7 @@ stages:
|
||||
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 --enable-developer --with-libtool --with-geoip2=auto --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
|
||||
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
|
||||
- test -z "${RUN_MAKE_INSTALL}" || make install
|
||||
artifacts:
|
||||
@@ -167,6 +167,7 @@ misc:sid:amd64:
|
||||
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
|
||||
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
|
||||
- xmllint --noout --nonet --html `git ls-files '*.html'`
|
||||
- sh util/check-win32util-configure
|
||||
artifacts:
|
||||
paths:
|
||||
- util/newcopyrights
|
||||
@@ -300,7 +301,7 @@ unit:gcc:stretch:amd64:
|
||||
gcc:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
RUN_MAKE_INSTALL: 1
|
||||
<<: *debian_sid_amd64_image
|
||||
@@ -323,7 +324,7 @@ unit:gcc:sid:amd64:
|
||||
gcc:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
@@ -475,3 +476,47 @@ unit:pkcs11:sid:amd64:
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
# Jobs for testing --with-geoip builds on Debian Sid (amd64)
|
||||
|
||||
geoip:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--without-geoip2 --with-geoip"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:geoip:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
unit:geoip:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
# Jobs for testing --with-geoip2 builds on Debian Sid (amd64)
|
||||
|
||||
geoip2:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--without-geoip --with-geoip2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:geoip2:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
unit:geoip2:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
@@ -1,3 +1,263 @@
|
||||
5260. [bug] dnstap-read was producing malformed output for large
|
||||
packets. [GL #1093]
|
||||
|
||||
5258. [func] Added support for the GeoIP2 API from MaxMind,
|
||||
when BIND is compiled using "configure --with-geoip2".
|
||||
The legacy GeoIP API can be enabled by using
|
||||
"configure --with-geoip" instead. These options
|
||||
cannot be used together.
|
||||
|
||||
Certain geoip ACL settings that were available with
|
||||
legacy GeoIP are not available when using GeoIP2.
|
||||
See the ARM for details. [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]
|
||||
|
||||
5251. [bug] Statistics were broken in x86 Windows builds.
|
||||
[GL #1081]
|
||||
|
||||
5249. [bug] Fix a possible underflow in recursion clients
|
||||
statistics when hitting recursive clients
|
||||
soft quota. [GL #1067]
|
||||
|
||||
--- 9.14.3 released ---
|
||||
|
||||
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]
|
||||
|
||||
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]
|
||||
|
||||
5234. [port] arm: just use the compiler's default support for
|
||||
yield. [GL #981]
|
||||
|
||||
--- 9.14.2 released ---
|
||||
|
||||
5233. [bug] Negative trust anchors did not work with "forward only;"
|
||||
to validating resolvers. [GL #997]
|
||||
|
||||
5231. [protocol] Add support for displaying CLIENT-TAG and SERVER-TAG.
|
||||
[GL #960]
|
||||
|
||||
5229. [protocol] Enforce known SSHFP fingerprint lengths. [GL #852]
|
||||
|
||||
5228. [cleanup] If trusted-keys and managed-keys are configured
|
||||
simultaneously for the same name, the key cannot
|
||||
be rolled automatically. This configuration now
|
||||
logs a warning. [GL #868]
|
||||
|
||||
5224. [bug] Only test provide-ixfr on TCP streams. [GL #991]
|
||||
|
||||
5223. [bug] Fixed a race in the filter-aaaa plugin accessing
|
||||
the hash table. [GL #1005]
|
||||
|
||||
5222. [bug] 'delv -t ANY' could leak memory. [GL #983]
|
||||
|
||||
5221. [test] Enable parallel execution of system tests on
|
||||
Windows. [GL !4101]
|
||||
|
||||
5220. [cleanup] Refactor the isc_stat structure to take advantage
|
||||
of stdatomic. [GL !1493]
|
||||
|
||||
5219. [bug] Fixed a race in the filter-aaaa plugin that could
|
||||
trigger a crash when returning an instance object
|
||||
to the memory pool. [GL #982]
|
||||
|
||||
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
|
||||
|
||||
5217. [bug] Restore key id calculation for RSAMD5. [GL #996]
|
||||
|
||||
5216. [bug] Fetches-per-zone counter wasn't updated correctly
|
||||
when doing qname minimization. [GL #992]
|
||||
|
||||
5215. [bug] Change #5124 was incomplete; named could still
|
||||
return FORMERR instead of SERVFAIL in some cases.
|
||||
[GL #990]
|
||||
|
||||
5214. [bug] win32: named now removes its lock file upon shutdown.
|
||||
[GL #979]
|
||||
|
||||
5213. [bug] win32: Eliminated a race which allowed named.exe running
|
||||
as a service to be killed prematurely during shutdown.
|
||||
[GL #978]
|
||||
|
||||
5211. [bug] Allow out-of-zone additional data to be included
|
||||
in authoritative responses if recursion is allowed
|
||||
and "minimal-responses" is disabled. This behavior
|
||||
was inadvertently removed in change #4605. [GL #817]
|
||||
|
||||
5210. [bug] When dnstap is enabled and recursion is not
|
||||
available, incoming queries are now logged
|
||||
as "auth". Previously, this depended on whether
|
||||
recursion was requested by the client, not on
|
||||
whether recursion was available. [GL #963]
|
||||
|
||||
5209. [bug] When update-check-ksk is true, add_sigs was not
|
||||
considering offline keys, leaving record sets signed
|
||||
with the incorrect type key. [GL #763]
|
||||
|
||||
5208. [test] Run valid rdata wire encodings through totext+fromtext
|
||||
and tofmttext+fromtext methods to check these methods.
|
||||
[GL #899]
|
||||
|
||||
5207. [test] Check delv and dig TTL values. [GL #965]
|
||||
|
||||
5206. [bug] Delv could print out bad TTLs. [GL #965]
|
||||
|
||||
5205. [bug] Enforce that a DS hash exists. [GL #899]
|
||||
|
||||
5204. [test] Check that dns_rdata_fromtext() produces a record that
|
||||
will be accepted by dns_rdata_fromwire(). [GL #852]
|
||||
|
||||
5203. [bug] Enforce whether key rdata exists or not in KEY,
|
||||
DNSKEY, CDNSKEY and RKEY. [GL #899]
|
||||
|
||||
5202. [bug] <dns/ecs.h> was missing ISC_LANG_ENDDECLS. [GL #976]
|
||||
|
||||
5190. [bug] Ignore trust anchors using disabled algorithms.
|
||||
[GL #806]
|
||||
|
||||
--- 9.14.1 released ---
|
||||
|
||||
5201. [bug] Fix a possible deadlock in RPZ update code. [GL #973]
|
||||
|
||||
5200. [security] tcp-clients settings could be exceeded in some cases,
|
||||
which could lead to exhaustion of file descriptors.
|
||||
(CVE-2018-5743) [GL #615]
|
||||
|
||||
5199. [security] In certain configurations, named could crash
|
||||
if nxdomain-redirect was in use and a redirected
|
||||
query resulted in an NXDOMAIN from the cache.
|
||||
(CVE-2019-6467) [GL #880]
|
||||
|
||||
5198. [bug] If a fetch context was being shut down and, at the same
|
||||
time, we returned from qname minimization, an INSIST
|
||||
could be hit. [GL #966]
|
||||
|
||||
5197. [bug] dig could die in best effort mode on multiple SIG(0)
|
||||
records. Similarly on multiple OPT and multiple TSIG
|
||||
records. [GL #920]
|
||||
|
||||
5196. [bug] make install failed with --with-dlopen=no. [GL #955]
|
||||
|
||||
5195. [bug] "allow-update" and "allow-update-forwarding" were
|
||||
treated as configuration errors if used at the
|
||||
options or view level. [GL #913]
|
||||
|
||||
5194. [bug] Enforce non empty ZOMEMD hash. [GL #899]
|
||||
|
||||
5193. [bug] EID and NIMLOC failed to do multi-line output
|
||||
correctly. [GL #899]
|
||||
|
||||
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
|
||||
|
||||
5187. [test] Set time zone before running any tests in dnstap_test.
|
||||
[GL #940]
|
||||
|
||||
5186. [cleanup] More dnssec-keygen manual tidying. [GL !1678]
|
||||
|
||||
5184. [bug] Missing unlocks in sdlz.c. [GL #936]
|
||||
|
||||
5183. [bug] Reinitialize ECS data before reusing client
|
||||
structures. [GL #881]
|
||||
|
||||
--- 9.14.0 released ---
|
||||
|
||||
--- 9.14.0rc3 released ---
|
||||
|
||||
5182. [bug] Fix a high-load race/crash in handling of
|
||||
isc_socket_close() in resolver. [GL #834]
|
||||
|
||||
5180. [bug] delv now honors the operating system's preferred
|
||||
ephemeral port range. [GL #925]
|
||||
|
||||
5179. [cleanup] Replace some vague type declarations with the more
|
||||
specific dns_secalg_t and dns_dsdigest_t.
|
||||
Thanks to Tony Finch. [GL !1498]
|
||||
|
||||
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
|
||||
errors when writing files. [GL #902]
|
||||
|
||||
5177. [func] Add the ability to specify in named.conf whether a
|
||||
response-policy zone's SOA record should be added
|
||||
to the additional section (add-soa yes/no). [GL #865]
|
||||
|
||||
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
|
||||
redirect name. [GL #892]
|
||||
|
||||
--- 9.14.0rc2 released ---
|
||||
|
||||
5176. [tests] Remove a dependency on libxml in statschannel system
|
||||
test. [GL #926]
|
||||
|
||||
5175. [bug] Fixed a problem with file input in dnssec-keymgr,
|
||||
dnssec-coverage and dnssec-checkds when using
|
||||
python3. [GL #882]
|
||||
|
||||
5174. [doc] Tidy dnssec-keygen manual. [GL !1557]
|
||||
|
||||
5173. [bug] Fixed a race in socket code that could occur when
|
||||
accept, send, or recv were called from an event
|
||||
loop but the socket had been closed by another
|
||||
thread. [RT #874]
|
||||
|
||||
5172. [bug] nsupdate now honors the operating system's preferred
|
||||
ephemeral port range. [GL #905]
|
||||
|
||||
5171. [func] named plugins are now installed into a separate
|
||||
directory. Supplying a filename (a string without path
|
||||
separators) in a "plugin" configuration stanza now
|
||||
causes named to look for that plugin in that directory.
|
||||
[GL #878]
|
||||
|
||||
5170. [test] Added --with-dlz-filesystem to feature-test. [GL !1587]
|
||||
|
||||
5169. [bug] The presence of certain types in an otherwise
|
||||
empty node could cause a crash while processing a
|
||||
type ANY query. [GL #901]
|
||||
|
||||
--- 9.14.0rc1 released ---
|
||||
|
||||
5168. [bug] Do not crash on shutdown when RPZ fails to load. Also,
|
||||
keep previous version of the database if RPZ fails to
|
||||
load. [GL #813]
|
||||
|
||||
5165. [contrib] Removed SDB drivers from contrib; they're obsolete.
|
||||
[GL #428]
|
||||
|
||||
@@ -25,6 +285,18 @@
|
||||
5157. [bug] Nslookup now errors out if there are extra command
|
||||
line arguments. [GL #207]
|
||||
|
||||
5141. [security] Zone transfer controls for writable DLZ zones were
|
||||
not effective as the allowzonexfr method was not being
|
||||
called for such zones. (CVE-2019-6465) [GL #790]
|
||||
|
||||
5118. [security] Named could crash if it is managing a key with
|
||||
`managed-keys` and the authoritative zone is rolling
|
||||
the key to an unsupported algorithm. (CVE-2018-5745)
|
||||
[GL #780]
|
||||
|
||||
5110. [security] Named leaked memory if there were multiple Key Tag
|
||||
EDNS options present. (CVE-2018-5744) [GL #772]
|
||||
|
||||
--- 9.13.6 released ---
|
||||
|
||||
5156. [doc] Extended and refined the section of the ARM describing
|
||||
@@ -48,7 +320,7 @@
|
||||
- Zone signing and DNSKEY maintenance events are
|
||||
now logged to the "dnssec" category
|
||||
- Messages are now logged when DNSSEC keys are
|
||||
pubished, activated, inactivated, deleted,
|
||||
published, activated, inactivated, deleted,
|
||||
or revoked.
|
||||
[GL #714]
|
||||
|
||||
@@ -85,8 +357,6 @@
|
||||
and "nsdname-enable" both now default to yes,
|
||||
regardless of compile-time settings. [GL #824]
|
||||
|
||||
5141. [placeholder]
|
||||
|
||||
5140. [bug] Don't immediately mark existing keys as inactive and
|
||||
deleted when running dnssec-keymgr for the first
|
||||
time. [GL #117]
|
||||
@@ -157,8 +427,6 @@
|
||||
|
||||
5119. [placeholder]
|
||||
|
||||
5118. [placeholder]
|
||||
|
||||
5117. [placeholder]
|
||||
|
||||
5116. [bug] Named/named-checkconf triggered a assertion when
|
||||
@@ -179,8 +447,6 @@
|
||||
5111. [bug] Occluded DNSKEY records could make it into the
|
||||
delegating NSEC/NSEC3 bitmap. [GL #742]
|
||||
|
||||
5110. [placeholder]
|
||||
|
||||
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
|
||||
|
||||
--- 9.13.5 released ---
|
||||
@@ -259,8 +525,8 @@
|
||||
5091. [func] Two new global and per-view options min-cache-ttl
|
||||
and min-ncache-ttl [GL #613]
|
||||
|
||||
5090. [bug] dig and mdig failed to properly preparse dash value
|
||||
pairs when value was a seperate argument and started
|
||||
5090. [bug] dig and mdig failed to properly pre-parse dash value
|
||||
pairs when value was a separate argument and started
|
||||
with a dash. [GL #584]
|
||||
|
||||
5089. [bug] Restore localhost fallback in dig and host which is
|
||||
@@ -326,7 +592,7 @@
|
||||
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
|
||||
behavior for auto-reallocated buffers. [GL #644]
|
||||
|
||||
5071. [bug] Comparision of NXT records was broken. [GL #631]
|
||||
5071. [bug] Comparison of NXT records was broken. [GL #631]
|
||||
|
||||
5070. [bug] Record types which support a empty rdata field were
|
||||
not handling the empty rdata field case. [GL #638]
|
||||
@@ -345,7 +611,7 @@
|
||||
|
||||
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
|
||||
|
||||
5064. [test] Initalize TZ environment variable before calling
|
||||
5064. [test] Initialize TZ environment variable before calling
|
||||
dns_test_begin in dnstap_test. [GL #624]
|
||||
|
||||
5063. [test] In statschannel test try a few times before failing
|
||||
@@ -571,7 +837,7 @@
|
||||
5001. [bug] Fix refcount errors on error paths. [GL !563]
|
||||
|
||||
5000. [bug] named_server_servestale() could leave the server in
|
||||
exclusive mode if an error occured. [GL #441]
|
||||
exclusive mode if an error occurred. [GL #441]
|
||||
|
||||
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
|
||||
[GL #261]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
CONTRIBUTING
|
||||
|
||||
BIND Source Access and Contributor Guidelines
|
||||
|
||||
Feb 22, 2018
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
HISTORY
|
||||
|
||||
Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
BIND 9.11
|
||||
@@ -431,11 +433,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.
|
||||
|
||||
+5
-5
@@ -97,27 +97,27 @@ 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;}' > $@
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -13,7 +15,7 @@ offer support on a "best effort" basis for some.
|
||||
|
||||
Regularly tested platforms
|
||||
|
||||
As of Jan 2019, BIND 9.13 is fully supported and regularly tested on the
|
||||
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
|
||||
following systems:
|
||||
|
||||
* Debian 8, 9, 10
|
||||
@@ -51,7 +53,7 @@ Server 2012 R2, none of these are tested regularly by ISC.
|
||||
|
||||
Unsupported platforms
|
||||
|
||||
These are platforms on which BIND 9.13 is known not to build or run:
|
||||
These are platforms on which BIND 9.14 is known not to build or run:
|
||||
|
||||
* Platforms without at least OpenSSL 1.0.2
|
||||
* Windows 10 / x86
|
||||
@@ -64,27 +66,10 @@ These are platforms on which BIND 9.13 is known not to build or run:
|
||||
|
||||
Platform quirks
|
||||
|
||||
ARM
|
||||
NetBSD 6 i386
|
||||
|
||||
If the compilation ends with following error:
|
||||
The i386 build of NetBSD requires the libatomic library, available from
|
||||
the gcc5-libs package. Because this library is in a non-standard path, its
|
||||
location must be specified in the configure command line:
|
||||
|
||||
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
|
||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
||||
|
||||
+7
-26
@@ -23,7 +23,7 @@ offer support on a "best effort" basis for some.
|
||||
|
||||
### Regularly tested platforms
|
||||
|
||||
As of Jan 2019, BIND 9.13 is fully supported and regularly tested on the
|
||||
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
|
||||
following systems:
|
||||
|
||||
* Debian 8, 9, 10
|
||||
@@ -60,7 +60,7 @@ Server 2012 R2, none of these are tested regularly by ISC.
|
||||
|
||||
## Unsupported platforms
|
||||
|
||||
These are platforms on which BIND 9.13 is known *not* to build or run:
|
||||
These are platforms on which BIND 9.14 is known *not* to build or run:
|
||||
|
||||
* Platforms without at least OpenSSL 1.0.2
|
||||
* Windows 10 / x86
|
||||
@@ -72,31 +72,12 @@ These are platforms on which BIND 9.13 is known *not* to build or run:
|
||||
|
||||
## Platform quirks
|
||||
|
||||
### ARM
|
||||
### NetBSD 6 i386
|
||||
|
||||
If the compilation ends with following error:
|
||||
The i386 build of NetBSD requires the `libatomic` library, available from
|
||||
the `gcc5-libs` package. Because this library is in a non-standard path,
|
||||
its location must be specified in the `configure` command line:
|
||||
|
||||
```
|
||||
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
|
||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
||||
```
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
README
|
||||
|
||||
BIND 9
|
||||
|
||||
Contents
|
||||
@@ -5,7 +7,7 @@ Contents
|
||||
1. Introduction
|
||||
2. Reporting bugs and getting help
|
||||
3. Contributing to BIND
|
||||
4. BIND 9.13 features
|
||||
4. BIND 9.14 features
|
||||
5. Building BIND
|
||||
6. macOS
|
||||
7. Dependencies
|
||||
@@ -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
|
||||
@@ -100,17 +102,19 @@ If you prefer, you may also submit code by opening a GitLab Issue and
|
||||
including your patch as an attachment, preferably generated by git
|
||||
format-patch.
|
||||
|
||||
BIND 9.13 features
|
||||
BIND 9.14 features
|
||||
|
||||
BIND 9.13 is the newest development branch of BIND 9. It includes a number
|
||||
of changes from BIND 9.12 and earlier releases. New features include:
|
||||
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
|
||||
incorporating all changes from the 9.13 development branch, updating the
|
||||
most recent stable branch, 9.12. These changes include:
|
||||
|
||||
* A new "plugin" mechanism has been added to allow query functionality
|
||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||
feature has been removed from named and is now implemented as a
|
||||
plugin.
|
||||
* Socket and task code has been refactored to improve performance.
|
||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||
* Socket and task code has been refactored to improve performance on
|
||||
most modern machines.
|
||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||
via a special query which trust anchors are configured for the root
|
||||
zone.
|
||||
@@ -138,7 +142,27 @@ is now mandatory: building BIND without DNSSEC is no longer supported.
|
||||
Special code to support certain legacy operating systems has also been
|
||||
removed; see the file PLATFORMS.md for details of supported platforms. In
|
||||
addition to OpenSSL, BIND now requires support for IPv6, threads, and
|
||||
standard atomic operations provided by the C compiler.
|
||||
standard atomic operations provided by the C compiler. Non-threaded builds
|
||||
are no longer supported.
|
||||
|
||||
BIND 9.14.1
|
||||
|
||||
BIND 9.14.1 is a maintenance release, and addresses security
|
||||
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
|
||||
|
||||
BIND 9.14.2
|
||||
|
||||
BIND 9.14.2 is a maintenance release.
|
||||
|
||||
BIND 9.14.3
|
||||
|
||||
BIND 9.14.3 is a maintenance release, and addresses the security
|
||||
vulnerability disclosed in CVE-2019-6471.
|
||||
|
||||
BIND 9.14.4
|
||||
|
||||
BIND 9.14.4 is a maintenance release, and also adds support for the new
|
||||
MaxMind GeoIP2 geolocation API when built with configure --with-geoip2.
|
||||
|
||||
Building BIND
|
||||
|
||||
@@ -349,6 +373,24 @@ 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 publically 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
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
1. [Introduction](#intro)
|
||||
1. [Reporting bugs and getting help](#help)
|
||||
1. [Contributing to BIND](#contrib)
|
||||
1. [BIND 9.13 features](#features)
|
||||
1. [BIND 9.14 features](#features)
|
||||
1. [Building BIND](#build)
|
||||
1. [macOS](#macos)
|
||||
1. [Dependencies](#dependencies)
|
||||
@@ -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).
|
||||
@@ -117,17 +117,18 @@ If you prefer, you may also submit code by opening a
|
||||
including your patch as an attachment, preferably generated by
|
||||
`git format-patch`.
|
||||
|
||||
### <a name="features"/> BIND 9.13 features
|
||||
### <a name="features"/> BIND 9.14 features
|
||||
|
||||
BIND 9.13 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.12 and earlier releases. New features
|
||||
include:
|
||||
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
|
||||
incorporating all changes from the 9.13 development branch, updating
|
||||
the most recent stable branch, 9.12. These changes include:
|
||||
|
||||
* A new "plugin" mechanism has been added to allow query functionality
|
||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||
feature has been removed from named and is now implemented as a plugin.
|
||||
* Socket and task code has been refactored to improve performance.
|
||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||
* Socket and task code has been refactored to improve performance on most
|
||||
modern machines.
|
||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||
via a special query which trust anchors are configured for the root zone.
|
||||
* Secondary zones can now be configured as "mirror" zones; their contents
|
||||
@@ -157,7 +158,27 @@ Special code to support certain legacy operating systems has also
|
||||
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
|
||||
of supported platforms. In addition to OpenSSL, BIND now requires
|
||||
support for IPv6, threads, and standard atomic operations provided
|
||||
by the C compiler.
|
||||
by the C compiler. Non-threaded builds are no longer supported.
|
||||
|
||||
#### BIND 9.14.1
|
||||
|
||||
BIND 9.14.1 is a maintenance release, and addresses security
|
||||
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
|
||||
|
||||
#### BIND 9.14.2
|
||||
|
||||
BIND 9.14.2 is a maintenance release.
|
||||
|
||||
#### BIND 9.14.3
|
||||
|
||||
BIND 9.14.3 is a maintenance release, and addresses the security
|
||||
vulnerability disclosed in CVE-2019-6471.
|
||||
|
||||
#### BIND 9.14.4
|
||||
|
||||
BIND 9.14.4 is a maintenance release, and also adds support for
|
||||
the new MaxMind GeoIP2 geolocation API when built with
|
||||
`configure --with-geoip2`.
|
||||
|
||||
### <a name="build"/> Building BIND
|
||||
|
||||
@@ -360,6 +381,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 publically 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
+2
@@ -291,6 +291,8 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
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])
|
||||
|
||||
@@ -21,7 +21,7 @@ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES}
|
||||
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@
|
||||
|
||||
@@ -63,7 +63,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
|
||||
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
|
||||
"[named.conf]\n", program);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ 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@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -23,7 +23,7 @@ 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@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ 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@
|
||||
|
||||
+3
-3
@@ -584,11 +584,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
|
||||
|
||||
+1
-1
@@ -1445,7 +1445,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;
|
||||
|
||||
+4
-2
@@ -1000,8 +1000,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>
|
||||
|
||||
+4
-2
@@ -790,8 +790,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>
|
||||
|
||||
+7
-3
@@ -1411,6 +1411,8 @@ dig_ednsoptname_t optnames[] = {
|
||||
{ 12, "PAD" }, /* shorthand */
|
||||
{ 13, "CHAIN" }, /* RFC 7901 */
|
||||
{ 14, "KEY-TAG" }, /* RFC 8145 */
|
||||
{ 16, "CLIENT-TAG" }, /* draft-bellis-dnsop-edns-tags */
|
||||
{ 17, "SERVER-TAG" }, /* draft-bellis-dnsop-edns-tags */
|
||||
{ 26946, "DEVICEID" }, /* Brian Hartvigsen */
|
||||
};
|
||||
|
||||
@@ -2189,12 +2191,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 &&
|
||||
|
||||
@@ -20,7 +20,7 @@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
|
||||
|
||||
+10
-10
@@ -86,7 +86,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
|
||||
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
|
||||
* from -a arguments. The size of the array is an arbitrary limit.
|
||||
*/
|
||||
static uint8_t dtype[8];
|
||||
static dns_dsdigest_t dtype[8];
|
||||
|
||||
static const char *startstr = NULL; /* from which we derive notbefore */
|
||||
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
|
||||
@@ -129,7 +129,7 @@ static int nkey; /* number of child zone DNSKEY records */
|
||||
typedef struct keyinfo {
|
||||
dns_rdata_t rdata;
|
||||
dst_key_t *dst;
|
||||
uint8_t algo;
|
||||
dns_secalg_t algo;
|
||||
dns_keytag_t tag;
|
||||
} keyinfo_t;
|
||||
|
||||
@@ -614,12 +614,12 @@ free_keytable(keyinfo_t **keytable_p) {
|
||||
* otherwise the key algorithm. This is used by the signature coverage
|
||||
* check functions below.
|
||||
*/
|
||||
static uint8_t *
|
||||
static dns_secalg_t *
|
||||
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigset)
|
||||
{
|
||||
isc_result_t result;
|
||||
uint8_t *algo;
|
||||
dns_secalg_t *algo;
|
||||
int i;
|
||||
|
||||
algo = isc_mem_get(mctx, nkey);
|
||||
@@ -702,7 +702,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
* fetched from the child zone, any working signature is enough.
|
||||
*/
|
||||
static bool
|
||||
signed_loose(uint8_t *algo) {
|
||||
signed_loose(dns_secalg_t *algo) {
|
||||
bool ok = false;
|
||||
int i;
|
||||
for (i = 0; i < nkey; i++) {
|
||||
@@ -721,7 +721,7 @@ signed_loose(uint8_t *algo) {
|
||||
* RRset.
|
||||
*/
|
||||
static bool
|
||||
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
|
||||
signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
|
||||
isc_result_t result;
|
||||
bool all_ok = true;
|
||||
|
||||
@@ -844,14 +844,14 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
||||
*/
|
||||
static int
|
||||
cmp_dtype(const void *ap, const void *bp) {
|
||||
int a = *(const uint8_t *)ap;
|
||||
int b = *(const uint8_t *)bp;
|
||||
int a = *(const dns_dsdigest_t *)ap;
|
||||
int b = *(const dns_dsdigest_t *)bp;
|
||||
return (a - b);
|
||||
}
|
||||
|
||||
static void
|
||||
add_dtype(const char *dn) {
|
||||
uint8_t dt;
|
||||
dns_dsdigest_t dt;
|
||||
unsigned i, n;
|
||||
|
||||
dt = strtodsdigest(dn);
|
||||
@@ -936,7 +936,7 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
dns_rdata_t *arrdata;
|
||||
dns_rdata_ds_t *ds;
|
||||
dns_keytag_t key_tag;
|
||||
uint8_t algorithm;
|
||||
dns_secalg_t algorithm;
|
||||
bool match;
|
||||
int i, j, n, d;
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ logkey(dns_rdata_t *rdata)
|
||||
}
|
||||
|
||||
static void
|
||||
emit(unsigned int dtype, bool showall, char *lookaside,
|
||||
emit(dns_dsdigest_t dtype, bool showall, char *lookaside,
|
||||
bool cds, dns_rdata_t *rdata)
|
||||
{
|
||||
isc_result_t result;
|
||||
@@ -350,7 +350,7 @@ main(int argc, char **argv) {
|
||||
char *lookaside = NULL;
|
||||
char *endp;
|
||||
int ch;
|
||||
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
||||
dns_dsdigest_t dtype = DNS_DSDIGEST_SHA1;
|
||||
bool cds = false;
|
||||
bool both = true;
|
||||
bool usekeyset = false;
|
||||
|
||||
+41
-42
@@ -39,7 +39,7 @@
|
||||
dnssec-keygen \- DNSSEC key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
||||
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
||||
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
@@ -58,6 +58,13 @@ may be preferable to direct use of
|
||||
\fBdnssec\-keygen\fR\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-3
|
||||
.RS 4
|
||||
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
|
||||
\fBdnssec\-keygen \-3a RSASHA1\fR
|
||||
specifies the NSEC3RSASHA1 algorithm\&.
|
||||
.RE
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
|
||||
@@ -83,29 +90,15 @@ to generate TSIG keys\&.
|
||||
.PP
|
||||
\-b \fIkeysize\fR
|
||||
.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 2048 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. DSA keys must be between 512 and 1024 bits and an exact multiple of 64\&. HMAC keys must be between 1 and 512 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
|
||||
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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-n \fInametype\fR
|
||||
.RS 4
|
||||
Specifies the owner type of the key\&. The value of
|
||||
\fBnametype\fR
|
||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
|
||||
.RE
|
||||
.PP
|
||||
\-3
|
||||
.RS 4
|
||||
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
|
||||
\fBdnssec\-keygen \-3a RSASHA1\fR
|
||||
specifies the NSEC3RSASHA1 algorithm\&.
|
||||
.RE
|
||||
.PP
|
||||
\-C
|
||||
.RS 4
|
||||
Compatibility mode: generates an old\-style key, without any metadata\&. By default,
|
||||
Compatibility mode: generates an old\-style key, without any timing metadata\&. By default,
|
||||
\fBdnssec\-keygen\fR
|
||||
will include the key\*(Aqs creation date in the metadata stored with the private key, and other dates may be set there as well (publication date, activation date, etc)\&. Keys that include this data may be incompatible with older versions of BIND; the
|
||||
\fB\-C\fR
|
||||
@@ -150,11 +143,6 @@ Prints a short summary of the options and arguments to
|
||||
Sets the directory in which the key files are to be written\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k
|
||||
.RS 4
|
||||
Deprecated in favor of \-T KEY\&.
|
||||
.RE
|
||||
.PP
|
||||
\-L \fIttl\fR
|
||||
.RS 4
|
||||
Sets the default TTL to use for this key when it is converted into a DNSKEY RR\&. If the key is imported into a zone, this is the TTL that will be used for it, unless there was already a DNSKEY RRset in place, in which case the existing TTL would take precedence\&. If this value is not set and there is no existing DNSKEY RRset, the TTL will default to the SOA TTL\&. Setting the default TTL to
|
||||
@@ -164,9 +152,17 @@ none
|
||||
is the same as leaving it unset\&.
|
||||
.RE
|
||||
.PP
|
||||
\-n \fInametype\fR
|
||||
.RS 4
|
||||
Specifies the owner type of the key\&. The value of
|
||||
\fBnametype\fR
|
||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIprotocol\fR
|
||||
.RS 4
|
||||
Sets the protocol value for the generated key\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
|
||||
Sets the protocol value for the generated key, for use with
|
||||
\fB\-T KEY\fR\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
@@ -193,27 +189,25 @@ Specifies the strength value of the key\&. The strength is a number between 0 an
|
||||
Specifies the resource record type to use for the key\&.
|
||||
\fBrrtype\fR
|
||||
must be either DNSKEY or KEY\&. The default is DNSKEY when using a DNSSEC algorithm, but it can be overridden to KEY for use with SIG(0)\&.
|
||||
Specifying any TSIG algorithm (HMAC\-* or DH) with
|
||||
\fB\-a\fR
|
||||
forces this option to KEY\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
Indicates the use of the key\&.
|
||||
Indicates the use of the key, for use with
|
||||
\fB\-T KEY\fR\&.
|
||||
\fBtype\fR
|
||||
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level\&.
|
||||
.RE
|
||||
.PP
|
||||
\-V
|
||||
.RS 4
|
||||
Prints version information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level\&.
|
||||
.RE
|
||||
.SH "TIMING OPTIONS"
|
||||
.PP
|
||||
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS\&. If the argument begins with a \*(Aq+\*(Aq or \*(Aq\-\*(Aq, it is interpreted as an offset from the present time\&. For convenience, if such an offset is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the offset is computed in years (defined as 365 24\-hour days, ignoring leap years), months (defined as 30 24\-hour days), weeks, days, hours, or minutes, respectively\&. Without a suffix, the offset is computed in seconds\&. To explicitly prevent a date from being set, use \*(Aqnone\*(Aq or \*(Aqnever\*(Aq\&.
|
||||
@@ -314,23 +308,24 @@ contains the private key\&.
|
||||
.PP
|
||||
The
|
||||
\&.key
|
||||
file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement)\&.
|
||||
file contains a DNSKEY or KEY record\&. When a zone is being signed by
|
||||
\fBnamed\fR
|
||||
or
|
||||
\fBdnssec\-signzone\fR\fB\-S\fR, DNSKEY records are included automatically\&. In other cases, the
|
||||
\&.key
|
||||
file can be inserted into a zone file manually or with a
|
||||
\fB$INCLUDE\fR
|
||||
statement\&.
|
||||
.PP
|
||||
The
|
||||
\&.private
|
||||
file contains algorithm\-specific fields\&. For obvious security reasons, this file does not have general read permission\&.
|
||||
.PP
|
||||
Both
|
||||
\&.key
|
||||
and
|
||||
\&.private
|
||||
files are generated for symmetric cryptography algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
\fBexample\&.com\fR, the following command would be issued:
|
||||
To generate an ECDSAP256SHA256 zone\-signing key for the zone
|
||||
\fBexample\&.com\fR, issue the command:
|
||||
.PP
|
||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-n ZONE example\&.com\fR
|
||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 example\&.com\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
@@ -342,6 +337,10 @@ creates the files
|
||||
Kexample\&.com\&.+013+26160\&.key
|
||||
and
|
||||
Kexample\&.com\&.+013+26160\&.private\&.
|
||||
.PP
|
||||
To generate a matching key\-signing key, issue the command:
|
||||
.PP
|
||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-f KSK example\&.com\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-signzone\fR(8),
|
||||
|
||||
@@ -241,7 +241,7 @@ main(int argc, char **argv) {
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:kL:m:n:P:p:qR:r:S:s:T:t:" \
|
||||
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:L:m:n:P:p:qR:r:S:s:T:t:" \
|
||||
"v:V"
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (ch) {
|
||||
@@ -322,11 +322,6 @@ main(int argc, char **argv) {
|
||||
fatal("cannot open directory %s: %s",
|
||||
directory, isc_result_totext(ret));
|
||||
break;
|
||||
case 'k':
|
||||
fatal("The -k option has been deprecated.\n"
|
||||
"To generate a key-signing key, use -f KSK.\n"
|
||||
"To generate a key with TYPE=KEY, use -T KEY.\n");
|
||||
break;
|
||||
case 'L':
|
||||
ttl = strtottl(isc_commandline_argument);
|
||||
setttl = true;
|
||||
|
||||
@@ -58,11 +58,10 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-keygen</command>
|
||||
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-3</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
@@ -77,6 +76,7 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
||||
@@ -87,7 +87,6 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-z</option></arg>
|
||||
<arg choice="req" rep="norepeat">name</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
@@ -118,6 +117,20 @@
|
||||
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>-3</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||
If this option is used with an algorithm that has both
|
||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
|
||||
specifies the NSEC3RSASHA1 algorithm.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
@@ -157,11 +170,9 @@
|
||||
<para>
|
||||
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 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC keys must be
|
||||
between 1 and 512 bits. Elliptic curve algorithms don't need
|
||||
this parameter.
|
||||
between 1024 and 4096 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. Elliptic curve algorithms don't need this
|
||||
parameter.
|
||||
</para>
|
||||
<para>
|
||||
If the key size is not specified, some algorithms have
|
||||
@@ -173,43 +184,16 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the owner type of the key. The value of
|
||||
<option>nametype</option> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||
with a host (KEY)), USER (for a key associated with a
|
||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-3</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||
If this option is used with an algorithm that has both
|
||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
|
||||
specifies the NSEC3RSASHA1 algorithm.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-C</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Compatibility mode: generates an old-style key, without
|
||||
any metadata. By default, <command>dnssec-keygen</command>
|
||||
will include the key's creation date in the metadata stored
|
||||
with the private key, and other dates may be set there as well
|
||||
(publication date, activation date, etc). Keys that include
|
||||
this data may be incompatible with older versions of BIND; the
|
||||
Compatibility mode: generates an old-style key, without any
|
||||
timing metadata. By default, <command>dnssec-keygen</command>
|
||||
will include the key's creation date in the metadata stored with
|
||||
the private key, and other dates may be set there as well
|
||||
(publication date, activation date, etc). Keys that include this
|
||||
data may be incompatible with older versions of BIND; the
|
||||
<option>-C</option> option suppresses them.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -293,15 +277,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Deprecated in favor of -T KEY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-L <replaceable class="parameter">ttl</replaceable></term>
|
||||
<listitem>
|
||||
@@ -318,14 +293,28 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the owner type of the key. The value of
|
||||
<option>nametype</option> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||
with a host (KEY)), USER (for a key associated with a
|
||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">protocol</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
Sets the protocol value for the generated key, for use
|
||||
with <option>-T KEY</option>. The protocol is a number between 0
|
||||
and 255. The default is 3 (DNSSEC). Other possible values for
|
||||
this argument are listed in RFC 2535 and its successors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -383,10 +372,6 @@
|
||||
<option>rrtype</option> must be either DNSKEY or KEY. The
|
||||
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
||||
overridden to KEY for use with SIG(0).
|
||||
<para>
|
||||
</para>
|
||||
Specifying any TSIG algorithm (HMAC-* or DH) with
|
||||
<option>-a</option> forces this option to KEY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -395,19 +380,11 @@
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates the use of the key. <option>type</option> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
Indicates the use of the key, for use with <option>-T
|
||||
KEY</option>. <option>type</option> must be one of AUTHCONF,
|
||||
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
|
||||
refers to the ability to authenticate data, and CONF the ability
|
||||
to encrypt data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -421,6 +398,15 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
@@ -585,10 +571,12 @@
|
||||
key.
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.key</filename> file contains a DNS KEY record
|
||||
that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
The <filename>.key</filename> file contains a DNSKEY or KEY record.
|
||||
When a zone is being signed by <command>named</command>
|
||||
or <command>dnssec-signzone</command> <option>-S</option>, DNSKEY
|
||||
records are included automatically. In other cases,
|
||||
the <filename>.key</filename> file can be inserted into a zone file
|
||||
manually or with a <userinput>$INCLUDE</userinput> statement.
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.private</filename> file contains
|
||||
@@ -596,21 +584,16 @@
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</para>
|
||||
<para>
|
||||
Both <filename>.key</filename> and <filename>.private</filename>
|
||||
files are generated for symmetric cryptography algorithms such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>EXAMPLE</title></info>
|
||||
|
||||
<para>
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
To generate an ECDSAP256SHA256 zone-signing key for the zone
|
||||
<userinput>example.com</userinput>, issue the command:
|
||||
</para>
|
||||
<para><userinput>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</userinput>
|
||||
<para>
|
||||
<userinput>dnssec-keygen -a ECDSAP256SHA256 example.com</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print a string of the form:
|
||||
@@ -623,6 +606,12 @@
|
||||
and
|
||||
<filename>Kexample.com.+013+26160.private</filename>.
|
||||
</para>
|
||||
<para>
|
||||
To generate a matching key-signing key, issue the command:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</userinput>
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
|
||||
@@ -33,11 +33,10 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-keygen</code>
|
||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
|
||||
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
|
||||
[<code class="option">-3</code>]
|
||||
[<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>]
|
||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
|
||||
[<code class="option">-C</code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
|
||||
@@ -52,6 +51,7 @@
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
[<code class="option">-k</code>]
|
||||
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
|
||||
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
|
||||
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
|
||||
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
|
||||
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
||||
@@ -62,7 +62,6 @@
|
||||
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
||||
[<code class="option">-V</code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-z</code>]
|
||||
{name}
|
||||
</p></div>
|
||||
</div>
|
||||
@@ -95,6 +94,16 @@
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-3</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||
If this option is used with an algorithm that has both
|
||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
|
||||
specifies the NSEC3RSASHA1 algorithm.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -130,11 +139,9 @@
|
||||
<p>
|
||||
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 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC keys must be
|
||||
between 1 and 512 bits. Elliptic curve algorithms don't need
|
||||
this parameter.
|
||||
between 1024 and 4096 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. Elliptic curve algorithms don't need this
|
||||
parameter.
|
||||
</p>
|
||||
<p>
|
||||
If the key size is not specified, some algorithms have
|
||||
@@ -144,36 +151,15 @@
|
||||
<code class="option">-f KSK</code>) default to 2048 bits.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the owner type of the key. The value of
|
||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||
with a host (KEY)), USER (for a key associated with a
|
||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-3</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||
If this option is used with an algorithm that has both
|
||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
|
||||
specifies the NSEC3RSASHA1 algorithm.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-C</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Compatibility mode: generates an old-style key, without
|
||||
any metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
|
||||
will include the key's creation date in the metadata stored
|
||||
with the private key, and other dates may be set there as well
|
||||
(publication date, activation date, etc). Keys that include
|
||||
this data may be incompatible with older versions of BIND; the
|
||||
Compatibility mode: generates an old-style key, without any
|
||||
timing metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
|
||||
will include the key's creation date in the metadata stored with
|
||||
the private key, and other dates may be set there as well
|
||||
(publication date, activation date, etc). Keys that include this
|
||||
data may be incompatible with older versions of BIND; the
|
||||
<code class="option">-C</code> option suppresses them.
|
||||
</p>
|
||||
</dd>
|
||||
@@ -234,12 +220,6 @@
|
||||
Sets the directory in which the key files are to be written.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Deprecated in favor of -T KEY.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -253,13 +233,24 @@
|
||||
or <code class="literal">none</code> is the same as leaving it unset.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the owner type of the key. The value of
|
||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||
with a host (KEY)), USER (for a key associated with a
|
||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
Sets the protocol value for the generated key, for use
|
||||
with <code class="option">-T KEY</code>. The protocol is a number between 0
|
||||
and 255. The default is 3 (DNSSEC). Other possible values for
|
||||
this argument are listed in RFC 2535 and its successors.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
@@ -306,26 +297,15 @@
|
||||
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
||||
overridden to KEY for use with SIG(0).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Specifying any TSIG algorithm (HMAC-* or DH) with
|
||||
<code class="option">-a</code> forces this option to KEY.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates the use of the key. <code class="option">type</code> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the debugging level.
|
||||
Indicates the use of the key, for use with <code class="option">-T
|
||||
KEY</code>. <code class="option">type</code> must be one of AUTHCONF,
|
||||
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
|
||||
refers to the ability to authenticate data, and CONF the ability
|
||||
to encrypt data.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-V</span></dt>
|
||||
@@ -334,6 +314,12 @@
|
||||
Prints version information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the debugging level.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
|
||||
@@ -476,10 +462,12 @@
|
||||
key.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.key</code> file contains a DNS KEY record
|
||||
that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
The <code class="filename">.key</code> file contains a DNSKEY or KEY record.
|
||||
When a zone is being signed by <span class="command"><strong>named</strong></span>
|
||||
or <span class="command"><strong>dnssec-signzone</strong></span> <code class="option">-S</code>, DNSKEY
|
||||
records are included automatically. In other cases,
|
||||
the <code class="filename">.key</code> file can be inserted into a zone file
|
||||
manually or with a <strong class="userinput"><code>$INCLUDE</code></strong> statement.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.private</code> file contains
|
||||
@@ -487,22 +475,17 @@
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</p>
|
||||
<p>
|
||||
Both <code class="filename">.key</code> and <code class="filename">.private</code>
|
||||
files are generated for symmetric cryptography algorithms such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.11"></a><h2>EXAMPLE</h2>
|
||||
|
||||
<p>
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
To generate an ECDSAP256SHA256 zone-signing key for the zone
|
||||
<strong class="userinput"><code>example.com</code></strong>, issue the command:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</code></strong>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 example.com</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
@@ -515,6 +498,12 @@
|
||||
and
|
||||
<code class="filename">Kexample.com.+013+26160.private</code>.
|
||||
</p>
|
||||
<p>
|
||||
To generate a matching key-signing key, issue the command:
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</code></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
|
||||
+10
-4
@@ -46,13 +46,14 @@ 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} ${MAXMINDDB_CFLAGS} \
|
||||
@OPENSSL_INCLUDES@
|
||||
|
||||
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@
|
||||
@@ -85,9 +86,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@ \
|
||||
@GEOIPLINKOBJS@ @GEOIP2LINKOBJS@ \
|
||||
log.@O@ logconf.@O@ main.@O@ \
|
||||
server.@O@ statschannel.@O@ \
|
||||
tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \
|
||||
@@ -98,9 +101,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 \
|
||||
@GEOIPLINKSRCS@ @GEOIP2LINKSRCS@ \
|
||||
log.c logconf.c main.c \
|
||||
server.c statschannel.c \
|
||||
tkeyconf.c tsigconf.c zoneconf.c \
|
||||
@@ -132,6 +137,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
|
||||
|
||||
+69
-40
@@ -15,6 +15,15 @@
|
||||
<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 );
|
||||
});
|
||||
</script>
|
||||
|
||||
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
|
||||
<!-- Non Mozilla specific markup -->
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi"/>
|
||||
@@ -221,6 +230,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 +318,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 +355,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 +642,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 +656,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 +668,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 +679,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 +691,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 +702,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 +714,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 +725,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 +759,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]">
|
||||
|
||||
+65
-36
@@ -20,6 +20,15 @@ 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"
|
||||
" });\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"
|
||||
@@ -226,6 +235,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 +323,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 +360,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 +647,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 +661,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 +673,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 +684,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 +696,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 +707,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 +719,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 +730,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 +764,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"
|
||||
|
||||
+5
-5
@@ -66,6 +66,9 @@ options {\n\
|
||||
#ifndef WIN32
|
||||
" files unlimited;\n"
|
||||
#endif
|
||||
#ifdef HAVE_GEOIP2
|
||||
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
|
||||
#endif
|
||||
"\
|
||||
# has-old-clients <obsolete>;\n\
|
||||
heartbeat-interval 60;\n\
|
||||
@@ -154,11 +157,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"
|
||||
|
||||
+120
-20
@@ -13,20 +13,27 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined(HAVE_GEOIP2)
|
||||
#include <maxminddb.h>
|
||||
#elif defined(HAVE_GEOIP)
|
||||
#include <GeoIP.h>
|
||||
#include <GeoIPCity.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>
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
static dns_geoip_databases_t geoip_table = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
static dns_geoip_databases_t geoip_table = DNS_GEOIP_DATABASE_INIT;
|
||||
|
||||
#if defined(HAVE_GEOIP)
|
||||
static void
|
||||
init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
|
||||
init_geoip_db(void **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
|
||||
GeoIPOptions method, const char *name)
|
||||
{
|
||||
char *info;
|
||||
@@ -34,7 +41,7 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
|
||||
|
||||
REQUIRE(dbp != NULL);
|
||||
|
||||
db = *dbp;
|
||||
db = (GeoIP *)*dbp;
|
||||
|
||||
if (db != NULL) {
|
||||
GeoIP_delete(db);
|
||||
@@ -72,32 +79,93 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
|
||||
|
||||
*dbp = db;
|
||||
return;
|
||||
|
||||
fail:
|
||||
if (fallback != 0)
|
||||
if (fallback != 0) {
|
||||
init_geoip_db(dbp, fallback, 0, method, name);
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* HAVE_GEOIP */
|
||||
#elif defined(HAVE_GEOIP2)
|
||||
static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
|
||||
|
||||
static MMDB_s *
|
||||
open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
|
||||
char pathbuf[PATH_MAX];
|
||||
unsigned int n;
|
||||
int ret;
|
||||
|
||||
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 != NULL) ? dir : ".", dbfile);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
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,
|
||||
"opened GeoIP2 database '%s'", pathbuf);
|
||||
return (mmdb);
|
||||
}
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
|
||||
"unable to open GeoIP2 database '%s' (status %d)",
|
||||
pathbuf, ret);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
#endif /* HAVE_GEOIP2 */
|
||||
|
||||
|
||||
void
|
||||
named_geoip_init(void) {
|
||||
#ifndef HAVE_GEOIP
|
||||
return;
|
||||
#else
|
||||
GeoIP_cleanup();
|
||||
if (named_g_geoip == NULL)
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
if (named_g_geoip == NULL) {
|
||||
named_g_geoip = &geoip_table;
|
||||
}
|
||||
#if defined(HAVE_GEOIP)
|
||||
GeoIP_cleanup();
|
||||
#endif
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
named_geoip_load(char *dir) {
|
||||
#ifndef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP2)
|
||||
REQUIRE(dir != NULL);
|
||||
|
||||
UNUSED(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);
|
||||
}
|
||||
|
||||
return;
|
||||
#else
|
||||
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);
|
||||
#elif defined(HAVE_GEOIP)
|
||||
GeoIPOptions method;
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -141,5 +209,37 @@ named_geoip_load(char *dir) {
|
||||
method, "Domain");
|
||||
init_geoip_db(&named_g_geoip->netspeed, GEOIP_NETSPEED_EDITION, 0,
|
||||
method, "NetSpeed");
|
||||
#endif /* HAVE_GEOIP */
|
||||
#else
|
||||
UNUSED(dir);
|
||||
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
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 */
|
||||
|
||||
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_GEOIP) || defined(HAVE_GEOIP2)
|
||||
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
|
||||
#endif
|
||||
|
||||
|
||||
+14
-12
@@ -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-04-25
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\&.CONF" "5" "2018\-12\-07" "ISC" "BIND9"
|
||||
.TH "NAMED\&.CONF" "5" "2019\-04\-25" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -409,11 +409,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 ]
|
||||
@@ -761,11 +762,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 ]
|
||||
|
||||
@@ -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-04-25</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
@@ -403,11 +403,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> ]
|
||||
@@ -735,11 +736,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> ]
|
||||
|
||||
+12
-10
@@ -390,11 +390,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>
|
||||
@@ -727,11 +728,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>
|
||||
|
||||
+174
-85
@@ -108,9 +108,9 @@
|
||||
|
||||
#include <named/config.h>
|
||||
#include <named/control.h>
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
#include <named/geoip.h>
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
|
||||
#include <named/log.h>
|
||||
#include <named/logconf.h>
|
||||
#include <named/main.h>
|
||||
@@ -165,23 +165,23 @@
|
||||
* using it has a 'result' variable and a 'cleanup' label.
|
||||
*/
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) goto cleanup; \
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
#define TCHECK(op) \
|
||||
do { tresult = (op); \
|
||||
if (tresult != ISC_R_SUCCESS) { \
|
||||
isc_buffer_clear(*text); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
do { tresult = (op); \
|
||||
if (tresult != ISC_R_SUCCESS) { \
|
||||
isc_buffer_clear(*text); \
|
||||
goto cleanup; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define CHECKM(op, msg) \
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
isc_log_write(named_g_lctx, \
|
||||
NAMED_LOGCATEGORY_GENERAL, \
|
||||
NAMED_LOGCATEGORY_GENERAL, \
|
||||
NAMED_LOGMODULE_SERVER, \
|
||||
ISC_LOG_ERROR, \
|
||||
"%s: %s", msg, \
|
||||
@@ -194,7 +194,7 @@
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
isc_log_write(named_g_lctx, \
|
||||
NAMED_LOGCATEGORY_GENERAL, \
|
||||
NAMED_LOGCATEGORY_GENERAL, \
|
||||
NAMED_LOGMODULE_SERVER, \
|
||||
ISC_LOG_ERROR, \
|
||||
"%s '%s': %s", msg, file, \
|
||||
@@ -703,7 +703,8 @@ 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, isc_mem_t *mctx)
|
||||
bool managed, dst_key_t **target, const char **keynamestrp,
|
||||
isc_mem_t *mctx)
|
||||
{
|
||||
dns_rdataclass_t viewclass;
|
||||
dns_rdata_dnskey_t keystruct;
|
||||
@@ -721,12 +722,14 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
dst_key_t *dstkey = NULL;
|
||||
|
||||
INSIST(target != NULL && *target == NULL);
|
||||
INSIST(keynamestrp != NULL && *keynamestrp == NULL);
|
||||
|
||||
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
|
||||
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
|
||||
alg = cfg_obj_asuint32(cfg_tuple_get(key, "algorithm"));
|
||||
keyname = dns_fixedname_name(&fkeyname);
|
||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||
*keynamestrp = keynamestr;
|
||||
|
||||
if (managed) {
|
||||
const char *initmethod;
|
||||
@@ -760,6 +763,8 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
|
||||
if (flags > 0xffff)
|
||||
CHECKM(ISC_R_RANGE, "key flags");
|
||||
if (flags & DNS_KEYFLAG_REVOKE)
|
||||
CHECKM(DST_R_BADKEYTYPE, "key flags revoke bit set");
|
||||
if (proto > 0xff)
|
||||
CHECKM(ISC_R_RANGE, "key protocol");
|
||||
if (alg > 0xff)
|
||||
@@ -799,26 +804,118 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (result == DST_R_NOCRYPTO) {
|
||||
if (dstkey != NULL) {
|
||||
dst_key_free(&dstkey);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Parse 'key' in the context of view configuration 'vconfig'. If successful,
|
||||
* add the key to 'secroots' if both of the following conditions are true:
|
||||
*
|
||||
* - 'keyname_match' is NULL or it matches the owner name of 'key',
|
||||
* - support for the algorithm used by 'key' is not disabled by 'resolver'
|
||||
* for the owner name of 'key'.
|
||||
*
|
||||
* 'managed' is true for managed keys and false for trusted keys. 'mctx' is
|
||||
* 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)
|
||||
{
|
||||
const dns_name_t *keyname = NULL;
|
||||
const char *keynamestr = NULL;
|
||||
dst_key_t *dstkey = NULL;
|
||||
unsigned int keyalg;
|
||||
isc_result_t result;
|
||||
|
||||
result = dstkey_fromconfig(vconfig, key, managed, &dstkey, &keynamestr,
|
||||
mctx);
|
||||
|
||||
switch (result) {
|
||||
case ISC_R_SUCCESS:
|
||||
/*
|
||||
* Key was parsed correctly, its algorithm is supported by the
|
||||
* crypto library, and it is not revoked.
|
||||
*/
|
||||
keyname = dst_key_name(dstkey);
|
||||
keyalg = dst_key_alg(dstkey);
|
||||
break;
|
||||
case DST_R_UNSUPPORTEDALG:
|
||||
case DST_R_BADKEYTYPE:
|
||||
/*
|
||||
* Key was parsed correctly, but it cannot be used; this is not
|
||||
* a fatal error - log a warning about this key being ignored,
|
||||
* 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",
|
||||
keynamestr, isc_result_totext(result));
|
||||
return (ISC_R_SUCCESS);
|
||||
case DST_R_NOCRYPTO:
|
||||
/*
|
||||
* 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",
|
||||
keynamestr);
|
||||
} else if (result == DST_R_UNSUPPORTEDALG) {
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"skipping %s key for '%s': %s",
|
||||
managed ? "managed" : "trusted",
|
||||
keynamestr, isc_result_totext(result));
|
||||
} else {
|
||||
return (result);
|
||||
default:
|
||||
/*
|
||||
* Something unexpected happened; we have no choice but to
|
||||
* indicate an error so that the configuration loading process
|
||||
* is interrupted.
|
||||
*/
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
|
||||
"configuring %s key for '%s': %s",
|
||||
managed ? "managed" : "trusted",
|
||||
keynamestr, isc_result_totext(result));
|
||||
result = ISC_R_FAILURE;
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (dstkey != NULL)
|
||||
/*
|
||||
* If the caller requested to only load keys for a specific name and
|
||||
* the owner name of this key does not match the requested name, do not
|
||||
* load it.
|
||||
*/
|
||||
if (keyname_match != NULL && !dns_name_equal(keyname_match, keyname)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that 'resolver' allows using the algorithm of this key for
|
||||
* its owner name. If it does not, do not load the key and log a
|
||||
* warning, but do not prevent further keys from being processed.
|
||||
*/
|
||||
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);
|
||||
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.
|
||||
*/
|
||||
result = dns_keytable_add(secroots, managed, managed, &dstkey);
|
||||
|
||||
done:
|
||||
/*
|
||||
* Ensure 'dstkey' does not leak. Note that if dns_keytable_add()
|
||||
* succeeds, ownership of the key structure is transferred to the key
|
||||
* table, i.e. 'dstkey' is set to NULL.
|
||||
*/
|
||||
if (dstkey != NULL) {
|
||||
dst_key_free(&dstkey);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -834,8 +931,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
|
||||
const dns_name_t *keyname, isc_mem_t *mctx)
|
||||
{
|
||||
const cfg_listelt_t *elt, *elt2;
|
||||
const cfg_obj_t *key, *keylist;
|
||||
dst_key_t *dstkey = NULL;
|
||||
const cfg_obj_t *keylist;
|
||||
isc_result_t result;
|
||||
dns_keytable_t *secroots = NULL;
|
||||
|
||||
@@ -851,42 +947,13 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
|
||||
elt2 != NULL;
|
||||
elt2 = cfg_list_next(elt2))
|
||||
{
|
||||
key = cfg_listelt_value(elt2);
|
||||
result = dstkey_fromconfig(vconfig, key, managed,
|
||||
&dstkey, mctx);
|
||||
if (result == DST_R_UNSUPPORTEDALG) {
|
||||
result = ISC_R_SUCCESS;
|
||||
continue;
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* If keyname was specified, we only add that key.
|
||||
*/
|
||||
if (keyname != NULL &&
|
||||
!dns_name_equal(keyname, dst_key_name(dstkey)))
|
||||
{
|
||||
dst_key_free(&dstkey);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
CHECK(dns_keytable_add(secroots, managed,
|
||||
managed, &dstkey));
|
||||
CHECK(process_key(cfg_listelt_value(elt2), vconfig,
|
||||
secroots, keyname, view->resolver,
|
||||
managed, mctx));
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (dstkey != NULL) {
|
||||
dst_key_free(&dstkey);
|
||||
}
|
||||
if (secroots != NULL) {
|
||||
dns_keytable_detach(&secroots);
|
||||
}
|
||||
@@ -2115,6 +2182,7 @@ configure_rpz_name2(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
|
||||
static isc_result_t
|
||||
configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
|
||||
bool recursive_only_default,
|
||||
bool add_soa_default,
|
||||
dns_ttl_t ttl_default,
|
||||
uint32_t minupdateinterval_default,
|
||||
const dns_rpz_zone_t *old,
|
||||
@@ -2259,6 +2327,13 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
|
||||
!dns_name_equal(&old->cname, &zone->cname)))
|
||||
*old_rpz_okp = false;
|
||||
|
||||
obj = cfg_tuple_get(rpz_obj, "add-soa");
|
||||
if (cfg_obj_isvoid(obj)) {
|
||||
zone->addsoa = add_soa_default;
|
||||
} else {
|
||||
zone->addsoa = cfg_obj_asboolean(obj);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -2271,7 +2346,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
char *rps_cstr;
|
||||
size_t rps_cstr_size;
|
||||
const cfg_obj_t *sub_obj;
|
||||
bool recursive_only_default;
|
||||
bool recursive_only_default, add_soa_default;
|
||||
bool nsip_enabled, nsdname_enabled;
|
||||
dns_rpz_zbits_t nsip_on, nsdname_on;
|
||||
dns_ttl_t ttl_default;
|
||||
@@ -2367,6 +2442,13 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
recursive_only_default = true;
|
||||
}
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "add-soa");
|
||||
if (!cfg_obj_isvoid(sub_obj) && !cfg_obj_asboolean(sub_obj)) {
|
||||
add_soa_default = false;
|
||||
} else {
|
||||
add_soa_default = true;
|
||||
}
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "break-dnssec");
|
||||
if (!cfg_obj_isvoid(sub_obj) && cfg_obj_asboolean(sub_obj)) {
|
||||
zones->p.break_dnssec = true;
|
||||
@@ -2429,6 +2511,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
}
|
||||
result = configure_rpz_zone(view, zone_element,
|
||||
recursive_only_default,
|
||||
add_soa_default,
|
||||
ttl_default,
|
||||
minupdateinterval_default,
|
||||
old_zone, old_rpz_okp);
|
||||
@@ -3655,9 +3738,21 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
|
||||
void *callback_data)
|
||||
{
|
||||
dns_view_t *view = callback_data;
|
||||
char full_path[PATH_MAX];
|
||||
isc_result_t result;
|
||||
|
||||
result = ns_plugin_register(plugin_path, parameters, config,
|
||||
result = ns_plugin_expandpath(plugin_path,
|
||||
full_path, sizeof(full_path));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"%s: plugin configuration failed: "
|
||||
"unable to get full plugin path: %s",
|
||||
plugin_path, isc_result_totext(result));
|
||||
return (result);
|
||||
}
|
||||
|
||||
result = ns_plugin_register(full_path, parameters, config,
|
||||
cfg_obj_file(obj), cfg_obj_line(obj),
|
||||
named_g_mctx, named_g_lctx,
|
||||
named_g_aclconfctx, view);
|
||||
@@ -3665,7 +3760,7 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"%s: plugin configuration failed: %s",
|
||||
plugin_path, isc_result_totext(result));
|
||||
full_path, isc_result_totext(result));
|
||||
}
|
||||
|
||||
return (result);
|
||||
@@ -4993,8 +5088,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
|
||||
/*
|
||||
* Configure default allow-update and allow-update-forwarding ACLs,
|
||||
* so they can be inherited by zones. (Note these cannot be set at
|
||||
* options/view level.)
|
||||
* so they can be inherited by zones. (XXX: These are not
|
||||
* read from the options/view level here. However, they may be
|
||||
* read from there in zoneconf.c:configure_zone_acl() later.)
|
||||
*/
|
||||
if (view->updateacl == NULL) {
|
||||
CHECK(configure_view_acl(NULL, NULL, named_g_config,
|
||||
@@ -8187,7 +8283,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
}
|
||||
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
/*
|
||||
* Initialize GeoIP databases from the configured location.
|
||||
* This should happen before configuring any ACLs, so that we
|
||||
@@ -8204,7 +8300,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
named_geoip_load(NULL);
|
||||
}
|
||||
named_g_aclconfctx->geoip = named_g_geoip;
|
||||
#endif /* HAVE_GEOIP */
|
||||
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
|
||||
|
||||
/*
|
||||
* Configure various server options.
|
||||
@@ -9417,25 +9513,18 @@ 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,
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
named_g_geoip,
|
||||
&server->interfacemgr),
|
||||
"creating interface manager");
|
||||
#else
|
||||
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,
|
||||
#endif
|
||||
&server->interfacemgr),
|
||||
"creating interface manager");
|
||||
#endif
|
||||
|
||||
CHECKFATAL(isc_timer_create(named_g_timermgr, isc_timertype_inactive,
|
||||
NULL, NULL, server->task,
|
||||
@@ -9557,9 +9646,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_GEOIP) || defined(HAVE_GEOIP2)
|
||||
named_geoip_shutdown();
|
||||
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
|
||||
|
||||
dns_db_detach(&server->in_roothints);
|
||||
|
||||
@@ -9675,14 +9764,14 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
&server->sctx),
|
||||
"creating server context");
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
/*
|
||||
* GeoIP must be initialized before the interface
|
||||
* manager (which includes the ACL environment)
|
||||
* is created
|
||||
*/
|
||||
named_geoip_init();
|
||||
#endif
|
||||
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
|
||||
|
||||
#ifdef ENABLE_AFL
|
||||
server->sctx->fuzztype = named_g_fuzz_type;
|
||||
@@ -10570,7 +10659,7 @@ add_zone_tolist(dns_zone_t *zone, void *uap) {
|
||||
struct zonelistentry *zle;
|
||||
|
||||
zle = isc_mem_get(dctx->mctx, sizeof *zle);
|
||||
if (zle == NULL)
|
||||
if (zle == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
zle->zone = NULL;
|
||||
dns_zone_attach(zone, &zle->zone);
|
||||
@@ -11453,13 +11542,13 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
? "ON" : "OFF");
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
snprintf(line, sizeof(line), "recursive clients: %d/%d/%d\n",
|
||||
snprintf(line, sizeof(line), "recursive clients: %u/%u/%u\n",
|
||||
isc_quota_getused(&server->sctx->recursionquota),
|
||||
isc_quota_getsoft(&server->sctx->recursionquota),
|
||||
isc_quota_getmax(&server->sctx->recursionquota));
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
snprintf(line, sizeof(line), "tcp clients: %d/%d\n",
|
||||
snprintf(line, sizeof(line), "tcp clients: %u/%u\n",
|
||||
isc_quota_getused(&server->sctx->tcpquota),
|
||||
isc_quota_getmax(&server->sctx->tcpquota));
|
||||
CHECK(putstr(text, line));
|
||||
@@ -14664,13 +14753,13 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
"added NTA '%s' (%d sec) in view '%s'",
|
||||
namebuf, ntattl, view->name);
|
||||
} else {
|
||||
bool removed;
|
||||
bool wasremoved;
|
||||
|
||||
result = dns_ntatable_delete(ntatable, ntaname);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
removed = true;
|
||||
wasremoved = true;
|
||||
} else if (result == ISC_R_NOTFOUND) {
|
||||
removed = false;
|
||||
wasremoved = false;
|
||||
} else {
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -14681,13 +14770,13 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
first = false;
|
||||
|
||||
CHECK(putstr(text, "Negative trust anchor "));
|
||||
CHECK(putstr(text, removed ? "removed: "
|
||||
: "not found: "));
|
||||
CHECK(putstr(text, wasremoved ? "removed: "
|
||||
: "not found: "));
|
||||
CHECK(putstr(text, namebuf));
|
||||
CHECK(putstr(text, "/"));
|
||||
CHECK(putstr(text, view->name));
|
||||
|
||||
if (removed) {
|
||||
if (wasremoved) {
|
||||
isc_log_write(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER,
|
||||
|
||||
+152
-2
@@ -1446,6 +1446,60 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
|
||||
#endif
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
/*
|
||||
* Which statistics to include when rendering to XML
|
||||
@@ -1508,6 +1562,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];
|
||||
|
||||
@@ -1535,8 +1591,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,
|
||||
@@ -1569,6 +1625,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 */
|
||||
@@ -2289,6 +2385,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];
|
||||
|
||||
@@ -2366,6 +2464,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);
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
@@ -82,7 +82,7 @@ ServiceControl(DWORD dwCtrlCode) {
|
||||
case SERVICE_CONTROL_STOP:
|
||||
named_server_flushonshutdown(named_g_server, true);
|
||||
isc_app_shutdown();
|
||||
UpdateSCM(SERVICE_STOPPED);
|
||||
UpdateSCM(SERVICE_STOP_PENDING);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -349,9 +349,9 @@ named_os_shutdown(void) {
|
||||
if (lockfilefd != -1) {
|
||||
(void) UnlockFile((HANDLE) _get_osfhandle(lockfilefd),
|
||||
0, 0, 0, 1);
|
||||
close(lockfilefd);
|
||||
lockfilefd = -1;
|
||||
}
|
||||
cleanup_lockfile();
|
||||
|
||||
ntservice_shutdown(); /* This MUST be the last thing done */
|
||||
}
|
||||
|
||||
|
||||
+17
-2
@@ -906,6 +906,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;
|
||||
@@ -1190,14 +1192,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);
|
||||
@@ -1205,6 +1212,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
|
||||
|
||||
@@ -26,7 +26,7 @@ CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
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@
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/random.h>
|
||||
@@ -748,6 +749,34 @@ shutdown_program(isc_task_t *task, isc_event_t *event) {
|
||||
maybeshutdown();
|
||||
}
|
||||
|
||||
/*
|
||||
* Try honoring the operating system's preferred ephemeral port range.
|
||||
*/
|
||||
static void
|
||||
set_source_ports(dns_dispatchmgr_t *manager) {
|
||||
isc_portset_t *v4portset = NULL, *v6portset = NULL;
|
||||
in_port_t udpport_low, udpport_high;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_portset_create(gmctx, &v4portset);
|
||||
check_result(result, "isc_portset_create (v4)");
|
||||
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
|
||||
check_result(result, "isc_net_getudpportrange (v4)");
|
||||
isc_portset_addrange(v4portset, udpport_low, udpport_high);
|
||||
|
||||
result = isc_portset_create(gmctx, &v6portset);
|
||||
check_result(result, "isc_portset_create (v6)");
|
||||
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
|
||||
check_result(result, "isc_net_getudpportrange (v6)");
|
||||
isc_portset_addrange(v6portset, udpport_low, udpport_high);
|
||||
|
||||
result = dns_dispatchmgr_setavailports(manager, v4portset, v6portset);
|
||||
check_result(result, "dns_dispatchmgr_setavailports");
|
||||
|
||||
isc_portset_destroy(gmctx, &v4portset);
|
||||
isc_portset_destroy(gmctx, &v6portset);
|
||||
}
|
||||
|
||||
static void
|
||||
setup_system(void) {
|
||||
isc_result_t result;
|
||||
@@ -898,6 +927,8 @@ setup_system(void) {
|
||||
check_result(result, "dst_lib_init");
|
||||
is_dst_up = true;
|
||||
|
||||
set_source_ports(dispatchmgr);
|
||||
|
||||
attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
|
||||
attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
|
||||
|
||||
|
||||
@@ -187,13 +187,13 @@ main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
CK_RV rv;
|
||||
CK_SLOT_ID slot = 0;
|
||||
CK_MECHANISM mech, dpmech;
|
||||
CK_MECHANISM mech;
|
||||
CK_SESSION_HANDLE hSession;
|
||||
char *lib_name = NULL;
|
||||
char *pin = NULL;
|
||||
CK_ULONG bits = 0;
|
||||
CK_CHAR *label = NULL;
|
||||
CK_OBJECT_HANDLE privatekey, publickey, domainparams;
|
||||
CK_OBJECT_HANDLE privatekey, publickey;
|
||||
CK_BYTE exponent[5];
|
||||
CK_ULONG expsize = 0;
|
||||
pk11_context_t pctx;
|
||||
@@ -201,7 +201,6 @@ main(int argc, char *argv[]) {
|
||||
int c, errflg = 0;
|
||||
int hide = 1, quiet = 0;
|
||||
int idlen = 0, id_offset = 0;
|
||||
unsigned int i;
|
||||
unsigned long id = 0;
|
||||
CK_BYTE idbuf[4];
|
||||
CK_ULONG ulObjectCount;
|
||||
@@ -209,10 +208,7 @@ main(int argc, char *argv[]) {
|
||||
{CKA_LABEL, NULL_PTR, 0}
|
||||
};
|
||||
CK_ATTRIBUTE *public_template = NULL;
|
||||
CK_ATTRIBUTE *domain_template = NULL;
|
||||
CK_ATTRIBUTE *param_template = NULL;
|
||||
CK_ULONG public_attrcnt = 0, private_attrcnt = PRIVATE_ATTRS;
|
||||
CK_ULONG domain_attrcnt = 0, param_attrcnt = 0;
|
||||
key_class_t keyclass = key_rsa;
|
||||
pk11_optype_t op_type = OP_ANY;
|
||||
|
||||
@@ -457,46 +453,6 @@ main(int argc, char *argv[]) {
|
||||
private_template[5].pValue = &truevalue;
|
||||
}
|
||||
|
||||
if (keyclass == key_rsa || keyclass == key_ecc || keyclass == key_ecx)
|
||||
goto generate_keys;
|
||||
|
||||
/* Generate Domain parameters */
|
||||
rv = pkcs_C_GenerateKey(hSession, &dpmech, domain_template,
|
||||
domain_attrcnt, &domainparams);
|
||||
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_GenerateKey: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_search;
|
||||
}
|
||||
|
||||
/* Get Domain parameters */
|
||||
rv = pkcs_C_GetAttributeValue(hSession, domainparams,
|
||||
param_template, param_attrcnt);
|
||||
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_GetAttributeValue0: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_search;
|
||||
}
|
||||
|
||||
/* Allocate space for parameter attributes */
|
||||
for (i = 0; i < param_attrcnt; i++) {
|
||||
param_template[i].pValue = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < param_attrcnt; i++) {
|
||||
param_template[i].pValue = malloc(param_template[i].ulValueLen);
|
||||
if (param_template[i].pValue == NULL) {
|
||||
fprintf(stderr, "malloc failed\n");
|
||||
error = 1;
|
||||
goto exit_search;
|
||||
}
|
||||
}
|
||||
|
||||
generate_keys:
|
||||
/* Generate Key pair for signing/verifying */
|
||||
rv = pkcs_C_GenerateKeyPair(hSession, &mech,
|
||||
public_template, public_attrcnt,
|
||||
@@ -506,8 +462,9 @@ main(int argc, char *argv[]) {
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_GenerateKeyPair: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
} else if (!quiet)
|
||||
} else if (!quiet) {
|
||||
printf("Key pair generation complete.\n");
|
||||
}
|
||||
|
||||
exit_search:
|
||||
rv = pkcs_C_FindObjectsFinal(hSession);
|
||||
|
||||
+13
-6
@@ -17,7 +17,7 @@ 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@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
@@ -25,6 +25,7 @@ NSLIBS = ../../lib/ns/libns.@A@
|
||||
LIBS =
|
||||
|
||||
SO_TARGETS = lib/filter-aaaa.@SO@
|
||||
SO_INSTALL = filter-aaaa.@SO@
|
||||
TARGETS = @SO_TARGETS@
|
||||
|
||||
SO_OBJS = filter-aaaa.@O@
|
||||
@@ -59,14 +60,20 @@ clean distclean::
|
||||
rm -f ${TARGETS} ${OBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${plugindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: filter-aaaa.@SO@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} filter-aaaa.@SO@ \
|
||||
${DESTDIR}${libdir}
|
||||
install:: @SO_TARGETS@ installdirs
|
||||
for i in ${SO_INSTALL} ; \
|
||||
do \
|
||||
if test -f $$i ; \
|
||||
then \
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} $$i \
|
||||
${DESTDIR}${plugindir}; \
|
||||
fi \
|
||||
done
|
||||
${INSTALL_DATA} ${srcdir}/filter-aaaa.8 ${DESTDIR}${mandir}/man8
|
||||
|
||||
uninstall::
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/filter-aaaa.@SO@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${plugindir}/filter-aaaa.@SO@
|
||||
rm -f ${DESTDIR}${mandir}/man8/filter-aaaa.8
|
||||
|
||||
@@ -85,11 +85,13 @@ typedef struct filter_instance {
|
||||
* Memory pool for use with persistent data.
|
||||
*/
|
||||
isc_mempool_t *datapool;
|
||||
isc_mutex_t plock;
|
||||
|
||||
/*
|
||||
* Hash table associating a client object with its persistent data.
|
||||
*/
|
||||
isc_ht_t *ht;
|
||||
isc_mutex_t hlock;
|
||||
|
||||
/*
|
||||
* Values configured when the module is loaded.
|
||||
@@ -377,6 +379,7 @@ plugin_register(const char *parameters,
|
||||
CHECK(isc_mempool_create(mctx, sizeof(filter_data_t),
|
||||
&inst->datapool));
|
||||
CHECK(isc_ht_init(&inst->ht, mctx, 16));
|
||||
isc_mutex_init(&inst->hlock);
|
||||
|
||||
/*
|
||||
* Fill the mempool with 1K filter_aaaa state objects at
|
||||
@@ -390,6 +393,8 @@ plugin_register(const char *parameters,
|
||||
*/
|
||||
isc_mempool_setfillcount(inst->datapool, 1024);
|
||||
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
|
||||
isc_mutex_init(&inst->plock);
|
||||
isc_mempool_associatelock(inst->datapool, &inst->plock);
|
||||
|
||||
/*
|
||||
* Set hook points in the view's hooktable.
|
||||
@@ -445,9 +450,11 @@ plugin_destroy(void **instp) {
|
||||
|
||||
if (inst->ht != NULL) {
|
||||
isc_ht_destroy(&inst->ht);
|
||||
isc_mutex_destroy(&inst->hlock);
|
||||
}
|
||||
if (inst->datapool != NULL) {
|
||||
isc_mempool_destroy(&inst->datapool);
|
||||
isc_mutex_destroy(&inst->plock);
|
||||
}
|
||||
if (inst->aaaa_acl != NULL) {
|
||||
dns_acl_detach(&inst->aaaa_acl);
|
||||
@@ -517,8 +524,10 @@ client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
filter_data_t *client_state = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
LOCK(&inst->hlock);
|
||||
result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client), (void **)&client_state);
|
||||
UNLOCK(&inst->hlock);
|
||||
|
||||
return (result == ISC_R_SUCCESS ? client_state : NULL);
|
||||
}
|
||||
@@ -536,8 +545,10 @@ client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
client_state->mode = NONE;
|
||||
client_state->flags = 0;
|
||||
|
||||
LOCK(&inst->hlock);
|
||||
result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client), client_state);
|
||||
UNLOCK(&inst->hlock);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -550,8 +561,10 @@ client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOCK(&inst->hlock);
|
||||
result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client));
|
||||
UNLOCK(&inst->hlock);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
isc_mempool_put(inst->datapool, client_state);
|
||||
|
||||
+19
-17
@@ -49,7 +49,7 @@ and
|
||||
\fBdnssec\-settime\fR\&.
|
||||
.PP
|
||||
DNSSEC policy can be read from a configuration file (default
|
||||
/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a default policy used for all zones\&.
|
||||
/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a "default" policy used for all zones\&.
|
||||
.PP
|
||||
When
|
||||
\fBdnssec\-keymgr\fR
|
||||
@@ -181,7 +181,8 @@ would be used for zones that had unusually high security needs\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
Algorithm policies: (\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR
|
||||
\fIAlgorithm policies:\fR
|
||||
(\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR
|
||||
) override default per\-algorithm settings\&. For example, by default, RSASHA256 keys use 2048\-bit key sizes for both KSK and ZSK\&. This can be modified using
|
||||
\fBalgorithm\-policy\fR, and the new key sizes would then be used for any key of type RSASHA256\&.
|
||||
.RE
|
||||
@@ -194,59 +195,60 @@ Algorithm policies: (\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
Zone policies: (\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR
|
||||
\fIZone policies:\fR
|
||||
(\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR
|
||||
) set policy for a single zone by name\&. A zone policy can inherit a policy class by including a
|
||||
\fBpolicy\fR
|
||||
option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&.
|
||||
option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&. If a zone does not have its own policy then the "default" policy applies\&.
|
||||
.RE
|
||||
.PP
|
||||
Options that can be specified in policies:
|
||||
.PP
|
||||
\fBalgorithm\fR
|
||||
\fBalgorithm\fR \fIname\fR;
|
||||
.RS 4
|
||||
The key algorithm\&. If no policy is defined, the default is RSASHA256\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBcoverage\fR
|
||||
\fBcoverage\fR \fIduration\fR;
|
||||
.RS 4
|
||||
The length of time to ensure that keys will be correct; no action will be taken to create new keys to be activated after this time\&. This can be represented as a number of seconds, or as a duration using human\-readable units (examples: "1y" or "6 months")\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is six months\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBdirectory\fR
|
||||
\fBdirectory\fR \fIpath\fR;
|
||||
.RS 4
|
||||
Specifies the directory in which keys should be stored\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBkey\-size\fR
|
||||
\fBkey\-size\fR \fIkeytype\fR \fIsize\fR;
|
||||
.RS 4
|
||||
Specifies the number of bits to use in creating keys\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and size\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
|
||||
Specifies the number of bits to use in creating keys\&. The keytype is either "zsk" or "ksk"\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBkeyttl\fR
|
||||
\fBkeyttl\fR \fIduration\fR;
|
||||
.RS 4
|
||||
The key TTL\&. If no policy is defined, the default is one hour\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBpost\-publish\fR
|
||||
\fBpost\-publish\fR \fIkeytype\fR \fIduration\fR;
|
||||
.RS 4
|
||||
How long after inactivation a key should be deleted from the zone\&. Note: If
|
||||
\fBroll\-period\fR
|
||||
is not set, this value is ignored\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
|
||||
is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBpre\-publish\fR
|
||||
\fBpre\-publish\fR \fIkeytype\fR \fIduration\fR;
|
||||
.RS 4
|
||||
How long before activation a key should be published\&. Note: If
|
||||
\fBroll\-period\fR
|
||||
is not set, this value is ignored\&. Takes two arguments: keytype (either "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
|
||||
is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBroll\-period\fR
|
||||
\fBroll\-period\fR \fIkeytype\fR \fIduration\fR;
|
||||
.RS 4
|
||||
How frequently keys should be rolled over\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSK\*(Aqs\&. KSK\*(Aqs do not roll over by default\&.
|
||||
How frequently keys should be rolled over\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSKs\&. KSKs do not roll over by default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBstandby\fR
|
||||
\fBstandby\fR \fIkeytype\fR \fInumber\fR;
|
||||
.RS 4
|
||||
Not yet implemented\&.
|
||||
.RE
|
||||
|
||||
@@ -57,11 +57,12 @@
|
||||
</p>
|
||||
<p>
|
||||
DNSSEC policy can be read from a configuration file (default
|
||||
<code class="filename">/etc/dnssec-policy.conf</code>), from which the key
|
||||
parameters, publication and rollover schedule, and desired
|
||||
coverage duration for any given zone can be determined. This
|
||||
<code class="filename">/etc/dnssec-policy.conf</code>), from which the
|
||||
key parameters, publication and rollover schedule, and desired
|
||||
coverage duration for any given zone can be determined. This
|
||||
file may be used to define individual DNSSEC policies on a
|
||||
per-zone basis, or to set a default policy used for all zones.
|
||||
per-zone basis, or to set a "<code class="literal">default</code>" policy
|
||||
used for all zones.
|
||||
</p>
|
||||
<p>
|
||||
When <span class="command"><strong>dnssec-keymgr</strong></span> runs, it examines the DNSSEC
|
||||
@@ -210,7 +211,7 @@
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<p>
|
||||
Algorithm policies:
|
||||
<span class="emphasis"><em>Algorithm policies:</em></span>
|
||||
(<code class="option">algorithm-policy <em class="replaceable"><code>algorithm</code></em> { ... };</code> )
|
||||
override default per-algorithm settings. For example, by default,
|
||||
RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This
|
||||
@@ -220,11 +221,13 @@
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<p>
|
||||
Zone policies:
|
||||
<span class="emphasis"><em>Zone policies:</em></span>
|
||||
(<code class="option">zone <em class="replaceable"><code>name</code></em> { ... };</code> )
|
||||
set policy for a single zone by name. A zone policy can inherit
|
||||
a policy class by including a <code class="option">policy</code> option.
|
||||
Zone names beginning with digits (i.e., 0-9) must be quoted.
|
||||
If a zone does not have its own policy then the
|
||||
"<code class="literal">default</code>" policy applies.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
@@ -232,81 +235,90 @@
|
||||
Options that can be specified in policies:
|
||||
</p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term"><span class="command"><strong>algorithm</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>algorithm</strong></span>
|
||||
<em class="replaceable"><code>name</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The key algorithm. If no policy is defined, the default is
|
||||
RSASHA256.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>coverage</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>coverage</strong></span>
|
||||
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The length of time to ensure that keys will be correct; no action
|
||||
will be taken to create new keys to be activated after this time.
|
||||
This can be represented as a number of seconds, or as a duration using
|
||||
human-readable units (examples: "1y" or "6 months").
|
||||
This can be represented as a number of seconds, or as a duration
|
||||
using human-readable units (examples: "1y" or "6 months").
|
||||
A default value for this option can be set in algorithm policies
|
||||
as well as in policy classes or zone policies.
|
||||
If no policy is configured, the default is six months.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>directory</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>directory</strong></span>
|
||||
<em class="replaceable"><code>path</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the directory in which keys should be stored.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>key-size</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>key-size</strong></span> <em class="replaceable"><code>keytype</code></em>
|
||||
<em class="replaceable"><code>size</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the number of bits to use in creating keys.
|
||||
Takes two arguments: keytype (eihter "zsk" or "ksk") and size.
|
||||
The keytype is either "zsk" or "ksk".
|
||||
A default value for this option can be set in algorithm policies
|
||||
as well as in policy classes or zone policies. If no policy is
|
||||
configured, the default is 2048 bits for RSA keys.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>keyttl</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>keyttl</strong></span>
|
||||
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The key TTL. If no policy is defined, the default is one hour.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>post-publish</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>post-publish</strong></span> <em class="replaceable"><code>keytype</code></em>
|
||||
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
How long after inactivation a key should be deleted from the zone.
|
||||
Note: If <code class="option">roll-period</code> is not set, this value is
|
||||
ignored. Takes two arguments: keytype (eihter "zsk" or "ksk") and a
|
||||
duration. A default value for this option can be set in algorithm
|
||||
ignored. The keytype is either "zsk" or "ksk".
|
||||
A default duration for this option can be set in algorithm
|
||||
policies as well as in policy classes or zone policies. The default
|
||||
is one month.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>pre-publish</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>pre-publish</strong></span> <em class="replaceable"><code>keytype</code></em>
|
||||
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
How long before activation a key should be published. Note: If
|
||||
<code class="option">roll-period</code> is not set, this value is ignored.
|
||||
Takes two arguments: keytype (either "zsk" or "ksk") and a duration.
|
||||
A default value for this option can be set in algorithm policies
|
||||
The keytype is either "zsk" or "ksk".
|
||||
A default duration for this option can be set in algorithm policies
|
||||
as well as in policy classes or zone policies. The default is
|
||||
one month.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>roll-period</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>roll-period</strong></span> <em class="replaceable"><code>keytype</code></em>
|
||||
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
How frequently keys should be rolled over.
|
||||
Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration.
|
||||
A default value for this option can be set in algorithm policies
|
||||
The keytype is either "zsk" or "ksk".
|
||||
A default duration for this option can be set in algorithm policies
|
||||
as well as in policy classes or zone policies. If no policy is
|
||||
configured, the default is one year for ZSK's. KSK's do not
|
||||
configured, the default is one year for ZSKs. KSKs do not
|
||||
roll over by default.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>standby</strong></span></span></dt>
|
||||
<dt><span class="term"><span class="command"><strong>standby</strong></span> <em class="replaceable"><code>keytype</code></em>
|
||||
<em class="replaceable"><code>number</code></em><code class="literal">;</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Not yet implemented.
|
||||
|
||||
@@ -107,6 +107,8 @@ def check(zone, args):
|
||||
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 = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
|
||||
|
||||
@@ -128,6 +130,8 @@ def check(zone, args):
|
||||
fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods)
|
||||
|
||||
for line in fp.splitlines():
|
||||
if type(line) is not str:
|
||||
line = line.decode('ascii')
|
||||
klist.append(SECRR(line, args.lookaside))
|
||||
|
||||
if len(klist) < 1:
|
||||
|
||||
@@ -43,6 +43,8 @@ class keyzone:
|
||||
fp, _ = Popen([czpath, "-o", "-", name, filename],
|
||||
stdout=PIPE, stderr=PIPE).communicate()
|
||||
for line in fp.splitlines():
|
||||
if type(line) is not str:
|
||||
line = line.decode('ascii')
|
||||
if re.search('^[:space:]*;', line):
|
||||
continue
|
||||
fields = line.split()
|
||||
|
||||
@@ -25,7 +25,7 @@ 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@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -20,7 +20,7 @@ CDEFINES =
|
||||
CWARNINGS =
|
||||
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -22,7 +22,7 @@ CWARNINGS =
|
||||
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
|
||||
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -19,7 +19,7 @@ SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey
|
||||
|
||||
CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES}
|
||||
|
||||
CDEFINES = @USE_GSSAPI@
|
||||
CDEFINES = @USE_GSSAPI@ @CONTRIB_DLZ@
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS =
|
||||
@@ -47,32 +47,6 @@ feature-test@EXEEXT@: feature-test.@O@
|
||||
# Running the scripts below is bypassed when a separate build directory is
|
||||
# used.
|
||||
|
||||
# Define the tests that can be run in parallel. This should be identical to
|
||||
# the definition of PARALLELDIRS in conf.sh. Note: longer-running tests
|
||||
# such as serve-stale and rpzrecurse stale are scheduled first to get more
|
||||
# benefit from parallelism.
|
||||
PARALLEL = rpzrecurse serve-stale dnssec \
|
||||
acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
dns64 @DNSTAP@ dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip glue idna inline integrity ixfr keepalive \
|
||||
legacy limits logfileconfig \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks
|
||||
|
||||
# Produce intermediate makefile that assigns unique port numbers to each
|
||||
# parallel test. The start port number of 5,000 is arbitrary - it must just
|
||||
# be greater than the highest privileged port, 1024.
|
||||
@@ -84,26 +58,7 @@ PARALLEL = rpzrecurse serve-stale dnssec \
|
||||
.PHONY: parallel.mk
|
||||
|
||||
parallel.mk:
|
||||
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
|
||||
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
|
||||
echo "" >> $@ ; \
|
||||
echo "check_interfaces:" >> $@ ; \
|
||||
echo " @${PERL} testsock.pl > /dev/null 2>&1 || { \\" >> $@ ; \
|
||||
echo " echo \"I:NOTE: System tests were skipped because they require that the\"; \\" >> $@ ; \
|
||||
echo " echo \"I: IP addresses 10.53.0.1 through 10.53.0.8 be configured\"; \\" >> $@ ; \
|
||||
echo " echo \"I: as alias addresses on the loopback interface. Please run\"; \\" >> $@ ; \
|
||||
echo " echo \"I: \"bin/tests/system/ifconfig.sh up\" as root to configure them.\"; \\" >> $@ ; \
|
||||
echo " exit 1; \\" >> $@ ; \
|
||||
echo " }" >> $@ ; \
|
||||
echo "" >> $@ ; \
|
||||
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
|
||||
port=$${STARTPORT:-5000} ; \
|
||||
for directory in $(PARALLEL) ; do \
|
||||
echo "" >> $@ ; \
|
||||
echo "test-`echo $$directory | tr _ -`: check_interfaces" >> $@ ; \
|
||||
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
||||
port=`expr $$port + 100` ; \
|
||||
done
|
||||
$(SHELL) parallel.sh > parallel.mk
|
||||
|
||||
# Targets to run the tests.
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ controls {
|
||||
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "root.db";
|
||||
};
|
||||
|
||||
zone "rt.example" {
|
||||
type master;
|
||||
file "rt.db";
|
||||
|
||||
@@ -29,6 +29,11 @@ controls {
|
||||
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "root.db";
|
||||
};
|
||||
|
||||
zone "rt.example" {
|
||||
type master;
|
||||
file "rt.db";
|
||||
|
||||
@@ -30,6 +30,11 @@ controls {
|
||||
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "root.db";
|
||||
};
|
||||
|
||||
zone "rt.example" {
|
||||
type master;
|
||||
file "rt.db";
|
||||
|
||||
@@ -29,6 +29,11 @@ controls {
|
||||
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type master;
|
||||
file "root.db";
|
||||
};
|
||||
|
||||
zone "mx.example" {
|
||||
type master;
|
||||
file "mx.db";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 127.0.0.0
|
||||
ns1 A 10.53.0.1
|
||||
|
||||
nap IN NAPTR 50 50 "S" "SIPS+D2T" "" server
|
||||
server SRV 0 0 5061 server
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 127.0.0.0
|
||||
ns1 A 10.53.0.1
|
||||
|
||||
nap IN NAPTR 50 50 "S" "SIPS+D2T" "" server.hang3a.zone.
|
||||
www AAAA 192::99
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 127.0.0.0
|
||||
ns1 A 10.53.0.1
|
||||
|
||||
ns1 NID 2 0:0:0:0
|
||||
ns1 L64 2 0:0:0:0
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
. IN SOA ns2. hostmaster ( 2 8H 2H 4W 1D);
|
||||
. NS ns1.rt.example.
|
||||
. NS ns2.rt.example.
|
||||
ns1.rt.example. A 10.53.0.1
|
||||
ns2.rt.example. A 10.53.0.2
|
||||
rt.example. NS ns1.
|
||||
naptr.example. NS ns1.
|
||||
rt2.example. NS ns1.
|
||||
naptr2.example. NS ns1.
|
||||
nid.example. NS ns1.
|
||||
@@ -10,7 +10,8 @@
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 127.0.0.0
|
||||
NS ns1.rt2.example.
|
||||
ns1 A 10.53.0.1
|
||||
|
||||
rt RT 2 www
|
||||
www AAAA 192::99
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 127.0.0.0
|
||||
ns1 A 10.53.0.1
|
||||
|
||||
rt RT 2 www.hang3b.zone.
|
||||
server SRV 0 0 5061 server
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
NS ns1.ex2.
|
||||
ns1 A 10.53.0.1
|
||||
@@ -0,0 +1,13 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
$TTL 86400
|
||||
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
|
||||
NS ns1
|
||||
ns1 A 10.53.0.1
|
||||
@@ -21,9 +21,20 @@ options {
|
||||
listen-on-v6 { none; };
|
||||
recursion yes;
|
||||
dnssec-validation yes;
|
||||
minimal-responses no;
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type hint;
|
||||
file "root.hint";
|
||||
};
|
||||
|
||||
zone "ex" {
|
||||
type master;
|
||||
file "ex.db";
|
||||
};
|
||||
|
||||
zone "ex2" {
|
||||
type master;
|
||||
file "ex2.db";
|
||||
};
|
||||
|
||||
@@ -210,6 +210,38 @@ dotests() {
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "test with NS, root zone ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS -t NS . @10.53.0.1 > dig.out.$n || ret=1
|
||||
# Always expect glue for root priming queries, regardless $minimal
|
||||
grep 'ADDITIONAL: 3' dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "test with NS, non-root zone ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
|
||||
case $minimal in
|
||||
yes)
|
||||
grep 'ADDITIONAL: 1' dig.out.$n > /dev/null || ret=1
|
||||
;;
|
||||
no)
|
||||
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
|
||||
;;
|
||||
no-auth)
|
||||
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
|
||||
;;
|
||||
no-auth-recursive)
|
||||
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
|
||||
;;
|
||||
esac
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
}
|
||||
|
||||
echo_i "testing with 'minimal-responses yes;'"
|
||||
@@ -228,7 +260,7 @@ n=`expr $n + 1`
|
||||
echo_i "testing with 'minimal-any no;' ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS -t ANY www.rt.example @10.53.0.1 > dig.out.$n || ret=1
|
||||
grep "ANSWER: 3, AUTHORITY: 1, ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
|
||||
grep "ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
@@ -322,5 +354,23 @@ if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing out-of-zone additional data from auth zones (authoritative) ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
|
||||
grep "ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing out-of-zone additional data from auth zones (recursive) ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS -t NS ex @10.53.0.3 > dig.out.$n || ret=1
|
||||
grep "ADDITIONAL: 3" dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret -eq 1 ] ; then
|
||||
echo_i " failed"; status=1
|
||||
fi
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
@@ -23,7 +23,4 @@ copy_setports ns2/named1.conf.in ns2/named.conf
|
||||
copy_setports ns3/named1.conf.in ns3/named.conf
|
||||
|
||||
cp -f ns2/default.nzf.in ns2/3bf305731dd26307.nzf
|
||||
rm -f ns3/*.nzf ns3/*.nzf~
|
||||
rm -f ns3/*.nzd ns3/*.nzd-lock
|
||||
rm -f ns3/inlineslave.db
|
||||
mkdir ns2/new-zones
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
; information regarding copyright ownership.
|
||||
|
||||
$TTL 300
|
||||
@ SOA ns1. hostmaster.localhost. 1 3600 1200 604800 3600
|
||||
NS ns1.
|
||||
ns1. A 10.53.0.1
|
||||
@ SOA a.root-servers.nil. hostmaster.localhost. 1 3600 1200 604800 3600
|
||||
NS a.root-servers.nil.
|
||||
a.root-servers.nil. A 10.53.0.1
|
||||
|
||||
normal.example. NS ns2.normal.example.
|
||||
ns2.normal.example. A 10.53.0.2
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
. ./clean.sh
|
||||
$SHELL clean.sh
|
||||
|
||||
copy_setports ns1/named.conf.in ns1/named.conf
|
||||
copy_setports ns2/named.conf.in ns2/named.conf
|
||||
|
||||
@@ -283,7 +283,7 @@ sleep 3
|
||||
|
||||
echo_i "checking that expired RRSIGs from missing key are not deleted ($n)"
|
||||
ret=0
|
||||
missing=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < missingzsk.key`
|
||||
missing=$(keyfile_to_key_id "$(cat missingzsk.key)")
|
||||
$JOURNALPRINT ns3/nozsk.example.db.jnl | \
|
||||
awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$missing || ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -292,7 +292,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking that expired RRSIGs from inactive key are not deleted ($n)"
|
||||
ret=0
|
||||
inactive=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < inactivezsk.key`
|
||||
inactive=$(keyfile_to_key_id "$(cat inactivezsk.key)")
|
||||
$JOURNALPRINT ns3/inaczsk.example.db.jnl | \
|
||||
awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$inactive || ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -837,7 +837,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for unpublished key ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < unpub.key`
|
||||
id=$(keyfile_to_key_id "$(cat unpub.key)")
|
||||
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -846,7 +846,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for activated but unpublished key ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < activate-now-publish-1day.key`
|
||||
id=$(keyfile_to_key_id "$(cat activate-now-publish-1day.key)")
|
||||
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -855,7 +855,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking that standby key does not sign records ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < standby.key`
|
||||
id=$(keyfile_to_key_id "$(cat standby.key)")
|
||||
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -864,7 +864,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking that deactivated key does not sign records ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < inact.key`
|
||||
id=$(keyfile_to_key_id "$(cat inact.key)")
|
||||
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -873,7 +873,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking insertion of public-only key ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < nopriv.key`
|
||||
id=$(keyfile_to_key_id "$(cat nopriv.key)")
|
||||
file="ns1/`cat nopriv.key`.key"
|
||||
keydata=`grep DNSKEY $file`
|
||||
$NSUPDATE > /dev/null 2>&1 <<END || status=1
|
||||
@@ -892,7 +892,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking key deletion ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < del.key`
|
||||
id=$(keyfile_to_key_id "$(cat del.key)")
|
||||
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -973,9 +973,9 @@ rm -f $file
|
||||
echo_i "preparing ZSK roll"
|
||||
starttime=`$PERL -e 'print time(), "\n";'`
|
||||
oldfile=`cat active.key`
|
||||
oldid=`sed 's/^K.+007+0*\([0-9]\)/\1/' < active.key`
|
||||
oldid=$(keyfile_to_key_id "$(cat active.key)")
|
||||
newfile=`cat standby.key`
|
||||
newid=`sed 's/^K.+007+0*\([0-9]\)/\1/' < standby.key`
|
||||
newid=$(keyfile_to_key_id "$(cat standby.key)")
|
||||
$SETTIME -K ns1 -I now+2s -D now+25 $oldfile > /dev/null
|
||||
$SETTIME -K ns1 -i 0 -S $oldfile $newfile > /dev/null
|
||||
|
||||
@@ -993,7 +993,7 @@ $RNDCCMD 10.53.0.2 loadkeys bar. 2>&1 | sed 's/^/ns2 /' | cat_i
|
||||
echo_i "waiting for changes to take effect"
|
||||
sleep 5
|
||||
|
||||
echo_i "checking former standby key is now active ($n)"
|
||||
echo_i "checking former standby key $newid is now active ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep 'RRSIG.*'" $newid "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
|
||||
@@ -1137,7 +1137,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking private key file removal caused no immediate harm ($n)"
|
||||
ret=0
|
||||
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < vanishing.key`
|
||||
id=$(keyfile_to_key_id "$(cat vanishing.key)")
|
||||
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
|
||||
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
@@ -1404,8 +1404,12 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$DIG $DIGOPTS delzsk.example NSEC3PARAM @10.53.0.3 > dig.out.ns3.1.test$n 2>&1 || ret=1
|
||||
grep "NSEC3PARAM.*12345678" dig.out.ns3.1.test$n > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
_ret=0
|
||||
break
|
||||
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.2.test$n 2>&1
|
||||
grep "Creating NSEC3 chain " signing.out.2.test$n > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
_ret=0
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
@@ -1420,10 +1424,10 @@ $SETTIME -D now-1h $file > settime.out.test$n 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.3 loadkeys delzsk.example 2>&1 | sed 's/^/ns3 /' | cat_i
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
_ret=1
|
||||
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.2.test$n 2>&1
|
||||
grep "Signing " signing.out.2.test$n > /dev/null 2>&1
|
||||
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.3.test$n 2>&1
|
||||
grep "Signing " signing.out.3.test$n > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ `cat signing.out.2.test$n | wc -l` -eq 2 ]; then
|
||||
if [ `grep "Done signing " signing.out.3.test$n | wc -l` -eq 2 ]; then
|
||||
_ret=0
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
${SHELL} clean.sh
|
||||
$SHELL clean.sh
|
||||
|
||||
cp -f ns1/dynamic.db.in ns1/dynamic.db
|
||||
copy_setports ns1/named.conf.in ns1/named.conf
|
||||
copy_setports ns2/named.conf.in ns2/named.conf
|
||||
|
||||
@@ -24,9 +24,9 @@ keyz=`$KEYGEN -q -a RSASHA256 $Z`
|
||||
key1=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
|
||||
key2=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
|
||||
|
||||
idz=`echo $keyz | sed 's/.*+0*//'`
|
||||
id1=`echo $key1 | sed 's/.*+0*//'`
|
||||
id2=`echo $key2 | sed 's/.*+0*//'`
|
||||
idz=$(keyfile_to_key_id $keyz)
|
||||
id1=$(keyfile_to_key_id $key1)
|
||||
id2=$(keyfile_to_key_id $key2)
|
||||
|
||||
cat <<EOF >vars.sh
|
||||
Z=$Z
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
view {
|
||||
view one {
|
||||
allow-update-forwarding { any; };
|
||||
};
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
view {
|
||||
view one {
|
||||
allow-update { any; };
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
dnssec-validation yes;
|
||||
};
|
||||
|
||||
managed-keys {
|
||||
example. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
|
||||
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
|
||||
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
|
||||
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
|
||||
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
|
||||
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
|
||||
NQyrszHhWUU=";
|
||||
example. initial-key 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
|
||||
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
|
||||
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
|
||||
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
|
||||
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
|
||||
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
|
||||
6zqCkwuMmrU=";
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
dnssec-validation yes;
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
example. 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
|
||||
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
|
||||
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
|
||||
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
|
||||
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
|
||||
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
|
||||
NQyrszHhWUU=";
|
||||
example. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
|
||||
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
|
||||
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
|
||||
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
|
||||
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
|
||||
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
|
||||
6zqCkwuMmrU=";
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# shellcheck source=conf.sh
|
||||
. "$SYSTEMTESTTOP/conf.sh"
|
||||
|
||||
$SHELL clean.sh
|
||||
@@ -16,7 +16,7 @@ n=0
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf handles a known good config ($n)"
|
||||
ret=0
|
||||
$CHECKCONF good.conf > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF good.conf > checkconf.out$n 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -25,7 +25,8 @@ echo_i "checking that named-checkconf prints a known good config ($n)"
|
||||
ret=0
|
||||
awk 'BEGIN { ok = 0; } /cut here/ { ok = 1; getline } ok == 1 { print }' good.conf > good.conf.in
|
||||
[ -s good.conf.in ] || ret=1
|
||||
$CHECKCONF -p good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
|
||||
$CHECKCONF -p good.conf.in > checkconf.out$n || ret=1
|
||||
grep -v '^good.conf.in:' < checkconf.out$n > good.conf.out 2>&1 || ret=1
|
||||
cmp good.conf.in good.conf.out || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -36,7 +37,8 @@ ret=0
|
||||
# ensure there is a secret and that it is not the check string.
|
||||
grep 'secret "' good.conf.in > /dev/null || ret=1
|
||||
grep 'secret "????????????????"' good.conf.in > /dev/null 2>&1 && ret=1
|
||||
$CHECKCONF -p -x good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
|
||||
$CHECKCONF -p -x good.conf.in > checkconf.out$n || ret=1
|
||||
grep -v '^good.conf.in:' < checkconf.out$n > good.conf.out 2>&1 || ret=1
|
||||
grep 'secret "????????????????"' good.conf.out > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -46,21 +48,21 @@ do
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf detects error in $bad ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $bad > checkconf.out 2>&1
|
||||
$CHECKCONF $bad > checkconf.out$n 2>&1
|
||||
if [ $? != 1 ]; then ret=1; fi
|
||||
grep "^$bad:[0-9]*: " checkconf.out > /dev/null || ret=1
|
||||
grep "^$bad:[0-9]*: " < checkconf.out$n > /dev/null || ret=1
|
||||
case $bad in
|
||||
bad-update-policy[123].conf)
|
||||
pat="identity and name fields are not the same"
|
||||
grep "$pat" checkconf.out > /dev/null || ret=1
|
||||
grep "$pat" < checkconf.out$n > /dev/null || ret=1
|
||||
;;
|
||||
bad-update-policy[4589].conf|bad-update-policy1[01].conf)
|
||||
pat="name field not set to placeholder value"
|
||||
grep "$pat" checkconf.out > /dev/null || ret=1
|
||||
grep "$pat" < checkconf.out$n > /dev/null || ret=1
|
||||
;;
|
||||
bad-update-policy[67].conf|bad-update-policy1[2345].conf)
|
||||
pat="missing name field type '.*' found"
|
||||
grep "$pat" checkconf.out > /dev/null || ret=1
|
||||
grep "$pat" < checkconf.out$n > /dev/null || ret=1
|
||||
;;
|
||||
esac
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -72,7 +74,7 @@ do
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf detects no error in $good ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $good > /dev/null 2>&1
|
||||
$CHECKCONF $good > checkconf.out$n 2>&1
|
||||
if [ $? != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
done
|
||||
@@ -96,14 +98,15 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf catches range errors ($n)"
|
||||
ret=0
|
||||
$CHECKCONF range.conf > /dev/null 2>&1 && ret=1
|
||||
$CHECKCONF range.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf warns of notify inconsistencies ($n)"
|
||||
ret=0
|
||||
warnings=`$CHECKCONF notify.conf 2>&1 | grep "'notify' is disabled" | wc -l`
|
||||
$CHECKCONF notify.conf > checkconf.out$n 2>&1
|
||||
warnings=`grep "'notify' is disabled" < checkconf.out$n | wc -l`
|
||||
[ $warnings -eq 3 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -111,12 +114,17 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking named-checkconf dnssec warnings ($n)"
|
||||
ret=0
|
||||
$CHECKCONF dnssec.1 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 2>&1 | grep 'auto-dnssec may only be ' > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 2>&1 | grep 'validation auto.*enable no' > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.1 > checkconf.out$n.1 2>&1
|
||||
grep 'validation yes.*enable no' < checkconf.out$n.1 > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 > checkconf.out$n.2 2>&1
|
||||
grep 'auto-dnssec may only be ' < checkconf.out$n.2 > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 > checkconf.out$n.3 2>&1
|
||||
grep 'validation auto.*enable no' < checkconf.out$n.3 > /dev/null || ret=1
|
||||
$CHECKCONF dnssec.2 > checkconf.out$n.4 2>&1
|
||||
grep 'validation yes.*enable no' < checkconf.out$n.4 > /dev/null || ret=1
|
||||
# this one should have no warnings
|
||||
$CHECKCONF dnssec.3 2>&1 | grep '.*' && ret=1
|
||||
$CHECKCONF dnssec.3 > checkconf.out$n.5 2>&1
|
||||
grep '.*' < checkconf.out$n.5 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -129,14 +137,14 @@ options {
|
||||
$field 0;
|
||||
};
|
||||
EOF
|
||||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
$CHECKCONF badzero.conf > checkconf.out$n.1 2>&1
|
||||
[ $? -eq 1 ] || { echo_i "options $field failed" ; ret=1; }
|
||||
cat > badzero.conf << EOF
|
||||
view dummy {
|
||||
$field 0;
|
||||
};
|
||||
EOF
|
||||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
$CHECKCONF badzero.conf > checkconf.out$n.2 2>&1
|
||||
[ $? -eq 1 ] || { echo_i "view $field failed" ; ret=1; }
|
||||
cat > badzero.conf << EOF
|
||||
options {
|
||||
@@ -145,7 +153,7 @@ options {
|
||||
view dummy {
|
||||
};
|
||||
EOF
|
||||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
$CHECKCONF badzero.conf > checkconf.out$n.3 2>&1
|
||||
[ $? -eq 1 ] || { echo_i "options + view $field failed" ; ret=1; }
|
||||
cat > badzero.conf << EOF
|
||||
zone dummy {
|
||||
@@ -154,7 +162,7 @@ zone dummy {
|
||||
$field 0;
|
||||
};
|
||||
EOF
|
||||
$CHECKCONF badzero.conf > /dev/null 2>&1
|
||||
$CHECKCONF badzero.conf > checkconf.out$n.4 2>&1
|
||||
[ $? -eq 1 ] || { echo_i "zone $field failed" ; ret=1; }
|
||||
done
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -163,22 +171,28 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking options allowed in inline-signing slaves ($n)"
|
||||
ret=0
|
||||
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-dnskey-kskonly.*requires inline" | wc -l`
|
||||
$CHECKCONF bad-dnssec.conf > checkconf.out$n.1 2>&1
|
||||
l=`grep "dnssec-dnskey-kskonly.*requires inline" < checkconf.out$n.1 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-loadkeys-interval.*requires inline" | wc -l`
|
||||
$CHECKCONF bad-dnssec.conf > checkconf.out$n.2 2>&1
|
||||
l=`grep "dnssec-loadkeys-interval.*requires inline" < checkconf.out$n.2 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "update-check-ksk.*requires inline" | wc -l`
|
||||
$CHECKCONF bad-dnssec.conf > checkconf.out$n.3 2>&1
|
||||
l=`grep "update-check-ksk.*requires inline" < checkconf.out$n.3 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check file + inline-signing for slave zones ($n)"
|
||||
l=`$CHECKCONF inline-no.conf 2>&1 | grep "missing 'file' entry" | wc -l`
|
||||
$CHECKCONF inline-no.conf > checkconf.out$n.1 2>&1
|
||||
l=`grep "missing 'file' entry" < checkconf.out$n.1 | wc -l`
|
||||
[ $l -eq 0 ] || ret=1
|
||||
l=`$CHECKCONF inline-good.conf 2>&1 | grep "missing 'file' entry" | wc -l`
|
||||
$CHECKCONF inline-good.conf > checkconf.out$n.2 2>&1
|
||||
l=`grep "missing 'file' entry" < checkconf.out$n.2 | wc -l`
|
||||
[ $l -eq 0 ] || ret=1
|
||||
l=`$CHECKCONF inline-bad.conf 2>&1 | grep "missing 'file' entry" | wc -l`
|
||||
$CHECKCONF inline-bad.conf > checkconf.out$n.3 2>&1
|
||||
l=`grep "missing 'file' entry" < checkconf.out$n.3 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -186,7 +200,8 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking named-checkconf DLZ warnings ($n)"
|
||||
ret=0
|
||||
$CHECKCONF dlz-bad.conf 2>&1 | grep "'dlz' and 'database'" > /dev/null || ret=1
|
||||
$CHECKCONF dlz-bad.conf > checkconf.out$n 2>&1
|
||||
grep "'dlz' and 'database'" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -194,17 +209,30 @@ n=`expr $n + 1`
|
||||
echo_i "checking for missing key directory warning ($n)"
|
||||
ret=0
|
||||
rm -rf test.keydir
|
||||
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' does not exist" | wc -l`
|
||||
$CHECKCONF warn-keydir.conf > checkconf.out$n.1 2>&1
|
||||
l=`grep "'test.keydir' does not exist" < checkconf.out$n.1 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
touch test.keydir
|
||||
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' is not a directory" | wc -l`
|
||||
$CHECKCONF warn-keydir.conf > checkconf.out$n.2 2>&1
|
||||
l=`grep "'test.keydir' is not a directory" < checkconf.out$n.2 | wc -l`
|
||||
[ $l -eq 1 ] || ret=1
|
||||
rm -f test.keydir
|
||||
mkdir test.keydir
|
||||
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "key-directory" | wc -l`
|
||||
$CHECKCONF warn-keydir.conf > checkconf.out$n.3 2>&1
|
||||
l=`grep "key-directory" < checkconf.out$n.3 | wc -l`
|
||||
[ $l -eq 0 ] || ret=1
|
||||
rm -rf test.keydir
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking for trusted-key/managed-key collision warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-duplicate-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF warn-duplicate-root-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF warn-validation-auto-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z catches conflicting ttl with max-ttl ($n)"
|
||||
@@ -219,49 +247,49 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z catches invalid max-ttl ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z max-ttl-bad.conf > /dev/null 2>&1 && ret=1
|
||||
$CHECKCONF -z max-ttl-bad.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z skips zone check with alternate databases ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z altdb.conf > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF -z altdb.conf > checkconf.out$n 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z skips zone check with DLZ ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z altdlz.conf > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF -z altdlz.conf > checkconf.out$n 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z fails on view with ANY class ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z view-class-any1.conf > /dev/null 2>&1 && ret=1
|
||||
$CHECKCONF -z view-class-any1.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z fails on view with CLASS255 class ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z view-class-any2.conf > /dev/null 2>&1 && ret=1
|
||||
$CHECKCONF -z view-class-any2.conf > checkconf.out$n 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z passes on view with IN class ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z view-class-in1.conf > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF -z view-class-in1.conf > checkconf.out$n 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf -z passes on view with CLASS1 class ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z view-class-in2.conf > /dev/null 2>&1 || ret=1
|
||||
$CHECKCONF -z view-class-in2.conf > checkconf.out$n 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -269,7 +297,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-names fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-names-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "near '_underscore': bad name (check-names)" checkconf.out$n > /dev/null || ret=1
|
||||
grep "near '_underscore': bad name (check-names)" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-names/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -278,7 +306,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-mx fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "near '10.0.0.1': MX is an address" checkconf.out$n > /dev/null || ret=1
|
||||
grep "near '10.0.0.1': MX is an address" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -287,7 +315,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-dup-records fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-dup-records-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "has semantically identical records" checkconf.out$n > /dev/null || ret=1
|
||||
grep "has semantically identical records" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-dup-records/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -296,7 +324,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-mx fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "failed: MX is an address" checkconf.out$n > /dev/null || ret=1
|
||||
grep "failed: MX is an address" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -305,7 +333,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-mx-cname fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-mx-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "MX.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
|
||||
grep "MX.* is a CNAME (illegal)" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -314,7 +342,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that check-srv-cname fails as configured ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -z check-srv-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
|
||||
grep "SRV.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
|
||||
grep "SRV.* is a CNAME (illegal)" < checkconf.out$n > /dev/null || ret=1
|
||||
grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -323,7 +351,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf -p properly print a port range ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -p portrange-good.conf > checkconf.out$n 2>&1 || ret=1
|
||||
grep "range 8610 8614;" checkconf.out$n > /dev/null || ret=1
|
||||
grep "range 8610 8614;" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -339,7 +367,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that named-checkconf prints max-cache-size <percentage> correctly ($n)"
|
||||
ret=0
|
||||
$CHECKCONF -p max-cache-size-good.conf > checkconf.out$n 2>&1 || ret=1
|
||||
grep "max-cache-size 60%;" checkconf.out$n > /dev/null || ret=1
|
||||
grep "max-cache-size 60%;" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -350,7 +378,7 @@ $CHECKCONF -l good.conf |
|
||||
grep -v "is not implemented" |
|
||||
grep -v "no longer exists" |
|
||||
grep -v "is obsolete" > checkconf.out$n || ret=1
|
||||
diff good.zonelist checkconf.out$n > diff.out$n || ret=1
|
||||
diff good.zonelist checkconf.out$n > diff.out$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -358,7 +386,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that 'dnssec-lookaside auto;' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-dlv-auto.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "dnssec-lookaside 'auto' is no longer supported" checkconf.out$n > /dev/null || ret=1
|
||||
grep "dnssec-lookaside 'auto' is no longer supported" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -366,7 +394,7 @@ n=`expr $n + 1`
|
||||
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-dlv-dlv.isc.org.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "dlv.isc.org has been shut down" checkconf.out$n > /dev/null || ret=1
|
||||
grep "dlv.isc.org has been shut down" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -383,11 +411,12 @@ echo_i "check that the 2010 ICANN ROOT KSK without the 2017 ICANN ROOT KSK gener
|
||||
ret=0
|
||||
$CHECKCONF check-root-ksk-2010.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
[ -s checkconf.out$n ] || ret=1
|
||||
grep "trusted-key for root from 2010 without updated" checkconf.out$n > /dev/null || ret=1
|
||||
grep "trusted-key for root from 2010 without updated" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not warning ($n)"
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not generate a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF check-root-ksk-both.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
[ -s checkconf.out$n ] && ret=1
|
||||
@@ -405,7 +434,7 @@ echo_i "check that the dlv.isc.org KSK generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF check-dlv-ksk-key.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
[ -s checkconf.out$n ] || ret=1
|
||||
grep "trusted-key for dlv.isc.org still present" checkconf.out$n > /dev/null || ret=1
|
||||
grep "trusted-key for dlv.isc.org still present" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -413,7 +442,7 @@ echo_i "check that 'geoip-use-ecs no' generates a warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF warn-geoip-use-ecs.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
[ -s checkconf.out$n ] || ret=1
|
||||
grep "'geoip-use-ecs' is obsolete" checkconf.out$n > /dev/null || ret=1
|
||||
grep "'geoip-use-ecs' is obsolete" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
dnssec-validation yes;
|
||||
};
|
||||
|
||||
managed-keys {
|
||||
example. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
|
||||
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
|
||||
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
|
||||
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
|
||||
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
|
||||
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
|
||||
NQyrszHhWUU=";
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
example. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
|
||||
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
|
||||
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
|
||||
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
|
||||
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
|
||||
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
|
||||
6zqCkwuMmrU=";
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
dnssec-validation yes;
|
||||
};
|
||||
|
||||
managed-keys {
|
||||
. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
|
||||
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
|
||||
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
|
||||
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
|
||||
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
|
||||
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
|
||||
NQyrszHhWUU=";
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
|
||||
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
|
||||
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
|
||||
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
|
||||
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
|
||||
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
|
||||
6zqCkwuMmrU=";
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
dnssec-validation auto;
|
||||
};
|
||||
|
||||
trusted-keys {
|
||||
. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
|
||||
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
|
||||
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
|
||||
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
|
||||
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
|
||||
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
|
||||
6zqCkwuMmrU=";
|
||||
};
|
||||
@@ -10,7 +10,8 @@
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
rm -f named-compilezone
|
||||
$SHELL clean.sh
|
||||
|
||||
ln -s $CHECKZONE named-compilezone
|
||||
|
||||
./named-compilezone -D -F raw -o good1.db.raw example \
|
||||
|
||||
+147
-20
@@ -21,10 +21,61 @@ else
|
||||
TESTSOCK6=false
|
||||
fi
|
||||
|
||||
TESTSOCK6="$TESTSOCK6"
|
||||
export LANG=C
|
||||
|
||||
. ${TOP}/version
|
||||
|
||||
#
|
||||
# Common lists of system tests to run.
|
||||
#
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# The following tests are hard-coded to use ports 5300 and 9953. For
|
||||
# this reason, these must be run sequentially.
|
||||
#
|
||||
# Sequential tests that only run on unix/linux should be added to
|
||||
# SEQUENTIAL_UNIX in conf.sh.in; those that only run on windows should
|
||||
# be added to SEQUENTIAL_WINDOWS in conf.sh.win32.
|
||||
#
|
||||
SEQUENTIAL_COMMON="ecdsa eddsa tkey"
|
||||
|
||||
#
|
||||
# These tests can use ports assigned by the caller (other than 5300
|
||||
# and 9953). Because separate blocks of ports can be used for teach
|
||||
# test, these tests can be run in parallel.
|
||||
#
|
||||
# Parallel tests that only run on unix/linux should be added to
|
||||
# PARALLEL_UNIX in conf.sh.in; those that only run on windows should
|
||||
# be added to PARALLEL_WINDOWS in conf.sh.win32.
|
||||
#
|
||||
# Note: some of the longer-running tests such as serve-stale and
|
||||
# rpzrecurse are scheduled first, in order to get more benefit from
|
||||
# parallelism.
|
||||
#
|
||||
PARALLEL_COMMON="dnssec rpzrecurse serve-stale \
|
||||
acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
dns64 dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip geoip2 glue idna inline integrity ixfr \
|
||||
keepalive legacy limits \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
|
||||
#
|
||||
# Set up color-coded test output
|
||||
#
|
||||
@@ -127,6 +178,29 @@ digcomp() {
|
||||
return $result
|
||||
}
|
||||
|
||||
#
|
||||
# Useful variables in test scripts
|
||||
#
|
||||
|
||||
# Default algorithm for testing.
|
||||
DEFAULT_ALGORITHM=ECDSAP256SHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=13
|
||||
DEFAULT_BITS=256
|
||||
|
||||
# This is an alternative algorithm for test cases that require more than
|
||||
# one algorithm (for example algorithm rollover). Must be different from
|
||||
# DEFAULT_ALGORITHM.
|
||||
ALTERNATIVE_ALGORITHM=RSASHA256
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=8
|
||||
ALTERNATIVE_BITS=1280
|
||||
|
||||
# This is an algorithm that is used for tests against the
|
||||
# "disable-algorithms" configuration option. Must be different from above
|
||||
# algorithms.
|
||||
DISABLED_ALGORITHM=ECDSAP384SHA384
|
||||
DISABLED_ALGORITHM_NUMBER=14
|
||||
DISABLED_BITS=384
|
||||
|
||||
#
|
||||
# Useful functions in test scripts
|
||||
#
|
||||
@@ -141,13 +215,13 @@ keyfile_to_keys_section() {
|
||||
shift
|
||||
echo "$section_name {"
|
||||
for keyname in $*; do
|
||||
awk '!/^; /{
|
||||
printf "\t\""$1"\" "
|
||||
printf "'"$key_prefix"'"
|
||||
printf $4 " " $5 " " $6 " \""
|
||||
for (i=7; i<=NF; i++) printf $i
|
||||
printf "\";\n"
|
||||
}' $keyname.key
|
||||
awk '!/^; /{
|
||||
printf "\t\""$1"\" "
|
||||
printf "'"$key_prefix"'"
|
||||
printf $4 " " $5 " " $6 " \""
|
||||
for (i=7; i<=NF; i++) printf $i
|
||||
printf "\";\n"
|
||||
}' $keyname.key
|
||||
done
|
||||
echo "};"
|
||||
}
|
||||
@@ -166,6 +240,15 @@ keyfile_to_managed_keys() {
|
||||
keyfile_to_keys_section "managed-keys" "initial-key " $*
|
||||
}
|
||||
|
||||
# keyfile_to_key_id: convert a key file name to a key ID
|
||||
#
|
||||
# For a given key file name (e.g. "Kexample.+013+06160") provided as $1,
|
||||
# print the key ID with leading zeros stripped ("6160" for the
|
||||
# aforementioned example).
|
||||
keyfile_to_key_id() {
|
||||
echo "$1" | sed "s/.*+0\{0,4\}//"
|
||||
}
|
||||
|
||||
# nextpart*() - functions for reading files incrementally
|
||||
#
|
||||
# These functions aim to facilitate looking for (or waiting for)
|
||||
@@ -224,7 +307,7 @@ nextpartread() {
|
||||
[ -f $1.prev ] || nextpartreset $1
|
||||
prev=`cat $1.prev`
|
||||
awk "NR > $prev "'{ print }
|
||||
END { print NR > "/dev/stderr" }' $1
|
||||
END { print NR > "/dev/stderr" }' $1
|
||||
}
|
||||
|
||||
# nextpart: read everything that's been appended to a file since the
|
||||
@@ -246,7 +329,7 @@ rndc_reload() {
|
||||
# we need to wait for reload to finish
|
||||
if [ -z "$3" ]; then
|
||||
for __try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
@@ -255,7 +338,7 @@ rndc_reload() {
|
||||
rndc_reconfig() {
|
||||
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/'$1' /'`"
|
||||
for __try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
@@ -264,21 +347,65 @@ rndc_reconfig() {
|
||||
# in $1, converting them to a format used by some system tests.
|
||||
get_dig_xfer_stats() {
|
||||
LOGFILE="$1"
|
||||
echo "messages=`sed -n "s/^;; XFR size: .*messages \([0-9][0-9]*\).*/\1/p" "${LOGFILE}"`"
|
||||
echo "records=`sed -n "s/^;; XFR size: \([0-9][0-9]*\) records.*/\1/p" "${LOGFILE}"`"
|
||||
echo "bytes=`sed -n "s/^;; XFR size: .*bytes \([0-9][0-9]*\).*/\1/p" "${LOGFILE}"`"
|
||||
sed -n "s/^;; XFR size: .*messages \([0-9][0-9]*\).*/messages=\1/p" "${LOGFILE}"
|
||||
sed -n "s/^;; XFR size: \([0-9][0-9]*\) records.*/records=\1/p" "${LOGFILE}"
|
||||
sed -n "s/^;; XFR size: .*bytes \([0-9][0-9]*\).*/bytes=\1/p" "${LOGFILE}"
|
||||
}
|
||||
|
||||
# get_named_xfer_stats: from named log file $1, extract transfer
|
||||
# statistics for the last transfer for peer $2 and zone $3, converting
|
||||
# statistics for the last transfer for peer $2 and zone $3 (from a log
|
||||
# message which has to contain the string provided in $4), converting
|
||||
# them to a format used by some system tests.
|
||||
get_named_xfer_stats() {
|
||||
LOGFILE="$1"
|
||||
PEER="$2"
|
||||
ZONE="$3"
|
||||
echo "messages=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) messages.*/\1/p" | tail -1`"
|
||||
echo "records=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) records.*/\1/p" | tail -1`"
|
||||
echo "bytes=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) bytes.*/\1/p" | tail -1`"
|
||||
PEER="`echo $2 | sed 's/\./\\\\./g'`"
|
||||
ZONE="`echo $3 | sed 's/\./\\\\./g'`"
|
||||
MESSAGE="$4"
|
||||
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
|
||||
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) messages.*/messages=\1/p" | tail -1
|
||||
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
|
||||
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) records.*/records=\1/p" | tail -1
|
||||
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
|
||||
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) bytes.*/bytes=\1/p" | tail -1
|
||||
}
|
||||
|
||||
# copy_setports - Copy Configuration File and Replace Ports
|
||||
#
|
||||
# Convenience function to copy a configuration file, replacing the tokens
|
||||
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
|
||||
# environment variables. (These values are set by "run.sh", which calls the
|
||||
# scripts invoking this function.)
|
||||
#
|
||||
# Usage:
|
||||
# copy_setports infile outfile
|
||||
#
|
||||
copy_setports() {
|
||||
# The indirect method of handling the substitution of the PORT variables
|
||||
# (defining "atsign" then substituting for it in the "sed" statement) is
|
||||
# required to prevent the "Configure" script (in the win32utils/ directory)
|
||||
# from replacing the <at>PORT<at> substitution tokens when it processes
|
||||
# this file and produces conf.sh.
|
||||
atsign="@"
|
||||
sed -e "s/${atsign}PORT${atsign}/${PORT}/g" \
|
||||
-e "s/${atsign}EXTRAPORT1${atsign}/${EXTRAPORT1}/g" \
|
||||
-e "s/${atsign}EXTRAPORT2${atsign}/${EXTRAPORT2}/g" \
|
||||
-e "s/${atsign}EXTRAPORT3${atsign}/${EXTRAPORT3}/g" \
|
||||
-e "s/${atsign}EXTRAPORT4${atsign}/${EXTRAPORT4}/g" \
|
||||
-e "s/${atsign}EXTRAPORT5${atsign}/${EXTRAPORT5}/g" \
|
||||
-e "s/${atsign}EXTRAPORT6${atsign}/${EXTRAPORT6}/g" \
|
||||
-e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \
|
||||
-e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \
|
||||
-e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \
|
||||
-e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \
|
||||
-e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \
|
||||
-e "s/${atsign}DISABLED_ALGORITHM${atsign}/${DISABLED_ALGORITHM}/g" \
|
||||
-e "s/${atsign}DISABLED_ALGORITHM_NUMBER${atsign}/${DISABLED_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/${atsign}DISABLED_BITS${atsign}/${DISABLED_BITS}/g" \
|
||||
$1 > $2
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
+13
-74
@@ -17,15 +17,11 @@
|
||||
# Find the top of the BIND9 tree.
|
||||
TOP=@abs_top_builddir@
|
||||
|
||||
# Default algorithm for testing
|
||||
DEFAULT_ALGORITHM=ECDSAP256SHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=13
|
||||
DEFAULT_BITS=256
|
||||
# This is not the windows build.
|
||||
CYGWIN=""
|
||||
|
||||
# must be different from DEFAULT_ALGORITHM
|
||||
ALTERNATIVE_ALGORITHM=RSASHA256
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=8
|
||||
ALTERNATIVE_BITS=1280
|
||||
# Load common values shared between windows and unix/linux.
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
ARPANAME=$TOP/bin/tools/arpaname
|
||||
CDS=$TOP/bin/dnssec/dnssec-cds
|
||||
@@ -76,40 +72,14 @@ SAMPLEUPDATE=$TOP/lib/samples/sample-update
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=/dev/null
|
||||
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# List of tests hard-coded to use ports 5300 and 9953. For this
|
||||
# reason, these must be run sequentially.
|
||||
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
|
||||
# Construct the lists of tests to run
|
||||
#
|
||||
SEQUENTIAL_UNIX="@PKCS11_TEST@"
|
||||
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_UNIX"
|
||||
|
||||
# List of tests that use ports assigned by caller (other than 5300
|
||||
# and 9953). Because separate blocks of ports can be used for teach
|
||||
# test, these tests can be run in parallel.
|
||||
#
|
||||
# This symbol must be kept in step with the PARALLEL macro in Makefile.in
|
||||
PARALLELDIRS="acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip glue idna inline integrity ixfr keepalive \
|
||||
legacy limits logfileconfig \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
serve-stale sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig"
|
||||
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX"
|
||||
|
||||
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
|
||||
|
||||
@@ -130,6 +100,9 @@ CURL=@CURL@
|
||||
# XMLLINT will be empty if no program was found by configure
|
||||
XMLLINT=@XMLLINT@
|
||||
|
||||
# XSLTPROC will be empty if no program was found by configure
|
||||
XSLTPROC=@XSLTPROC@
|
||||
|
||||
# PERL will be an empty string if no perl interpreter was found.
|
||||
PERL=@PERL@
|
||||
|
||||
@@ -145,37 +118,3 @@ HAVEXMLSTATS=@XMLSTATS@
|
||||
HAVEJSONSTATS=@JSONSTATS@
|
||||
ZLIB=@ZLIB@
|
||||
NZD=@NZD_TOOLS@
|
||||
|
||||
# copy_setports - Copy Configuration File and Replace Ports
|
||||
# Unfortunately it has to be different on Windows.
|
||||
#
|
||||
# Convenience function to copy a configuration file, replacing the tokens
|
||||
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
|
||||
# environment variables. (These values are set by "run.sh", which calls the
|
||||
# scripts invoking this function.)
|
||||
#
|
||||
# Usage:
|
||||
# copy_setports infile outfile
|
||||
|
||||
copy_setports() {
|
||||
sed -e "s/@PORT@/${PORT}/g" \
|
||||
-e "s/@EXTRAPORT1@/${EXTRAPORT1}/g" \
|
||||
-e "s/@EXTRAPORT2@/${EXTRAPORT2}/g" \
|
||||
-e "s/@EXTRAPORT3@/${EXTRAPORT3}/g" \
|
||||
-e "s/@EXTRAPORT4@/${EXTRAPORT4}/g" \
|
||||
-e "s/@EXTRAPORT5@/${EXTRAPORT5}/g" \
|
||||
-e "s/@EXTRAPORT6@/${EXTRAPORT6}/g" \
|
||||
-e "s/@EXTRAPORT7@/${EXTRAPORT7}/g" \
|
||||
-e "s/@EXTRAPORT8@/${EXTRAPORT8}/g" \
|
||||
-e "s/@CONTROLPORT@/${CONTROLPORT}/g" \
|
||||
-e "s/@DEFAULT_ALGORITHM@/${DEFAULT_ALGORITHM}/g" \
|
||||
-e "s/@DEFAULT_ALGORITHM_NUMBER@/${DEFAULT_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/@DEFAULT_BITS@/${DEFAULT_BITS}/g" \
|
||||
-e "s/@ALTERNATIVE_ALGORITHM@/${ALTERNATIVE_ALGORITHM}/g" \
|
||||
-e "s/@ALTERNATIVE_ALGORITHM_NUMBER@/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/@ALTERNATIVE_BITS@/${ALTERNATIVE_BITS}/g" \
|
||||
$1 > $2
|
||||
}
|
||||
|
||||
# The rest is shared between Windows and Unices
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
@@ -14,28 +14,22 @@
|
||||
# other shell scripts.
|
||||
#
|
||||
|
||||
# For specific stuff (currently kill HUP -> rdnc reload in notify)
|
||||
CYGWIN=1
|
||||
|
||||
# Find the top of the BIND9 tree.
|
||||
TOP=${SYSTEMTESTTOP:=.}/../../..
|
||||
|
||||
# Make it absolute so that it continues to work after we cd.
|
||||
TOP=`cd $TOP && pwd`
|
||||
|
||||
# This is the windows build. This disables certain tests cases
|
||||
# and changes some specific behaviors where necessary.
|
||||
CYGWIN=1
|
||||
|
||||
# Load common values shared between windows and unix/linux.
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
# Visual Studio build configurations are Release and Debug
|
||||
VSCONF=Debug
|
||||
|
||||
# Default algorithm for testing
|
||||
DEFAULT_ALGORITHM=ECDSAP256SHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=13
|
||||
DEFAULT_BITS=256
|
||||
|
||||
# must be different from DEFAULT_ALGORITHM
|
||||
ALTERNATIVE_ALGORITHM=RSASHA256
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=8
|
||||
ALTERNATIVE_BITS=1280
|
||||
|
||||
ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@
|
||||
CDS=$TOP/Build/$VSCONF/dnssec-cds@EXEEXT@
|
||||
CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@
|
||||
@@ -88,47 +82,18 @@ PIPEQUERIES=$TOP/Build/$VSCONF/pipequeries@EXEEXT@
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=NUL
|
||||
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# List of tests that use ports 5300 and 9953. For this reason, these must
|
||||
# be run sequentially.
|
||||
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
|
||||
# Construct the lists of tests to run
|
||||
#
|
||||
SEQUENTIAL_WINDOWS=""
|
||||
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS"
|
||||
|
||||
# List of tests that use unique ports (other than 5300 and 9953). These
|
||||
# tests can be run in parallel.
|
||||
#
|
||||
# XXX: Note that tests are not currently run in parallel on Windows, so it
|
||||
# isn't strictly necessary to maintain these as separate lists in this file,
|
||||
# but using the same variable names as in conf.sh.in may simplify keeping the
|
||||
# lists in sync.
|
||||
#
|
||||
# XXX: removed logfileconfig as it doesn't currently work on windows.
|
||||
PARALLELDIRS="acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip glue idna inline integrity ixfr keepalive \
|
||||
legacy limits masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
serve-stale sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
PARALLEL_WINDOWS="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@"
|
||||
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS"
|
||||
|
||||
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
|
||||
|
||||
#Things that are different on Windows
|
||||
# Things that are different on Windows
|
||||
KILL="/bin/kill -f"
|
||||
DIFF="diff --strip-trailing-cr"
|
||||
DOS2UNIX=dos2unix
|
||||
@@ -158,42 +123,5 @@ HAVEJSONSTATS=@JSONSTATS@
|
||||
ZLIB=@ZLIB@
|
||||
NZD=@NZD_TOOLS@
|
||||
|
||||
# copy_setports - Copy Configuration File and Replace Ports
|
||||
# Unfortunately it has to be different on Windows.
|
||||
#
|
||||
# Convenience function to copy a configuration file, replacing the tokens
|
||||
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
|
||||
# environment variables. (These values are set by "run.sh", which calls the
|
||||
# scripts invoking this function.)
|
||||
#
|
||||
# Usage:
|
||||
# copy_setports infile outfile
|
||||
|
||||
copy_setports() {
|
||||
# The indirect method of handling the substitution of the PORT variables
|
||||
# (defining "atsign" then substituting for it in the "sed" statement) is
|
||||
# required because to prevent the "Configure" script (in the the
|
||||
# bin9/win32utils directory) replacing the the <at>PORT<at> substitution
|
||||
# tokens when it processes this file and produces conf.sh.
|
||||
atsign="@"
|
||||
sed -e "s/${atsign}PORT${atsign}/${PORT}/g" \
|
||||
-e "s/${atsign}EXTRAPORT1${atsign}/${EXTRAPORT1}/g" \
|
||||
-e "s/${atsign}EXTRAPORT2${atsign}/${EXTRAPORT2}/g" \
|
||||
-e "s/${atsign}EXTRAPORT3${atsign}/${EXTRAPORT3}/g" \
|
||||
-e "s/${atsign}EXTRAPORT4${atsign}/${EXTRAPORT4}/g" \
|
||||
-e "s/${atsign}EXTRAPORT5${atsign}/${EXTRAPORT5}/g" \
|
||||
-e "s/${atsign}EXTRAPORT6${atsign}/${EXTRAPORT6}/g" \
|
||||
-e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \
|
||||
-e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \
|
||||
-e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \
|
||||
-e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \
|
||||
-e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
|
||||
-e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \
|
||||
$1 > $2
|
||||
}
|
||||
|
||||
# The rest is shared between Windows and Unices
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
@@ -18,8 +18,6 @@ ln -s $CHECKZONE named-compilezone
|
||||
|
||||
# Test 1: KSK goes inactive before successor is active
|
||||
dir=01-ksk-inactive
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
|
||||
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
|
||||
@@ -28,8 +26,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
|
||||
# Test 2: ZSK goes inactive before successor is active
|
||||
dir=02-zsk-inactive
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
@@ -38,8 +34,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
|
||||
# Test 3: KSK is unpublished before its successor is published
|
||||
dir=03-ksk-unpublished
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
|
||||
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
|
||||
@@ -48,8 +42,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
|
||||
# Test 4: ZSK is unpublished before its successor is published
|
||||
dir=04-zsk-unpublished
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
@@ -59,8 +51,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
# Test 5: KSK deleted and successor published before KSK is deactivated
|
||||
# and successor activated.
|
||||
dir=05-ksk-unpub-active
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1
|
||||
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
|
||||
@@ -69,8 +59,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
# Test 6: ZSK deleted and successor published before ZSK is deactivated
|
||||
# and successor activated.
|
||||
dir=06-zsk-unpub-active
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
@@ -78,8 +66,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
|
||||
# Test 7: KSK rolled with insufficient delay after prepublication.
|
||||
dir=07-ksk-ttl
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
|
||||
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
|
||||
@@ -89,8 +75,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
|
||||
# Test 8: ZSK rolled with insufficient delay after prepublication.
|
||||
dir=08-zsk-ttl
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
@@ -100,8 +84,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
|
||||
# Test 9: KSK goes inactive before successor is active, but checking ZSKs
|
||||
dir=09-check-zsk
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
|
||||
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
|
||||
@@ -110,8 +92,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
|
||||
# Test 10: ZSK goes inactive before successor is active, but checking KSKs
|
||||
dir=10-check-ksk
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
@@ -120,8 +100,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
|
||||
|
||||
# Test 11: ZSK goes inactive before successor is active, but after cutoff
|
||||
dir=11-cutoff
|
||||
rm -f $dir/K*.key
|
||||
rm -f $dir/K*.private
|
||||
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
|
||||
$SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1
|
||||
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
rm -f ns2/example.bk
|
||||
rm -f ns3/example.bk
|
||||
rm -f */named.memstats */named.run
|
||||
@@ -7,5 +7,7 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
rm -f ns2/example.bk
|
||||
rm -f ns3/example.bk
|
||||
# shellcheck source=conf.sh
|
||||
. "$SYSTEMTESTTOP/conf.sh"
|
||||
|
||||
$SHELL clean.sh
|
||||
|
||||
@@ -20,5 +20,5 @@ cp example.db.in example.db
|
||||
|
||||
cat "$keyname.key" >> example.db
|
||||
|
||||
echo "$keyname" | sed -e 's/.*[+]//' -e 's/^0*//' > keyid
|
||||
keyfile_to_key_id "$keyname" > keyid
|
||||
< "$keyname.key" grep -Ev '^;' | cut -f 7- -d ' ' > keydata
|
||||
|
||||
@@ -30,9 +30,32 @@ mdig_with_opts() {
|
||||
"$MDIG" -p "$PORT" "$@"
|
||||
}
|
||||
|
||||
# Check if response in file $1 has the correct TTL range.
|
||||
# The response record must have RRtype $2 and class IN (CLASS1).
|
||||
# Maximum TTL is given by $3. This works in most cases where TTL is
|
||||
# the second word on the line. TTL position can be adjusted with
|
||||
# setting the position $4, but that requires updating this function.
|
||||
check_ttl_range() {
|
||||
file=$1
|
||||
pos=$4
|
||||
|
||||
case "$pos" in
|
||||
"3")
|
||||
awk -v rrtype="$2" -v ttl="$3" '($4 == "IN" || $4 == "CLASS1" ) && $5 == rrtype { if ($3 <= ttl) { ok=1 } } END { exit(ok?0:1) }' < $file
|
||||
;;
|
||||
*)
|
||||
awk -v rrtype="$2" -v ttl="$3" '($3 == "IN" || $3 == "CLASS1" ) && $4 == rrtype { if ($2 <= ttl) { ok=1 } } END { exit(ok?0:1) }' < $file
|
||||
;;
|
||||
esac
|
||||
|
||||
result=$?
|
||||
[ $result -eq 0 ] || echo_i "ttl check failed"
|
||||
return $result
|
||||
}
|
||||
|
||||
# using delv insecure mode as not testing dnssec here
|
||||
delv_with_opts() {
|
||||
"$DELV" -i -p "$PORT" "$@"
|
||||
"$DELV" +noroot +nodlv -p "$PORT" "$@"
|
||||
}
|
||||
|
||||
KEYID="$(cat ns2/keyid)"
|
||||
@@ -53,6 +76,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts @10.53.0.3 +split=4 -t sshfp foo.example > dig.out.test$n || ret=1
|
||||
grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SSHFP" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -61,6 +85,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts @10.53.0.3 +unknownformat a a.example > dig.out.test$n || ret=1
|
||||
grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "TYPE1" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -70,6 +95,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts @10.53.0.3 -x 127.0.0.1 > dig.out.test$n 2>&1 || ret=1
|
||||
# doesn't matter if has answer
|
||||
grep -i "127\\.in-addr\\.arpa\\." < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 86400 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -78,6 +104,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
|
||||
grep "10\\.0\\.0\\.1$" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -86,6 +113,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range dig.out.test$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -94,6 +122,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -102,6 +131,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -144,6 +174,10 @@ if [ -x "$DIG" ] ; then
|
||||
test "$lcmm" -ge "$lcmn" || ret=1
|
||||
test "$lcnm" -ge "$lcnn" || ret=1
|
||||
test "$lcmn" -ge "$lcnn" || ret=1
|
||||
check_ttl_range dig.out.nn.$n "DNSKEY" 300 || ret=1
|
||||
check_ttl_range dig.out.mn.$n "DNSKEY" 300 || ret=1
|
||||
check_ttl_range dig.out.nm.$n "DNSKEY" 300 || ret=1
|
||||
check_ttl_range dig.out.mm.$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -152,6 +186,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.3 +noheader-only A example > dig.out.test$n || ret=1
|
||||
grep "Got answer:" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -178,6 +213,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts +tcp @10.53.0.3 +raflag +qr example > dig.out.test$n || ret=1
|
||||
grep "^;; flags: rd ra ad; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
|
||||
grep "^;; flags: qr rd ra; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -187,6 +223,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts +tcp @10.53.0.3 +tcflag +qr example > dig.out.test$n || ret=1
|
||||
grep "^;; flags: tc rd ad; QUERY: 1, ANSWER: 0" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "^;; flags: qr rd ra; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -205,6 +242,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts +tcp @10.53.0.3 +zflag +qr A example > dig.out.test$n || ret=1
|
||||
sed -n '/Sending:/,/Got answer:/p' dig.out.test$n | grep "^;; flags: rd ad; MBZ: 0x4;" > /dev/null || ret=1
|
||||
sed -n '/Got answer:/,/AUTHORITY SECTION:/p' dig.out.test$n | grep "^;; flags: qr rd ra; QUERY: 1" > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -217,6 +255,7 @@ if [ -x "$DIG" ] ; then
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "checking dig +ttlunits works ($n)"
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.2 +ttlunits A weeks.example > dig.out.test$n || ret=1
|
||||
@@ -323,6 +362,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.2 +subnet=127.0.0.1 A a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep "CLIENT-SUBNET: 127.0.0.1/32/0" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -331,6 +371,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts +tcp @10.53.0.2 +subnet=127.0.0.0 +subnet=127.0.0.1 A a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep "CLIENT-SUBNET: 127.0.0.1/32/0" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -356,6 +397,7 @@ if [ -x "$DIG" ] ; then
|
||||
esac
|
||||
grep "FORMERR" < dig.out.$i.test$n > /dev/null && ret=1
|
||||
grep "CLIENT-SUBNET: $addr/$i/0" < dig.out.$i.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.$i.test$n "A" 300 || ret=1
|
||||
done
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
@@ -367,6 +409,7 @@ if [ -x "$DIG" ] ; then
|
||||
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "CLIENT-SUBNET: 0.0.0.0/0/0" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -377,6 +420,7 @@ if [ -x "$DIG" ] ; then
|
||||
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "CLIENT-SUBNET: 0.0.0.0/0/0" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -387,6 +431,7 @@ if [ -x "$DIG" ] ; then
|
||||
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "CLIENT-SUBNET: ::/0/0" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -397,6 +442,7 @@ if [ -x "$DIG" ] ; then
|
||||
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "CLIENT-SUBNET: 0/0/0" < dig.out.test$n > /dev/null || ret=1
|
||||
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -417,6 +463,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts +tcp @10.53.0.2 +subnet=10.53/$p A a.example > dig.out.test.$p.$n 2>&1 || ret=1
|
||||
grep "FORMERR" < dig.out.test.$p.$n > /dev/null && ret=1
|
||||
grep "CLIENT-SUBNET.*/$p/0" < dig.out.test.$p.$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test.$p.$n "A" 300 || ret=1
|
||||
done
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
@@ -426,6 +473,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts @10.53.0.3 +sp=4 -t sshfp foo.example > dig.out.test$n || ret=1
|
||||
grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "SSHFP" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -453,6 +501,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts @10.53.0.3 +ednsopt=3 a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep 'NSID: .* ("ns3")' dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -461,6 +510,7 @@ if [ -x "$DIG" ] ; then
|
||||
ret=0
|
||||
dig_with_opts @10.53.0.3 +ednsopt=nsid a.example > dig.out.test$n 2>&1 || ret=1
|
||||
grep 'NSID: .* ("ns3")' dig.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -485,6 +535,7 @@ if [ -x "$DIG" ] ; then
|
||||
dig_with_opts @10.53.0.3 +ednsopt=key-tag:00010002 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range dig.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -497,6 +548,54 @@ if [ -x "$DIG" ] ; then
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that dig processes +ednsopt=client-tag:value ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=client-tag:0001 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; CLIENT-TAG: 1$" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that FORMERR is returned for a too short client-tag ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=client-tag:01 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; CLIENT-TAG" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that FORMERR is returned for a too long client-tag ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=client-tag:000001 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; CLIENT-TAG" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that dig processes +ednsopt=server-tag:value ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=server-tag:0001 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; SERVER-TAG: 1$" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that FORMERR is returned for a too short server-tag ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=server-tag:01 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; SERVER-TAG" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that FORMERR is returned for a too long server-tag ($n)"
|
||||
dig_with_opts @10.53.0.3 +ednsopt=server-tag:000001 a.example +qr > dig.out.test$n 2>&1 || ret=1
|
||||
grep "; SERVER-TAG" dig.out.test$n > /dev/null || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that dig handles malformed option '+ednsopt=:' gracefully ($n)"
|
||||
ret=0
|
||||
@@ -615,6 +714,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 +split=4 -t sshfp foo.example > delv.out.test$n || ret=1
|
||||
grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "SSHFP" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -623,6 +723,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 +unknownformat a a.example > delv.out.test$n || ret=1
|
||||
grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "TYPE1" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -676,6 +777,7 @@ if [ -x "$DELV" ] ; then
|
||||
delv_with_opts @10.53.0.3 -x 127.0.0.1 > delv.out.test$n 2>&1 || ret=1
|
||||
# doesn't matter if has answer
|
||||
grep -i "127\\.in-addr\\.arpa\\." < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n '\\-ANY' 10800 3 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -684,6 +786,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 a a.example > delv.out.test$n || ret=1
|
||||
grep "10\\.0\\.0\\.1$" < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -692,6 +795,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range delv.out.test$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -700,6 +804,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > delv.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range delv.out.test$n "SOA" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -708,6 +813,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
|
||||
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "DNSKEY" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -752,6 +858,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 +sp=4 -t sshfp foo.example > delv.out.test$n || ret=1
|
||||
grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "SSHFP" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -768,6 +875,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 -c IN -t a a.example > delv.out.test$n || ret=1
|
||||
grep "a.example." < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -776,6 +884,7 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 -c CH -t a a.example > delv.out.test$n || ret=1
|
||||
grep "a.example." < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
@@ -784,16 +893,28 @@ if [ -x "$DELV" ] ; then
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 -c CH -t a a.example > delv.out.test$n || ret=1
|
||||
grep "a.example." < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n "A" 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that delv -q -m works ($n)"
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 -q -m > delv.out.test$n 2>&1
|
||||
delv_with_opts @10.53.0.3 -q -m > delv.out.test$n 2>&1 || ret=1
|
||||
grep '^; -m\..*[0-9]*.*IN.*ANY.*;' delv.out.test$n > /dev/null || ret=1
|
||||
grep "^add " delv.out.test$n > /dev/null && ret=1
|
||||
grep "^del " delv.out.test$n > /dev/null && ret=1
|
||||
check_ttl_range delv.out.test$n '\\-ANY' 300 3 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that delv -t ANY works ($n)"
|
||||
ret=0
|
||||
delv_with_opts @10.53.0.3 -t ANY example > delv.out.test$n 2>&1 || ret=1
|
||||
grep "^example." < delv.out.test$n > /dev/null || ret=1
|
||||
check_ttl_range delv.out.test$n NS 300 || ret=1
|
||||
check_ttl_range delv.out.test$n SOA 300 || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
else
|
||||
|
||||
@@ -16,6 +16,7 @@ rm -f ns1/dsset-*
|
||||
rm -f ns1/*.signed
|
||||
rm -f ns1/signer.err
|
||||
rm -f ns1/root.db
|
||||
rm -f ns1/trusted.conf
|
||||
rm -f ns2/K*
|
||||
rm -f ns2/dlvset-*
|
||||
rm -f ns2/dsset-*
|
||||
@@ -25,18 +26,19 @@ rm -f ns2/signer.err
|
||||
rm -f ns2/druz.db
|
||||
rm -f ns3/K*
|
||||
rm -f ns3/*.db
|
||||
rm -f ns3/*.signed
|
||||
rm -f ns3/*.signed ns3/*.signed.tmp
|
||||
rm -f ns3/dlvset-*
|
||||
rm -f ns3/dsset-*
|
||||
rm -f ns3/keyset-*
|
||||
rm -f ns1/trusted.conf ns5/trusted.conf
|
||||
rm -f ns3/trusted-dlv.conf ns5/trusted-dlv.conf
|
||||
rm -f ns3/trusted*.conf
|
||||
rm -f ns3/signer.err
|
||||
rm -f ns5/trusted*.conf
|
||||
rm -f ns6/K*
|
||||
rm -f ns6/*.db
|
||||
rm -f ns6/*.signed
|
||||
rm -f ns6/dsset-*
|
||||
rm -f ns6/signer.err
|
||||
rm -f ns7/trusted*.conf ns8/trusted*.conf
|
||||
rm -f */named.memstats
|
||||
rm -f dig.out.ns*.test*
|
||||
rm -f ns*/named.lock
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user